|
|
(self.webpackChunk=self.webpackChunk||[]).push([[7460],{10906:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return ye}});var Le=Ie(67711),Se=Ie(59301),je={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z"}}]},name:"form",theme:"outlined"},Me=je,Ce=Ie(7657),xe=function(pe,de){return Se.createElement(Ce.Z,(0,Le.Z)({},pe,{ref:de,icon:Me}))},be=Se.forwardRef(xe),ye=be},76618:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return ye}});var Le=Ie(67711),Se=Ie(59301),je={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"}}]},name:"poweroff",theme:"outlined"},Me=je,Ce=Ie(7657),xe=function(pe,de){return Se.createElement(Ce.Z,(0,Le.Z)({},pe,{ref:de,icon:Me}))},be=Se.forwardRef(xe),ye=be},8336:function(){"use strict"},12469:function(){"use strict"},99587:function(xn,ln){"use strict";ln.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},42909:function(xn,ln){"use strict";ln.Z={header:"header___HqHSe",checkboxs:"checkboxs___ObBnD",field:"field___w_sM6","oj-form-container":"oj-form-container____odYP","oj-left-panel":"oj-left-panel___emEB2","oj-form-info":"oj-form-info___m00Ag",footer:"footer___O4iSJ",collapse:"collapse___Ltfkj","test-case-name":"test-case-name___miZcb","btn-remove-case":"btn-remove-case___cHap2","icon-tag":"icon-tag___gmyTb",btn_back:"btn_back___tNmX3",testJi:"testJi___L3fHb",upBtn:"upBtn___RGH6X",djs:"djs____TS0n",time:"time___IAdHc"}},39744:function(){"use strict"},3932:function(xn,ln,Ie){"use strict";var Le=Ie(59301),Se=Object.defineProperty,je=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,xe=(we,pe,de)=>pe in we?Se(we,pe,{enumerable:!0,configurable:!0,writable:!0,value:de}):we[pe]=de,be=(we,pe)=>{for(var de in pe||(pe={}))Me.call(pe,de)&&xe(we,de,pe[de]);if(je)for(var de of je(pe))Ce.call(pe,de)&&xe(we,de,pe[de]);return we};const ye=we=>React.createElement("svg",be({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},we),React.createElement("title",null,"\u5360\u7528\u5185\u5B58"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{fillOpacity:.01,fill:"#FFF",d:"M0 0h30v30H0z"}),React.createElement("path",{d:"M6.866 26.928h-1.28a2.561 2.561 0 0 1-2.562-2.561V5.585a2.561 2.561 0 0 1 2.561-2.56h1.28v4.268a2.561 2.561 0 0 0 2.562 2.56h3.842a2.561 2.561 0 0 0 2.56-2.56V3.024h2.915l8.184 8.184v13.159a2.561 2.561 0 0 1-2.561 2.561h-1.28v-5.976c0-.943-.765-1.707-1.708-1.707H8.573c-.943 0-1.707.764-1.707 1.707v5.976Z",fill:"#B6D0FC"}),React.createElement("path",{d:"M8.573 3.024h5.55v4.269a.854.854 0 0 1-.854.853H9.427a.854.854 0 0 1-.854-.853V3.024ZM8.573 26.928v-5.976H21.38v5.976z",fill:"#1890FF"})));ln.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBmaWxsLW9wYWNpdHk9Ii4wMSIgZmlsbD0iI0ZGRiIgZD0iTTAgMGgzMHYzMEgweiIvPjxwYXRoIGQ9Ik02Ljg2NiAyNi45MjhoLTEuMjhhMi41NjEgMi41NjEgMCAwIDEtMi41NjItMi41NjFWNS41ODVhMi41NjEgMi41NjEgMCAwIDEgMi41NjEtMi41NmgxLjI4djQuMjY4YTIuNTYxIDIuNTYxIDAgMCAwIDIuNTYyIDIuNTZoMy44NDJhMi41NjEgMi41NjEgMCAwIDAgMi41Ni0yLjU2VjMuMDI0aDIuOTE1bDguMTg0IDguMTg0djEzLjE1OWEyLjU2MSAyLjU2MSAwIDAgMS0yLjU2MSAyLjU2MWgtMS4yOHYtNS45NzZjMC0uOTQzLS43NjUtMS43MDctMS43MDgtMS43MDdIOC41NzNjLS45NDMgMC0xLjcwNy43NjQtMS43MDcgMS43MDd2NS45NzZaIiBmaWxsPSIjQjZEMEZDIi8+PHBhdGggZD0iTTguNTczIDMuMDI0aDUuNTV2NC4yNjlhLjg1NC44NTQgMCAwIDEtLjg1NC44NTNIOS40MjdhLjg1NC44NTQgMCAwIDEtLjg1NC0uODUzVjMuMDI0Wk04LjU3MyAyNi45Mjh2LTUuOTc2SDIxLjM4djUuOTc2eiIgZmlsbD0iIzE4OTBGRiIvPjwvZz48L3N2Zz4="},64126:function(xn,ln,Ie){"use strict";var Le=Ie(59301),Se=Object.defineProperty,je=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,xe=(we,pe,de)=>pe in we?Se(we,pe,{enumerable:!0,configurable:!0,writable:!0,value:de}):we[pe]=de,be=(we,pe)=>{for(var de in pe||(pe={}))Me.call(pe,de)&&xe(we,de,pe[de]);if(je)for(var de of je(pe))Ce.call(pe,de)&&xe(we,de,pe[de]);return we};const ye=we=>React.createElement("svg",be({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},we),React.createElement("title",null,"\u8FD0\u884C\u65F6\u95F4"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M30 15c0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0c8.284 0 15 6.716 15 15Z",fill:"#BAFFF0"}),React.createElement("path",{d:"M25.5 15c0 5.8-4.7 10.5-10.5 10.5S4.5 20.8 4.5 15 9.2 4.5 15 4.5 25.5 9.2 25.5 15Z",fill:"#44D7B6"}),React.createElement("path",{d:"M13.5 9a1.5 1.5 0 0 1 1.5 1.5v4.379l3.56 3.56a1.5 1.5 0 0 1-2.12 2.122l-4-4A1.5 1.5 0 0 1 12 15.5v-5A1.5 1.5 0 0 1 13.5 9Z",fill:"#FFF"})));ln.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMzAgMTVjMCA4LjI4NC02LjcxNiAxNS0xNSAxNS04LjI4NCAwLTE1LTYuNzE2LTE1LTE1QzAgNi43MTYgNi43MTYgMCAxNSAwYzguMjg0IDAgMTUgNi43MTYgMTUgMTVaIiBmaWxsPSIjQkFGRkYwIi8+PHBhdGggZD0iTTI1LjUgMTVjMCA1LjgtNC43IDEwLjUtMTAuNSAxMC41UzQuNSAyMC44IDQuNSAxNSA5LjIgNC41IDE1IDQuNSAyNS41IDkuMiAyNS41IDE1WiIgZmlsbD0iIzQ0RDdCNiIvPjxwYXRoIGQ9Ik0xMy41IDlhMS41IDEuNSAwIDAgMSAxLjUgMS41djQuMzc5bDMuNTYgMy41NmExLjUgMS41IDAgMCAxLTIuMTIgMi4xMjJsLTQtNEExLjUgMS41IDAgMCAxIDEyIDE1LjV2LTVBMS41IDEuNSAwIDAgMSAxMy41IDlaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg=="},63720:function(){"use strict";function xn(ue,ee,z,oe){z===void 0&&(z=0),oe===void 0&&(oe=1/0),this._name=ue,this._defaultValue=ee,this._minimum=z,this._maximum=oe}Object.defineProperty(xn.prototype,"name",{get:function(){return this._name},set:function(ue){if(typeof ue!="string"||ue==="")throw new Error("Shape name must be a valid string.");this._name=ue}}),Object.defineProperty(xn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(ue){if(typeof ue!="number"||isNaN(ue))throw new Error("The default value must be a real number, not: "+ue);this._defaultValue=ue}}),Object.defineProperty(xn.prototype,"minimum",{get:function(){return this._minimum},set:function(ue){if(typeof ue!="number"||isNaN(ue))throw new Error("Minimum must be a real number, not: "+ue);this._minimum=ue}}),Object.defineProperty(xn.prototype,"maximum",{get:function(){return this._maximum},set:function(ue){if(typeof ue!="number"||isNaN(ue))throw new Error("Maximum must be a real number, not: "+ue);this._maximum=ue}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(ue,ee){var z=go.Shape._FigureParameters[ue];return z?z[ee]:null},go.Shape.setFigureParameter=function(ue,ee,z){if(!(z instanceof xn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+z);if(z.defaultValue<z.minimum||z.defaultValue>z.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+z.defaultValue);var oe=go.Shape._FigureParameters[ue];oe||(oe=[],go.Shape._FigureParameters[ue]=oe),oe[ee]=z};var ln=[];function Ie(ue,ee){var z=ln.pop();return z===void 0?new go.Point(ue,ee):(z.x=ue,z.y=ee,z)}function Le(){var ue=ln.pop();return ue===void 0?new go.Point:ue}function Se(ue){ln.push(ue)}function je(ue,ee,z,oe,re,ae,le,me,ve){ve||(ve=new go.Point);var Pe=ue-z,Ae=re-le,De=NaN,Oe=NaN;if(Pe===0)if(Ae===0)ue===z&&(De=ue,Oe=ee);else{var Ze=(ae-me)/Ae,qe=ae-Ze*re;De=ue,Oe=Ze*De+qe}else if(Ae===0){var Xe=(ee-oe)/Pe,mt=ee-Xe*ue;De=re,Oe=Xe*De+mt}else{var Xe=(ee-oe)/Pe,Ze=(ae-me)/Ae,mt=ee-Xe*ue,qe=ae-Ze*re;De=(qe-mt)/(Xe-Ze),Oe=Xe*De+mt}return ve.x=De,ve.y=Oe,ve}function Me(ue,ee,z,oe,re,ae,le,me,ve,Pe,Ae,De,Oe,Ze){var qe=1-ve,Xe=ve,mt=ue*qe+z*Xe,pt=ee*qe+oe*Xe,Mt=z*qe+re*Xe,at=oe*qe+ae*Xe,_t=re*qe+le*Xe,dt=ae*qe+me*Xe,Rt=mt*qe+Mt*Xe,ut=pt*qe+at*Xe,rt=Mt*qe+_t*Xe,ct=at*qe+dt*Xe,yt=Rt*qe+rt*Xe,wt=ut*qe+ct*Xe;Pe.x=mt,Pe.y=pt,Ae.x=Rt,Ae.y=ut,De.x=yt,De.y=wt,Oe.x=rt,Oe.y=ct,Ze.x=_t,Ze.y=dt}var Ce=new go.Spot(.156,.156),xe=new go.Spot(.844,.844),be=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new xn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=5),oe=Math.min(oe,ee/3),oe=Math.min(oe,z/3);var re=oe*be,ae=new go.Geometry().add(new go.PathFigure(oe,0,!0).add(new go.PathSegment(go.PathSegment.Line,ee-oe,0)).add(new go.PathSegment(go.PathSegment.Bezier,ee,oe,ee-re,0,ee,re)).add(new go.PathSegment(go.PathSegment.Line,ee,z-oe)).add(new go.PathSegment(go.PathSegment.Bezier,ee-oe,z,ee,z-re,ee-re,z)).add(new go.PathSegment(go.PathSegment.Line,oe,z)).add(new go.PathSegment(go.PathSegment.Bezier,0,z-oe,re,z,0,z-re)).add(new go.PathSegment(go.PathSegment.Line,0,oe)).add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,re,re,0).close()));return re>1&&(ae.spot1=new go.Spot(0,0,re,re),ae.spot2=new go.Spot(1,1,-re,-re)),ae}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,.5*ee,z).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(ee,z).add(new go.PathSegment(go.PathSegment.Line,0,.5*z)).add(new go.PathSegment(go.PathSegment.Line,ee,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(ee,z).add(new go.PathSegment(go.PathSegment.Line,0,z)).add(new go.PathSegment(go.PathSegment.Line,.5*ee,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(.5*ee,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*z)).add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)).add(new go.PathSegment(go.PathSegment.Line,ee,.5*z).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(ue,ee,z){var oe=new go.Geometry(go.Geometry.Line);return oe.startX=0,oe.startY=z/2,oe.endX=ee,oe.endY=z/2,oe}),go.Shape.defineFigureGenerator("LineV",function(ue,ee,z){var oe=new go.Geometry(go.Geometry.Line);return oe.startX=ee/2,oe.startY=0,oe.endX=ee/2,oe.endY=z,oe}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,z/2,!1).add(new go.PathSegment(go.PathSegment.Line,ee,z/2)).add(new go.PathSegment(go.PathSegment.Move,ee/2,0)).add(new go.PathSegment(go.PathSegment.Line,ee/2,z)))}),go.Shape.defineFigureGenerator("XLine",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,z,!1).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)))}),go.Shape.defineFigureGenerator("LineRight",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(.25*ee,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*ee,.5*z)).add(new go.PathSegment(go.PathSegment.Line,.25*ee,z)))}),go.Shape.defineFigureGenerator("LineDown",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,.25*z,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ee,.75*z)).add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)))}),go.Shape.defineFigureGenerator("LineLeft",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(.75*ee,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*ee,.5*z)).add(new go.PathSegment(go.PathSegment.Line,.75*ee,z)))}),go.Shape.defineFigureGenerator("LineUp",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,.75*z,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ee,.25*z)).add(new go.PathSegment(go.PathSegment.Line,ee,.75*z)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(ue,ee,z){var oe=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(oe*ee,(1-oe)*z,!1).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*ee,oe*z)).add(new go.PathSegment(go.PathSegment.Move,oe*ee,oe*z)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*ee,(1-oe)*z)).add(new go.PathSegment(go.PathSegment.Move,0,z/2)).add(new go.PathSegment(go.PathSegment.Line,ee,z/2)).add(new go.PathSegment(go.PathSegment.Move,ee/2,0)).add(new go.PathSegment(go.PathSegment.Line,ee/2,z)))}),go.Shape.defineFigureGenerator("CircleLine",function(ue,ee,z){var oe=ee/2,re=new go.Geometry().add(new go.PathFigure(ee,ee/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,oe,oe,oe,oe).close()));return re.spot1=Ce,re.spot2=xe,re.defaultStretch=go.GraphObject.Uniform,re}),go.Shape.defineFigureGenerator("Line1",function(ue,ee,z){var oe=new go.Geometry(go.Geometry.Line);return oe.startX=0,oe.startY=0,oe.endX=ee,oe.endY=z,oe}),go.Shape.defineFigureGenerator("Line2",function(ue,ee,z){var oe=new go.Geometry(go.Geometry.Line);return oe.startX=ee,oe.startY=0,oe.endX=0,oe.endY=z,oe}),go.Shape.defineFigureGenerator("Curve1",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,ee,z,be*ee,0,ee,(1-be)*z)))}),go.Shape.defineFigureGenerator("Curve2",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,ee,z,0,be*z,(1-be)*ee,z)))}),go.Shape.defineFigureGenerator("Curve3",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(ee,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,z,ee,be*z,be*ee,z)))}),go.Shape.defineFigureGenerator("Curve4",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(ee,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,z,(1-be)*ee,0,0,(1-be)*z)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(ee,0,!0).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new xn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)?oe=.1:oe<-1?oe=-1:oe>1&&(oe=1);var re=Math.abs(oe)*ee;if(oe===0){var ae=new go.Geometry(go.Geometry.Rectangle);return ae.startX=0,ae.startY=0,ae.endX=ee,ae.endY=z,ae}else{var ae=new go.Geometry;return oe>0?ae.add(new go.PathFigure(re,0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee-re,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())):ae.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee-re,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,re,z).close())),re<ee/2&&ae.setSpots(re/ee,0,(ee-re)/ee,1),ae}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new xn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)?oe=10:oe<-ee?oe=-ee:oe>ee&&(oe=ee);var re=Math.abs(oe);if(oe===0){var ae=new go.Geometry(go.Geometry.Rectangle);return ae.startX=0,ae.startY=0,ae.endX=ee,ae.endY=z,ae}else{var ae=new go.Geometry;return oe>0?ae.add(new go.PathFigure(re,0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee-re,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())):ae.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee-re,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,re,z).close())),re<ee/2&&ae.setSpots(re/ee,0,(ee-re)/ee,1),ae}}),go.Shape.setFigureParameter("Trapezoid1",0,new xn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)?oe=.2:oe<.5?oe=-.5:oe>.5&&(oe=.5);var re=Math.abs(oe)*ee;if(oe===0){var ae=new go.Geometry(go.Geometry.Rectangle);return ae.startX=0,ae.startY=0,ae.endX=ee,ae.endY=z,ae}else{var ae=new go.Geometry;return oe>0?ae.add(new go.PathFigure(re,0).add(new go.PathSegment(go.PathSegment.Line,ee-re,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())):ae.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee-re,z)).add(new go.PathSegment(go.PathSegment.Line,re,z).close())),re<ee/2&&ae.setSpots(re/ee,0,(ee-re)/ee,1),ae}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new xn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)?oe=20:oe<-ee?oe=-ee/2:oe>ee&&(oe=ee/2);var re=Math.abs(oe);if(oe===0){var ae=new go.Geometry(go.Geometry.Rectangle);return ae.startX=0,ae.startY=0,ae.endX=ee,ae.endY=z,ae}else{var ae=new go.Geometry;return oe>0?ae.add(new go.PathFigure(re,0).add(new go.PathSegment(go.PathSegment.Line,ee-re,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())):ae.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee-re,z)).add(new go.PathSegment(go.PathSegment.Line,re,z).close())),re<ee/2&&ae.setSpots(re/ee,0,(ee-re)/ee,1),ae}}),go.Shape.setFigureParameter("ManualOperation",0,new xn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)?oe=10:oe<-ee?oe=-ee/2:oe>ee&&(oe=ee/2);var re=Math.abs(oe);if(oe===0){var ae=new go.Geometry(go.Geometry.Rectangle);return ae.startX=0,ae.startY=0,ae.endX=ee,ae.endY=z,ae}else{var ae=new go.Geometry;return oe>0?ae.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee-re,z)).add(new go.PathSegment(go.PathSegment.Line,re,z).close())):ae.add(new go.PathFigure(re,0).add(new go.PathSegment(go.PathSegment.Line,ee-re,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())),re<ee/2&&ae.setSpots(re/ee,0,(ee-re)/ee,1),ae}});var ye=[];function we(){var ue=ye.pop();return ue===void 0?[]:ue}function pe(ue){ue.length=0,ye.push(ue)}function de(ue){for(var ee=we(),z=.5,oe=.5,re=Math.PI*1.5,ae=0,le=0;le<ue;le++)ae=2*Math.PI/ue*le+re,ee[le]=new go.Point(oe+z*Math.cos(ae),oe+z*Math.sin(ae));return ee.push(ee[0]),ee}function ge(ue){var ee=fe(ue),z=we();z[0]=ee[0];for(var oe=1,re=1;oe<ee.length;oe+=2,re+=3)z[re]=ee[oe],z[re+1]=ee[oe],z[re+2]=ee[oe+1];return pe(ee),z}function fe(ue){for(var ee=de(ue),z=we(),oe=Math.floor(ee.length/2),re=ee.length-1,ae=ue%2===0?2:1,le=0;le<re;le++){var me=ee[le],ve=ee[le+1],Pe=ee[(oe+le-1)%re],Ae=ee[(oe+le+ae)%re];z[le*2]=me,z[le*2+1]=je(me.x,me.y,Pe.x,Pe.y,ve.x,ve.y,Ae.x,Ae.y,new go.Point)}return z[z.length]=z[0],pe(ee),z}go.Shape.defineFigureGenerator("Pentagon",function(ue,ee,z){var oe=de(5),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<5;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.2,.22),re.spot2=new go.Spot(.8,.9),re}),go.Shape.defineFigureGenerator("Hexagon",function(ue,ee,z){var oe=de(6),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<6;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.07,.25),re.spot2=new go.Spot(.93,.75),re}),go.Shape.defineFigureGenerator("Heptagon",function(ue,ee,z){var oe=de(7),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<7;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.2,.15),re.spot2=new go.Spot(.8,.85),re}),go.Shape.defineFigureGenerator("Octagon",function(ue,ee,z){var oe=de(8),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<8;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.15,.15),re.spot2=new go.Spot(.85,.85),re}),go.Shape.defineFigureGenerator("Nonagon",function(ue,ee,z){var oe=de(9),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<9;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.17,.13),re.spot2=new go.Spot(.82,.82),re}),go.Shape.defineFigureGenerator("Decagon",function(ue,ee,z){var oe=de(10),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<10;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.16,.16),re.spot2=new go.Spot(.84,.84),re}),go.Shape.defineFigureGenerator("Dodecagon",function(ue,ee,z){var oe=de(12),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<12;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.16,.16),re.spot2=new go.Spot(.84,.84),re}),go.Shape.defineFigureGenerator("FivePointedStar",function(ue,ee,z){var oe=fe(5),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<10;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.266,.333),re.spot2=new go.Spot(.733,.733),re}),go.Shape.defineFigureGenerator("SixPointedStar",function(ue,ee,z){var oe=fe(6),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<12;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.17,.25),re.spot2=new go.Spot(.83,.75),re}),go.Shape.defineFigureGenerator("SevenPointedStar",function(ue,ee,z){var oe=fe(7),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<14;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.222,.277),re.spot2=new go.Spot(.777,.666),re}),go.Shape.defineFigureGenerator("EightPointedStar",function(ue,ee,z){var oe=fe(8),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<16;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.25,.25),re.spot2=new go.Spot(.75,.75),re}),go.Shape.defineFigureGenerator("NinePointedStar",function(ue,ee,z){var oe=fe(9),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<18;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.222,.277),re.spot2=new go.Spot(.777,.666),re}),go.Shape.defineFigureGenerator("TenPointedStar",function(ue,ee,z){var oe=fe(10),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<20;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.281,.261),re.spot2=new go.Spot(.723,.748),re}),go.Shape.defineFigureGenerator("FivePointedBurst",function(ue,ee,z){var oe=ge(5),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<oe.length;le+=3)ae.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*ee,oe[le+2].y*z,oe[le].x*ee,oe[le].y*z,oe[le+1].x*ee,oe[le+1].y*z));return ae.segments.last().close(),pe(oe),re.spot1=new go.Spot(.222,.277),re.spot2=new go.Spot(.777,.777),re}),go.Shape.defineFigureGenerator("SixPointedBurst",function(ue,ee,z){var oe=ge(6),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<oe.length;le+=3)ae.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*ee,oe[le+2].y*z,oe[le].x*ee,oe[le].y*z,oe[le+1].x*ee,oe[le+1].y*z));return ae.segments.last().close(),pe(oe),re.spot1=new go.Spot(.17,.222),re.spot2=new go.Spot(.833,.777),re}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(ue,ee,z){var oe=ge(7),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<oe.length;le+=3)ae.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*ee,oe[le+2].y*z,oe[le].x*ee,oe[le].y*z,oe[le+1].x*ee,oe[le+1].y*z));return ae.segments.last().close(),pe(oe),re.spot1=new go.Spot(.222,.222),re.spot2=new go.Spot(.777,.777),re}),go.Shape.defineFigureGenerator("EightPointedBurst",function(ue,ee,z){var oe=ge(8),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<oe.length;le+=3)ae.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*ee,oe[le+2].y*z,oe[le].x*ee,oe[le].y*z,oe[le+1].x*ee,oe[le+1].y*z));return ae.segments.last().close(),pe(oe),re.spot1=new go.Spot(.222,.222),re.spot2=new go.Spot(.777,.777),re}),go.Shape.defineFigureGenerator("NinePointedBurst",function(ue,ee,z){var oe=ge(9),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<oe.length;le+=3)ae.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*ee,oe[le+2].y*z,oe[le].x*ee,oe[le].y*z,oe[le+1].x*ee,oe[le+1].y*z));return ae.segments.last().close(),pe(oe),re.spot1=new go.Spot(.222,.222),re.spot2=new go.Spot(.777,.777),re}),go.Shape.defineFigureGenerator("TenPointedBurst",function(ue,ee,z){var oe=ge(10),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<oe.length;le+=3)ae.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*ee,oe[le+2].y*z,oe[le].x*ee,oe[le].y*z,oe[le+1].x*ee,oe[le+1].y*z));return ae.segments.last().close(),pe(oe),re.spot1=new go.Spot(.222,.222),re.spot2=new go.Spot(.777,.777),re}),go.Shape.setFigureParameter("FramedRectangle",0,new xn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new xn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(ue,ee,z){var oe=ue?ue.parameter1:NaN,re=ue?ue.parameter2:NaN;isNaN(oe)&&(oe=8),isNaN(re)&&(re=8);var ae=new go.Geometry,le=new go.PathFigure(0,0,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe<ee/2&&re<z/2&&(le.add(new go.PathSegment(go.PathSegment.Move,oe,re)),le.add(new go.PathSegment(go.PathSegment.Line,oe,z-re)),le.add(new go.PathSegment(go.PathSegment.Line,ee-oe,z-re)),le.add(new go.PathSegment(go.PathSegment.Line,ee-oe,re).close())),ae.setSpots(0,0,1,1,oe,re,-oe,-re),ae}),go.Shape.setFigureParameter("Ring",0,new xn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=8);var re=ee/2,ae=new go.Geometry,le=new go.PathFigure(ee,ee/2,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Arc,0,360,re,re,re,re).close());var me=Math.max(re-oe,0);return me>0&&(le.add(new go.PathSegment(go.PathSegment.Move,ee/2+me,ee/2)),le.add(new go.PathSegment(go.PathSegment.Arc,0,-360,re,re,me,me).close())),ae.spot1=Ce,ae.spot2=xe,ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("Cloud",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(.08034461*ee,.1944299*z,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*ee,.05349299*z,-.09239631*ee,.07836421*z,.1406031*ee,-.0542823*z)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*ee,.074219*z,.2450511*ee,-.00697547*z,.3776197*ee,-.01112067*z)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*ee,.07004196*z,.4539471*ee,0,.6066018*ee,-.02526587*z)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*ee,.08370865*z,.6914277*ee,-.01904177*z,.8921095*ee,-.01220843*z)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*ee,.3194596*z,1.036446*ee,.04105738*z,1.020377*ee,.3022052*z)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*ee,.562044*z,1.04448*ee,.360238*z,.992256*ee,.5219009*z)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*ee,.8217117*z,1.032337*ee,.5771781*z,1.018411*ee,.8120651*z)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*ee,.9156953*z,1.028411*ee,.9571472*z,.8556702*ee,1.052487*z)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*ee,.9310455*z,.7431877*ee,1.009325*z,.5624123*ee,1.021761*z)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*ee,.9344623*z,.4820677*ee,1.031761*z,.3030112*ee,1.002796*z)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*ee,.870098*z,.2329994*ee,1.01518*z,.03213784*ee,1.01518*z)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*ee,.6545475*z,-.02812061*ee,.9032597*z,-.01205169*ee,.6835638*z)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*ee,.4265613*z,-.01812061*ee,.6089503*z,-.00606892*ee,.4555777*z)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*ee,.1944299*z,-.01606892*ee,.3892545*z,-.01205169*ee,.1944299*z))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(ue,ee,z){var oe=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(oe*ee,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee,oe*z)).add(new go.PathSegment(go.PathSegment.Line,ee,(1-oe)*z)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*ee,z)).add(new go.PathSegment(go.PathSegment.Line,oe*ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,(1-oe)*z)).add(new go.PathSegment(go.PathSegment.Line,0,oe*z).close())).setSpots(oe/2,oe/2,1-oe/2,1-oe/2)}),go.Shape.setFigureParameter("Pie",0,new xn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new xn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(ue,ee,z){var oe=ue?ue.parameter1:NaN,re=ue?ue.parameter2:NaN;isNaN(oe)&&(oe=0),isNaN(re)&&(re=315);var ae=oe%360;ae<0&&(ae+=360);var le=re%360,me=Math.min(ee,z)/2;return new go.Geometry().add(new go.PathFigure(me,me).add(new go.PathSegment(go.PathSegment.Arc,ae,le,me,me,me,me).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(ue,ee,z){var oe=be/Math.SQRT2*.5,re=Math.SQRT2/2,ae=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(ee,z,!0).add(new go.PathSegment(go.PathSegment.Bezier,re*ee,ae*z,ee,(1-oe)*z,(re+oe)*ee,(ae+oe)*z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close()))}),go.Shape.setFigureParameter("ThickCross",0,new xn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=30);var re=Math.min(oe,ee)/2,ae=ee/2,le=z/2;return new go.Geometry().add(new go.PathFigure(ae-re,0,!0).add(new go.PathSegment(go.PathSegment.Line,ae+re,0)).add(new go.PathSegment(go.PathSegment.Line,ae+re,le-re)).add(new go.PathSegment(go.PathSegment.Line,ee,le-re)).add(new go.PathSegment(go.PathSegment.Line,ee,le+re)).add(new go.PathSegment(go.PathSegment.Line,ae+re,le+re)).add(new go.PathSegment(go.PathSegment.Line,ae+re,z)).add(new go.PathSegment(go.PathSegment.Line,ae-re,z)).add(new go.PathSegment(go.PathSegment.Line,ae-re,le+re)).add(new go.PathSegment(go.PathSegment.Line,0,le+re)).add(new go.PathSegment(go.PathSegment.Line,0,le-re)).add(new go.PathSegment(go.PathSegment.Line,ae-re,le-re).close()))}),go.Shape.setFigureParameter("ThinCross",0,new xn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=10);var re=Math.min(oe,ee)/2,ae=ee/2,le=z/2;return new go.Geometry().add(new go.PathFigure(ae-re,0,!0).add(new go.PathSegment(go.PathSegment.Line,ae+re,0)).add(new go.PathSegment(go.PathSegment.Line,ae+re,le-re)).add(new go.PathSegment(go.PathSegment.Line,ee,le-re)).add(new go.PathSegment(go.PathSegment.Line,ee,le+re)).add(new go.PathSegment(go.PathSegment.Line,ae+re,le+re)).add(new go.PathSegment(go.PathSegment.Line,ae+re,z)).add(new go.PathSegment(go.PathSegment.Line,ae-re,z)).add(new go.PathSegment(go.PathSegment.Line,ae-re,le+re)).add(new go.PathSegment(go.PathSegment.Line,0,le+re)).add(new go.PathSegment(go.PathSegment.Line,0,le-re)).add(new go.PathSegment(go.PathSegment.Line,ae-re,le-re).close()))}),go.Shape.setFigureParameter("ThickX",0,new xn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;if((isNaN(oe)||oe<0)&&(oe=30),ee===0||z===0){var re=new go.Geometry(go.Geometry.Rectangle);return re.startX=0,re.startY=0,re.endX=ee,re.endY=z,re}else{var ae=ee/2,le=z/2,me=Math.atan2(z,ee),ve=oe-Math.min(Math.cos(me)*oe/2,ae),Pe=oe-Math.min(Math.sin(me)*oe/2,le),re=new go.Geometry,Ae=new go.PathFigure(ve,0,!0);return re.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,ae,.2*z)),Ae.add(new go.PathSegment(go.PathSegment.Line,ee-ve,0)),Ae.add(new go.PathSegment(go.PathSegment.Line,ee,Pe)),Ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,le)),Ae.add(new go.PathSegment(go.PathSegment.Line,ee,z-Pe)),Ae.add(new go.PathSegment(go.PathSegment.Line,ee-ve,z)),Ae.add(new go.PathSegment(go.PathSegment.Line,ae,.8*z)),Ae.add(new go.PathSegment(go.PathSegment.Line,ve,z)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,z-Pe)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*ee,le)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,Pe).close()),re}}),go.Shape.setFigureParameter("ThinX",0,new xn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=10);var re=new go.Geometry,ae=new go.PathFigure(.1*ee,0,!0);return re.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.4*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.9*ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,.1*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,.9*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.9*ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.6*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.1*ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,.9*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,.1*z).close()),re}),go.Shape.setFigureParameter("SquareIBeam",0,new xn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.2);var re=new go.Geometry,ae=new go.PathFigure(0,0,!0);return re.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,oe*z)),ae.add(new go.PathSegment(go.PathSegment.Line,(.5+oe/2)*ee,oe*z)),ae.add(new go.PathSegment(go.PathSegment.Line,(.5+oe/2)*ee,(1-oe)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,(1-oe)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,(1-oe)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,(.5-oe/2)*ee,(1-oe)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,(.5-oe/2)*ee,oe*z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,oe*z).close()),re}),go.Shape.setFigureParameter("RoundedIBeam",0,new xn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.5);var re=new go.Geometry,ae=new go.PathFigure(0,0,!0);return re.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Bezier,ee,z,Math.abs(1-oe)*ee,.25*z,Math.abs(1-oe)*ee,.75*z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,0,0,oe*ee,.75*z,oe*ee,.25*z).close()),re}),go.Shape.defineFigureGenerator("HalfEllipse",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,be*ee,0,ee,(.5-be/2)*z)).add(new go.PathSegment(go.PathSegment.Bezier,0,z,ee,(.5+be/2)*z,be*ee,z).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,z,ee,0,ee,z)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*ee,.75*z,.5*ee,.25*z).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(.5*ee,z,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*z,.1*ee,.8*z,0,.5*z)).add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.3*z,0,0,.45*ee,0)).add(new go.PathSegment(go.PathSegment.Bezier,ee,.3*z,.55*ee,0,ee,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,ee,.5*z,.9*ee,.8*z).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(.5*ee,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*ee,.01*z)).add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,.6*ee,.2*z,ee,.25*z)).add(new go.PathSegment(go.PathSegment.Bezier,.55*ee,.7*z,ee,.8*z,.6*ee,.8*z)).add(new go.PathSegment(go.PathSegment.Bezier,.75*ee,z,.5*ee,.75*z,.55*ee,.95*z)).add(new go.PathSegment(go.PathSegment.Line,.25*ee,z)).add(new go.PathSegment(go.PathSegment.Bezier,.45*ee,.7*z,.45*ee,.95*z,.5*ee,.75*z)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*z,.4*ee,.8*z,0,.8*z)).add(new go.PathSegment(go.PathSegment.Bezier,.49*ee,.01*z,0,.25*z,.4*ee,.2*z).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.4*ee,.6*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.15*ee,z,.5*ee,.75*z,.45*ee,.95*z)),re.add(new go.PathSegment(go.PathSegment.Line,.85*ee,z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.6*ee,.6*z,.55*ee,.95*z,.5*ee,.75*z));var ae=.2,le=.3,me=0,ve=ae*be;return re.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*ee,(.5+ae+me)*z,(.5-ae+le)*ee,(.5+ve+me)*z,(.5-ve+le)*ee,(.5+ae+me)*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ae+le)*ee,(.5+me)*z,(.5+ve+le)*ee,(.5+ae+me)*z,(.5+ae+le)*ee,(.5+ve+me)*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*ee,(.5-ae+me)*z,(1-.5+ae+le)*ee,(.5-ve+me)*z,(.5+ve+le)*ee,(.5-ae+me)*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.65*ee,.36771243*z,(.5-ve+le)*ee,(.5-ae+me)*z,(.5-ae+le+.05)*ee,(.5-ve+me-.02)*z)),ae=.2,le=0,me=-.3,ve=ae*be,re.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ae+le)*ee,(.5+me)*z,(.5+ve+le)*ee,(.5+ae+me)*z,(.5+ae+le)*ee,(.5+ve+me)*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*ee,(.5-ae+me)*z,(1-.5+ae+le)*ee,(.5-ve+me)*z,(.5+ve+le)*ee,(.5-ae+me)*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ae+le)*ee,(.5+me)*z,(.5-ve+le)*ee,(.5-ae+me)*z,(.5-ae+le)*ee,(.5-ve+me)*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ve+le)*ee,(.5+ae+me)*z,(.5-ae+le)*ee,(.5+ve+me)*z,(.5-ve+le)*ee,(.5+ae+me)*z)),ae=.2,le=-.3,me=0,ve=ae*be,re.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*ee,(.5-ae+me)*z,(1-.5+ae+le-.05)*ee,(.5-ve+me-.02)*z,(.5+ve+le)*ee,(.5-ae+me)*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ae+le)*ee,(.5+me)*z,(.5-ve+le)*ee,(.5-ae+me)*z,(.5-ae+le)*ee,(.5-ve+me)*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*ee,(.5+ae+me)*z,(.5-ae+le)*ee,(.5+ve+me)*z,(.5-ve+le)*ee,(.5+ae+me)*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.4*ee,.6*z,(.5+ve+le)*ee,(.5+ae+me)*z,(.5+ae+le)*ee,(.5+ve+me)*z).close()),oe.setSpots(.06,.33,.93,.68),oe}),go.Shape.defineFigureGenerator("YinYang",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee*.5,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,270,180,ee*.5,ee*.5,ee*.5,ee*.5)),re.add(new go.PathSegment(go.PathSegment.Arc,90,-180,ee*.5,ee*.75,ee*.25,ee*.25)),re.add(new go.PathSegment(go.PathSegment.Arc,90,180,ee*.5,ee*.25,ee*.25,ee*.25));var ae=.1,le=.5,me=.25;return re.add(new go.PathSegment(go.PathSegment.Move,(le+ae)*ee,me*z)),re.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ee*le,z*me,ae*ee,ae*ee).close()),re=new go.PathFigure(ee*.5,0,!1),oe.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,270,-180,ee*.5,ee*.5,ee*.5,ee*.5)),me=.75,re=new go.PathFigure((le+ae)*ee,me*z,!0),oe.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,0,360,ee*le,z*me,ae*ee,ae*ee).close()),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("Peace",function(ue,ee,z){var oe=.8535533905932737,re=.5*ee,ae=.5*z;return new go.Geometry().add(new go.PathFigure(re,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,re,ae,re,ae)).add(new go.PathSegment(go.PathSegment.Line,re,z)).add(new go.PathSegment(go.PathSegment.Move,re,ae)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*ee,oe*z)).add(new go.PathSegment(go.PathSegment.Move,re,ae)).add(new go.PathSegment(go.PathSegment.Line,oe*ee,oe*z)))}),go.Shape.defineFigureGenerator("NotAllowed",function(ue,ee,z){var oe=new go.Geometry,re=be*.5,ae=.5,le=.5,me=.5,ve=new go.PathFigure(le*ee,(me-ae)*z);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le-ae)*ee,me*z,(le-re)*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+ae)*z,(le-ae)*ee,(me+re)*z,(le-re)*ee,(me+ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,me*z,(le+re)*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-ae)*z,(le+ae)*ee,(me-re)*z,(le+re)*ee,(me-ae)*z)),ae=.4,re=be*.4;var Pe=Le(),Ae=Le(),De=Le(),Oe=Le();Me(le,me-ae,le+re,me-ae,le+ae,me-re,le+ae,me,.42,Pe,Ae,De,Oe,Oe);var Ze=Le(),qe=Le(),Xe=Le();Me(le,me-ae,le+re,me-ae,le+ae,me-re,le+ae,me,.58,Oe,Oe,Xe,Ze,qe);var mt=Le(),pt=Le(),Mt=Le();Me(le,me+ae,le-re,me+ae,le-ae,me+re,le-ae,me,.42,mt,pt,Mt,Oe,Oe);var at=Le(),_t=Le(),dt=Le();return Me(le,me+ae,le-re,me+ae,le-ae,me+re,le-ae,me,.58,Oe,Oe,dt,at,_t),ve.add(new go.PathSegment(go.PathSegment.Move,dt.x*ee,dt.y*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le-ae)*ee,me*z,at.x*ee,at.y*z,_t.x*ee,_t.y*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z,(le-re)*ee,(me-ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,De.x*ee,De.y*z,Pe.x*ee,Pe.y*z,Ae.x*ee,Ae.y*z)),ve.add(new go.PathSegment(go.PathSegment.Line,dt.x*ee,dt.y*z).close()),ve.add(new go.PathSegment(go.PathSegment.Move,Mt.x*ee,Mt.y*z)),ve.add(new go.PathSegment(go.PathSegment.Line,Xe.x*ee,Xe.y*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,me*z,Ze.x*ee,Ze.y*z,qe.x*ee,qe.y*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z,(le+re)*ee,(me+ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,Mt.x*ee,Mt.y*z,mt.x*ee,mt.y*z,pt.x*ee,pt.y*z).close()),Se(Pe),Se(Ae),Se(De),Se(Oe),Se(Ze),Se(qe),Se(Xe),Se(mt),Se(pt),Se(Mt),Se(at),Se(_t),Se(dt),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("Fragile",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*ee,0)).add(new go.PathSegment(go.PathSegment.Line,.2*ee,.15*z)).add(new go.PathSegment(go.PathSegment.Line,.3*ee,.25*z)).add(new go.PathSegment(go.PathSegment.Line,.29*ee,.33*z)).add(new go.PathSegment(go.PathSegment.Line,.35*ee,.25*z)).add(new go.PathSegment(go.PathSegment.Line,.3*ee,.15*z)).add(new go.PathSegment(go.PathSegment.Line,.4*ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*ee,.5*z,ee,.25*z,.75*ee,.5*z)).add(new go.PathSegment(go.PathSegment.Line,.55*ee,.9*z)).add(new go.PathSegment(go.PathSegment.Line,.7*ee,.9*z)).add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)).add(new go.PathSegment(go.PathSegment.Line,.3*ee,z)).add(new go.PathSegment(go.PathSegment.Line,.3*ee,.9*z)).add(new go.PathSegment(go.PathSegment.Line,.45*ee,.9*z)).add(new go.PathSegment(go.PathSegment.Line,.45*ee,.5*z)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ee,.5*z,0,.25*z).close()))}),go.Shape.setFigureParameter("HourGlass",0,new xn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=30),oe>ee&&(oe=ee);var re=(ee-oe)/2,ae=re+oe;return new go.Geometry().add(new go.PathFigure(ae,.5*z).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,z)).add(new go.PathSegment(go.PathSegment.Line,re,.5*z)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,ee,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,.55*z).add(new go.PathSegment(go.PathSegment.Line,.6*ee,0)).add(new go.PathSegment(go.PathSegment.Line,.3*ee,.45*z)).add(new go.PathSegment(go.PathSegment.Line,ee,.45*z)).add(new go.PathSegment(go.PathSegment.Line,.4*ee,z)).add(new go.PathSegment(go.PathSegment.Line,.7*ee,.55*z).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(ue,ee,z){var oe=new go.Geometry,re=be*.4,ae=.4,le=.5,me=.5,ve=Le(),Pe=Le(),Ae=Le(),De=Le(),Oe=new go.PathFigure((le-ae)*ee,me*z,!1);oe.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z,(le-re)*ee,(me-ae)*z)),Me(le,me-ae,le+re,me-ae,le+ae,me-re,le+ae,me,.44,Ae,De,Pe,ve,ve),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Pe.x*ee,Pe.y*z,Ae.x*ee,Ae.y*z,De.x*ee,De.y*z));var Ze=Ie(Pe.x,Pe.y);Me(le,me-ae,le+re,me-ae,le+ae,me-re,le+ae,me,.56,ve,ve,Pe,Ae,De);var qe=Ie(Pe.x,Pe.y);Oe.add(new go.PathSegment(go.PathSegment.Line,(Ze.x*.1+.95*.9)*ee,Ze.y*.1*z)),Oe.add(new go.PathSegment(go.PathSegment.Line,.85*ee,Ze.y*.1*z)),Oe.add(new go.PathSegment(go.PathSegment.Line,.85*ee,0)),Oe.add(new go.PathSegment(go.PathSegment.Line,ee,0)),Oe.add(new go.PathSegment(go.PathSegment.Line,ee,.15*z)),Oe.add(new go.PathSegment(go.PathSegment.Line,(qe.x*.1+.9)*ee,.15*z)),Oe.add(new go.PathSegment(go.PathSegment.Line,(qe.x*.1+.9)*ee,(qe.y*.1+.05*.9)*z)),Oe.add(new go.PathSegment(go.PathSegment.Line,qe.x*ee,qe.y*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,me*z,Ae.x*ee,Ae.y*z,De.x*ee,De.y*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z,(le+re)*ee,(me+ae)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(le-ae)*ee,me*z,(le-re)*ee,(me+ae)*z,(le-ae)*ee,(me+re)*z)),ae=.35,re=be*.35;var Xe=new go.PathFigure(le*ee,(me-ae)*z,!1);oe.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(le-ae)*ee,me*z,(le-re)*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+ae)*z,(le-ae)*ee,(me+re)*z,(le-re)*ee,(me+ae)*z)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,me*z,(le+re)*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-ae)*z,(le+ae)*ee,(me-re)*z,(le+re)*ee,(me-ae)*z));var mt=new go.PathFigure((le-ae)*ee,me*z,!1);return oe.add(mt),Se(ve),Se(Pe),Se(Ae),Se(De),Se(Ze),Se(qe),oe.spot1=new go.Spot(.202,.257),oe.spot2=new go.Spot(.792,.739),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("GenderFemale",function(ue,ee,z){var oe=new go.Geometry,re=.375,ae=0,le=-.125,me=re*be,ve=new go.PathFigure((.525+ae)*ee,(.5+re+le)*z,!1);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+re+ae)*ee,(.5+le)*z,(.5+me+ae)*ee,(.5+re+le)*z,(.5+re+ae)*ee,(.5+me+le)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ae)*ee,(.5-re+le)*z,(1-.5+re+ae)*ee,(.5-me+le)*z,(.5+me+ae)*ee,(.5-re+le)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(.5-re+ae)*ee,(.5+le)*z,(.5-me+ae)*ee,(.5-re+le)*z,(.5-re+ae)*ee,(.5-me+le)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(.475+ae)*ee,(.5+re+le)*z,(.5-re+ae)*ee,(.5+me+le)*z,(.5-me+ae)*ee,(.5+re+le)*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.475*ee,.85*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.425*ee,.85*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.425*ee,.9*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.475*ee,.9*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.475*ee,z)),ve.add(new go.PathSegment(go.PathSegment.Line,.525*ee,z)),ve.add(new go.PathSegment(go.PathSegment.Line,.525*ee,.9*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.575*ee,.9*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.575*ee,.85*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.525*ee,.85*z).close()),re=.325,ae=0,le=-.125,me=re*be;var ve=new go.PathFigure((1-.5+re+ae)*ee,(.5+le)*z,!1);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ae)*ee,(.5+re+le)*z,(.5+re+ae)*ee,(.5+me+le)*z,(.5+me+ae)*ee,(.5+re+le)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(.5-re+ae)*ee,(.5+le)*z,(.5-me+ae)*ee,(.5+re+le)*z,(.5-re+ae)*ee,(.5+me+le)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ae)*ee,(.5-re+le)*z,(.5-re+ae)*ee,(.5-me+le)*z,(.5-me+ae)*ee,(.5-re+le)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+re+ae)*ee,(.5+le)*z,(.5+me+ae)*ee,(.5-re+le)*z,(1-.5+re+ae)*ee,(.5-me+le)*z));var ve=new go.PathFigure((.525+ae)*ee,(.5+re+le)*z,!1);return oe.add(ve),oe.spot1=new go.Spot(.232,.136),oe.spot2=new go.Spot(.682,.611),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("LogicImplies",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;return isNaN(oe)&&(oe=.2),new go.Geometry().add(new go.PathFigure((1-oe)*ee,0,!1).add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*ee,z)).add(new go.PathSegment(go.PathSegment.Move,0,.5*z)).add(new go.PathSegment(go.PathSegment.Line,ee,.5*z))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;return isNaN(oe)&&(oe=.2),new go.Geometry().add(new go.PathFigure((1-oe)*ee,0,!1).add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*ee,z)).add(new go.PathSegment(go.PathSegment.Move,0,.5*z)).add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)).add(new go.PathSegment(go.PathSegment.Move,oe*ee,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*z)).add(new go.PathSegment(go.PathSegment.Line,oe*ee,z))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)))}),go.Shape.defineFigureGenerator("LogicAnd",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,z,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)).add(new go.PathSegment(go.PathSegment.Line,ee,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(ue,ee,z){var oe=new go.Geometry().add(new go.PathFigure(.5*ee,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)).add(new go.PathSegment(go.PathSegment.Move,0,.5*z)).add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*ee,.5*z,.5*ee,.5*z)));return oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("LogicTruth",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Move,.5*ee,0)).add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,z,!1).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Move,.5*ee,z)).add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)).add(new go.PathSegment(go.PathSegment.Line,0,.5*z)).add(new go.PathSegment(go.PathSegment.Move,ee,.5*z)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,z)))}),go.Shape.defineFigureGenerator("LogicForAll",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Move,.25*ee,.5*z)).add(new go.PathSegment(go.PathSegment.Line,.75*ee,.5*z))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*z)).add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)).add(new go.PathSegment(go.PathSegment.Move,0,z)).add(new go.PathSegment(go.PathSegment.Line,ee,z))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(ue,ee,z){var oe=.5;return new go.Geometry().add(new go.PathFigure(0,z,!1).add(new go.PathSegment(go.PathSegment.Line,0,oe*z)).add(new go.PathSegment(go.PathSegment.Arc,180,180,oe*ee,oe*z,oe*ee,oe*z)).add(new go.PathSegment(go.PathSegment.Line,ee,z))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(ue,ee,z){var oe=.5;return new go.Geometry().add(new go.PathFigure(ee,0,!1).add(new go.PathSegment(go.PathSegment.Line,ee,oe*z)).add(new go.PathSegment(go.PathSegment.Arc,0,180,oe*ee,oe*z,oe*ee,oe*z)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new xn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new xn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.3);var re=ue?ue.parameter2:NaN;isNaN(re)&&(re=.3);var ae=(1-oe)*ee,le=(.5-re/2)*z,me=(.5+re/2)*z,ve=new go.Geometry,Pe=new go.PathFigure(0,le,!0);ve.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,ae,le)),Pe.add(new go.PathSegment(go.PathSegment.Line,ae,0)),Pe.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),Pe.add(new go.PathSegment(go.PathSegment.Line,ae,z)),Pe.add(new go.PathSegment(go.PathSegment.Line,ae,me)),Pe.add(new go.PathSegment(go.PathSegment.Line,0,me).close()),ve.spot1=new go.Spot(0,le/z);var Ae=je(0,me/z,1,me/z,ae/ee,1,1,.5,Le());return ve.spot2=new go.Spot(Ae.x,Ae.y),Se(Ae),ve}),go.Shape.setFigureParameter("Arrow2",0,new xn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new xn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=30),oe>ee&&(oe=ee);var re=ue?ue.parameter2:NaN;isNaN(re)&&(re=30),re=Math.min(re,z/2);var ae=ee-oe,le=(z-re)/2,me=le+re,ve=new go.Geometry,Pe=new go.PathFigure(0,le,!0);ve.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,ae,le)),Pe.add(new go.PathSegment(go.PathSegment.Line,ae,0)),Pe.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),Pe.add(new go.PathSegment(go.PathSegment.Line,ae,z)),Pe.add(new go.PathSegment(go.PathSegment.Line,ae,me)),Pe.add(new go.PathSegment(go.PathSegment.Line,0,me).close()),ve.spot1=new go.Spot(0,le/z);var Ae=je(0,me/z,1,me/z,ae/ee,1,1,.5,Le());return ve.spot2=new go.Spot(Ae.x,Ae.y),Se(Ae),ve}),go.Shape.defineFigureGenerator("Chevron",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z).close()),oe}),go.Shape.defineFigureGenerator("DoubleArrow",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.3*ee,.214*z)),re.add(new go.PathSegment(go.PathSegment.Line,.3*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,1*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.3*ee,1*z)),re.add(new go.PathSegment(go.PathSegment.Line,.3*ee,.786*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,1*z).close()),oe}),go.Shape.setFigureParameter("DoubleEndArrow",0,new xn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.3);var re=(.5-oe/2)*z,ae=(.5+oe/2)*z,le=new go.Geometry,me=new go.PathFigure(ee,.5*z,!0);le.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ae)),me.add(new go.PathSegment(go.PathSegment.Line,.3*ee,ae)),me.add(new go.PathSegment(go.PathSegment.Line,.3*ee,z)),me.add(new go.PathSegment(go.PathSegment.Line,0,.5*z)),me.add(new go.PathSegment(go.PathSegment.Line,.3*ee,0)),me.add(new go.PathSegment(go.PathSegment.Line,.3*ee,re)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,re)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,0).close());var ve=je(0,.5,.3,0,0,re/z,.1,re/z,Le());return le.spot1=new go.Spot(ve.x,ve.y),ve=je(.7,1,1,.5,0,ae/z,1,ae/z,ve),le.spot2=new go.Spot(ve.x,ve.y),Se(ve),le}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new xn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new xn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=40);var re=ue?ue.parameter2:NaN;isNaN(re)&&(re=100);var ae=(z-oe)/2,le=ae+oe,me=(z-re)/2,ve=me+re;(oe>z||re>z)&&(re>oe?(oe=oe*z/re,ae=(z-oe)/2,le=ae+oe,me=0,ve=z):(ae=0,le=z,me=0,ve=z));var Pe=new go.Geometry,Ae=new go.PathFigure(ee,.5*z,!0);Pe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ve)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,le)),Ae.add(new go.PathSegment(go.PathSegment.Line,.3*ee,le)),Ae.add(new go.PathSegment(go.PathSegment.Line,.3*ee,ve)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,.5*z)),Ae.add(new go.PathSegment(go.PathSegment.Line,.3*ee,me)),Ae.add(new go.PathSegment(go.PathSegment.Line,.3*ee,ae)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ae)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,me).close());var De=je(0,.5,.3,me/z,0,ae/z,1,ae/z,Le());return Pe.spot1=new go.Spot(De.x,De.y),De=je(.7,ve/z,1,.5,0,le/z,1,le/z,De),Pe.spot2=new go.Spot(De.x,De.y),Se(De),Pe}),go.Shape.setFigureParameter("IBeamArrow",0,new xn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.3);var re=(.5-oe/2)*z,ae=(.5+oe/2)*z,le=new go.Geometry,me=new go.PathFigure(ee,.5*z,!0);le.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ae)),me.add(new go.PathSegment(go.PathSegment.Line,.2*ee,ae)),me.add(new go.PathSegment(go.PathSegment.Line,.2*ee,z)),me.add(new go.PathSegment(go.PathSegment.Line,0,z)),me.add(new go.PathSegment(go.PathSegment.Line,0,0)),me.add(new go.PathSegment(go.PathSegment.Line,.2*ee,0)),me.add(new go.PathSegment(go.PathSegment.Line,.2*ee,re)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,re)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,0).close()),le.spot1=new go.Spot(0,re/z);var ve=je(.7,1,1,.5,0,ae/z,1,ae/z,Le());return le.spot2=new go.Spot(ve.x,ve.y),Se(ve),le}),go.Shape.setFigureParameter("IBeamArrow2",0,new xn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new xn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=40);var re=ue?ue.parameter2:NaN;isNaN(re)&&(re=100);var ae=(z-oe)/2,le=ae+oe,me=(z-re)/2,ve=me+re;(oe>z||re>z)&&(re>oe?(oe=oe*z/re,ae=(z-oe)/2,le=ae+oe,me=0,ve=z):(ae=0,le=z,me=0,ve=z));var Pe=new go.Geometry,Ae=new go.PathFigure(ee,.5*z,!0);Pe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ve)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,le)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*ee,le)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*ee,ve)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,ve)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,me)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*ee,me)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*ee,ae)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ae)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,me).close()),Pe.spot1=new go.Spot(0,ae/z);var De=je(.7,ve/z,1,.5,0,le/z,1,le/z,Le());return Pe.spot2=new go.Spot(De.x,De.y),Se(De),Pe}),go.Shape.setFigureParameter("Pointer",0,new xn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.1);var re=new go.Geometry,ae=new go.PathFigure(ee,.5*z,!0);re.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,0,z)),ae.add(new go.PathSegment(go.PathSegment.Line,oe*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),re.spot1=new go.Spot(oe,.35);var le=je(.2,.65,1,.65,0,1,1,.5,Le());return re.spot2=new go.Spot(le.x,le.y),Se(le),re}),go.Shape.setFigureParameter("RoundedPointer",0,new xn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.3);var re=new go.Geometry,ae=new go.PathFigure(ee,.5*z,!0);re.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,0,z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,0,0,oe*ee,.75*z,oe*ee,.25*z).close()),re.spot1=new go.Spot(oe,.35);var le=je(0,.65,1,.65,0,1,1,.5,Le());return re.spot2=new go.Spot(le.x,le.y),Se(le),re}),go.Shape.setFigureParameter("SplitEndArrow",0,new xn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.4);var re=(.5-oe/2)*z,ae=(.5+oe/2)*z,le=new go.Geometry,me=new go.PathFigure(ee,.5*z,!0);le.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ae)),me.add(new go.PathSegment(go.PathSegment.Line,0,ae)),me.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.5*z)),me.add(new go.PathSegment(go.PathSegment.Line,0,re)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,re)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,0).close()),le.spot1=new go.Spot(.2,.3);var ve=je(.7,1,1,.5,0,ae/z,1,ae/z,Le());return le.spot2=new go.Spot(ve.x,ve.y),Se(ve),le}),go.Shape.setFigureParameter("SplitEndArrow2",0,new xn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=50);var re=(z-oe)/2,ae=re+oe;oe>z&&(re=0,ae=z);var le=new go.Geometry,me=new go.PathFigure(ee,.5*z,!0);le.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ae)),me.add(new go.PathSegment(go.PathSegment.Line,0,ae)),me.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.5*z)),me.add(new go.PathSegment(go.PathSegment.Line,0,re)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,re)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,0).close()),le.spot1=new go.Spot(.2,re/z);var ve=je(.7,1,1,.5,0,ae/z,1,ae/z,Le());return le.spot2=new go.Spot(ve.x,ve.y),Se(ve),le}),go.Shape.setFigureParameter("SquareArrow",0,new xn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.7);var re=new go.Geometry,ae=new go.PathFigure(ee,.5*z,!0);return re.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,oe*ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,0)),ae.add(new go.PathSegment(go.PathSegment.Line,oe*ee,0).close()),re.spot1=go.Spot.TopLeft,re.spot2=new go.Spot(oe,1),re}),go.Shape.defineFigureGenerator("Cone1",function(ue,ee,z){var oe=new go.Geometry,re=be*.5,ae=be*.1,le=new go.PathFigure(0,.9*z,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,ee,.9*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,ee,(.9+ae)*z,(.5+re)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*z,(.5-re)*ee,z,0,(.9+ae)*z).close()),oe.spot1=new go.Spot(.25,.5),oe.spot2=new go.Spot(.75,.97),oe}),go.Shape.defineFigureGenerator("Cone2",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.9*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,ee,.9*z,(1-.85/.9)*ee,z,.85/.9*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,.9*z).close());var ae=new go.PathFigure(0,.9*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Bezier,ee,.9*z,(1-.85/.9)*ee,.8*z,.85/.9*ee,.8*z)),oe.spot1=new go.Spot(.25,.5),oe.spot2=new go.Spot(.75,.82),oe}),go.Shape.defineFigureGenerator("Cube1",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.5*ee,z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,.85*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.15*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,.15*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.85*z).close());var ae=new go.PathFigure(.5*ee,z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.3*z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,.15*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.3*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,.15*z)),oe.spot1=new go.Spot(0,.3),oe.spot2=new go.Spot(.5,.85),oe}),go.Shape.defineFigureGenerator("Cube2",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.3*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.7*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.3*ee,0).close());var ae=new go.PathFigure(0,.3*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.3*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Move,.7*ee,.3*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)),oe.spot1=new go.Spot(0,.3),oe.spot2=new go.Spot(.7,1),oe}),go.Shape.defineFigureGenerator("Cylinder1",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,z/3);var re=new go.Geometry,ae=be*.5,le=new go.PathFigure(0,oe,!0);re.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,0,be*oe,(.5-ae)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,1*ee,oe,(.5+ae)*ee,0,1*ee,be*oe)),le.add(new go.PathSegment(go.PathSegment.Line,ee,z-oe)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,1*z,1*ee,z-be*oe,(.5+ae)*ee,1*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,z-oe,(.5-ae)*ee,1*z,0,z-be*oe)),le.add(new go.PathSegment(go.PathSegment.Line,0,oe));var me=new go.PathFigure(ee,oe,!1);return re.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,2*oe,1*ee,2*oe-be*oe,(.5+ae)*ee,2*oe)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,oe,(.5-ae)*ee,2*oe,0,2*oe-be*oe)),re.spot1=new go.Spot(0,0,0,2*oe),re.spot2=new go.Spot(1,1),re}),go.Shape.defineFigureGenerator("Cylinder2",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,z/3);var re=new go.Geometry,ae=be*.5,le=new go.PathFigure(0,z-oe,!0);re.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,oe)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,0,be*oe,(.5-ae)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,oe,(.5+ae)*ee,0,ee,be*oe)),le.add(new go.PathSegment(go.PathSegment.Line,ee,z-oe)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,ee,z-be*oe,(.5+ae)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,z-oe,(.5-ae)*ee,z,0,z-be*oe));var me=new go.PathFigure(0,z-oe,!1);return re.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z-2*oe,0,z-oe-be*oe,(.5-ae)*ee,z-2*oe)),me.add(new go.PathSegment(go.PathSegment.Bezier,ee,z-oe,(.5+ae)*ee,z-2*oe,ee,z-oe-be*oe)),re.spot1=new go.Spot(0,0),re.spot2=new go.Spot(1,1,0,-2*oe),re}),go.Shape.defineFigureGenerator("Cylinder3",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,ee/3);var re=new go.Geometry,ae=be*.5,le=new go.PathFigure(oe,0,!0);re.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee-oe,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,ee-be*oe,0,ee,(.5-ae)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee-oe,z,ee,(.5+ae)*z,ee-be*oe,z)),le.add(new go.PathSegment(go.PathSegment.Line,oe,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*z,be*oe,z,0,(.5+ae)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,(.5-ae)*z,be*oe,0));var me=new go.PathFigure(oe,0,!1);return re.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,2*oe,.5*z,oe+be*oe,0,2*oe,(.5-ae)*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,oe,z,2*oe,(.5+ae)*z,oe+be*oe,z)),re.spot1=new go.Spot(0,0,2*oe,0),re.spot2=new go.Spot(1,1),re}),go.Shape.defineFigureGenerator("Cylinder4",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,ee/3);var re=new go.Geometry,ae=be*.5,le=new go.PathFigure(ee-oe,0,!0);re.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,ee-be*oe,0,ee,(.5-ae)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee-oe,z,ee,(.5+ae)*z,ee-be*oe,z)),le.add(new go.PathSegment(go.PathSegment.Line,oe,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*z,be*oe,z,0,(.5+ae)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,(.5-ae)*z,be*oe,0)),le.add(new go.PathSegment(go.PathSegment.Line,ee-oe,0));var me=new go.PathFigure(ee-oe,0,!1);return re.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,ee-2*oe,.5*z,ee-oe-be*oe,0,ee-2*oe,(.5-ae)*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,ee-oe,z,ee-2*oe,(.5+ae)*z,ee-oe-be*oe,z)),re.spot1=new go.Spot(0,0),re.spot2=new go.Spot(1,1,-2*oe,0),re}),go.Shape.defineFigureGenerator("Prism1",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.25*ee,.25*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var ae=new go.PathFigure(.25*ee,.25*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),oe.spot1=new go.Spot(.408,.172),oe.spot2=new go.Spot(.833,.662),oe}),go.Shape.defineFigureGenerator("Prism2",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.25*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.75*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var ae=new go.PathFigure(0,z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.25*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)),ae.add(new go.PathSegment(go.PathSegment.Move,0,.25*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.25*ee,.5*z)),oe.spot1=new go.Spot(.25,.5),oe.spot2=new go.Spot(.75,.75),oe}),go.Shape.defineFigureGenerator("Pyramid1",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.5*ee,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,.75*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.75*z).close());var ae=new go.PathFigure(.5*ee,0,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),oe.spot1=new go.Spot(.25,.367),oe.spot2=new go.Spot(.75,.875),oe}),go.Shape.defineFigureGenerator("Pyramid2",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.5*ee,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,.85*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.85*z).close());var ae=new go.PathFigure(.5*ee,0,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.7*z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,.85*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.7*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,.85*z)),oe.spot1=new go.Spot(.25,.367),oe.spot2=new go.Spot(.75,.875),oe}),go.Shape.defineFigureGenerator("Actor",function(ue,ee,z){var oe=new go.Geometry,re=.2,ae=.1,le=be*re,me=be*ae,ve=.5,Pe=.1,Ae=new go.PathFigure(ve*ee,(Pe+ae)*z,!0);oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ve-re)*ee,Pe*z,(ve-le)*ee,(Pe+ae)*z,(ve-re)*ee,(Pe+me)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe-ae)*z,(ve-re)*ee,(Pe-me)*z,(ve-le)*ee,(Pe-ae)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ve+re)*ee,Pe*z,(ve+le)*ee,(Pe-ae)*z,(ve+re)*ee,(Pe-me)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe+ae)*z,(ve+re)*ee,(Pe+me)*z,(ve+le)*ee,(Pe+ae)*z));var De=.05,Oe=be*De;ve=.05,Pe=.25;var Ze=new go.PathFigure(.5*ee,.2*z,!0);return oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Line,.95*ee,.2*z)),ve=.95,Pe=.25,Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve+De)*ee,Pe*z,(ve+Oe)*ee,(Pe-De)*z,(ve+De)*ee,(Pe-Oe)*z)),Ze.add(new go.PathSegment(go.PathSegment.Line,ee,.6*z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.6*z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.35*z)),De=.025,Oe=be*De,ve=.825,Pe=.35,Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe-De)*z,(ve+De)*ee,(Pe-Oe)*z,(ve+Oe)*ee,(Pe-De)*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve-De)*ee,Pe*z,(ve-Oe)*ee,(Pe-De)*z,(ve-De)*ee,(Pe-Oe)*z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.8*ee,z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.55*ee,z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.7*z)),De=.05,Oe=be*De,ve=.5,Pe=.7,Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe-De)*z,(ve+De)*ee,(Pe-Oe)*z,(ve+Oe)*ee,(Pe-De)*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve-De)*ee,Pe*z,(ve-Oe)*ee,(Pe-De)*z,(ve-De)*ee,(Pe-Oe)*z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.45*ee,z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.2*ee,z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.35*z)),De=.025,Oe=be*De,ve=.175,Pe=.35,Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe-De)*z,(ve+De)*ee,(Pe-Oe)*z,(ve+Oe)*ee,(Pe-De)*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve-De)*ee,Pe*z,(ve-Oe)*ee,(Pe-De)*z,(ve-De)*ee,(Pe-Oe)*z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.15*ee,.6*z)),Ze.add(new go.PathSegment(go.PathSegment.Line,0,.6*z)),Ze.add(new go.PathSegment(go.PathSegment.Line,0,.25*z)),De=.05,Oe=be*De,ve=.05,Pe=.25,Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe-De)*z,(ve-De)*ee,(Pe-Oe)*z,(ve-Oe)*ee,(Pe-De)*z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.2*z)),oe.spot1=new go.Spot(.2,.2),oe.spot2=new go.Spot(.8,.65),oe}),go.Shape.setFigureParameter("Card",0,new xn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.2);var re=new go.Geometry,ae=new go.PathFigure(ee,0,!0);return re.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,oe*z)),ae.add(new go.PathSegment(go.PathSegment.Line,oe*ee,0).close()),re.spot1=new go.Spot(0,oe),re.spot2=go.Spot.BottomRight,re}),go.Shape.defineFigureGenerator("Collate",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.5*ee,.5*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z));var ae=new go.PathFigure(.5*ee,.5*z,!0);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z)),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),oe.spot1=new go.Spot(.25,0),oe.spot2=new go.Spot(.75,.25),oe}),go.Shape.defineFigureGenerator("CreateRequest",function(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN;isNaN(re)&&(re=.1);var ae=new go.PathFigure(0,0,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var le=new go.PathFigure(0,re*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,re*z)),le.add(new go.PathSegment(go.PathSegment.Move,0,(1-re)*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,(1-re)*z)),oe}),go.Shape.defineFigureGenerator("Database",function(ue,ee,z){var oe=new go.Geometry,re=be*.5,ae=be*.1,le=new go.PathFigure(ee,.1*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,.9*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,ee,(.9+ae)*z,(.5+re)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*z,(.5-re)*ee,z,0,(.9+ae)*z)),le.add(new go.PathSegment(go.PathSegment.Line,0,.1*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,0,(.1-ae)*z,(.5-re)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,.1*z,(.5+re)*ee,0,ee,(.1-ae)*z));var me=new go.PathFigure(ee,.1*z,!1);return oe.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.2*z,ee,(.1+ae)*z,(.5+re)*ee,.2*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*z,(.5-re)*ee,.2*z,0,(.1+ae)*z)),me.add(new go.PathSegment(go.PathSegment.Move,ee,.2*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.3*z,ee,(.2+ae)*z,(.5+re)*ee,.3*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*z,(.5-re)*ee,.3*z,0,(.2+ae)*z)),me.add(new go.PathSegment(go.PathSegment.Move,ee,.3*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.4*z,ee,(.3+ae)*z,(.5+re)*ee,.4*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*z,(.5-re)*ee,.4*z,0,(.3+ae)*z)),oe.spot1=new go.Spot(0,.4),oe.spot2=new go.Spot(1,.9),oe}),go.Shape.defineFigureGenerator("DataStorage",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,.75*ee,z,ee,0,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ee,.9*z,.25*ee,.1*z).close()),oe.spot1=new go.Spot(.226,0),oe.spot2=new go.Spot(.81,1),oe}),go.Shape.defineFigureGenerator("DiskStorage",function(ue,ee,z){var oe=new go.Geometry,re=be*.5,ae=be*.1,le=new go.PathFigure(ee,.1*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,.9*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,ee,(.9+ae)*z,(.5+re)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*z,(.5-re)*ee,z,0,(.9+ae)*z)),le.add(new go.PathSegment(go.PathSegment.Line,0,.1*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,0,(.1-ae)*z,(.5-re)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,.1*z,(.5+re)*ee,0,ee,(.1-ae)*z));var me=new go.PathFigure(ee,.1*z,!1);return oe.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.2*z,ee,(.1+ae)*z,(.5+re)*ee,.2*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*z,(.5-re)*ee,.2*z,0,(.1+ae)*z)),me.add(new go.PathSegment(go.PathSegment.Move,ee,.2*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.3*z,ee,(.2+ae)*z,(.5+re)*ee,.3*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*z,(.5-re)*ee,.3*z,0,(.2+ae)*z)),oe.spot1=new go.Spot(0,.3),oe.spot2=new go.Spot(1,.9),oe}),go.Shape.defineFigureGenerator("Display",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.25*ee,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,.75*ee,z,ee,0,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.25*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*z).close()),oe.spot1=new go.Spot(.25,0),oe.spot2=new go.Spot(.75,1),oe}),go.Shape.defineFigureGenerator("DividedEvent",function(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN;isNaN(re)?re=.2:re<.15&&(re=.15);var ae=be*.2,le=new go.PathFigure(0,.2*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,.2*ee,0,0,(.2-ae)*z,(.2-ae)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,.8*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,.2*z,(.8+ae)*ee,0,ee,(.2-ae)*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,z,ee,(.8+ae)*z,(.8+ae)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,.2*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*z,(.2-ae)*ee,z,0,(.8+ae)*z)),le.add(new go.PathSegment(go.PathSegment.Line,0,.2*z));var me=new go.PathFigure(0,re*z,!1);return oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ee,re*z)),oe}),go.Shape.defineFigureGenerator("DividedProcess",function(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN;(isNaN(re)||re<.1)&&(re=.1);var ae=new go.PathFigure(0,0,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var le=new go.PathFigure(0,re*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,re*z)),oe}),go.Shape.defineFigureGenerator("Document",function(ue,ee,z){var oe=new go.Geometry;z=z/.8;var re=new go.PathFigure(0,.7*z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.7*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*z,.5*ee,.4*z,.5*ee,z).close()),oe.spot1=go.Spot.TopLeft,oe.spot2=new go.Spot(1,.6),oe}),go.Shape.defineFigureGenerator("ExternalOrganization",function(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN;(isNaN(re)||re<.2)&&(re=.2);var ae=new go.PathFigure(0,0,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var le=new go.PathFigure(re*ee,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,re*z)),le.add(new go.PathSegment(go.PathSegment.Move,ee,re*z)),le.add(new go.PathSegment(go.PathSegment.Line,(1-re)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Move,0,(1-re)*z)),le.add(new go.PathSegment(go.PathSegment.Line,re*ee,z)),le.add(new go.PathSegment(go.PathSegment.Move,(1-re)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,(1-re)*z)),oe}),go.Shape.defineFigureGenerator("ExternalProcess",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.5*ee,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*z).close());var ae=new go.PathFigure(.1*ee,.4*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.6*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.9*ee,.6*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.4*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.6*ee,.1*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.1*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.4*ee,.9*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.9*z)),oe.spot1=new go.Spot(.25,.25),oe.spot2=new go.Spot(.75,.75),oe}),go.Shape.defineFigureGenerator("File",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var ae=new go.PathFigure(.75*ee,0,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.25*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)),oe.spot1=new go.Spot(0,.25),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("Interrupt",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee,.5*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z));var ae=new go.PathFigure(ee,.5*z,!1);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z));var le=new go.PathFigure(ee,.5*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,0)),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.5,.75),oe}),go.Shape.defineFigureGenerator("InternalStorage",function(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN,ae=ue?ue.parameter2:NaN;isNaN(re)&&(re=.1),isNaN(ae)&&(ae=.1);var le=new go.PathFigure(0,0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var me=new go.PathFigure(re*ee,0,!1);return oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,re*ee,z)),me.add(new go.PathSegment(go.PathSegment.Move,0,ae*z)),me.add(new go.PathSegment(go.PathSegment.Line,ee,ae*z)),oe}),go.Shape.defineFigureGenerator("Junction",function(ue,ee,z){var oe=new go.Geometry,re=1/Math.SQRT2,ae=(1-1/Math.SQRT2)/2,le=be*.5,me=.5,ve=new go.PathFigure(ee,me*z,!0);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,me*ee,z,ee,(me+le)*z,(me+le)*ee,z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,me*z,(me-le)*ee,z,0,(me+le)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,me*ee,0,0,(me-le)*z,(me-le)*ee,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ee,me*z,(me+le)*ee,0,ee,(me-le)*z));var Pe=new go.PathFigure((ae+re)*ee,(ae+re)*z,!1);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,ae*ee,ae*z)),Pe.add(new go.PathSegment(go.PathSegment.Move,ae*ee,(ae+re)*z)),Pe.add(new go.PathSegment(go.PathSegment.Line,(ae+re)*ee,ae*z)),oe}),go.Shape.defineFigureGenerator("LinedDocument",function(ue,ee,z){var oe=new go.Geometry;z=z/.8;var re=new go.PathFigure(0,.7*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.7*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*z,.5*ee,.4*z,.5*ee,z).close());var ae=new go.PathFigure(.1*ee,0,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.75*z)),oe.spot1=new go.Spot(.1,0),oe.spot2=new go.Spot(1,.6),oe}),go.Shape.defineFigureGenerator("LoopLimit",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.25*z)),re.add(new go.PathSegment(go.PathSegment.Line,.25*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z).close()),oe.spot1=new go.Spot(0,.25),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("MagneticTape",function(ue,ee,z){var oe=new go.Geometry,re=be*.5,ae=.5,le=new go.PathFigure(.5*ee,z,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,0,ae*z,(ae-re)*ee,z,0,(ae+re)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,ae*ee,0,0,(ae-re)*z,(ae-re)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,ae*z,(ae+re)*ee,0,ee,(ae-re)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,(ae+.1)*ee,.9*z,ee,(ae+re)*z,(ae+re)*ee,.9*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,.9*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),oe.spot1=new go.Spot(.15,.15),oe.spot2=new go.Spot(.85,.8),oe}),go.Shape.defineFigureGenerator("ManualInput",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.25*z).close()),oe.spot1=new go.Spot(0,.25),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("MessageFromUser",function(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN;isNaN(re)&&(re=.7);var ae=new go.PathFigure(0,0,!0);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,re*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe.spot1=go.Spot.TopLeft,oe}),go.Shape.defineFigureGenerator("MicroformProcessing",function(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN;isNaN(re)&&(re=.25);var ae=new go.PathFigure(0,0,!0);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,re*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,(1-re)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe}),go.Shape.defineFigureGenerator("MicroformRecording",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.25*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.15*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.85*z)),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.75*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(1,.75),oe}),go.Shape.defineFigureGenerator("MultiDocument",function(ue,ee,z){var oe=new go.Geometry;z=z/.8;var re=new go.PathFigure(ee,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.9*ee,.44*z,.96*ee,.47*z,.93*ee,.45*z)),re.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.6*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.54*z,.86*ee,.57*z,.83*ee,.55*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.7*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*z,.4*ee,.4*z,.4*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.1*z)),re.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.1*z)),re.add(new go.PathSegment(go.PathSegment.Line,.2*ee,0).close());var ae=new go.PathFigure(.1*ee,.2*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.2*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.54*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.1*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.1*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.44*z)),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.8,.77),oe}),go.Shape.defineFigureGenerator("MultiProcess",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.1*ee,.1*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.1*z)),re.add(new go.PathSegment(go.PathSegment.Line,.2*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.9*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.9*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.2*z).close());var ae=new go.PathFigure(.2*ee,.1*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.1*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.8*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.1*ee,.2*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.2*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.9*z)),oe.spot1=new go.Spot(0,.2),oe.spot2=new go.Spot(.8,1),oe}),go.Shape.defineFigureGenerator("OfflineStorage",function(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN;isNaN(re)&&(re=.1);var ae=1-re,le=new go.PathFigure(0,0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z).close());var me=new go.PathFigure(.5*re*ee,re*z,!1);return oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,(1-.5*re)*ee,re*z)),oe}),go.Shape.defineFigureGenerator("OffPageConnector",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe.spot1=go.Spot.TopLeft,oe.spot2=new go.Spot(.75,1),oe}),go.Shape.defineFigureGenerator("Or",function(ue,ee,z){var oe=new go.Geometry,re=be*.5,ae=.5,le=new go.PathFigure(ee,ae*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,ae*ee,z,ee,(ae+re)*z,(ae+re)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,ae*z,(ae-re)*ee,z,0,(ae+re)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,ae*ee,0,0,(ae-re)*z,(ae-re)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,ae*z,(ae+re)*ee,0,ee,(ae-re)*z));var me=new go.PathFigure(ee,.5*z,!1);return oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,0,.5*z)),me.add(new go.PathSegment(go.PathSegment.Move,.5*ee,z)),me.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),oe}),go.Shape.defineFigureGenerator("PaperTape",function(ue,ee,z){var oe=new go.Geometry;z=z/.8;var re=new go.PathFigure(0,.7*z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.3*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,ee,.3*z,.5*ee,.6*z,.5*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.7*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*z,.5*ee,.4*z,.5*ee,z).close()),oe.spot1=new go.Spot(0,.49),oe.spot2=new go.Spot(1,.75),oe}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN,ae=ue?ue.parameter2:NaN;isNaN(re)&&(re=.1),isNaN(ae)&&(ae=.3);var le=new go.PathFigure(0,0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,(1-ae)*ee,.5*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN,ae=ue?ue.parameter2:NaN;isNaN(re)&&(re=.1),isNaN(ae)&&(ae=.3);var le=new go.PathFigure(0,0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,(1-ae)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),le.add(new go.PathSegment(go.PathSegment.Line,(1-ae)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe}),go.Shape.defineFigureGenerator("Procedure",function(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN;isNaN(re)&&(re=.1);var ae=new go.PathFigure(0,0,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var le=new go.PathFigure((1-re)*ee,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,(1-re)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Move,re*ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,re*ee,z)),oe}),go.Shape.defineFigureGenerator("Process",function(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN;isNaN(re)&&(re=.1);var ae=new go.PathFigure(0,0,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var le=new go.PathFigure(re*ee,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,re*ee,z)),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("Sort",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.5*ee,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*z).close());var ae=new go.PathFigure(0,.5*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),oe.spot1=new go.Spot(.25,.25),oe.spot2=new go.Spot(.75,.5),oe}),go.Shape.defineFigureGenerator("Start",function(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN;isNaN(re)&&(re=.25);var ae=new go.PathFigure(re*ee,0,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*ee,.5*z,.25*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*ee,.5*z,.25*ee,.5*z));var le=new go.PathFigure(re*ee,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,re*ee,z)),le.add(new go.PathSegment(go.PathSegment.Move,(1-re)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,(1-re)*ee,z)),oe.spot1=new go.Spot(re,0),oe.spot2=new go.Spot(1-re,1),oe}),go.Shape.defineFigureGenerator("Terminator",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.25*ee,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*ee,.5*z,.25*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*ee,.5*z,.25*ee,.5*z)),oe.spot1=new go.Spot(.23,0),oe.spot2=new go.Spot(.77,1),oe}),go.Shape.defineFigureGenerator("TransmittalTape",function(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN;isNaN(re)&&(re=.1);var ae=new go.PathFigure(0,0,!0);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,.75*ee,(1-re)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,(1-re)*z).close()),oe.spot1=go.Spot.TopLeft,oe}),go.Shape.defineFigureGenerator("AndGate",function(ue,ee,z){var oe=new go.Geometry,re=be*.5,ae=new go.PathFigure(0,0,!0);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),ae.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,(.5+re)*ee,0,ee,(.5-re)*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,ee,(.5+re)*z,(.5+re)*ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe.spot1=go.Spot.TopLeft,oe.spot2=new go.Spot(.55,1),oe}),go.Shape.defineFigureGenerator("Buffer",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.5,.75),oe}),go.Shape.defineFigureGenerator("Clock",function(ue,ee,z){var oe=new go.Geometry,re=be*.5,ae=.5,le=new go.PathFigure(ee,ae*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,ae*ee,z,ee,(ae+re)*z,(ae+re)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,ae*z,(ae-re)*ee,z,0,(ae+re)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,ae*ee,0,0,(ae-re)*z,(ae-re)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,ae*z,(ae+re)*ee,0,ee,(ae-re)*z));var me=new go.PathFigure(ee,ae*z,!1);oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ee,ae*z));var ve=new go.PathFigure(.8*ee,.75*z,!1);return oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.25*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.25*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.75*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.75*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.25*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.25*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.75*z)),oe}),go.Shape.defineFigureGenerator("Ground",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.5*ee,0,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.4*z)),re.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.6*z)),re.add(new go.PathSegment(go.PathSegment.Move,.3*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Move,.4*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.6*ee,z)),oe}),go.Shape.defineFigureGenerator("Inverter",function(ue,ee,z){var oe=new go.Geometry,re=be*.1,ae=.1,le=.9,me=.5,ve=new go.PathFigure(.8*ee,.5*z,!0);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,0,z)),ve.add(new go.PathSegment(go.PathSegment.Line,0,0)),ve.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.5*z));var Pe=new go.PathFigure((le+ae)*ee,me*z,!0);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z,(le+re)*ee,(me+ae)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(le-ae)*ee,me*z,(le-re)*ee,(me+ae)*z,(le-ae)*ee,(me+re)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z,(le-re)*ee,(me-ae)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,me*z,(le+re)*ee,(me-ae)*z,(le+ae)*ee,(me-re)*z)),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.4,.75),oe}),go.Shape.defineFigureGenerator("NandGate",function(ue,ee,z){var oe=new go.Geometry,re=be*.5,ae=be*.4,le=be*.1,me=.1,ve=.9,Pe=.5,Ae=new go.PathFigure(.8*ee,.5*z,!0);oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.4*ee,z,.8*ee,(.5+ae)*z,(.4+re)*ee,z)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,z)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ae.add(new go.PathSegment(go.PathSegment.Line,.4*ee,0)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.5*z,(.4+re)*ee,0,.8*ee,(.5-ae)*z));var De=new go.PathFigure((ve+me)*ee,Pe*z,!0);return oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe+me)*z,(ve+me)*ee,(Pe+le)*z,(ve+le)*ee,(Pe+me)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,(ve-me)*ee,Pe*z,(ve-le)*ee,(Pe+me)*z,(ve-me)*ee,(Pe+le)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe-me)*z,(ve-me)*ee,(Pe-le)*z,(ve-le)*ee,(Pe-me)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,(ve+me)*ee,Pe*z,(ve+le)*ee,(Pe-me)*z,(ve+me)*ee,(Pe-le)*z)),oe.spot1=new go.Spot(0,.05),oe.spot2=new go.Spot(.55,.95),oe}),go.Shape.defineFigureGenerator("NorGate",function(ue,ee,z){var oe=new go.Geometry,re=.5,ae=be*re,le=0,me=.5,ve=new go.PathFigure(.8*ee,.5*z,!0);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,z,.7*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ee,.75*z,.25*ee,.25*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.5*z,(le+ae)*ee,(me-re)*z,.7*ee,(me-ae)*z)),re=.1,ae=be*.1,le=.9,me=.5;var Pe=new go.PathFigure((le-re)*ee,me*z,!0);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-re)*z,(le-re)*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(le+re)*ee,me*z,(le+ae)*ee,(me-re)*z,(le+re)*ee,(me-ae)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+re)*z,(le+re)*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(le-re)*ee,me*z,(le-ae)*ee,(me+re)*z,(le-re)*ee,(me+ae)*z)),oe.spot1=new go.Spot(.2,.25),oe.spot2=new go.Spot(.6,.75),oe}),go.Shape.defineFigureGenerator("OrGate",function(ue,ee,z){var oe=new go.Geometry,re=.5,ae=be*re,le=0,me=.5,ve=new go.PathFigure(0,0,!0);return oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,(le+ae+ae)*ee,(me-re)*z,.8*ee,(me-ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,z,.8*ee,(me+ae)*z,(le+ae+ae)*ee,(me+re)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ee,.75*z,.25*ee,.25*z).close()),oe.spot1=new go.Spot(.2,.25),oe.spot2=new go.Spot(.75,.75),oe}),go.Shape.defineFigureGenerator("XnorGate",function(ue,ee,z){var oe=new go.Geometry,re=.5,ae=be*re,le=.2,me=.5,ve=new go.PathFigure(.1*ee,0,!1);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.1*ee,z,.35*ee,.25*z,.35*ee,.75*z));var Pe=new go.PathFigure(.8*ee,.5*z,!0);oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.2*ee,z,.7*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.2*ee,0,.45*ee,.75*z,.45*ee,.25*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.5*z,(le+ae)*ee,(me-re)*z,.7*ee,(me-ae)*z)),re=.1,ae=be*.1,le=.9,me=.5;var Ae=new go.PathFigure((le-re)*ee,me*z,!0);return oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-re)*z,(le-re)*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(le+re)*ee,me*z,(le+ae)*ee,(me-re)*z,(le+re)*ee,(me-ae)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+re)*z,(le+re)*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(le-re)*ee,me*z,(le-ae)*ee,(me+re)*z,(le-re)*ee,(me+ae)*z)),oe.spot1=new go.Spot(.4,.25),oe.spot2=new go.Spot(.65,.75),oe}),go.Shape.defineFigureGenerator("XorGate",function(ue,ee,z){var oe=new go.Geometry,re=.5,ae=be*re,le=.2,me=.5,ve=new go.PathFigure(.1*ee,0,!1);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.1*ee,z,.35*ee,.25*z,.35*ee,.75*z));var Pe=new go.PathFigure(.2*ee,0,!0);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,(le+ae)*ee,(me-re)*z,.9*ee,(me-ae)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.2*ee,z,.9*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.2*ee,0,.45*ee,.75*z,.45*ee,.25*z).close()),oe.spot1=new go.Spot(.4,.25),oe.spot2=new go.Spot(.8,.75),oe}),go.Shape.defineFigureGenerator("Capacitor",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Move,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),oe}),go.Shape.defineFigureGenerator("Resistor",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.5*z,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.1*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.2*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.3*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.4*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.6*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.5*z)),oe}),go.Shape.defineFigureGenerator("Inductor",function(ue,ee,z){var oe=new go.Geometry,re=be*.1,ae=.1,le=.1,me=.5,ve=new go.PathFigure((le-re*.5)*ee,z,!1);return oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,0,(le-re)*ee,z,(le-ae)*ee,0)),le=.3,ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,z,(le+ae)*ee,0,(le+re)*ee,z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,0,(le-re)*ee,z,(le-ae)*ee,0)),le=.5,ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,z,(le+ae)*ee,0,(le+re)*ee,z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,0,(le-re)*ee,z,(le-ae)*ee,0)),le=.7,ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,z,(le+ae)*ee,0,(le+re)*ee,z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,0,(le-re)*ee,z,(le-ae)*ee,0)),le=.9,ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+re*.5)*ee,z,(le+ae)*ee,0,(le+re)*ee,z)),oe}),go.Shape.defineFigureGenerator("ACvoltageSource",function(ue,ee,z){var oe=new go.Geometry,re=be*.5,ae=.5,le=.5,me=.5,ve=new go.PathFigure((le-ae)*ee,me*z,!1);return oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z,(le-re)*ee,(me-ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,me*z,(le+re)*ee,(me-ae)*z,(le+ae)*ee,(me-re)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z,(le+re)*ee,(me+ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le-ae)*ee,me*z,(le-re)*ee,(me+ae)*z,(le-ae)*ee,(me+re)*z)),ve.add(new go.PathSegment(go.PathSegment.Move,(le-ae+.1)*ee,me*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae-.1)*ee,me*z,le*ee,(me-ae)*z,le*ee,(me+ae)*z)),oe}),go.Shape.defineFigureGenerator("DCvoltageSource",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.75*z,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.25*z)),re.add(new go.PathSegment(go.PathSegment.Move,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),oe}),go.Shape.defineFigureGenerator("Diode",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee,0,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.5,.75),oe}),go.Shape.defineFigureGenerator("Wifi",function(ue,ee,z){var oe=new go.Geometry,re=ee,ae=z;ee=ee*.38,z=z*.6;var le=be*.8,me=.8,ve=0,Pe=.5,Ae=(re-ee)/2,De=(ae-z)/2,Oe=new go.PathFigure(ve*ee+Ae,(Pe+me)*z+De,!0);oe.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-me)*ee+Ae,Pe*z+De,(ve-le)*ee+Ae,(Pe+me)*z+De,(ve-me)*ee+Ae,(Pe+le)*z+De)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe-me)*z+De,(ve-me)*ee+Ae,(Pe-le)*z+De,(ve-le)*ee+Ae,(Pe-me)*z+De)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-me+le*.5)*ee+Ae,Pe*z+De,ve*ee+Ae,(Pe-me)*z+De,(ve-me+le*.5)*ee+Ae,(Pe-le)*z+De)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe+me)*z+De,(ve-me+le*.5)*ee+Ae,(Pe+le)*z+De,ve*ee+Ae,(Pe+me)*z+De).close()),le=be*.4,me=.4,ve=.2,Pe=.5;var Ze=new go.PathFigure(ve*ee+Ae,(Pe+me)*z+De,!0);oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve-me)*ee+Ae,Pe*z+De,(ve-le)*ee+Ae,(Pe+me)*z+De,(ve-me)*ee+Ae,(Pe+le)*z+De)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe-me)*z+De,(ve-me)*ee+Ae,(Pe-le)*z+De,(ve-le)*ee+Ae,(Pe-me)*z+De)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve-me+le*.5)*ee+Ae,Pe*z+De,ve*ee+Ae,(Pe-me)*z+De,(ve-me+le*.5)*ee+Ae,(Pe-le)*z+De)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe+me)*z+De,(ve-me+le*.5)*ee+Ae,(Pe+le)*z+De,ve*ee+Ae,(Pe+me)*z+De).close()),le=be*.2,me=.2,ve=.5,Pe=.5;var qe=new go.PathFigure((ve-me)*ee+Ae,Pe*z+De,!0);oe.add(qe),qe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe-me)*z+De,(ve-me)*ee+Ae,(Pe-le)*z+De,(ve-le)*ee+Ae,(Pe-me)*z+De)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+me)*ee+Ae,Pe*z+De,(ve+le)*ee+Ae,(Pe-me)*z+De,(ve+me)*ee+Ae,(Pe-le)*z+De)),qe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe+me)*z+De,(ve+me)*ee+Ae,(Pe+le)*z+De,(ve+le)*ee+Ae,(Pe+me)*z+De)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-me)*ee+Ae,Pe*z+De,(ve-le)*ee+Ae,(Pe+me)*z+De,(ve-me)*ee+Ae,(Pe+le)*z+De)),le=be*.4,me=.4,ve=.8,Pe=.5;var Xe=new go.PathFigure(ve*ee+Ae,(Pe-me)*z+De,!0);oe.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+me)*ee+Ae,Pe*z+De,(ve+le)*ee+Ae,(Pe-me)*z+De,(ve+me)*ee+Ae,(Pe-le)*z+De)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe+me)*z+De,(ve+me)*ee+Ae,(Pe+le)*z+De,(ve+le)*ee+Ae,(Pe+me)*z+De)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+me-le*.5)*ee+Ae,Pe*z+De,ve*ee+Ae,(Pe+me)*z+De,(ve+me-le*.5)*ee+Ae,(Pe+le)*z+De)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe-me)*z+De,(ve+me-le*.5)*ee+Ae,(Pe-le)*z+De,ve*ee+Ae,(Pe-me)*z+De).close()),le=be*.8,me=.8,ve=1,Pe=.5;var mt=new go.PathFigure(ve*ee+Ae,(Pe-me)*z+De,!0);return oe.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,(ve+me)*ee+Ae,Pe*z+De,(ve+le)*ee+Ae,(Pe-me)*z+De,(ve+me)*ee+Ae,(Pe-le)*z+De)),mt.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe+me)*z+De,(ve+me)*ee+Ae,(Pe+le)*z+De,(ve+le)*ee+Ae,(Pe+me)*z+De)),mt.add(new go.PathSegment(go.PathSegment.Bezier,(ve+me-le*.5)*ee+Ae,Pe*z+De,ve*ee+Ae,(Pe+me)*z+De,(ve+me-le*.5)*ee+Ae,(Pe+le)*z+De)),mt.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe-me)*z+De,(ve+me-le*.5)*ee+Ae,(Pe-le)*z+De,ve*ee+Ae,(Pe-me)*z+De).close()),oe}),go.Shape.defineFigureGenerator("Email",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ae=new go.PathFigure(0,0,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.6*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Move,0,z)),ae.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.54*z)),ae.add(new go.PathSegment(go.PathSegment.Move,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.54*z)),oe}),go.Shape.defineFigureGenerator("Ethernet",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.35*ee,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.65*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.4*z)),re.add(new go.PathSegment(go.PathSegment.Line,.35*ee,.4*z)),re.add(new go.PathSegment(go.PathSegment.Line,.35*ee,0).close());var ae=new go.PathFigure(.1*ee,z,!0,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.4*ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.6*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.6*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.1*ee,z).close());var le=new go.PathFigure(.6*ee,z,!0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.9*ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.6*z)),le.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.6*z)),le.add(new go.PathSegment(go.PathSegment.Line,.6*ee,z).close());var me=new go.PathFigure(0,.5*z,!1);return oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),me.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.5*z)),me.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.4*z)),me.add(new go.PathSegment(go.PathSegment.Move,.75*ee,.5*z)),me.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.6*z)),me.add(new go.PathSegment(go.PathSegment.Move,.25*ee,.5*z)),me.add(new go.PathSegment(go.PathSegment.Line,.25*ee,.6*z)),oe}),go.Shape.defineFigureGenerator("Power",function(ue,ee,z){var oe=new go.Geometry,re=be*.4,ae=.4,le=.5,me=.5,ve=Le(),Pe=Le(),Ae=Le(),De=Le();Me(le,me-ae,le+re,me-ae,le+ae,me-re,le+ae,me,.5,ve,ve,Pe,Ae,De);var Oe=Ie(Pe.x,Pe.y),Ze=new go.PathFigure(Pe.x*ee,Pe.y*z,!0);oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,me*z,Ae.x*ee,Ae.y*z,De.x*ee,De.y*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z,(le+re)*ee,(me+ae)*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(le-ae)*ee,me*z,(le-re)*ee,(me+ae)*z,(le-ae)*ee,(me+re)*z)),Me(le-ae,me,le-ae,me-re,le-re,me-ae,le,me-ae,.5,Ae,De,Pe,ve,ve),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Pe.x*ee,Pe.y*z,Ae.x*ee,Ae.y*z,De.x*ee,De.y*z)),re=be*.3,ae=.3,Me(le-ae,me,le-ae,me-re,le-re,me-ae,le,me-ae,.5,Ae,De,Pe,ve,ve),Ze.add(new go.PathSegment(go.PathSegment.Line,Pe.x*ee,Pe.y*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(le-ae)*ee,me*z,De.x*ee,De.y*z,Ae.x*ee,Ae.y*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+ae)*z,(le-ae)*ee,(me+re)*z,(le-re)*ee,(me+ae)*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,me*z,(le+re)*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),Me(le,me-ae,le+re,me-ae,le+ae,me-re,le+ae,me,.5,ve,ve,Pe,Ae,De),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Pe.x*ee,Pe.y*z,De.x*ee,De.y*z,Ae.x*ee,Ae.y*z).close());var Ze=new go.PathFigure(.45*ee,0,!0);return oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.5*z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.5*z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.55*ee,0).close()),Se(ve),Se(Pe),Se(Ae),Se(De),Se(Oe),oe.spot1=new go.Spot(.25,.45),oe.spot2=new go.Spot(.75,.8),oe}),go.Shape.defineFigureGenerator("Fallout",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,z/2,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,180,360,ee/2,z/2,ee/2,z/2));function ae(le,me,ve){le.add(new go.PathSegment(go.PathSegment.Move,(.3+me)*ee,(.8+ve)*z)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+me)*ee,(.5+ve)*z)),le.add(new go.PathSegment(go.PathSegment.Line,(.1+me)*ee,(.5+ve)*z)),le.add(new go.PathSegment(go.PathSegment.Line,(.3+me)*ee,(.8+ve)*z).close())}return ae(re,0,0),ae(re,.4,0),ae(re,.2,-.3),oe}),go.Shape.defineFigureGenerator("IrritationHazard",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.2*ee,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.3*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.7*z)),re.add(new go.PathSegment(go.PathSegment.Line,.2*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,.3*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.2*z).close()),oe.spot1=new go.Spot(.3,.3),oe.spot2=new go.Spot(.7,.7),oe}),go.Shape.defineFigureGenerator("ElectricalHazard",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.37*ee,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.11*z)),re.add(new go.PathSegment(go.PathSegment.Line,.77*ee,.04*z)),re.add(new go.PathSegment(go.PathSegment.Line,.33*ee,.49*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.37*z)),re.add(new go.PathSegment(go.PathSegment.Line,.63*ee,.86*z)),re.add(new go.PathSegment(go.PathSegment.Line,.77*ee,.91*z)),re.add(new go.PathSegment(go.PathSegment.Line,.34*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.34*ee,.78*z)),re.add(new go.PathSegment(go.PathSegment.Line,.44*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.56*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.68*z).close()),oe}),go.Shape.defineFigureGenerator("FireHazard",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.1*ee,z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.29*ee,0,-.25*ee,.63*z,.45*ee,.44*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.51*ee,.42*z,.48*ee,.17*z,.54*ee,.35*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.59*ee,.18*z,.59*ee,.29*z,.58*ee,.28*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.75*ee,.6*z,.8*ee,.34*z,.88*ee,.43*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.88*ee,.31*z,.87*ee,.48*z,.88*ee,.43*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.9*ee,z,1.17*ee,.76*z,.82*ee,.8*z).close()),oe.spot1=new go.Spot(.07,.445),oe.spot2=new go.Spot(.884,.958),oe}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(ue,ee,z){var oe=new go.Geometry,re=.5,ae=0,le=0,me=re*be,ve=.4*Math.SQRT2/2+.5,Pe=.5-.5*Math.SQRT2/2,Ae=1,De=.5,Oe=.5,Ze=0,qe=new go.PathFigure(ve*ee,(1-Pe)*z,!1);return oe.add(qe),qe.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ee,De*z,Ae*ee,.7*z,Ae*ee,De*z)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(Oe+ae)*ee,(Ze+ae)*z,(.5+re+ae)*ee,(.5-me+ae)*z,(.5+me+ae)*ee,(.5-re+ae)*z)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-re+ae)*ee,(.5+le)*z,(.5-me+ae)*ee,(.5-re+le)*z,(.5-re+ae)*ee,(.5-me+le)*z)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(.35+ae)*ee,.9*z,(.5-re+ae)*ee,(.5+me+le)*z,(.5-me+ae)*ee,.9*z)),qe.add(new go.PathSegment(go.PathSegment.Move,(.25+ae)*ee,.8*z)),qe.add(new go.PathSegment(go.PathSegment.Line,(.35+ae)*ee,.9*z)),qe.add(new go.PathSegment(go.PathSegment.Line,(.2+ae)*ee,.95*z)),oe}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Move,.5*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Move,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),oe}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Move,0,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Move,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),oe}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!1);oe.add(re);var ae=new go.PathFigure(ee,z,!1);oe.add(ae);var le=new go.PathFigure(0,.5*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.5*z,.2*ee,.35*z,.3*ee,.35*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,.7*ee,.65*z,.8*ee,.65*z)),oe}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.5*z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z).close()),oe}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.2*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.8*z).close());var re=new go.PathFigure(0,.2*z,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.2*z)),oe}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.7*ee,z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.3*ee,z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.3*ee,0,.6*ee,.5*z,0,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.7*ee,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,.7*ee,z,.4*ee,.5*z,ee,.5*z).close());var ae=new go.PathFigure(.45*ee,.73*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.73*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.38*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.63*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.31*ee,.27*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.56*ee,.27*z)),oe}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!1);oe.add(re);var ae=new go.PathFigure(.335*ee,(1-.555)*z,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.335*ee,(1-.405)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ee,(1-.405)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ee,(1-.555)*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,ee,.68*z,(1-.12)*ee,.46*z,(1-.02)*ee,.54*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,.68*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,.335*ee,(1-.555)*z,.02*ee,.54*z,.12*ee,.46*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.365*ee,(1-.595)*z));var le=.5-.285,me=.5,ve=le,Pe=Math.PI/4,Ae=4*(1-Math.cos(Pe))/(3*Math.sin(Pe)),De=Ae*.5,Oe=le,Ze=le,qe=Ae*Oe,Xe=Ae*Ze;ae.add(new go.PathSegment(go.PathSegment.Bezier,(me-Oe)*ee,ve*z,(me-(qe+Oe)/2)*ee,(ve+(Ze+Xe)/2)*z,(me-Oe)*ee,(ve+Xe)*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,me*ee,(ve-Ze)*z,(me-Oe)*ee,(ve-Xe)*z,(me-qe)*ee,(ve-Ze)*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,(me+Oe)*ee,ve*z,(me+qe)*ee,(ve-Ze)*z,(me+Oe)*ee,(ve-Xe)*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*ee,(1-.595)*z,(me+Oe)*ee,(ve+Xe)*z,(me+(qe+Oe)/2)*ee,(ve+(Ze+Xe)/2)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*ee,(1-.595)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ee,(1-.555)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ee,(1-.405)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.335*ee,(1-.405)*z));var mt=new go.PathFigure(.2*ee,z,!1);oe.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.8*z));var pt=new go.PathFigure(.8*ee,z,!1);return oe.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.8*z)),oe}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.1*ee,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.9*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.9*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.1*ee,z).close());var ae=new go.PathFigure(.2*ee,.2*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.2*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.4*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.4*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.6*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.6*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.8*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.8*z)),oe}),go.Shape.defineFigureGenerator("BpmnEventError",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.33*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.66*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.66*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.33*ee,.5*z).close()),oe}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!1);oe.add(re);var ae=new go.PathFigure(ee,z,!1);oe.add(ae);var le=new go.PathFigure(.1*ee,z,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,.9*ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z).close()),oe}),go.Shape.defineFigureGenerator("Caution",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.05*ee,z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.1*ee,.8*z,0,z,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.1*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.55*ee,.1*z,.5*ee,0,.5*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.95*ee,.9*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.9*ee,z,ee,z,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.05*ee,z));var ae=.05;return re.add(new go.PathSegment(go.PathSegment.Move,(.5-ae)*ee,.875*z)),re.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*ee,.875*z,ae*ee,ae*z)),re.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.75*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.325*z,.575*ee,.725*z,.625*ee,.375*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.75*z,.375*ee,.375*z,.425*ee,.725*z)),oe}),go.Shape.defineFigureGenerator("Recycle",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.45*ee,.95*z,!1);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.95*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.185*ee,.85*z,.17*ee,.95*z,.15*ee,.9*z)),re.add(new go.PathSegment(go.PathSegment.Line,.235*ee,.75*z)),re.add(new go.PathSegment(go.PathSegment.Line,.3*ee,.625*z)),re.add(new go.PathSegment(go.PathSegment.Line,.35*ee,.65*z)),re.add(new go.PathSegment(go.PathSegment.Line,.275*ee,.45*z)),re.add(new go.PathSegment(go.PathSegment.Line,.05*ee,.45*z)),re.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.05*ee,.575*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.1875*ee,.95*z,0,.675*z,0,.7*z)),re.add(new go.PathSegment(go.PathSegment.Move,.45*ee,.95*z)),re.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.775*z)),re.add(new go.PathSegment(go.PathSegment.Line,.22*ee,.775*z));var ae=new go.PathFigure(.475*ee,.2*z,!1);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.4*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.225*ee,.3*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.275*ee,.175*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.325*ee,.05*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,.4*ee,.05*z,.35*ee,0,.375*ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,.575*ee,.375*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.525*ee,.4*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.475*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.315*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.32*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.05*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,.575*ee,0,.65*ee,.05*z,.625*ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,.38*ee,.0105*z));var le=new go.PathFigure(.675*ee,.575*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.875*ee,.525*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,.775*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,.85*ee,.95*z,ee,.8*z,ee,.85*z)),le.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.95*z)),le.add(new go.PathSegment(go.PathSegment.Line,.65*ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.85*z)),le.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.725*z)),le.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.775*z)),le.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.775*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,.775*z)),le.add(new go.PathSegment(go.PathSegment.Move,.675*ee,.575*z)),le.add(new go.PathSegment(go.PathSegment.Line,.775*ee,.775*z)),oe}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(ue,ee,z){var oe=new go.Geometry,re=.5,ae=be*.5,le=new go.PathFigure(ee,re*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,re*ee,z,ee,(re+ae)*z,(re+ae)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,re*z,(re-ae)*ee,z,0,(re+ae)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,re*ee,0,0,(re-ae)*z,(re-ae)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,re*z,(re+ae)*ee,0,ee,(re-ae)*z));var me=new go.PathFigure(re*ee,0,!1);return oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,re*ee,.15*z)),me.add(new go.PathSegment(go.PathSegment.Move,re*ee,z)),me.add(new go.PathSegment(go.PathSegment.Line,re*ee,.85*z)),me.add(new go.PathSegment(go.PathSegment.Move,0,re*z)),me.add(new go.PathSegment(go.PathSegment.Line,.15*ee,re*z)),me.add(new go.PathSegment(go.PathSegment.Move,ee,re*z)),me.add(new go.PathSegment(go.PathSegment.Line,.85*ee,re*z)),me.add(new go.PathSegment(go.PathSegment.Move,re*ee,re*z)),me.add(new go.PathSegment(go.PathSegment.Line,.58*ee,.1*z)),me.add(new go.PathSegment(go.PathSegment.Move,re*ee,re*z)),me.add(new go.PathSegment(go.PathSegment.Line,.78*ee,.54*z)),oe}),go.Shape.defineFigureGenerator("Package",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.15*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,.15*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var ae=new go.PathFigure(0,.15*z,!0);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,0,0)),ae.add(new go.PathSegment(go.PathSegment.Line,.6*ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.15*z).close()),oe.spot1=new go.Spot(0,.1),oe.spot2=new go.Spot(1,1),oe}),go.Shape.defineFigureGenerator("Class",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ae=new go.PathFigure(0,.2*z,!1);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,.2*z).close());var le=new go.PathFigure(0,.5*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z).close()),oe}),go.Shape.defineFigureGenerator("Component",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee,z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.15*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.15*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z).close());var ae=new go.PathFigure(0,.2*z,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.2*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.4*z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,.4*z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,.2*z).close());var le=new go.PathFigure(0,.6*z,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.6*z)),le.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.8*z)),le.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),le.add(new go.PathSegment(go.PathSegment.Line,0,.6*z).close()),oe}),go.Shape.defineFigureGenerator("Boat Shipment",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.15*ee,.6*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.15*ee,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,.15*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.85*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.15*ee,.6*z));var ae=new go.PathFigure(.15*ee,.6*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.6*z)),oe}),go.Shape.defineFigureGenerator("Customer/Supplier",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee,z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.66*ee,.33*z)),re.add(new go.PathSegment(go.PathSegment.Line,.66*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.33*ee,.33*z)),re.add(new go.PathSegment(go.PathSegment.Line,.33*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,.33*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z).close()),oe}),go.Shape.defineFigureGenerator("Workcell",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.65*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.4*z)),re.add(new go.PathSegment(go.PathSegment.Line,.35*ee,.4*z)),re.add(new go.PathSegment(go.PathSegment.Line,.35*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe}),go.Shape.defineFigureGenerator("Supermarket",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.33*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.33*z)),re.add(new go.PathSegment(go.PathSegment.Move,ee,.33*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.66*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.66*z)),re.add(new go.PathSegment(go.PathSegment.Move,ee,.66*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),oe}),go.Shape.defineFigureGenerator("TruckShipment",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.6*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ae=new go.PathFigure(ee,.8*z,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,.4*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.4*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.8*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z).close());var le=.1,me=be*.1,ve=.2,Pe=.9,Ae=new go.PathFigure((ve-le)*ee,Pe*z,!0);oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe-le)*z,(ve-le)*ee,(Pe-me)*z,(ve-me)*ee,(Pe-le)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ve+le)*ee,Pe*z,(ve+me)*ee,(Pe-le)*z,(ve+le)*ee,(Pe-me)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe+le)*z,(ve+le)*ee,(Pe+me)*z,(ve+me)*ee,(Pe+le)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ve-le)*ee,Pe*z,(ve-me)*ee,(Pe+le)*z,(ve-le)*ee,(Pe+me)*z).close()),le=.1,me=be*.1,ve=.8,Pe=.9;var De=new go.PathFigure((ve-le)*ee,Pe*z,!0);return oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe-le)*z,(ve-le)*ee,(Pe-me)*z,(ve-me)*ee,(Pe-le)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,(ve+le)*ee,Pe*z,(ve+me)*ee,(Pe-le)*z,(ve+le)*ee,(Pe-me)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe+le)*z,(ve+le)*ee,(Pe+me)*z,(ve+me)*ee,(Pe+le)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,(ve-le)*ee,Pe*z,(ve-me)*ee,(Pe+le)*z,(ve-le)*ee,(Pe+me)*z).close()),oe}),go.Shape.defineFigureGenerator("KanbanPost",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.2*ee,0,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,0)),re.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.2*ee,z)),re.add(new go.PathSegment(go.PathSegment.Move,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,z)),oe}),go.Shape.defineFigureGenerator("Forklift",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.4*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,0));var ae=new go.PathFigure(0,.5*z,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.8*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,.5*z));var le=new go.PathFigure(.5*ee,.8*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.1*z)),le.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.1*z)),le.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.8*z)),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.8*z));var me=new go.PathFigure(.5*ee,.7*z,!1);oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ee,.7*z));var ve=.1,Pe=be*.1,Ae=.1,De=.9,Oe=new go.PathFigure((Ae-ve)*ee,De*z,!0);oe.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ee,(De-ve)*z,(Ae-ve)*ee,(De-Pe)*z,(Ae-Pe)*ee,(De-ve)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+ve)*ee,De*z,(Ae+Pe)*ee,(De-ve)*z,(Ae+ve)*ee,(De-Pe)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ee,(De+ve)*z,(Ae+ve)*ee,(De+Pe)*z,(Ae+Pe)*ee,(De+ve)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-ve)*ee,De*z,(Ae-Pe)*ee,(De+ve)*z,(Ae-ve)*ee,(De+Pe)*z)),ve=.1,Pe=be*.1,Ae=.4,De=.9;var Ze=new go.PathFigure((Ae-ve)*ee,De*z,!0);return oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ee,(De-ve)*z,(Ae-ve)*ee,(De-Pe)*z,(Ae-Pe)*ee,(De-ve)*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+ve)*ee,De*z,(Ae+Pe)*ee,(De-ve)*z,(Ae+ve)*ee,(De-Pe)*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ee,(De+ve)*z,(Ae+ve)*ee,(De+Pe)*z,(Ae+Pe)*ee,(De+ve)*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-ve)*ee,De*z,(Ae-Pe)*ee,(De+ve)*z,(Ae-ve)*ee,(De+Pe)*z)),oe}),go.Shape.defineFigureGenerator("RailShipment",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.1*ee,.4*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.4*z)),re.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.9*z)),re.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.9*z)),re.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.4*z).close());var ae=new go.PathFigure(.45*ee,.7*z,!1);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.7*z));var le=new go.PathFigure(.55*ee,.4*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.4*z)),le.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.9*z)),le.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.9*z)),le.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.4*z).close());var Ae=.05,De=be*.05,Oe=.175,Ze=.95,me=new go.PathFigure((Oe-Ae)*ee,Ze*z,!0);oe.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,Oe*ee,(Ze-Ae)*z,(Oe-Ae)*ee,(Ze-De)*z,(Oe-De)*ee,(Ze-Ae)*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,(Oe+Ae)*ee,Ze*z,(Oe+De)*ee,(Ze-Ae)*z,(Oe+Ae)*ee,(Ze-De)*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,Oe*ee,(Ze+Ae)*z,(Oe+Ae)*ee,(Ze+De)*z,(Oe+De)*ee,(Ze+Ae)*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,(Oe-Ae)*ee,Ze*z,(Oe-De)*ee,(Ze+Ae)*z,(Oe-Ae)*ee,(Ze+De)*z));var Ae=.05,De=be*.05,Oe=.375,Ze=.95,ve=new go.PathFigure((Oe-Ae)*ee,Ze*z,!0);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,Oe*ee,(Ze-Ae)*z,(Oe-Ae)*ee,(Ze-De)*z,(Oe-De)*ee,(Ze-Ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(Oe+Ae)*ee,Ze*z,(Oe+De)*ee,(Ze-Ae)*z,(Oe+Ae)*ee,(Ze-De)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,Oe*ee,(Ze+Ae)*z,(Oe+Ae)*ee,(Ze+De)*z,(Oe+De)*ee,(Ze+Ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(Oe-Ae)*ee,Ze*z,(Oe-De)*ee,(Ze+Ae)*z,(Oe-Ae)*ee,(Ze+De)*z));var Ae=.05,De=be*.05,Oe=.625,Ze=.95,Pe=new go.PathFigure((Oe-Ae)*ee,Ze*z,!0);oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Oe*ee,(Ze-Ae)*z,(Oe-Ae)*ee,(Ze-De)*z,(Oe-De)*ee,(Ze-Ae)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(Oe+Ae)*ee,Ze*z,(Oe+De)*ee,(Ze-Ae)*z,(Oe+Ae)*ee,(Ze-De)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Oe*ee,(Ze+Ae)*z,(Oe+Ae)*ee,(Ze+De)*z,(Oe+De)*ee,(Ze+Ae)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(Oe-Ae)*ee,Ze*z,(Oe-De)*ee,(Ze+Ae)*z,(Oe-Ae)*ee,(Ze+De)*z));var Ae=.05,De=be*.05,Oe=.825,Ze=.95,qe=new go.PathFigure((Oe-Ae)*ee,Ze*z,!0);oe.add(qe),qe.add(new go.PathSegment(go.PathSegment.Bezier,Oe*ee,(Ze-Ae)*z,(Oe-Ae)*ee,(Ze-De)*z,(Oe-De)*ee,(Ze-Ae)*z)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(Oe+Ae)*ee,Ze*z,(Oe+De)*ee,(Ze-Ae)*z,(Oe+Ae)*ee,(Ze-De)*z)),qe.add(new go.PathSegment(go.PathSegment.Bezier,Oe*ee,(Ze+Ae)*z,(Oe+Ae)*ee,(Ze+De)*z,(Oe+De)*ee,(Ze+Ae)*z)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(Oe-Ae)*ee,Ze*z,(Oe-De)*ee,(Ze+Ae)*z,(Oe-Ae)*ee,(Ze+De)*z).close());var Xe=new go.PathFigure(0,z,!1);return oe.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Line,ee,z).close()),oe}),go.Shape.defineFigureGenerator("Warehouse",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ae=new go.PathFigure(0,.2*z,!1);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,.2*z).close());var le=new go.PathFigure(.15*ee,z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.15*ee,.5*z)),le.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.5*z)),le.add(new go.PathSegment(go.PathSegment.Line,.4*ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,.15*ee,z).close());var me=.05,ve=be*.05,Pe=.35,Ae=.775,De=new go.PathFigure((Pe-me)*ee,Ae*z,!0);return oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ee,(Ae-me)*z,(Pe-me)*ee,(Ae-ve)*z,(Pe-ve)*ee,(Ae-me)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+me)*ee,Ae*z,(Pe+ve)*ee,(Ae-me)*z,(Pe+me)*ee,(Ae-ve)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ee,(Ae+me)*z,(Pe+me)*ee,(Ae+ve)*z,(Pe+ve)*ee,(Ae+me)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-me)*ee,Ae*z,(Pe-ve)*ee,(Ae+me)*z,(Pe-me)*ee,(Ae+ve)*z).close()),oe}),go.Shape.defineFigureGenerator("ControlCenter",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,.1*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.9*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Move,.1*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.8*z).close()),oe}),go.Shape.defineFigureGenerator("Bluetooth",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.75*z,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.75*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.75*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.25*z)),oe}),go.Shape.defineFigureGenerator("Bookmark",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.2*z)),re.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.4*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.4*z)),oe}),go.Shape.defineFigureGenerator("Bookmark",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.2*z)),re.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.4*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.4*z)),oe}),go.Shape.defineFigureGenerator("Globe",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.5*ee,0,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Move,0,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Move,.5*ee,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,.75*ee,0,ee,.25*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,ee,.75*z,.75*ee,z)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*z,.25*ee,z,0,.75*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,0,.25*z,.25*ee,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,.15*ee,.25*z,.15*ee,.75*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,.85*ee,.75*z,.85*ee,.25*z)),re.add(new go.PathSegment(go.PathSegment.Move,.1675*ee,.15*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.8325*ee,.15*z,.35*ee,.3*z,.65*ee,.3*z)),re.add(new go.PathSegment(go.PathSegment.Move,.1675*ee,.85*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.8325*ee,.85*z,.35*ee,.7*z,.65*ee,.7*z)),oe}),go.Shape.defineFigureGenerator("Wave",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.25*z,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.3*ee,.25*z,.1*ee,0,.2*ee,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,.7*ee,.25*z,.425*ee,.5*z,.575*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,ee,.25*z,.8*ee,0,.9*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.75*z)),re.add(new go.PathSegment(go.PathSegment.Move,0,.25*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.75*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.3*ee,.75*z,.1*ee,.5*z,.2*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.7*ee,.75*z,.425*ee,z,.575*ee,z)),re.add(new go.PathSegment(go.PathSegment.Bezier,ee,.75*z,.8*ee,.5*z,.9*ee,.5*z)),oe}),go.Shape.defineFigureGenerator("Operator",function(ue,ee,z){var oe=new go.Geometry,re=.3,ae=be*.3,le=.5,me=.7,ve=new go.PathFigure((le-re)*ee,me*z,!0);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-re)*z,(le-re)*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+re)*ee,me*z,(le+ae)*ee,(me-re)*z,(le+re)*ee,(me-ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+re)*z,(le+re)*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le-re)*ee,me*z,(le-ae)*ee,(me+re)*z,(le-re)*ee,(me+ae)*z));var Pe=new go.PathFigure(0,.7*z,!1);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ee,.7*z,0,0,ee,0)),oe}),go.Shape.defineFigureGenerator("TripleFanBlades",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.5*ee,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.65*z,.65*ee,.3*z,.65*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,.35*ee,.5*z,.35*ee,.3*z)),re.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.65*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,z,.3*ee,.6*z,.1*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.65*z,.2*ee,z,.35*ee,.95*z)),re.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.65*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,ee,z,.7*ee,.6*z,.9*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.65*z,.8*ee,z,.65*ee,.95*z)),oe}),go.Shape.defineFigureGenerator("CentrifugalPump",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.4*ee,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*z,0,.075*z,0,.5*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.4*ee,z,0,z,.4*ee,z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.4*z,.8*ee,z,.85*ee,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.4*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),oe}),go.Shape.defineFigureGenerator("Battery",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.1*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.1*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Move,.4*ee,.1*z)),re.add(new go.PathSegment(go.PathSegment.Line,.4*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.6*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.1*z));var ae=new go.PathFigure(0,.6*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Move,0,.4*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,.4*z)),oe}),go.Shape.defineFigureGenerator("Delete",function(ue,ee,z){var oe=new go.Geometry,re=.5,ae=be*.5,le=.5,me=.5,ve=new go.PathFigure((le-re)*ee,me*z,!0);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-re)*z,(le-re)*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+re)*ee,me*z,(le+ae)*ee,(me-re)*z,(le+re)*ee,(me-ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+re)*z,(le+re)*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le-re)*ee,me*z,(le-ae)*ee,(me+re)*z,(le-re)*ee,(me+ae)*z));var Pe=new go.PathFigure(.15*ee,.5*z,!1);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.5*z)),oe}),go.Shape.defineFigureGenerator("Flag",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.1*z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Move,0,.1*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.1*z,.15*ee,0,.35*ee,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,ee,.1*z,.65*ee,.2*z,.85*ee,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.5*z,.85*ee,.6*z,.65*ee,.6*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*z,.35*ee,.4*z,.15*ee,.4*z).close()),oe}),go.Shape.defineFigureGenerator("Help",function(ue,ee,z){var oe=new go.Geometry,re=.5,ae=be*.5,le=.5,me=.5,ve=new go.PathFigure((le-re)*ee,me*z,!1);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-re)*z,(le-re)*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+re)*ee,me*z,(le+ae)*ee,(me-re)*z,(le+re)*ee,(me-ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+re)*z,(le+re)*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le-re)*ee,me*z,(le-ae)*ee,(me+re)*z,(le-re)*ee,(me+ae)*z).close()),re=.05,ae=be*.05,le=.5,me=.8;var Pe=new go.PathFigure((le-re)*ee,me*z,!1);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-re)*z,(le-re)*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(le+re)*ee,me*z,(le+ae)*ee,(me-re)*z,(le+re)*ee,(me-ae)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+re)*z,(le+re)*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(le-re)*ee,me*z,(le-ae)*ee,(me+re)*z,(le-re)*ee,(me+ae)*z).close()),Pe.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.7*z)),Pe.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.2*z,.75*ee,.475*z,.75*ee,.225*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.3*ee,.35*z,.4*ee,.2*z,.3*ee,.25*z)),oe}),go.Shape.defineFigureGenerator("Location",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(.5*ee,z,!0).add(new go.PathSegment(go.PathSegment.Line,.75*ee,.5*z)).add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,.975*ee,.025*z,.5*ee,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*ee,.5*z,.5*ee,0,.025*ee,.025*z).close()).add(new go.PathSegment(go.PathSegment.Move,.5*ee,.2*z)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*ee,.3*z,.1*ee,.1*z).close()))}),go.Shape.defineFigureGenerator("Lock",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.5*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*z));var ae=new go.PathFigure(.2*ee,.5*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.3*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.3*z,.25*ee,0,.75*ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.3*z)),oe}),go.Shape.defineFigureGenerator("Unlocked",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.5*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*z));var ae=new go.PathFigure(.2*ee,.5*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.3*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.3*z,.25*ee,0,.75*ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.35*z)),oe}),go.Shape.defineFigureGenerator("Gear",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(.9375*ee,.56246875*z,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*ee,.4375*z)).add(new go.PathSegment(go.PathSegment.Line,.80621875*ee,.4375*z)).add(new go.PathSegment(go.PathSegment.Bezier,.763*ee,.3316875*z,.79840625*ee,.39915625*z,.7834375*ee,.3635*z)).add(new go.PathSegment(go.PathSegment.Line,.8566875*ee,.23796875*z)).add(new go.PathSegment(go.PathSegment.Line,.76825*ee,.14959375*z)).add(new go.PathSegment(go.PathSegment.Line,.67596875*ee,.24184375*z)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*ee,.19378125*z,.64228125*ee,.2188125*z,.603875*ee,.2021875*z)).add(new go.PathSegment(go.PathSegment.Line,.5625*ee,.0625*z)).add(new go.PathSegment(go.PathSegment.Line,.4375*ee,.0625*z)).add(new go.PathSegment(go.PathSegment.Line,.4375*ee,.19378125*z)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*ee,.239375*z,.39759375*ee,.20190625*z,.36053125*ee,.2176875*z)).add(new go.PathSegment(go.PathSegment.Line,.2379375*ee,.14959375*z)).add(new go.PathSegment(go.PathSegment.Line,.14953125*ee,.2379375*z)).add(new go.PathSegment(go.PathSegment.Line,.23934375*ee,.3278125*z)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*ee,.4375*z,.21765625*ee,.36059375*z,.201875*ee,.397625*z)).add(new go.PathSegment(go.PathSegment.Line,.0625*ee,.4375*z)).add(new go.PathSegment(go.PathSegment.Line,.0625*ee,.5625*z)).add(new go.PathSegment(go.PathSegment.Line,.1938125*ee,.5625*z)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*ee,.67596875*z,.20221875*ee,.603875*z,.21884375*ee,.64228125*z)).add(new go.PathSegment(go.PathSegment.Line,.1495625*ee,.76825*z)).add(new go.PathSegment(go.PathSegment.Line,.238*ee,.8566875*z)).add(new go.PathSegment(go.PathSegment.Line,.3316875*ee,.76296875*z)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*ee,.80621875*z,.36353125*ee,.78340625*z,.3991875*ee,.79840625*z)).add(new go.PathSegment(go.PathSegment.Line,.43753125*ee,.9375*z)).add(new go.PathSegment(go.PathSegment.Line,.5625*ee,.9375*z)).add(new go.PathSegment(go.PathSegment.Line,.5625*ee,.80621875*z)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*ee,.760625*z,.602375*ee,.79809375*z,.63946875*ee,.78234375*z)).add(new go.PathSegment(go.PathSegment.Line,.76828125*ee,.8566875*z)).add(new go.PathSegment(go.PathSegment.Line,.85671875*ee,.76825*z)).add(new go.PathSegment(go.PathSegment.Line,.76065625*ee,.67221875*z)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*ee,.56246875*z,.78234375*ee,.63940625*z,.798125*ee,.602375*z)).add(new go.PathSegment(go.PathSegment.Line,.9375*ee,.56246875*z).close()).add(new go.PathSegment(go.PathSegment.Move,.5*ee,.6*z)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*ee,.5*z,.1*ee,.1*z).close()))}),go.Shape.defineFigureGenerator("Hand",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.5*z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.1*ee,.3*z,0,.375*z,.05*ee,.325*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.45*ee,.075*z,.3*ee,.225*z,.4*ee,.175*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.525*ee,.075*z,.46*ee,.05*z,.525*ee,.05*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.3*ee,.4*z,.525*ee,.275*z,.475*ee,.325*z)),re.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.4*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.9*ee,.55*z,ee,.4*z,ee,.55*z)),re.add(new go.PathSegment(go.PathSegment.Line,.425*ee,.55*z)),re.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.55*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.6*ee,.7*z,.675*ee,.55*z,.675*ee,.7*z)),re.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.7*z)),re.add(new go.PathSegment(go.PathSegment.Line,.575*ee,.7*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.575*ee,.85*z,.65*ee,.7*z,.65*ee,.85*z)),re.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.85*z)),re.add(new go.PathSegment(go.PathSegment.Line,.525*ee,.85*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.535*ee,z,.61*ee,.85*z,.61*ee,z)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*z,.435*ee,z,0,z).close()),oe}),go.Shape.defineFigureGenerator("Map",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.2*z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.25*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.25*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),re.add(new go.PathSegment(go.PathSegment.Move,.25*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.25*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Move,.75*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.8*z)),oe}),go.Shape.defineFigureGenerator("Eject",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z*.7)),re.add(new go.PathSegment(go.PathSegment.Line,0,z*.7).close());var ae=new go.PathFigure(0,z*.6,!0);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,.6*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0).close()),oe}),go.Shape.defineFigureGenerator("Pencil",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*ee,.1*z)).add(new go.PathSegment(go.PathSegment.Line,ee,.9*z)).add(new go.PathSegment(go.PathSegment.Line,.9*ee,z)).add(new go.PathSegment(go.PathSegment.Line,.1*ee,.2*z).close()))}),go.Shape.defineFigureGenerator("Building",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee*1,z*1,!1);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,0,z*.85)),re.add(new go.PathSegment(go.PathSegment.Line,.046*ee,z*.85)),re.add(new go.PathSegment(go.PathSegment.Line,.046*ee,z*.45)),re.add(new go.PathSegment(go.PathSegment.Line,0,z*.45)),re.add(new go.PathSegment(go.PathSegment.Line,0,z*.3)),re.add(new go.PathSegment(go.PathSegment.Line,.046*ee,z*.3)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z*0)),re.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ee,z*.3)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z*.3)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z*.45)),re.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ee,z*.45)),re.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ee,z*.85)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z*.85).close());var ae=new go.PathFigure(.126*ee,.85*z,!1);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.126*ee,.45*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.322*ee,.45*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.322*ee,.85*z).close());var le=new go.PathFigure(.402*ee,.85*z,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.402*ee,.45*z)),le.add(new go.PathSegment(go.PathSegment.Line,.598*ee,.45*z)),le.add(new go.PathSegment(go.PathSegment.Line,.598*ee,.85*z).close());var me=new go.PathFigure(.678*ee,.85*z,!1);oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.678*ee,.45*z)),me.add(new go.PathSegment(go.PathSegment.Line,.874*ee,.45*z)),me.add(new go.PathSegment(go.PathSegment.Line,.874*ee,.85*z).close());var ve=new go.PathFigure(.5*ee,.1*z,!1);return oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*ee,.3*z)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*ee,.3*z).close()),oe}),go.Shape.defineFigureGenerator("Staircase",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,z*1,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee*.2,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.2,z*.8)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.8)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.6)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*.6)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*.4)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*.4)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*.2)),re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.2)),re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.15)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.15)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.35)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.35)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.55)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.35,z*.55)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.35,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.15,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.15,z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,0,z*.95).close()),oe}),go.Shape.defineFigureGenerator("5Bars",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,z*1,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee*.184,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.184,z*(1-.184)).close());var ae=new go.PathFigure(ee*.204,z,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.204,z*(1-.184))),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.388,z*(1-.184*2))),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.388,z*1).close());var le=new go.PathFigure(ee*.408,z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee*.408,z*(1-.184*2))),le.add(new go.PathSegment(go.PathSegment.Line,ee*.592,z*(1-.184*3))),le.add(new go.PathSegment(go.PathSegment.Line,ee*.592,z*1).close());var me=new go.PathFigure(ee*.612,z,!0);oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ee*.612,z*(1-.184*3))),me.add(new go.PathSegment(go.PathSegment.Line,ee*.796,z*(1-.184*4))),me.add(new go.PathSegment(go.PathSegment.Line,ee*.796,z*1).close());var ve=new go.PathFigure(ee*.816,z,!0);return oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ee*.816,z*(1-.184*4))),ve.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*(1-.184*5))),ve.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1).close()),oe}),go.Shape.defineFigureGenerator("PC",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.3,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.3,0).close());var ae=new go.PathFigure(ee*.055,.07*z,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.245,z*.07)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.245,z*.1)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.055,z*.1).close());var le=new go.PathFigure(ee*.055,.13*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee*.245,z*.13)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.245,z*.16)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.055,z*.16).close());var me=new go.PathFigure(ee*.055,.18*z,!0);oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ee*.245,z*.18)),me.add(new go.PathSegment(go.PathSegment.Line,ee*.245,z*.21)),me.add(new go.PathSegment(go.PathSegment.Line,ee*.055,z*.21).close());var ve=new go.PathFigure(ee*1,0,!0);return oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ee*.4,0)),ve.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.65)),ve.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.65).close()),oe}),go.Shape.defineFigureGenerator("Plane",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.55*ee,z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.7*z)),re.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.475*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.35*ee,.525*z,0,.4*z,.225*ee,.45*z)),re.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.475*z)),re.add(new go.PathSegment(go.PathSegment.Line,.15*ee,.35*z)),re.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.325*z)),re.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.325*z)),re.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.1*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.9*ee,.2*z,.975*ee,0,ee,.08*z)),re.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.45*z)),re.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.95*z)),re.add(new go.PathSegment(go.PathSegment.Line,.55*ee,z).close()),oe}),go.Shape.defineFigureGenerator("Key",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee*1,z*.5,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee*.9,.4*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.5,.4*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.5,.35*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.45,.35*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.3,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.15,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.35*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.65*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.15,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.3,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.45,.65*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.5,.65*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.5,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.6,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.65,.55*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.7,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.75,.55*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.8,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.85,.575*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.9,.6*z).close()),re.add(new go.PathSegment(go.PathSegment.Move,.17*ee,.425*z)),re.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*ee,.5*z,.075*ee,.075*z).close()),oe}),go.Shape.defineFigureGenerator("FilmTape",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!1);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,270,180,ee*0,ee*.3,ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,0,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.08,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.08,z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*1),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*1),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*2),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*2),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*3),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*3),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*4),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*4),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*5),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*5),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*6),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*6),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*7),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*7),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*8),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*8),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*9),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*9),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*10),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*10),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*11),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*11),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*12),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*12),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*13),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*13),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*14),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*14),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*15),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*15),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1));var ae=new go.PathFigure(0,0,!1);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*0)),ae.add(new go.PathSegment(go.PathSegment.Arc,270,-180,ee*1,ee*.3,ee*.055)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1));var le=new go.PathFigure(ee*.11,z*.1,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*1+.028*0),z*.1)),le.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*1+.028*0),z*.8)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.11,z*.8).close());var me=new go.PathFigure(ee*(.11+.24133333*1+.028*1),z*.1,!1);oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*2+.028*1),z*.1)),me.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*2+.028*1),z*.8)),me.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*1+.028*1),z*.8).close());var ve=new go.PathFigure(ee*(.11+.24133333*2+.028*2),z*.1,!1);return oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*3+.028*2),z*.1)),ve.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*3+.028*2),z*.8)),ve.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*2+.028*2),z*.8).close()),oe}),go.Shape.defineFigureGenerator("FloppyDisk",function(ue,ee,z){var oe=new go.Geometry,re=8,ae=re*be,le=new go.PathFigure(re,0,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee*.86,0)),le.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.14)),le.add(new go.PathSegment(go.PathSegment.Line,ee,z-re)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee-re,z,ee,z-ae,ee-ae,z)),le.add(new go.PathSegment(go.PathSegment.Line,re,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,z-re,ae,z,0,z-ae)),le.add(new go.PathSegment(go.PathSegment.Line,0,re)),le.add(new go.PathSegment(go.PathSegment.Bezier,re,0,0,ae,ae,0).close());var me=new go.PathFigure(ee*.83,0,!1);oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ee*.83,z*.3)),me.add(new go.PathSegment(go.PathSegment.Line,ee*.17,z*.3)),me.add(new go.PathSegment(go.PathSegment.Line,ee*.17,z*0).close());var ve=new go.PathFigure(ee*.83,z*1,!1);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ee*.83,z*.5)),ve.add(new go.PathSegment(go.PathSegment.Line,ee*.17,z*.5)),ve.add(new go.PathSegment(go.PathSegment.Line,ee*.17,z*1).close());var Pe=new go.PathFigure(ee*.78,z*.05,!1);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*.05)),Pe.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*.25)),Pe.add(new go.PathSegment(go.PathSegment.Line,ee*.78,z*.25).close()),oe}),go.Shape.defineFigureGenerator("SpeechBubble",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=15),oe=Math.min(oe,ee/3),oe=Math.min(oe,z/3);var re=oe*be,ae=z*.8,le=new go.Geometry,me=new go.PathFigure(oe,0,!0);return le.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ee-oe,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,ee,oe,ee-re,0,ee,re)),me.add(new go.PathSegment(go.PathSegment.Line,ee,ae-oe)),me.add(new go.PathSegment(go.PathSegment.Bezier,ee-oe,ae,ee,ae-re,ee-re,ae)),me.add(new go.PathSegment(go.PathSegment.Line,ee*.7,ae)),me.add(new go.PathSegment(go.PathSegment.Line,ee*.7,z)),me.add(new go.PathSegment(go.PathSegment.Line,ee*.55,ae)),me.add(new go.PathSegment(go.PathSegment.Line,oe,ae)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,ae-oe,re,ae,0,ae-re)),me.add(new go.PathSegment(go.PathSegment.Line,0,oe)),me.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,re,re,0).close()),re>1?(le.spot1=new go.Spot(0,0,re,re),le.spot2=new go.Spot(1,.8,-re,-re)):(le.spot1=go.Spot.TopLeft,le.spot2=new go.Spot(1,.8)),le}),go.Shape.defineFigureGenerator("Repeat",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee*0,z*.45,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee*.25,z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.45)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.3,z*.45)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.3,z*.9)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*.9)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.65,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.2,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.2,z*.45).close());var ae=new go.PathFigure(ee*1,z*.55,!0);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*1)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.55)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.7,z*.55)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.7,z*.1)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.1)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.35,z*0)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*0)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*.55).close()),oe}),go.Shape.defineFigureGenerator("Windows",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close()).add(new go.PathSegment(go.PathSegment.Move,.4*ee,.4*z)).add(new go.PathSegment(go.PathSegment.Line,.4*ee,.8*z)).add(new go.PathSegment(go.PathSegment.Line,.9*ee,.8*z)).add(new go.PathSegment(go.PathSegment.Line,.9*ee,.4*z).close()).add(new go.PathSegment(go.PathSegment.Move,.2*ee,.1*z)).add(new go.PathSegment(go.PathSegment.Line,.2*ee,.6*z)).add(new go.PathSegment(go.PathSegment.Line,.7*ee,.6*z)).add(new go.PathSegment(go.PathSegment.Line,.7*ee,.1*z).close()).add(new go.PathSegment(go.PathSegment.Move,.1*ee,.6*z)).add(new go.PathSegment(go.PathSegment.Line,.1*ee,.9*z)).add(new go.PathSegment(go.PathSegment.Line,.5*ee,.9*z)).add(new go.PathSegment(go.PathSegment.Line,.5*ee,.6*z).close()))}),go.Shape.defineFigureGenerator("Terminal",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee*0,z*.1,!1);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.9)),re.add(new go.PathSegment(go.PathSegment.Line,ee*0,z*.9).close());var ae=new go.PathFigure(ee*.1,z*.2,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.1,z*.25)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.22,z*.285)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.1,z*.32)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.1,z*.37)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.275,z*.32)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.275,z*.25).close());var le=new go.PathFigure(ee*.28,z*.37,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee*.45,z*.37)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.45,z*.41)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.28,z*.41).close()),oe}),go.Shape.defineFigureGenerator("Beaker",function(ue,ee,z){var oe=new go.Geometry,re=15,ae=re*be,le=new go.PathFigure(ee*.62,z*.475,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,z-re)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee-re,z,ee,z-ae,ee-ae,z)),le.add(new go.PathSegment(go.PathSegment.Line,re,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,z-re,ae,z,0,z-ae)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.38,z*.475)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.38,z*.03)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.36,z*0)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.64,z*0)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.62,z*.03).close()),ae>1?(oe.spot1=new go.Spot(0,0,ae,ae),oe.spot2=new go.Spot(1,1,-ae,-ae)):(oe.spot1=go.Spot.TopLeft,oe.spot2=go.Spot.BottomRight),oe}),go.Shape.defineFigureGenerator("Download",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee*0,z*1,!0);oe.add(re);var ae=.1/.3;re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.755,z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.93,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.64,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.61,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.39,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.36,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.07,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.755),z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.8),z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*0,z*(1-ae)).close());var le=new go.PathFigure(ee*.4,z*0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.44)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.26,z*.44)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.66)),le.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.26),z*.44)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*.44)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*0).close()),oe}),go.Shape.defineFigureGenerator("Bin",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee*0,z*1,!0);oe.add(re);var ae=.1/.3;return re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.755,z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.93,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.64,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.61,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.39,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.36,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.07,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.755),z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.8),z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*0,z*(1-ae)).close()),oe}),go.Shape.defineFigureGenerator("Upload",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee*0,z*1,!0);oe.add(re);var ae=.1/.3;re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.755,z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.93,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.64,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.61,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.39,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.36,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.07,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.755),z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.8),z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*0,z*(1-ae)).close());var le=new go.PathFigure(ee*.5,z*0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee*.26,z*.25)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.25)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.63)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*.63)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*.25)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.74,z*.25).close()),oe}),go.Shape.defineFigureGenerator("EmptyDrink",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee*.15,z*0,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee*.85,z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.7,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.3,z*1).close()),oe}),go.Shape.defineFigureGenerator("Drink",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee*.15,z*0,!1);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee*.85,z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.7,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.3,z*1).close());var ae=new go.PathFigure(ee*.235,z*.28,!0);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.765,z*.28)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.655,z*.97)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.345,z*.97).close()),oe}),go.Shape.defineFigureGenerator("4Arrows",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee*.5,z*0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee*.65,z*.25)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.25)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.45)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.45)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.35)),re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.5)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.65)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.55)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.55)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.65,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.35,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.45,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.45,z*.55)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.25,z*.55)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.25,z*.65)),re.add(new go.PathSegment(go.PathSegment.Line,ee*0,z*.5)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.25,z*.35)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.25,z*.45)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.45,z*.45)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.45,z*.25)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.35,z*.25).close()),oe}),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")},43001: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 xn={},ln="5.0",Ie={},Le=null,Se=!1,je=!1,Me=null,Ce=!1,xe=null,be=null,ye=0;ye<arguments.length;ye++){var we=arguments[ye];if(we!==null)switch(typeof we){case"number":ln=we.toFixed(1);break;case"string":we.match(new RegExp("^[0-9]\\.[0-9]+$"))?ln=we:Me=we;break;case"object":typeof we.is3D!="undefined"?Le=we:Ie=we;break;case"boolean":Se=we,je=!0;break}}Le===null&&(Le={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},Ie.material_id!==void 0&&!je&&(Se=!0)),Me!==null&&Ie.id===void 0&&(Ie.id=Me);var pe="",de="",ge=!1,fe=null,ue=null,ee=null,z=!1,oe=null,re=null,ae=null,le=null,me=null;Ie.height!==void 0&&(Ie.height=Math.round(Ie.height)),Ie.width!==void 0&&(Ie.width=Math.round(Ie.width));var ve=function(xt){return parseFloat(xt)>4?parseFloat(xt):5};xn.setHTML5Codebase=function(xt,Ut){be=xt,ct(xt,Ut)},xn.setJavaCodebase=xn.setJavaCodebaseVersion=xn.isCompiledInstalled=xn.setPreCompiledScriptPath=xn.setPreCompiledResourcePath=function(){},xn.setHTML5CodebaseVersion=function(xt,Ut){var zt=parseFloat(xt);if(zt!==NaN&&zt<5){console.log("The GeoGebra HTML5 codebase version "+zt+" is deprecated. Using version latest instead.");return}xe=xt,rt(xt,Ut)},xn.getHTML5CodebaseVersion=function(){return ue},xn.getParameters=function(){return Ie},xn.setFontsCSSURL=function(xt){le=xt},xn.setGiacJSURL=function(xt){},xn.setJNLPFile=function(xt){pe=xt},xn.setJNLPBaseDir=function(xt){},xn.inject=function(){function xt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Ut="auto",zt=Ie.id,dn,Ft=!1,Dt=0;Dt<arguments.length;Dt++){var Qt=arguments[Dt];typeof Qt=="string"?(Qt=Qt.toLowerCase(),Qt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Ut=Qt:zt=arguments[Dt]):typeof Qt=="boolean"?Ft=Qt:Qt instanceof HTMLElement&&(dn=Qt)}Yt();function Yt(){if(!Ce){setTimeout(Yt,200);return}Ut=Rt(Ut);var Jt=dn||document.getElementById(zt);if(!Jt){console.log("possibly bug on ajax loading? ");return}if(xn.removeExistingApplet(Jt,!1),Ie.width===void 0&&Jt.clientWidth&&(Ie.width=Jt.clientWidth),Ie.height===void 0&&Jt.clientHeight&&(Ie.height=Jt.clientHeight),!(Ie.width&&Ie.height)&&Ut==="html5"&&(delete Ie.width,delete Ie.height),fe=Ut,Ut==="screenshot")pt(Jt,Ie);else{var lt=!1;Ie.hasOwnProperty("playButton")&&Ie.playButton||Ie.hasOwnProperty("clickToLoad")&&Ie.clickToLoad?lt=!0:Ie.hasOwnProperty("playButtonAutoDecide")&&Ie.playButtonAutoDecide&&(lt=(!Pe()||xt())&&Ae()),lt?(fe="screenshot",at(Jt,Ie,Ft,Ut)):mt(Jt,Ie,Ft)}}};function Pe(){try{return window.self!==window.top}catch(xt){return!0}}function Ae(){return Ie.hasOwnProperty("screenshotGenerator")&&Ie.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}xn.getViews=function(){return Le},xn.isJavaInstalled=function(){return!1};var De=function(xt){var Ut=function(Dt){var Qt=JSON.parse(Dt),Yt=function(Ue){return Ue.type=="G"||Ue.type=="E"},Jt=Qt.elements?Qt.elements.filter(Yt)[0]:Qt;if(!Jt||!Jt.url){zt();return}Ie.fileName=Jt.url,Oe(Jt.settings||{}),Le.is3D=!0;var lt="https://www.geogebra.org/images/";xn.setPreviewImage(oe||Jt.previewUrl,lt+"GeoGebra_loading.png",lt+"applet_play.png"),xt()},zt=function(){Ie.onError&&Ie.onError(),yt("Error: Fetching material (id "+Ie.material_id+") failed.",Ie)},dn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Ft="/materials/"+Ie.material_id+"?scope=basic";Ze("https://"+dn+"/api/proxy.php?path="+encodeURIComponent(Ft),Ut,zt)};function Oe(xt){var Ut=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(zt){xt[zt]=!!xt[zt]}),Ut.forEach(function(zt){Ie[zt]===void 0&&xt[zt]!==void 0&&(Ie[zt]=xt[zt])}),Ie.showToolBarHelp===void 0&&(Ie.showToolBarHelp=Ie.showToolBar)}function Ze(xt,Ut,zt){var dn=new XMLHttpRequest;dn.open("GET",xt),dn.onload=function(){Ut(dn.responseText)},dn.onerror=zt,dn.send()}xn.isHTML5Installed=function(){return!0},xn.getLoadedAppletType=function(){return fe},xn.setPreviewImage=function(xt,Ut,zt){oe=xt,re=Ut,ae=zt},xn.removeExistingApplet=function(xt,Ut){var zt;typeof xt=="string"&&(xt=document.getElementById(xt)),fe=null;var dn=null;for(zt=0;zt<xt.childNodes.length;zt++){var Ft=xt.childNodes[zt],Dt=Ft.className;Dt==="applet_screenshot"?Ut?(Ft.style.display="block",fe="screenshot"):Ft.style.display="none":Dt!=="applet_scaler prerender"&&(xt.removeChild(Ft),dn=Dt&&Dt.indexOf("appletParameters")!=-1?Ft.id:null,zt--)}var Qt=Ie.id!==void 0?Ie.id:dn,Yt=window[Qt];Yt&&typeof Yt.getBase64=="function"&&(Yt.remove(),window[Qt]=null)},xn.refreshHitPoints=function(){if(ve(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var xt=xn.getAppletObject();return xt&&typeof xt.recalculateEnvironments=="function"?(xt.recalculateEnvironments(),!0):!1},xn.startAnimation=function(){var xt=xn.getAppletObject();return xt&&typeof xt.startAnimation=="function"?(xt.startAnimation(),!0):!1},xn.stopAnimation=function(){var xt=xn.getAppletObject();return xt&&typeof xt.stopAnimation=="function"?(xt.stopAnimation(),!0):!1},xn.getAppletObject=function(){var xt=Ie.id!==void 0?Ie.id:"ggbApplet";return window[xt]},xn.resize=function(){};var qe=function(xt,Ut,zt){var dn=document.createElement("param");dn.setAttribute("name",Ut),dn.setAttribute("value",zt),xt.appendChild(dn)},Xe=function(xt){return xt&&xt!=="false"},mt=function(xt,Ut,zt){ve(ue)<=4.2&&(zt=!0);var dn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ue||ggbHTML5LoadedCodebaseIsWebSimple&&!z)&&(dn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Ft=document.createElement("div");Ft.classList.add("appletParameters","notranslate");var Dt=Ut.width,Qt=Ut.height;if(Ut.disableAutoScale=Ut.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Ut.disableAutoScale,Ut.width!==void 0)if(ve(ue)<=4.4)Xe(Ut.showToolBar)&&(Ut.height-=7),Xe(Ut.showAlgebraInput)&&(Ut.height-=37),Ut.width<605&&Xe(Ut.showToolBar)&&(Ut.width=605,Dt=605);else{var Yt=100;(Xe(Ut.showToolBar)||Xe(Ut.showMenuBar))&&(Ut.hasOwnProperty("customToolBar")&&(Ut.customToolbar=Ut.customToolBar),Yt=Xe(Ut.showMenuBar)?245:155),Dt<Yt&&(Ut.width=Yt,Dt=Yt)}Ft.style.border="none",Ft.style.display="inline-block";for(var Jt in Ut)Ut.hasOwnProperty(Jt)&&Jt!=="appletOnLoad"&&Ft.setAttribute("data-param-"+Jt,Ut[Jt]);le&&Ft.setAttribute("data-param-fontscssurl",le),xn.resize=function(){GGBAppletUtils.responsiveResize(xt,Ut)},window.addEventListener("resize",function(vt){xn.resize()});var lt=typeof Ut.appletOnLoad=="function"?Ut.appletOnLoad:function(){};if(!zt&&Ut.width!==void 0){Ut.hasOwnProperty("showSplash")||Ft.setAttribute("data-param-showSplash","false");var Ue=xt.querySelector(".applet_scaler.prerender"),Be=Ue!==null;if(Be)var tt=Ue.querySelector(".ggb_preview");else{var tt=dt(Dt,Qt,Ut.borderColor,!1);Ue=document.createElement("div"),Ue.className="applet_scaler",Ue.style.position="relative",Ue.style.display="block",Ue.style.width=Dt+"px",Ue.style.height=Qt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ue,"66%"),ve(ue)>=5?(Ut.appletOnLoad=function(vt){var kt=xt.querySelector(".ggb_preview");kt&&kt.parentNode.removeChild(kt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Ue),window.GGBT_wsf_view&&$(window).trigger("resize"),lt(vt)},Be||Ue.appendChild(tt)):Ft.appendChild(tt),Ue.appendChild(Ft),Be||xt.appendChild(Ue),setTimeout(function(){xn.resize()},1)}else{var ht=document.createElement("div");ht.className="applet_scaler",ht.style.position="relative",ht.style.display="block",ht.appendChild(Ft),xt.appendChild(ht),Ut.appletOnLoad=function(vt){xn.resize(),lt(vt)}}function et(vt,kt){kt&&typeof kt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(vt,kt.appletOnLoad):renderGGBElement(vt),yt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",kt)}function Ve(vt,kt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:vt,params:kt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(hn){et(hn.article,hn.params)}),html5AppletsToProcess=null)},ve(ue)<5&&(vt.className+=" geogebraweb")):et(vt,kt)}if(dn){scriptLoadStarted=!0;for(var Re=0;Re<Ft.childNodes.length;Re++){var ze=Ft.childNodes[Re].tagName;ze==="TABLE"&&(Ft.removeChild(Ft.childNodes[Re]),Re--)}if(ggbHTML5LoadedScript!==null){var it=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');it!=null&&it.parentNode.removeChild(it)}var Ke=document.createElement("script"),We=function(){Ve(Ft,Ut)};Ke.src=de+ee,ggbHTML5LoadedCodebaseIsWebSimple=z,ggbHTML5LoadedCodebaseVersion=ue,ggbHTML5LoadedScript=Ke.src,yt("GeoGebra HTML5 codebase loaded: '"+de+"'.",Ut),!be&&(!xe||xe=="5.0")?(z?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),We()):de.requirejs?__webpack_require__.e(7963).then(function(){var vt=[__webpack_require__(87963)];We.apply(null,vt)}.bind(this)).catch(__webpack_require__.oe):(Ke.onload=We,xt.appendChild(Ke))}else Ve(Ft,Ut);Ut.height=Qt,Ut.width=Dt},pt=function(xt,Ut,zt){var dn=dt(Ut.width,Ut.height,Ut.borderColor,zt),Ft=document.createElement("div");Ft.style.position="relative",Ft.style.display="block",Ft.style.width=Ut.width+"px",Ft.style.height=Ut.height+"px",Ft.className="applet_screenshot applet_scaler"+(zt?" applet_screenshot_play":""),Ft.appendChild(dn);var Dt=GGBAppletUtils.getScale(Ut,xt,zt);zt?(xt.appendChild(_t()),window.GGBT_wsf_view||(xt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ft,"66%"),xt.appendChild(Ft),Dt!==1&&!isNaN(Dt)&&(GGBAppletUtils.scaleElement(Ft,Dt),Ft.style.width=Ut.width+"px",Ft.style.height=Ut.height+"px",Ft.parentNode.style.width=Ut.width*Dt+"px",Ft.parentNode.style.height=Ut.height*Dt+"px"),xn.resize=function(){Mt(xt,dn,Ft,zt)},window.addEventListener("resize",function(Qt){xn.resize()}),xn.resize()};function Mt(xt,Ut,zt,dn){if(xt.contains(Ut)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(xt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(xt)}var Ft=GGBAppletUtils.getScale(Ie,xt,dn);zt.parentNode!==null&&(!isNaN(Ft)&&Ft!==1?(GGBAppletUtils.scaleElement(zt,Ft),zt.parentNode.style.width=Ie.width*Ft+"px",zt.parentNode.style.height=Ie.height*Ft+"px"):(GGBAppletUtils.scaleElement(zt,1),zt.parentNode.style.width=Ie.width+"px",zt.parentNode.style.height=Ie.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(xt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}xn.onExitFullscreen=function(xt,Ut){Ut.appendChild(xt)};var at=function(xt,Ut,zt,dn){pt(xt,Ut,!0);for(var Ft=function(){var Yt=[];for(Qt=0;Qt<xt.childNodes.length;Qt++)Yt.push(xt.childNodes[Qt]);if(window.GGBT_wsf_view){var Jt=window.GGBT_wsf_view.renderFullScreen(xt,Ut.id),lt=document.getElementById("fullscreencontainer"),Ue=jQuery(xt).find(".fullscreencontent");Ue.length>0?(Jt.remove(),Ue.attr("id","fullscreencontent").show(),jQuery(lt).append(Ue),window.dispatchEvent(new Event("resize"))):mt(Jt,Ut,!1),window.GGBT_wsf_view.launchFullScreen(lt)}else fe=dn,mt(xt,Ut,!1);if(!window.GGBT_wsf_view)for(Qt=0;Qt<Yt.length;Qt++)xt.removeChild(Yt[Qt])},Dt=xt.getElementsByClassName("ggb_preview_play"),Qt=0;Qt<Dt.length;Qt++)Dt[Qt].addEventListener("click",Ft,!1),Dt[Qt].addEventListener("ontouchstart",Ft,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(xt),Ae()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},_t=function(){var xt=document.createElement("div");if(xt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Ut='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',zt=document.createElement("style");zt.styleSheet?zt.styleSheet.cssText=Ut:zt.appendChild(document.createTextNode(Ut)),document.getElementsByTagName("head")[0].appendChild(zt)}return xt},dt=function(xt,Ut,zt,dn){var Ft=document.createElement("div");Ft.className="ggb_preview",Ft.style.position="absolute",Ft.style.zIndex="90",Ft.style.width=xt-2+"px",Ft.style.height=Ut-2+"px",Ft.style.top="0px",Ft.style.left="0px",Ft.style.overflow="hidden",Ft.style.backgroundColor="white";var Dt="lightgrey";zt!==void 0&&(zt==="none"?Dt="transparent":Dt=zt),Ft.style.border="1px solid "+Dt;var Qt=document.createElement("img");if(Qt.style.position="relative",Qt.style.zIndex="1000",Qt.style.top="-1px",Qt.style.left="-1px",oe!==null&&Qt.setAttribute("src",oe),Qt.style.opacity=.7,re!==null){var Yt,Jt,lt;if(!dn){Yt=document.createElement("img"),Yt.style.position="absolute",Yt.style.zIndex="1001",Yt.style.opacity=1,Qt.style.opacity=.3,Jt=360,Jt>xt/4*3&&(Jt=xt/4*3),lt=Jt/5.8,Yt.setAttribute("src",re),Yt.setAttribute("width",Jt),Yt.setAttribute("height",lt);var Ue=(xt-Jt)/2,Be=(Ut-lt)/2;Yt.style.left=Ue+"px",Yt.style.top=Be+"px",Ft.appendChild(Yt)}}return Ft.appendChild(Qt),Ft},Rt=function(xt){return xt=xt.toLowerCase(),xt==="html5"||xt==="screenshot"?xt:"html5"},ut=["web","webSimple","web3d","tablet","tablet3d","phone"],rt=function(xt,Ut){if(ue=xt,Ut){ct(ue,!0);return}var zt=!Se;if(zt){var dn=ve(ue);!isNaN(dn)&&dn<4.4&&(zt=!1)}var Ft,Dt;window.location.protocol.substr(0,4)==="http"?Ft=window.location.protocol:Ft="http:";var Qt=ue.indexOf("//");Qt>0?Dt=ue:Qt===0?Dt=Ft+ue:Dt="https://www.geogebra.org/apps/5.2.814.0/";for(var Yt in ut)if(ue.slice(ut[Yt].length*-1)===ut[Yt]||ue.slice((ut[Yt].length+1)*-1)===ut[Yt]+"/"){ct(Dt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&zt&&!Le.is3D&&!Le.AV&&!Le.SV&&!Le.CV&&!Le.EV2&&!Le.CP&&!Le.PC&&!Le.DA&&!Le.FI&&!Le.PV&&!Xe(Ie.showToolBar)&&!Xe(Ie.showMenuBar)&&!Xe(Ie.showAlgebraInput)&&!Xe(Ie.enableRightClick)&&(!Ie.appName||Ie.appName=="classic")?Dt+="webSimple/":Dt+="web3d/",ct(Dt,!1)},ct=function(xt,Ut){if(xt.requirejs){de=xt;return}xt.slice(-1)!=="/"&&(xt+="/"),de=xt,Ut===null&&(Ut=xt.indexOf("http")===-1),ge=Ut,ee="web.nocache.js",z=!1;var zt=de.split("/");zt.length>1&&(!Ut&&zt[zt.length-2]==="webSimple"?(ee="webSimple.nocache.js",z=!0):ut.indexOf(zt[zt.length-2])>=0&&(ee=zt[zt.length-2]+".nocache.js")),zt=xt.split("/"),ue=zt[zt.length-3],ue.substr(0,4)==="test"?ue=ue.substr(4,1)+"."+ue.substr(5,1):(ue.substr(0,3)==="war"||ue.substr(0,4)==="beta")&&(ue="5.0");var dn=parseFloat(ue);dn!==NaN&&dn<5&&xt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+dn+" is deprecated. Using version latest instead."),rt("5.0",Ut))},yt=function(xt,Ut){window.console&&window.console.log&&(!Ut||typeof Ut.showLogging=="undefined"||Ut.showLogging&&Ut.showLogging!=="false")&&console.log(xt)};Ie.material_id!==void 0?De(wt):wt();function wt(){var xt=ln;xe!==null?xt=xe:parseFloat(xt)<5&&(xt="5.0"),rt(xt,!1),be!==null&&ct(be,ge),Ce=!0}return xn},GGBAppletUtils=function(){"use strict";function xn(){return window.GGBT_wsf_edit!==void 0}function ln(Ce,xe){xe!=1?(Ce.style.transformOrigin="0% 0% 0px",Ce.style.webkitTransformOrigin="0% 0% 0px",Ce.style.transform="scale("+xe+","+xe+")",Ce.style.webkitTransform="scale("+xe+","+xe+")",Ce.style.maxWidth="initial",Ce.querySelector(".ggb_preview")!==null&&(Ce.querySelector(".ggb_preview").style.maxWidth="initial"),Ce.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Ce.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Ce.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Ce.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Ce.style.transform="none",Ce.style.webkitTransform="none")}function Ie(Ce,xe,be,ye,we,pe){var de=null;if(pe!=null&&pe!="")for(var ge=Ce.parentNode;ge!=null;)if((" "+ge.className+" ").indexOf(" "+pe+" ")>-1){de=ge;break}else ge=ge.parentNode;var fe=0,ue=0,ee=0,z=0,oe=0,re=0,ae=0;if(de)fe=de.offsetWidth,ue=Math.max(ye?de.offsetWidth:0,de.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(fe=Math.min(window.innerWidth,document.documentElement.clientWidth),ue=Math.min(window.innerHeight,document.documentElement.clientHeight),ee=fe):(fe=window.innerWidth,ue=window.innerHeight,ee=window.innerWidth),Ce){var le=Ce.getBoundingClientRect();le.left>0&&le.left<=fe&&(we===void 0||!we)&&(document.dir==="rtl"?(oe=fe-le.width-le.left,re=ee<=480?10:30):(re=le.left,oe=ee<=480?10:30),z=re+oe)}if(Ce&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var me=Ce.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(z=40,ae=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(z=0,ae=40)}}return Ce&&((be===void 0||!be)&&xe>0&&xe+z<fe?fe=xe:fe-=z,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(be===void 0||!be)&&(ue-=ae)),{width:fe,height:ue}}function Le(Ce,xe,be,ye,we){if(Ce.isScreenshoGenerator)return 1;var pe=ye!==void 0&&ye,de=Ce.noScaleMargin!=null&&Ce.noScaleMargin,ge=function(me){return me&&me!=="false"},fe=ge(Ce.autoHeight),ue=Ie(xe,Ce.width,be,fe,pe&&window.GGBT_wsf_view||de,we),ee=parseInt(ue.width),z=Ce.width,oe=Ce.height;if(z===void 0){var re=xe.querySelector(".appletParameters");re&&(z=re.offsetWidth,oe=re.offsetHeight)}var ae=ee/z,le=pe?1:ue.height/oe;return be!==void 0&&!be&&(ae=Math.min(1,ae),le=Math.min(1,le)),Math.min(ae,le)}function Se(Ce,xe,be){var ye=1,we,pe=!1;if(Ce.hasOwnProperty("allowUpscale")&&(pe=Ce.allowUpscale),Ce.hasOwnProperty("scale")&&(ye=parseFloat(Ce.scale),(isNaN(ye)||ye===null||ye===0)&&(ye=1),ye>1&&(pe=!0)),xe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(pe=!0),!(Ce.hasOwnProperty("disableAutoScale")&&Ce.disableAutoScale))we=Le(Ce,xe,pe,be,Ce.scaleContainerClass);else return ye;return pe&&(!Ce.hasOwnProperty("scale")||ye===1)?we:Math.min(ye,we)}function je(Ce){var xe=Math.min(window.innerWidth,document.documentElement.clientWidth),be=Math.min(window.innerHeight,document.documentElement.clientHeight),ye=Ce.getBoundingClientRect(),we=(xe-ye.width)/2,pe=(be-ye.height)/2;pe<0&&(pe=0),Ce.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(we<40?Ce.style.left="40px":Ce.style.left=we+"px",Ce.style.top=pe+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(pe<40?Ce.style.top="40px":Ce.style.top=pe+"px",Ce.style.left=we+"px")}function Me(Ce,xe){var be=Ce.querySelector(".appletParameters");if(be){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(xe.id!==be.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Ce)}if(be.parentElement&&/fullscreen/.test(be.parentElement.className))return;var ye=Se(xe,Ce);xn()&&be.setAttribute("data-param-scale",ye);for(var we=null,pe=0;pe<Ce.childNodes.length;pe++)if(Ce.childNodes[pe].className!==void 0&&Ce.childNodes[pe].className.match(/^applet_scaler/)){we=Ce.childNodes[pe];break}if(we!==null&&we.querySelector(".noscale")!==null)return;var de=xe.id!==void 0?xe.id:"ggbApplet",ge=window[de];(ge==null||!ge.recalculateEnvironments)&&we!==null&&!we.className.match(/fullscreen/)&&(we.parentNode.style.transform="",!isNaN(ye)&&ye!==1?(we.parentNode.style.width=xe.width*ye+"px",we.parentNode.style.height=xe.height*ye+"px",ln(we,ye)):(ln(we,1),we.parentNode.style.width=xe.width+"px",we.parentNode.style.height=xe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&je(Ce),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(be).parents(".content-added-content"))}}return{responsiveResize:Me,isFlexibleWorksheetEditor:xn,positionCenter:je,getScale:Se,scaleElement:ln}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var xn=n.location.search;return xn.indexOf(J)!=-1||xn.indexOf(K)!=-1}function q(xn,ln){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(xn){var ln=s[L].bindings;s[L].bindings=function(){for(var Ie=ln?ln():{},Le=xn[webModule.__softPermutationId],Se=O;Se<Le.length;Se++){var je=Le[Se];Ie[je[O]]=je[P]}return Ie}};var t;function u(){return v(),t}function v(){if(!t){var xn=o.createElement(Q);if(xn.id=L,xn.style.cssText=R+S,xn.tabIndex=-1,o.body.appendChild(xn),t=xn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var ln=document.compatMode==U?V:W;t.write(ln+X),t.close()}}}function w(xn){function ln(Le){function Se(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var je=Se();if(je){Le();return}function Me(){if(!je){if(!Se())return;je=!0,Le(),o.removeEventListener&&o.removeEventListener(Z,Me,!1),Ce&&clearInterval(Ce)}}o.addEventListener&&o.addEventListener(Z,Me,!1);var Ce=setInterval(function(){Me()},$)}function Ie(Le){var Se=u(),je=Se.body,Me=Se.createElement(_);Me.language=ab,Me.crossOrigin=W,Me.src=Le,webModule.__errFn&&(Me.onerror=function(){webModule.__errFn(L,new Error(bb+Le))}),je.appendChild(Me)}ln(function(){Ie(xn)})}webModule.__startLoadingFragment=function(xn){return C(xn)},webModule.__installRunAsyncCode=function(xn){var ln=u(),Ie=ln.body,Le=ln.createElement(_);Le.language=ab,Le.text=xn,Ie.appendChild(Le),Ie.removeChild(Le)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(xn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(xn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(xn){var ln=c[xn];return ln==null?null:ln},r=d,webModule.__errFn=e}function B(){function xn(Ce){var xe=Ce.lastIndexOf(rb);xe==-1&&(xe=Ce.length);var be=Ce.indexOf(sb);be==-1&&(be=Ce.length);var ye=Ce.lastIndexOf(tb,Math.min(be,xe));return ye>=O?Ce.substring(O,ye+P):W}function ln(Ce){if(!Ce.match(/^\w+:\/\//)){var xe=o.createElement(ub);xe.src=Ce+vb,Ce=xn(xe.src)}return Ce}function Ie(){var Ce=__gwt_getMetaProperty(wb);return Ce!=null?Ce:W}function Le(){for(var Ce=o.getElementsByTagName(_),xe=O;xe<Ce.length;++xe)if(Ce[xe].src.indexOf(xb)!=-1)return xn(Ce[xe].src);return W}function Se(){var Ce=o.getElementsByTagName(yb);return Ce.length>O?Ce[Ce.length-P].href:W}function je(){var Ce=o.location;return Ce.href==Ce.protocol+zb+Ce.host+Ce.pathname+Ce.search+Ce.hash}var Me=Ie();return Me==W&&(Me=Le()),Me==W&&(Me=Se()),Me==W&&je()&&(Me=xn(o.location.href)),Me=ln(Me),Me}function C(xn){return xn.match(/^\//)||xn.match(/^[a-zA-Z]+:\/\//)?xn:webModule.__moduleBase+xn}function D(){var xn=[],ln=O,Ie=[],Le=[];function Se(Ce){var xe=Le[Ce](),be=Ie[Ce];if(xe in be)return xe;var ye=[];for(var we in be)ye[be[we]]=we;throw r&&r(Ce,ye,xe),null}if(__gwt_isKnownPropertyValue=function(Ce,xe){return xe in Ie[Ce]},webModule.__getPropMap=function(){var Ce={};for(var xe in Ie)Ie.hasOwnProperty(xe)&&(Ce[xe]=Se(xe));return Ce},webModule.__computePropValue=Se,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var je;try{je=Cb;var Me=je.indexOf(Db);Me!=-1&&(ln=parseInt(je.substring(Me+P),$),je=je.substring(O,Me))}catch(Ce){}return webModule.__softPermutationId=ln,C(je+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})()},46699:function(xn,ln,Ie){"use strict";Ie.d(ln,{Ax:function(){return Me},Ds:function(){return Ce},KI:function(){return be},SI:function(){return je},f1:function(){return Se}});var Le=Ie(346);function Se(ye){let we=!0;if(ye.length>0){for(let pe=0;pe<ye.length;pe++)if(ye[pe].compile_success==0||!ye[pe].compile_success){we=!1;break}}else we=!1;return we}function je(ye,we=""){let pe=[];for(let de=0;de<ye.length;de++){let ge=ye[de],fe=we?`${we}/${ge.name}`:`${ge.name}`;pe.push({title:ge.name,type:ge.type,isLeaf:ge.type!=="tree",key:fe})}return pe}function Me(ye,we,pe){for(let de=0;de<ye.length;de++){let ge=ye[de];if(ge.key===we){ge.children=pe;break}ge.children&&Me(ge.children,we,pe)}return ye}function Ce(ye,we,pe){let de;return function(){let ge=this,fe=arguments,ue=function(){de=null,pe||ye.apply(ge,fe)},ee=pe&&!de;clearTimeout(de),de=setTimeout(ue,we),ee&&ye.apply(ge,fe)}}const xe=!0,be=Le.Z.API_SERVER},9507:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return de}});var Le=Ie(59301),Se={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},je=Ie(92310),Me=Ie.n(je),Ce=Ie(29787),xe=Ie(2859),be=Ie(38986),ye=Ie(51257),we=(ge,fe,ue)=>new Promise((ee,z)=>{var oe=le=>{try{ae(ue.next(le))}catch(me){z(me)}},re=le=>{try{ae(ue.throw(le))}catch(me){z(me)}},ae=le=>le.done?ee(le.value):Promise.resolve(le.value).then(oe,re);ae((ue=ue.apply(ge,fe)).next())}),de=({data:ge,className:fe,fullWidth:ue,style:ee={},onClose:z,onOk:oe,showFullTools:re,noAssociationId:ae})=>{const le=(0,Le.useRef)(null),me=(0,Le.useRef)(null),ve=(0,Le.useRef)(null),Pe=(0,Le.useRef)(null),[Ae,De]=(0,Le.useState)(!1),[Oe,Ze]=(0,Le.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,Le.useEffect)(()=>(ve.current||(ve.current=document.createElement("style"),document.head.appendChild(ve.current)),ge!=null&&ge.visible?(document.body.setAttribute("data-custom","y-hidden"),ve.current.innerHTML=" html { overflow-y: hidden; }",ge!=null&&ge.src&&qe()):(document.body.removeAttribute("data-custom"),ve.current&&(document.head.removeChild(ve.current),ve.current=null)),()=>{document.body.removeAttribute("data-custom"),ve.current&&(document.head.removeChild(ve.current),ve.current=null)}),[ge==null?void 0:ge.visible]);const qe=()=>we(void 0,null,function*(){De(!0),Ze("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Mt=yield(0,ye.ZJ)(ge==null?void 0:ge.src);le.current.src="",le.current.src=Mt,le.current.onload=function(){pt()},De(!1),Ze("")}),Xe=Mt=>we(void 0,null,function*(){De(!0),Ze("\u6B63\u5728\u4FDD\u5B58\u4E2D");const at=yield(0,be.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ge.title,file:Mt.dataUrl}});at!=null&&at.id&&!ae?(yield(0,be.ZP)(`/api/attachments/${ge.id}/add_subitem.json`,{method:"post",body:{subitem_id:at==null?void 0:at.id,settings:JSON.stringify(Mt.state)}})).status===0&&oe():at!=null&&at.id&&oe(at),De(!1),Ze("")}),mt=()=>{const Mt=document.querySelector('a[href="https://markerjs.com/"]');Mt&&Mt.parentNode&&(Mt.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(_t=>{const dt=document.querySelector(_t.name);dt&&dt.setAttribute("title",_t.title)})},pt=()=>{me.current=new xe.hP(le.current),me.current.targetRoot=Pe.current,me.current.addEventListener("render",Xe),me.current.addEventListener("beforeclose",z),re&&(me.current.availableMarkerTypes=me.current.ALL_MARKER_TYPES,me.current.uiStyleSettings.redoButtonVisible=!0,me.current.uiStyleSettings.notesButtonVisible=!0,me.current.uiStyleSettings.zoomButtonVisible=!0,me.current.uiStyleSettings.zoomOutButtonVisible=!0,me.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=me.current.uiStyleSettings,me.current.show(),ge!=null&&ge.snapshotData&&me.current.restoreState(ge.snapshotData),setTimeout(()=>{window.scrollTo(0,0),mt()},300)};return Le.createElement(Le.Fragment,null,(ge==null?void 0:ge.visible)&&Le.createElement(Ce.Z,{spinning:Ae,tip:Oe,style:{position:"absolute",width:"100vw"}},Le.createElement("div",{ref:Pe,className:Me()(Se.imageDimensions,fe,ue?Se.fullWidth:""),style:ee},Le.createElement("img",{className:Se.img,ref:le}))))}},76562:function(xn,ln,Ie){"use strict";var Le=Ie(59301),Se=Ie(77019),je=Ie(5269),Me=Ie(20554),Ce=Ie(99571),xe=Ie(76902),be=Ie(99587),ye=Ie(48136),we=Ie(59301);const pe=(0,Le.forwardRef)(({callback:de,showSaveButton:ge,value:fe=""},ue)=>{const ee=(0,Le.useRef)(),z=[{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 "}]}]}],oe=[{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}`}]}]}],re=me=>{ee.current.setValue(ee.current.getValue()+" "+me.value+" ")},ae=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:we.createElement(Se.Z,{className:be.Z.lists,gutter:[10,10]},z.map((me,ve)=>we.createElement(je.Z,{flex:"110px",className:be.Z.item},we.createElement("div",null,we.createElement(xe.Z,{value:`$$${me.value}$$`}),me.name),we.createElement("div",{className:be.Z.children},me.children.map((Pe,Ae)=>we.createElement("div",{key:Ae},we.createElement("h1",null,Pe.name),we.createElement(Se.Z,{gutter:[10,10]},Pe.data.map((De,Oe)=>we.createElement(je.Z,{key:Oe,onClick:()=>re(De),className:be.Z.diamond},we.createElement(xe.Z,{value:"`$$"+De.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:we.createElement(Se.Z,{className:be.Z.lists,gutter:[10,10]},oe.map((me,ve)=>we.createElement(je.Z,{flex:"110px",className:be.Z.item},we.createElement("div",null,we.createElement(xe.Z,{value:"`$$"+me.value+"$$`"}),me.name),we.createElement("div",{className:be.Z.children},me.children.map((Pe,Ae)=>we.createElement("div",{key:Ae},Pe.name&&we.createElement("h1",null,Pe.name),we.createElement(Se.Z,{gutter:[10,10]},Pe.data.map((De,Oe)=>we.createElement(je.Z,{key:Oe,onClick:()=>re(De),className:be.Z.diamond},we.createElement(xe.Z,{value:"`$$"+De.value+"$$`"}))))))))))}],le=()=>{var me=document.createElement("div");me.innerHTML=ee.current.getValue();var ve=me.innerText;return de&&de(ve),ve};return(0,Le.useImperativeHandle)(ue,()=>({getData:le})),we.createElement("div",{className:be.Z.mathWrap},we.createElement(Me.default,{defaultActiveKey:"1",items:ae}),we.createElement("math-field",{locale:"zh_cn",className:be.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:ee,style:{width:800,marginTop:30,fontSize:18}},fe||""),ge&&we.createElement("div",{className:be.Z.button},we.createElement(Ce.ZP,{size:"large",onClick:le,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});ln.Z=pe},28426:function(xn,ln,Ie){"use strict";var Le=Ie(59301),Se=Ie(93314),je=Ie(99571),Me=Object.defineProperty,Ce=Object.defineProperties,xe=Object.getOwnPropertyDescriptors,be=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,pe=(ue,ee,z)=>ee in ue?Me(ue,ee,{enumerable:!0,configurable:!0,writable:!0,value:z}):ue[ee]=z,de=(ue,ee)=>{for(var z in ee||(ee={}))ye.call(ee,z)&&pe(ue,z,ee[z]);if(be)for(var z of be(ee))we.call(ee,z)&&pe(ue,z,ee[z]);return ue},ge=(ue,ee)=>Ce(ue,xe(ee));const fe=({img:ue,buttonProps:ee={},styles:z={},customText:oe,ButtonText:re,ButtonClick:ae,Buttonclass:le,ButtonTwo:me,imgStyles:ve,loading:Pe=!1,className:Ae=""})=>Le.createElement("section",{className:`tc animated fadeIn ${Ae}`,style:de({color:"#999",margin:"100px auto",visibility:Pe?"hidden":"visible"},z)},Le.createElement("img",{src:ue||Se,style:ge(de({},ve),{pointerEvents:"none",userSelect:"none"})}),Le.createElement("p",{className:"mt20 font14"},oe||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),re&&Le.createElement(je.ZP,de({className:le,onClick:ae},ee),re),me&&me);ln.Z=fe},45677:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return le}});var Le=Ie(59301),Se={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},je=Ie(99571),Me=Ie(70557),Ce=Ie(75975),xe=Ie(25399),be=Ie(51257),ye=Ie(81722),we=Ie(28426),pe=Ie(346),de=Ie(44203),ge=Ie(59301),fe=Object.defineProperty,ue=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,oe=(me,ve,Pe)=>ve in me?fe(me,ve,{enumerable:!0,configurable:!0,writable:!0,value:Pe}):me[ve]=Pe,re=(me,ve)=>{for(var Pe in ve||(ve={}))ee.call(ve,Pe)&&oe(me,Pe,ve[Pe]);if(ue)for(var Pe of ue(ve))z.call(ve,Pe)&&oe(me,Pe,ve[Pe]);return me},ae=(me,ve,Pe)=>new Promise((Ae,De)=>{var Oe=Xe=>{try{qe(Pe.next(Xe))}catch(mt){De(mt)}},Ze=Xe=>{try{qe(Pe.throw(Xe))}catch(mt){De(mt)}},qe=Xe=>Xe.done?Ae(Xe.value):Promise.resolve(Xe.value).then(Oe,Ze);qe((Pe=Pe.apply(me,ve)).next())}),le=({editOffice:me="view",data:ve,issaver:Pe,onSaver:Ae,theme:De,type:Oe,filename:Ze,monacoEditor:qe,className:Xe,style:mt,close:pt,onClose:Mt,hasMask:at,disabledDownload:_t,onImgDimensions:dt,showNodata:Rt,recordInfo:ut})=>{const[rt,ct]=(0,Le.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[yt,wt]=(0,Le.useState)(""),[xt,Ut]=(0,Le.useState)(),zt=window.ENV==="build"?"/react/build":"",dn=location.host.startsWith("localhost")?pe.Z.PROXY_SERVER:pe.Z.API_SERVER,Dt=10*(1024*1024),Qt=(0,Le.useRef)();ve!=null&&ve.startsWith("/api")&&Oe!=="txt"&&(ve=pe.Z.API_SERVER+ve);const Yt=tt=>tt.substring(tt.lastIndexOf("/")+1).split(".").pop();Ze&&qe&&(qe.filename=Ze),(0,Le.useEffect)(()=>{var tt,ht;const et=(ht=(tt=document.cookie)==null?void 0:tt.replace(/\s/g,""))==null?void 0:ht.split(";");et==null||et.map(Ve=>{let Re=Ve.split("=");Re[0]==="_educoder_session"&&wt(Re[1])})},[]),(0,Le.useEffect)(()=>{Oe==="office"&&(ve.indexOf("bigfilescdn.")>-1||ve.indexOf("bigfiles1")>-1?Ut({url:ve,fileType:Yt(ve),model:ve.indexOf("model=edit")?"edit":"view"}):lt())},[Oe,ve]);function Jt(tt){return ae(this,null,function*(){tt.data.type==="pdfdata"&&(Ae(tt.data.data),window.removeEventListener("message",Jt,!1)),console.log("mess---:",tt.data)})}const lt=()=>ae(void 0,null,function*(){console.log("data:",ve);let tt=ve;ve.startsWith("http")||(tt=location.origin+tt);let ht=new URL(tt).pathname.split("/").pop();const et=yield(0,ye.gJ)({attachment_id:ht});et.url=dn+et.url,Ut(et)}),Ue=()=>{if(ve.startsWith("http")||ve.startsWith("blob:")){Be();return}(0,be.Sv)(Ze||"educoder",ve,Ze)},Be=()=>{ut&&(0,de.fc)({id:ut==null?void 0:ut.id,watch_type:1,course_id:ut==null?void 0:ut.course_id}),(0,be.Nd)(Ze||"educoder",decodeURIComponent(ve))};return ge.createElement("div",{style:re({},mt||{}),className:`${at&&Se.bgBlack} ${Oe?Se.wrp:"hide"}`},pt&&ge.createElement("div",{className:Se.close,ref:Qt},!!dt&&ge.createElement(xe.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Qt.current},ge.createElement("span",{onClick:()=>{Mt(),dt()}},ge.createElement("i",{className:"icon-yulanpizhu"}))),!_t&&ge.createElement(xe.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Qt.current},ge.createElement("span",{onClick:Be},ge.createElement("i",{className:"icon-quxiaozhiding"}))),Pe&&ge.createElement(xe.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Qt.current},ge.createElement("span",{className:"",onClick:()=>{const tt=document.getElementById("pdfiframe");window.addEventListener("message",Jt,!1),setTimeout(()=>{tt.contentWindow.postMessage("getData","*")},300)}},ge.createElement("i",{className:"icon-baocun"}))),ge.createElement(xe.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Qt.current},ge.createElement("span",{className:"",onClick:()=>{Mt()}},ge.createElement("i",{className:"icon-guanbi1"})))),ge.createElement("div",{className:`${Se[Xe]} ${Xe} ${Se.monaco} ${Oe==="txt"?"show":"hide"}`},Oe==="txt"&&ge.createElement(ge.Fragment,null,ge.createElement(Ce.ZP,re({},qe)))),Oe==="audio"&&ge.createElement("audio",{src:`${(ve==null?void 0:ve.indexOf("http://"))>-1||(ve==null?void 0:ve.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${ve}`,autoPlay:!0}),Oe==="video"&&ge.createElement(ge.Fragment,null,(ve==null?void 0:ve.indexOf("http"))>-1?ge.createElement("video",{controls:!0,src:`${ve}`,autoPlay:!0}):ge.createElement("video",{controls:!0,src:`data:video/mp4;base64,${ve}`,autoPlay:!0})),Oe==="office"&&xt&&ge.createElement("iframe",{src:`${zt}/office.html?key=${xt.key}&url=${btoa(xt.url)}&callbackUrl=${dn+(xt.callbackUrl||"")}&fileType=${xt.fileType}&title=${xt.title||""}&model=${me}&officeServer=${pe.Z.ONLYOFFICE}&disabledDownload=${!!_t}`}),Oe==="html"&&ge.createElement("iframe",{src:ve+"&disposition=inline"}),Oe==="pdf"&&ge.createElement("iframe",{id:"pdfiframe",src:`${zt}/js/pdfview/index.html?filename=${Ze||"educoder.pdf"}&url=${encodeURIComponent(ve)}&disabledDownload=${!!_t}&model=${me}`}),Oe==="image"&&ge.createElement("img",{src:`${(ve==null?void 0:ve.indexOf("http://"))>-1||(ve==null?void 0:ve.indexOf("https://"))>-1?"":"data:image/png;base64,"}${ve}`}),(Oe==="other"||Oe==="download")&&ge.createElement(ge.Fragment,null,Rt?ge.createElement(we.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ge.createElement(je.ZP,{icon:ge.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Ue,disabled:_t},"\u4E0B\u8F7D")}):ge.createElement(je.ZP,{type:"primary",size:"middle",onClick:Ue,disabled:_t},ge.createElement(Me.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},76902:function(xn,ln,Ie){"use strict";Ie.d(ln,{z:function(){return De},Z:function(){return Oe}});var Le=Ie(59301),Se=Ie(8944),je=Ie(81428),Me=Ie(64018),Ce=Ie(81168),xe=Ie(346),be=Ie(51257),ye=Ie(15342),we=Ie(1012),pe=Ie(45677),de=Ie(59301),fe=({html:Ze})=>{const qe=(0,Le.useRef)(null),Xe=(0,Le.useRef)(null),mt=`.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,Le.useEffect)(()=>{const pt=qe.current.attachShadow({mode:"open"});Xe.current=document.createElement("div"),Xe.current.className="markdown-body",Xe.current.innerHTML=Ze,pt.appendChild(Xe.current);const Mt=document.createElement("style");return Mt.textContent=mt,pt.appendChild(Mt),()=>{pt.innerHTML=""}},[]),(0,Le.useEffect)(()=>{Xe.current&&(Xe.current.innerHTML=Ze)},[Ze]),de.createElement("div",{ref:qe})};function ue(Ze){const qe=["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"],Xe=new RegExp(`\\b(${qe.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Ze.replace(Xe,"").trim()}var ee=Object.defineProperty,z=Object.getOwnPropertySymbols,oe=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,ae=(Ze,qe,Xe)=>qe in Ze?ee(Ze,qe,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):Ze[qe]=Xe,le=(Ze,qe)=>{for(var Xe in qe||(qe={}))oe.call(qe,Xe)&&ae(Ze,Xe,qe[Xe]);if(z)for(var Xe of z(qe))re.call(qe,Xe)&&ae(Ze,Xe,qe[Xe]);return Ze};const me="@\u2581\u2581@",ve="@\u2581@",Pe=/<pre[^>]*>/g;function Ae(Ze){let qe=document.createElement("div");return qe.innerHTML=Ze,qe.childNodes.length===0?"":qe.childNodes[0].nodeValue}const De=(Ze,qe)=>{Ze=Ze||"";const Xe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,mt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,pt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Mt=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return qe?Ze.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Xe,(at,_t,dt,Rt,ut,rt,ct)=>{const yt=_t||Rt||rt,wt=dt||ut||ct||"?";return xe.Z.API_SERVER+"/api/attachments/"+yt+wt+"&t="+(0,be.Jn)(yt,Date.now())+(at.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Ze=Ze.replace(Mt,(at,_t,dt,Rt,ut,rt,ct)=>{const yt=_t||Rt||rt,wt=dt||ut||ct||"?";return xe.Z.API_SERVER+"/attachments/download/"+yt+wt+"&t="+(0,be.Jn)(yt,Date.now())+(at.indexOf(")")>-1?")":"&")}).replace(Xe,(at,_t,dt,Rt,ut,rt,ct)=>{const yt=_t||Rt||rt,wt=dt||ut||ct||"?";return xe.Z.API_SERVER+"/api/attachments/"+yt+wt+"&t="+(0,be.Jn)(yt,Date.now())+(at.indexOf(")")>-1?")":"&")}).replace(mt,(at,_t,dt,Rt,ut)=>{const rt=_t||Rt,ct=dt||ut||"";return'"'+xe.Z.API_SERVER+"/api/attachments/"+rt+ct+rt+ct+"&t="+(0,be.Jn)(rt,Date.now())}).replace(pt,(at,_t,dt,Rt,ut)=>{const rt=_t||Rt,ct=dt||ut||"";return"("+xe.Z.API_SERVER+"/files/uploads/"+rt+ct+rt+ct+"&t="+(0,be.Jn)(rt,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,`
|
|
|
`),Ze)};var Oe=({value:Ze="",className:qe,showTextOnly:Xe,showLines:mt,style:pt={},stylesPrev:Mt={},highlightKeywords:at,showProgramFill:_t,isProgramFill:dt,disabledFill:Rt=!1,programFillValue:ut,onFillChange:rt=wt=>{},onFillBlur:ct=()=>{},onFillFocus:yt=()=>{}})=>{let wt=ue(String(Ze||""));const[xt,Ut]=(0,Le.useState)(""),[zt,dn]=(0,Le.useState)("office"),[Ft,Dt]=(0,Le.useState)([]),Qt=(0,Le.useRef)("a"+(0,we.Z)()),Yt={},Jt=We=>/<style[\s\S]*?>/i.test(We||""),lt=(We,vt,kt)=>{const hn=document.createElement(We===ve?"input":"textarea");hn.style.width="100%",hn.style.height=We===ve?"40px":"151px",hn.rows=5,hn.spellcheck=!1,hn.name="edu-program-fill",hn.placeholder="\u8BF7\u8F93\u5165",hn.dataset.id=vt;const en=Object.keys(Yt).length;return Yt[en]=hn,`<span class="edu-program-fill-wrap ${We===ve?"":"show"}" style="width:${We===ve?"600px":"100%"}" title=${kt||""}><span>${hn.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Ue(We){return We=We.replace(/!\[.*?\]\(.*?\)/g,""),We=We.replace(/\[.*?\]\(.*?\)/g,""),We=We.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),We=We.replace(/<embed.*?>/g,""),We=We.replace(/<img.*?>/g,""),We=We.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),We=We.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),We=We.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),We=We.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),We}const Be=We=>!Xe&&Jt(wt)?We:We.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(vt,kt){let hn=kt.replace(/(\n|\r)/g,"").split("}"),en=[];return hn.map(Gt=>{Gt!=""&&en.push(`.${Qt.current} ${Gt}`)}),`<style>${en.join("}")}</style>`}),tt=(0,Le.useMemo)(()=>{try{const hn=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,en=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Gt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,gn=/\(\/attachments\/download\//g;wt=wt.replace(gn,"("+xe.Z.API_SERVER+"/attachments/download/").replace(hn,"("+xe.Z.API_SERVER+"/api/attachments/").replace(en,'"'+xe.Z.API_SERVER+"/api/attachments/").replace(Gt,'"'+xe.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(hn){}if(_t){let hn=-1;return wt=wt.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(en,Gt,gn){var bn;return++hn,lt(en,hn,(bn=ut==null?void 0:ut[hn])==null?void 0:bn.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Be(wt||"")}</pre>`}let We=Be(wt);We=(0,je.ZP)(We);const vt=(0,je.ez)();wt.match(/\[TOC\]/)&&(We=We.replace("<p>[TOC]</p>",(0,je.Qv)()),(0,je.Iy)()),We=We.replace(/(__special_katext_id_\d+__)/g,(hn,en)=>{const{type:Gt,expression:gn}=vt[en];return(0,ye.renderToString)(Ae(gn)||"",{displayMode:Gt==="block",throwOnError:!1,output:"html"})}),We=We.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,je.AL)();const kt=document.createElement("div");if(kt.innerHTML=We,Xe)return kt.innerText;if(at){const hn=at.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Re(kt,hn),kt.innerHTML}return setTimeout(()=>Ke(),500),kt.innerHTML},[wt,at]);(0,Le.useEffect)(()=>{ze.current&&ze.current.querySelectorAll(["input","textarea"]).forEach(vt=>{vt.oninput=ht,vt.onblur=et,vt.onfocus=Ve})},[Ft]),(0,Le.useEffect)(()=>{var We,vt,kt,hn,en;if(ut!=null&&ut.length)try{const Gt=ze.current.querySelectorAll(".edu-program-fill-score"),gn=ze.current.querySelectorAll('[name="edu-program-fill"]');for(const[bn,yn]of gn.entries())yn.value=((We=ut==null?void 0:ut[bn])==null?void 0:We.value)||"",((vt=ut==null?void 0:ut[bn])==null?void 0:vt.type)==="warning"?yn.className="program-fill-warning":((kt=ut==null?void 0:ut[bn])==null?void 0:kt.type)==="success"?yn.className="program-fill-success":yn.className="";for(const[bn,yn]of Gt.entries())yn.innerHTML=(hn=ut==null?void 0:ut[bn])!=null&&hn.score?`${(en=ut==null?void 0:ut[bn])==null?void 0:en.score}\u5206`:"";Dt(ut)}catch(Gt){console.log(Gt,"error")}},[ut]);const ht=We=>{Ft[We.target.dataset.id]=Ft[We.target.dataset.id]||{},Ft[We.target.dataset.id].value=We.target.value,Dt([...Ft]),rt(Ft,We.target.dataset.id)},et=We=>{Ft[We.target.dataset.id]=Ft[We.target.dataset.id]||{},Ft[We.target.dataset.id].value=We.target.value,Dt([...Ft]),ct(Ft,We.target.dataset.id)},Ve=We=>{Ft[We.target.dataset.id]=Ft[We.target.dataset.id]||{},Ft[We.target.dataset.id].value=We.target.value,Dt([...Ft]),yt(Ft,We.target.dataset.id)};function Re(We,vt){return We.childNodes.forEach(kt=>{var hn;if(kt.childNodes.length>0)Re(kt,vt);else if(kt.nodeName!=="IMG")if(kt.innerHTML)kt.innerHTML=(hn=kt.innerHTML)==null?void 0:hn.replace(new RegExp(vt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const en=document.createElement("span");en.innerHTML=kt.textContent.replace(new RegExp(vt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),kt.replaceWith(en)}})}const ze=(0,Le.useRef)();je.jb.WebkitLineClamp=mt,mt&&(pt=le(le({},pt),je.jb));function it(We){let vt=We.target;if(vt.tagName.toUpperCase()==="A"){let kt=vt.getAttribute("href");if(kt.indexOf("office")>-1)We.preventDefault(),Ut(kt),dn("office");else if(kt.indexOf("application/pdf")>-1)We.preventDefault(),Ut(kt),dn("pdf");else if(kt.indexOf("text/html")>-1)We.preventDefault(),Ut(kt),dn("html");else if(kt.startsWith("#")){We.preventDefault();let hn=document.getElementById(kt.replace("#",""));hn&&hn.scrollIntoView(!0)}}}const Ke=()=>{var We;const vt=(We=ze.current)==null?void 0:We.querySelectorAll("video");vt==null||vt.forEach(kt=>{if(kt.oncontextmenu=()=>!1,kt.src.indexOf(".m3u8")>-1&&!kt.canPlayType("application/vnd.apple.mpegurl")){if(Ce.ZP.isSupported()){var hn=new Ce.ZP;hn.loadSource(kt.src),hn.attachMedia(kt)}}})};return(0,Le.useEffect)(()=>{if(ze.current&&tt&&tt.match(Pe)&&window.PR.prettyPrint(),ze.current)return ze.current.addEventListener("click",it),()=>{var We;(We=ze.current)==null||We.removeEventListener("click",it),(0,je.AL)(),(0,je.Iy)()}},[tt,ze.current,it]),(0,Le.useEffect)(()=>{var We;const vt=kt=>{kt.preventDefault(),kt.clipboardData.setData("text",window.getSelection().toString())};return(We=ze.current)==null||We.addEventListener("copy",vt),()=>{var kt;(kt=ze.current)==null||kt.removeEventListener("copy",vt)}},[ze.current]),Le.createElement(Le.Fragment,null,Xe&&Le.createElement("div",{ref:ze},tt),!Xe&&!Jt(tt)&&Le.createElement("div",{ref:ze,style:le({},pt),className:`${qe||""} ${Rt?"disabled-fill":""} markdown-body ${Qt.current}`,dangerouslySetInnerHTML:{__html:tt}}),!Xe&&Jt(tt)&&Le.createElement(fe,{html:tt}),Le.createElement(pe.Z,{close:!0,data:xt,type:xt!=null&&xt.length?zt:"",style:le({},Mt),onClose:()=>Ut("")}))}},86074:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return Me}});var Le=Ie(25690),Se={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},je=Ie(59301),Me=({message:Ce,className:xe,children:be,style:ye={}})=>je.createElement("div",{className:`custom-spinner ${Se.idsRingWrapper} ${xe}`},je.createElement("div",{className:Se.ldsRing},je.createElement("div",null),je.createElement("div",null),je.createElement("div",null),je.createElement("div",null)),Ce?je.createElement("p",{style:ye},Ce):null,be,je.createElement(Le.Outlet,null))},8343:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return Me}});var Le=Ie(59301),Se=Ie(49535),je=Ie(59301),Me=({defaultX:Ce="40%",leftChild:xe,rightChild:be,className:ye,hideResize:we=!1})=>{const[pe,de]=(0,Le.useState)(Ce),ge=(0,Le.useRef)();function fe(){ge.current=!0}(0,Le.useEffect)(()=>{function z(re){ge.current&&(Se.Z.publish("resize-move-bar",re),de(re.pageX))}function oe(){ge.current=!1}return window.addEventListener("mousemove",z),window.addEventListener("mouseup",oe),()=>{window.removeEventListener("mousemove",z),window.removeEventListener("mouseup",oe)}},[]);const ue=typeof pe=="number"&&pe!==.01?`${pe}px`:Ce,ee=`calc(100% - ${we?"0px":"4px"} - ${ue})`;return je.createElement("div",{className:`split-panel-container ${ye}`},je.createElement("section",{style:{width:ue,display:pe===.01?"none":""}},xe),je.createElement("section",{className:"resize-x-bar",onMouseDown:fe},je.createElement("a",{className:"btn-resize"},je.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},je.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),je.createElement("section",{style:{width:ee}},be))}},94268:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return xe}});var Le=Ie(59301),Se={flex_box_center:"flex_box_center___Gc4dd",flex_space_between:"flex_space_between___K2f1v",flex_box_vertical_center:"flex_box_vertical_center___pupRp",flex_box_center_end:"flex_box_center_end___UDLRC",flex_box_column:"flex_box_column___a5uDo",result:"result___gu5zt",title:"title___xrnx2",left:"left___IAxp9",leftNode:"leftNode___HL8fG",right:"right___ZXYmw",rightNode:"rightNode___jYL5_"},je=Ie(92310),Me=Ie.n(je),xe=({className:be,style:ye={},leftNode:we,leftTitle:pe="\u81EA\u6D4B\u8F93\u5165",rightNode:de,rightTitle:ge="\u8FD0\u884C\u7ED3\u679C"})=>Le.createElement("div",{className:Me()(Se.result,be),style:ye},Le.createElement("div",{className:Se.left},Le.createElement("div",{className:Se.title},Le.createElement("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),Le.createElement("span",null,pe)),Le.createElement("div",{className:Se.leftNode},we)),Le.createElement("div",{className:Se.right},Le.createElement("div",{className:Se.title},Le.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),Le.createElement("span",null,ge)),Le.createElement("div",{className:Se.rightNode},de)))},96680:function(xn,ln,Ie){"use strict";var Le=Ie(59301);const Se=Me=>String(Me).length===1?`0${Me}`:Me,je=({className:Me="",onChange:Ce,defaultValue:xe=0})=>{const[be,ye]=(0,Le.useState)(xe);(0,Le.useEffect)(()=>{const ge=setTimeout(()=>{ye(be+1e3)},1e3);return Ce(be+1e3),()=>{clearInterval(ge)}},[be]);const we=parseInt(be/(60*6e4))||"00",pe=parseInt(be%(60*6e4)/6e4)||"00",de=parseInt(be%6e4/1e3)||"00";return Le.createElement("div",{className:Me},Se(we),":",Se(pe),":",Se(de))};ln.Z=je},3736:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return ee}});var Le=Ie(59301),Se=Ie(6767),je=Ie(75727),Me=Ie(30647),Ce=Ie(81168),xe=Ie(48790),be=Ie(56102),ye=Ie(84989),we={watermark:"watermark___hNYlv",videovideo:"videovideo___ovOkV",animate__loop:"animate__loop___mvL6s",upDown:"upDown___SlgHv",container:"container___g1WYG","video-container":"video-container___XPkWR","video-controls":"video-controls___to0Zq",hide:"hide___NA3DV","video-progress":"video-progress___gqHsd",seek:"seek___iZHBm","seek-tooltip":"seek-tooltip___uWyXx","bottom-controls":"bottom-controls___uoIBm","left-controls":"left-controls___mBEx4","right-controls":"right-controls___e9L6r",rateOverlay:"rateOverlay___HHBWe",controlText:"controlText___M_BWR","volume-controls":"volume-controls___fa3mE","fullscreen-button":"fullscreen-button___ur0es","fullscreen-button1":"fullscreen-button1___rfaXm","pip-button":"pip-button___GFO8W","playback-animation":"playback-animation___ndURq",volume:"volume___OTmpP",hidden:"hidden___o7GkT"},pe=(z,oe,re)=>new Promise((ae,le)=>{var me=Ae=>{try{Pe(re.next(Ae))}catch(De){le(De)}},ve=Ae=>{try{Pe(re.throw(Ae))}catch(De){le(De)}},Pe=Ae=>Ae.done?ae(Ae.value):Promise.resolve(Ae.value).then(me,ve);Pe((re=re.apply(z,oe)).next())});function de(z){if(isNaN(z))return{minutes:"00",seconds:"00"};const oe=new Date(z*1e3).toISOString().substr(11,8);return{hour:oe.substr(0,2),minutes:oe.substr(3,2),seconds:oe.substr(6,2)}}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2}});function ge(z,oe){return z-oe}function fe(z){z.sort(ge);let oe=0;for(let re=0;re<z.length-1;re++){let ae=Math.abs(z[re+1]-z[re]);ae<21&&(oe+=ae)}return oe}const ue=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;var ee=(0,Le.forwardRef)(({allow_skip:z,src:oe,toLog:re,videoId:ae,logWatchHistory:le,courseId:me=null,startTime:ve,handlePause:Pe=()=>{},handlePlay:Ae=()=>{},handlePlayEnded:De=()=>{},autoPlay:Oe=!1,onPlayEnded:Ze=()=>{},isShowWaterMark:qe=!0},Xe)=>{var mt;oe=oe==null?void 0:oe.replace("http://","https://");const Mt=((mt=oe==null?void 0:oe.split("."))==null?void 0:mt.pop())==="flv",at=(0,Le.useRef)(),_t=(0,Le.useRef)(),dt=(0,Le.useRef)(),Rt=(0,Le.useRef)(),ut=(0,Le.useRef)(),rt=(0,Le.useRef)(),ct=(0,Le.useRef)(),yt=(0,Le.useRef)(),wt=(0,Le.useRef)(),xt=(0,Le.useRef)(),Ut=(0,Le.useRef)(),zt=(0,Le.useRef)(),dn=(0,Le.useRef)(),Ft=(0,Le.useRef)(),Dt=navigator.userAgent.toLowerCase().match(ue),Qt=Dt?Dt[0]:"pc",Yt=(0,Le.useRef)(!1),Jt=(0,xe.eY)();let lt=0,Ue=0,Be=0,tt=null,ht=!1,et=20,Ve=1,Re=!1,ze=!1,it=[];(0,Le.useImperativeHandle)(Xe,()=>({getLastUpdatedTime:()=>at.current.currentTime,getDuration:()=>at.current.duration})),Se.ZP.config({maxCount:1,getContainer:()=>dt.current});const Ke=(0,Le.useCallback)((gn,bn=!1)=>{let yn={point:at.current.currentTime};tt?(yn.log_id=tt,yn.watch_duration=fe(it),yn.total_duration=Ue):(me?(yn.video_id=parseInt(ae,10),yn.course_id=me):yn.video_id=ae,yn.duration=lt,yn.device=Qt),bn&&(yn.ed="1");function un(){return pe(this,null,function*(){Re=!0,tt=yield le==null?void 0:le(yn),Re=!1,gn&&gn()})}un()},[ae,me]);(0,Le.useEffect)(()=>{at.current&&(Rt.current.style.display="none",ut.current.style.display="block"),Se.ZP.destroy();let gn=null;return Me.Z.isSupported&&Mt&&oe&&(oe==null?void 0:oe.indexOf(".m3u8"))<0?(gn=Me.Z.createPlayer({type:"flv",volume:.8,cors:!0,url:oe,muted:!1}),at.current&&(gn.attachMediaElement(at.current),gn.load())):at.current.setAttribute("src",oe),vt(),()=>{gn&&(gn.unload(),gn.pause(),gn.destroy(),gn=null)}},[at,Mt,oe]);function We(){at.current.paused?(Rt.current.style.display="none",ut.current.style.display="block"):(Rt.current.style.display="block",ut.current.style.display="none")}function vt(){Ut.current.style.display="none",dn.current.style.display="none",zt.current.style.display="none",at.current.muted||at.current.volume===0?Ut.current.style.display="block":at.current.volume>0&&at.current.volume<=.5?dn.current.style.display="block":zt.current.style.display="block"}(0,Le.useEffect)(()=>{const gn=document.getElementById("play"),bn=document.querySelectorAll(".playback-icons use");function yn(){Ae(),ve&&!Yt.current&&(at.current.currentTime=ve),Yt.current=!0,it.push(at.current.currentTime),ht||(ht=!0,re&&Ke())}function un(){return pe(this,null,function*(){We(),it.push(at.current.currentTime),re&&Ke(()=>{tt=null,Be=0,ht=!1,Re=!1,ze=!1,it=[],Ue=0,Ve=1},!0),Ze()})}function Jn(){rt.current.value=Math.round(at.current.currentTime),ct.current.value=Math.round(at.current.currentTime)}function mn(){const Ni=de(Math.round(at.current.currentTime));wt.current.innerText=`${Ni.hour>0?Ni.hour+":":""}${Ni.minutes}:${Ni.seconds}`,wt.current.setAttribute("datetime",`${Ni.hour>0?" "+Ni.hour+" ":""}${Ni.minutes}m ${Ni.seconds}s`)}function Yn(){var Ni,Ti,cr,$e,Li,ti,Oi;const pr=Math.round((Ni=at.current)==null?void 0:Ni.duration);(cr=(Ti=rt.current)==null?void 0:Ti.setAttribute)==null||cr.call(Ti,"max",pr),(Li=($e=ct.current)==null?void 0:$e.setAttribute)==null||Li.call($e,"max",pr);const dr=de(pr);yt.current&&(yt.current.innerText=`${dr.hour>0?dr.hour+":":""}${dr.minutes}:${dr.seconds}`,(Oi=(ti=yt.current).setAttribute)==null||Oi.call(ti,"datetime",`${dr.hour>0?" "+dr.hour+" ":""}${dr.minutes}m ${dr.seconds}s`))}function ri(){try{const Ni=Math.round(at.current.duration);rt.current.setAttribute("max",Ni),ct.current.setAttribute("max",Ni);const Ti=de(Ni);yt.current.innerText=`${Ti.hour>0?Ti.hour+":":""}${Ti.minutes}:${Ti.seconds}`,yt.current.setAttribute("datetime",`${Ti.hour>0?" "+Ti.hour+" ":""}${Ti.minutes}m ${Ti.seconds}s`),Jn(),mn();const{width:cr,height:$e,x:Li,y:ti}=_t.current.getBoundingClientRect();if(Li<0||ti<0,!ze){let Oi=at.current.currentTime,pr=Oi-Be;Math.abs(pr)<10?(Ue+=Math.abs(pr),Be=Oi,Re||Ue-Ve*et>=0&&(Ve++,it.push(Be),re&&Ke())):(Be=Oi,re&&Ke())}}catch(Ni){console.log("videoplaying:",Ni)}}function bi(){ze=!0}function jn(){at.current.playing&&it.push(at.current.currentTime,Be),Be=at.current.currentTime,ze=!1}function ki(){lt=at.current.duration,lt<=20&&(et=lt/3),at.current.addEventListener("play",yn)}function Hi(Ni){Ni.preventDefault(),(0,ye.vp)()?(at.current.style.width="100%",at.current.style.height="100%"):at.current.style.cssText=""}function Fi(){Pe()}function rr(Ni){if(!z){Se.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");return}const Ti=Ni.target.dataset.seek?Ni.target.dataset.seek:Ni.target.value;at.current.currentTime=Ti,ct.current.value=Ti,rt.current.value=Ti}function Cr(Ni){const Ti=Math.round(Ni.offsetX/Ni.target.clientWidth*parseInt(Ni.target.getAttribute("max"),10));rt.current.setAttribute("data-seek",Ti);const cr=de(Ti);xt.current.textContent=`${cr.hour>0?cr.hour+":":""}${cr.minutes}:${cr.seconds}`;const $e=at.current.getBoundingClientRect();xt.current.style.left=`${Ni.pageX-$e.left}px`}function gr(Ni){switch(Ni.code){case"Space":Ni.preventDefault(),en();break;case"ArrowRight":if(Ni.preventDefault(),!z){Se.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(at.current.currentTime>=at.current.duration)break;at.current.currentTime=parseInt(at.current.currentTime)+5,Jn();break;case"ArrowLeft":if(Ni.preventDefault(),!z){Se.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(at.current.currentTime===0)break;at.current.currentTime=parseInt(at.current.currentTime)-5,Jn();break;case"ArrowUp":Ni.preventDefault(),at.current.volume<1&&(at.current.volume=(parseInt(at.current.volume*10)+1)/10);break;case"ArrowDown":Ni.preventDefault(),at.current.volume>0&&(at.current.volume=(parseInt(at.current.volume*10)-1)/10);break}}return dt.current.addEventListener((0,ye.gH)(),Hi),at.current.addEventListener("canplay",ki),at.current.addEventListener("ended",un),at.current.addEventListener("seeking",bi),at.current.addEventListener("seeked",jn),at.current.addEventListener("loadedmetadata",Yn),rt.current.addEventListener("mousemove",Cr),rt.current.addEventListener("input",rr),at.current.addEventListener("timeupdate",ri),at.current.addEventListener("pause",Fi),at.current.addEventListener("volumechange",vt),document.addEventListener("keydown",gr),()=>{var Ni,Ti,cr,$e,Li,ti,Oi,pr,dr,Qi,So,$t;(Ni=at.current)==null||Ni.removeEventListener("canplay",ki),(Ti=at.current)==null||Ti.removeEventListener("play",yn),(cr=at.current)==null||cr.removeEventListener("ended",un),($e=at.current)==null||$e.removeEventListener("seeking",bi),(Li=at.current)==null||Li.removeEventListener("seeked",jn),(ti=rt.current)==null||ti.removeEventListener("mousemove",Cr),(Oi=rt.current)==null||Oi.removeEventListener("input",rr),(pr=at.current)==null||pr.removeEventListener("timeupdate",ri),(dr=at.current)==null||dr.removeEventListener("pause",Fi),(Qi=at.current)==null||Qi.removeEventListener("loadedmetadata",Yn),(So=at.current)==null||So.removeEventListener("volumechange",vt),document.removeEventListener("keydown",gr),($t=at.current)!=null&&$t.playing&&(it.push(Be,at.current.currentTime),re&&Ke())}},[at,oe]),(0,Le.useEffect)(()=>{if(at.current.onended=()=>{De(at)},at.current.oncontextmenu=()=>!1,(oe==null?void 0:oe.indexOf(".m3u8"))>-1){if(at.current.canPlayType("application/vnd.apple.mpegurl"))at.current.src=oe;else if(Ce.ZP.isSupported()){var gn=new Ce.ZP;gn.loadSource(oe),gn.attachMedia(at.current)}}},[oe]);const[kt,hn]=(0,Le.useState)(1),en=()=>{at.current.paused||at.current.ended?at.current.play():at.current.pause(),We()};function Gt(){at.current.muted=!at.current.muted,at.current.muted?(Ft.current.setAttribute("data-volume",volume.value),Ft.current.value=0):Ft.current.value=Ft.current.dataset.volume}return Le.createElement("div",{style:{position:"relative"},ref:dt},Le.createElement("div",{ref:_t,className:`${we.watermark} animated_alternate animate__animated_10s animate__infinite animate__stepstart ${we.animate__loop}`},qe&&Jt?Jt.login:" "),Le.createElement("div",{className:we.container},Le.createElement("div",{className:we["video-container"],id:"video-container"},Le.createElement("div",{className:we["playback-animation"],id:"playback-animation"},Le.createElement("svg",{className:we["playback-icons"]},Le.createElement("use",{className:"hidden",href:"#play-icon"}),Le.createElement("use",{href:"#pause"}))),Le.createElement("video",{className:we.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:at,autoPlay:Oe}),Le.createElement("div",{className:`${we["video-controls"]} `,id:"video-controls"},Le.createElement("div",{className:we["bottom-controls"]},Le.createElement("div",{className:we["left-controls"]},Le.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:en},Le.createElement("svg",{className:we["playback-icons"]},Le.createElement("use",{ref:ut,href:"#play-icon"}),Le.createElement("use",{ref:Rt,style:{display:"none"},href:"#pause"}))),Le.createElement("div",{className:we.time},Le.createElement("time",{id:"time-elapsed",ref:wt},"00:00"),Le.createElement("span",null," / "),Le.createElement("time",{id:"duration",ref:yt},"00:00"))),Le.createElement("div",{className:we["right-controls"]},z&&Le.createElement(je.Z,{placement:"top",overlayClassName:we.rateOverlay,getPopupContainer:gn=>gn.parentNode,menu:{items:[{key:"1",label:Le.createElement("span",{onClick:()=>{hn(1),at.current.playbackRate=1}},"1.0x")},{key:"2",label:Le.createElement("span",{onClick:()=>{hn(1.5),at.current.playbackRate=1.5}},"1.5x")},{key:"3",label:Le.createElement("span",{onClick:()=>{hn(2),at.current.playbackRate=2}},"2.0x")}]}},Le.createElement("div",{className:`${we.controlText} mr5`},"\u500D\u901F")),Le.createElement(be.CopyToClipboard,{text:oe,onCopy:()=>Se.ZP.success("\u590D\u5236\u6210\u529F")},Le.createElement("button",{"data-title":"\u590D\u5236\u94FE\u63A5"},Le.createElement("i",{className:"icon-lianjie2 iconfont",style:{fontSize:"12px",color:"white"}}))),Le.createElement("div",{className:we["volume-controls"]},Le.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:we["volume-button"],id:"volume-button",onClick:Gt},Le.createElement("i",{ref:Ut,className:"icon-a-bianzu8 iconfont",style:{fontSize:"14px",color:"white"}}),Le.createElement("i",{ref:dn,className:"icon-shengyinkaibeifen iconfont",style:{fontSize:"14px",color:"white"}}),Le.createElement("i",{ref:zt,className:"icon-shengyinkai iconfont",style:{fontSize:"14px",color:"white"}})),Le.createElement("input",{className:we.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:Ft,style:{display:"none"},onClick:vt})),Le.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:we["fullscreen-button"],onClick:()=>{(0,ye.vp)()?(0,ye.BU)():(0,ye.Dj)(dt.current)}},Le.createElement("i",{className:"icon-fangda1 iconfont",style:{fontSize:"12px",color:"white"}})))),Le.createElement("div",{className:we["video-progress"]},Le.createElement("progress",{ref:ct,value:"0",min:"0"}),Le.createElement("input",{className:we.seek,ref:rt,value:"0",min:"0",type:"range",step:"1"}),Le.createElement("div",{className:we["seek-tooltip"],ref:xt,id:"seek-tooltip"},"00:00"))))),Le.createElement("svg",{style:{display:"none"}},Le.createElement("defs",null,Le.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},Le.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),Le.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},Le.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),Le.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},Le.createElement("path",{d:"M14.016 3.234q3.047 0.656 5.016 3.117t1.969 5.648-1.969 5.648-5.016 3.117v-2.063q2.203-0.656 3.586-2.484t1.383-4.219-1.383-4.219-3.586-2.484v-2.063zM16.5 12q0 2.813-2.484 4.031v-8.063q1.031 0.516 1.758 1.688t0.727 2.344zM3 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6z"})),Le.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},Le.createElement("path",{d:"M5.016 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6zM18.516 12q0 2.766-2.531 4.031v-8.063q1.031 0.516 1.781 1.711t0.75 2.32z"})),Le.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},Le.createElement("path",{d:"M12 3.984v4.219l-2.109-2.109zM4.266 3l16.734 16.734-1.266 1.266-2.063-2.063q-1.547 1.313-3.656 1.828v-2.063q1.172-0.328 2.25-1.172l-4.266-4.266v6.75l-5.016-5.016h-3.984v-6h4.734l-4.734-4.734zM18.984 12q0-2.391-1.383-4.219t-3.586-2.484v-2.063q3.047 0.656 5.016 3.117t1.969 5.648q0 2.203-1.031 4.172l-1.5-1.547q0.516-1.266 0.516-2.625zM16.5 12q0 0.422-0.047 0.609l-2.438-2.438v-2.203q1.031 0.516 1.758 1.688t0.727 2.344z"})),Le.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},Le.createElement("path",{d:"M14.016 5.016h4.969v4.969h-1.969v-3h-3v-1.969zM17.016 17.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 9.984v-4.969h4.969v1.969h-3v3h-1.969zM6.984 14.016v3h3v1.969h-4.969v-4.969h1.969z"})),Le.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},Le.createElement("path",{d:"M15.984 8.016h3v1.969h-4.969v-4.969h1.969v3zM14.016 18.984v-4.969h4.969v1.969h-3v3h-1.969zM8.016 8.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 15.984v-1.969h4.969v4.969h-1.969v-3h-3z"})),Le.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},Le.createElement("path",{d:"M21 19.031v-14.063h-18v14.063h18zM23.016 18.984q0 0.797-0.609 1.406t-1.406 0.609h-18q-0.797 0-1.406-0.609t-0.609-1.406v-14.016q0-0.797 0.609-1.383t1.406-0.586h18q0.797 0 1.406 0.586t0.609 1.383v14.016zM18.984 11.016v6h-7.969v-6h7.969z"})))))})},87320:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return Me}});var Le=Ie(59301),Se=Ie(49535),je=Ie(90083),Me=()=>{const[Ce,xe]=(0,Le.useState)(""),[be,ye]=(0,Le.useState)(0);let[we,pe]=(0,Le.useState)(),[de,ge]=(0,Le.useState)();const[fe,ue]=(0,Le.useState)(!1),ee=(0,Le.useRef)("");(0,Le.useEffect)(()=>Se.Z.subscribe("preview-image",Oe=>{xe(Oe),console.log(Pe.current),document.body.style.overflow="hidden"}),[]),(0,Le.useEffect)(()=>(document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z)}),[]),(0,Le.useEffect)(()=>{ee.current=Ce},[Ce]);function z(De){De.keyCode==27&&ee.current&&oe()}function oe(){document.body.style.overflow="auto",pe(void 0),ge(void 0),ye(0),xe("")}function re(){ye(be+90)}function ae(){we=Pe.current.width*1.1,de=Pe.current.height*1.1,ge(de),pe(we)}function le(){we=Pe.current.width/1.1,de=Pe.current.height/1.1,ge(de),pe(we)}const me=(0,Le.useRef)(),ve=(0,Le.useRef)(),Pe=(0,Le.useRef)(),Ae=De=>{(De.nativeEvent.target===me.current||De.nativeEvent.target===ve.current)&&oe()};return Le.createElement(Le.Fragment,null,Ce?Le.createElement("div",null,Le.createElement("div",{className:"preview-wrp-group",ref:ve},Le.createElement(je.Z,{className:"image-preview",src:Ce,style:{display:"none"},preview:{visible:!0,src:Ce,onVisibleChange:De=>{xe("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},69720:function(xn,ln,Ie){"use strict";Ie.d(ln,{h:function(){return me}});var Le=Ie(59301),Se=Ie(82326),je=Ie(28284),Me=Ie(99571),Ce=Ie(89780),xe=Ie.n(Ce),be=Ie(8336),ye=Ie(12469),we=Object.defineProperty,pe=Object.defineProperties,de=Object.getOwnPropertyDescriptors,ge=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable,ee=(ve,Pe,Ae)=>Pe in ve?we(ve,Pe,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):ve[Pe]=Ae,z=(ve,Pe)=>{for(var Ae in Pe||(Pe={}))fe.call(Pe,Ae)&&ee(ve,Ae,Pe[Ae]);if(ge)for(var Ae of ge(Pe))ue.call(Pe,Ae)&&ee(ve,Ae,Pe[Ae]);return ve},oe=(ve,Pe)=>pe(ve,de(Pe));const re=Se.default.Option,ae={labelCol:{span:4},wrapperCol:{span:20}},le={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"]};ln.Z=({callback:ve,onCancel:Pe})=>{const[Ae,De]=(0,Le.useState)("python");function Oe(qe){De(le[qe][1])}function Ze(qe){ve(qe)}return Le.createElement(je.default,oe(z({},ae),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ze,style:{width:500}}),Le.createElement(je.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},Le.createElement(Se.default,{getPopupContainer:qe=>qe.parentNode,onChange:Oe},Object.keys(le).map(qe=>Le.createElement(re,{key:qe,value:qe},le[qe][0])))),Le.createElement(je.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},Le.createElement(me,{mode:Ae})),Le.createElement("div",{className:"flex-container flex-end"},Le.createElement(Me.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Le.createElement(Me.ZP,{type:"ghost",onClick:Pe},"\u53D6\u6D88")))};function me({value:ve,onChange:Pe,mode:Ae,options:De={}}){const Oe=(0,Le.useRef)(),[Ze,qe]=(0,Le.useState)();return(0,Le.useEffect)(()=>{if(Ze){let Xe=function(mt){const pt=mt.getValue();Pe&&Pe(pt)};return Ze.on("change",Xe),()=>{Ze.off("change",Xe)}}},[Ze,Pe]),(0,Le.useEffect)(()=>{Ze&&Ze.setOption("mode",Ae)},[Ze,Ae]),(0,Le.useEffect)(()=>{Ze&&(ve!==Ze.getValue()||ve==="")&&setTimeout(()=>{Ze.setValue(ve||"")},300)},[Ze,ve]),(0,Le.useEffect)(()=>{if(Oe.current&&!Ze){const Xe=xe().fromTextArea(Oe.current,z({mode:Ae,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},De));qe(Xe)}},[Oe.current,Ze]),Le.createElement("div",{className:"my-codemirror-container"},Le.createElement("textarea",{ref:Oe}))}},39793:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return So}});var Le=Ie(59301),Se=Ie(89780),je=Ie.n(Se),Me=Ie(76374),Ce=Ie(8336),xe=Ie(6313),be=Ie(25717),ye=Ie(99498),we=Ie(25419),pe=Ie(67549),de=Ie(76902),ge=({value:$t="",className:Ge,showTextOnly:Je,showLines:ot,style:Et={}})=>{const Nt=(0,Le.useMemo)(()=>"",[$t]);return Le.createElement(Le.Fragment,null,Le.createElement("div",{dangerouslySetInnerHTML:{__html:Nt}}))},fe=Object.defineProperty,ue=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,z=Object.getOwnPropertySymbols,oe=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,ae=($t,Ge,Je)=>Ge in $t?fe($t,Ge,{enumerable:!0,configurable:!0,writable:!0,value:Je}):$t[Ge]=Je,le=($t,Ge)=>{for(var Je in Ge||(Ge={}))oe.call(Ge,Je)&&ae($t,Je,Ge[Je]);if(z)for(var Je of z(Ge))re.call(Ge,Je)&&ae($t,Je,Ge[Je]);return $t},me=($t,Ge)=>ue($t,ee(Ge));let ve=[{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 Pe({onActionCallback:$t,title:Ge,icon:Je,actionName:ot,className:Et="",children:Nt}){function pn(){$t(ot)}return Le.createElement("a",{title:Ge,className:Et,onClick:pn},Le.createElement("i",{className:`${Je}`}),Nt)}var Ae=({watch:$t,showNullButton:Ge,showNullProgramButton:Je,onActionCallback:ot,fullScreen:Et,insertTemp:Nt,hidetoolBar:pn,extraUse:jt})=>{const cn=[...ve,{title:`${$t?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${$t?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return Le.createElement("ul",{className:"markdown-toolbar-container"},!pn&&cn.map((On,pi)=>Le.createElement("li",{key:pi},On.actionName?Le.createElement(Pe,me(le({},On),{onActionCallback:ot})):Le.createElement("span",{className:"v-line"}))),Ge?Le.createElement("li",null,Le.createElement(Pe,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:ot},Le.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Je?Le.createElement(Le.Fragment,null,Le.createElement("li",null,Le.createElement(Pe,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:ot},Le.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),Le.createElement("li",null,Le.createElement(Pe,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:ot},Le.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,Nt&&Le.createElement("li",null,Le.createElement(Pe,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Nt}`,onActionCallback:ot},Le.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),jt&&Le.createElement("li",null,jt),Le.createElement("li",{className:"btn-full-screen"},Le.createElement(Pe,{icon:`${Et?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Et?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:ot})))},De=Ie(91558),Oe=Ie(28284),Ze=Ie(37568),qe=Ie(99571),Xe=Object.defineProperty,mt=Object.defineProperties,pt=Object.getOwnPropertyDescriptors,Mt=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable,dt=($t,Ge,Je)=>Ge in $t?Xe($t,Ge,{enumerable:!0,configurable:!0,writable:!0,value:Je}):$t[Ge]=Je,Rt=($t,Ge)=>{for(var Je in Ge||(Ge={}))at.call(Ge,Je)&&dt($t,Je,Ge[Je]);if(Mt)for(var Je of Mt(Ge))_t.call(Ge,Je)&&dt($t,Je,Ge[Je]);return $t},ut=($t,Ge)=>mt($t,pt(Ge));const rt={labelCol:{span:4},wrapperCol:{span:20}};var ct=({callback:$t,onCancel:Ge})=>{function Je(ot){$t(ot)}return Le.createElement(Oe.default,ut(Rt({},rt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Je,style:{width:500}}),Le.createElement(Oe.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},Le.createElement(Ze.default,null)),Le.createElement(Oe.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},Le.createElement(Ze.default,null)),Le.createElement("div",{className:"flex-container flex-end"},Le.createElement(qe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Le.createElement(qe.ZP,{type:"ghost",onClick:Ge},"\u53D6\u6D88")))},yt=Ie(69720),wt=Ie(17077),xt=Ie(62957),Ut=Ie(77019),zt=Ie(9507),dn=Ie(59301),Ft=({callback:$t,onCancel:Ge})=>{const Je=document.createElement("canvas"),ot=Je.getContext("2d");Je.width=1e3,Je.height=800,ot.fillStyle="#ffffff",ot.fillRect(0,0,Je.width,Je.height);const Et=Je.toDataURL("image/png");return dn.createElement(xt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},dn.createElement(Ut.Z,{style:{height:"100vh"}},dn.createElement(zt.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Et,visible:!0,title:String(Date.now())},onOk:Nt=>{$t({src:Nt.url})},onClose:Ge})))},Dt=Ie(12378);function Qt(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Qt,go.CommandHandler),Qt.prototype.canAlignSelection=function(){var $t=this.diagram;return!($t===null||$t.isReadOnly||$t.isModelReadOnly||$t.selection.count<2)},Qt.prototype.alignLeft=function(){var $t=this.diagram;$t.startTransaction("aligning left");var Ge=1/0;$t.selection.each(function(Je){Je instanceof go.Link||(Ge=Math.min(Je.position.x,Ge))}),$t.selection.each(function(Je){Je instanceof go.Link||Je.move(new go.Point(Ge,Je.position.y))}),$t.commitTransaction("aligning left")},Qt.prototype.alignRight=function(){var $t=this.diagram;$t.startTransaction("aligning right");var Ge=-1/0;$t.selection.each(function(Je){if(!(Je instanceof go.Link)){var ot=Je.actualBounds.x+Je.actualBounds.width;Ge=Math.max(ot,Ge)}}),$t.selection.each(function(Je){Je instanceof go.Link||Je.move(new go.Point(Ge-Je.actualBounds.width,Je.position.y))}),$t.commitTransaction("aligning right")},Qt.prototype.alignTop=function(){var $t=this.diagram;$t.startTransaction("alignTop");var Ge=1/0;$t.selection.each(function(Je){Je instanceof go.Link||(Ge=Math.min(Je.position.y,Ge))}),$t.selection.each(function(Je){Je instanceof go.Link||Je.move(new go.Point(Je.position.x,Ge))}),$t.commitTransaction("alignTop")},Qt.prototype.alignBottom=function(){var $t=this.diagram;$t.startTransaction("aligning bottom");var Ge=-1/0;$t.selection.each(function(Je){if(!(Je instanceof go.Link)){var ot=Je.actualBounds.y+Je.actualBounds.height;Ge=Math.max(ot,Ge)}}),$t.selection.each(function(Je){Je instanceof go.Link||Je.move(new go.Point(Je.actualBounds.x,Ge-Je.actualBounds.height))}),$t.commitTransaction("aligning bottom")},Qt.prototype.alignCenterX=function(){var $t=this.diagram,Ge=$t.selection.first();if(Ge){$t.startTransaction("aligning Center X");var Je=Ge.actualBounds.x+Ge.actualBounds.width/2;$t.selection.each(function(ot){ot instanceof go.Link||ot.move(new go.Point(Je-ot.actualBounds.width/2,ot.actualBounds.y))}),$t.commitTransaction("aligning Center X")}},Qt.prototype.alignCenterY=function(){var $t=this.diagram,Ge=$t.selection.first();if(Ge){$t.startTransaction("aligning Center Y");var Je=Ge.actualBounds.y+Ge.actualBounds.height/2;$t.selection.each(function(ot){ot instanceof go.Link||ot.move(new go.Point(ot.actualBounds.x,Je-ot.actualBounds.height/2))}),$t.commitTransaction("aligning Center Y")}},Qt.prototype.alignColumn=function($t){var Ge=this.diagram;Ge.startTransaction("align Column"),$t===void 0&&($t=0),$t=parseFloat($t);var Je=new Array;Ge.selection.each(function(jt){jt instanceof go.Link||Je.push(jt)});for(var ot=0;ot<Je.length-1;ot++){var Et=Je[ot],Nt=Et.actualBounds.y+Et.actualBounds.height+$t,pn=Je[ot+1];pn.move(new go.Point(Et.actualBounds.x,Nt))}Ge.commitTransaction("align Column")},Qt.prototype.alignRow=function($t){$t===void 0&&($t=0),$t=parseFloat($t);var Ge=this.diagram;Ge.startTransaction("align Row");var Je=new Array;Ge.selection.each(function(jt){jt instanceof go.Link||Je.push(jt)});for(var ot=0;ot<Je.length-1;ot++){var Et=Je[ot],Nt=Et.actualBounds.x+Et.actualBounds.width+$t,pn=Je[ot+1];pn.move(new go.Point(Nt,Et.actualBounds.y))}Ge.commitTransaction("align Row")},Qt.prototype.canRotate=function($t){var Ge=this.diagram;return!(Ge===null||Ge.isReadOnly||Ge.isModelReadOnly||Ge.selection.count<1)},Qt.prototype.rotate=function($t){$t===void 0&&($t=90);var Ge=this.diagram;Ge.startTransaction("rotate "+$t.toString());var Ge=this.diagram;Ge.selection.each(function(Je){Je instanceof go.Link||Je instanceof go.Group||(Je.angle+=$t)}),Ge.commitTransaction("rotate "+$t.toString())},Qt.prototype.pullToFront=function(){var $t=this.diagram;$t.startTransaction("pullToFront");var Ge=new go.Map;$t.selection.each(function(Je){Ge.set(Je.layer,0)}),Ge.iteratorKeys.each(function(Je){var ot=0;Je.parts.each(function(Et){if(!Et.isSelected){var Nt=Et.zOrder;isNaN(Nt)?Et.zOrder=0:ot=Math.max(ot,Nt)}}),Ge.set(Je,ot)}),$t.selection.each(function(Je){Qt._assignZOrder(Je,Ge.get(Je.layer)+1)}),$t.commitTransaction("pullToFront")},Qt.prototype.pushToBack=function(){var $t=this.diagram;$t.startTransaction("pushToBack");var Ge=new go.Map;$t.selection.each(function(Je){Ge.set(Je.layer,0)}),Ge.iteratorKeys.each(function(Je){var ot=0;Je.parts.each(function(Et){if(!Et.isSelected){var Nt=Et.zOrder;isNaN(Nt)?Et.zOrder=0:ot=Math.min(ot,Nt)}}),Ge.set(Je,ot)}),$t.selection.each(function(Je){Qt._assignZOrder(Je,Ge.get(Je.layer)-1-Qt._findGroupDepth(Je))}),$t.commitTransaction("pushToBack")},Qt._assignZOrder=function($t,Ge,Je){Je===void 0&&(Je=$t),$t.layer===Je.layer&&($t.zOrder=Ge),$t instanceof go.Group&&$t.memberParts.each(function(ot){Qt._assignZOrder(ot,Ge+1,Je)})},Qt._findGroupDepth=function($t){if($t instanceof go.Group){var Ge=0;return $t.memberParts.each(function(Je){Ge=Math.max(Ge,Qt._findGroupDepth(Je))}),Ge+1}else return 0},Qt.prototype.doKeyDown=function(){var $t=this.diagram;if($t!==null){var Ge=$t.lastInput;if(Ge.key==="Up"||Ge.key==="Down"||Ge.key==="Left"||Ge.key==="Right"){var Je=this.arrowKeyBehavior;if(Je==="none")return;if(Je==="select"){this._arrowKeySelect();return}else if(Je==="move"){this._arrowKeyMove();return}else if(Je==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},Qt.prototype._getAllParts=function(){var $t=new Array;return this.diagram.nodes.each(function(Ge){$t.push(Ge)}),this.diagram.parts.each(function(Ge){$t.push(Ge)}),$t},Qt.prototype._arrowKeyMove=function(){var $t=this.diagram,Ge=$t.lastInput,Je=0,ot=0;if(Ge.control||Ge.meta)Je=1,ot=1;else if($t.grid!==null){var Et=$t.grid.gridCellSize;ot=Et.width,Je=Et.height}$t.startTransaction("arrowKeyMove"),$t.selection.each(function(Nt){Ge.key==="Up"?Nt.move(new go.Point(Nt.actualBounds.x,Nt.actualBounds.y-Je)):Ge.key==="Down"?Nt.move(new go.Point(Nt.actualBounds.x,Nt.actualBounds.y+Je)):Ge.key==="Left"?Nt.move(new go.Point(Nt.actualBounds.x-ot,Nt.actualBounds.y)):Ge.key==="Right"&&Nt.move(new go.Point(Nt.actualBounds.x+ot,Nt.actualBounds.y))}),$t.commitTransaction("arrowKeyMove")},Qt.prototype._arrowKeySelect=function(){var $t=this.diagram,Ge=$t.lastInput,Je=null;Ge.key==="Up"?Je=this._findNearestPartTowards(270):Ge.key==="Down"?Je=this._findNearestPartTowards(90):Ge.key==="Left"?Je=this._findNearestPartTowards(180):Ge.key==="Right"&&(Je=this._findNearestPartTowards(0)),Je!==null&&(Ge.shift?Je.isSelected=!0:Ge.control||Ge.meta?Je.isSelected=!Je.isSelected:$t.select(Je))},Qt.prototype._findNearestPartTowards=function($t){var Ge=this.diagram.selection.first();if(Ge===null)return null;for(var Je=Ge.actualBounds.center,ot=this._getAllParts(),Et=1/0,Nt=Ge,pn=0;pn<ot.length;pn++){var jt=ot[pn];if(jt!==Ge&&jt.canSelect()){var cn=jt.actualBounds.center,On=Je.directionPoint(cn),pi=this._angleCloseness(On,$t);if(pi<=45){var Fn=Je.distanceSquaredPoint(cn);Fn*=1+Math.sin(pi*Math.PI/180),Fn<Et&&(Et=Fn,Nt=jt)}}}return Nt},Qt.prototype._angleCloseness=function($t,Ge){return Math.min(Math.abs(Ge-$t),Math.min(Math.abs(Ge+360-$t),Math.abs(Ge-360-$t)))},Qt.prototype._arrowKeyTree=function(){var $t=this.diagram,Ge=$t.selection.first();if(Ge instanceof go.Node){var Je=$t.lastInput;if(Je.key==="Right"){if(!Ge.isTreeLeaf)if(!Ge.isTreeExpanded)$t.commandHandler.canExpandTree(Ge)&&$t.commandHandler.expandTree(Ge);else{var ot=this._sortTreeChildrenByY(Ge).first();ot!==null&&$t.select(ot)}}else if(Je.key==="Left")if(!Ge.isTreeLeaf&&Ge.isTreeExpanded)$t.commandHandler.canCollapseTree(Ge)&&$t.commandHandler.collapseTree(Ge);else{var Et=Ge.findTreeParentNode();Et!==null&&$t.select(Et)}else if(Je.key==="Up"){var Et=Ge.findTreeParentNode();if(Et!==null){var Nt=this._sortTreeChildrenByY(Et),pn=Nt.indexOf(Ge);if(pn>0){for(var jt=Nt.elt(pn-1);jt!==null&&jt.isTreeExpanded&&!jt.isTreeLeaf;){var cn=this._sortTreeChildrenByY(jt);jt=cn.last()}jt!==null&&$t.select(jt)}else $t.select(Et)}}else if(Je.key==="Down")if(Ge.isTreeExpanded&&!Ge.isTreeLeaf){var ot=this._sortTreeChildrenByY(Ge).first();ot!==null&&$t.select(ot)}else for(;Ge!==null;){var Et=Ge.findTreeParentNode();if(Et===null)break;var Nt=this._sortTreeChildrenByY(Et),pn=Nt.indexOf(Ge);if(pn<Nt.length-1){$t.select(Nt.elt(pn+1));break}else Ge=Et}var On=$t.selection.first();On!==null&&$t.scrollToRect(On.actualBounds)}},Qt.prototype._sortTreeChildrenByY=function($t){var Ge=new go.List().addAll($t.findTreeChildrenNodes());return Ge.sort(function(Je,ot){var Et=Je.location,Nt=ot.location;return Et.y<Nt.y?-1:Et.y>Nt.y?1:Et.x<Nt.x?-1:Et.x>Nt.x?1:0}),Ge},Qt.prototype.copyToClipboard=function($t){go.CommandHandler.prototype.copyToClipboard.call(this,$t),this._lastPasteOffset.set(this.pasteOffset)},Qt.prototype.pasteFromClipboard=function(){var $t=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts($t,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),$t},Object.defineProperty(Qt.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function($t){if($t!=="move"&&$t!=="select"&&$t!=="scroll"&&$t!=="tree"&&$t!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+$t);this._arrowKeyBehavior=$t}}),Object.defineProperty(Qt.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function($t){if(!($t instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+$t);this._pasteOffset.set($t)}});var Yt=Qt,Jt=Ie(63720),lt=Ie(5269),Ue=Ie(38986),Be={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},tt=Ie(48790),ht=Ie(59301),et=($t,Ge,Je)=>new Promise((ot,Et)=>{var Nt=cn=>{try{jt(Je.next(cn))}catch(On){Et(On)}},pn=cn=>{try{jt(Je.throw(cn))}catch(On){Et(On)}},jt=cn=>cn.done?ot(cn.value):Promise.resolve(cn.value).then(Nt,pn);jt((Je=Je.apply($t,Ge)).next())});function Ve({onCancel:$t,callback:Ge}){let Je=(0,Le.useRef)(),ot=(0,Le.useRef)(),Et=(0,Le.useRef)(),Nt=(0,Le.useRef)(!1);const pn=(0,Le.useRef)(!1),[jt,cn]=(0,Le.useState)(0);function On(){const Fn=Dt.bx.make,Lt={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"};Je.current=new Dt.S0(ot.current,{padding:20,grid:Fn(Dt.s_,"Grid",Fn(Dt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Fn(Dt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:nn=>{var Mi=nn.diagram.commandHandler.addTopLevelParts(nn.diagram.selection,!0);Mi||nn.diagram.currentTool.doCancel()},commandHandler:Fn(Yt),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:nn=>{var Mi=nn.subject;Mi.location=Mi.location.copy().snapToGridPoint(nn.diagram.grid.gridOrigin,nn.diagram.grid.gridCellSize),setTimeout(()=>{nn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:nn=>{var Mi=nn.subject;setTimeout(()=>{nn.diagram.commandHandler.editTextBlock()})},LinkRelinked:nn=>{var Mi=nn.parameter.part;Mi.invalidateConnectedLinks();var tr=nn.subject;nn.diagram.toolManager.linkingTool.isForwards?tr.toNode.invalidateConnectedLinks():tr.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Je.current.nodeTemplate=Fn(Dt.NB,"Auto",{locationSpot:Dt.z6.Center,locationObjectName:"SHAPE",desiredSize:new Dt.$u(120,60),minSize:new Dt.$u(40,40),resizable:!0,resizeCellSize:new Dt.$u(10,10),rotatable:!0},new Dt.KX("location","loc",Dt.E9.parse).makeTwoWay(Dt.E9.stringify),new Dt.KX("desiredSize","size",Dt.$u.parse).makeTwoWay(Dt.$u.stringify),Fn(Dt.bn,{name:"SHAPE",fill:Lt.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Dt.z6.AllSides,toSpot:Dt.z6.AllSides},new Dt.KX("figure"),new Dt.KX("fill"),new Dt.KX("stroke","borderColor"),new Dt.KX("strokeWidth","thickness"),new Dt.KX("strokeDashArray","dash")),Fn(Dt.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Fn(Dt.al,{margin:1,textAlign:"center",overflow:Dt.al.OverflowEllipsis,editable:!0},new Dt.KX("text").makeTwoWay(),new Dt.KX("stroke","color"))),Je.current.nodeTemplate.toolTip=Fn("ToolTip",Fn(Dt.s_,"Vertical",{maxSize:new Dt.$u(200,NaN)},Fn(Dt.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Dt.KX("text")),Fn(Dt.al,{font:"10pt sans-serif",textAlign:"center"},new Dt.KX("text","details"))));function Ht(nn,Mi){var tr=(vi,or)=>{vi.handled=!0,vi.diagram.model.commit(Vi=>{var yr=or.part.adornedPart,fr=new Dt.E9().setRectSpot(yr.actualBounds,nn);fr.subtract(yr.location),fr.scale(2,2),fr.x+=Math.sign(fr.x)*130,fr.y+=Math.sign(fr.y)*130,fr.add(yr.location),fr.snapToGridPoint(vi.diagram.grid.gridOrigin,vi.diagram.grid.gridCellSize);var _r=Vi.copyNodeData(yr.data);Vi.setGroupKeyForNodeData(_r,Vi.getGroupKeyForNodeData(yr.data)),Vi.addNodeData(_r);var Yr={from:yr.key,to:Vi.getKeyForNodeData(_r)};Vi.addLinkData(Yr);var Ln=vi.diagram.findNodeForData(_r);Ln.location=fr,vi.diagram.select(Ln),setTimeout(()=>{vi.diagram.commandHandler.editTextBlock()},20)})};return Fn(Dt.bn,{figure:Mi,alignment:nn,alignmentFocus:nn.opposite(),width:nn.equals(Dt.z6.Top)||nn.equals(Dt.z6.Bottom)?25:18,height:nn.equals(Dt.z6.Top)||nn.equals(Dt.z6.Bottom)?18:25,fill:"orange",stroke:Lt.white,strokeWidth:4,mouseEnter:(vi,or)=>or.fill="dodgerblue",mouseLeave:(vi,or)=>or.fill="orange",isActionable:!0,click:tr,contextClick:tr})}function Pn(nn){return Fn(Dt.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:(Mi,tr)=>tr.fill="dodgerblue",mouseLeave:(Mi,tr)=>tr.fill="orange",click:(Mi,tr)=>{Mi.diagram.commandHandler.showContextMenu(tr.part.adornedPart)}},nn||{})}Je.current.nodeTemplate.selectionAdornmentTemplate=Fn(Dt.uz,"Spot",Fn(Dt.Vm,{padding:10}),Ht(Dt.z6.Top,"TriangleUp"),Ht(Dt.z6.Left,"TriangleLeft"),Ht(Dt.z6.Right,"TriangleRight"),Ht(Dt.z6.Bottom,"TriangleDown"),Pn({alignment:new Dt.z6(.75,0)}));function Sn(nn,Mi){return(tr,vi)=>{tr.handled=!0,tr.diagram.model.commit(or=>{or.set(vi.part.adornedPart.data,nn,Mi)})}}function Kt(nn,Mi){return Mi||(Mi="color"),Fn(Dt.bn,{width:16,height:16,stroke:"lightgray",fill:nn,margin:1,background:"transparent",mouseEnter:(tr,vi)=>vi.stroke="dodgerblue",mouseLeave:(tr,vi)=>vi.stroke="lightgray",click:Sn(Mi,nn),contextClick:Sn(Mi,nn)})}function vn(){return[Fn("ContextMenuButton",Fn(Dt.s_,"Horizontal",Kt(Lt.white,"fill"),Kt(Lt.beige,"fill"),Kt(Lt.extralightblue,"fill"),Kt(Lt.extralightred,"fill"))),Fn("ContextMenuButton",Fn(Dt.s_,"Horizontal",Kt(Lt.lightgray,"fill"),Kt(Lt.lightgreen,"fill"),Kt(Lt.lightblue,"fill"),Kt(Lt.lightred,"fill")))]}function Hn(){return[Fn("ContextMenuButton",Fn(Dt.s_,"Horizontal",Kt(Lt.black),Kt(Lt.green),Kt(Lt.blue),Kt(Lt.red))),Fn("ContextMenuButton",Fn(Dt.s_,"Horizontal",Kt(Lt.white),Kt(Lt.magenta),Kt(Lt.purple),Kt(Lt.orange)))]}function Gn(nn,Mi){return Mi||(Mi="thickness"),Fn(Dt.bn,"LineH",{width:16,height:16,strokeWidth:nn,margin:1,background:"transparent",mouseEnter:(tr,vi)=>vi.background="dodgerblue",mouseLeave:(tr,vi)=>vi.background="transparent",click:Sn(Mi,nn),contextClick:Sn(Mi,nn)})}function oi(nn,Mi){return Mi||(Mi="dash"),Fn(Dt.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:nn,margin:1,background:"transparent",mouseEnter:(tr,vi)=>vi.background="dodgerblue",mouseLeave:(tr,vi)=>vi.background="transparent",click:Sn(Mi,nn),contextClick:Sn(Mi,nn)})}function Wn(){return[Fn("ContextMenuButton",Fn(Dt.s_,"Horizontal",Gn(1),Gn(2),Gn(3),Gn(4))),Fn("ContextMenuButton",Fn(Dt.s_,"Horizontal",oi(null),oi([2,4]),oi([4,4])))]}function zn(nn,Mi){return Mi||(Mi="figure"),Fn(Dt.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:nn,margin:1,background:"transparent",mouseEnter:(tr,vi)=>vi.fill="dodgerblue",mouseLeave:(tr,vi)=>vi.fill="lightgray",click:Sn(Mi,nn),contextClick:Sn(Mi,nn)})}Je.current.nodeTemplate.contextMenu=Fn("ContextMenu",Fn("ContextMenuButton",Fn(Dt.s_,"Horizontal",zn("Rectangle"),zn("RoundedRectangle"),zn("Ellipse"),zn("Diamond"))),Fn("ContextMenuButton",Fn(Dt.s_,"Horizontal",zn("Parallelogram2"),zn("ManualOperation"),zn("Procedure"),zn("Cylinder1"))),Fn("ContextMenuButton",Fn(Dt.s_,"Horizontal",zn("Terminator"),zn("CreateRequest"),zn("Document"),zn("TriangleDown"))),vn(),Hn(),Wn()),Je.current.groupTemplate=Fn(Dt.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Dt.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(nn,Mi)=>{var tr=Mi.addMembers(Mi.diagram.selection,!0);tr||Mi.diagram.currentTool.doCancel()},avoidable:!1},new Dt.KX("location","loc",Dt.E9.parse).makeTwoWay(Dt.E9.stringify),Fn(Dt.s_,"Auto",{name:"BODY"},Fn(Dt.bn,{parameter1:10,fill:Lt.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Dt.z6.AllSides,toSpot:Dt.z6.AllSides},new Dt.KX("fill"),new Dt.KX("stroke","color"),new Dt.KX("strokeWidth","thickness"),new Dt.KX("strokeDashArray","dash")),Fn(Dt.Vm,{background:"transparent",margin:20})),Fn(Dt.al,{alignment:Dt.z6.Top,alignmentFocus:Dt.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new Dt.KX("text"),new Dt.KX("stroke","color"))),Je.current.groupTemplate.selectionAdornmentTemplate=Fn(Dt.uz,"Spot",Fn(Dt.s_,"Auto",Fn(Dt.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Fn(Dt.Vm,{margin:1.5})),Pn({alignment:Dt.z6.TopRight,alignmentFocus:Dt.z6.BottomRight})),Je.current.groupTemplate.contextMenu=Fn("ContextMenu",vn(),Hn(),Wn()),Je.current.linkTemplate=Fn(Dt.rU,{layerName:"Foreground",routing:Dt.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Dt.KX("fromSpot","fromSpot",Dt.z6.parse),new Dt.KX("toSpot","toSpot",Dt.z6.parse),new Dt.KX("fromShortLength","dir",nn=>nn>=1?10:0),new Dt.KX("toShortLength","dir",nn=>nn>=1?10:0),new Dt.KX("points").makeTwoWay(),Fn(Dt.bn,{strokeWidth:2},new Dt.KX("stroke","color"),new Dt.KX("strokeWidth","thickness"),new Dt.KX("strokeDashArray","dash")),Fn(Dt.bn,{segmentIndex:0,segmentOffset:new Dt.E9(15,0),segmentOrientation:Dt.rU.OrientAlong,alignmentFocus:Dt.z6.Right,figure:"circle",width:10,strokeWidth:0},new Dt.KX("fill","color"),new Dt.KX("visible","dir",nn=>nn===1)),Fn(Dt.bn,{segmentIndex:-1,segmentOffset:new Dt.E9(-10,6),segmentOrientation:Dt.rU.OrientPlus90,alignmentFocus:Dt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Dt.KX("fill","color"),new Dt.KX("visible","dir",nn=>nn>=1),new Dt.KX("width","thickness",nn=>7+3*nn),new Dt.KX("height","thickness",nn=>7+3*nn),new Dt.KX("segmentOffset","thickness",nn=>new Dt.E9(-15,4+1.5*nn))),Fn(Dt.bn,{segmentIndex:0,segmentOffset:new Dt.E9(15,-6),segmentOrientation:Dt.rU.OrientMinus90,alignmentFocus:Dt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Dt.KX("fill","color"),new Dt.KX("visible","dir",nn=>nn===2),new Dt.KX("width","thickness",nn=>7+3*nn),new Dt.KX("height","thickness",nn=>7+3*nn),new Dt.KX("segmentOffset","thickness",nn=>new Dt.E9(-15,4+1.5*nn))),Fn(Dt.al,{alignmentFocus:new Dt.z6(0,1,-4,0),editable:!0},new Dt.KX("text").makeTwoWay(),new Dt.KX("stroke","color"))),Je.current.linkTemplate.selectionAdornmentTemplate=Fn(Dt.uz,Fn(Dt.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Mn(2)},new Dt.KX("pathPattern","thickness",Mn)),Pn({alignmentFocus:new Dt.z6(0,0,-6,-4)}));function Mn(nn){return Fn(Dt.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(nn+4).toString()+" H3"})}function wi(nn){var Mi="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return nn===0?Mi="M0 0 M16 16 M0 8 L16 8":nn===2&&(Mi="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Fn(Dt.bn,{geometryString:Mi,margin:2,background:"transparent",mouseEnter:(tr,vi)=>vi.background="dodgerblue",mouseLeave:(tr,vi)=>vi.background="transparent",click:Sn("dir",nn),contextClick:Sn("dir",nn)})}function mi(nn){var Mi=(tr,vi)=>{tr.handled=!0,tr.diagram.model.commit(or=>{var Vi=vi.part.adornedPart;or.set(Vi.data,nn?"toSpot":"fromSpot",Dt.z6.stringify(Dt.z6.AllSides)),(nn?Vi.toNode:Vi.fromNode).invalidateConnectedLinks()})};return Fn(Dt.bn,{width:12,height:12,fill:"transparent",mouseEnter:(tr,vi)=>vi.background="dodgerblue",mouseLeave:(tr,vi)=>vi.background="transparent",click:Mi,contextClick:Mi})}function En(nn,Mi){var tr=0,vi=Dt.z6.RightSide;nn.equals(Dt.z6.Top)?(tr=270,vi=Dt.z6.TopSide):nn.equals(Dt.z6.Left)?(tr=180,vi=Dt.z6.LeftSide):nn.equals(Dt.z6.Bottom)&&(tr=90,vi=Dt.z6.BottomSide),Mi||(tr-=180);var or=(Vi,yr)=>{Vi.handled=!0,Vi.diagram.model.commit(fr=>{var _r=yr.part.adornedPart;fr.set(_r.data,Mi?"toSpot":"fromSpot",Dt.z6.stringify(vi)),(Mi?_r.toNode:_r.fromNode).invalidateConnectedLinks()})};return Fn(Dt.bn,{alignment:nn,alignmentFocus:nn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:tr,background:"transparent",mouseEnter:(Vi,yr)=>yr.background="dodgerblue",mouseLeave:(Vi,yr)=>yr.background="transparent",click:or,contextClick:or})}Je.current.linkTemplate.contextMenu=Fn("ContextMenu",Hn(),Wn(),Fn("ContextMenuButton",Fn(Dt.s_,"Horizontal",wi(0),wi(1),wi(2))),Fn("ContextMenuButton",Fn(Dt.s_,"Horizontal",Fn(Dt.s_,"Spot",mi(!1),En(Dt.z6.Top,!1),En(Dt.z6.Left,!1),En(Dt.z6.Right,!1),En(Dt.z6.Bottom,!1)),Fn(Dt.s_,"Spot",{margin:new Dt.Zt(0,0,0,2)},mi(!0),En(Dt.z6.Top,!0),En(Dt.z6.Left,!0),En(Dt.z6.Right,!0),En(Dt.z6.Bottom,!0)))));const ei=`{ "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 er=["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 Sr(nn){return console.log("shapeName:",nn),er.indexOf(nn)>=0}var Tr=new Dt.YI(Et.current,{maxSelectionCount:1,linkTemplate:Fn(Dt.rU,{locationSpot:Dt.z6.Center,selectionAdornmentTemplate:Fn(Dt.uz,"Link",{locationSpot:Dt.z6.Center},Fn(Dt.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Fn(Dt.bn,{toArrow:"Standard",stroke:null}))},{routing:Dt.rU.AvoidsNodes,curve:Dt.rU.JumpOver,corner:5,toShortLength:4},new Dt.KX("points"),Fn(Dt.bn,{isPanelMain:!0,strokeWidth:2}),Fn(Dt.bn,{toArrow:"Standard",stroke:null})),model:new Dt.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...Dt.bn.getFigureGenerators().toArray().map(nn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:nn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Je.current.addDiagramListener("TextEdited",function(nn){var Mi;const tr=nn.subject.part;var vi=(Mi=document.activeElement)==null?void 0:Mi.value;typeof vi=="string"&&vi.trim()===""&&Je.current.model.commit(function(or){or.set(tr.data,"text","\u672A\u547D\u540D"),Je.current.commandHandler.stopCommand()},"increment")}),Tr.nodeTemplate=Fn(Dt.NB,"Auto",{locationSpot:Dt.z6.Center},new Dt.KX("location","location",Dt.E9.parse).makeTwoWay(Dt.E9.stringify),Fn(Dt.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 Dt.KX("stroke").makeTwoWay(),new Dt.KX("fill").makeTwoWay(),new Dt.KX("figure")),Fn(Dt.al,{margin:new Dt.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new Dt.$u(16,16),maxSize:new Dt.$u(10,NaN),textAlign:"center",editable:!0},new Dt.KX("key").makeTwoWay())),setTimeout(()=>{Je.current.grid=Fn(Dt.s_,"Grid",Fn(Dt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Fn(Dt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Je.current.grid.visible=!0,Je.current.grid.gridCellStroke="darkgray",Je.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Je.current,Je.current}const pi=()=>et(this,null,function*(){var Fn,Lt=Je.current.makeImage();const Ht=yield(0,Ue.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Lt.src,file_data:JSON.stringify({login:(Fn=(0,tt.eY)())==null?void 0:Fn.login,data:JSON.parse(Je.current.model.toJson())})}});Ge({src:Ht.url})});return(0,Le.useEffect)(()=>(setTimeout(()=>{On()},500),cn(jt+1),()=>{Je.current=null}),[]),ht.createElement("div",{ref:pn,className:"body-overflow-initial"},ht.createElement(xt.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!jt,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:ht.createElement(Ut.Z,null,ht.createElement(lt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ht.createElement(lt.Z,{onClick:()=>{var Fn,Lt,Ht=Je.current.selection.first();if(Nt.current=!Nt.current,document.activeElement&&Ht){let Pn=(Lt=(Fn=document.activeElement)==null?void 0:Fn.value)==null?void 0:Lt.trim();typeof Pn=="string"&&Je.current.model.commit(function(Sn){Sn.set(Ht.data,"text",Pn||"\u672A\u547D\u540D"),Je.current.commandHandler.stopCommand()},"increment")}cn(jt+1)}},ht.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:$t},ht.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:Nt.current?"none":"block"},className:Be.flowChartWrp},ht.createElement("div",{style:{display:"flex",height:"100%"}},ht.createElement("div",{style:{width:"300px",height:"100%"}},ht.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),ht.createElement("div",{style:{height:"calc(100% - 50px)"},className:Be.myPaletteDiv,ref:Et})),ht.createElement("div",{style:{flex:1,position:"relative"}},ht.createElement("div",{ref:ot,style:{height:"80vh"}}))),ht.createElement("div",{className:"tr"},ht.createElement(qe.ZP,{size:"large",onClick:pi,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Re=Ve,ze=Ie(47889),it=Ie(71051);const Ke=ze.ZP.Group,We={margin:"0 8px"};var vt=({callback:$t,onCancel:Ge})=>{function Je(ot){$t(ot)}return Le.createElement(Oe.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Je},Le.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},Le.createElement("span",{style:We},"\u5355\u5143\u683C\u6570\uFF1A"),Le.createElement("span",{style:We},"\u884C\u6570"),Le.createElement(Oe.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},Le.createElement(it.Z,null)),Le.createElement("span",{style:We},"\u5217\u6570"),Le.createElement(Oe.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},Le.createElement(it.Z,null))),Le.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},Le.createElement("span",{style:We},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),Le.createElement(Oe.default.Item,{name:"align"},Le.createElement(Ke,null,Le.createElement(ze.ZP,{value:"default"},Le.createElement("i",{className:"fa fa-align-justify"})),Le.createElement(ze.ZP,{value:"left"},Le.createElement("i",{className:"fa fa-align-left"})),Le.createElement(ze.ZP,{value:"center"},Le.createElement("i",{className:"fa fa-align-center"})),Le.createElement(ze.ZP,{value:"right"},Le.createElement("i",{className:"fa fa-align-right"}))))),Le.createElement("div",{className:"flex-container flex-end"},Le.createElement(qe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Le.createElement(qe.ZP,{type:"ghost",onClick:Ge},"\u53D6\u6D88")))},kt=Ie(71411),hn=Ie(43001),en=Ie.n(hn),gn=(0,Le.forwardRef)(({use3d:$t,width:Ge,height:Je,callback:ot,showSaveButton:Et},Nt)=>{const pn=(0,Le.useRef)(),jt=(0,Le.useRef)(),[cn,On]=(0,Le.useState)(!1),pi=(0,Le.useRef)({id:pn,appName:"graphing",width:Ge||1e3,height:Je||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,Le.useEffect)(()=>{jt.current=new(en())(pi.current,!0),window.onload=function(){jt.current.inject("applet_container")}},[]);const Fn=()=>{var Lt=window.ggbApplet.getPNGBase64(1,!0,72);return ot&&ot(Lt),Lt};return(0,Le.useEffect)(()=>{pi.current.appName=cn?"3D":"graphing",jt.current.inject("applet_container")},[cn]),(0,Le.useEffect)(()=>{On($t)},[$t]),(0,Le.useImperativeHandle)(Nt,()=>({getImgData:Fn})),Le.createElement(Le.Fragment,null,Le.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:pn}),Le.createElement(Ut.Z,{align:"middle"},Le.createElement(lt.Z,{flex:1},Le.createElement(kt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:cn,onChange:Lt=>On(Lt)})),Le.createElement(lt.Z,null,Le.createElement(qe.ZP,{size:"large",onClick:Fn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),bn=Ie(76562),yn=Ie(6767);const un="link",Jn="upload-image",mn="add-flowchart",Yn="draw-image",ri="add-flowchart",bi="code-block",jn="add-table",ki="------------",Hi={default:ki,left:`:${ki}`,center:`:${ki}:`,right:`${ki}:`};var Fi=Ie(37808);function rr(){}let Cr=0;const gr=1e4,Ni="\u2581",Ti="@\u2581\u2581@",cr="@\u2581@",$e=`
|
|
|
**\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`,Li=["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 ti($t){return/^\d+$/.test($t)?`${$t}px`:$t}const pr=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",dr={[pr+"-B"]:"bold",[pr+"-I"]:"italic"},Qi={[un]:"\u6DFB\u52A0\u94FE\u63A5",[bi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Jn]:"\u6DFB\u52A0\u56FE\u7247",[Yn]:"\u6DFB\u52A0\u753B\u56FE",[mn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[jn]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var So=({defaultValue:$t="",onChange:Ge,width:Je="100%",height:ot=400,miniToolbar:Et=!1,isFocus:Nt=!1,watch:pn,insertTemp:jt,mode:cn="markdown",id:On="markdown-editor-id",showResizeBar:pi=!1,noStorage:Fn=!1,showNullButton:Lt=!1,showNullProgramButton:Ht=!1,hidetoolBar:Pn=!1,fullScreen:Sn=!1,onBlur:Kt,onCMBeforeChange:vn,onFullScreen:Hn,className:Gn="",disablePaste:oi=!1,disabled:Wn=!1,disabledFill:zn=!1,placeholder:Mn="",values:wi="",extraUse:mi})=>{const[En,ei]=(0,Le.useState)(null),[er,Sr]=(0,Le.useState)($t),[Tr,nn]=(0,Le.useState)(pn),[Mi,tr]=(0,Le.useState)(Sn),[vi,or]=(0,Le.useState)(""),[Vi,yr]=(0,Le.useState)(0),[fr,_r]=(0,Le.useState)(ot),[Yr,Ln]=(0,Le.useState)(!1),[oo,kn]=(0,Le.useState)(0),[Di,Lr]=(0,Le.useState)(0),sr=(0,Le.useRef)(),so=(0,Le.useRef)(),Er=(0,Le.useRef)(),mr=(0,Le.useRef)();(0,Le.useEffect)(()=>{const Vn=window.scrollY||window.pageYOffset;Sr(wi),En==null||En.setValue(wi),window.scrollTo(0,Vn)},[wi]),(0,Le.useEffect)(()=>{Hn==null||Hn(Mi)},[Mi]),(0,Le.useEffect)(()=>{if(sr.current){let Vn=function(ci,wn){var zi;if(oi){wn.preventDefault();return}const Gi=wn.clipboardData;if(Gi){const Mr=Gi.types.toString(),Ji=Gi.items;if(Mr==="Files"||Gi.types.indexOf("Files")>-1){if(wn.preventDefault(),cn=="stex")return;try{let Zr=Ji[1];((zi=Ji[0])==null?void 0:zi.kind)==="file"&&(Zr=Ji[0]);const jr=Zr.getAsFile(),$r=jr.name.split(".").pop();(0,wt.I)(jr,Vr=>{var co,ko,sn;Vr.id?((co=jr==null?void 0:jr.type)==null?void 0:co.indexOf("image"))>-1?ni.replaceSelection(`<img width="100%" src="/api/attachments/${Vr.id}?type=${Vr.content_type})" alt="" />`):((ko=jr==null?void 0:jr.type)==null?void 0:ko.indexOf("video"))>-1?ni.replaceSelection(`<video width="100%" controls src="/api/attachments/${Vr.id}"></video>`):((sn=jr==null?void 0:jr.type)==null?void 0:sn.indexOf("pdf"))>-1?ni.replaceSelection(`<a href="/api/attachments/${Vr.id}?type=${jr.type}&disposition=inline" target="_blank">${jr.name}</a>`):Li.includes($r)?ni.replaceSelection(`<a href="/api/attachments/${Vr.id}?type=office&disposition=inline" target="_blank">${jr.name}</a>`):ni.replaceSelection(`[${jr.name}](/api/attachments/${Vr.id}?type=${Vr.content_type})`):(Vr==null?void 0:Vr.status)===401&&(document.location.href="/user/login")})}catch(Zr){yn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const ni=je().fromTextArea(sr.current,{mode:cn,lineNumbers:!Et,lineWrapping:!0,value:$t,autoCloseTags:!0,autoCloseBrackets:!0});return ni.on("keyup",function(ci,wn){wn.keyCode===8&&(ci.getValue()==""?ni.setOption("placeholder",Mn):ni.setOption("placeholder",null))}),ni.on("keydown",function(ci,wn){if(wn.keyCode===8){var zi=an(ci);zi&&wn.preventDefault()}}),Nt&&ni.focus(),ni.on("paste",Vn),Wn&&ni.on("beforeChange",function(ci,wn){(wn.origin==="paste"||wn.origin==="+input")&&wn.cancel()}),ei(ni),()=>{ni.off("paste",Vn)}}},[]);const _o=(0,Le.useCallback)(()=>{if(so.current)try{}catch(Vn){console.log(Vn,"---- to set md editor body height")}},[fr,so,Mi]);(0,Le.useEffect)(()=>{function Vn(){let ni=new Me.Z(ci=>{for(let wn of ci)(wn.target.offsetHeight>0||wn.target.offsetWidth>0)&&(_o(),En.setSize("100%","100%"),En.refresh())});return ni.observe(sr.current.parentElement),ni}if(En){const ni=Vn();return()=>{var ci,wn;(ci=sr.current)!=null&&ci.parentElement&&ni.unobserve((wn=sr.current)==null?void 0:wn.parentElement)}}},[En,_o]),(0,Le.useEffect)(()=>{if(En){let Vn=[];for(const[ni,ci]of Object.entries(dr)){let wn={[ni]:()=>{Nn(ci)}};Vn.push(wn),En.addKeyMap(wn)}return()=>{for(let ni of Vn)En.removeKeyMap(ni)}}},[En]),(0,Le.useEffect)(()=>{Sn!==Mi&&tr(Sn)},[Sn]),(0,Fi.Z)(()=>{if(!Fn&&Vi>0){let Vn=new Date().getTime(),ni=window.sessionStorage.getItem(On);Vn>=Vi+gr&&(!ni||ni!==er)&&(window.sessionStorage.setItem(On,er),Ln(!0))}},gr),(0,Le.useEffect)(()=>{nn(pn)},[En,pn]),(0,Le.useEffect)(()=>{En&&Nt&&En.focus()},[En,Nt]),(0,Le.useEffect)(()=>{if(Tr&&En){let Vn=function(ci){let wn=ci.target;if(mr.current){let zi=wn.scrollTop/wn.scrollHeight;mr.current.scrollTop=mr.current.scrollHeight*zi}};const ni=En.getScrollerElement();return ni.addEventListener("scroll",Vn),()=>{ni.removeEventListener("scroll",Vn)}}},[En,Tr]),(0,Le.useEffect)(()=>{if(En&&vn){let Vn=function(ni,ci){vn(ni,ci)};return En.on("beforeChange",Vn),()=>{En.off("beforeChange",Vn)}}},[En,vn]),(0,Le.useEffect)(()=>{if(En&&Kt){let Vn=function(){Kt(En.getValue())};return En.on("blur",Vn),()=>{En.off("blur",Vn)}}},[En,Kt]);function an(Vn,ni){var ci=Vn.getDoc(),wn=ci.getCursor(),zi=ci.getLine(wn.line),Gi=zi.charAt(wn.ch-1),Mr=zi.lastIndexOf("@\u2581@",wn.ch),Ji=zi.lastIndexOf("@\u2581\u2581@",wn.ch),Zr=Mr>Ji?Mr:Ji,jr=Mr>Ji?3:4;if(Ti.indexOf(Gi)===-1)return null;if(console.log("change1:",ni,Vn,zi,wn,Zr,Mr,Ji,Gi),Zr>=0&&wn.ch-Zr<5){var $r=Zr+jr;return ci.replaceRange("",{line:wn.line,ch:Zr},{line:wn.line,ch:$r}),{line:wn.line,ch:$r}}return null}(0,Le.useEffect)(()=>{if(En){let Vn=function(ni,ci){const wn=ni.getValue();Sr(wn),yr(new Date().getTime()),ni.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ge&&(Ht?Ge(wn,An(wn)):Ge(wn))};return En.on("change",Vn),()=>{En.off("change",Vn)}}},[En,Ge]),(0,Le.useEffect)(()=>{if(En)if($t==null)En.setValue(""),Sr("");else{const Vn=window.scrollY||window.pageYOffset;$t!==En.getValue()&&(En.setValue($t),Sr($t),En.setCursor(Wn?1:En.lineCount(),0),window.scrollTo(0,Vn))}},[En,$t]);const Nn=(0,Le.useCallback)(Vn=>{const ni=En.getCursor(),ci=En.getSelection();let wn=ci.split(`
|
|
|
`);switch(Vn){case"bold":return En.replaceSelection("**"+ci+"**"),ci===""&&En.setCursor(ni.line,ni.ch+2),En.focus();case"italic":return En.replaceSelection("*"+ci+"*"),ci===""&&En.setCursor(ni.line,ni.ch+1),En.focus();case"code":return En.replaceSelection("`"+ci+"`"),ci===""&&En.setCursor(ni.line,ni.ch+1),En.focus();case"inline-latex":return or("inline-latex"),En.focus();case"latex":return En.replaceSelection("```latex\n"+ci+"\n```"),En.setCursor(ni.line+1,ci.length+1),En.focus();case"line-break":return En.replaceSelection(`<br/>
|
|
|
`),En.focus();case"list-ul":return ci===""?En.replaceSelection("- "+ci):En.replaceSelection(wn.map(zi=>zi===""?"":`- ${zi}`).join(`
|
|
|
`)),En.focus();case"list-ol":return ci===""?En.replaceSelection("1. "+ci):En.replaceSelection(wn.map((zi,Gi)=>zi===""?"":`${Gi+1}. ${zi}`).join(`
|
|
|
`)),En.focus();case"add-null-ch":return ci===""&&En.setCursor(ni.line,ni.ch),En.replaceSelection(Ni),En.focus();case"add-signal":return ci===""&&En.setCursor(ni.line,ni.ch),En.replaceSelection(cr),En.focus();case"add-multiple":return ci===""&&En.setCursor(ni.line,ni.ch),En.replaceSelection(Ti),En.focus();case"inster-template-1":return ci===""&&En.setCursor(ni.line,ni.ch),En.replaceSelection($e),En.focus();case"eraser":return En.setValue(""),En.focus();case"trigger-watch":return nn(!Tr),En.focus();case"trigger-full-screen":return tr(!Mi),En.focus();case un:or(un);return;case bi:or(bi);return;case Jn:or(Jn);return;case Yn:or(Yn);return;case"maths-latex":or("maths-latex");return;case mn:or(mn);return;case jn:or(jn);return;default:throw new Error}},[En,Tr,Mi]),on=(0,Le.useCallback)((Vn,ni)=>{var ci,wn,zi,Gi,Mr,Ji;switch(or(""),vi){case un:const{title:co,link:ko}=Vn;return En.replaceSelection(`[${co}](${ko})`),En.focus();case bi:const{language:sn,content:Jr}=Vn;return En.replaceSelection(["```"+sn,Jr,"```"].join(`
|
|
|
`)),En.focus();case"maths-latex":for(var Zr=atob(Vn),jr=new Uint8Array(Zr.length),$r=0;$r<Zr.length;$r++)jr[$r]=Zr.charCodeAt($r);var Vr=new Blob([jr],{type:"image/png"});(0,wt.I)(Vr,Ss=>{Ss.id?En.replaceSelection(``):(Ss==null?void 0:Ss.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":En.replaceSelection("`$$"+Vn+"$$`");break;case Jn:case Yn:case ri:const{src:Dr,alt:ur}=Vn,Ui=ni,Hr=(zi=(wn=(ci=Ui==null?void 0:Ui.name)==null?void 0:ci.split("."))==null?void 0:wn.pop)==null?void 0:zi.call(wn);return((Gi=Ui==null?void 0:Ui.type)==null?void 0:Gi.indexOf("image"))>-1||!(Ui!=null&&Ui.type)?Ui!=null&&Ui.align||Ui!=null&&Ui.width?En.replaceSelection(`<p style="text-align:${Ui.align||"initial"}"><img width="${Ui.width?Ui.width+"%":"initial"}" src="${Dr}" alt="${ur||""}" /></p>`):En.replaceSelection(`<img width="100%" src="${Dr}" alt="${ur||""}" />`):((Mr=Ui==null?void 0:Ui.type)==null?void 0:Mr.indexOf("video"))>-1?En.replaceSelection(`<video width="100%" controls src="${Dr}"></video>`):((Ji=Ui==null?void 0:Ui.type)==null?void 0:Ji.indexOf("pdf"))>-1?En.replaceSelection(`<a href="${Dr}?type=${Ui.type}&disposition=inline" target="_blank">${Ui.name}</a>`):Li.includes(Hr)?En.replaceSelection(`<a href="${Dr}?type=office&disposition=inline" target="_blank">${Ui.name}</a>`):En.replaceSelection(`[${Ui.name}](${Dr})`),En.focus();case jn:const{row:fo,col:uo,align:br}=Vn;let qr=`
|
|
|
`;for(let Ss=0;Ss<fo;Ss++){let Vs=[],Aa=[];for(let oa=0;oa<uo;oa++)Ss===1&&Aa.push(Hi[br]),Vs.push(" ");Ss===1&&(qr+=`| ${Aa.join(" | ")} |
|
|
|
`),qr+=`| ${Vs.join(uo===1?"":" | ")} |
|
|
|
`}return En.replaceSelection(qr+`
|
|
|
`),En.focus();default:throw new Error}},[En,vi]),ft=(0,Le.useMemo)(()=>{switch(vi){case un:return Le.createElement(ct,{callback:on,onCancel:Zn});case bi:return Le.createElement(yt.Z,{callback:on,onCancel:Zn});case Jn:return Le.createElement(wt.Z,{callback:on,onCancel:Zn});case mn:return Le.createElement(Re,{callback:on,onCancel:Zn});case jn:return Le.createElement(vt,{callback:on,onCancel:Zn});case"maths-latex":return Le.createElement(gn,{showSaveButton:!0,callback:on});case"inline-latex":return Le.createElement(bn.Z,{showSaveButton:!0,callback:on});default:return null}},[vi]);function Zn(){or("")}(0,Le.useEffect)(()=>{if(Er.current){let Vn=function(Mr){zi=!0,Gi=Mr.pageY},ni=function(){zi=!1},ci=function(Mr){if(zi){let Ji=Mr.pageY-Gi;Ji<0&&(Ji=0),Ji>300&&(Ji=300);let Zr=ot+Ji+"px";_r(Zr)}},wn=Er.current,zi=!1,Gi=0;return wn.addEventListener("mousedown",Vn),document.addEventListener("mousemove",ci),document.addEventListener("mouseup",ni),()=>{wn.removeEventListener("mousedown",Vn),document.removeEventListener("mousemove",ci),document.removeEventListener("mouseup",ni)}}},[En,Er]),(0,Le.useEffect)(()=>{_r(ot)},[ot]);const si=ti(Je),Ei=ti(fr),yi={width:si,height:Ei},di=(0,Le.useMemo)(()=>{if(Vi){let Vn=new Date(Vi),ni=Vn.getHours(),ci=Vn.getMinutes(),wn=Vn.getSeconds();return ni=ni<10?"0"+ni:ni,ci=ci<10?"0"+ci:ci,wn=wn<10?"0"+wn:wn,`${ni}:${ci}:${wn}`}return 0},[Vi]),An=Vn=>{const ni=[];if(Ht){let ci=-1;Vn=Vn.replace(/(@▁▁@|@▁@)/g,function(wn,zi,Gi){ni.push({multiLine:wn!==cr})})}return ni};function Xn(){window.sessionStorage.removeItem(On),Ln(!1),yr(0)}function $n(){Ln(!1),yr(0),En.setValue(window.sessionStorage.getItem(On))}(0,Le.useEffect)(()=>{Qi[vi]&&vi!==Yn&&vi!==mn&&setTimeout(()=>{const Vn=document.getElementsByClassName("markdown-popup-form")[0],ni=window.innerWidth/2-Vn.offsetWidth/2,ci=window.innerHeight/2-Vn.offsetHeight/2;kn(ni),Lr(ci)},0)},[vi]);const Un=Vn=>{Vn.preventDefault();const ni=Vn.clientX-oo,ci=Vn.clientY-Di;document.body.onmousemove=wn=>{let zi=wn.clientX-ni,Gi=wn.clientY-ci;const Mr=document.getElementsByClassName("markdown-popup-form")[0],Ji=window.innerWidth-Mr.offsetWidth,Zr=window.innerHeight-Mr.offsetHeight;zi=Math.max(0,Math.min(zi,Ji)),Gi=Math.max(0,Math.min(Gi,Zr)),Qn(wn.clientX,wn.clientY,ni,ci)&&(kn(zi),Lr(Gi))},document.body.onmouseup=function(){document.body.onmousemove=null}},Qn=(Vn,ni,ci,wn)=>{const zi=document.body.clientHeight,Gi=document.body.clientWidth;return Vn<20&&ci>Vn||Vn>Gi-20&&ci<Vn||ni<20&&wn>ni||ni>zi-20&&wn<ni?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return Le.createElement(Le.Fragment,null,Le.createElement("div",{className:"markdown-editor-wrapper",ref:so},Le.createElement("div",{className:`markdown-editor-container ${Gn} ${Tr?"on-preview":""} ${Et?"mini":""} ${Mi?"full-screen":""}`,style:yi},Le.createElement(Ae,{insertTemp:jt,watch:Tr,fullScreen:Mi,showNullButton:Lt,showNullProgramButton:Ht,onActionCallback:Nn,hidetoolBar:Pn,extraUse:mi}),Le.createElement("div",{className:"markdown-editor-body"},Le.createElement("div",{className:"codemirror-container"},Le.createElement("textarea",{ref:sr,placeholder:Mn})),Tr?Le.createElement("div",{ref:mr,className:"preview-container"},cn==="stex"&&Le.createElement(ge,{value:er}),cn!=="stex"&&Le.createElement(de.Z,{disabledFill:zn,showProgramFill:Ht,value:er})):null))),pi?Le.createElement("a",{ref:Er,className:"editor-resize"}):null,vi===Yn&&Le.createElement(Ft,{callback:on,onCancel:Zn}),vi===mn&&Le.createElement(Re,{callback:on,onCancel:Zn}),Le.createElement(De.Z,null,Qi[vi]&&vi!==Yn&&vi!==mn?Le.createElement(xt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:oo,top:Di},title:Le.createElement("div",{style:{cursor:"move"},onMouseDown:Un},Qi[vi]),open:!0,onCancel:Zn,footer:null,destroyOnClose:!0,width:vi===mn?"1200px":null,height:vi===mn?"80vh":null,className:"markdown-popup-form"},ft):null))}},17077:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return Pe},I:function(){return De}});var Le=Ie(28284),Se=Ie(6767),je=Ie(37568),Me=Ie(77736),Ce=Ie(71051),xe=Ie(47889),be=Ie(99571),ye=Ie(46699),we=Ie(59301),pe=Ie(59301),de=Object.defineProperty,ge=Object.defineProperties,fe=Object.getOwnPropertyDescriptors,ue=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,oe=(Oe,Ze,qe)=>Ze in Oe?de(Oe,Ze,{enumerable:!0,configurable:!0,writable:!0,value:qe}):Oe[Ze]=qe,re=(Oe,Ze)=>{for(var qe in Ze||(Ze={}))ee.call(Ze,qe)&&oe(Oe,qe,Ze[qe]);if(ue)for(var qe of ue(Ze))z.call(Ze,qe)&&oe(Oe,qe,Ze[qe]);return Oe},ae=(Oe,Ze)=>ge(Oe,fe(Ze));const{useForm:le}=Le.default,me={width:280,marginRight:10},ve={labelCol:{span:5},wrapperCol:{span:19}};var Pe=({callback:Oe,onCancel:Ze})=>{const[qe]=le();let Xe=(0,we.useRef)();function mt(at){Xe.current.width=qe.getFieldValue("width"),Xe.current.align=qe.getFieldValue("align"),Oe(at,Xe.current)}function pt(at,_t){if(at.status===-1){Se.ZP.error(at.message);return}qe.setFieldsValue({src:`/api/attachments/${at.id}`,type:_t.type})}function Mt(at){let _t=at.target.files[0];Xe.current=_t,De(_t,pt)}return pe.createElement(Le.default,ae(re({form:qe},ve),{className:"upload-image-panel",onFinish:mt,style:{width:470,overflow:"hidden"}}),pe.createElement(Le.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},pe.createElement("div",{className:"flex-container"},pe.createElement(Le.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},pe.createElement(je.default,{style:me})),pe.createElement(Ae,{onFileChange:Mt}))),pe.createElement(Le.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},pe.createElement(je.default,{style:{width:264}})),pe.createElement(Le.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},pe.createElement(Me.Z,null,pe.createElement(Le.default.Item,{name:"width",style:{margin:0}},pe.createElement(Ce.Z,{style:{width:264}})),pe.createElement("span",{className:"ml8"},"%"))),pe.createElement(Le.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},pe.createElement(xe.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"}]})),pe.createElement("aside",null,pe.createElement(Le.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},pe.createElement(be.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),pe.createElement(be.ZP,{type:"default",onClick:Ze},"\u53D6\u6D88"))))};function Ae({onFileChange:Oe}){return pe.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",pe.createElement("input",{type:"file",onChange:Oe}))}function De(Oe,Ze){if(!Oe)throw new String("\u6CA1\u6709\u6587\u4EF6");let qe=new FormData;qe.append("editormd-image-file",Oe),qe.append("file_param_name","editormd-image-file"),qe.append("byxhr","true");var Xe=new window.XMLHttpRequest;Xe.withCredentials=!0,Xe.addEventListener("load",function(mt){Ze(JSON.parse(mt.target.responseText),Oe)},!1),Xe.addEventListener("error",function(mt){console.error(mt)},!1),Xe.open("POST",`${ye.KI}/api/attachments.json`),Xe.send(qe)}},91558:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return je}});var Le=Ie(59301),Se=Ie(4676);class je extends Le.Component{constructor(Ce){super(Ce);const xe=window.document;this.node=xe.createElement("div"),xe.body.appendChild(this.node)}render(){const{children:Ce}=this.props;return(0,Se.createPortal)(Ce,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},75975:function(xn,ln,Ie){"use strict";Ie.d(ln,{SV:function(){return Dt},ZP:function(){return Ft}});var Le=Ie(59301),Se=Ie(76374);const je={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"]},Me={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"]},Ce={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 <iostream>",content:["#include <iostream>"].join(`
|
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
|
`)}]},xe={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(`
|
|
|
`)}]},be={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 ye=Ie(53184),we=Ie.n(ye),pe=(Qt,Yt,Jt)=>new Promise((lt,Ue)=>{var Be=et=>{try{ht(Jt.next(et))}catch(Ve){Ue(Ve)}},tt=et=>{try{ht(Jt.throw(et))}catch(Ve){Ue(Ve)}},ht=et=>et.done?lt(et.value):Promise.resolve(et.value).then(Be,tt);ht((Jt=Jt.apply(Qt,Yt)).next())});const de={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"]}},ge=(Qt,Yt,Jt,lt)=>{const Ue=Yt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Jt.lineNumber,endColumn:Jt.column});return Array.from(new Set(Ue.match(/\b\w{2,}\b/g)||[])).map(tt=>({label:tt,kind:Qt.languages.CompletionItemKind.Text,insertText:tt,range:lt}))},fe=(Qt,Yt,Jt,lt)=>{Qt.languages.registerCompletionItemProvider(Yt,{provideCompletionItems(Ue,Be){const tt=Ue.getWordUntilPosition(Be),ht={startLineNumber:Be.lineNumber,endLineNumber:Be.lineNumber,startColumn:tt.startColumn,endColumn:tt.endColumn},et=Ue.getLineContent(Be.lineNumber).substring(tt.startColumn-2,tt.endColumn);return{suggestions:[...ge(Qt,Ue,Be,ht),...Jt.map(Re=>({label:Re,kind:Qt.languages.CompletionItemKind.Keyword,documentation:Re,insertText:Re,insertTextRules:Qt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ht})),...lt.map(Re=>({label:Re.label,kind:Qt.languages.CompletionItemKind.Snippet,documentation:Re.content,insertText:et.startsWith("#")?Re.content.replace(/#/,""):Re.content,insertTextRules:Qt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ht}))]}}})};var ue=Qt=>{de.languages.forEach(Yt=>{Qt.languages.registerDocumentFormattingEditProvider(Yt,{provideDocumentFormattingEdits(Jt){return pe(this,null,function*(){const lt=we()(Jt.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:Jt.getFullModelRange(),text:lt}]})}})}),fe(Qt,"java",Me.keywords,Me.quickKey),fe(Qt,"cpp",Ce.keywords,Ce.quickKey),fe(Qt,"c",je.keywords,[]),fe(Qt,"python",xe.keywords,xe.quickKey),fe(Qt,"scala",be.keywords,be.quickKey)};const ee="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var z=Object.defineProperty,oe=(Qt,Yt,Jt)=>Yt in Qt?z(Qt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Qt[Yt]=Jt,re=(Qt,Yt,Jt)=>oe(Qt,typeof Yt!="symbol"?Yt+"":Yt,Jt);const ae=class mx{constructor(Yt,Jt,lt){this.placeholder=Yt,this.editor=Jt,this.monaco=lt,Jt.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return mx.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)}};re(ae,"ID","editor.widget.placeholderHint");var me=ae,ve=Ie(96236),Pe=Ie(6767),Ae=Ie(25399),De=Ie(89392),Oe=Ie(49535),Ze=Ie(56102),qe=Object.defineProperty,Xe=Object.defineProperties,mt=Object.getOwnPropertyDescriptors,pt=Object.getOwnPropertySymbols,Mt=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable,_t=(Qt,Yt,Jt)=>Yt in Qt?qe(Qt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Qt[Yt]=Jt,dt=(Qt,Yt)=>{for(var Jt in Yt||(Yt={}))Mt.call(Yt,Jt)&&_t(Qt,Jt,Yt[Jt]);if(pt)for(var Jt of pt(Yt))at.call(Yt,Jt)&&_t(Qt,Jt,Yt[Jt]);return Qt},Rt=(Qt,Yt)=>Xe(Qt,mt(Yt)),ut=(Qt,Yt)=>{var Jt={};for(var lt in Qt)Mt.call(Qt,lt)&&Yt.indexOf(lt)<0&&(Jt[lt]=Qt[lt]);if(Qt!=null&&pt)for(var lt of pt(Qt))Yt.indexOf(lt)<0&&at.call(Qt,lt)&&(Jt[lt]=Qt[lt]);return Jt},rt=(Qt,Yt,Jt)=>new Promise((lt,Ue)=>{var Be=et=>{try{ht(Jt.next(et))}catch(Ve){Ue(Ve)}},tt=et=>{try{ht(Jt.throw(et))}catch(Ve){Ue(Ve)}},ht=et=>et.done?lt(et.value):Promise.resolve(et.value).then(Be,tt);ht((Jt=Jt.apply(Qt,Yt)).next())});function ct(Qt){return/^\d+$/.test(Qt)?`${Qt}px`:Qt}function yt(){}let wt=!1;const xt={"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 Ut(Qt=[]){let Yt=Qt;if(Array.isArray(Qt)){for(let Jt=0;Jt<Qt.length;Jt++){let lt=xt[Qt[Jt]];if(lt)return lt}return Yt[0]}return xt[Yt]||Yt}let zt=null;const dn=()=>rt(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Qt){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Qt)}});var Ft=Qt=>{var Yt=Qt,{width:Jt="100%",height:lt="100%",value:Ue,language:Be="javascript",style:tt={},options:ht={},overrideServices:et={},theme:Ve="vs-dark",onEditBlur:Re,isCopy:ze=!1,onSave:it,autoHeight:Ke=!1,forbidCopy:We=!1,onChange:vt=yt,editorDidMount:kt=yt,onFocus:hn=yt,onBreakPoint:en=yt,breakPointValue:Gt=[],filename:gn="educoder.txt",errorLine:bn,errorContent:yn="",highlightLine:un,openBreakPoint:Jn=!1,placeholder:mn="",showMiniMap:Yn=!0}=Yt,ri=ut(Yt,["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 bi=(0,Le.useRef)(),jn=(0,Le.useRef)({}),ki=(0,Le.useRef)(),Hi=(0,Le.useRef)(),Fi=(0,Le.useRef)([]),rr=(0,Le.useRef)(!1),Cr=(0,Le.useRef)(),gr=(0,Le.useRef)(),Ni=(0,Le.useRef)(!1),[Ti,cr]=(0,Le.useState)(!1);function $e(){let jt;return bi.current&&(jt=new Se.Z(cn=>{for(let On of cn)(On.target.offsetHeight>0||On.target.offsetWidth>0)&&jn.current.instance.layout()}),jt.observe(bi.current)),jt}function Li(){Pe.ZP.warning({content:decodeURIComponent(ee),key:"monaco-editor-tip"})}const ti=()=>{let jt=jn.current.instance;if(Ue!=null&&jt&&Ti){const cn=jt.getModel();cn&&Ue!==cn.getValue()&&(wt=!0,cn.setValue(Ue),jt.layout(),wt=!1)}};(0,Le.useEffect)(()=>{const jt=Oe.Z.subscribe("formatDocument",cn=>{var On;let pi=jn.current.instance;(On=pi==null?void 0:pi.getAction)==null||On.call(pi,"editor.action.formatDocument").run()});return window.updateMonacoValue=cn=>{vt(cn)},jt},[]),(0,Le.useEffect)(()=>{var jt;let cn=jn.current.instance;Hi.current&&clearTimeout(Hi.current),Hi.current=setTimeout(()=>{ti()},500),Ue&&(Ue!=null&&Ue.length)&&((jt=cn==null?void 0:cn.updateOptions)==null||jt.call(cn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ue.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ue,Ti,jn.current]),(0,Le.useEffect)(()=>{if(bn&&jn.current&&jn.current.instance){let cn=jn.current.instance;cn.changeViewZones(function(On){var pi=document.createElement("div");pi.style.padding="10px 20px",pi.style.width="calc(100% - 20px)",pi.className="my-error-line-wrp",pi.innerHTML=yn,On.addZone({afterLineNumber:bn||11,heightInLines:3,domNode:pi})});var jt={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}};cn.addOverlayWidget(jt),cn.revealPositionInCenter({lineNumber:20,column:1})}},[bn,jn.current,Ti]);const Oi=(jt="",cn)=>{if(!jt||jt.trim()==="")return!0;const pi=jn.current.instance.getModel().getLineTokens(cn);let Fn=!1;for(let Lt=0;Lt<2;Lt++)pi.getStandardTokenType(Lt)===1&&(Fn=!0);return Fn};(0,Le.useEffect)(()=>{var jt;const cn=(jt=jn.current)==null?void 0:jt.instance;if(cn&&Ti&&We){const On=cn.onDidBlurEditorWidget(()=>{Ni.current=!1}),pi=cn.onDidFocusEditorText(()=>{Ni.current=!0});return()=>{On.dispose(),pi.dispose()}}},[jn.current,Ti,We]),(0,Le.useEffect)(()=>{var jt;if((jt=jn.current)!=null&&jt.instance&&Ti&&Jn){let cn=jn.current.instance,On=cn.getModel();if(!On)return;(()=>{var Wn;let zn=[],Mn=[];const wi=On.getAllDecorations();for(let En of wi)En.options.className==="highlighted-line"&&(zn.push((Wn=En==null?void 0:En.range)==null?void 0:Wn.startLineNumber),Mn.push(En==null?void 0:En.id));if(un===zn[0])return;On.deltaDecorations(Mn,[]);const mi=On.getLineCount();un&&un<=mi&&(cn.deltaDecorations([],[{range:new zt.Range(un,1,un,On.getLineMaxColumn(un)),options:{isWholeLine:!0,className:"highlighted-line"}}]),cn.revealLineInCenter(un))})();const Fn=(Wn=!1)=>{var zn;let Mn=[],wi=[];const mi=On.getAllDecorations();for(let En of mi)En.options.linesDecorationsClassName==="breakpoints-select"&&(Mn.push((zn=En==null?void 0:En.range)==null?void 0:zn.startLineNumber),wi.push(En==null?void 0:En.id));if(Wn)return{lines:Mn,ids:wi};en(Mn)},Lt=Wn=>rt(void 0,null,function*(){let zn={range:new zt.Range(Wn,1,Wn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield On.deltaDecorations([],[zn]),Fn()}),Ht=Wn=>rt(void 0,null,function*(){let zn=[];const Mn=cn.getLineDecorations(Wn);for(let wi of Mn)wi.options.linesDecorationsClassName==="breakpoints-select"&&zn.push(wi.id);yield On.deltaDecorations(zn,[]),Fn()}),Pn=Wn=>{let zn=cn.getLineDecorations(Wn);for(let Mn of zn)if(Mn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,De.isEqual)(Gt,Fn(!0).lines)){On.deltaDecorations(Fn(!0).ids,[]);const Wn=Gt.map(zn=>({range:new zt.Range(zn,1,zn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));On.deltaDecorations([],Wn)}const Sn=cn.onDidChangeModelContent(Wn=>{let zn=cn.getPosition();if(zn){let Mn=zn.lineNumber;clearTimeout(gr.current),gr.current=setTimeout(()=>{Oi(On.getLineContent(Mn),Mn)?Ht(Mn):Pn(Mn)?(Ht(Mn),Lt(Mn)):Fn()},100)}}),Kt=cn.onMouseDown(Wn=>{var zn,Mn,wi;if(Wn.target.detail&&((wi=(Mn=(zn=Wn.target)==null?void 0:zn.element)==null?void 0:Mn.className)!=null&&wi.includes("line-numbers"))){let mi=Wn.target.position.lineNumber;if(Oi(On.getLineContent(mi),mi))return;Pn(mi)?Ht(mi):Lt(mi)}}),vn=Wn=>{let zn={range:new zt.Range(Wn,1,Wn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Fi.current=cn.deltaDecorations(Fi.current,[zn])},Hn=()=>{Fi.current=cn.deltaDecorations(Fi.current,[])},Gn=cn.onMouseMove(Wn=>{var zn,Mn,wi;if(Hn(),Wn.target.detail&&((wi=(Mn=(zn=Wn.target)==null?void 0:zn.element)==null?void 0:Mn.className)!=null&&wi.includes("line-numbers"))){let mi=Wn.target.position.lineNumber;if(Oi(On.getLineContent(mi),mi))return;vn(mi)}}),oi=cn.onMouseLeave(()=>{Hn()});return()=>{Sn.dispose(),Kt.dispose(),Gn.dispose(),oi.dispose()}}},[jn.current,Ti,Gt,un,Jn,Be]),(0,Le.useEffect)(()=>{var jt;(jt=jn.current)!=null&&jt.instance&&Jn&&jn.current.instance.setPosition({lineNumber:0,column:0})},[un]);function pr(){let jt=jn.current.instance;if(jt){const cn=jt.getSelection(),On=jn.current.pastePos||{},pi=new zt.Range(On.startLineNumber||cn.endLineNumber,On.startColumn||cn.endColumn,On.endLineNumber||cn.endLineNumber,On.endColumn||cn.endColumn);setTimeout(()=>{jt.executeEdits("",[{range:pi,text:""}])},300)}}function dr(jt){(window.navigator.platform.match("Mac")?jt.metaKey:jt.ctrlKey)&&jt.keyCode==83&&(jt.preventDefault(),it())}const Qi=()=>{if(Ke&&jn.current.instance){const jt=jn.current.instance.getContentHeight();Nt(jt<lt?lt:jt)}else Nt(lt)};function So(jt){var cn=document.createEvent("MouseEvents");cn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),jt.dispatchEvent(cn)}const $t=jt=>{if(!Ni.current)return;const{keyCode:cn,ctrlKey:On,metaKey:pi,target:Fn,type:Lt}=jt;return(Lt==="paste"||(cn===67||cn===86)&&(pi||On))&&Fn.nodeName==="TEXTAREA"&&(Li(),jt.preventDefault()),!1};function Ge(jt,cn){var On=window.URL||window.webkitURL||window,pi=new Blob([cn]),Fn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Fn.href=On.createObjectURL(pi),Fn.download=jt,So(Fn)}(0,Le.useEffect)(()=>{Qi()},[Qi]),(0,Le.useEffect)(()=>{bi.current&&!Ti&&Promise.all([Ie.e(8909),Ie.e(6656)]).then(Ie.bind(Ie,71448)).then(jt=>{try{zt=jt,jn.current.instance=zt.editor.create(bi.current,{value:Ue,language:Ut(Be),theme:Ve,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Yn||!1}},et);const cn=jn.current.instance;let Fn=[...ve.BH._menuItems].find(Sn=>Sn[0]._debugName=="EditorContext")[1],Lt=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Ht=(Sn,Kt)=>{var vn,Hn;let Gn=Sn._first;do Kt.includes((Hn=(vn=Gn.element)==null?void 0:vn.command)==null?void 0:Hn.id)&&Sn._remove(Gn);while(Gn=Gn.next)};if(kt(cn,zt),setTimeout(()=>{Qi(),jn.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Ge(gn||"educoder.txt",cn.getValue())}})},500),jn.current.subscription=cn.onDidChangeModelContent(Sn=>{rr.current?clearTimeout(Cr.current):(Qi(),vt(cn.getValue(),Sn)),Cr.current=setTimeout(()=>{rr.current=!1},500)}),window.Monaco||ue(zt,Ut(Be)),We&&(Ht(Fn,Lt),bi.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",$t),window.removeEventListener("paste",$t),window.addEventListener("keydown",$t),window.addEventListener("paste",$t)),window.Monaco=zt,Re&&cn.onDidBlurEditorWidget(()=>{Re(cn.getValue())}),hn&&cn.onDidFocusEditorText(()=>{We&&dn(),hn(cn.getValue())}),We){dn();try{cn.onDidPaste(Sn=>{const Kt=cn.getSelection(),vn=jn.current.pastePos||{},Hn=new zt.Range(vn.startLineNumber||Kt.endLineNumber,vn.startColumn||Kt.endColumn,vn.endLineNumber||Kt.endLineNumber,vn.endColumn||Kt.endColumn);cn.executeEdits("",[{range:Sn.range,text:""}])})}catch(Sn){}}let Pn=$e();return mn&&typeof mn=="string"&&new me(mn,cn,zt),cr(!0),()=>{const Sn=jn.current.instance;Sn.dispose();const Kt=Sn.getModel();Kt&&Kt.dispose(),jn.current.subscription&&jn.current.subscription.dispose(),Pn.unobserve(bi.current)}}catch(cn){}})},[]),(0,Le.useEffect)(()=>{if(jn.current.instance&&Ti)return document.addEventListener("keydown",dr,!1),()=>{document.removeEventListener("keydown",dr)}},[it,Ti]),(0,Le.useEffect)(()=>{let jt=jn.current.instance;if(jt&&Ti){let cn=Ut(Be);zt.editor.setModelLanguage(jt.getModel(),cn)}},[Be,Ti]),(0,Le.useEffect)(()=>{jn.current.instance&&Ti&&zt.editor.setTheme(Ve)},[Ve,Ti]),(0,Le.useEffect)(()=>{let jt=jn.current.instance;ki.current=ht,jt&&Ti&&(jt.updateOptions(dt({},ht)),setTimeout(()=>{jt.getModel().updateOptions(dt({},ht))},200))},[JSON.stringify(ht),Ti]),(0,Le.useEffect)(()=>{let jt=jn.current.instance;jt&&Ti&&jt.layout()},[Jt,lt,Ti]);const[Je,ot]=(0,Le.useState)(ct(Jt)),[Et,Nt]=(0,Le.useState)(ct(lt)),pn=Rt(dt({},tt),{width:Je,height:Et,position:"relative"});return Le.createElement("div",{className:"my-monaco-editor",ref:bi,style:pn},ze&&Le.createElement(Ze.CopyToClipboard,{text:Ue,onCopy:()=>Pe.ZP.success("\u590D\u5236\u6210\u529F")},Le.createElement(Ae.Z,{title:"\u590D\u5236\u4EE3\u7801"},Le.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},Le.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Dt({width:Qt="100%",height:Yt="100%",original:Jt,modified:lt,language:Ue,options:Be={}}){const tt=(0,Le.useRef)(),[ht,et]=(0,Le.useState)(null);function Ve(Ke){let We;return tt.current&&(We=new Se.Z(vt=>{for(let kt of vt)(kt.target.offsetHeight>0||kt.target.offsetWidth>0)&&Ke.layout()}),We.observe(tt.current)),We}(0,Le.useEffect)(()=>(tt.current&&Promise.all([Ie.e(8909),Ie.e(9404)]).then(Ie.bind(Ie,2550)).then(Ke=>{zt=Ke;const We=zt.editor.createDiffEditor(tt.current,Rt(dt({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},Be),{wordWrap:!0}));et(We);let vt=Ve(We);return()=>{We.dispose();const kt=We.getModel();kt&&kt.dispose(),vt.unobserve(tt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,Le.useEffect)(()=>{ht&&ht.setModel({original:zt.editor.createModel(Jt,Ue),modified:zt.editor.createModel(lt,Ue)})},[Jt,lt,Ue,ht]);const Re=ct(Qt),ze=ct(Yt),it={width:Re,height:ze};return Le.createElement("div",{className:"my-diff-editor",ref:tt,style:it})}},58397:function(xn,ln,Ie){"use strict";var Le=Ie(39744),Se=Ie(82326),je=Ie(71411),Me=Ie(59301);const Ce=Se.default.Option;ln.Z=({isTheoretical:xe,onFontSizeChange:be,cmFontSize:ye,cmCodeMode:we,autoFormat:pe,onCodeModeChange:de,onTabToSpace:ge,onAutoFormat:fe,formatDocument:ue,className:ee="",tabToSpace:z,children:oe,code_editor:re,challenge:ae,shixun_environment_id:le,shixun_environments:me})=>{var ve;const Pe={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"},Ae=(ve=me==null?void 0:me.find(De=>De.shixun_environment_id===le))==null?void 0:ve.program_language;return console.log("----",Ae,me,le,re),Me.createElement("div",{className:`tpi-code-setting ${ee}`},Me.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),Me.createElement("section",null,Me.createElement("div",{className:"file-item"},Me.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),Me.createElement(Se.default,{bordered:!1,size:"small",value:we,onChange:de},Me.createElement(Ce,{value:"vs"},"\u767D\u8272\u80CC\u666F"),Me.createElement(Ce,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!xe&&Me.createElement(Me.Fragment,null,Me.createElement("div",{className:"file-item"},Me.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),Me.createElement(Se.default,{bordered:!1,size:"small",value:ye,onChange:be},Me.createElement(Ce,{value:12},"12px"),Me.createElement(Ce,{value:14},"14px"),Me.createElement(Ce,{value:16},"16px"),Me.createElement(Ce,{value:18},"18px"),Me.createElement(Ce,{value:20},"20px"),Me.createElement(Ce,{value:22},"22px"))),Me.createElement("div",{className:"file-item"},Me.createElement("b",null,"Tab\u8F6C\u6362"),Me.createElement(je.Z,{checked:z,onChange:ge})),Me.createElement("div",{className:"file-item",onClick:ue},Me.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!xe&&Me.createElement(Me.Fragment,null,Me.createElement("h3",null,"\u5FEB\u6377\u952E"),Me.createElement("section",null,Me.createElement("div",{className:"file-item"},Me.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),Me.createElement("span",null,"Ctrl + S")),Me.createElement("div",{className:"file-item"},Me.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),Me.createElement("span",null,"F1 / Alt + F1")),Me.createElement("div",{className:"file-item"},Me.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),Me.createElement("span",null,"Ctrl + ]/[")),Me.createElement("div",{className:"file-item"},Me.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),Me.createElement("span",null,"Ctrl + Shift + \\")),Me.createElement("div",{className:"file-item"},Me.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),Me.createElement("span",null,"Home")),Me.createElement("div",{className:"file-item"},Me.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),Me.createElement("span",null,"End"))),oe),!xe&&Me.createElement(Me.Fragment,null,Me.createElement("h3",null,"\u5FEB\u6377\u952E"),Me.createElement("section",null,Ae&&Me.createElement("div",{className:"file-item"},Me.createElement("b",null,"\u7F16\u7A0B\u8BED\u8A00"),Me.createElement("span",null,Ae)),Me.createElement("div",{className:"file-item"},Me.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),Me.createElement("span",null,Pe[ae==null?void 0:ae.difficulty])),Me.createElement("div",{className:"file-item"},Me.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),Me.createElement("span",null,re==null?void 0:re.name)),Me.createElement("div",{className:"file-item"},Me.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),Me.createElement("span",null,re!=null&&re.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},37808:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return Se}});var Le=Ie(59301);function Se(je,Me){const Ce=(0,Le.useRef)();(0,Le.useEffect)(()=>{Ce.current=je}),(0,Le.useEffect)(()=>{function xe(){Ce.current()}if(Me!==null){let be=setInterval(xe,Me);return()=>clearInterval(be)}},[Me])}},10866:function(xn,ln,Ie){"use strict";Ie.d(ln,{Im:function(){return Ze},ZP:function(){return at},gZ:function(){return pt}});var Le=Ie(59301),Se=Ie(37568),je=Ie(99571),Me=Ie(84105),Ce=Ie(87395),xe=Ie(24363),be=Ie(24334),ye=Ie(86074),we=Ie(76902),pe=Ie(51257),de=Ie(94268),ge=Ie(34376),fe=Ie(92310),ue=Ie.n(fe),ee=Ie(59301),z=Object.defineProperty,oe=Object.defineProperties,re=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertySymbols,le=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable,ve=(_t,dt,Rt)=>dt in _t?z(_t,dt,{enumerable:!0,configurable:!0,writable:!0,value:Rt}):_t[dt]=Rt,Pe=(_t,dt)=>{for(var Rt in dt||(dt={}))le.call(dt,Rt)&&ve(_t,Rt,dt[Rt]);if(ae)for(var Rt of ae(dt))me.call(dt,Rt)&&ve(_t,Rt,dt[Rt]);return _t},Ae=(_t,dt)=>oe(_t,re(dt));const{TextArea:De}=Se.default,Oe={visible:!1,tabIndex:"0"},Ze={[xe.h.HIDE_COMPILE_STATUS]:"\u6682\u4E0D\u652F\u6301\u67E5\u770B",[xe.h.NOMATCH]:"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",[xe.h.OK]:"\u8C03\u8BD5\u901A\u8FC7",2:"\u8C03\u8BD5\u8D85\u65F6",3:"\u8C03\u8BD5pod\u5931\u8D25",4:"\u7F16\u8BD1\u5931\u8D25",5:"\u6267\u884C\u5931\u8D25"};var qe=(_t=>(_t[_t.SET_VISIBLE=0]="SET_VISIBLE",_t[_t.SET_TABINDEX=1]="SET_TABINDEX",_t))(qe||{});function Xe(_t,dt){switch(dt.type){case 0:return Ae(Pe({},_t),{visible:dt.payload});case 1:return Ae(Pe({},_t),{tabIndex:dt.payload});default:throw new Error}}function mt({value:_t,className:dt}){const[Rt,ut]=(0,Le.useState)(!1),rt=(0,Le.useRef)(),ct=(0,Le.useRef)();return(0,Le.useEffect)(()=>{Rt&&(ct.current.reset(),ct.current.write((0,pe.pp)(_t||"")))},[_t,Rt]),(0,Le.useEffect)(()=>{var yt,wt,xt,Ut;if(rt.current){ct.current=new ge.Terminal({fontSize:14,disableStdin:!0}),ct.current.open(rt.current);const zt=rt.current.offsetWidth-14,dn=((Ut=(xt=(wt=(yt=ct.current)==null?void 0:yt._core)==null?void 0:wt._renderService)==null?void 0:xt.dimensions)==null?void 0:Ut.actualCellWidth)||9.5,Ft=Math.ceil(zt/dn);ct.current.resize(Ft,8),ut(!0)}},[]),ee.createElement("div",{ref:rt,className:ue()("XtermText-valueRef",dt)})}function pt(_t){const{status:dt,error_msg:Rt,output:ut,input:rt,expected_output:ct,is_file:yt,input_file_url:wt,output_file_url:xt,expected_output_file_url:Ut}=_t;let zt=null;const dn={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(dt){case xe.h.NOMATCH:zt=ee.createElement(ee.Fragment,null,ee.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!yt&&ee.createElement(mt,{className:"mb10",value:rt}),yt&&ee.createElement("div",{style:dn},ee.createElement("a",{onClick:()=>(0,pe.LR)(wt,rt)},rt)),ee.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!yt&&ee.createElement(mt,{className:"mb10",value:ut&&be.Base64.decode(ut)||""}),yt&&ee.createElement("div",{style:dn},ee.createElement("a",{onClick:()=>(0,pe.LR)(xt,ut)},ut)),ee.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!yt&&ee.createElement(mt,{className:"mb10",value:ct&&be.Base64.decode(ct)||""}),yt&&ee.createElement("div",{style:dn},ee.createElement("a",{onClick:()=>(0,pe.LR)(Ut,ct)},ct)));break;case xe.h.EXECUTEFAILURE:zt=ee.createElement(ee.Fragment,null,ee.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!yt&&ee.createElement(we.Z,{value:rt,style:dn}),yt&&ee.createElement("div",{style:dn},ee.createElement("a",{onClick:()=>(0,pe.LR)(wt,rt)},rt)),ee.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ee.createElement("pre",{className:"error"},be.Base64.decode(Rt)));break;case xe.h.COMPILEFAILURE:zt=ee.createElement(ee.Fragment,null,ee.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!yt&&ee.createElement(we.Z,{value:rt,style:dn}),yt&&ee.createElement("div",{style:dn},ee.createElement("a",{onClick:()=>(0,pe.LR)(wt,rt)},rt)),ee.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ee.createElement("pre",{className:"error"},be.Base64.decode(Rt)));break;case xe.h.PODFAILURE:zt=ee.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case xe.h.TIMEOUT:zt=ee.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return ee.createElement(ee.Fragment,null," ",zt," ")}function Mt(_t){const{status:dt,error_msg:Rt,execute_time:ut,output:rt,input:ct,expected_output:yt,is_file:wt,input_file_url:xt,output_file_url:Ut,expected_output_file_url:zt}=_t;let dn=null;switch(dt){case xe.h.OK:dn=ee.createElement(ee.Fragment,null,ee.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",ut,"\u79D2"),ee.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),ee.createElement("pre",null,be.Base64.decode(rt)));break;case xe.h.NOMATCH:dn=ee.createElement(ee.Fragment,null,ee.createElement("p",null,"\u8F93\u5165\uFF1A",ee.createElement("pre",null,ct)),ee.createElement("p",null,"\u8F93\u51FA\uFF1A",rt&&be.Base64.decode(rt)),ee.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",yt&&be.Base64.decode(yt)));break;case xe.h.EXECUTEFAILURE:dn=ee.createElement(ee.Fragment,null,ee.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",ee.createElement("pre",null,ct)),ee.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ee.createElement("pre",{className:"error"},be.Base64.decode(Rt)));break;case xe.h.COMPILEFAILURE:dn=ee.createElement(ee.Fragment,null,ee.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",ee.createElement("pre",null,ct)),ee.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ee.createElement("pre",{className:"error"},be.Base64.decode(Rt)));break;case xe.h.PODFAILURE:dn=ee.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case xe.h.TIMEOUT:dn=ee.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return ee.createElement(ee.Fragment,null," ",dn," ")}var at=({id:_t,is_file:dt,input:Rt,debuging:ut,submitting:rt,executingMessage:ct,debugResult:yt,onChangeInput:wt,onDebugCode:xt,onSubmitCode:Ut})=>{const[zt,dn]=(0,Le.useReducer)(Xe,Oe),{visible:Ft,tabIndex:Dt}=zt;(0,Le.useEffect)(()=>{dn({type:0,payload:!1})},[_t]);function Qt(Ue){let Be=Ue.target.id;dn({type:1,payload:Be})}function Yt(){dn({type:0,payload:!Ft})}const Jt=(0,Le.useMemo)(()=>{if(yt){const{status:Ue}=yt;return ee.createElement(ee.Fragment,null,Mt(yt))}return null},[yt]);function lt(){dn({type:0,payload:!0}),dn({type:1,payload:"1"}),xt()}return ee.createElement("div",{className:"test-case-panel"},ee.createElement("div",{className:`test-case-panel-body ${Ft?"active":""}`},ee.createElement("ul",{className:"s-navs"},ee.createElement("li",null,ee.createElement("a",{className:"active"},"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"))),ee.createElement(de.Z,{leftTitle:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B",rightTitle:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C",style:{height:240},leftNode:ee.createElement(De,{placeholder:"\u8BF7\u8F93\u5165\u81EA\u6D4B\u7528\u4F8B\uFF08\u5982\u679C\u672A\u586B\u5199\uFF0C\u9996\u6B21\u81EA\u6D4B\u8FD0\u884C\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u586B\u5145\u7B2C\u4E00\u4E2A\u975E\u9690\u85CF\u7684\u6587\u672C\u7C7B\u578B\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF09",value:dt?"":Rt,onChange:wt}),rightNode:ut?ee.createElement(ye.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):yt?Jt:ee.createElement("p",{style:{color:"#536879"}},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D")})),ee.createElement("a",{className:`btn-collapse ${Ft?"up":""}`,onClick:Yt},Ft?ee.createElement(Me.Z,null):ee.createElement(Ce.Z,null)),ee.createElement("footer",{className:"footer"},ee.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),ee.createElement("div",{className:"flex-container"},ee.createElement(je.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),ee.createElement(je.ZP,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),ee.createElement(je.ZP,{className:"btn-green",type:"ghost",loading:ut,onClick:lt},"\u8C03\u8BD5\u4EE3\u7801"),ee.createElement(je.ZP,{type:"primary",className:"custom-ant-disabled",loading:rt,disabled:rt,onClick:()=>{dn({type:0,payload:!1}),Ut()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},30197:function(xn,ln,Ie){"use strict";Ie.r(ln),Ie.d(ln,{default:function(){return yp}});var Le=Ie(59301),Se=Ie(10906),je=Ie(76618),Me=Ie(25690),Ce=Ie(11938),xe=Ie(6767),be=Ie(62957),ye=Ie(29787),we=Ie(82326),pe=Ie(94881),de=Ie(8343),ge=Ie(346),fe=Ie(87169),ue=Ie(30641),ee=Ie(75975),z=Ie(91558),oe=Ie(23992),re=Ie(58397),ae=Ie(59301),le=Object.defineProperty,me=Object.defineProperties,ve=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,Oe=(Ot,Xt,qt)=>Xt in Ot?le(Ot,Xt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):Ot[Xt]=qt,Ze=(Ot,Xt)=>{for(var qt in Xt||(Xt={}))Ae.call(Xt,qt)&&Oe(Ot,qt,Xt[qt]);if(Pe)for(var qt of Pe(Xt))De.call(Xt,qt)&&Oe(Ot,qt,Xt[qt]);return Ot},qe=(Ot,Xt)=>me(Ot,ve(Xt));const Xe={theme:(0,oe.G)("cmCodeMode","vs-dark"),fontSize:(0,oe.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,oe.G)("cmTabToSpace",!0)};var mt=(Ot=>(Ot[Ot.set_font_size=0]="set_font_size",Ot[Ot.set_theme=1]="set_theme",Ot[Ot.on_tab_to_space=2]="on_tab_to_space",Ot[Ot.set_show_editor_setting=3]="set_show_editor_setting",Ot))(mt||{});function pt(Ot,Xt){switch(Xt.type){case 3:return qe(Ze({},Ot),{showEditorSetting:Xt.payload});case 1:return qe(Ze({},Ot),{theme:Xt.payload});case 0:return qe(Ze({},Ot),{fontSize:Xt.payload});case 2:return qe(Ze({},Ot),{tabToSpace:Xt.payload});default:throw new Error}}var Mt=({isLoading:Ot,value:Xt,onChange:qt,language:Bi,onUpdateCode:_i,ActionBarRender:li=Si=>ae.createElement(at,{onShowCodeSetting:Si})})=>{const[Si,ai]=(0,Le.useReducer)(pt,Xe),{theme:Pi,fontSize:Yi,showEditorSetting:Po,tabToSpace:wr}=Si,Go=(0,Le.useRef)(),Wi=(0,Le.useRef)(),To={onFontSizeChange:Vo=>{ai({type:0,payload:Vo}),(0,oe.t)("cmFontSize",Vo)},tabToSpace:wr,cmFontSize:Yi,className:"oj",cmCodeMode:Pi,onTabToSpace:Vo=>{ai({type:2,payload:Vo}),(0,oe.t)("cmTabToSpace",Vo)},onCodeModeChange:Vo=>{ai({type:1,payload:Vo}),(0,oe.t)("cmCodeMode",Vo)}};function Kr(){ai({type:3,payload:!1})}function rs(){ai({type:3,payload:!0})}const ho={value:Xt,language:Bi,theme:Pi,height:"calc(100% - 56px)",options:{fontSize:Yi,insertSpaces:wr},onChange:Vo=>{qt(Vo),Wi.current=Vo,clearTimeout(Go.current),Go.current=setTimeout(()=>{_i(Wi.current)},1e4)},onEditBlur:Vo=>{Wi.current&&_i(Wi.current)}};return ae.createElement(Le.Fragment,null,ae.createElement("div",{className:"code-panel-container"},li(rs),!Ot&&ae.createElement(ee.ZP,Ze({},ho))),ae.createElement(z.Z,null,ae.createElement(ue.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:Po,onClose:Kr},ae.createElement(re.Z,Ze({},To)))))};function at({onShowCodeSetting:Ot}){return ae.createElement("div",{className:"action-bar"},ae.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),ae.createElement("a",{onClick:Ot},ae.createElement("i",{className:"iconfont icon-shezhi"})))}var _t=Ie(24334),dt=Ie(42909),Rt=Ie(10866),ut=Ie(37568),rt=Ie(28284),ct=Ie(99571);const{TextArea:yt}=ut.default,wt=5e3;var xt=({callback:Ot,onCancel:Xt,notes:qt})=>{function Bi(_i){Ot(_i)}return Le.createElement(rt.default,{className:"note-form-panel",onFinish:Bi,initialValues:{notes:qt}},Le.createElement(rt.default.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:wt,message:`\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A${wt}`}]},Le.createElement(yt,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),Le.createElement(rt.default.Item,{style:{textAlign:"right"}},Le.createElement(ct.ZP,{type:"ghost",onClick:Xt,style:{marginRight:10}}," \u53D6\u6D88 "),Le.createElement(ct.ZP,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},Ut={"left-panel":"left-panel___fP6Y3","tab-panel-body":"tab-panel-body___aLOJQ",b1:"b1___ELpwD","oj-mr":"oj-mr___SIQSw","oj-width-input":"oj-width-input___tR_Si","s-navs":"s-navs___iVrSH","bg-white":"bg-white___S0kiU",active:"active___D332c"},zt={pagination:"pagination___npPu7",info:"info___aRH6C"},dn=Ie(54172),Ft=Ie(13747),Dt=Ie(58617),Qt=Ie(81953),Yt=Ie(24363),Jt=Ie(51257),lt=Ie(61186),Ue=Ie.n(lt);const{Column:Be}=dn.default;var tt=({submitResult:Ot,submitting:Xt,submitRecords:qt,page:Bi,onPageChange:_i,topicId:li})=>{const{status:Si,id:ai,input:Pi,output:Yi,expected_output:Po,is_file:wr,input_file_url:Go,output_file_url:Wi,expected_output_file_url:To,error_msg:Kr}=Ot||{},{records:rs,records_count:ho}=qt||{},Vo=(0,Me.useParams)();function Co(){wr?navigator.clipboard.writeText(_t.Base64.decode(Kr)).then(()=>{xe.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(_t.Base64.decode(Yi)).then(()=>{xe.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return Le.createElement(ye.Z,{spinning:Xt,tip:"\u8BC4\u6D4B\u4E2D...",indicator:Le.createElement(Dt.Z,{style:{fontSize:24},spin:!0})},ai?Le.createElement(Le.Fragment,null,Le.createElement("ul",{className:zt.info},Le.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",Le.createElement("span",{className:Si===Yt.h.OK?"c-green":"c-red"},Rt.Im[Si])),Le.createElement("li",{className:zt.error},Le.createElement("a",{onClick:Co},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",Le.createElement(Qt.Z,null)," ")),Le.createElement("li",null,Le.createElement(Me.Link,{to:`/problems/${li}/record-detail/${ai}?backId=${Vo==null?void 0:Vo.save_identifier}`},"\u663E\u793A\u8BE6\u60C5 > "))),Si!==Yt.h.OK?Le.createElement(Le.Fragment,null,Le.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),Le.createElement("pre",null,!wr&&Pi,wr&&Le.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,Jt.LR)(Go,Pi)},Pi)),Le.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),Le.createElement("pre",null,(Si===4||Si===5)&&_t.Base64.decode(Kr),Si!=4&&Si!=5&&(wr?Le.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,Jt.LR)(Wi,Yi)},Yi):_t.Base64.decode(Yi))),Le.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),Le.createElement("pre",null,!wr&&_t.Base64.decode(Po),wr&&Le.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,Jt.LR)(To,Po)},Po))):null):null,(rs==null?void 0:rs.length)>0?Le.createElement(dn.default,{dataSource:rs,rowKey:"id",pagination:!1},Le.createElement(Be,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:(zr,Ko)=>Le.createElement("span",null," ",Ue()(zr).format("YYYY-MM-DD HH:mm:ss"))}),Le.createElement(Be,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:(zr,Ko)=>{var ji;return Le.createElement(Me.Link,{className:zr===0?"c-green":"c-red",to:`/problems/${li}/record-detail/${Ko.id}?backId=${Vo==null?void 0:Vo.save_identifier}`},(ji=Rt.Im[zr])==null?void 0:ji.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),Le.createElement(Be,{title:"\u6267\u884C\u7528\u65F6 (S)",dataIndex:"execute_time",key:"execute_time"}),Le.createElement(Be,{title:"\u5185\u5B58\u6D88\u8017\uFF08MB\uFF09",dataIndex:"execute_memory",key:"execute_memory"}),Le.createElement(Be,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"})):null,ho>15?Le.createElement(Ft.Z,{className:zt.pagination,current:Bi,pageSize:15,total:ho,onChange:_i}):null)},ht=Ie(28426),et=Ie(96599),Ve=Ie(77736),Re={desc:"desc___X8_hx",info:"info___C1DPv","commit-info":"commit-info____9yQm"},ze=Ie(76902),it=Ie(59301);const Ke={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}};var We=({hack:Ot,onTriggerPraise:Xt,toDiscuss:qt})=>{const{language:Bi,difficulty:_i,time_limit:li,username:Si,user_path:ai,user_praise:Pi,comments_count:Yi,praises_count:Po,description:wr,pass_count:Go,submit_count:Wi}=Ot,To=(0,Me.useLocation)();console.log(Ot.language,"language");const Kr=Ke[_i];return it.createElement(it.Fragment,null,it.createElement("ul",{className:Re.info},it.createElement("li",null,"\u96BE\u5EA6\uFF1A",it.createElement(et.default,{color:Kr==null?void 0:Kr.color},Kr==null?void 0:Kr.name)),it.createElement("li",null,"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",it.createElement("b",null,li,"\u79D2"))),it.createElement(ze.Z,{value:wr,className:Re.desc}),it.createElement("ul",{className:Re["commit-info"]},it.createElement("li",null,it.createElement(Ve.Z,{size:4},it.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",it.createElement("b",null,Go))),it.createElement("li",null,it.createElement(Ve.Z,{size:4},it.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",it.createElement("b",null,Wi))," "),it.createElement("li",{style:{flex:"1 0 0"}}),it.createElement("li",null,it.createElement(Ve.Z,{size:4},it.createElement("i",{className:"iconfont icon-huifu1",onClick:qt})," ",it.createElement("b",null,Yi))," ")))},vt=Ie(49535),kt=Object.defineProperty,hn=Object.getOwnPropertySymbols,en=Object.prototype.hasOwnProperty,Gt=Object.prototype.propertyIsEnumerable,gn=(Ot,Xt,qt)=>Xt in Ot?kt(Ot,Xt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):Ot[Xt]=qt,bn=(Ot,Xt)=>{for(var qt in Xt||(Xt={}))en.call(Xt,qt)&&gn(Ot,qt,Xt[qt]);if(hn)for(var qt of hn(Xt))Gt.call(Xt,qt)&&gn(Ot,qt,Xt[qt]);return Ot};const yn=Ot=>React.createElement("svg",bn({width:40,height:40,xmlns:"http://www.w3.org/2000/svg"},Ot),React.createElement("title",null,"\u5C55\u5F00\u9898\u76EE"),React.createElement("defs",null,React.createElement("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"100%",id:"show_svg__a"},React.createElement("stop",{stopColor:"#EEF7FF",offset:"0%"}),React.createElement("stop",{stopColor:"#C1E2FF",offset:"100%"}))),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"url(#show_svg__a)",width:40,height:40,rx:8}),React.createElement("g",{fillRule:"nonzero"},React.createElement("path",{d:"M16.057 20.784H8.238A1.22 1.22 0 0 0 7 21.974v6.811a1.22 1.22 0 0 0 1.238 1.19h7.819a1.213 1.213 0 0 0 1.238-1.19v-6.811a1.213 1.213 0 0 0-.376-.847 1.203 1.203 0 0 0-.862-.332v-.01Zm-1.25 6.769H9.423V23.12h5.384v4.433Z",fill:"#4CACFF"}),React.createElement("path",{d:"M16.057 10.005a1.22 1.22 0 0 1 1.238 1.189v6.812a1.213 1.213 0 0 1-.376.846c-.232.222-.542.34-.862.332H8.238A1.213 1.213 0 0 1 7 18.005v-6.811a1.22 1.22 0 0 1 1.238-1.19Zm-1.239 2.41H9.434v4.401h5.384v-4.4Z",fill:"#94CDFF"}),React.createElement("path",{d:"M20.418 12.632h11.189a1.213 1.213 0 0 0 1.238-1.179 1.224 1.224 0 0 0-.371-.857 1.214 1.214 0 0 0-.867-.343H20.418a1.203 1.203 0 0 0-.866.336c-.233.223-.367.53-.372.854.005.323.14.63.372.854.232.223.544.344.866.335ZM31.575 16.027h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557ZM31.575 21.595h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557ZM31.575 27.163h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557Z",fill:"#1890FF"}))));var un="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjEwMCUiIGlkPSJhIj48c3RvcCBzdG9wLWNvbG9yPSIjRUVGN0ZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0MxRTJGRiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSJ1cmwoI2EpIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHJ4PSI4Ii8+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNMTYuMDU3IDIwLjc4NEg4LjIzOEExLjIyIDEuMjIgMCAwIDAgNyAyMS45NzR2Ni44MTFhMS4yMiAxLjIyIDAgMCAwIDEuMjM4IDEuMTloNy44MTlhMS4yMTMgMS4yMTMgMCAwIDAgMS4yMzgtMS4xOXYtNi44MTFhMS4yMTMgMS4yMTMgMCAwIDAtLjM3Ni0uODQ3IDEuMjAzIDEuMjAzIDAgMCAwLS44NjItLjMzMnYtLjAxWm0tMS4yNSA2Ljc2OUg5LjQyM1YyMy4xMmg1LjM4NHY0LjQzM1oiIGZpbGw9IiM0Q0FDRkYiLz48cGF0aCBkPSJNMTYuMDU3IDEwLjAwNWExLjIyIDEuMjIgMCAwIDEgMS4yMzggMS4xODl2Ni44MTJhMS4yMTMgMS4yMTMgMCAwIDEtLjM3Ni44NDZjLS4yMzIuMjIyLS41NDIuMzQtLjg2Mi4zMzJIOC4yMzhBMS4yMTMgMS4yMTMgMCAwIDEgNyAxOC4wMDV2LTYuODExYTEuMjIgMS4yMiAwIDAgMSAxLjIzOC0xLjE5Wm0tMS4yMzkgMi40MUg5LjQzNHY0LjQwMWg1LjM4NHYtNC40WiIgZmlsbD0iIzk0Q0RGRiIvPjxwYXRoIGQ9Ik0yMC40MTggMTIuNjMyaDExLjE4OWExLjIxMyAxLjIxMyAwIDAgMCAxLjIzOC0xLjE3OSAxLjIyNCAxLjIyNCAwIDAgMC0uMzcxLS44NTcgMS4yMTQgMS4yMTQgMCAwIDAtLjg2Ny0uMzQzSDIwLjQxOGExLjIwMyAxLjIwMyAwIDAgMC0uODY2LjMzNmMtLjIzMy4yMjMtLjM2Ny41My0uMzcyLjg1NC4wMDUuMzIzLjE0LjYzLjM3Mi44NTQuMjMyLjIyMy41NDQuMzQ0Ljg2Ni4zMzVaTTMxLjU3NSAxNi4wMjdoLTExLjE5YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTE5LjU1N2MtLjIzNy4zODQtLjIzNy44NyAwIDEuMjU0LjIzOC4zODQuNjcyLjYgMS4xMi41NTdoMTEuMTg5Yy40NDguMDQzLjg4Mi0uMTczIDEuMTE5LS41NTcuMjM3LS4zODQuMjM3LS44NyAwLTEuMjU0YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTItLjU1N1pNMzEuNTc1IDIxLjU5NWgtMTEuMTlhMS4xODMgMS4xODMgMCAwIDAtMS4xMTkuNTU3Yy0uMjM3LjM4NC0uMjM3Ljg3IDAgMS4yNTQuMjM4LjM4NC42NzIuNiAxLjEyLjU1N2gxMS4xODljLjQ0OC4wNDMuODgyLS4xNzMgMS4xMTktLjU1Ny4yMzctLjM4NC4yMzctLjg3IDAtMS4yNTRhMS4xODMgMS4xODMgMCAwIDAtMS4xMi0uNTU3Wk0zMS41NzUgMjcuMTYzaC0xMS4xOWExLjE4MyAxLjE4MyAwIDAgMC0xLjExOS41NTdjLS4yMzcuMzg0LS4yMzcuODcgMCAxLjI1NC4yMzguMzg0LjY3Mi42IDEuMTIuNTU3aDExLjE4OWMuNDQ4LjA0My44ODItLjE3MyAxLjExOS0uNTU3LjIzNy0uMzg0LjIzNy0uODcgMC0xLjI1NGExLjE4MyAxLjE4MyAwIDAgMC0xLjEyLS41NTdaIiBmaWxsPSIjMTg5MEZGIi8+PC9nPjwvZz48L3N2Zz4=",Jn=Ie(38986);function mn(Ot){return(0,Jn.U2)("comments.json",Ot)}function Yn(Ot){return(0,Jn.v_)(`/discusses/${Ot}/plus.json`,{container_type:"Discuss",type:1})}function ri(Ot){return(0,Jn.v_)("comments/reply.json",Ot)}function bi(Ot){return(0,Jn.v_)("comments.json",Ot)}function jn(Ot){return(0,Jn.v_)(`comments/${Ot==null?void 0:Ot.id}/hidden.json`,Ot)}function ki(Ot){return(0,Jn.IV)(`comments/${Ot==null?void 0:Ot.id}.json`)}var Hi=Ie(75604),Fi=Ie(48790);function rr({author:Ot}){return Le.createElement("a",{href:`/users/${Ot.login}`,target:"_blank"},Le.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:`${ge.Z.IMG_SERVER}/images/${Ot.image_url}`,width:"50"}))}function Cr({data:Ot,index:Xt,parentDiscussIndex:qt,user:Bi,onSetActionType:_i}){const{author:li,can_delete:Si,content:ai,id:Pi,time:Yi}=Ot;function Po(){_i({id:Pi,index:Xt,type:"delete-discuss",parentDiscussIndex:qt,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}const wr=Bi.admin||Si||li.user_id===Bi.user_id;return Le.createElement("div",{className:"discuss-item-container second-discuss "},Le.createElement(rr,{author:li}),Le.createElement("section",null,Le.createElement("div",{className:"discuss-info"},Le.createElement("a",{href:`/users/${li.login}`,target:"_blank"},li.name),Le.createElement("span",{className:"grey"},Yi),Le.createElement("div",{className:"btn-group",style:{marginBottom:0}},wr?Le.createElement("a",{onClick:Po,title:"\u5220\u9664"},Le.createElement("i",{className:"iconfont icon-shanchu"})):null)),Le.createElement(ze.Z,{className:"discuss-content",value:ai})))}var gr=({user:Ot,data:Xt,index:qt,onPlusDiscuss:Bi,onSetActionType:_i,activeDiscussIndex:li,onReplyDiscuss:Si,onSetActiveDiscussIndex:ai})=>{const{content:Pi,children:Yi,hidden:Po,id:wr,praise_count:Go,time:Wi,user_praise:To,can_delete:Kr,author:rs}=Xt;console.log(Kr&&(!Yi||Yi.length==0),"children22");function ho(){ai(wr)}function Vo(){Bi(wr,!To,qt)}function Co(){_i({id:wr,index:qt,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function zr(){_i({id:wr,index:qt,params:{hidden:Po?"0":"1"},type:"hidden-discuss",message:Po?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}const Ko=Ot.admin||Ot.user_id===rs.user_id;return Le.createElement("div",{className:"discuss-item-container",key:wr},Le.createElement(rr,{author:rs}),Le.createElement("section",null,Le.createElement("div",{className:"discuss-info"},Le.createElement("a",{href:`/users/${rs.login}`,target:"_blank"}," ",rs.name," "),Le.createElement("span",{className:"grey"},Wi)),Le.createElement(ze.Z,{className:"discuss-content",value:Pi}),Yi&&Yi.length>0?Le.createElement("div",{className:"reply-discuss-container"},Yi.map((ji,$o)=>Le.createElement(Cr,{key:ji.id,data:ji,index:$o,user:Ot,onSetActionType:_i,parentDiscussIndex:qt}))):null,Le.createElement("div",{className:"btn-group"},(0,Fi.Ny)()?Le.createElement("a",{onClick:zr,title:Po?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},Le.createElement("i",{className:Po?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,Kr&&(!Yi||Yi.length==0)?Le.createElement("a",{onClick:Co,title:"\u5220\u9664"},Le.createElement("i",{className:"iconfont icon-shanchu"})):null,Le.createElement("a",{onClick:ho,title:"\u56DE\u590D"}," ",Le.createElement("i",{className:"iconfont icon-huifu1"})," "),Le.createElement("a",{onClick:Vo,className:To?"c-orange":""},Le.createElement("i",{className:To?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),Le.createElement("span",null,Go||""))),Le.createElement(Hi.Z,{id:wr,activeDiscussIndex:li,onReplyDiscuss:Si})))},Ni=Ie(87320),Ti=Ie(39793),cr=(Ot,Xt,qt)=>new Promise((Bi,_i)=>{var li=Pi=>{try{ai(qt.next(Pi))}catch(Yi){_i(Yi)}},Si=Pi=>{try{ai(qt.throw(Pi))}catch(Yi){_i(Yi)}},ai=Pi=>Pi.done?Bi(Pi.value):Promise.resolve(Pi.value).then(li,Si);ai((qt=qt.apply(Ot,Xt)).next())}),$e=({user_praise:Ot,praise_count:Xt,praisePlus:qt,onCreateDiscuss:Bi,discuss_count:_i})=>{const[li,Si]=(0,Le.useState)(!1),[ai,Pi]=(0,Le.useState)("");function Yi(Wi){Pi(Wi)}function Po(){Si(!0)}function wr(){Si(!1)}function Go(){return cr(this,null,function*(){Bi(ai),Pi(""),Si(!1)})}return Le.createElement("div",{className:`dis-input-editor-container ${li?"active":""} `},Le.createElement("div",{className:li?"text-area hide":"text-area"},Le.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:Po}),Le.createElement("a",{style:{alignItems:"center"}}," ",Le.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",_i," "),Le.createElement("a",{className:"c-light-black",onClick:qt,style:{alignItems:"center"},title:Ot?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},Le.createElement("i",{className:`mr3 ${Ot?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"} `}),Xt?Le.createElement("span",null,Xt):"")),li?Le.createElement("div",{className:"input-mask",onClick:wr}):null,Le.createElement("div",{className:li?"md-container":"md-container hide"},Le.createElement(Ti.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:ai,height:240,onChange:Yi}),Le.createElement("div",{className:"tip-container",onClick:wr},Le.createElement("a",{className:"btn-send",onClick:Go}," \u53D1\u9001 "))))},Li=Object.defineProperty,ti=Object.defineProperties,Oi=Object.getOwnPropertyDescriptors,pr=Object.getOwnPropertySymbols,dr=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,So=(Ot,Xt,qt)=>Xt in Ot?Li(Ot,Xt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):Ot[Xt]=qt,$t=(Ot,Xt)=>{for(var qt in Xt||(Xt={}))dr.call(Xt,qt)&&So(Ot,qt,Xt[qt]);if(pr)for(var qt of pr(Xt))Qi.call(Xt,qt)&&So(Ot,qt,Xt[qt]);return Ot},Ge=(Ot,Xt)=>ti(Ot,Oi(Xt)),Je=(Ot,Xt,qt)=>new Promise((Bi,_i)=>{var li=Pi=>{try{ai(qt.next(Pi))}catch(Yi){_i(Yi)}},Si=Pi=>{try{ai(qt.throw(Pi))}catch(Yi){_i(Yi)}},ai=Pi=>Pi.done?Bi(Pi.value):Promise.resolve(Pi.value).then(li,Si);ai((qt=qt.apply(Ot,Xt)).next())});const ot={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null};var Et=(Ot=>(Ot[Ot.GET_DISCUSSES=0]="GET_DISCUSSES",Ot[Ot.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",Ot[Ot.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",Ot[Ot.PLUS_DISCUSS=3]="PLUS_DISCUSS",Ot[Ot.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",Ot[Ot.SET_PAGE=5]="SET_PAGE",Ot[Ot.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING",Ot))(Et||{});function Nt(Ot,Xt){switch(Xt.type){case 6:return Ge($t({},Ot),{loading:!0});case 0:return $t($t({},Ot),Xt.payload);case 1:return $t($t({},Ot),Xt.payload);case 4:return $t($t({},Ot),Xt.payload);case 3:return $t($t({},Ot),Xt.payload);case 5:return $t($t({},Ot),Xt.payload);case 2:return $t($t({},Ot),Xt.payload);default:throw new Error}}var pn=({user:Ot,identifier:Xt,hack:qt,onTriggerPraise:Bi,setDiscussTotal:_i})=>{const[li,Si]=(0,Le.useReducer)(Nt,ot),{loading:ai,page:Pi,data:Yi,count:Po,actionType:wr,activeDiscussIndex:Go}=li;console.log("---",li);const Wi=(0,Le.useCallback)(()=>Je(void 0,null,function*(){Si({type:6});const ji=yield mn({container_type:"Practice",container_identifier:Xt,limit:10,page:Pi}),{comments:$o,disscuss_count:mo}=ji;Si({type:0,payload:{data:$o,count:mo,loading:!1}}),_i(mo)}),[Pi,Xt]);(0,Le.useEffect)(()=>{Wi()},[Xt,Pi]);function To(ji){Si({type:5,payload:{page:ji}})}function Kr(ji){Si({type:4,payload:{actionType:ji}})}function rs(ji){Si(Go===ji?{type:2,payload:{activeDiscussIndex:null}}:{type:2,payload:{activeDiscussIndex:ji}})}function ho(ji,$o,mo){return Je(this,null,function*(){try{const Oo=yield Yn(ji);Yi[mo].user_praise=$o,Yi[mo].praise_count=Oo.praise_count,Si({type:3,payload:{data:[...Yi]}})}catch(Oo){console.log(Oo)}})}function Vo(){return Je(this,null,function*(){const{id:ji,params:$o,type:mo,index:Oo,parentDiscussIndex:Ks}=wr;mo==="hidden-discuss"&&(console.log($o,"params"),yield jn($t({id:ji,container_type:"Practice",container_identifier:Xt},$o)),Ks?Yi[Ks].children[Oo].hidden=$o.hidden==1:Yi[Oo].hidden=$o.hidden==1,Si({type:4,payload:{actionType:null,data:[...Yi]}})),mo==="delete-discuss"&&(yield ki({id:ji,container_type:"Practice",container_identifier:Xt}),Si({type:4,payload:{actionType:null}}),yield Wi())})}function Co(){Si({type:4,payload:{actionType:null}})}function zr(ji,$o){return Je(this,null,function*(){try{yield ri({container_type:"Practice",container_identifier:Xt,comments:{content:$o,parent_id:ji}}),Wi()}catch(mo){console.log(mo)}})}function Ko(ji){return Je(this,null,function*(){Si({type:6}),yield bi({comments:{content:ji},container_type:"Practice",container_identifier:Xt}),Wi()})}return Le.createElement(Le.Fragment,null,Le.createElement("div",{className:"discuss-panel"},Yi.length===0?Le.createElement(ht.Z,null):Le.createElement(ye.Z,{spinning:ai},Yi.map((ji,$o)=>Le.createElement(gr,{onReplyDiscuss:zr,onPlusDiscuss:ho,onSetActiveDiscussIndex:rs,onSetActionType:Kr,data:ji,index:$o,user:Ot,activeDiscussIndex:Go}))),Po>10?Le.createElement("div",{className:"pagination-container mt10 mb10"},Le.createElement(Ft.Z,{showQuickJumper:!0,onChange:To,current:Pi,total:Po,showTotal:ji=>Le.createElement("span",{style:{color:"#656F87"}},"\u5171",Le.createElement("span",{className:"c-light-primary"},ji),"\u6761\u6570\u636E")})):null),Le.createElement($e,{user_praise:qt.user_praise,praise_count:qt.praises_count,praisePlus:Bi,discuss_count:qt.comments_count,onCreateDiscuss:Ko}),Le.createElement(z.Z,null,Le.createElement(be.default,{centered:!0,title:"\u63D0\u793A",open:!!wr,onOk:Vo,onCancel:Co},Le.createElement("p",null,wr?wr.message:"")),Le.createElement(Ni.Z,null)))},jt={flex_box_center:"flex_box_center___tosr6",flex_space_between:"flex_space_between___cQaTP",flex_box_vertical_center:"flex_box_vertical_center___uovxL",flex_box_center_end:"flex_box_center_end___b4gLY",flex_box_column:"flex_box_column___Umjm_",wrap:"wrap___sgoJE",head:"head___b9a9v",sort:"sort___L2Zw8",btn:"btn___khuE4",listWarp:"listWarp___zZj6C",pagination:"pagination___XlROP",fixedRight:"fixedRight___MuAXo","oj-width-input":"oj-width-input___RsZb6"},cn={flex_box_center:"flex_box_center___EahWI",flex_space_between:"flex_space_between___zopS4",flex_box_vertical_center:"flex_box_vertical_center___w03mz",flex_box_center_end:"flex_box_center_end___lr0Fp",flex_box_column:"flex_box_column___KFHVi",active:"active___BczOO",line:"line___VC_Ry",list:"list___n9ABd",left:"left___LVHqw",mask:"mask___fP13z",right:"right___iLe52",name:"name___Oz_7h",title:"title___2Sess",a:"a___t7rIW",b:"b___Kb_45",des:"des___CjMBM",tag:"tag___V0PVb"},On=Object.defineProperty,pi=Object.getOwnPropertySymbols,Fn=Object.prototype.hasOwnProperty,Lt=Object.prototype.propertyIsEnumerable,Ht=(Ot,Xt,qt)=>Xt in Ot?On(Ot,Xt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):Ot[Xt]=qt,Pn=(Ot,Xt)=>{for(var qt in Xt||(Xt={}))Fn.call(Xt,qt)&&Ht(Ot,qt,Xt[qt]);if(pi)for(var qt of pi(Xt))Lt.call(Xt,qt)&&Ht(Ot,qt,Xt[qt]);return Ot};const Sn=Ot=>React.createElement("svg",Pn({width:12,height:10,xmlns:"http://www.w3.org/2000/svg"},Ot),React.createElement("title",null,"\u89C2\u770B"),React.createElement("path",{d:"M11 0a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h10ZM4.4 2.4a.4.4 0 0 0-.4.4v4.4a.4.4 0 0 0 .64.32l2.72-2.04a.6.6 0 0 0 0-.96L4.64 2.48a.4.4 0 0 0-.24-.08Z",fill:"#FFF",fillRule:"evenodd"}));var Kt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExIDBhMSAxIDAgMCAxIDEgMXY4YTEgMSAwIDAgMS0xIDFIMWExIDEgMCAwIDEtMS0xVjFhMSAxIDAgMCAxIDEtMWgxMFpNNC40IDIuNGEuNC40IDAgMCAwLS40LjR2NC40YS40LjQgMCAwIDAgLjY0LjMybDIuNzItMi4wNGEuNi42IDAgMCAwIDAtLjk2TDQuNjQgMi40OGEuNC40IDAgMCAwLS4yNC0uMDhaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",vn=Object.defineProperty,Hn=Object.getOwnPropertySymbols,Gn=Object.prototype.hasOwnProperty,oi=Object.prototype.propertyIsEnumerable,Wn=(Ot,Xt,qt)=>Xt in Ot?vn(Ot,Xt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):Ot[Xt]=qt,zn=(Ot,Xt)=>{for(var qt in Xt||(Xt={}))Gn.call(Xt,qt)&&Wn(Ot,qt,Xt[qt]);if(Hn)for(var qt of Hn(Xt))oi.call(Xt,qt)&&Wn(Ot,qt,Xt[qt]);return Ot};const Mn=Ot=>React.createElement("svg",zn({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},Ot),React.createElement("title",null,"\u70B9\u8D5E1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M2.593 13.356V5.694c0-.31-.231-.561-.516-.561H.976c-.532 0-.962.468-.962 1.047v6.69c0 .579.43 1.047.962 1.047h1.101c.285 0 .516-.251.516-.561Z",fill:"#999"}),React.createElement("path",{d:"M3.335 13.512V5.53c0-.184.136-.346.333-.391.695-.16 2.289-.735 2.967-2.694C7.048.73 7.495-.08 8.823.017c1.328.097 1.417 1.263 1.417 1.618v2.752s-.107.42.34.453c.45.033 3.947 0 3.947 0s1.919-.029 1.309 2.122c-.53 1.871-1.58 4.882-1.846 5.635a1.606 1.606 0 0 1-.235.438c-.257.338-.796.88-1.62.88H3.782c-.247.002-.447-.179-.447-.403Z",fill:"#CCC"})));var wi="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjOTk5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQ0NDIi8+PC9nPjwvc3ZnPg==",mi=Object.defineProperty,En=Object.getOwnPropertySymbols,ei=Object.prototype.hasOwnProperty,er=Object.prototype.propertyIsEnumerable,Sr=(Ot,Xt,qt)=>Xt in Ot?mi(Ot,Xt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):Ot[Xt]=qt,Tr=(Ot,Xt)=>{for(var qt in Xt||(Xt={}))ei.call(Xt,qt)&&Sr(Ot,qt,Xt[qt]);if(En)for(var qt of En(Xt))er.call(Xt,qt)&&Sr(Ot,qt,Xt[qt]);return Ot};const nn=Ot=>React.createElement("svg",Tr({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},Ot),React.createElement("title",null,"\u70B9\u8D5E2"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M2.593 13.356V5.694c0-.31-.231-.561-.516-.561H.976c-.532 0-.962.468-.962 1.047v6.69c0 .579.43 1.047.962 1.047h1.101c.285 0 .516-.251.516-.561Z",fill:"#0152d9"}),React.createElement("path",{d:"M3.335 13.512V5.53c0-.184.136-.346.333-.391.695-.16 2.289-.735 2.967-2.694C7.048.73 7.495-.08 8.823.017c1.328.097 1.417 1.263 1.417 1.618v2.752s-.107.42.34.453c.45.033 3.947 0 3.947 0s1.919-.029 1.309 2.122c-.53 1.871-1.58 4.882-1.846 5.635a1.606 1.606 0 0 1-.235.438c-.257.338-.796.88-1.62.88H3.782c-.247.002-.447-.179-.447-.403Z",fill:"#B6D0FC"})));var Mi="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjMDE1MmQ5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQjZEMEZDIi8+PC9nPjwvc3ZnPg==",tr=Object.defineProperty,vi=Object.getOwnPropertySymbols,or=Object.prototype.hasOwnProperty,Vi=Object.prototype.propertyIsEnumerable,yr=(Ot,Xt,qt)=>Xt in Ot?tr(Ot,Xt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):Ot[Xt]=qt,fr=(Ot,Xt)=>{for(var qt in Xt||(Xt={}))or.call(Xt,qt)&&yr(Ot,qt,Xt[qt]);if(vi)for(var qt of vi(Xt))Vi.call(Xt,qt)&&yr(Ot,qt,Xt[qt]);return Ot};const _r=Ot=>React.createElement("svg",fr({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},Ot),React.createElement("title",null,"\u8BC4\u8BBA1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M4.717.01h8.84c1.571 0 2.357.777 2.357 2.332v5.25c0 1.556-.786 2.334-2.357 2.334h-8.84c-1.572 0-2.357-.778-2.357-2.334v-5.25C2.36.787 3.145.01 4.717.01Z",fill:"#999"}),React.createElement("path",{d:"M2.36 2.342h8.84a2.37 2.37 0 0 1 1.666.684c.442.437.69 1.03.69 1.65v5.25c0 1.288-1.055 2.333-2.357 2.333H7.94l-1.16 1.153-1.167-1.153H2.36a2.37 2.37 0 0 1-1.667-.683 2.321 2.321 0 0 1-.69-1.65v-5.25c0-.62.248-1.213.69-1.65a2.37 2.37 0 0 1 1.667-.684Z",fill:"#B6D0FC"}),React.createElement("path",{d:"M2.36 2.926h8.84c1.301 0 2.357 1.044 2.357 2.333v5.25c0 .619-.249 1.212-.69 1.65a2.37 2.37 0 0 1-1.668.683H7.94l-1.16 1.154-1.167-1.154H2.36a2.37 2.37 0 0 1-1.667-.683 2.321 2.321 0 0 1-.69-1.65V5.26c0-.619.248-1.212.69-1.65a2.37 2.37 0 0 1 1.667-.683Z",fill:"#CCC"}),React.createElement("path",{d:"M3.538 5.842h6.483c.393 0 .589.195.589.584 0 .389-.196.583-.59.583H3.539c-.393 0-.59-.194-.59-.583 0-.39.197-.584.59-.584ZM3.538 8.76h4.715c.393 0 .59.194.59.582 0 .39-.197.584-.59.584H3.538c-.393 0-.59-.195-.59-.584 0-.388.197-.583.59-.583Z",fill:"#FFF"})));var Yr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNC43MTcuMDFoOC44NGMxLjU3MSAwIDIuMzU3Ljc3NyAyLjM1NyAyLjMzMnY1LjI1YzAgMS41NTYtLjc4NiAyLjMzNC0yLjM1NyAyLjMzNGgtOC44NGMtMS41NzIgMC0yLjM1Ny0uNzc4LTIuMzU3LTIuMzM0di01LjI1QzIuMzYuNzg3IDMuMTQ1LjAxIDQuNzE3LjAxWiIgZmlsbD0iIzk5OSIvPjxwYXRoIGQ9Ik0yLjM2IDIuMzQyaDguODRhMi4zNyAyLjM3IDAgMCAxIDEuNjY2LjY4NGMuNDQyLjQzNy42OSAxLjAzLjY5IDEuNjV2NS4yNWMwIDEuMjg4LTEuMDU1IDIuMzMzLTIuMzU3IDIuMzMzSDcuOTRsLTEuMTYgMS4xNTMtMS4xNjctMS4xNTNIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NXYtNS4yNWMwLS42Mi4yNDgtMS4yMTMuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4NFoiIGZpbGw9IiNCNkQwRkMiLz48cGF0aCBkPSJNMi4zNiAyLjkyNmg4Ljg0YzEuMzAxIDAgMi4zNTcgMS4wNDQgMi4zNTcgMi4zMzN2NS4yNWMwIC42MTktLjI0OSAxLjIxMi0uNjkgMS42NWEyLjM3IDIuMzcgMCAwIDEtMS42NjguNjgzSDcuOTRsLTEuMTYgMS4xNTQtMS4xNjctMS4xNTRIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NVY1LjI2YzAtLjYxOS4yNDgtMS4yMTIuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4M1oiIGZpbGw9IiNDQ0MiLz48cGF0aCBkPSJNMy41MzggNS44NDJoNi40ODNjLjM5MyAwIC41ODkuMTk1LjU4OS41ODQgMCAuMzg5LS4xOTYuNTgzLS41OS41ODNIMy41MzljLS4zOTMgMC0uNTktLjE5NC0uNTktLjU4MyAwLS4zOS4xOTctLjU4NC41OS0uNTg0Wk0zLjUzOCA4Ljc2aDQuNzE1Yy4zOTMgMCAuNTkuMTk0LjU5LjU4MiAwIC4zOS0uMTk3LjU4NC0uNTkuNTg0SDMuNTM4Yy0uMzkzIDAtLjU5LS4xOTUtLjU5LS41ODQgMC0uMzg4LjE5Ny0uNTgzLjU5LS41ODNaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==",Ln=Object.defineProperty,oo=Object.getOwnPropertySymbols,kn=Object.prototype.hasOwnProperty,Di=Object.prototype.propertyIsEnumerable,Lr=(Ot,Xt,qt)=>Xt in Ot?Ln(Ot,Xt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):Ot[Xt]=qt,sr=(Ot,Xt)=>{for(var qt in Xt||(Xt={}))kn.call(Xt,qt)&&Lr(Ot,qt,Xt[qt]);if(oo)for(var qt of oo(Xt))Di.call(Xt,qt)&&Lr(Ot,qt,Xt[qt]);return Ot};const so=Ot=>React.createElement("svg",sr({width:16,height:12,xmlns:"http://www.w3.org/2000/svg"},Ot),React.createElement("title",null,"\u67E5\u770B1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M7.965 11.961C2.593 11.961 0 6.926 0 5.981 0 5.035 2.623 0 7.965 0s7.965 4.984 7.965 5.98c0 .997-2.593 5.981-7.965 5.981Zm0-2.208c1.296 0 2.494-.72 3.142-1.886a3.902 3.902 0 0 0 0-3.773c-.648-1.167-1.846-1.886-3.142-1.886-2.004 0-3.629 1.69-3.629 3.773s1.625 3.772 3.629 3.772Z",fill:"#CCC"}),React.createElement("path",{d:"M7.965 8.28c-1.222 0-2.213-1.029-2.213-2.3 0-1.27.991-2.3 2.213-2.3s2.212 1.03 2.212 2.3c0 1.271-.99 2.3-2.212 2.3Z",fill:"#999"})));var Er="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNy45NjUgMTEuOTYxQzIuNTkzIDExLjk2MSAwIDYuOTI2IDAgNS45ODEgMCA1LjAzNSAyLjYyMyAwIDcuOTY1IDBzNy45NjUgNC45ODQgNy45NjUgNS45OGMwIC45OTctMi41OTMgNS45ODEtNy45NjUgNS45ODFabTAtMi4yMDhjMS4yOTYgMCAyLjQ5NC0uNzIgMy4xNDItMS44ODZhMy45MDIgMy45MDIgMCAwIDAgMC0zLjc3M2MtLjY0OC0xLjE2Ny0xLjg0Ni0xLjg4Ni0zLjE0Mi0xLjg4Ni0yLjAwNCAwLTMuNjI5IDEuNjktMy42MjkgMy43NzNzMS42MjUgMy43NzIgMy42MjkgMy43NzJaIiBmaWxsPSIjQ0NDIi8+PHBhdGggZD0iTTcuOTY1IDguMjhjLTEuMjIyIDAtMi4yMTMtMS4wMjktMi4yMTMtMi4zIDAtMS4yNy45OTEtMi4zIDIuMjEzLTIuM3MyLjIxMiAxLjAzIDIuMjEyIDIuM2MwIDEuMjcxLS45OSAyLjMtMi4yMTIgMi4zWiIgZmlsbD0iIzk5OSIvPjwvZz48L3N2Zz4=",_o=({style:Ot={},onClick:Xt,onAssist:qt,onHide:Bi,data:_i,active:li,showLine:Si})=>Le.createElement(Le.Fragment,null,Le.createElement("div",{className:li===(_i==null?void 0:_i.id)?`${cn.list} ${cn.active}`:cn.list,style:Ot,onClick:()=>Xt(_i)},(_i==null?void 0:_i.video)&&Le.createElement("div",{className:cn.left},Le.createElement("img",{src:_i==null?void 0:_i.video_cover}),Le.createElement("div",null,Le.createElement("img",{src:Kt}),Le.createElement("span",null,_i==null?void 0:_i.video_duration)),Le.createElement("div",{className:cn.mask})),Le.createElement("div",{className:cn.right},Le.createElement("div",{className:cn.name},Le.createElement("img",{src:ge.Z.IMG_SERVER+"/images/"+(_i==null?void 0:_i.image_url),width:30,height:30}),Le.createElement("div",{title:_i==null?void 0:_i.name,className:cn.title},_i==null?void 0:_i.name),(_i==null?void 0:_i.is_authority)&&Le.createElement("div",{className:cn.b},"\u5B98\u65B9"),(_i==null?void 0:_i.is_excellent)&&Le.createElement("div",{className:cn.a},"\u7CBE\u9009")),Le.createElement("div",{className:cn.des},Le.createElement(ze.Z,{showLines:2,showTextOnly:!0,value:(_i==null?void 0:_i.content)||"\u6682\u65E0\u5185\u5BB9"})),Le.createElement("div",{className:cn.tag},Le.createElement("span",{className:"current",onClick:ai=>{ai.stopPropagation(),qt(_i)}},Le.createElement("img",{src:_i!=null&&_i.user_liker?Mi:wi}),Le.createElement("span",{style:{color:_i!=null&&_i.user_liker?"#0152d9":"#656f87"}},_i==null?void 0:_i.praises_count)),Le.createElement("span",null,Le.createElement("img",{src:Yr}),Le.createElement("span",null,_i==null?void 0:_i.discusses_count)),Le.createElement("span",null,Le.createElement("img",{src:Er}),Le.createElement("span",null,_i==null?void 0:_i.viewed_count)),(0,Fi.Ny)()&&Le.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:ai=>{ai.stopPropagation(),Bi(_i)}},_i!=null&&_i.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),Si&&Le.createElement("div",{className:cn.line})),an={flex_box_center:"flex_box_center___C6sVF",flex_space_between:"flex_space_between___VEt8l",flex_box_vertical_center:"flex_box_vertical_center___qeD5F",flex_box_center_end:"flex_box_center_end___iYJd9",flex_box_column:"flex_box_column___iAKJf",listForm:"listForm___leDJL",scroll:"scroll___wtFaF",formWrap:"formWrap___p3W41",btns:"btns___Izl4q",main:"main___xTqlG",mainLoading:"mainLoading___QLa9s",tip:"tip___a0tbY",proWarp:"proWarp___BZhOt",pro:"pro___Yp1Rx",mainSucceed:"mainSucceed___HfaTf",del:"del___TXGhB"},Nn=Ie(25399),on=Ie(67776),ft=Object.defineProperty,Zn=Object.getOwnPropertySymbols,si=Object.prototype.hasOwnProperty,Ei=Object.prototype.propertyIsEnumerable,yi=(Ot,Xt,qt)=>Xt in Ot?ft(Ot,Xt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):Ot[Xt]=qt,di=(Ot,Xt)=>{for(var qt in Xt||(Xt={}))si.call(Xt,qt)&&yi(Ot,qt,Xt[qt]);if(Zn)for(var qt of Zn(Xt))Ei.call(Xt,qt)&&yi(Ot,qt,Xt[qt]);return Ot};const An=Ot=>React.createElement("svg",di({width:32,height:30,xmlns:"http://www.w3.org/2000/svg"},Ot),React.createElement("title",null,"\u4E0A\u4F20\u89C6\u9891"),React.createElement("path",{d:"M1.6 0C1.175 0 .768.17.468.474A1.63 1.63 0 0 0 0 1.622v3.243h3.237L7.378 0H1.6Zm7.876 0L5.338 4.865h5.9L15.371 0H9.476Zm7.998 0-4.137 4.865h5.896L23.372 0h-5.898Zm8 0-4.138 4.865h6.66V1.622a1.629 1.629 0 0 0-.467-1.148A1.585 1.585 0 0 0 26.397 0h-.924ZM0 6.487v17.837c0 .43.167.844.468 1.148.3.305.707.475 1.132.474h18.61a6.515 6.515 0 0 1 1.652-6.218 6.31 6.31 0 0 1 6.134-1.675V6.487H0Zm11.998 5.675 6.4 4.056-6.4 4.055v-8.11Zm14.399 6.487c-3.092.002-5.597 2.544-5.595 5.678.001 3.134 2.508 5.674 5.6 5.673C29.494 30 32 27.458 32 24.324c0-1.506-.59-2.95-1.641-4.014a5.561 5.561 0 0 0-3.962-1.661Zm0 2.027c.22.003.428.1.574.266.663.6 1.327 1.352 1.99 2.002a.8.8 0 0 1 0 1.14.788.788 0 0 1-1.125 0l-.638-.646v3.724a.814.814 0 0 1-.392.724.79.79 0 0 1-.815 0 .814.814 0 0 1-.392-.724v-3.724l-.637.646a.79.79 0 0 1-.773.215.803.803 0 0 1-.567-.575.816.816 0 0 1 .212-.783c.651-.664 1.333-1.388 1.99-2.002a.778.778 0 0 1 .575-.266l-.002.003Z",fill:"#0152d9",fillRule:"nonzero"}));var Xn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNiAwQzEuMTc1IDAgLjc2OC4xNy40NjguNDc0QTEuNjMgMS42MyAwIDAgMCAwIDEuNjIydjMuMjQzaDMuMjM3TDcuMzc4IDBIMS42Wm03Ljg3NiAwTDUuMzM4IDQuODY1aDUuOUwxNS4zNzEgMEg5LjQ3NlptNy45OTggMC00LjEzNyA0Ljg2NWg1Ljg5NkwyMy4zNzIgMGgtNS44OThabTggMC00LjEzOCA0Ljg2NWg2LjY2VjEuNjIyYTEuNjI5IDEuNjI5IDAgMCAwLS40NjctMS4xNDhBMS41ODUgMS41ODUgMCAwIDAgMjYuMzk3IDBoLS45MjRaTTAgNi40ODd2MTcuODM3YzAgLjQzLjE2Ny44NDQuNDY4IDEuMTQ4LjMuMzA1LjcwNy40NzUgMS4xMzIuNDc0aDE4LjYxYTYuNTE1IDYuNTE1IDAgMCAxIDEuNjUyLTYuMjE4IDYuMzEgNi4zMSAwIDAgMSA2LjEzNC0xLjY3NVY2LjQ4N0gwWm0xMS45OTggNS42NzUgNi40IDQuMDU2LTYuNCA0LjA1NXYtOC4xMVptMTQuMzk5IDYuNDg3Yy0zLjA5Mi4wMDItNS41OTcgMi41NDQtNS41OTUgNS42NzguMDAxIDMuMTM0IDIuNTA4IDUuNjc0IDUuNiA1LjY3M0MyOS40OTQgMzAgMzIgMjcuNDU4IDMyIDI0LjMyNGMwLTEuNTA2LS41OS0yLjk1LTEuNjQxLTQuMDE0YTUuNTYxIDUuNTYxIDAgMCAwLTMuOTYyLTEuNjYxWm0wIDIuMDI3Yy4yMi4wMDMuNDI4LjEuNTc0LjI2Ni42NjMuNiAxLjMyNyAxLjM1MiAxLjk5IDIuMDAyYS44LjggMCAwIDEgMCAxLjE0Ljc4OC43ODggMCAwIDEtMS4xMjUgMGwtLjYzOC0uNjQ2djMuNzI0YS44MTQuODE0IDAgMCAxLS4zOTIuNzI0Ljc5Ljc5IDAgMCAxLS44MTUgMCAuODE0LjgxNCAwIDAgMS0uMzkyLS43MjR2LTMuNzI0bC0uNjM3LjY0NmEuNzkuNzkgMCAwIDEtLjc3My4yMTUuODAzLjgwMyAwIDAgMS0uNTY3LS41NzUuODE2LjgxNiAwIDAgMSAuMjEyLS43ODNjLjY1MS0uNjY0IDEuMzMzLTEuMzg4IDEuOTktMi4wMDJhLjc3OC43NzggMCAwIDEgLjU3NS0uMjY2bC0uMDAyLjAwM1oiIGZpbGw9IiMwMTUyZDkiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",$n=Object.defineProperty,Un=Object.getOwnPropertySymbols,Qn=Object.prototype.hasOwnProperty,Vn=Object.prototype.propertyIsEnumerable,ni=(Ot,Xt,qt)=>Xt in Ot?$n(Ot,Xt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):Ot[Xt]=qt,ci=(Ot,Xt)=>{for(var qt in Xt||(Xt={}))Qn.call(Xt,qt)&&ni(Ot,qt,Xt[qt]);if(Un)for(var qt of Un(Xt))Vn.call(Xt,qt)&&ni(Ot,qt,Xt[qt]);return Ot};const wn=Ot=>React.createElement("svg",ci({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},Ot),React.createElement("title",null,"\u4E0A\u4F20\u6210\u529F"),React.createElement("path",{d:"M15 0c8.285 0 15 6.717 15 15 0 8.285-6.715 15-15 15-8.283 0-15-6.715-15-15C0 6.717 6.717 0 15 0Zm10.041 7.5v.01a47.934 47.934 0 0 0-11.232 9.386l-4.372-3.3v-.002L7.5 15.08l7.553 7.42A44.625 44.625 0 0 1 25.5 8.55l-.459-1.05Z",fill:"#44D7B6",fillRule:"nonzero"}));var zi="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1IDBjOC4yODUgMCAxNSA2LjcxNyAxNSAxNSAwIDguMjg1LTYuNzE1IDE1LTE1IDE1LTguMjgzIDAtMTUtNi43MTUtMTUtMTVDMCA2LjcxNyA2LjcxNyAwIDE1IDBabTEwLjA0MSA3LjV2LjAxYTQ3LjkzNCA0Ny45MzQgMCAwIDAtMTEuMjMyIDkuMzg2bC00LjM3Mi0zLjN2LS4wMDJMNy41IDE1LjA4bDcuNTUzIDcuNDJBNDQuNjI1IDQ0LjYyNSAwIDAgMSAyNS41IDguNTVsLS40NTktMS4wNVoiIGZpbGw9IiM0NEQ3QjYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",Gi=Object.defineProperty,Mr=Object.getOwnPropertySymbols,Ji=Object.prototype.hasOwnProperty,Zr=Object.prototype.propertyIsEnumerable,jr=(Ot,Xt,qt)=>Xt in Ot?Gi(Ot,Xt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):Ot[Xt]=qt,$r=(Ot,Xt)=>{for(var qt in Xt||(Xt={}))Ji.call(Xt,qt)&&jr(Ot,qt,Xt[qt]);if(Mr)for(var qt of Mr(Xt))Zr.call(Xt,qt)&&jr(Ot,qt,Xt[qt]);return Ot};const Vr=Ot=>React.createElement("svg",$r({xmlns:"http://www.w3.org/2000/svg",width:20,height:20},Ot),React.createElement("path",{fill:"#AFBACB",d:"M9.99.02C4.482.02.02 4.482.02 9.99c0 5.506 4.463 9.97 9.97 9.97 5.506 0 9.97-4.464 9.97-9.97 0-5.507-4.464-9.97-9.97-9.97Zm1.636 13.69c-.744 1.19-1.488 2.083-2.827 2.083-.893-.149-1.19-.744-1.042-1.488l1.637-5.506c0-.149 0-.298-.149-.298-.148 0-.446 0-.595.298l-1.042 1.19v-.744c.745-1.19 1.935-2.083 2.828-2.083.744.149 1.19.744 1.042 1.488L9.84 14.305c0 .149 0 .298.148.298.15 0 .447-.15.596-.298l1.041-1.34v.745Zm-.297-7.292c-.596 0-1.19-.446-1.19-1.19 0-.745.446-1.191 1.19-1.191.595 0 1.19.446 1.19 1.19 0 .745-.595 1.191-1.19 1.191Z"}));var co="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZmlsbD0iI0FGQkFDQiIgZD0iTTkuOTkuMDJDNC40ODIuMDIuMDIgNC40ODIuMDIgOS45OWMwIDUuNTA2IDQuNDYzIDkuOTcgOS45NyA5Ljk3IDUuNTA2IDAgOS45Ny00LjQ2NCA5Ljk3LTkuOTcgMC01LjUwNy00LjQ2NC05Ljk3LTkuOTctOS45N1ptMS42MzYgMTMuNjljLS43NDQgMS4xOS0xLjQ4OCAyLjA4My0yLjgyNyAyLjA4My0uODkzLS4xNDktMS4xOS0uNzQ0LTEuMDQyLTEuNDg4bDEuNjM3LTUuNTA2YzAtLjE0OSAwLS4yOTgtLjE0OS0uMjk4LS4xNDggMC0uNDQ2IDAtLjU5NS4yOThsLTEuMDQyIDEuMTl2LS43NDRjLjc0NS0xLjE5IDEuOTM1LTIuMDgzIDIuODI4LTIuMDgzLjc0NC4xNDkgMS4xOS43NDQgMS4wNDIgMS40ODhMOS44NCAxNC4zMDVjMCAuMTQ5IDAgLjI5OC4xNDguMjk4LjE1IDAgLjQ0Ny0uMTUuNTk2LS4yOThsMS4wNDEtMS4zNHYuNzQ1Wm0tLjI5Ny03LjI5MmMtLjU5NiAwLTEuMTktLjQ0Ni0xLjE5LTEuMTkgMC0uNzQ1LjQ0Ni0xLjE5MSAxLjE5LTEuMTkxLjU5NSAwIDEuMTkuNDQ2IDEuMTkgMS4xOSAwIC43NDUtLjU5NSAxLjE5MS0xLjE5IDEuMTkxWiIvPjwvc3ZnPg==",ko=Object.defineProperty,sn=Object.getOwnPropertySymbols,Jr=Object.prototype.hasOwnProperty,Dr=Object.prototype.propertyIsEnumerable,ur=(Ot,Xt,qt)=>Xt in Ot?ko(Ot,Xt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):Ot[Xt]=qt,Ui=(Ot,Xt)=>{for(var qt in Xt||(Xt={}))Jr.call(Xt,qt)&&ur(Ot,qt,Xt[qt]);if(sn)for(var qt of sn(Xt))Dr.call(Xt,qt)&&ur(Ot,qt,Xt[qt]);return Ot},Hr=(Ot,Xt,qt)=>new Promise((Bi,_i)=>{var li=Pi=>{try{ai(qt.next(Pi))}catch(Yi){_i(Yi)}},Si=Pi=>{try{ai(qt.throw(Pi))}catch(Yi){_i(Yi)}},ai=Pi=>Pi.done?Bi(Pi.value):Promise.resolve(Pi.value).then(li,Si);ai((qt=qt.apply(Ot,Xt)).next())});const fo=(Ot,Xt)=>{var qt,Bi,_i;const{uploadInfo:li={}}=Xt.payload;switch(Xt.type){case"addVideo":return{videoList:[...Ot.videoList,{name:li.file.name,size:li.file.size,type:li.file.type,fileHash:li.fileHash,state:li.state,video_id:li.videoId,attachment_id:"",article_id:-1,loaded:0,title:""}]};case"removeVideo":return{videoList:Ot.videoList.filter(Si=>Si.name!==Xt.payload.name)};case"replaceVideo":return{videoList:Xt.payload};case"removeAll":return[];case"updateProgress":return{videoList:Ot.videoList.map(Si=>Si.name===Xt.payload.uploadInfo.file.name?Ui(Ui({},Si),{loaded:Xt.payload.progressPercent,video_id:li.videoId,fileHash:li.fileHash}):Si)};case"updateTitle":return{videoList:(qt=Ot.videoList)==null?void 0:qt.map(Si=>Si.name===Xt.payload.item.name?Ui(Ui({},Si),{title:Xt.payload.title}):Si)};case"updateImg":return{videoList:(Bi=Ot.videoList)==null?void 0:Bi.map(Si=>Si.name===Xt.payload.item.name?Ui(Ui({},Si),{attachment_id:Xt.payload.attachment_id}):Si)};case"updateImg":return{videoList:(_i=Ot.videoList)==null?void 0:_i.map(Si=>Si.name===Xt.payload.item.name?Ui(Ui({},Si),{attachment_id:Xt.payload.attachment_id}):Si)};default:return[]}};var br=({onClose:Ot,onOk:Xt,identifier:qt,active:Bi})=>{var _i,li;const[Si]=rt.default.useForm(),[ai,Pi]=(0,Le.useState)({}),[Yi,Po]=(0,Le.useState)(!1),[wr,Go]=(0,Le.useState)(!1),[Wi,To]=(0,Le.useReducer)(fo,{videoList:[]}),Kr=(0,Fi.eY)(),rs=(0,Me.useParams)(),ho=(0,Le.useRef)();(0,Le.useEffect)(()=>{Bi&&Vo()},[Bi]);const Vo=()=>Hr(void 0,null,function*(){var Xr,Uo,Gr,Oa,Ys,ol,ku,ao,Tu,vo;const qo=yield(0,pe.M3)(qt,{active:Bi});if((qo==null?void 0:qo.status)===0){const Rs={name:(Xr=qo==null?void 0:qo.data)==null?void 0:Xr.name,content:(Uo=qo==null?void 0:qo.data)==null?void 0:Uo.content};Si.setFieldsValue(Rs),Pi(Rs),(Oa=(Gr=qo==null?void 0:qo.data)==null?void 0:Gr.videos)!=null&&Oa[0]&&To({type:"replaceVideo",payload:[{video_id:(ku=(ol=(Ys=qo==null?void 0:qo.data)==null?void 0:Ys.videos)==null?void 0:ol[0])==null?void 0:ku.video_id,name:(vo=(Tu=(ao=qo==null?void 0:qo.data)==null?void 0:ao.videos)==null?void 0:Tu[0])==null?void 0:vo.title,loaded:100}]})}}),Co=(Xr,Uo)=>{Pi(Ui({},Uo))},zr=Xr=>Hr(void 0,null,function*(){const Uo={videos:Wi.videoList,articles:Xr};Go(!0);let Gr;Bi?(Uo.active=Bi,Gr=yield(0,pe.gu)(qt,Uo)):Gr=yield(0,pe.bx)(qt,Uo),(Gr==null?void 0:Gr.status)===0&&(console.log(Bi||(Gr==null?void 0:Gr.id),44),Xt(Bi||(Gr==null?void 0:Gr.id))),Go(!1)}),Ko=()=>{const Xr=document.getElementById("fileUpload");Xr.value=""},ji=Xr=>{var Uo='{"Vod":{}}';if(Po(!0),ho.current){ho.current.addFile(Xr,null,null,null,Uo);return}(0,on.o)(Kr==null?void 0:Kr.login,"",{create:!ho,addFileSuccess:Gr=>{To({type:"addVideo",payload:{uploadInfo:Gr}})},onUploadProgress:(Gr,Oa,Ys)=>{const ol=Math.ceil(Ys*100);To({type:"updateProgress",payload:{uploadInfo:Gr,progressPercent:ol}}),Ko()},onUploadFailed:Gr=>{xe.ZP.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:Gr=>{Po(!1)},onUploadSucceed:Gr=>{Po(!1)},onUploadError:Gr=>{Po(!1)},gotUploader:Gr=>{Gr.addFile(Xr,null,null,null,Uo),ho.current=Gr}})},$o=Xr=>{var Uo;const Oa=Xr.target.files[0];if(!Oa){Ko();return}let Ys=Oa.name.toLowerCase();if(Ys&&Ys.indexOf(".avi")==-1&&Ys.indexOf(".flv")==-1&&Ys.indexOf(".f4v")==-1&&Ys.indexOf(".m4v")==-1&&Ys.indexOf(".mov")==-1&&Ys.indexOf(".mp4")==-1&&Ys.indexOf(".rmvb")==-1&&Ys.indexOf(".swf")==-1&&Ys.indexOf(".webm")==-1&&Ys.indexOf(".wmv")==-1){xe.ZP.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),Ko();return}if(Oa.size>1024*1024*1024){xe.ZP.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC71024M"),Ko();return}if((Uo=Wi.videoList)!=null&&Uo.find(ol=>ol.name===Oa.name)){xe.ZP.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),Ko();return}ji(Oa)},mo=(Xr,Uo)=>{be.default.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:Le.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",Uo?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:()=>{Ko(),To({type:"removeVideo",payload:{name:Xr}})}})},Oo=()=>Le.createElement("label",{htmlFor:"fileUpload",className:an.main},Le.createElement("img",{src:Xn,alt:""}),Le.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891")),Ks=Xr=>Le.createElement("div",{className:an.mainLoading},Le.createElement("div",{className:an.proWarp},Le.createElement("div",{className:an.pro},Le.createElement("div",{style:{width:Xr}})),Le.createElement("span",null,Xr||0,"%")),Le.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),Le.createElement("div",{className:an.tip},Le.createElement(Nn.Z,{getPopupContainer:Uo=>Uo.parentNode,title:Le.createElement("div",null,Le.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",Le.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),Le.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),Le.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},Le.createElement("img",{src:co,alt:""})))),hr=Xr=>Le.createElement("div",{className:an.mainSucceed},Le.createElement("img",{src:zi,alt:""}),Le.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),Le.createElement("div",{className:an.tip},Le.createElement(Nn.Z,{getPopupContainer:Uo=>Uo.parentNode,title:Le.createElement("div",null,Le.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",Le.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),Le.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),Le.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},Le.createElement("img",{src:co,alt:""}))),Le.createElement("div",{className:an.del,onClick:()=>mo(Xr.name,Xr.loaded==100)},Le.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891")),Fo=()=>{var Xr;return Le.createElement(Le.Fragment,null,(Xr=Wi.videoList)==null?void 0:Xr.map((Uo,Gr)=>Le.createElement(Le.Fragment,{key:Gr},Uo.loaded==100?hr(Uo):Ks(Uo.loaded))))},Eo=()=>{be.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:Ot})},Or=(_i=Wi.videoList)==null?void 0:_i.length;return Le.createElement("div",{className:an.listForm},Le.createElement("header",null,Bi?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),Le.createElement("section",{className:an.scroll,id:"sss"},Le.createElement("div",{className:an.formWrap}," ",Le.createElement(rt.default,{form:Si,scrollToFirstError:!0,layout:"vertical",onValuesChange:Co,onFinish:zr},Le.createElement(rt.default.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"},{max:60,message:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},Le.createElement(ut.default,{bordered:!1,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26",suffix:`${((li=ai.name)==null?void 0:li.length)||0}/60`})),Le.createElement(rt.default.Item,{name:"content",label:"\u5185\u5BB9:"},Le.createElement(Ti.Z,{defaultValue:ai.content||"",watch:!0})))),Le.createElement("div",{className:an.upload},Or?Fo():Oo(),Le.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:$o,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}))),Le.createElement("div",{className:an.btns},Le.createElement(ct.ZP,{onClick:Eo,type:"primary",ghost:!0},"\u5173\u95ED"),Le.createElement(ct.ZP,{loading:wr,disabled:Yi,onClick:()=>Si.submit(),type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},qr={flex_box_center:"flex_box_center___Udvu8",flex_space_between:"flex_space_between___WNLp1",flex_box_vertical_center:"flex_box_vertical_center___ecch5",flex_box_center_end:"flex_box_center_end___cu_DJ",flex_box_column:"flex_box_column___zF2CU",listDetails:"listDetails___HpDwH",head:"head___wipEz",name:"name___qdH8S",title:"title___B0yUa",a:"a___LB6ZS",b:"b___yvOON",tag:"tag___bRCso",btn:"btn___akBxg",scroll:"scroll___JKC_q",video:"video___nEr4F",html:"html___GDNSx",g:"g___LSOhO",btns:"btns___Ci727"},Ss=Ie(458),Vs=Object.defineProperty,Aa=Object.getOwnPropertySymbols,oa=Object.prototype.hasOwnProperty,nr=Object.prototype.propertyIsEnumerable,ns=(Ot,Xt,qt)=>Xt in Ot?Vs(Ot,Xt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):Ot[Xt]=qt,ss=(Ot,Xt)=>{for(var qt in Xt||(Xt={}))oa.call(Xt,qt)&&ns(Ot,qt,Xt[qt]);if(Aa)for(var qt of Aa(Xt))nr.call(Xt,qt)&&ns(Ot,qt,Xt[qt]);return Ot};const zs=Ot=>React.createElement("svg",ss({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:15,height:16},Ot),React.createElement("defs",null,React.createElement("path",{id:"jx_svg__a",d:"M6.385.257c.616-.343 1.616-.342 2.23 0l5.27 2.94C14.501 3.538 15 4.38 15 5.071v5.856c0 .692-.501 1.533-1.115 1.876l-5.27 2.939c-.616.343-1.616.342-2.23 0l-5.27-2.94C.499 12.462 0 11.622 0 10.929V5.072C0 4.38.501 3.54 1.115 3.196Zm1.423 3.817c-.169-.341-.446-.341-.615 0L6.38 5.717c-.169.341-.616.665-.994.72l-1.82.264c-.378.055-.464.317-.19.583l1.317 1.278c.273.266.444.79.38 1.165l-.31 1.806c-.066.376.158.538.496.36l1.628-.853c.338-.177.89-.177 1.23 0l1.627.853c.337.177.561.015.497-.36l-.31-1.806c-.065-.375.105-.899.379-1.165l1.316-1.278c.274-.266.188-.529-.19-.583l-1.819-.264c-.377-.054-.825-.378-.994-.72Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"jx_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#jx_svg__a"})),React.createElement("use",{fill:"#8DC9FF",fillRule:"nonzero",xlinkHref:"#jx_svg__a"}),React.createElement("circle",{cx:-1.5,cy:-3.5,r:16.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#jx_svg__b)"}),React.createElement("circle",{cx:-2.5,cy:-4.5,r:12.5,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#jx_svg__b)"})));var us="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNNi4zODUuMjU3Yy42MTYtLjM0MyAxLjYxNi0uMzQyIDIuMjMgMGw1LjI3IDIuOTRDMTQuNTAxIDMuNTM4IDE1IDQuMzggMTUgNS4wNzF2NS44NTZjMCAuNjkyLS41MDEgMS41MzMtMS4xMTUgMS44NzZsLTUuMjcgMi45MzljLS42MTYuMzQzLTEuNjE2LjM0Mi0yLjIzIDBsLTUuMjctMi45NEMuNDk5IDEyLjQ2MiAwIDExLjYyMiAwIDEwLjkyOVY1LjA3MkMwIDQuMzguNTAxIDMuNTQgMS4xMTUgMy4xOTZabTEuNDIzIDMuODE3Yy0uMTY5LS4zNDEtLjQ0Ni0uMzQxLS42MTUgMEw2LjM4IDUuNzE3Yy0uMTY5LjM0MS0uNjE2LjY2NS0uOTk0LjcybC0xLjgyLjI2NGMtLjM3OC4wNTUtLjQ2NC4zMTctLjE5LjU4M2wxLjMxNyAxLjI3OGMuMjczLjI2Ni40NDQuNzkuMzggMS4xNjVsLS4zMSAxLjgwNmMtLjA2Ni4zNzYuMTU4LjUzOC40OTYuMzZsMS42MjgtLjg1M2MuMzM4LS4xNzcuODktLjE3NyAxLjIzIDBsMS42MjcuODUzYy4zMzcuMTc3LjU2MS4wMTUuNDk3LS4zNmwtLjMxLTEuODA2Yy0uMDY1LS4zNzUuMTA1LS44OTkuMzc5LTEuMTY1bDEuMzE2LTEuMjc4Yy4yNzQtLjI2Ni4xODgtLjUyOS0uMTktLjU4M2wtMS44MTktLjI2NGMtLjM3Ny0uMDU0LS44MjUtLjM3OC0uOTk0LS43MloiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48dXNlIGZpbGw9IiM4REM5RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI2EiLz48Y2lyY2xlIGN4PSItMS41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLTIuNSIgY3k9Ii00LjUiIHI9IjEyLjUiIGZpbGw9IiNFRUY3RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgbWFzaz0idXJsKCNiKSIvPjwvZz48L3N2Zz4=",Ms=Object.defineProperty,ui=Object.getOwnPropertySymbols,qi=Object.prototype.hasOwnProperty,xr=Object.prototype.propertyIsEnumerable,Br=(Ot,Xt,qt)=>Xt in Ot?Ms(Ot,Xt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):Ot[Xt]=qt,Qr=(Ot,Xt)=>{for(var qt in Xt||(Xt={}))qi.call(Xt,qt)&&Br(Ot,qt,Xt[qt]);if(ui)for(var qt of ui(Xt))xr.call(Xt,qt)&&Br(Ot,qt,Xt[qt]);return Ot};const jo=Ot=>React.createElement("svg",Qr({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},Ot),React.createElement("defs",null,React.createElement("path",{id:"gf_svg__a",d:"m8 0 1.857 1.073h2.146l1.071 1.854L14.931 4v2.144L16 8l-1.069 1.857V12l-1.858 1.072-1.071 1.856H9.857L8 16l-1.855-1.073H4l-1.072-1.856L1.072 12V9.857L0 8l1.072-1.856V4l1.857-1.073 1.072-1.854h2.145L8 0Zm2.91 6.385H4.796V12h1.246v-.451h4.026v.435h1.247V9.196H6.043v-.515h4.866V6.385Zm-.84 3.681v.613H6.042v-.613h4.026ZM9.705 7.24v.588H6.043v-.588h3.663ZM8.615 4l-1.48.137c.055.133.12.284.192.453l.076.175H4v1.426h1.195v-.483h5.61v.483H12V4.765H8.883c-.078-.23-.148-.43-.21-.602L8.616 4Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"gf_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#gf_svg__a"})),React.createElement("use",{fill:"#8DC9FF",fillRule:"nonzero",xlinkHref:"#gf_svg__a"}),React.createElement("circle",{cx:.5,cy:-3.5,r:16.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#gf_svg__b)"}),React.createElement("circle",{cx:-.5,cy:-4.5,r:12.5,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#gf_svg__b)"})));var $i="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJtOCAwIDEuODU3IDEuMDczaDIuMTQ2bDEuMDcxIDEuODU0TDE0LjkzMSA0djIuMTQ0TDE2IDhsLTEuMDY5IDEuODU3VjEybC0xLjg1OCAxLjA3Mi0xLjA3MSAxLjg1Nkg5Ljg1N0w4IDE2bC0xLjg1NS0xLjA3M0g0bC0xLjA3Mi0xLjg1NkwxLjA3MiAxMlY5Ljg1N0wwIDhsMS4wNzItMS44NTZWNGwxLjg1Ny0xLjA3MyAxLjA3Mi0xLjg1NGgyLjE0NUw4IDBabTIuOTEgNi4zODVINC43OTZWMTJoMS4yNDZ2LS40NTFoNC4wMjZ2LjQzNWgxLjI0N1Y5LjE5Nkg2LjA0M3YtLjUxNWg0Ljg2NlY2LjM4NVptLS44NCAzLjY4MXYuNjEzSDYuMDQydi0uNjEzaDQuMDI2Wk05LjcwNSA3LjI0di41ODhINi4wNDN2LS41ODhoMy42NjNaTTguNjE1IDRsLTEuNDguMTM3Yy4wNTUuMTMzLjEyLjI4NC4xOTIuNDUzbC4wNzYuMTc1SDR2MS40MjZoMS4xOTV2LS40ODNoNS42MXYuNDgzSDEyVjQuNzY1SDguODgzYy0uMDc4LS4yMy0uMTQ4LS40My0uMjEtLjYwMkw4LjYxNiA0WiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzhEQzlGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9Ii41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLS41IiBjeT0iLTQuNSIgcj0iMTIuNSIgZmlsbD0iI0VFRjdGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PC9nPjwvc3ZnPg==",pa=Object.defineProperty,fs=Object.getOwnPropertySymbols,hs=Object.prototype.hasOwnProperty,eo=Object.prototype.propertyIsEnumerable,ws=(Ot,Xt,qt)=>Xt in Ot?pa(Ot,Xt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):Ot[Xt]=qt,ga=(Ot,Xt)=>{for(var qt in Xt||(Xt={}))hs.call(Xt,qt)&&ws(Ot,qt,Xt[qt]);if(fs)for(var qt of fs(Xt))eo.call(Xt,qt)&&ws(Ot,qt,Xt[qt]);return Ot};const is=Ot=>React.createElement("svg",ga({width:22,height:20,xmlns:"http://www.w3.org/2000/svg"},Ot),React.createElement("title",null,"\u5927\u70B9\u8D5E"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M3.566 19.08V8.134c0-.443-.318-.802-.71-.802H1.34c-.73 0-1.322.67-1.322 1.496v9.558c0 .827.593 1.496 1.322 1.496h1.515c.392 0 .71-.36.71-.802Z",fill:"#A3D3FF"}),React.createElement("path",{d:"M4.585 19.303V7.9c0-.263.188-.495.459-.559.955-.229 3.147-1.049 4.08-3.848.567-2.451 1.182-3.607 3.008-3.469 1.826.139 1.948 1.804 1.948 2.312v3.93s-.148.602.468.649c.617.046 5.426 0 5.426 0s2.639-.042 1.8 3.031c-.73 2.673-2.173 6.974-2.537 8.05a2.324 2.324 0 0 1-.324.626c-.353.483-1.094 1.258-2.228 1.258H5.201c-.341.002-.616-.257-.616-.577Z",fill:"#FFF"})));var Pa="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMy41NjYgMTkuMDhWOC4xMzRjMC0uNDQzLS4zMTgtLjgwMi0uNzEtLjgwMkgxLjM0Yy0uNzMgMC0xLjMyMi42Ny0xLjMyMiAxLjQ5NnY5LjU1OGMwIC44MjcuNTkzIDEuNDk2IDEuMzIyIDEuNDk2aDEuNTE1Yy4zOTIgMCAuNzEtLjM2LjcxLS44MDJaIiBmaWxsPSIjQTNEM0ZGIi8+PHBhdGggZD0iTTQuNTg1IDE5LjMwM1Y3LjljMC0uMjYzLjE4OC0uNDk1LjQ1OS0uNTU5Ljk1NS0uMjI5IDMuMTQ3LTEuMDQ5IDQuMDgtMy44NDguNTY3LTIuNDUxIDEuMTgyLTMuNjA3IDMuMDA4LTMuNDY5IDEuODI2LjEzOSAxLjk0OCAxLjgwNCAxLjk0OCAyLjMxMnYzLjkzcy0uMTQ4LjYwMi40NjguNjQ5Yy42MTcuMDQ2IDUuNDI2IDAgNS40MjYgMHMyLjYzOS0uMDQyIDEuOCAzLjAzMWMtLjczIDIuNjczLTIuMTczIDYuOTc0LTIuNTM3IDguMDVhMi4zMjQgMi4zMjQgMCAwIDEtLjMyNC42MjZjLS4zNTMuNDgzLTEuMDk0IDEuMjU4LTIuMjI4IDEuMjU4SDUuMjAxYy0uMzQxLjAwMi0uNjE2LS4yNTctLjYxNi0uNTc3WiIgZmlsbD0iI0ZGRiIvPjwvZz48L3N2Zz4=",Sa={flex_box_center:"flex_box_center___Fl60v",flex_space_between:"flex_space_between___bECvI",flex_box_vertical_center:"flex_box_vertical_center___NasnL",flex_box_center_end:"flex_box_center_end___llsAF",flex_box_column:"flex_box_column___KaTPF",discuss:"discuss___fk6PE",reply:"reply___pOmly",pagination:"pagination___qEsHX"},Na=Ie(77019),_s=Ie(5269),nl={flex_box_center:"flex_box_center___qGmgZ",flex_space_between:"flex_space_between___PeDhE",flex_box_vertical_center:"flex_box_vertical_center___avs2o",flex_box_center_end:"flex_box_center_end___bpXQB",flex_box_column:"flex_box_column___bc5wd",discussItem:"discussItem___zcesj",wrap:"wrap___ezVW4",list:"list___EEOWp",btns:"btns___Niwl7",secondLevelDiscuss:"secondLevelDiscuss___TXG1b",line:"line___ejh2a",thirdlyLevelDiscuss:"thirdlyLevelDiscuss___HRI5Q"},Hu=(Ot,Xt,qt)=>new Promise((Bi,_i)=>{var li=Pi=>{try{ai(qt.next(Pi))}catch(Yi){_i(Yi)}},Si=Pi=>{try{ai(qt.throw(Pi))}catch(Yi){_i(Yi)}},ai=Pi=>Pi.done?Bi(Pi.value):Promise.resolve(Pi.value).then(li,Si);ai((qt=qt.apply(Ot,Xt)).next())});const fl=({id:Ot,cb:Xt})=>{const[qt,Bi]=(0,Le.useState)("");return Le.createElement("aside",{className:"mt10"},Le.createElement(Ti.Z,{defaultValue:qt,id:"writeForumsReviewId",onChange:_i=>{Bi(_i)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),Le.createElement(Na.Z,null,Le.createElement(_s.Z,{flex:"1"}),Le.createElement(_s.Z,null,Le.createElement(ct.ZP,{type:"primary",size:"middle",onClick:()=>Hu(void 0,null,function*(){qt===""?xe.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):Xt(Ot,qt)})},"\u53D1\u9001"))))},Ol=({data:Ot})=>{var Xt;return Le.createElement("div",{className:nl.thirdlyLevelDiscuss},Le.createElement("span",{className:"c-grey-333"},Le.createElement("span",{className:"font 14 c-light-primary"},(Xt=Ot==null?void 0:Ot.author)==null?void 0:Xt.name),"@",Le.createElement("span",{className:"font 14 c-light-primary"},Ot==null?void 0:Ot.parent_name),":"),Le.createElement(ze.Z,{value:Ot==null?void 0:Ot.content}))},il=({data:Ot,onReplyDiscuss:Xt,thirdlyReply:qt,setThirdlyReply:Bi})=>{var _i,li,Si,ai;const Pi=(0,Fi.eY)();return console.log(Pi,"user"),Le.createElement("div",{className:nl.list},Le.createElement("img",{src:ge.Z.IMG_SERVER+"/images/"+((_i=Ot==null?void 0:Ot.author)==null?void 0:_i.image_url)}),Le.createElement("div",{className:nl.wrap},Le.createElement("div",{className:"font14",style:{marginBottom:6}},Le.createElement("span",{className:"c-grey-333"},(li=Ot==null?void 0:Ot.author)==null?void 0:li.name),(Pi==null?void 0:Pi.login)!==((Si=Ot==null?void 0:Ot.author)==null?void 0:Si.login)&&Le.createElement("span",{onClick:()=>Bi(Ot==null?void 0:Ot.id),className:"c-grey-999 current",style:{float:"right"}},Le.createElement("i",{className:"iconfont icon-huifu3 mr3 font12"}),Le.createElement("span",null,"\u56DE\u590D"))),Le.createElement(ze.Z,{value:Ot==null?void 0:Ot.content}),(ai=Ot==null?void 0:Ot.children)==null?void 0:ai.map(Yi=>Le.createElement(Ol,{key:Yi.id,data:Yi})),qt===(Ot==null?void 0:Ot.id)&&Le.createElement("div",null,Le.createElement(fl,{id:Ot==null?void 0:Ot.id,cb:Xt}),Le.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:()=>Bi(null),className:"c-light-primary current"},Le.createElement("i",{style:{transform:"scale(0.7)",display:"inline-block"},className:"iconfont icon-shouqi font12"}),"\u6536\u8D77\u56DE\u590D")),Le.createElement("div",{className:nl.line})))};var eh=({data:Ot,onReplyDiscuss:Xt,secondReply:qt,setSecondReply:Bi,thirdlyReply:_i,setThirdlyReply:li,onPlusDiscuss:Si})=>{var ai,Pi,Yi,Po;const[wr,Go]=(0,Le.useState)(!1);return console.log(Ot,"data"),Le.createElement("div",{className:nl.discussItem},Le.createElement("div",{className:nl.list},Le.createElement("img",{src:ge.Z.IMG_SERVER+"/images/"+((ai=Ot==null?void 0:Ot.author)==null?void 0:ai.image_url)}),Le.createElement("div",{className:nl.wrap},Le.createElement("div",{className:"font14",style:{marginBottom:6}},Le.createElement("span",{className:"c-grey-333 mr30"},(Pi=Ot==null?void 0:Ot.author)==null?void 0:Pi.name),Le.createElement("span",{className:"c-grey-999"},Ot==null?void 0:Ot.time)),Le.createElement(ze.Z,{value:Ot==null?void 0:Ot.content}),Le.createElement("div",{className:nl.btns},Le.createElement("div",{onClick:()=>Si(Ot==null?void 0:Ot.id),className:Ot!=null&&Ot.user_praise?"c-light-primary":"c-grey-999"},Le.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),Le.createElement("span",null,Ot==null?void 0:Ot.praise_count)),Le.createElement("div",{onClick:()=>{var Wi;((Wi=Ot==null?void 0:Ot.children)==null?void 0:Wi.length)!==0&&(Bi(null),Go(!wr))},style:{color:wr?"#0152d9":"#999999"}},Le.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),Le.createElement("span",null,wr?"\u6536\u8D77\u8BC4\u8BBA":(Yi=Ot==null?void 0:Ot.children)==null?void 0:Yi.length)),Le.createElement("div",{onClick:()=>{Go(!1),Bi(qt===(Ot==null?void 0:Ot.id)?null:Ot==null?void 0:Ot.id)},style:{color:qt===(Ot==null?void 0:Ot.id)?"#0152d9":"#999999"}},Le.createElement("i",{className:"iconfont icon-huifu3 mr3"}),Le.createElement("span",null,qt===(Ot==null?void 0:Ot.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),qt===(Ot==null?void 0:Ot.id)&&Le.createElement(fl,{id:Ot==null?void 0:Ot.id,cb:(Wi,To)=>{Xt(Wi,To),Go(!0)}}),wr&&Le.createElement("div",{className:nl.secondLevelDiscuss},(Po=Ot==null?void 0:Ot.children)==null?void 0:Po.map(Wi=>Le.createElement(il,{thirdlyReply:_i,setThirdlyReply:li,key:Wi.id,data:Wi,onReplyDiscuss:Xt}))))))},lu=(Ot,Xt,qt)=>new Promise((Bi,_i)=>{var li=Pi=>{try{ai(qt.next(Pi))}catch(Yi){_i(Yi)}},Si=Pi=>{try{ai(qt.throw(Pi))}catch(Yi){_i(Yi)}},ai=Pi=>Pi.done?Bi(Pi.value):Promise.resolve(Pi.value).then(li,Si);ai((qt=qt.apply(Ot,Xt)).next())}),Gu=({identifier:Ot,active:Xt,onOk:qt})=>{const[Bi,_i]=(0,Le.useState)(""),[li,Si]=(0,Le.useState)(1),[ai,Pi]=(0,Le.useState)([]),[Yi,Po]=(0,Le.useState)(0),[wr,Go]=(0,Le.useState)(null),[Wi,To]=(0,Le.useState)(null);(0,Le.useEffect)(()=>{Kr(1),Si(1)},[Xt]);const Kr=zr=>lu(void 0,null,function*(){const Ko=yield mn({container_type:"QuestionSolutionArticle",container_identifier:Xt,limit:5,page:zr});Ko!=null&&Ko.comments&&(Pi((Ko==null?void 0:Ko.comments)||[]),Si(zr),Po(Ko==null?void 0:Ko.disscuss_count))}),rs=()=>lu(void 0,null,function*(){if(Bi===""){xe.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");return}const zr=yield bi({comments:{content:Bi},container_type:"QuestionSolutionArticle",container_identifier:Xt});zr!=null&&zr.discuss&&(_i(""),Kr(li),qt())}),ho=(zr,Ko,ji)=>lu(void 0,null,function*(){const $o=yield ri({container_type:"QuestionSolutionArticle",container_identifier:Xt,comments:{content:Ko,parent_id:zr}});Go(null),To(null),Kr(li)}),Vo=zr=>lu(void 0,null,function*(){const Ko=yield Yn(zr);Kr(li)}),Co=zr=>{Si(zr),Kr(zr)};return Le.createElement("div",{className:Sa.discuss},Le.createElement("aside",{className:Sa.reply,style:{borderWidth:Yi?1:0}},Le.createElement(Ti.Z,{defaultValue:Bi,id:"writeForumsReviewId",onChange:zr=>{_i(zr)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),Le.createElement(Na.Z,null,Le.createElement(_s.Z,{flex:"1"}),Le.createElement(_s.Z,null,Le.createElement(ct.ZP,{type:"primary",size:"middle",onClick:()=>rs()},"\u53D1\u9001")))),ai==null?void 0:ai.map(zr=>Le.createElement(eh,{secondReply:wr,setSecondReply:Go,thirdlyReply:Wi,setThirdlyReply:To,key:zr.id,data:zr,onReplyDiscuss:ho,onPlusDiscuss:Vo})),Le.createElement(Ft.Z,{className:Sa.pagination,showTotal:zr=>Le.createElement("span",{style:{color:"#656F87"}},"\u5171",Le.createElement("span",{className:"c-light-primary"},zr),"\u6761\u6570\u636E"),current:li,onChange:Co,total:Yi,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},th=Ie(3736),uu=Object.defineProperty,hu=Object.getOwnPropertySymbols,ua=Object.prototype.hasOwnProperty,ma=Object.prototype.propertyIsEnumerable,Os=(Ot,Xt,qt)=>Xt in Ot?uu(Ot,Xt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):Ot[Xt]=qt,$s=(Ot,Xt)=>{for(var qt in Xt||(Xt={}))ua.call(Xt,qt)&&Os(Ot,qt,Xt[qt]);if(hu)for(var qt of hu(Xt))ma.call(Xt,qt)&&Os(Ot,qt,Xt[qt]);return Ot},Il=(Ot,Xt,qt)=>new Promise((Bi,_i)=>{var li=Pi=>{try{ai(qt.next(Pi))}catch(Yi){_i(Yi)}},Si=Pi=>{try{ai(qt.throw(Pi))}catch(Yi){_i(Yi)}},ai=Pi=>Pi.done?Bi(Pi.value):Promise.resolve(Pi.value).then(li,Si);ai((qt=qt.apply(Ot,Xt)).next())}),Yo=({active:Ot,identifier:Xt,onAssist:qt,onEdit:Bi,onArticlesSkip:_i,onClose:li,onOk:Si,onDelete:ai,detailsIndex:Pi,btnShowStatus:Yi})=>{var Po,wr,Go,Wi,To,Kr,rs,ho,Vo,Co;const[zr,Ko]=(0,Le.useState)(!0),[ji,$o]=(0,Le.useState)({});(0,Le.useEffect)(()=>{Ot&&mo()},[Ot,Pi]);const mo=(Eo=!0)=>Il(void 0,null,function*(){Eo&&Ko(!0);const Or=yield(0,pe.wO)(Xt,{active:Ot});(Or==null?void 0:Or.status)===0&&$o((Or==null?void 0:Or.data)||{}),Ko(!1)}),Oo=Eo=>Il(void 0,null,function*(){const Or=yield(0,pe.qe)(Xt,$s({active:Ot},Eo));(Or==null?void 0:Or.status)===0&&(mo(!1),Si())}),Ks=Eo=>Il(void 0,null,function*(){(yield(0,pe.Rg)(Xt,{active:Eo==null?void 0:Eo.id})).status===0&&(mo(!1),Si())}),hr=Eo=>{be.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:null,className:"custom-modal-divider",content:"\u786E\u8BA4\u8981\u5220\u9664\u8BE5\u9898\u89E3\u5417?",onOk:()=>ai(Eo)})},Fo=()=>{mo(!1),Si()};return Le.createElement("div",{className:qr.listDetails},Le.createElement(Ss.Z,{className:"pt20 pl20 pr20",loading:zr,active:!0,paragraph:{rows:5}},Le.createElement("div",{className:qr.head},Le.createElement("div",{className:qr.name},Le.createElement("div",{title:ji==null?void 0:ji.name,className:qr.title},ji==null?void 0:ji.name),(ji==null?void 0:ji.is_authority)&&Le.createElement("div",{className:qr.b},"\u5B98\u65B9"),(ji==null?void 0:ji.is_excellent)&&Le.createElement("div",{className:qr.a},"\u7CBE\u9009")),Le.createElement("div",{className:qr.tag},Le.createElement("img",{src:ge.Z.IMG_SERVER+"/images/"+(ji==null?void 0:ji.image_url)}),Le.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},ji==null?void 0:ji.username),Le.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",Ue()(ji==null?void 0:ji.created_at).format("YYYY-MM-DD")),Le.createElement("span",null,Le.createElement("img",{src:wi}),Le.createElement("span",null,ji==null?void 0:ji.praises_count)),Le.createElement("span",null,Le.createElement("img",{src:Yr}),Le.createElement("span",null,ji==null?void 0:ji.discusses_count)),Le.createElement("span",null,Le.createElement("img",{src:Er}),Le.createElement("span",null,ji==null?void 0:ji.viewed_count)),Le.createElement("div",{className:qr.btn},((0,Fi.Ny)()||(ji==null?void 0:ji.is_self))&&Le.createElement(Le.Fragment,null,Le.createElement(ct.ZP,{onClick:()=>hr(ji),type:"primary",ghost:!0},"\u5220\u9664"),Le.createElement(ct.ZP,{onClick:()=>Bi(ji),type:"primary",ghost:!0},"\u7F16\u8F91")),(0,Fi.Ny)()&&Le.createElement(ct.ZP,{onClick:()=>Oo({is_authority:!(ji!=null&&ji.is_authority)}),type:"primary"},Le.createElement("img",{src:$i}),ji!=null&&ji.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),(0,Fi.Ny)()&&Le.createElement(ct.ZP,{onClick:()=>Oo({is_excellent:!(ji!=null&&ji.is_excellent)}),type:"primary"},Le.createElement("img",{src:us}),ji!=null&&ji.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),Le.createElement("div",{className:qr.scroll},((wr=(Po=ji==null?void 0:ji.videos)==null?void 0:Po[0])==null?void 0:wr.id)&&Le.createElement("div",{className:qr.video},Le.createElement(ye.Z,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!((Wi=(Go=ji==null?void 0:ji.videos)==null?void 0:Go[0])!=null&&Wi.transcoded)},Le.createElement(th.Z,{poster:(Kr=(To=ji==null?void 0:ji.videos)==null?void 0:To[0])==null?void 0:Kr.cover_url,src:((ho=(rs=ji==null?void 0:ji.videos)==null?void 0:rs[0])==null?void 0:ho.play_url)||"",videoId:(Co=(Vo=ji==null?void 0:ji.videos)==null?void 0:Vo[0])==null?void 0:Co.id,logWatchHistory:()=>{}}))),Le.createElement(ze.Z,{className:qr.html,value:(ji==null?void 0:ji.content)||""}),Le.createElement("div",{onClick:()=>Ks(ji),className:qr.g},Le.createElement("img",{className:"mr10",src:(ji!=null&&ji.user_liker,Pa)}),Le.createElement("span",null,ji==null?void 0:ji.praises_count)),Le.createElement(Gu,{onOk:Fo,active:Ot,identifier:Xt})),Le.createElement("div",{className:qr.btns},Le.createElement(ct.ZP,{onClick:()=>li(),type:"primary",ghost:!0},"\u5173\u95ED"),Yi[0]&&Le.createElement(ct.ZP,{onClick:Eo=>_i(Eo,"prev"),style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),Yi[1]&&Le.createElement(ct.ZP,{onClick:Eo=>_i(Eo,"next"),style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},zo=Object.defineProperty,xo=Object.getOwnPropertySymbols,Us=Object.prototype.hasOwnProperty,Ii=Object.prototype.propertyIsEnumerable,Hs=(Ot,Xt,qt)=>Xt in Ot?zo(Ot,Xt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):Ot[Xt]=qt,Vt=(Ot,Xt)=>{for(var qt in Xt||(Xt={}))Us.call(Xt,qt)&&Hs(Ot,qt,Xt[qt]);if(xo)for(var qt of xo(Xt))Ii.call(Xt,qt)&&Hs(Ot,qt,Xt[qt]);return Ot};const In=Ot=>React.createElement("svg",Vt({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},Ot),React.createElement("defs",null,React.createElement("path",{id:"a_svg__a",d:"M13.727 0C14.983 0 16 .895 16 2v12c0 1.105-1.017 2-2.273 2H2.273C1.017 16 0 15.105 0 14V2C0 .895 1.017 0 2.273 0h11.454ZM7.464 11H2.955c-.266 0-.513.19-.646.5s-.133.69 0 1c.133.31.38.5.646.5h4.509c.411 0 .745-.448.745-1s-.334-1-.745-1Zm4-3.5H2.955c-.411 0-.745.448-.745 1s.334 1 .745 1h8.509c.412 0 .746-.448.746-1s-.334-1-.746-1ZM3.71 2.75a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"a_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#a_svg__a"})),React.createElement("use",{fill:"#7DC1FF",fillRule:"nonzero",xlinkHref:"#a_svg__a"}),React.createElement("circle",{cx:1.5,cy:.5,r:16.5,fill:"#A3D3FF",fillRule:"nonzero",mask:"url(#a_svg__b)"}),React.createElement("ellipse",{cx:1.5,cy:-.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#a_svg__b)",rx:12.5,ry:12}),React.createElement("ellipse",{cx:-2.5,cy:-4,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#a_svg__b)",rx:12.5,ry:12})));var pl="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNMTMuNzI3IDBDMTQuOTgzIDAgMTYgLjg5NSAxNiAydjEyYzAgMS4xMDUtMS4wMTcgMi0yLjI3MyAySDIuMjczQzEuMDE3IDE2IDAgMTUuMTA1IDAgMTRWMkMwIC44OTUgMS4wMTcgMCAyLjI3MyAwaDExLjQ1NFpNNy40NjQgMTFIMi45NTVjLS4yNjYgMC0uNTEzLjE5LS42NDYuNXMtLjEzMy42OSAwIDFjLjEzMy4zMS4zOC41LjY0Ni41aDQuNTA5Yy40MTEgMCAuNzQ1LS40NDguNzQ1LTFzLS4zMzQtMS0uNzQ1LTFabTQtMy41SDIuOTU1Yy0uNDExIDAtLjc0NS40NDgtLjc0NSAxcy4zMzQgMSAuNzQ1IDFoOC41MDljLjQxMiAwIC43NDYtLjQ0OC43NDYtMXMtLjMzNC0xLS43NDYtMVpNMy43MSAyLjc1YTEuNSAxLjUgMCAxIDAgMCAzIDEuNSAxLjUgMCAwIDAgMC0zWiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzdEQzFGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9IjEuNSIgY3k9Ii41IiByPSIxNi41IiBmaWxsPSIjQTNEM0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiLz48ZWxsaXBzZSBjeD0iMS41IiBjeT0iLS41IiBmaWxsPSIjQzFFMkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48ZWxsaXBzZSBjeD0iLTIuNSIgY3k9Ii00IiBmaWxsPSIjRUVGN0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48L2c+PC9zdmc+",Kl=Ie(59477),Ns=Ie(89489),sa=Object.defineProperty,rl=Object.defineProperties,bl=Object.getOwnPropertyDescriptors,Cu=Object.getOwnPropertySymbols,ps=Object.prototype.hasOwnProperty,Rr=Object.prototype.propertyIsEnumerable,va=(Ot,Xt,qt)=>Xt in Ot?sa(Ot,Xt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):Ot[Xt]=qt,Is=(Ot,Xt)=>{for(var qt in Xt||(Xt={}))ps.call(Xt,qt)&&va(Ot,qt,Xt[qt]);if(Cu)for(var qt of Cu(Xt))Rr.call(Xt,qt)&&va(Ot,qt,Xt[qt]);return Ot},gs=(Ot,Xt)=>rl(Ot,bl(Xt)),to=(Ot,Xt,qt)=>new Promise((Bi,_i)=>{var li=Pi=>{try{ai(qt.next(Pi))}catch(Yi){_i(Yi)}},Si=Pi=>{try{ai(qt.throw(Pi))}catch(Yi){_i(Yi)}},ai=Pi=>Pi.done?Bi(Pi.value):Promise.resolve(Pi.value).then(li,Si);ai((qt=qt.apply(Ot,Xt)).next())}),Da=({identifier:Ot,tabStatus:Xt,setFilterListTotal:qt,setListStatus:Bi})=>{const _i={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null};let[li,Si]=(0,Le.useState)(Is({},_i));const[ai,Pi]=(0,Le.useState)(!1),[Yi,Po]=(0,Le.useState)(0),[wr,Go]=(0,Le.useState)(1),[Wi,To]=(0,Le.useState)(null),[Kr,rs]=(0,Le.useState)([]),[ho,Vo]=(0,Le.useState)([!0,!0]),[Co,zr]=(0,Le.useState)(0),Ko=(0,Le.useRef)(null);(0,Le.useEffect)(()=>{Xr()},[Xt]),(0,Le.useEffect)(()=>{ji()},[Wi]),(0,Le.useEffect)(()=>{mo(Is({},_i)),Xr()},[Ot]),(0,Le.useEffect)(()=>(window.addEventListener("resize",$o),Bi(Co),()=>{window.removeEventListener("resize",$o)}),[Co]);const ji=()=>to(void 0,null,function*(){if(!Wi){Vo([!0,!0]);return}const vo=[!0,!0],qo=Kr==null?void 0:Kr.findIndex(Rs=>Rs.id===Wi);qo===0&&li.page===1&&(vo[0]=!1),(li.page-1)*li.limit+(qo+1)===li.total&&(vo[1]=!1),Vo(vo)}),$o=()=>{var vo;if(Co){const qo=window.innerWidth-((vo=Ko.current)==null?void 0:vo.clientWidth);Po(qo)}},mo=vo=>to(void 0,null,function*(){var qo,Rs,Au;Pi(!0);const Ia=yield(0,pe.WH)(Ot,vo);return(Ia==null?void 0:Ia.status)===0&&(rs(((qo=Ia==null?void 0:Ia.data)==null?void 0:qo.articles)||[]),Si(gs(Is({},vo),{total:(Rs=Ia==null?void 0:Ia.data)==null?void 0:Rs.articles_count})),qt((Au=Ia==null?void 0:Ia.data)==null?void 0:Au.articles_count)),Pi(!1),Ia}),Oo=()=>{(li==null?void 0:li.sort_direction)===null?li.sort_direction="asc":(li==null?void 0:li.sort_direction)==="asc"?li.sort_direction="desc":(li==null?void 0:li.sort_direction)==="desc"&&(li.sort_direction=null),li.page=1,Xr(),Si(Is({},li)),mo(li)},Ks=()=>{li.page=1,li.search=li==null?void 0:li.save_search,Xr(),Si(Is({},li)),mo(li)},hr=()=>{var vo;const qo=document.getElementsByClassName("btn-resize");qo[0].style.visibility="hidden";const Rs=window.innerWidth-((vo=Ko.current)==null?void 0:vo.clientWidth);Po(Rs)},Fo=()=>{hr(),zr(1)},Eo=vo=>{hr(),To(vo==null?void 0:vo.id),zr(3)},Or=vo=>{hr(),To(vo==null?void 0:vo.id),zr(2)},Xr=()=>{const vo=document.getElementsByClassName("btn-resize");vo[0].style.visibility="visible",Po(0),zr(0),To(null)},Uo=vo=>{zr(3),To(vo),li.page=1,Si(Is({},li)),mo(li)},Gr=vo=>{zr(3),To(vo),Si(Is({},li)),mo(li)},Oa=vo=>{Si(Is({},li)),mo(li)},Ys=vo=>to(void 0,null,function*(){(yield(0,pe.Rg)(Ot,{active:vo==null?void 0:vo.id})).status===0&&(mo(li),Go(wr+1))}),ol=vo=>to(void 0,null,function*(){(yield(0,pe.rL)(Ot,{active:vo==null?void 0:vo.id})).status===0&&(mo(li),Go(wr+1))}),ku=vo=>to(void 0,null,function*(){(yield(0,pe.de)(Ot,{active:vo==null?void 0:vo.id})).status===0&&(Xr(),mo(li))}),ao=vo=>{li.page=vo,Si(Is({},li)),mo(li)},Tu=(vo,qo)=>to(void 0,null,function*(){var Rs,Au,Ia,$c;const gl=Kr==null?void 0:Kr.findIndex(ta=>ta.id===Wi);if(console.log(gl,qo,22),qo==="prev"){if(gl===void 0){xe.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(gl===0){if(li.page===1){xe.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(li.page!==1){li.page=li.page-1,Si(Is({},li));const ta=yield mo(li);if((ta==null?void 0:ta.status)===0){const ql=(Ia=ta==null?void 0:ta.data)==null?void 0:Ia.articles[((Au=(Rs=ta==null?void 0:ta.data)==null?void 0:Rs.articles)==null?void 0:Au.length)-1];To(ql==null?void 0:ql.id),console.log(vo.target,555)}}}else{const ta=Kr[gl-1];To(ta==null?void 0:ta.id)}}if(qo==="next"){if(gl===void 0){xe.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if((li.page-1)*li.limit+(gl+1)===li.total){xe.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(gl+1===li.limit){li.page=li.page+1,Si(Is({},li));const ta=yield mo(li);if((ta==null?void 0:ta.status)===0){const ql=($c=ta==null?void 0:ta.data)==null?void 0:$c.articles[0];To(ql==null?void 0:ql.id)}}else{const ta=Kr[gl+1];To(ta==null?void 0:ta.id)}}});return Le.createElement("div",{className:jt.wrap,ref:Ko},Le.createElement("div",{className:jt.head},Le.createElement("div",{className:jt.sort,onClick:Oo},Le.createElement("span",null,"\u6700\u65B0"),Le.createElement("aside",null,Le.createElement(Kl.Z,{style:{color:(li==null?void 0:li.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),Le.createElement(Ns.Z,{style:{color:(li==null?void 0:li.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),Le.createElement(ut.default.Search,{value:li.save_search,className:jt["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:vo=>{li.save_search=vo.target.value,Si(Is({},li))},onSearch:Ks}),Le.createElement("div",{onClick:Fo,className:jt.btn},Le.createElement("img",{src:pl}),"\u5199\u9898\u89E3")),Le.createElement("div",{className:jt.listWarp},Le.createElement(ye.Z,{spinning:ai,className:"mt20"},Kr==null?void 0:Kr.map((vo,qo)=>{let Rs=!0;return qo+1===Kr.length&&qo!==0&&(Rs=!1),Le.createElement(_o,{active:Wi,key:vo.id,data:vo,showLine:Rs,onClick:Eo,onAssist:Ys,onHide:ol})}),(Kr==null?void 0:Kr.length)===0&&Le.createElement(ht.Z,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),Le.createElement(Ft.Z,{className:jt.pagination,showTotal:vo=>Le.createElement("span",{style:{color:"#656F87"}},"\u5171",Le.createElement("span",{className:"c-light-primary"},vo),"\u6761\u6570\u636E"),total:li.total,showSizeChanger:!1,current:li==null?void 0:li.page,onChange:ao,hideOnSinglePage:!0,showQuickJumper:!0}),Co>0&&Le.createElement("div",{className:jt.fixedRight,style:{width:Yi}},Co===1&&Le.createElement(br,{identifier:Ot,onClose:Xr,onOk:Uo}),Co===2&&Le.createElement(br,{active:Wi,identifier:Ot,onClose:Xr,onOk:Gr}),Co===3&&Le.createElement(Yo,{btnShowStatus:ho,onArticlesSkip:Tu,detailsIndex:wr,active:Wi,identifier:Ot,onClose:Xr,onOk:Oa,onEdit:Or,onAssist:Ys,onDelete:ku})))},Xo={flex_box_center:"flex_box_center___BbEkt",flex_space_between:"flex_space_between___v3cDl",flex_box_vertical_center:"flex_box_vertical_center___wUFLn",flex_box_center_end:"flex_box_center_end___Tdr08",flex_box_column:"flex_box_column___fYHlj",wrap:"wrap___UAZFM",head:"head___Nl6hk",title:"title___Ir573",content:"content___xUewa",list:"list___oi2ig",footer:"footer___V3bwQ"},Ka=Object.defineProperty,ea=Object.defineProperties,Eu=Object.getOwnPropertyDescriptors,Io=Object.getOwnPropertySymbols,ha=Object.prototype.hasOwnProperty,Ro=Object.prototype.propertyIsEnumerable,es=(Ot,Xt,qt)=>Xt in Ot?Ka(Ot,Xt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):Ot[Xt]=qt,Jo=(Ot,Xt)=>{for(var qt in Xt||(Xt={}))ha.call(Xt,qt)&&es(Ot,qt,Xt[qt]);if(Io)for(var qt of Io(Xt))Ro.call(Xt,qt)&&es(Ot,qt,Xt[qt]);return Ot},cs=(Ot,Xt)=>ea(Ot,Eu(Xt)),No=(Ot,Xt,qt)=>new Promise((Bi,_i)=>{var li=Pi=>{try{ai(qt.next(Pi))}catch(Yi){_i(Yi)}},Si=Pi=>{try{ai(qt.throw(Pi))}catch(Yi){_i(Yi)}},ai=Pi=>Pi.done?Bi(Pi.value):Promise.resolve(Pi.value).then(li,Si);ai((qt=qt.apply(Ot,Xt)).next())}),Ar=({visible:Ot,onVisible:Xt,value:qt,onChange:Bi,setIndex:_i})=>{var li;const Si={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null};let[ai,Pi]=(0,Le.useState)(Si);const[Yi,Po]=(0,Le.useState)([]),[wr,Go]=(0,Le.useState)([]),[Wi,To]=(0,Le.useState)(!1),Kr=(0,Le.useRef)([]),rs=(0,Le.useRef)(null),ho=(0,Me.useParams)();(0,Le.useEffect)(()=>(ho!=null&&ho.id&&(rs.current=setInterval(()=>{Vo(30)},3e4)),()=>{clearInterval(rs.current)}),[]);const Vo=hr=>No(void 0,null,function*(){const Fo=yield(0,pe.uc)(ho==null?void 0:ho.id,{practice_time:hr})});(0,Le.useEffect)(()=>{mo(ai),ji()},[]),(0,Le.useEffect)(()=>(window.addEventListener("click",zr),()=>{window.removeEventListener("click",zr)}),[ho==null?void 0:ho.save_identifier,Ot]),(0,Le.useEffect)(()=>{const hr=Kr.current.findIndex(Uo=>Uo.identifier===(ho==null?void 0:ho.save_identifier)),Fo=Kr.current[hr-1],Eo=Kr.current[hr+1],Or=document.getElementById("oj-prev"),Xr=document.getElementById("oj-next");Fo?Or.style.display="block":Or.style.display="none",Eo?Xr.style.display="block":Xr.style.display="none"},[ho==null?void 0:ho.save_identifier,Kr.current]);const Co=(hr,Fo)=>{if(hr.id===Fo)return hr;for(let Eo=0,Or=hr;Or=Or.parentNode;Eo++){if(Or.id===Fo)return Or;if(Or==document.documentElement)return!1}},zr=hr=>No(void 0,null,function*(){!Co(hr.target,"oj-drawer")&&Ot&&Xt(!1);const Fo=Kr.current.findIndex(Xr=>Xr.identifier===(ho==null?void 0:ho.save_identifier)),Eo=Kr.current[Fo-1],Or=Kr.current[Fo+1];if(hr.target.id==="oj-prev"){if(!Eo||Fo===-1){xe.ZP.warning("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728");return}hr.target.style.pointerEvents="none",hr.target.style.cursor="not-allowed",yield Oo(Eo==null?void 0:Eo.identifier),_i("0"),setTimeout(()=>{hr.target.style.pointerEvents="auto",hr.target.style.cursor="pointer"},400)}if(hr.target.id==="oj-next"||hr.target.id==="oj-modal-next"){if(!Or||Fo===-1){xe.ZP.warning("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728");return}hr.target.style.pointerEvents="none",hr.target.style.cursor="not-allowed",yield Oo(Or==null?void 0:Or.identifier),_i("0"),setTimeout(()=>{hr.target.style.pointerEvents="auto",hr.target.style.cursor="pointer"},400)}});(0,Le.useEffect)(()=>{Bi(ho==null?void 0:ho.save_identifier);const hr=wr.findIndex(Fo=>Fo.some(Eo=>Eo.identifier===(ho==null?void 0:ho.save_identifier)));Pi(hr===-1?cs(Jo({},ai),{page:1}):cs(Jo({},ai),{page:hr+1}))},[ho==null?void 0:ho.save_identifier,wr]);const Ko=hr=>{ai.page=1,ai.tag_discipline_id=hr,Pi(Jo({},ai)),mo(ai)},ji=()=>No(void 0,null,function*(){const hr=yield(0,Jn.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});Po(hr.tag_disciplines||[])}),$o=hr=>{ai.page=1,ai.difficulty=typeof hr=="number"?hr:null,Pi(Jo({},ai)),mo(ai)},mo=hr=>No(void 0,null,function*(){var Fo,Eo;To(!0);const Or=yield(0,pe.KC)(hr);if(Or!=null&&Or.practices_list){for(var Xr=(Fo=Or==null?void 0:Or.practices_list)==null?void 0:Fo.length,Uo=[],Gr=0;Gr<Xr;Gr+=ai==null?void 0:ai.per_page)Uo.push((Eo=Or==null?void 0:Or.practices_list)==null?void 0:Eo.slice(Gr,Gr+(ai==null?void 0:ai.per_page)));Pi(cs(Jo({},ai),{total:Or==null?void 0:Or.practices_count})),Kr.current=(Or==null?void 0:Or.practices_list)||[],Go(Uo)}To(!1)}),Oo=(hr,Fo)=>No(void 0,null,function*(){const Eo=yield(0,Jn.ZP)(`/api/practices/${hr}/start`,{method:"get"});(Eo==null?void 0:Eo.status)===0&&Me.history.push(`/problems/${Eo==null?void 0:Eo.identifier}/oj/${hr}`)}),Ks=hr=>{ai.page=hr,Pi(Jo({},ai))};return Le.createElement("div",{className:Xo.wrap,id:"oj-drawer",style:{left:Ot?0:-700}},Le.createElement("div",{className:Xo.head},Le.createElement("div",{className:Xo.title},"\u9898\u76EE\u5217\u8868"),Le.createElement(ut.default.Search,{value:ai==null?void 0:ai.save_search,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",style:{width:180,marginLeft:"auto",marginRight:10},onChange:hr=>{ai.save_search=hr.target.value,Pi(Jo({},ai))},onSearch:()=>{ai.page=1,ai.search=ai.save_search,Pi(Jo({},ai)),mo(ai)}}),Le.createElement(we.default,{value:ai==null?void 0:ai.tag_discipline_id,style:{width:210},mode:"multiple",placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,showArrow:!0,getPopupContainer:hr=>hr.parentNode,maxTagTextLength:2,maxTagCount:2,onChange:Ko},Yi.map(hr=>Le.createElement(we.default.Option,{key:hr.id,value:hr.id},hr.name))),Le.createElement(we.default,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"\u96BE\u5EA6",getPopupContainer:hr=>hr.parentNode,value:ai==null?void 0:ai.difficulty,onChange:$o},Le.createElement(we.default.Option,{value:1},"\u7B80\u5355"),Le.createElement(we.default.Option,{value:2},"\u9002\u4E2D"),Le.createElement(we.default.Option,{value:3},"\u56F0\u96BE"))),Le.createElement("div",{className:Xo.content},Le.createElement(ye.Z,{spinning:Wi},(li=wr==null?void 0:wr[ai.page-1])==null?void 0:li.map(hr=>Le.createElement("div",{key:hr.identifier,className:Xo.list,onClick:Fo=>Oo(hr.identifier,Fo)},Le.createElement("i",{style:{visibility:qt===hr.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),Le.createElement("span",{style:{fontWeight:qt===hr.identifier?"bold":400,color:qt===hr.identifier?"#ffffff":"#bac4cd"},title:hr==null?void 0:hr.name},hr.name),(hr==null?void 0:hr.difficulty)===1&&Le.createElement("b",{style:{color:"#2FA34F"}},"\u7B80\u5355"),(hr==null?void 0:hr.difficulty)===2&&Le.createElement("b",{style:{color:"#0152d9"}},"\u9002\u4E2D"),(hr==null?void 0:hr.difficulty)===3&&Le.createElement("b",{style:{color:"#FA6400"}},"\u56F0\u96BE"))))),Le.createElement("div",{className:Xo.footer},Le.createElement(Ft.Z,{showTotal:hr=>Le.createElement("span",{style:{color:"#656F87"}},"\u5171",Le.createElement("span",{className:"c-light-primary"},hr),"\u6761\u6570\u636E"),total:ai.total,pageSize:ai==null?void 0:ai.per_page,current:ai==null?void 0:ai.page,showSizeChanger:!1,onChange:Ks,showQuickJumper:!0,hideOnSinglePage:!0})))},vc=({hack:Ot,onTriggerPraise:Xt,topicId:qt,page:Bi,onPageChange:_i,user:li,submitRecords:Si,submitting:ai,submitResult:Pi})=>{const[Yi]=(0,Me.useSearchParams)(),Po=(0,Me.useLocation)(),[wr,Go]=(0,Le.useState)(Yi.get("tab")||"0"),[Wi,To]=(0,Le.useState)(0),[Kr,rs]=(0,Le.useState)(0),[ho,Vo]=(0,Le.useState)(0),[Co,zr]=(0,Le.useState)(),[Ko,ji]=(0,Le.useState)(!1);function $o(Oo){const Ks=Oo.target.id;if(wr==="3"&&Ks!==wr&&(Kr===1||Kr===2)){be.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:()=>{Go(Ks)}});return}Go(Ks)}(0,Le.useEffect)(()=>vt.Z.subscribe("to-commit-info",()=>{Go("1")}),[]);function mo(){Go("2")}return Le.createElement("div",{className:Ut["left-panel"]},Le.createElement("ul",{className:`${Ut["s-navs"]} ${Ut["bg-white"]} ${Ut.b1}`},Le.createElement("li",{className:"mr40 current"},Le.createElement("img",{onClick:()=>ji(!0),src:un})),Le.createElement("li",{className:Ut["oj-mr"]},Le.createElement("a",{className:wr==="0"?Ut.active:"",id:"0",onClick:$o},"\u4EFB\u52A1\u63CF\u8FF0")),Le.createElement("li",{className:Ut["oj-mr"]},Le.createElement("a",{className:wr==="3"?Ut.active:"",id:"3",onClick:$o},"\u9898\u89E3",ho?`(${ho})`:"")),Le.createElement("li",{className:Ut["oj-mr"]},Le.createElement("a",{className:wr==="2"?Ut.active:"",id:"2",onClick:$o},"\u8BC4\u8BBA",Wi?`(${Wi})`:"")),Le.createElement("li",null,Le.createElement("a",{className:wr==="1"?Ut.active:"",id:"1",onClick:$o},"\u63D0\u4EA4\u8BB0\u5F55"))),Le.createElement("div",{className:`${Ut["tab-panel-body"]} ${wr==="0"?"":"hide"}`,style:{padding:"0 0 0 16px"}},Le.createElement(We,{hack:Ot,onTriggerPraise:Xt,toDiscuss:mo})),Le.createElement("div",{className:`${Ut["tab-panel-body"]} ${wr==="1"?"":"hide"}`},Si!=null&&Si.records_count?Le.createElement(tt,{page:Bi,onPageChange:_i,topicId:qt,submitting:ai,submitRecords:Si,submitResult:Pi}):Le.createElement(ht.Z,null)),Le.createElement("div",{className:`${Ut["tab-panel-body"]} ${wr==="2"?"":"hide"}`,style:{padding:0}},Le.createElement(pn,{setDiscussTotal:To,user:li,identifier:Ot.identifier,hack:Ot,onTriggerPraise:Xt})),Le.createElement("div",{className:`${Ut["tab-panel-body"]} ${wr==="3"?"":"hide"}`,style:{padding:0}},Le.createElement(Da,{setListStatus:rs,setFilterListTotal:Vo,tabStatus:wr,identifier:Ot.identifier})),Le.createElement(Ar,{visible:Ko,setIndex:Go,onVisible:Oo=>ji(Oo),value:Co,onChange:Oo=>zr(Oo)}))},bo=Ie(96680),Gh=Ie(62522),Lu=Ie(3932),ih=Ie(64126),Wh=Ie(89392),Ph=Ie.n(Wh),Yl=Ie(56102),Wr=Ie(59301),Ho=Object.defineProperty,Pl=Object.defineProperties,Ch=Object.getOwnPropertyDescriptors,Cl=Object.getOwnPropertySymbols,Eh=Object.prototype.hasOwnProperty,Xl=Object.prototype.propertyIsEnumerable,po=(Ot,Xt,qt)=>Xt in Ot?Ho(Ot,Xt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):Ot[Xt]=qt,Nr=(Ot,Xt)=>{for(var qt in Xt||(Xt={}))Eh.call(Xt,qt)&&po(Ot,qt,Xt[qt]);if(Cl)for(var qt of Cl(Xt))Xl.call(Xt,qt)&&po(Ot,qt,Xt[qt]);return Ot},Do=(Ot,Xt)=>Pl(Ot,Ch(Xt)),ya=(Ot,Xt)=>{var qt={};for(var Bi in Ot)Eh.call(Ot,Bi)&&Xt.indexOf(Bi)<0&&(qt[Bi]=Ot[Bi]);if(Ot!=null&&Cl)for(var Bi of Cl(Ot))Xt.indexOf(Bi)<0&&Xl.call(Ot,Bi)&&(qt[Bi]=Ot[Bi]);return qt},ls=(Ot,Xt,qt)=>new Promise((Bi,_i)=>{var li=Pi=>{try{ai(qt.next(Pi))}catch(Yi){_i(Yi)}},Si=Pi=>{try{ai(qt.throw(Pi))}catch(Yi){_i(Yi)}},ai=Pi=>Pi.done?Bi(Pi.value):Promise.resolve(Pi.value).then(li,Si);ai((qt=qt.apply(Ot,Xt)).next())});const{Countdown:Wu}=Ce.default,cu={Java:"java",C:"c",Python:"py","C++":"c"};var Mu=(Ot=>(Ot[Ot.SET_LOADING=0]="SET_LOADING",Ot[Ot.GET_DATA=1]="GET_DATA",Ot[Ot.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",Ot[Ot.SET_DATA=3]="SET_DATA",Ot[Ot.SET_DEBUGING=4]="SET_DEBUGING",Ot[Ot.SET_SUBMITING=5]="SET_SUBMITING",Ot[Ot.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",Ot[Ot.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",Ot[Ot.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",Ot[Ot.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",Ot[Ot.SET_PAGE=10]="SET_PAGE",Ot[Ot.GET_LANGUAGE=11]="GET_LANGUAGE",Ot[Ot.GET_DRAWER=12]="GET_DRAWER",Ot))(Mu||{});function Ya(){return new Date().getTime()}const Jl={loading:!0,data:void 0,showNote:!1,debugResult:void 0,submitResult:void 0,debuging:!1,submitting:!1,submitRecords:void 0,submitRecordPage:1,executingMessage:"",languageValue:"",languageList:[],drawerData:[]};function vp(Ot,Xt){switch(Xt.type){case 1:return Nr(Nr({},Ot),Xt.payload);case 3:return Do(Nr({},Ot),{data:Xt.payload});case 0:return Do(Nr({},Ot),{loading:Xt.payload});case 11:return Do(Nr({},Ot),{languageList:Xt.payload});case 12:return Do(Nr({},Ot),{drawerData:Xt.payload});case 9:return Do(Nr({},Ot),{showNote:Xt.payload});case 4:return Do(Nr({},Ot),{debuging:Xt.payload});case 5:return Do(Nr({},Ot),{submitting:Xt.payload});case 2:return Do(Nr({},Ot),{submitRecords:Xt.payload});case 10:return Do(Nr({},Ot),{submitRecordPage:Xt.payload});case 6:return Do(Nr({},Ot),{executingMessage:Xt.payload});case 7:return Nr(Nr({},Ot),Xt.payload);case 8:return Nr(Nr({},Ot),Xt.payload);default:throw new Error}}var yp=({children:Ot})=>{var Xt,qt,Bi,_i;const[li,Si]=(0,Le.useReducer)(vp,Jl),{id:ai}=(0,Me.useParams)(),Pi=(0,Me.useLocation)(),[Yi]=(0,Me.useSearchParams)(),{languageValue:Po,languageList:wr,loading:Go,data:Wi,debugResult:To,submitResult:Kr,submitRecords:rs,submitRecordPage:ho,showNote:Vo,debuging:Co,submitting:zr,executingMessage:Ko}=li,[ji,$o]=(0,Le.useState)("#FFF"),[mo,Oo]=(0,Le.useState)(null),[Ks,hr]=(0,Le.useState)({}),[Fo,Eo]=(0,Le.useState)(!1),Or=(0,Le.useRef)(null),Xr=(0,Le.useRef)(null),Uo=Wi==null?void 0:Wi.user,Gr=Wi==null?void 0:Wi.hack;(0,Le.useEffect)(()=>((0,Me.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,Me.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,Me.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,Me.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,Le.useEffect)(()=>{setTimeout(()=>{document.title="\u5728\u7EBF\u5237\u9898"},400)}),(0,Le.useEffect)(()=>{var yo;if(Fo){const Ds=document.getElementById("oj-next"),aa=document.getElementById("oj-modal-next");((yo=Ds==null?void 0:Ds.style)==null?void 0:yo.display)==="none"?aa.style.display="none":aa.style.display="block"}},[Fo]),(0,Le.useEffect)(()=>{function yo(){return ls(this,null,function*(){var Ds,aa,Gs;const xs=yield(0,pe.fu)(ai);if(xs.status===401)document.location.href="/user/login";else{xs.hack=xs.practice,xs.hack.code=_t.Base64.decode((Ds=xs==null?void 0:xs.hack)==null?void 0:Ds.code);const Ql=`${Uo==null?void 0:Uo.login}-language`;localStorage.getItem(Ql)&&(xs.hack.language=localStorage.getItem(Ql)),Xr.current=Ph().cloneDeep(xs),Xr.current.language=(aa=xs==null?void 0:xs.hack)==null?void 0:aa.language,Si({type:1,payload:{loading:!1,data:xs}}),Si({type:8,payload:{languageValue:(Gs=xs==null?void 0:xs.hack)==null?void 0:Gs.language}})}})}ai&&yo()},[ai]),(0,Le.useEffect)(()=>{Si({type:8,payload:{debugResult:void 0}}),ol(),Eo(!1)},[ai]),(0,Le.useEffect)(()=>{clearTimeout(Or.current)},[ai]),(0,Le.useEffect)(()=>{Ys()},[ai,ho]);const Oa=()=>{window.parent.postMessage("backExercise","*")};function Ys(){return ls(this,null,function*(){try{const yo=yield(0,pe.zO)(ai,{limit:15,page:ho});Si({type:2,payload:yo})}catch(yo){console.log(yo)}})}function ol(){return ls(this,null,function*(){try{const yo=yield(0,pe.dd)(ai);Si({type:11,payload:yo==null?void 0:yo.data})}catch(yo){console.log(yo)}})}function ku(yo){Si({type:10,payload:yo})}function ao(yo){return ls(this,null,function*(){var Ds,aa,Gs;const xs=((Gs=(aa=(Ds=window==null?void 0:window.location)==null?void 0:Ds.pathname)==null?void 0:aa.split("/"))==null?void 0:Gs[2])||ai;return yield(0,pe.n4)(xs,yo||{code:_t.Base64.encode(Gr.code),language:Po})})}function Tu(){return ls(this,null,function*(){var yo;if(!Gr.code||((yo=Gr.code)==null?void 0:yo.trim())===""){xe.ZP.warning({key:"emptyContent",content:"\u4EE3\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7F16\u5199\u4EE3\u7801\u540E\uFF0C\u518D\u8FDB\u884C\u8BC4\u6D4B\uFF01"});return}if(!zr){Si({type:5,payload:!0});try{if(vt.Z.publish("to-commit-info"),(yield ao()).status===0){let rh=function(){return ls(this,null,function*(){const{status:Lh,data:oh}=yield(0,pe.rX)(ai,"submit"),du=Ya()-El>(xs*Ql+3)*1e3;if(Lh!==0&&!du&&setTimeout(rh,1e3),du){be.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),Si({type:5,payload:!1});return}if(Lh===0){oh.status===2&&be.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"});const mf=yield(0,pe.zO)(ai,{limit:15,page:ho});Si({type:8,payload:Do(Nr({},li),{submitResult:oh,submitting:!1,submitRecords:mf})}),(oh==null?void 0:oh.status)===0&&Eo(!0)}})},aa={};if((yield(0,pe.bM)(ai,aa)).status===-1&&Yi.get("exercisesId")){window.parent.location.href=`/classrooms/${Yi.get("coursesId")}/exercise/${Yi.get("exercisesId")}/detail`;return}const{time_limit:xs,test_case_size:Ql}=Gr,El=Ya();rh()}}catch(Ds){Si({type:5,payload:!1})}}})}function vo(){return ls(this,null,function*(){var yo;if(!Gr.code||((yo=Gr.code)==null?void 0:yo.trim())===""){xe.ZP.warning({key:"emptyContent",content:"\u4EE3\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7F16\u5199\u4EE3\u7801\u540E\uFF0C\u518D\u8FDB\u884C\u8BC4\u6D4B\uFF01"});return}li.debuging=!0,Si({type:4,payload:!0});try{if((yield ao()).status===0){let El=function(){return ls(this,null,function*(){const{status:rh,message:Lh,data:oh}=yield(0,pe.rX)(ai,"debug"),du=Ya()-Ql>(aa+3)*1e3;if(rh!==0&&!du&&(Si({type:6,payload:Lh}),setTimeout(El,1e3)),du){be.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Si({type:4,payload:!1});return}rh===0&&(Si({type:4,payload:!1}),oh.status===2&&be.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Si({type:7,payload:Do(Nr({},li),{debugResult:oh,debuging:!1})}))})};const{time_limit:aa}=Gr;let Gs={input:encodeURIComponent(Wi.test_case.input)};if((yield(0,pe.MU)(ai,Gs)).status===-1&&Yi.get("exercisesId")){window.parent.location.href=`/classrooms/${Yi.get("coursesId")}/exercise/${Yi.get("exercisesId")}/detail`;return}const Ql=Ya();El()}else Si({type:4,payload:!1})}catch(Ds){console.log(Ds)}finally{}})}function qo(yo){var Ds;clearTimeout(Or.current),Or.current=setTimeout(()=>{var aa;ao({code:_t.Base64.encode(yo),language:(aa=Xr==null?void 0:Xr.current)==null?void 0:aa.language})},2e3),Si({type:3,payload:Do(Nr({},Xr==null?void 0:Xr.current),{hack:Do(Nr({},(Ds=Xr==null?void 0:Xr.current)==null?void 0:Ds.hack),{code:yo})})})}function Rs(yo){let Ds=yo.target.value;Si({type:3,payload:Do(Nr({},Wi),{test_case:{input:Ds}})})}const Au=yo=>ls(void 0,null,function*(){var Ds;if(Si({type:0,payload:!0}),(yield ao()).status===0){Si({type:8,payload:{languageValue:yo}}),Xr.current.language=yo;const Gs=`${Uo==null?void 0:Uo.login}-language`;localStorage.setItem(Gs,yo);const xs=yield(0,pe.dd)(ai);if(xs.status===0){const Ql=(Ds=xs==null?void 0:xs.data)==null?void 0:Ds.find(El=>El.language===yo);qo(_t.Base64.decode(Ql.code))}}setTimeout(()=>{Si({type:0,payload:!1})},300)});function Ia(){return ls(this,null,function*(){try{const yo=yield(0,pe.H7)(ai,{language:Po});yo.status===401?Me.history.replace("/login",{from:Pi.pathname}):(qo(_t.Base64.decode(yo.code)),ol())}catch(yo){console.log(yo)}})}function $c(){be.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:Wr.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",Wr.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk(){return ls(this,null,function*(){const yo=yield(0,pe.fi)(ai,{language:Po});yo.status===401?Me.history.replace("/login",{from:Pi.pathname}):qo(_t.Base64.decode(yo.code))})}})}function gl(){Si({type:9,payload:!0})}function ta(){Si({type:9,payload:!1})}function ql(yo){return ls(this,null,function*(){yield(0,pe.MK)(ai,yo),Si({type:1,payload:{showNote:!1,data:Do(Nr({},Wi),{hack:Do(Nr({},Gr),{notes:yo.notes})})}})})}const yc={input:(Xt=Wi==null?void 0:Wi.test_case)==null?void 0:Xt.input,is_file:(qt=Wi==null?void 0:Wi.test_case)==null?void 0:qt.is_file,language:((Bi=Xr.current)==null?void 0:Bi.language)||(Gr==null?void 0:Gr.language),code:Gr==null?void 0:Gr.code,title:"main."+cu[Gr==null?void 0:Gr.language],modify_code:Gr==null?void 0:Gr.modify_code,notes:Gr==null?void 0:Gr.notes,debugResult:To,debuging:Co,submitting:zr,executingMessage:Ko,id:ai,languageValue:Po,languageList:wr,onChangeLanguage:Au,onCancelNote:ta,onAddNote:ql,showNote:Vo,onShowNote:gl,onSubmitCode:Tu,onChangeCode:qo,onChangeInput:Rs,onDebugCode:vo,onResetCode:Ia,onSyncCode:$c,onUpdateCode:ao};function Sc(){return ls(this,null,function*(){const{praise_count:yo}=yield(0,pe.vl)(Gr.id,{container_type:"Hack",type:1});let Ds=Do(Nr({},Wi),{hack:Do(Nr({},Gr),{praises_count:yo,user_praise:!Gr.user_praise})});Si({type:3,payload:Ds})})}const Td={topicId:ai,submitResult:Kr,submitRecords:rs,submitting:zr,page:ho,onPageChange:ku,hack:Gr,user:Wi==null?void 0:Wi.user,onTriggerPraise:Sc};return console.log(Wi,Xr==null?void 0:Xr.current,"data--------"),Wr.createElement(Wr.Fragment,null,Wr.createElement(ye.Z,{className:"oj-custom-large-spin",size:"large",spinning:Go},Wi?Wr.createElement("div",{className:"oj-custom-warp"},Wr.createElement("header",{className:dt.Z.header,style:{minWidth:1200}},Wr.createElement("div",null,Wr.createElement("img",{src:`${ge.Z.IMG_SERVER}/images/${Uo.image_url}`,alt:"user",width:30}),Wr.createElement("span",null,Uo.name)),Wr.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},Wr.createElement("div",null,Gr.name),Wr.createElement(bo.Z,{onChange:yo=>{},className:"font12 c-grey-999"})),Wr.createElement(Yl.CopyToClipboard,{text:`${(_i=window.location)==null?void 0:_i.origin}/problems/${Gr.identifier}/share`,onCopy:()=>xe.ZP.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")},Wr.createElement("span",{className:dt.Z.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",Wr.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),Gr.edit_privilege?Wr.createElement(Me.Link,{className:dt.Z.btn_back,to:`/problems/${Gr.identifier}/ojedit`,style:{marginRight:10}}," ",Wr.createElement(Se.Z,null)," \u7F16\u8F91"):null,Wr.createElement(Me.Link,{className:dt.Z.btn_back,onClick:()=>{},to:"/problems"}," ",Wr.createElement(je.Z,null),"\u9000\u51FA")),Wr.createElement(de.Z,{hideResize:!0,className:"my-problems oj-problems",leftChild:Wr.createElement(vc,Nr({},Td)),rightChild:Wr.createElement(gf,Nr({},yc))})):null),Wr.createElement(be.default,{centered:!0,closable:!1,width:680,footer:null,open:Fo,className:"oj-modal"},Wr.createElement("section",{className:"oj-modal-content"},Wr.createElement("div",{className:"oj-modal-head"},Wr.createElement("img",{src:Gh,alt:""}),Wr.createElement("i",{onClick:()=>Eo(!1),className:"iconfont icon-guanbi1"})),Wr.createElement("aside",null,Wr.createElement("img",{className:"mr30",src:ih.Z}),"\u8FD0\u884C\u65F6\u95F4:\xA0",Wr.createElement("span",{style:{color:"#75d6ba",marginRight:100}},Kr==null?void 0:Kr.execute_time,"s"),"\u4F18\u4E8E",Wr.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Kr==null?void 0:Kr.time_better_than)||100,"%"),"\u7684\u7528\u6237"),Wr.createElement("aside",{className:"mb50"},Wr.createElement("img",{src:Lu.Z,className:"mr30"}),Wr.createElement("span",{className:"oj-modal-tt"},Wr.createElement("span",null,Wr.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),Wr.createElement("span",{className:"c-light-primary"},Kr==null?void 0:Kr.execute_memory,"mb")),Wr.createElement("span",null,Wr.createElement("span",null))),"\u4F18\u4E8E",Wr.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Kr==null?void 0:Kr.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),Wr.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function Sp({languageValue:Ot,languageList:Xt,onChangeLanguage:qt,title:Bi,modify_code:_i,onSyncCode:li,onShowCodeSetting:Si,onResetCode:ai}){const Pi=(0,Me.useLocation)(),Yi=()=>{be.default.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:Wr.createElement(fe.Z,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:ai})};return Wr.createElement("div",{className:"action-bar"},Wr.createElement(we.default,{className:"oj-select",value:Ot,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:qt},Xt==null?void 0:Xt.map(Po=>Wr.createElement(we.default.Option,{key:Po.language,value:Po.language},Po.language))),Wr.createElement("span",null),Wr.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:Yi},Wr.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),Wr.createElement("a",{onClick:Si},Wr.createElement("i",{className:"iconfont icon-shezhi"})))}function gf(Ot){var Xt=Ot,{id:qt,input:Bi,is_file:_i,showNote:li,onShowNote:Si,notes:ai,onCancelNote:Pi,onAddNote:Yi,debugResult:Po,language:wr,debuging:Go,submitting:Wi,executingMessage:To,code:Kr,onSubmitCode:rs,onDebugCode:ho,onChangeCode:Vo,onChangeInput:Co,onUpdateCode:zr}=Xt,Ko=ya(Xt,["id","input","is_file","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function ji(mo){return Wr.createElement(Sp,Do(Nr({},Ko),{onShowCodeSetting:mo}))}const $o={id:qt,input:Bi,debugResult:Po,debuging:Go,is_file:_i,submitting:Wi,executingMessage:To,onDebugCode:ho,onChangeCode:Vo,onSubmitCode:rs,onChangeInput:Co};return Wr.createElement("div",{className:"right-panel"},Wr.createElement(Mt,{onUpdateCode:()=>{},language:wr,value:Kr,onChange:Vo,ActionBarRender:ji}),Wr.createElement("div",{className:`note-form-area ${li?"active":""}`},Wr.createElement(xt,{onCancel:Pi,notes:ai,callback:Yi})),Wr.createElement(Rt.ZP,Nr({},$o)))}},24363:function(xn,ln,Ie){"use strict";Ie.d(ln,{h:function(){return Le}});var Le=(Se=>(Se[Se.NOMATCH=-1]="NOMATCH",Se[Se.OK=0]="OK",Se[Se.TIMEOUT=2]="TIMEOUT",Se[Se.PODFAILURE=3]="PODFAILURE",Se[Se.COMPILEFAILURE=4]="COMPILEFAILURE",Se[Se.EXECUTEFAILURE=5]="EXECUTEFAILURE",Se[Se.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",Se))(Le||{})},94881:function(xn,ln,Ie){"use strict";Ie.d(ln,{H7:function(){return we},KC:function(){return ue},M3:function(){return re},MK:function(){return ye},MU:function(){return Me},Rg:function(){return me},WH:function(){return ee},X6:function(){return xe},bM:function(){return je},bx:function(){return z},dd:function(){return ge},de:function(){return Pe},fi:function(){return pe},fu:function(){return Se},gu:function(){return oe},n4:function(){return de},qe:function(){return le},rL:function(){return ve},rX:function(){return be},uc:function(){return Ae},vl:function(){return fe},wO:function(){return ae},zO:function(){return Ce}});var Le=Ie(38986);function Se(De){return(0,Le.U2)(`mypractices/${De}.json`,{hidePopLogin:!0})}function je(De,Oe){return(0,Le.v_)(`mypractices/${De}/code_submit.json`,Oe)}function Me(De,Oe){return(0,Le.v_)(`mypractices/${De}/code_debug.json`,Oe)}function Ce(De,Oe){return Oe.language&&(Oe.language=encodeURIComponent(Oe.language)),(0,Le.U2)(`mypractices/${De}/submit_records.json`,Oe)}function xe(De){return(0,Le.U2)("mypractices/record_detail.json",{id:De})}function be(De,Oe){return(0,Le.U2)(`mypractices/${De}/result.json`,{mode:Oe})}function ye(De,Oe){return(0,Le.v_)(`mypractices/${De}/add_notes.json`,Oe)}function we(De,Oe){return(0,Le.v_)(`mypractices/${De}/restore_initial_code.json`,Oe)}function pe(De,Oe){return(0,Le.v_)(`mypractices/${De}/sync_code.json`,Oe)}function de(De,Oe){return(0,Le.v_)(`mypractices/${De}/update_code.json`,Oe)}function ge(De){return(0,Le.v_)(`mypractices/${De}/initial_codes.json`)}function fe(De,Oe){return(0,Le.v_)(`discusses/${De}/plus.json`,Oe)}function ue(De){return(0,Le.U2)("practices/practices_list.json",De)}function ee(De,Oe){return(0,Le.U2)(`practices/${De}/question_solution_articles`,Oe)}function z(De,Oe){return(0,Le.v_)(`practices/${De}/question_solution_articles`,Oe)}function oe(De,Oe){return(0,Le.gz)(`practices/${De}/question_solution_articles/${Oe==null?void 0:Oe.active}`,Oe)}function re(De,Oe){return(0,Le.U2)(`practices/${De}/question_solution_articles/${Oe==null?void 0:Oe.active}/edit`,Oe)}function ae(De,Oe){return(0,Le.U2)(`practices/${De}/question_solution_articles/${Oe==null?void 0:Oe.active}`,Oe)}function le(De,Oe){return(0,Le.v_)(`practices/${De}/question_solution_articles/${Oe==null?void 0:Oe.active}/set_authority_or_excellent`,Oe)}function me(De,Oe){return(0,Le.v_)(`practices/${De}/question_solution_articles/${Oe==null?void 0:Oe.active}/praise_or_treads`,Oe)}function ve(De,Oe){return(0,Le.v_)(`practices/${De}/question_solution_articles/${Oe==null?void 0:Oe.active}/hide`)}function Pe(De,Oe){return(0,Le.IV)(`practices/${De}/question_solution_articles/${Oe==null?void 0:Oe.active}`,Oe)}function Ae(De,Oe){return(0,Le.v_)(`mypractices/${De}/update_practice_time_sum`,Oe)}},75604:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return fe}});var Le=Ie(59301),Se=Ie(6767),je=Ie(25399),Me=Ie(29787),Ce=Ie(77019),xe=Ie(5269),be=Ie(13747),ye=Ie(99571),we=Ie(39793),pe=Ie(38986),de=Ie(76902),ge=(ee,z,oe)=>new Promise((re,ae)=>{var le=Pe=>{try{ve(oe.next(Pe))}catch(Ae){ae(Ae)}},me=Pe=>{try{ve(oe.throw(Pe))}catch(Ae){ae(Ae)}},ve=Pe=>Pe.done?re(Pe.value):Promise.resolve(Pe.value).then(le,me);ve((oe=oe.apply(ee,z)).next())}),fe=({id:ee,activeDiscussIndex:z,onReplyDiscuss:oe,adminOrOperator:re})=>{const[ae,le]=(0,Le.useState)(""),[me,ve]=(0,Le.useState)(!1);function Pe(De){le(De)}function Ae(){if(!ae){Se.ZP.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}oe(ee,ae),le("")}return(0,Le.useEffect)(()=>{z!=ee&&ve(!1)},[z]),Le.createElement("div",{key:ee,className:"discuss-item-editor",style:{display:z===ee?"block":"none",width:"100%"}},Le.createElement(we.Z,{miniToolbar:!0,startInit:z===ee,defaultValue:ae,id:ee,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:Pe,extraUse:re&&Le.createElement(je.Z,{color:"#fff",open:me,destroyTooltipOnHide:!0,title:ue({id:ee,isOpen:me,activeDiscussIndex:z,onChange:Pe,setIsOpen:ve}),overlayStyle:{maxWidth:600}},Le.createElement("a",{title:me?"\u5173\u95ED\u63A8\u8350":"\u6253\u5F00\u63A8\u8350",onClick:()=>ve(!me)},Le.createElement("i",{className:"iconfont icon-dianzan11"})))}),Le.createElement("a",{onClick:Ae,className:"btn-send"},"\u53D1\u9001"))};const ue=ee=>{const[z,oe]=(0,Le.useState)(!1),[re,ae]=(0,Le.useState)([]),[le,me]=(0,Le.useState)(1);(0,Le.useEffect)(()=>{ee!=null&&ee.isOpen?ve():(me(1),ae([]))},[ee==null?void 0:ee.isOpen]);const ve=()=>ge(void 0,null,function*(){oe(!0);const Pe=yield(0,pe.ZP)(`/api/discusses/${ee==null?void 0:ee.id}/recommend_answer.json`,{method:"get"});(Pe==null?void 0:Pe.status)==0&&ae(Pe==null?void 0:Pe.answer),oe(!1)});return Le.createElement(Me.Z,{spinning:z},Le.createElement("div",{style:{color:"#000"}},Le.createElement(de.Z,{className:"font14",style:{maxHeight:500,overflow:"auto"},value:(re==null?void 0:re[le-1])||""}),Le.createElement(Ce.Z,{justify:"end",align:"middle"},Le.createElement(xe.Z,null,Le.createElement(be.Z,{simple:!0,current:le,pageSize:1,total:(re==null?void 0:re.length)||0,onChange:Pe=>{me(Pe)}})),Le.createElement(xe.Z,null,Le.createElement(ye.ZP,{onClick:()=>ge(void 0,null,function*(){ee==null||ee.onChange(re==null?void 0:re[le-1]),ee==null||ee.setIsOpen(!1)})},"\u586B\u5165\u6587\u672C\u6846")))))}},67776:function(xn,ln,Ie){"use strict";Ie.d(ln,{o:function(){return we}});var Le=Ie(38986),Se=Ie(93125),je=Ie.n(Se);let Me="",Ce,xe="";function be(pe){ye(pe)}function ye(pe){Ce=new(je()).Vod({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:0x6803cbd867207,enableUploadProgress:!1,addFileSuccess:function(de){console.log("addFileSuccess: "+de.file.name),pe.addFileSuccess&&pe.addFileSuccess(de),Ce.startUpload()},onUploadstarted:function(de){const ge=de.file.name;if(de.videoId){var ue=`/api/users/${Me}/video_auths.json`;(0,Le.ZP)(ue,{method:"put",body:{video_id:de.videoId,title:ge,file_name:ge,virtual_classroom_id:xe}}).then(ee=>{if(ee.status==-1){pe.onUploadError&&pe.onUploadError(de);return}const z=ee.data;var oe=z.UploadAuth,re=z.UploadAddress,ae=z.VideoId;Ce.setUploadAuthAndAddress(de,oe,re)}).catch(ee=>{Ce.deleteFile(Ce._curIndex),Ce.nextUpload(),console.log(ee)})}else{var fe=`/api/users/${Me}/video_auths.json`;const ee="";(0,Le.ZP)(fe,{method:"Post",body:{title:ee+ge,file_name:ee+ge,virtual_classroom_id:xe}}).then(z=>{if(z){const le=z.data;var oe=le.UploadAuth,re=le.UploadAddress,ae=le.VideoId;Ce.setUploadAuthAndAddress(de,oe,re,ae)}}).catch(z=>{Ce.deleteFile(Ce._curIndex),Ce.nextUpload(),console.log(z)}),console.log("\u6587\u4EF6\u5F00\u59CB\u4E0A\u4F20...")}},onUploadSucceed:function(de){pe.onUploadSucceed&&pe.onUploadSucceed(de),console.log("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F!")},onUploadFailed:function(de,ge,fe){pe.onUploadFailed&&pe.onUploadFailed(de),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(de,ge,fe){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(de,ge,fe){pe.onUploadProgress&&pe.onUploadProgress(de,ge,fe);var ue=Math.ceil(fe*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(de){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var ge=`/api/users/${Me}/video_auths.json`;(0,Le.ZP)(ge,{method:"put",body:{video_id:de.videoId}}).then(fe=>{var ee=fe.data.UploadAuth;Ce.resumeUploadWithAuth(ee)}).catch(fe=>{console.log(fe)})},onUploadEnd:function(de){pe.onUploadEnd&&pe.onUploadEnd(de),console.log("onUploadEnd: uploaded all the files")}}),pe.gotUploader&&pe.gotUploader(Ce)}function we(pe,de,ge){pe&&(Me=pe),de&&(xe=de),be(ge)}},84989:function(xn,ln,Ie){"use strict";Ie.d(ln,{BU:function(){return Se},Dj:function(){return Le},gH:function(){return je},vp:function(){return Me}});function Le(Ce){try{Ce.mozRequestFullScreen?Ce.mozRequestFullScreen():Ce.webkitRequestFullScreen&&Ce.webkitRequestFullScreen()}catch(xe){console.log(xe,":e")}}function Se(){window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen()}const je=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function Me(){var Ce=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,xe=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",Ce),window.isFullScreen?window.isFullScreen:Ce!=null}},81428:function(xn,ln,Ie){"use strict";Ie.d(ln,{AL:function(){return me},Iy:function(){return de},Qv:function(){return ue},ez:function(){return le},jb:function(){return ge}});var Le=Ie(32834),Se=Ie.n(Le),je=Ie(11690),Me=Ie.n(je);let Ce=1;function xe(Oe,Ze){const qe=Oe.match(/^(\s+)(?:```)/);if(qe===null)return Ze;const Xe=qe[1];return Ze.split(`
|
|
|
`).map(mt=>{const pt=mt.match(/^\s+/);if(pt===null)return mt;const[Mt]=pt;return Mt.length>=Xe.length?mt.slice(Xe.length):mt}).join(`
|
|
|
`)}let be=[],ye=["<ul>"];const we=new(Se()).Renderer,pe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function de(){be.length=0,ye=["<ul>"]}const ge={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function fe(Oe,Ze,qe,Xe){if(Ze>=Oe.length||Oe[Ze].level<=qe)return Ze;var mt=Oe[Ze];Xe.push("<li><a href='#"+Ce+mt.anchor+"'>"+mt.text+"</a>"),Ze++;var pt=[];return Ze=fe(Oe,Ze,mt.level,pt),pt.length>0&&(Xe.push("<ul>"),pt.forEach(function(Mt){Xe.push(Mt)}),Xe.push("</ul>")),Xe.push("</li>"),Ze=fe(Oe,Ze,qe,Xe),Ze}function ue(){return fe(be,0,0,ye),ye.push("</ul>"),ye.join("")}const ee={heading(Oe){const Ze=pe.exec(Oe);if(Ce+=1,Ze)return{type:"heading",raw:Ze[0],depth:Ze[1].length,text:Ze[2]}},fences(Oe){const Ze=this.rules.block.fences.exec(Oe);if(Ze){const qe=Ze[0];let Xe=xe(qe,Ze[3]||"");const mt=Ze[2]?Ze[2].trim():Ze[2];if(["latex","katex","math"].indexOf(mt)>=0){const pt=re(),Mt=Xe;Xe=pt,ae[pt]={type:"block",expression:Mt}}return{type:"code",raw:qe,lang:mt,text:Xe}}}},z=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let oe=0;const re=()=>`__special_katext_id_${oe++}__`;let ae={};function le(){return ae}function me(){oe=0,ae={}}function ve(Oe){return Oe=Oe.replace(z,(Ze,qe)=>{const Xe=re();return ae[Xe]={type:"inline",expression:qe},Xe}),Oe}const Pe=we.listitem;we.listitem=function(Oe){return Pe(ve(Oe))};const Ae=we.paragraph;we.paragraph=function(Oe){return Ae(ve(Oe))};const De=we.tablecell;we.tablecell=function(Oe,Ze){return De(ve(Oe),Ze)},we.code=function(Oe,Ze,qe){const Xe=(Ze||"").match(/\S*/)[0];return Xe?["latex","katex","math"].indexOf(Xe)>=0?`<p class='editormd-tex'>${Oe}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ze}">${qe?Oe:(0,je.escape)(Oe,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(qe?Oe:(0,je.escape)(Oe,!0))+"</code></pre>"},we.heading=function(Oe,Ze,qe){let Xe=this.options.headerPrefix+qe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return be.push({anchor:Xe,level:Ze,text:Oe}),"<h"+Ze+' id="'+Ce+Xe+'">'+Oe+"</h"+Ze+">"},Se().setOptions({silent:!0,gfm:!0,pedantic:!1}),Se().use({tokenizer:ee,renderer:we}),ln.ZP=Se()},23992:function(xn,ln,Ie){"use strict";Ie.d(ln,{G:function(){return Ce},t:function(){return Me}});var Le=Ie(7062),Se=Ie.n(Le);const je=null;function Me(xe,be){let ye=Se().get("__ec");ye||(ye={}),ye[xe]=be,Se().set("__ec",ye)}function Ce(xe,be){let ye=Se().get("__ec");return ye?ye[xe]===void 0?be:ye[xe]:be}},30647:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return So}});class Le{static install(){Object.setPrototypeOf=Object.setPrototypeOf||function(Ge,Je){return Ge.__proto__=Je,Ge},Object.assign=Object.assign||function(Ge){if(Ge==null)throw new TypeError("Cannot convert undefined or null to object");let Je=Object(Ge);for(let ot=1;ot<arguments.length;ot++){let Et=arguments[ot];if(Et!=null)for(let Nt in Et)Et.hasOwnProperty(Nt)&&(Je[Nt]=Et[Nt])}return Je},typeof self.Promise!="function"&&Ie(3867).polyfill()}}Le.install();var Se=Le,je=Ie(86204),Me=Ie.n(je);class Ce{static e(Ge,Je){(!Ge||Ce.FORCE_GLOBAL_TAG)&&(Ge=Ce.GLOBAL_TAG);let ot=`[${Ge}] > ${Je}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","error",ot),Ce.ENABLE_ERROR&&(console.error?console.error(ot):console.warn?console.warn(ot):console.log(ot))}static i(Ge,Je){(!Ge||Ce.FORCE_GLOBAL_TAG)&&(Ge=Ce.GLOBAL_TAG);let ot=`[${Ge}] > ${Je}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","info",ot),Ce.ENABLE_INFO&&(console.info?console.info(ot):console.log(ot))}static w(Ge,Je){(!Ge||Ce.FORCE_GLOBAL_TAG)&&(Ge=Ce.GLOBAL_TAG);let ot=`[${Ge}] > ${Je}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","warn",ot),Ce.ENABLE_WARN&&(console.warn?console.warn(ot):console.log(ot))}static d(Ge,Je){(!Ge||Ce.FORCE_GLOBAL_TAG)&&(Ge=Ce.GLOBAL_TAG);let ot=`[${Ge}] > ${Je}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","debug",ot),Ce.ENABLE_DEBUG&&(console.debug?console.debug(ot):console.log(ot))}static v(Ge,Je){(!Ge||Ce.FORCE_GLOBAL_TAG)&&(Ge=Ce.GLOBAL_TAG);let ot=`[${Ge}] > ${Je}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","verbose",ot),Ce.ENABLE_VERBOSE&&console.log(ot)}}Ce.GLOBAL_TAG="flv.js",Ce.FORCE_GLOBAL_TAG=!1,Ce.ENABLE_ERROR=!0,Ce.ENABLE_INFO=!0,Ce.ENABLE_WARN=!0,Ce.ENABLE_DEBUG=!0,Ce.ENABLE_VERBOSE=!0,Ce.ENABLE_CALLBACK=!1,Ce.emitter=new(Me());var xe=Ce;class be{constructor(){this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}reset(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}addBytes(Ge){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=Ge,this._totalBytes+=Ge):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=Ge,this._totalBytes+=Ge):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=Ge,this._totalBytes+=Ge,this._lastCheckpoint=this._now())}get currentKBps(){this.addBytes(0);let Ge=(this._now()-this._lastCheckpoint)/1e3;return Ge==0&&(Ge=1),this._intervalBytes/Ge/1024}get lastSecondKBps(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}get averageKBps(){let Ge=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/Ge/1024}}var ye=be;class we{constructor(Ge){this._message=Ge}get name(){return"RuntimeException"}get message(){return this._message}toString(){return this.name+": "+this.message}}class pe extends we{constructor(Ge){super(Ge)}get name(){return"IllegalStateException"}}class de extends we{constructor(Ge){super(Ge)}get name(){return"InvalidArgumentException"}}class ge extends we{constructor(Ge){super(Ge)}get name(){return"NotImplementedException"}}const fe={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},ue={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"};class ee{constructor(Ge){this._type=Ge||"undefined",this._status=fe.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}destroy(){this._status=fe.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}isWorking(){return this._status===fe.kConnecting||this._status===fe.kBuffering}get type(){return this._type}get status(){return this._status}get needStashBuffer(){return this._needStash}get onContentLengthKnown(){return this._onContentLengthKnown}set onContentLengthKnown(Ge){this._onContentLengthKnown=Ge}get onURLRedirect(){return this._onURLRedirect}set onURLRedirect(Ge){this._onURLRedirect=Ge}get onDataArrival(){return this._onDataArrival}set onDataArrival(Ge){this._onDataArrival=Ge}get onError(){return this._onError}set onError(Ge){this._onError=Ge}get onComplete(){return this._onComplete}set onComplete(Ge){this._onComplete=Ge}open(Ge,Je){throw new ge("Unimplemented abstract function!")}abort(){throw new ge("Unimplemented abstract function!")}}let z={};function oe(){let $t=self.navigator.userAgent.toLowerCase(),Ge=/(edge)\/([\w.]+)/.exec($t)||/(opr)[\/]([\w.]+)/.exec($t)||/(chrome)[ \/]([\w.]+)/.exec($t)||/(iemobile)[\/]([\w.]+)/.exec($t)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec($t)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec($t)||/(webkit)[ \/]([\w.]+)/.exec($t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec($t)||/(msie) ([\w.]+)/.exec($t)||$t.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec($t)||$t.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec($t)||[],Je=/(ipad)/.exec($t)||/(ipod)/.exec($t)||/(windows phone)/.exec($t)||/(iphone)/.exec($t)||/(kindle)/.exec($t)||/(android)/.exec($t)||/(windows)/.exec($t)||/(mac)/.exec($t)||/(linux)/.exec($t)||/(cros)/.exec($t)||[],ot={browser:Ge[5]||Ge[3]||Ge[1]||"",version:Ge[2]||Ge[4]||"0",majorVersion:Ge[4]||Ge[2]||"0",platform:Je[0]||""},Et={};if(ot.browser){Et[ot.browser]=!0;let Nt=ot.majorVersion.split(".");Et.version={major:parseInt(ot.majorVersion,10),string:ot.version},Nt.length>1&&(Et.version.minor=parseInt(Nt[1],10)),Nt.length>2&&(Et.version.build=parseInt(Nt[2],10))}if(ot.platform&&(Et[ot.platform]=!0),(Et.chrome||Et.opr||Et.safari)&&(Et.webkit=!0),Et.rv||Et.iemobile){Et.rv&&delete Et.rv;let Nt="msie";ot.browser=Nt,Et[Nt]=!0}if(Et.edge){delete Et.edge;let Nt="msedge";ot.browser=Nt,Et[Nt]=!0}if(Et.opr){let Nt="opera";ot.browser=Nt,Et[Nt]=!0}if(Et.safari&&Et.android){let Nt="android";ot.browser=Nt,Et[Nt]=!0}Et.name=ot.browser,Et.platform=ot.platform;for(let Nt in z)z.hasOwnProperty(Nt)&&delete z[Nt];Object.assign(z,Et)}oe();var re=z;class ae extends ee{static isSupported(){try{let Ge=re.msedge&&re.version.minor>=15048,Je=re.msedge?Ge:!0;return self.fetch&&self.ReadableStream&&Je}catch(Ge){return!1}}constructor(Ge,Je){super("fetch-stream-loader"),this.TAG="FetchStreamLoader",this._seekHandler=Ge,this._config=Je,this._needStash=!0,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),super.destroy()}open(Ge,Je){this._dataSource=Ge,this._range=Je;let ot=Ge.url;this._config.reuseRedirectedURL&&Ge.redirectedURL!=null&&(ot=Ge.redirectedURL);let Et=this._seekHandler.getConfig(ot,Je),Nt=new self.Headers;if(typeof Et.headers=="object"){let jt=Et.headers;for(let cn in jt)jt.hasOwnProperty(cn)&&Nt.append(cn,jt[cn])}let pn={method:"GET",headers:Nt,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(let jt in this._config.headers)Nt.append(jt,this._config.headers[jt]);Ge.cors===!1&&(pn.mode="same-origin"),Ge.withCredentials&&(pn.credentials="include"),Ge.referrerPolicy&&(pn.referrerPolicy=Ge.referrerPolicy),this._status=fe.kConnecting,self.fetch(Et.url,pn).then(jt=>{if(this._requestAbort){this._requestAbort=!1,this._status=fe.kIdle;return}if(jt.ok&&jt.status>=200&&jt.status<=299){if(jt.url!==Et.url&&this._onURLRedirect){let On=this._seekHandler.removeURLParameters(jt.url);this._onURLRedirect(On)}let cn=jt.headers.get("Content-Length");return cn!=null&&(this._contentLength=parseInt(cn),this._contentLength!==0&&this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)),this._pump.call(this,jt.body.getReader())}else if(this._status=fe.kError,this._onError)this._onError(ue.HTTP_STATUS_CODE_INVALID,{code:jt.status,msg:jt.statusText});else throw new we("FetchStreamLoader: Http code invalid, "+jt.status+" "+jt.statusText)}).catch(jt=>{if(this._status=fe.kError,this._onError)this._onError(ue.EXCEPTION,{code:-1,msg:jt.message});else throw jt})}abort(){this._requestAbort=!0}_pump(Ge){return Ge.read().then(Je=>{if(Je.done)if(this._contentLength!==null&&this._receivedLength<this._contentLength){this._status=fe.kError;let ot=ue.EARLY_EOF,Et={code:-1,msg:"Fetch stream meet Early-EOF"};if(this._onError)this._onError(ot,Et);else throw new we(Et.msg)}else this._status=fe.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1);else{if(this._requestAbort===!0)return this._requestAbort=!1,this._status=fe.kComplete,Ge.cancel();this._status=fe.kBuffering;let ot=Je.value.buffer,Et=this._range.from+this._receivedLength;this._receivedLength+=ot.byteLength,this._onDataArrival&&this._onDataArrival(ot,Et,this._receivedLength),this._pump(Ge)}}).catch(Je=>{if(Je.code===11&&re.msedge)return;this._status=fe.kError;let ot=0,Et=null;if((Je.code===19||Je.message==="network error")&&(this._contentLength===null||this._contentLength!==null&&this._receivedLength<this._contentLength)?(ot=ue.EARLY_EOF,Et={code:Je.code,msg:"Fetch stream meet Early-EOF"}):(ot=ue.EXCEPTION,Et={code:Je.code,msg:Je.message}),this._onError)this._onError(ot,Et);else throw new we(Et.msg)})}}var le=ae;class me extends ee{static isSupported(){try{let Ge=new XMLHttpRequest;return Ge.open("GET","https://example.com",!0),Ge.responseType="moz-chunked-arraybuffer",Ge.responseType==="moz-chunked-arraybuffer"}catch(Ge){return xe.w("MozChunkedLoader",Ge.message),!1}}constructor(Ge,Je){super("xhr-moz-chunked-loader"),this.TAG="MozChunkedLoader",this._seekHandler=Ge,this._config=Je,this._needStash=!0,this._xhr=null,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),super.destroy()}open(Ge,Je){this._dataSource=Ge,this._range=Je;let ot=Ge.url;this._config.reuseRedirectedURL&&Ge.redirectedURL!=null&&(ot=Ge.redirectedURL);let Et=this._seekHandler.getConfig(ot,Je);this._requestURL=Et.url;let Nt=this._xhr=new XMLHttpRequest;if(Nt.open("GET",Et.url,!0),Nt.responseType="moz-chunked-arraybuffer",Nt.onreadystatechange=this._onReadyStateChange.bind(this),Nt.onprogress=this._onProgress.bind(this),Nt.onloadend=this._onLoadEnd.bind(this),Nt.onerror=this._onXhrError.bind(this),Ge.withCredentials&&(Nt.withCredentials=!0),typeof Et.headers=="object"){let pn=Et.headers;for(let jt in pn)pn.hasOwnProperty(jt)&&Nt.setRequestHeader(jt,pn[jt])}if(typeof this._config.headers=="object"){let pn=this._config.headers;for(let jt in pn)pn.hasOwnProperty(jt)&&Nt.setRequestHeader(jt,pn[jt])}this._status=fe.kConnecting,Nt.send()}abort(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=fe.kComplete}_onReadyStateChange(Ge){let Je=Ge.target;if(Je.readyState===2){if(Je.responseURL!=null&&Je.responseURL!==this._requestURL&&this._onURLRedirect){let ot=this._seekHandler.removeURLParameters(Je.responseURL);this._onURLRedirect(ot)}if(Je.status!==0&&(Je.status<200||Je.status>299))if(this._status=fe.kError,this._onError)this._onError(ue.HTTP_STATUS_CODE_INVALID,{code:Je.status,msg:Je.statusText});else throw new we("MozChunkedLoader: Http code invalid, "+Je.status+" "+Je.statusText);else this._status=fe.kBuffering}}_onProgress(Ge){if(this._status===fe.kError)return;this._contentLength===null&&Ge.total!==null&&Ge.total!==0&&(this._contentLength=Ge.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));let Je=Ge.target.response,ot=this._range.from+this._receivedLength;this._receivedLength+=Je.byteLength,this._onDataArrival&&this._onDataArrival(Je,ot,this._receivedLength)}_onLoadEnd(Ge){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===fe.kError)return;this._status=fe.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)}_onXhrError(Ge){this._status=fe.kError;let Je=0,ot=null;if(this._contentLength&&Ge.loaded<this._contentLength?(Je=ue.EARLY_EOF,ot={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(Je=ue.EXCEPTION,ot={code:-1,msg:Ge.constructor.name+" "+Ge.type}),this._onError)this._onError(Je,ot);else throw new we(ot.msg)}}var ve=me;class Pe extends null{static isSupported(){try{if(typeof self.MSStream=="undefined"||typeof self.MSStreamReader=="undefined")return!1;let Ge=new XMLHttpRequest;return Ge.open("GET","https://example.com",!0),Ge.responseType="ms-stream",Ge.responseType==="ms-stream"}catch(Ge){return Log.w("MSStreamLoader",Ge.message),!1}}constructor(Ge,Je){super("xhr-msstream-loader"),this.TAG="MSStreamLoader",this._seekHandler=Ge,this._config=Je,this._needStash=!0,this._xhr=null,this._reader=null,this._totalRange=null,this._currentRange=null,this._currentRequestURL=null,this._currentRedirectedURL=null,this._contentLength=null,this._receivedLength=0,this._bufferLimit=16*1024*1024,this._lastTimeBufferSize=0,this._isReconnecting=!1}destroy(){this.isWorking()&&this.abort(),this._reader&&(this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr=null),super.destroy()}open(Ge,Je){this._internalOpen(Ge,Je,!1)}_internalOpen(Ge,Je,ot){this._dataSource=Ge,ot?this._currentRange=Je:this._totalRange=Je;let Et=Ge.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?Et=this._currentRedirectedURL:Ge.redirectedURL!=null&&(Et=Ge.redirectedURL));let Nt=this._seekHandler.getConfig(Et,Je);this._currentRequestURL=Nt.url;let pn=this._reader=new self.MSStreamReader;pn.onprogress=this._msrOnProgress.bind(this),pn.onload=this._msrOnLoad.bind(this),pn.onerror=this._msrOnError.bind(this);let jt=this._xhr=new XMLHttpRequest;if(jt.open("GET",Nt.url,!0),jt.responseType="ms-stream",jt.onreadystatechange=this._xhrOnReadyStateChange.bind(this),jt.onerror=this._xhrOnError.bind(this),Ge.withCredentials&&(jt.withCredentials=!0),typeof Nt.headers=="object"){let cn=Nt.headers;for(let On in cn)cn.hasOwnProperty(On)&&jt.setRequestHeader(On,cn[On])}if(typeof this._config.headers=="object"){let cn=this._config.headers;for(let On in cn)cn.hasOwnProperty(On)&&jt.setRequestHeader(On,cn[On])}this._isReconnecting?this._isReconnecting=!1:this._status=LoaderStatus.kConnecting,jt.send()}abort(){this._internalAbort(),this._status=LoaderStatus.kComplete}_internalAbort(){this._reader&&(this._reader.readyState===1&&this._reader.abort(),this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.abort(),this._xhr.onreadystatechange=null,this._xhr=null)}_xhrOnReadyStateChange(Ge){let Je=Ge.target;if(Je.readyState===2)if(Je.status>=200&&Je.status<=299){if(this._status=LoaderStatus.kBuffering,Je.responseURL!=null){let Et=this._seekHandler.removeURLParameters(Je.responseURL);Je.responseURL!==this._currentRequestURL&&Et!==this._currentRedirectedURL&&(this._currentRedirectedURL=Et,this._onURLRedirect&&this._onURLRedirect(Et))}let ot=Je.getResponseHeader("Content-Length");if(ot!=null&&this._contentLength==null){let Et=parseInt(ot);Et>0&&(this._contentLength=Et,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=LoaderStatus.kError,this._onError)this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:Je.status,msg:Je.statusText});else throw new RuntimeException("MSStreamLoader: Http code invalid, "+Je.status+" "+Je.statusText);else if(Je.readyState===3&&Je.status>=200&&Je.status<=299){this._status=LoaderStatus.kBuffering;let ot=Je.response;this._reader.readAsArrayBuffer(ot)}}_xhrOnError(Ge){this._status=LoaderStatus.kError;let Je=LoaderErrors.EXCEPTION,ot={code:-1,msg:Ge.constructor.name+" "+Ge.type};if(this._onError)this._onError(Je,ot);else throw new RuntimeException(ot.msg)}_msrOnProgress(Ge){let ot=Ge.target.result;if(ot==null){this._doReconnectIfNeeded();return}let Et=ot.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=ot.byteLength;let Nt=this._totalRange.from+this._receivedLength;this._receivedLength+=Et.byteLength,this._onDataArrival&&this._onDataArrival(Et,Nt,this._receivedLength),ot.byteLength>=this._bufferLimit&&(Log.v(this.TAG,`MSStream buffer exceeded max size near ${Nt+Et.byteLength}, reconnecting...`),this._doReconnectIfNeeded())}_doReconnectIfNeeded(){if(this._contentLength==null||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();let Ge={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,Ge,!0)}}_msrOnLoad(Ge){this._status=LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}_msrOnError(Ge){this._status=LoaderStatus.kError;let Je=0,ot=null;if(this._contentLength&&this._receivedLength<this._contentLength?(Je=LoaderErrors.EARLY_EOF,ot={code:-1,msg:"MSStream meet Early-Eof"}):(Je=LoaderErrors.EARLY_EOF,ot={code:-1,msg:Ge.constructor.name+" "+Ge.type}),this._onError)this._onError(Je,ot);else throw new RuntimeException(ot.msg)}}var Ae=null;class De extends ee{static isSupported(){try{let Ge=new XMLHttpRequest;return Ge.open("GET","https://example.com",!0),Ge.responseType="arraybuffer",Ge.responseType==="arraybuffer"}catch(Ge){return xe.w("RangeLoader",Ge.message),!1}}constructor(Ge,Je){super("xhr-range-loader"),this.TAG="RangeLoader",this._seekHandler=Ge,this._config=Je,this._needStash=!1,this._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],this._currentChunkSizeKB=384,this._currentSpeedNormalized=0,this._zeroSpeedChunkCount=0,this._xhr=null,this._speedSampler=new ye,this._requestAbort=!1,this._waitForTotalLength=!1,this._totalLengthReceived=!1,this._currentRequestURL=null,this._currentRedirectedURL=null,this._currentRequestRange=null,this._totalLength=null,this._contentLength=null,this._receivedLength=0,this._lastTimeLoaded=0}destroy(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),super.destroy()}get currentSpeed(){return this._speedSampler.lastSecondKBps}open(Ge,Je){this._dataSource=Ge,this._range=Je,this._status=fe.kConnecting;let ot=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(ot=!0,this._totalLength=this._dataSource.filesize),!this._totalLengthReceived&&!ot?(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1})):this._openSubRange()}_openSubRange(){let Ge=this._currentChunkSizeKB*1024,Je=this._range.from+this._receivedLength,ot=Je+Ge;this._contentLength!=null&&ot-this._range.from>=this._contentLength&&(ot=this._range.from+this._contentLength-1),this._currentRequestRange={from:Je,to:ot},this._internalOpen(this._dataSource,this._currentRequestRange)}_internalOpen(Ge,Je){this._lastTimeLoaded=0;let ot=Ge.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?ot=this._currentRedirectedURL:Ge.redirectedURL!=null&&(ot=Ge.redirectedURL));let Et=this._seekHandler.getConfig(ot,Je);this._currentRequestURL=Et.url;let Nt=this._xhr=new XMLHttpRequest;if(Nt.open("GET",Et.url,!0),Nt.responseType="arraybuffer",Nt.onreadystatechange=this._onReadyStateChange.bind(this),Nt.onprogress=this._onProgress.bind(this),Nt.onload=this._onLoad.bind(this),Nt.onerror=this._onXhrError.bind(this),Ge.withCredentials&&(Nt.withCredentials=!0),typeof Et.headers=="object"){let pn=Et.headers;for(let jt in pn)pn.hasOwnProperty(jt)&&Nt.setRequestHeader(jt,pn[jt])}if(typeof this._config.headers=="object"){let pn=this._config.headers;for(let jt in pn)pn.hasOwnProperty(jt)&&Nt.setRequestHeader(jt,pn[jt])}Nt.send()}abort(){this._requestAbort=!0,this._internalAbort(),this._status=fe.kComplete}_internalAbort(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}_onReadyStateChange(Ge){let Je=Ge.target;if(Je.readyState===2){if(Je.responseURL!=null){let ot=this._seekHandler.removeURLParameters(Je.responseURL);Je.responseURL!==this._currentRequestURL&&ot!==this._currentRedirectedURL&&(this._currentRedirectedURL=ot,this._onURLRedirect&&this._onURLRedirect(ot))}if(Je.status>=200&&Je.status<=299){if(this._waitForTotalLength)return;this._status=fe.kBuffering}else if(this._status=fe.kError,this._onError)this._onError(ue.HTTP_STATUS_CODE_INVALID,{code:Je.status,msg:Je.statusText});else throw new we("RangeLoader: Http code invalid, "+Je.status+" "+Je.statusText)}}_onProgress(Ge){if(this._status===fe.kError)return;if(this._contentLength===null){let ot=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,ot=!0;let Et=Ge.total;this._internalAbort(),Et!=null&Et!==0&&(this._totalLength=Et)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,ot){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}let Je=Ge.loaded-this._lastTimeLoaded;this._lastTimeLoaded=Ge.loaded,this._speedSampler.addBytes(Je)}_normalizeSpeed(Ge){let Je=this._chunkSizeKBList,ot=Je.length-1,Et=0,Nt=0,pn=ot;if(Ge<Je[0])return Je[0];for(;Nt<=pn;){if(Et=Nt+Math.floor((pn-Nt)/2),Et===ot||Ge>=Je[Et]&&Ge<Je[Et+1])return Je[Et];Je[Et]<Ge?Nt=Et+1:pn=Et-1}}_onLoad(Ge){if(this._status===fe.kError)return;if(this._waitForTotalLength){this._waitForTotalLength=!1;return}this._lastTimeLoaded=0;let Je=this._speedSampler.lastSecondKBps;if(Je===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(Je=this._speedSampler.currentKBps)),Je!==0){let pn=this._normalizeSpeed(Je);this._currentSpeedNormalized!==pn&&(this._currentSpeedNormalized=pn,this._currentChunkSizeKB=pn)}let ot=Ge.target.response,Et=this._range.from+this._receivedLength;this._receivedLength+=ot.byteLength;let Nt=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():Nt=!0,this._onDataArrival&&this._onDataArrival(ot,Et,this._receivedLength),Nt&&(this._status=fe.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}_onXhrError(Ge){this._status=fe.kError;let Je=0,ot=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(Je=ue.EARLY_EOF,ot={code:-1,msg:"RangeLoader meet Early-Eof"}):(Je=ue.EXCEPTION,ot={code:-1,msg:Ge.constructor.name+" "+Ge.type}),this._onError)this._onError(Je,ot);else throw new we(ot.msg)}}var Oe=De;class Ze extends ee{static isSupported(){try{return typeof self.WebSocket!="undefined"}catch(Ge){return!1}}constructor(){super("websocket-loader"),this.TAG="WebSocketLoader",this._needStash=!0,this._ws=null,this._requestAbort=!1,this._receivedLength=0}destroy(){this._ws&&this.abort(),super.destroy()}open(Ge){try{let Je=this._ws=new self.WebSocket(Ge.url);Je.binaryType="arraybuffer",Je.onopen=this._onWebSocketOpen.bind(this),Je.onclose=this._onWebSocketClose.bind(this),Je.onmessage=this._onWebSocketMessage.bind(this),Je.onerror=this._onWebSocketError.bind(this),this._status=fe.kConnecting}catch(Je){this._status=fe.kError;let ot={code:Je.code,msg:Je.message};if(this._onError)this._onError(ue.EXCEPTION,ot);else throw new we(ot.msg)}}abort(){let Ge=this._ws;Ge&&(Ge.readyState===0||Ge.readyState===1)&&(this._requestAbort=!0,Ge.close()),this._ws=null,this._status=fe.kComplete}_onWebSocketOpen(Ge){this._status=fe.kBuffering}_onWebSocketClose(Ge){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=fe.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}_onWebSocketMessage(Ge){if(Ge.data instanceof ArrayBuffer)this._dispatchArrayBuffer(Ge.data);else if(Ge.data instanceof Blob){let Je=new FileReader;Je.onload=()=>{this._dispatchArrayBuffer(Je.result)},Je.readAsArrayBuffer(Ge.data)}else{this._status=fe.kError;let Je={code:-1,msg:"Unsupported WebSocket message type: "+Ge.data.constructor.name};if(this._onError)this._onError(ue.EXCEPTION,Je);else throw new we(Je.msg)}}_dispatchArrayBuffer(Ge){let Je=Ge,ot=this._receivedLength;this._receivedLength+=Je.byteLength,this._onDataArrival&&this._onDataArrival(Je,ot,this._receivedLength)}_onWebSocketError(Ge){this._status=fe.kError;let Je={code:Ge.code,msg:Ge.message};if(this._onError)this._onError(ue.EXCEPTION,Je);else throw new we(Je.msg)}}var qe=Ze;class Xe{constructor(Ge){this._zeroStart=Ge||!1}getConfig(Ge,Je){let ot={};if(Je.from!==0||Je.to!==-1){let Et;Je.to!==-1?Et=`bytes=${Je.from.toString()}-${Je.to.toString()}`:Et=`bytes=${Je.from.toString()}-`,ot.Range=Et}else this._zeroStart&&(ot.Range="bytes=0-");return{url:Ge,headers:ot}}removeURLParameters(Ge){return Ge}}var mt=Xe;class pt{constructor(Ge,Je){this._startName=Ge,this._endName=Je}getConfig(Ge,Je){let ot=Ge;if(Je.from!==0||Je.to!==-1){let Et=!0;ot.indexOf("?")===-1&&(ot+="?",Et=!1),Et&&(ot+="&"),ot+=`${this._startName}=${Je.from.toString()}`,Je.to!==-1&&(ot+=`&${this._endName}=${Je.to.toString()}`)}return{url:ot,headers:{}}}removeURLParameters(Ge){let Je=Ge.split("?")[0],ot,Et=Ge.indexOf("?");Et!==-1&&(ot=Ge.substring(Et+1));let Nt="";if(ot!=null&&ot.length>0){let pn=ot.split("&");for(let jt=0;jt<pn.length;jt++){let cn=pn[jt].split("="),On=jt>0;cn[0]!==this._startName&&cn[0]!==this._endName&&(On&&(Nt+="&"),Nt+=pn[jt])}}return Nt.length===0?Je:Je+"?"+Nt}}var Mt=pt;class at{constructor(Ge,Je,ot){this.TAG="IOController",this._config=Je,this._extraData=ot,this._stashInitialSize=1024*384,Je.stashInitialSize!=null&&Je.stashInitialSize>0&&(this._stashInitialSize=Je.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,Je.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=Ge,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(Ge.url),this._refTotalLength=Ge.filesize?Ge.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new ye,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}destroy(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}isWorking(){return this._loader&&this._loader.isWorking()&&!this._paused}isPaused(){return this._paused}get status(){return this._loader.status}get extraData(){return this._extraData}set extraData(Ge){this._extraData=Ge}get onDataArrival(){return this._onDataArrival}set onDataArrival(Ge){this._onDataArrival=Ge}get onSeeked(){return this._onSeeked}set onSeeked(Ge){this._onSeeked=Ge}get onError(){return this._onError}set onError(Ge){this._onError=Ge}get onComplete(){return this._onComplete}set onComplete(Ge){this._onComplete=Ge}get onRedirect(){return this._onRedirect}set onRedirect(Ge){this._onRedirect=Ge}get onRecoveredEarlyEof(){return this._onRecoveredEarlyEof}set onRecoveredEarlyEof(Ge){this._onRecoveredEarlyEof=Ge}get currentURL(){return this._dataSource.url}get hasRedirect(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null}get currentRedirectedURL(){return this._redirectedURL||this._dataSource.redirectedURL}get currentSpeed(){return this._loaderClass===Oe?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}get loaderType(){return this._loader.type}_selectSeekHandler(){let Ge=this._config;if(Ge.seekType==="range")this._seekHandler=new mt(this._config.rangeLoadZeroStart);else if(Ge.seekType==="param"){let Je=Ge.seekParamStart||"bstart",ot=Ge.seekParamEnd||"bend";this._seekHandler=new Mt(Je,ot)}else if(Ge.seekType==="custom"){if(typeof Ge.customSeekHandler!="function")throw new de("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new Ge.customSeekHandler}else throw new de(`Invalid seekType in config: ${Ge.seekType}`)}_selectLoader(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=qe;else if(le.isSupported())this._loaderClass=le;else if(ve.isSupported())this._loaderClass=ve;else if(Oe.isSupported())this._loaderClass=Oe;else throw new we("Your browser doesn't support xhr with arraybuffer responseType!")}_createLoader(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}open(Ge){this._currentRange={from:0,to:-1},Ge&&(this._currentRange.from=Ge),this._speedSampler.reset(),Ge||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}abort(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}pause(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}resume(){if(this._paused){this._paused=!1;let Ge=this._resumeFrom;this._resumeFrom=0,this._internalSeek(Ge,!0)}}seek(Ge){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(Ge,!0)}_internalSeek(Ge,Je){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(Je),this._loader.destroy(),this._loader=null;let ot={from:Ge,to:-1};this._currentRange={from:ot.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,ot),this._onSeeked&&this._onSeeked()}updateUrl(Ge){if(!Ge||typeof Ge!="string"||Ge.length===0)throw new de("Url must be a non-empty string!");this._dataSource.url=Ge}_expandBuffer(Ge){let Je=this._stashSize;for(;Je+1024*1024*1<Ge;)Je*=2;if(Je+=1024*1024*1,Je===this._bufferSize)return;let ot=new ArrayBuffer(Je);if(this._stashUsed>0){let Et=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(ot,0,Je).set(Et,0)}this._stashBuffer=ot,this._bufferSize=Je}_normalizeSpeed(Ge){let Je=this._speedNormalizeList,ot=Je.length-1,Et=0,Nt=0,pn=ot;if(Ge<Je[0])return Je[0];for(;Nt<=pn;){if(Et=Nt+Math.floor((pn-Nt)/2),Et===ot||Ge>=Je[Et]&&Ge<Je[Et+1])return Je[Et];Je[Et]<Ge?Nt=Et+1:pn=Et-1}}_adjustStashSize(Ge){let Je=0;this._config.isLive||Ge<512?Je=Ge:Ge>=512&&Ge<=1024?Je=Math.floor(Ge*1.5):Je=Ge*2,Je>8192&&(Je=8192);let ot=Je*1024+1024*1024*1;this._bufferSize<ot&&this._expandBuffer(ot),this._stashSize=Je*1024}_dispatchChunks(Ge,Je){return this._currentRange.to=Je+Ge.byteLength-1,this._onDataArrival(Ge,Je)}_onURLRedirect(Ge){this._redirectedURL=Ge,this._onRedirect&&this._onRedirect(Ge)}_onContentLengthKnown(Ge){Ge&&this._fullRequestFlag&&(this._totalLength=Ge,this._fullRequestFlag=!1)}_onLoaderChunkArrival(Ge,Je,ot){if(!this._onDataArrival)throw new pe("IOController: No existing consumer (onDataArrival) callback!");if(this._paused)return;this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(Ge.byteLength);let Et=this._speedSampler.lastSecondKBps;if(Et!==0){let Nt=this._normalizeSpeed(Et);this._speedNormalized!==Nt&&(this._speedNormalized=Nt,this._adjustStashSize(Nt))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=Je),this._stashUsed+Ge.byteLength<=this._stashSize)new Uint8Array(this._stashBuffer,0,this._stashSize).set(new Uint8Array(Ge),this._stashUsed),this._stashUsed+=Ge.byteLength;else{let Nt=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){let pn=this._stashBuffer.slice(0,this._stashUsed),jt=this._dispatchChunks(pn,this._stashByteStart);if(jt<pn.byteLength){if(jt>0){let cn=new Uint8Array(pn,jt);Nt.set(cn,0),this._stashUsed=cn.byteLength,this._stashByteStart+=jt}}else this._stashUsed=0,this._stashByteStart+=jt;this._stashUsed+Ge.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+Ge.byteLength),Nt=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Nt.set(new Uint8Array(Ge),this._stashUsed),this._stashUsed+=Ge.byteLength}else{let pn=this._dispatchChunks(Ge,Je);if(pn<Ge.byteLength){let jt=Ge.byteLength-pn;jt>this._bufferSize&&(this._expandBuffer(jt),Nt=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Nt.set(new Uint8Array(Ge,pn),0),this._stashUsed+=jt,this._stashByteStart=Je+pn}}}else if(this._stashUsed===0){let Nt=this._dispatchChunks(Ge,Je);if(Nt<Ge.byteLength){let pn=Ge.byteLength-Nt;pn>this._bufferSize&&this._expandBuffer(pn),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(Ge,Nt),0),this._stashUsed+=pn,this._stashByteStart=Je+Nt}}else{this._stashUsed+Ge.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+Ge.byteLength);let Nt=new Uint8Array(this._stashBuffer,0,this._bufferSize);Nt.set(new Uint8Array(Ge),this._stashUsed),this._stashUsed+=Ge.byteLength;let pn=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(pn<this._stashUsed&&pn>0){let jt=new Uint8Array(this._stashBuffer,pn);Nt.set(jt,0)}this._stashUsed-=pn,this._stashByteStart+=pn}}_flushStashBuffer(Ge){if(this._stashUsed>0){let Je=this._stashBuffer.slice(0,this._stashUsed),ot=this._dispatchChunks(Je,this._stashByteStart),Et=Je.byteLength-ot;if(ot<Je.byteLength)if(Ge)xe.w(this.TAG,`${Et} bytes unconsumed data remain when flush buffer, dropped`);else{if(ot>0){let Nt=new Uint8Array(this._stashBuffer,0,this._bufferSize),pn=new Uint8Array(Je,ot);Nt.set(pn,0),this._stashUsed=pn.byteLength,this._stashByteStart+=ot}return 0}return this._stashUsed=0,this._stashByteStart=0,Et}return 0}_onLoaderComplete(Ge,Je){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}_onLoaderError(Ge,Je){switch(xe.e(this.TAG,`Loader error, code = ${Je.code}, msg = ${Je.msg}`),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,Ge=ue.UNRECOVERABLE_EARLY_EOF),Ge){case ue.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){let ot=this._currentRange.to+1;ot<this._totalLength&&(xe.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(ot,!1));return}Ge=ue.UNRECOVERABLE_EARLY_EOF;break}case ue.UNRECOVERABLE_EARLY_EOF:case ue.CONNECTING_TIMEOUT:case ue.HTTP_STATUS_CODE_INVALID:case ue.EXCEPTION:break}if(this._onError)this._onError(Ge,Je);else throw new we("IOException: "+Je.msg)}}var _t=at;const dt={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:3*60,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:3*60,autoCleanupMinBackwardDuration:2*60,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function Rt(){return Object.assign({},dt)}class ut{static supportMSEH264Playback(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}static supportNetworkStreamIO(){let Ge=new _t({},Rt()),Je=Ge.loaderType;return Ge.destroy(),Je=="fetch-stream-loader"||Je=="xhr-moz-chunked-loader"}static getNetworkLoaderTypeName(){let Ge=new _t({},Rt()),Je=Ge.loaderType;return Ge.destroy(),Je}static supportNativeMediaPlayback(Ge){ut.videoElement==null&&(ut.videoElement=window.document.createElement("video"));let Je=ut.videoElement.canPlayType(Ge);return Je==="probably"||Je=="maybe"}static getFeatureList(){let Ge={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return Ge.mseFlvPlayback=ut.supportMSEH264Playback(),Ge.networkStreamIO=ut.supportNetworkStreamIO(),Ge.networkLoaderName=ut.getNetworkLoaderTypeName(),Ge.mseLiveFlvPlayback=Ge.mseFlvPlayback&&Ge.networkStreamIO,Ge.nativeMP4H264Playback=ut.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),Ge.nativeWebmVP8Playback=ut.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),Ge.nativeWebmVP9Playback=ut.supportNativeMediaPlayback('video/webm; codecs="vp9"'),Ge}}var rt=ut,yt={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"};class wt{static get forceGlobalTag(){return xe.FORCE_GLOBAL_TAG}static set forceGlobalTag(Ge){xe.FORCE_GLOBAL_TAG=Ge,wt._notifyChange()}static get globalTag(){return xe.GLOBAL_TAG}static set globalTag(Ge){xe.GLOBAL_TAG=Ge,wt._notifyChange()}static get enableAll(){return xe.ENABLE_VERBOSE&&xe.ENABLE_DEBUG&&xe.ENABLE_INFO&&xe.ENABLE_WARN&&xe.ENABLE_ERROR}static set enableAll(Ge){xe.ENABLE_VERBOSE=Ge,xe.ENABLE_DEBUG=Ge,xe.ENABLE_INFO=Ge,xe.ENABLE_WARN=Ge,xe.ENABLE_ERROR=Ge,wt._notifyChange()}static get enableDebug(){return xe.ENABLE_DEBUG}static set enableDebug(Ge){xe.ENABLE_DEBUG=Ge,wt._notifyChange()}static get enableVerbose(){return xe.ENABLE_VERBOSE}static set enableVerbose(Ge){xe.ENABLE_VERBOSE=Ge,wt._notifyChange()}static get enableInfo(){return xe.ENABLE_INFO}static set enableInfo(Ge){xe.ENABLE_INFO=Ge,wt._notifyChange()}static get enableWarn(){return xe.ENABLE_WARN}static set enableWarn(Ge){xe.ENABLE_WARN=Ge,wt._notifyChange()}static get enableError(){return xe.ENABLE_ERROR}static set enableError(Ge){xe.ENABLE_ERROR=Ge,wt._notifyChange()}static getConfig(){return{globalTag:xe.GLOBAL_TAG,forceGlobalTag:xe.FORCE_GLOBAL_TAG,enableVerbose:xe.ENABLE_VERBOSE,enableDebug:xe.ENABLE_DEBUG,enableInfo:xe.ENABLE_INFO,enableWarn:xe.ENABLE_WARN,enableError:xe.ENABLE_ERROR,enableCallback:xe.ENABLE_CALLBACK}}static applyConfig(Ge){xe.GLOBAL_TAG=Ge.globalTag,xe.FORCE_GLOBAL_TAG=Ge.forceGlobalTag,xe.ENABLE_VERBOSE=Ge.enableVerbose,xe.ENABLE_DEBUG=Ge.enableDebug,xe.ENABLE_INFO=Ge.enableInfo,xe.ENABLE_WARN=Ge.enableWarn,xe.ENABLE_ERROR=Ge.enableError,xe.ENABLE_CALLBACK=Ge.enableCallback}static _notifyChange(){let Ge=wt.emitter;if(Ge.listenerCount("change")>0){let Je=wt.getConfig();Ge.emit("change",Je)}}static registerListener(Ge){wt.emitter.addListener("change",Ge)}static removeListener(Ge){wt.emitter.removeListener("change",Ge)}static addLogListener(Ge){xe.emitter.addListener("log",Ge),xe.emitter.listenerCount("log")>0&&(xe.ENABLE_CALLBACK=!0,wt._notifyChange())}static removeLogListener(Ge){xe.emitter.removeListener("log",Ge),xe.emitter.listenerCount("log")===0&&(xe.ENABLE_CALLBACK=!1,wt._notifyChange())}}wt.emitter=new(Me());var xt=wt;class Ut{constructor(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}isComplete(){let Ge=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,Je=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&this.duration!=null&&this.metadata!=null&&this.hasKeyframesIndex!=null&&Ge&&Je}isSeekable(){return this.hasKeyframesIndex===!0}getNearestKeyframe(Ge){if(this.keyframesIndex==null)return null;let Je=this.keyframesIndex,ot=this._search(Je.times,Ge);return{index:ot,milliseconds:Je.times[ot],fileposition:Je.filepositions[ot]}}_search(Ge,Je){let ot=0,Et=Ge.length-1,Nt=0,pn=0,jt=Et;for(Je<Ge[0]&&(ot=0,pn=jt+1);pn<=jt;)if(Nt=pn+Math.floor((jt-pn)/2),Nt===Et||Je>=Ge[Nt]&&Je<Ge[Nt+1]){ot=Nt;break}else Ge[Nt]<Je?pn=Nt+1:jt=Nt-1;return ot}}var zt=Ut;function dn($t,Ge,Je){let ot=$t;if(Ge+Je<ot.length){for(;Je--;)if((ot[++Ge]&192)!==128)return!1;return!0}else return!1}function Ft($t){let Ge=[],Je=$t,ot=0,Et=$t.length;for(;ot<Et;){if(Je[ot]<128){Ge.push(String.fromCharCode(Je[ot])),++ot;continue}else if(!(Je[ot]<192)){if(Je[ot]<224){if(dn(Je,ot,1)){let Nt=(Je[ot]&31)<<6|Je[ot+1]&63;if(Nt>=128){Ge.push(String.fromCharCode(Nt&65535)),ot+=2;continue}}}else if(Je[ot]<240){if(dn(Je,ot,2)){let Nt=(Je[ot]&15)<<12|(Je[ot+1]&63)<<6|Je[ot+2]&63;if(Nt>=2048&&(Nt&63488)!==55296){Ge.push(String.fromCharCode(Nt&65535)),ot+=3;continue}}}else if(Je[ot]<248&&dn(Je,ot,3)){let Nt=(Je[ot]&7)<<18|(Je[ot+1]&63)<<12|(Je[ot+2]&63)<<6|Je[ot+3]&63;if(Nt>65536&&Nt<1114112){Nt-=65536,Ge.push(String.fromCharCode(Nt>>>10|55296)),Ge.push(String.fromCharCode(Nt&1023|56320)),ot+=4;continue}}}Ge.push("\uFFFD"),++ot}return Ge.join("")}var Dt=Ft;let Qt=function(){let $t=new ArrayBuffer(2);return new DataView($t).setInt16(0,256,!0),new Int16Array($t)[0]===256}();class Yt{static parseScriptData(Ge,Je,ot){let Et={};try{let Nt=Yt.parseValue(Ge,Je,ot),pn=Yt.parseValue(Ge,Je+Nt.size,ot-Nt.size);Et[Nt.data]=pn.data}catch(Nt){xe.e("AMF",Nt.toString())}return Et}static parseObject(Ge,Je,ot){if(ot<3)throw new pe("Data not enough when parse ScriptDataObject");let Et=Yt.parseString(Ge,Je,ot),Nt=Yt.parseValue(Ge,Je+Et.size,ot-Et.size),pn=Nt.objectEnd;return{data:{name:Et.data,value:Nt.data},size:Et.size+Nt.size,objectEnd:pn}}static parseVariable(Ge,Je,ot){return Yt.parseObject(Ge,Je,ot)}static parseString(Ge,Je,ot){if(ot<2)throw new pe("Data not enough when parse String");let Nt=new DataView(Ge,Je,ot).getUint16(0,!Qt),pn;return Nt>0?pn=Dt(new Uint8Array(Ge,Je+2,Nt)):pn="",{data:pn,size:2+Nt}}static parseLongString(Ge,Je,ot){if(ot<4)throw new pe("Data not enough when parse LongString");let Nt=new DataView(Ge,Je,ot).getUint32(0,!Qt),pn;return Nt>0?pn=Dt(new Uint8Array(Ge,Je+4,Nt)):pn="",{data:pn,size:4+Nt}}static parseDate(Ge,Je,ot){if(ot<10)throw new pe("Data size invalid when parse Date");let Et=new DataView(Ge,Je,ot),Nt=Et.getFloat64(0,!Qt),pn=Et.getInt16(8,!Qt);return Nt+=pn*60*1e3,{data:new Date(Nt),size:10}}static parseValue(Ge,Je,ot){if(ot<1)throw new pe("Data not enough when parse Value");let Et=new DataView(Ge,Je,ot),Nt=1,pn=Et.getUint8(0),jt,cn=!1;try{switch(pn){case 0:jt=Et.getFloat64(1,!Qt),Nt+=8;break;case 1:{jt=!!Et.getUint8(1),Nt+=1;break}case 2:{let On=Yt.parseString(Ge,Je+1,ot-1);jt=On.data,Nt+=On.size;break}case 3:{jt={};let On=0;for((Et.getUint32(ot-4,!Qt)&16777215)===9&&(On=3);Nt<ot-4;){let pi=Yt.parseObject(Ge,Je+Nt,ot-Nt-On);if(pi.objectEnd)break;jt[pi.data.name]=pi.data.value,Nt+=pi.size}Nt<=ot-3&&(Et.getUint32(Nt-1,!Qt)&16777215)===9&&(Nt+=3);break}case 8:{jt={},Nt+=4;let On=0;for((Et.getUint32(ot-4,!Qt)&16777215)===9&&(On=3);Nt<ot-8;){let pi=Yt.parseVariable(Ge,Je+Nt,ot-Nt-On);if(pi.objectEnd)break;jt[pi.data.name]=pi.data.value,Nt+=pi.size}Nt<=ot-3&&(Et.getUint32(Nt-1,!Qt)&16777215)===9&&(Nt+=3);break}case 9:jt=void 0,Nt=1,cn=!0;break;case 10:{jt=[];let On=Et.getUint32(1,!Qt);Nt+=4;for(let pi=0;pi<On;pi++){let Fn=Yt.parseValue(Ge,Je+Nt,ot-Nt);jt.push(Fn.data),Nt+=Fn.size}break}case 11:{let On=Yt.parseDate(Ge,Je+1,ot-1);jt=On.data,Nt+=On.size;break}case 12:{let On=Yt.parseString(Ge,Je+1,ot-1);jt=On.data,Nt+=On.size;break}default:Nt=ot,xe.w("AMF","Unsupported AMF value type "+pn)}}catch(On){xe.e("AMF",On.toString())}return{data:jt,size:Nt,objectEnd:cn}}}var Jt=Yt;class lt{constructor(Ge){this.TAG="ExpGolomb",this._buffer=Ge,this._buffer_index=0,this._total_bytes=Ge.byteLength,this._total_bits=Ge.byteLength*8,this._current_word=0,this._current_word_bits_left=0}destroy(){this._buffer=null}_fillCurrentWord(){let Ge=this._total_bytes-this._buffer_index;if(Ge<=0)throw new pe("ExpGolomb: _fillCurrentWord() but no bytes available");let Je=Math.min(4,Ge),ot=new Uint8Array(4);ot.set(this._buffer.subarray(this._buffer_index,this._buffer_index+Je)),this._current_word=new DataView(ot.buffer).getUint32(0,!1),this._buffer_index+=Je,this._current_word_bits_left=Je*8}readBits(Ge){if(Ge>32)throw new de("ExpGolomb: readBits() bits exceeded max 32bits!");if(Ge<=this._current_word_bits_left){let pn=this._current_word>>>32-Ge;return this._current_word<<=Ge,this._current_word_bits_left-=Ge,pn}let Je=this._current_word_bits_left?this._current_word:0;Je=Je>>>32-this._current_word_bits_left;let ot=Ge-this._current_word_bits_left;this._fillCurrentWord();let Et=Math.min(ot,this._current_word_bits_left),Nt=this._current_word>>>32-Et;return this._current_word<<=Et,this._current_word_bits_left-=Et,Je=Je<<Et|Nt,Je}readBool(){return this.readBits(1)===1}readByte(){return this.readBits(8)}_skipLeadingZero(){let Ge;for(Ge=0;Ge<this._current_word_bits_left;Ge++)if(this._current_word&2147483648>>>Ge)return this._current_word<<=Ge,this._current_word_bits_left-=Ge,Ge;return this._fillCurrentWord(),Ge+this._skipLeadingZero()}readUEG(){let Ge=this._skipLeadingZero();return this.readBits(Ge+1)-1}readSEG(){let Ge=this.readUEG();return Ge&1?Ge+1>>>1:-1*(Ge>>>1)}}var Ue=lt;class Be{static _ebsp2rbsp(Ge){let Je=Ge,ot=Je.byteLength,Et=new Uint8Array(ot),Nt=0;for(let pn=0;pn<ot;pn++)pn>=2&&Je[pn]===3&&Je[pn-1]===0&&Je[pn-2]===0||(Et[Nt]=Je[pn],Nt++);return new Uint8Array(Et.buffer,0,Nt)}static parseSPS(Ge){let Je=Be._ebsp2rbsp(Ge),ot=new Ue(Je);ot.readByte();let Et=ot.readByte();ot.readByte();let Nt=ot.readByte();ot.readUEG();let pn=Be.getProfileString(Et),jt=Be.getLevelString(Nt),cn=1,On=420,pi=[0,420,422,444],Fn=8;if((Et===100||Et===110||Et===122||Et===244||Et===44||Et===83||Et===86||Et===118||Et===128||Et===138||Et===144)&&(cn=ot.readUEG(),cn===3&&ot.readBits(1),cn<=3&&(On=pi[cn]),Fn=ot.readUEG()+8,ot.readUEG(),ot.readBits(1),ot.readBool())){let or=cn!==3?8:12;for(let Vi=0;Vi<or;Vi++)ot.readBool()&&(Vi<6?Be._skipScalingList(ot,16):Be._skipScalingList(ot,64))}ot.readUEG();let Lt=ot.readUEG();if(Lt===0)ot.readUEG();else if(Lt===1){ot.readBits(1),ot.readSEG(),ot.readSEG();let or=ot.readUEG();for(let Vi=0;Vi<or;Vi++)ot.readSEG()}let Ht=ot.readUEG();ot.readBits(1);let Pn=ot.readUEG(),Sn=ot.readUEG(),Kt=ot.readBits(1);Kt===0&&ot.readBits(1),ot.readBits(1);let vn=0,Hn=0,Gn=0,oi=0;ot.readBool()&&(vn=ot.readUEG(),Hn=ot.readUEG(),Gn=ot.readUEG(),oi=ot.readUEG());let zn=1,Mn=1,wi=0,mi=!0,En=0,ei=0;if(ot.readBool()){if(ot.readBool()){let or=ot.readByte(),Vi=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],yr=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];or>0&&or<16?(zn=Vi[or-1],Mn=yr[or-1]):or===255&&(zn=ot.readByte()<<8|ot.readByte(),Mn=ot.readByte()<<8|ot.readByte())}if(ot.readBool()&&ot.readBool(),ot.readBool()&&(ot.readBits(4),ot.readBool()&&ot.readBits(24)),ot.readBool()&&(ot.readUEG(),ot.readUEG()),ot.readBool()){let or=ot.readBits(32),Vi=ot.readBits(32);mi=ot.readBool(),En=Vi,ei=or*2,wi=En/ei}}let Sr=1;(zn!==1||Mn!==1)&&(Sr=zn/Mn);let Tr=0,nn=0;if(cn===0)Tr=1,nn=2-Kt;else{let or=cn===3?1:2,Vi=cn===1?2:1;Tr=or,nn=Vi*(2-Kt)}let Mi=(Pn+1)*16,tr=(2-Kt)*((Sn+1)*16);Mi-=(vn+Hn)*Tr,tr-=(Gn+oi)*nn;let vi=Math.ceil(Mi*Sr);return ot.destroy(),ot=null,{profile_string:pn,level_string:jt,bit_depth:Fn,ref_frames:Ht,chroma_format:On,chroma_format_string:Be.getChromaFormatString(On),frame_rate:{fixed:mi,fps:wi,fps_den:ei,fps_num:En},sar_ratio:{width:zn,height:Mn},codec_size:{width:Mi,height:tr},present_size:{width:vi,height:tr}}}static _skipScalingList(Ge,Je){let ot=8,Et=8,Nt=0;for(let pn=0;pn<Je;pn++)Et!==0&&(Nt=Ge.readSEG(),Et=(ot+Nt+256)%256),ot=Et===0?ot:Et}static getProfileString(Ge){switch(Ge){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}static getLevelString(Ge){return(Ge/10).toFixed(1)}static getChromaFormatString(Ge){switch(Ge){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}var tt=Be,et={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};function Ve($t){return $t>>>8&255|($t&255)<<8}function Re($t){return($t&4278190080)>>>24|($t&16711680)>>>8|($t&65280)<<8|($t&255)<<24}function ze($t,Ge){return $t[Ge]<<24|$t[Ge+1]<<16|$t[Ge+2]<<8|$t[Ge+3]}class it{constructor(Ge,Je){this.TAG="FLVDemuxer",this._config=Je,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=Ge.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=Ge.hasAudioTrack,this._hasVideo=Ge.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new zt,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){let ot=new ArrayBuffer(2);return new DataView(ot).setInt16(0,256,!0),new Int16Array(ot)[0]===256}()}destroy(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}static probe(Ge){let Je=new Uint8Array(Ge),ot={match:!1};if(Je[0]!==70||Je[1]!==76||Je[2]!==86||Je[3]!==1)return ot;let Et=(Je[4]&4)>>>2!==0,Nt=(Je[4]&1)!==0,pn=ze(Je,5);return pn<9?ot:{match:!0,consumed:pn,dataOffset:pn,hasAudioTrack:Et,hasVideoTrack:Nt}}bindDataSource(Ge){return Ge.onDataArrival=this.parseChunks.bind(this),this}get onTrackMetadata(){return this._onTrackMetadata}set onTrackMetadata(Ge){this._onTrackMetadata=Ge}get onMediaInfo(){return this._onMediaInfo}set onMediaInfo(Ge){this._onMediaInfo=Ge}get onMetaDataArrived(){return this._onMetaDataArrived}set onMetaDataArrived(Ge){this._onMetaDataArrived=Ge}get onScriptDataArrived(){return this._onScriptDataArrived}set onScriptDataArrived(Ge){this._onScriptDataArrived=Ge}get onError(){return this._onError}set onError(Ge){this._onError=Ge}get onDataAvailable(){return this._onDataAvailable}set onDataAvailable(Ge){this._onDataAvailable=Ge}get timestampBase(){return this._timestampBase}set timestampBase(Ge){this._timestampBase=Ge}get overridedDuration(){return this._duration}set overridedDuration(Ge){this._durationOverrided=!0,this._duration=Ge,this._mediaInfo.duration=Ge}set overridedHasAudio(Ge){this._hasAudioFlagOverrided=!0,this._hasAudio=Ge,this._mediaInfo.hasAudio=Ge}set overridedHasVideo(Ge){this._hasVideoFlagOverrided=!0,this._hasVideo=Ge,this._mediaInfo.hasVideo=Ge}resetMediaInfo(){this._mediaInfo=new zt}_isInitialMetadataDispatched(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}parseChunks(Ge,Je){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new pe("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");let ot=0,Et=this._littleEndian;if(Je===0)if(Ge.byteLength>13)ot=it.probe(Ge).dataOffset;else return 0;for(this._firstParse&&(this._firstParse=!1,Je+ot!==this._dataOffset&&xe.w(this.TAG,"First time parsing but chunk byteStart invalid!"),new DataView(Ge,ot).getUint32(0,!Et)!==0&&xe.w(this.TAG,"PrevTagSize0 !== 0 !!!"),ot+=4);ot<Ge.byteLength;){this._dispatch=!0;let Nt=new DataView(Ge,ot);if(ot+11+4>Ge.byteLength)break;let pn=Nt.getUint8(0),jt=Nt.getUint32(0,!Et)&16777215;if(ot+11+jt+4>Ge.byteLength)break;if(pn!==8&&pn!==9&&pn!==18){xe.w(this.TAG,`Unsupported tag type ${pn}, skipped`),ot+=11+jt+4;continue}let cn=Nt.getUint8(4),On=Nt.getUint8(5),pi=Nt.getUint8(6),Fn=Nt.getUint8(7),Lt=pi|On<<8|cn<<16|Fn<<24;(Nt.getUint32(7,!Et)&16777215)!==0&&xe.w(this.TAG,"Meet tag which has StreamID != 0!");let Pn=ot+11;switch(pn){case 8:this._parseAudioData(Ge,Pn,jt,Lt);break;case 9:this._parseVideoData(Ge,Pn,jt,Lt,Je+ot);break;case 18:this._parseScriptData(Ge,Pn,jt);break}let Sn=Nt.getUint32(11+jt,!Et);Sn!==11+jt&&xe.w(this.TAG,`Invalid PrevTagSize ${Sn}`),ot+=11+jt+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),ot}_parseScriptData(Ge,Je,ot){let Et=Jt.parseScriptData(Ge,Je,ot);if(Et.hasOwnProperty("onMetaData")){if(Et.onMetaData==null||typeof Et.onMetaData!="object"){xe.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&xe.w(this.TAG,"Found another onMetaData tag!"),this._metadata=Et;let Nt=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},Nt)),typeof Nt.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=Nt.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof Nt.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=Nt.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof Nt.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=Nt.audiodatarate),typeof Nt.videodatarate=="number"&&(this._mediaInfo.videoDataRate=Nt.videodatarate),typeof Nt.width=="number"&&(this._mediaInfo.width=Nt.width),typeof Nt.height=="number"&&(this._mediaInfo.height=Nt.height),typeof Nt.duration=="number"){if(!this._durationOverrided){let pn=Math.floor(Nt.duration*this._timescale);this._duration=pn,this._mediaInfo.duration=pn}}else this._mediaInfo.duration=0;if(typeof Nt.framerate=="number"){let pn=Math.floor(Nt.framerate*1e3);if(pn>0){let jt=pn/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=jt,this._referenceFrameRate.fps_num=pn,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=jt}}if(typeof Nt.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;let pn=Nt.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(pn),Nt.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=Nt,xe.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(Et).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},Et))}_parseKeyframesIndex(Ge){let Je=[],ot=[];for(let Et=1;Et<Ge.times.length;Et++){let Nt=this._timestampBase+Math.floor(Ge.times[Et]*1e3);Je.push(Nt),ot.push(Ge.filepositions[Et])}return{times:Je,filepositions:ot}}_parseAudioData(Ge,Je,ot,Et){if(ot<=1){xe.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)return;let Nt=this._littleEndian,jt=new DataView(Ge,Je,ot).getUint8(0),cn=jt>>>4;if(cn!==2&&cn!==10){this._onError(et.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+cn);return}let On=0,pi=(jt&12)>>>2;if(pi>=0&&pi<=4)On=this._flvSoundRateTable[pi];else{this._onError(et.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+pi);return}let Fn=(jt&2)>>>1,Lt=jt&1,Ht=this._audioMetadata,Pn=this._audioTrack;if(Ht||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),Ht=this._audioMetadata={},Ht.type="audio",Ht.id=Pn.id,Ht.timescale=this._timescale,Ht.duration=this._duration,Ht.audioSampleRate=On,Ht.channelCount=Lt===0?1:2),cn===10){let Sn=this._parseAACAudioData(Ge,Je+1,ot-1);if(Sn==null)return;if(Sn.packetType===0){Ht.config&&xe.w(this.TAG,"Found another AudioSpecificConfig!");let Kt=Sn.data;Ht.audioSampleRate=Kt.samplingRate,Ht.channelCount=Kt.channelCount,Ht.codec=Kt.codec,Ht.originalCodec=Kt.originalCodec,Ht.config=Kt.config,Ht.refSampleDuration=1024/Ht.audioSampleRate*Ht.timescale,xe.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",Ht);let vn=this._mediaInfo;vn.audioCodec=Ht.originalCodec,vn.audioSampleRate=Ht.audioSampleRate,vn.audioChannelCount=Ht.channelCount,vn.hasVideo?vn.videoCodec!=null&&(vn.mimeType='video/x-flv; codecs="'+vn.videoCodec+","+vn.audioCodec+'"'):vn.mimeType='video/x-flv; codecs="'+vn.audioCodec+'"',vn.isComplete()&&this._onMediaInfo(vn)}else if(Sn.packetType===1){let Kt=this._timestampBase+Et,vn={unit:Sn.data,length:Sn.data.byteLength,dts:Kt,pts:Kt};Pn.samples.push(vn),Pn.length+=Sn.data.length}else xe.e(this.TAG,`Flv: Unsupported AAC data type ${Sn.packetType}`)}else if(cn===2){if(!Ht.codec){let Hn=this._parseMP3AudioData(Ge,Je+1,ot-1,!0);if(Hn==null)return;Ht.audioSampleRate=Hn.samplingRate,Ht.channelCount=Hn.channelCount,Ht.codec=Hn.codec,Ht.originalCodec=Hn.originalCodec,Ht.refSampleDuration=1152/Ht.audioSampleRate*Ht.timescale,xe.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",Ht);let Gn=this._mediaInfo;Gn.audioCodec=Ht.codec,Gn.audioSampleRate=Ht.audioSampleRate,Gn.audioChannelCount=Ht.channelCount,Gn.audioDataRate=Hn.bitRate,Gn.hasVideo?Gn.videoCodec!=null&&(Gn.mimeType='video/x-flv; codecs="'+Gn.videoCodec+","+Gn.audioCodec+'"'):Gn.mimeType='video/x-flv; codecs="'+Gn.audioCodec+'"',Gn.isComplete()&&this._onMediaInfo(Gn)}let Sn=this._parseMP3AudioData(Ge,Je+1,ot-1,!1);if(Sn==null)return;let Kt=this._timestampBase+Et,vn={unit:Sn,length:Sn.byteLength,dts:Kt,pts:Kt};Pn.samples.push(vn),Pn.length+=Sn.length}}_parseAACAudioData(Ge,Je,ot){if(ot<=1){xe.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}let Et={},Nt=new Uint8Array(Ge,Je,ot);return Et.packetType=Nt[0],Nt[0]===0?Et.data=this._parseAACAudioSpecificConfig(Ge,Je+1,ot-1):Et.data=Nt.subarray(1),Et}_parseAACAudioSpecificConfig(Ge,Je,ot){let Et=new Uint8Array(Ge,Je,ot),Nt=null,pn=0,jt=0,cn=null,On=0,pi=null;if(pn=jt=Et[0]>>>3,On=(Et[0]&7)<<1|Et[1]>>>7,On<0||On>=this._mpegSamplingRates.length){this._onError(et.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}let Fn=this._mpegSamplingRates[On],Lt=(Et[1]&120)>>>3;if(Lt<0||Lt>=8){this._onError(et.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}pn===5&&(pi=(Et[1]&7)<<1|Et[2]>>>7,cn=(Et[2]&124)>>>2);let Ht=self.navigator.userAgent.toLowerCase();return Ht.indexOf("firefox")!==-1?On>=6?(pn=5,Nt=new Array(4),pi=On-3):(pn=2,Nt=new Array(2),pi=On):Ht.indexOf("android")!==-1?(pn=2,Nt=new Array(2),pi=On):(pn=5,pi=On,Nt=new Array(4),On>=6?pi=On-3:Lt===1&&(pn=2,Nt=new Array(2),pi=On)),Nt[0]=pn<<3,Nt[0]|=(On&15)>>>1,Nt[1]=(On&15)<<7,Nt[1]|=(Lt&15)<<3,pn===5&&(Nt[1]|=(pi&15)>>>1,Nt[2]=(pi&1)<<7,Nt[2]|=8,Nt[3]=0),{config:Nt,samplingRate:Fn,channelCount:Lt,codec:"mp4a.40."+pn,originalCodec:"mp4a.40."+jt}}_parseMP3AudioData(Ge,Je,ot,Et){if(ot<4){xe.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}let Nt=this._littleEndian,pn=new Uint8Array(Ge,Je,ot),jt=null;if(Et){if(pn[0]!==255)return;let cn=pn[1]>>>3&3,On=(pn[1]&6)>>1,pi=(pn[2]&240)>>>4,Fn=(pn[2]&12)>>>2,Ht=(pn[3]>>>6&3)!==3?2:1,Pn=0,Sn=0,Kt=34,vn="mp3";switch(cn){case 0:Pn=this._mpegAudioV25SampleRateTable[Fn];break;case 2:Pn=this._mpegAudioV20SampleRateTable[Fn];break;case 3:Pn=this._mpegAudioV10SampleRateTable[Fn];break}switch(On){case 1:Kt=34,pi<this._mpegAudioL3BitRateTable.length&&(Sn=this._mpegAudioL3BitRateTable[pi]);break;case 2:Kt=33,pi<this._mpegAudioL2BitRateTable.length&&(Sn=this._mpegAudioL2BitRateTable[pi]);break;case 3:Kt=32,pi<this._mpegAudioL1BitRateTable.length&&(Sn=this._mpegAudioL1BitRateTable[pi]);break}jt={bitRate:Sn,samplingRate:Pn,channelCount:Ht,codec:vn,originalCodec:vn}}else jt=pn;return jt}_parseVideoData(Ge,Je,ot,Et,Nt){if(ot<=1){xe.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");return}if(this._hasVideoFlagOverrided===!0&&this._hasVideo===!1)return;let pn=new Uint8Array(Ge,Je,ot)[0],jt=(pn&240)>>>4,cn=pn&15;if(cn!==7){this._onError(et.CODEC_UNSUPPORTED,`Flv: Unsupported codec in video frame: ${cn}`);return}this._parseAVCVideoPacket(Ge,Je+1,ot-1,Et,Nt,jt)}_parseAVCVideoPacket(Ge,Je,ot,Et,Nt,pn){if(ot<4){xe.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}let jt=this._littleEndian,cn=new DataView(Ge,Je,ot),On=cn.getUint8(0),Fn=(cn.getUint32(0,!jt)&16777215)<<8>>8;if(On===0)this._parseAVCDecoderConfigurationRecord(Ge,Je+4,ot-4);else if(On===1)this._parseAVCVideoData(Ge,Je+4,ot-4,Et,Nt,pn,Fn);else if(On!==2){this._onError(et.FORMAT_ERROR,`Flv: Invalid video packet type ${On}`);return}}_parseAVCDecoderConfigurationRecord(Ge,Je,ot){if(ot<7){xe.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}let Et=this._videoMetadata,Nt=this._videoTrack,pn=this._littleEndian,jt=new DataView(Ge,Je,ot);Et?typeof Et.avcc!="undefined"&&xe.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),Et=this._videoMetadata={},Et.type="video",Et.id=Nt.id,Et.timescale=this._timescale,Et.duration=this._duration);let cn=jt.getUint8(0),On=jt.getUint8(1),pi=jt.getUint8(2),Fn=jt.getUint8(3);if(cn!==1||On===0){this._onError(et.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(jt.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(et.FORMAT_ERROR,`Flv: Strange NaluLengthSizeMinusOne: ${this._naluLengthSize-1}`);return}let Lt=jt.getUint8(5)&31;if(Lt===0){this._onError(et.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else Lt>1&&xe.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${Lt}`);let Ht=6;for(let Sn=0;Sn<Lt;Sn++){let Kt=jt.getUint16(Ht,!pn);if(Ht+=2,Kt===0)continue;let vn=new Uint8Array(Ge,Je+Ht,Kt);Ht+=Kt;let Hn=tt.parseSPS(vn);if(Sn!==0)continue;Et.codecWidth=Hn.codec_size.width,Et.codecHeight=Hn.codec_size.height,Et.presentWidth=Hn.present_size.width,Et.presentHeight=Hn.present_size.height,Et.profile=Hn.profile_string,Et.level=Hn.level_string,Et.bitDepth=Hn.bit_depth,Et.chromaFormat=Hn.chroma_format,Et.sarRatio=Hn.sar_ratio,Et.frameRate=Hn.frame_rate,(Hn.frame_rate.fixed===!1||Hn.frame_rate.fps_num===0||Hn.frame_rate.fps_den===0)&&(Et.frameRate=this._referenceFrameRate);let Gn=Et.frameRate.fps_den,oi=Et.frameRate.fps_num;Et.refSampleDuration=Et.timescale*(Gn/oi);let Wn=vn.subarray(1,4),zn="avc1.";for(let wi=0;wi<3;wi++){let mi=Wn[wi].toString(16);mi.length<2&&(mi="0"+mi),zn+=mi}Et.codec=zn;let Mn=this._mediaInfo;Mn.width=Et.codecWidth,Mn.height=Et.codecHeight,Mn.fps=Et.frameRate.fps,Mn.profile=Et.profile,Mn.level=Et.level,Mn.refFrames=Hn.ref_frames,Mn.chromaFormat=Hn.chroma_format_string,Mn.sarNum=Et.sarRatio.width,Mn.sarDen=Et.sarRatio.height,Mn.videoCodec=zn,Mn.hasAudio?Mn.audioCodec!=null&&(Mn.mimeType='video/x-flv; codecs="'+Mn.videoCodec+","+Mn.audioCodec+'"'):Mn.mimeType='video/x-flv; codecs="'+Mn.videoCodec+'"',Mn.isComplete()&&this._onMediaInfo(Mn)}let Pn=jt.getUint8(Ht);if(Pn===0){this._onError(et.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else Pn>1&&xe.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${Pn}`);Ht++;for(let Sn=0;Sn<Pn;Sn++){let Kt=jt.getUint16(Ht,!pn);Ht+=2,Kt!==0&&(Ht+=Kt)}Et.avcc=new Uint8Array(ot),Et.avcc.set(new Uint8Array(Ge,Je,ot),0),xe.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",Et)}_parseAVCVideoData(Ge,Je,ot,Et,Nt,pn,jt){let cn=this._littleEndian,On=new DataView(Ge,Je,ot),pi=[],Fn=0,Lt=0;const Ht=this._naluLengthSize;let Pn=this._timestampBase+Et,Sn=pn===1;for(;Lt<ot;){if(Lt+4>=ot){xe.w(this.TAG,`Malformed Nalu near timestamp ${Pn}, offset = ${Lt}, dataSize = ${ot}`);break}let Kt=On.getUint32(Lt,!cn);if(Ht===3&&(Kt>>>=8),Kt>ot-Ht){xe.w(this.TAG,`Malformed Nalus near timestamp ${Pn}, NaluSize > DataSize!`);return}let vn=On.getUint8(Lt+Ht)&31;vn===5&&(Sn=!0);let Hn=new Uint8Array(Ge,Je+Lt,Ht+Kt),Gn={type:vn,data:Hn};pi.push(Gn),Fn+=Hn.byteLength,Lt+=Ht+Kt}if(pi.length){let Kt=this._videoTrack,vn={units:pi,length:Fn,isKeyframe:Sn,dts:Pn,cts:jt,pts:Pn+jt};Sn&&(vn.fileposition=Nt),Kt.samples.push(vn),Kt.length+=Fn}}}var Ke=it;class We{static init(){We.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(let Je in We.types)We.types.hasOwnProperty(Je)&&(We.types[Je]=[Je.charCodeAt(0),Je.charCodeAt(1),Je.charCodeAt(2),Je.charCodeAt(3)]);let Ge=We.constants={};Ge.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),Ge.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),Ge.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),Ge.STSC=Ge.STCO=Ge.STTS,Ge.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ge.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Ge.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Ge.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Ge.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Ge.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(Ge){let Je=8,ot=null,Et=Array.prototype.slice.call(arguments,1),Nt=Et.length;for(let jt=0;jt<Nt;jt++)Je+=Et[jt].byteLength;ot=new Uint8Array(Je),ot[0]=Je>>>24&255,ot[1]=Je>>>16&255,ot[2]=Je>>>8&255,ot[3]=Je&255,ot.set(Ge,4);let pn=8;for(let jt=0;jt<Nt;jt++)ot.set(Et[jt],pn),pn+=Et[jt].byteLength;return ot}static generateInitSegment(Ge){let Je=We.box(We.types.ftyp,We.constants.FTYP),ot=We.moov(Ge),Et=new Uint8Array(Je.byteLength+ot.byteLength);return Et.set(Je,0),Et.set(ot,Je.byteLength),Et}static moov(Ge){let Je=We.mvhd(Ge.timescale,Ge.duration),ot=We.trak(Ge),Et=We.mvex(Ge);return We.box(We.types.moov,Je,ot,Et)}static mvhd(Ge,Je){return We.box(We.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,Ge>>>24&255,Ge>>>16&255,Ge>>>8&255,Ge&255,Je>>>24&255,Je>>>16&255,Je>>>8&255,Je&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static trak(Ge){return We.box(We.types.trak,We.tkhd(Ge),We.mdia(Ge))}static tkhd(Ge){let Je=Ge.id,ot=Ge.duration,Et=Ge.presentWidth,Nt=Ge.presentHeight;return We.box(We.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,Je>>>24&255,Je>>>16&255,Je>>>8&255,Je&255,0,0,0,0,ot>>>24&255,ot>>>16&255,ot>>>8&255,ot&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,Et>>>8&255,Et&255,0,0,Nt>>>8&255,Nt&255,0,0]))}static mdia(Ge){return We.box(We.types.mdia,We.mdhd(Ge),We.hdlr(Ge),We.minf(Ge))}static mdhd(Ge){let Je=Ge.timescale,ot=Ge.duration;return We.box(We.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,Je>>>24&255,Je>>>16&255,Je>>>8&255,Je&255,ot>>>24&255,ot>>>16&255,ot>>>8&255,ot&255,85,196,0,0]))}static hdlr(Ge){let Je=null;return Ge.type==="audio"?Je=We.constants.HDLR_AUDIO:Je=We.constants.HDLR_VIDEO,We.box(We.types.hdlr,Je)}static minf(Ge){let Je=null;return Ge.type==="audio"?Je=We.box(We.types.smhd,We.constants.SMHD):Je=We.box(We.types.vmhd,We.constants.VMHD),We.box(We.types.minf,Je,We.dinf(),We.stbl(Ge))}static dinf(){return We.box(We.types.dinf,We.box(We.types.dref,We.constants.DREF))}static stbl(Ge){return We.box(We.types.stbl,We.stsd(Ge),We.box(We.types.stts,We.constants.STTS),We.box(We.types.stsc,We.constants.STSC),We.box(We.types.stsz,We.constants.STSZ),We.box(We.types.stco,We.constants.STCO))}static stsd(Ge){return Ge.type==="audio"?Ge.codec==="mp3"?We.box(We.types.stsd,We.constants.STSD_PREFIX,We.mp3(Ge)):We.box(We.types.stsd,We.constants.STSD_PREFIX,We.mp4a(Ge)):We.box(We.types.stsd,We.constants.STSD_PREFIX,We.avc1(Ge))}static mp3(Ge){let Je=Ge.channelCount,ot=Ge.audioSampleRate,Et=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,Je,0,16,0,0,0,0,ot>>>8&255,ot&255,0,0]);return We.box(We.types[".mp3"],Et)}static mp4a(Ge){let Je=Ge.channelCount,ot=Ge.audioSampleRate,Et=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,Je,0,16,0,0,0,0,ot>>>8&255,ot&255,0,0]);return We.box(We.types.mp4a,Et,We.esds(Ge))}static esds(Ge){let Je=Ge.config||[],ot=Je.length,Et=new Uint8Array([0,0,0,0,3,23+ot,0,1,0,4,15+ot,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([ot]).concat(Je).concat([6,1,2]));return We.box(We.types.esds,Et)}static avc1(Ge){let Je=Ge.avcc,ot=Ge.codecWidth,Et=Ge.codecHeight,Nt=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,ot>>>8&255,ot&255,Et>>>8&255,Et&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return We.box(We.types.avc1,Nt,We.box(We.types.avcC,Je))}static mvex(Ge){return We.box(We.types.mvex,We.trex(Ge))}static trex(Ge){let Je=Ge.id,ot=new Uint8Array([0,0,0,0,Je>>>24&255,Je>>>16&255,Je>>>8&255,Je&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return We.box(We.types.trex,ot)}static moof(Ge,Je){return We.box(We.types.moof,We.mfhd(Ge.sequenceNumber),We.traf(Ge,Je))}static mfhd(Ge){let Je=new Uint8Array([0,0,0,0,Ge>>>24&255,Ge>>>16&255,Ge>>>8&255,Ge&255]);return We.box(We.types.mfhd,Je)}static traf(Ge,Je){let ot=Ge.id,Et=We.box(We.types.tfhd,new Uint8Array([0,0,0,0,ot>>>24&255,ot>>>16&255,ot>>>8&255,ot&255])),Nt=We.box(We.types.tfdt,new Uint8Array([0,0,0,0,Je>>>24&255,Je>>>16&255,Je>>>8&255,Je&255])),pn=We.sdtp(Ge),jt=We.trun(Ge,pn.byteLength+16+16+8+16+8+8);return We.box(We.types.traf,Et,Nt,jt,pn)}static sdtp(Ge){let Je=Ge.samples||[],ot=Je.length,Et=new Uint8Array(4+ot);for(let Nt=0;Nt<ot;Nt++){let pn=Je[Nt].flags;Et[Nt+4]=pn.isLeading<<6|pn.dependsOn<<4|pn.isDependedOn<<2|pn.hasRedundancy}return We.box(We.types.sdtp,Et)}static trun(Ge,Je){let ot=Ge.samples||[],Et=ot.length,Nt=12+16*Et,pn=new Uint8Array(Nt);Je+=8+Nt,pn.set([0,0,15,1,Et>>>24&255,Et>>>16&255,Et>>>8&255,Et&255,Je>>>24&255,Je>>>16&255,Je>>>8&255,Je&255],0);for(let jt=0;jt<Et;jt++){let cn=ot[jt].duration,On=ot[jt].size,pi=ot[jt].flags,Fn=ot[jt].cts;pn.set([cn>>>24&255,cn>>>16&255,cn>>>8&255,cn&255,On>>>24&255,On>>>16&255,On>>>8&255,On&255,pi.isLeading<<2|pi.dependsOn,pi.isDependedOn<<6|pi.hasRedundancy<<4|pi.isNonSync,0,0,Fn>>>24&255,Fn>>>16&255,Fn>>>8&255,Fn&255],12+16*jt)}return We.box(We.types.trun,pn)}static mdat(Ge){return We.box(We.types.mdat,Ge)}}We.init();var vt=We;class kt{static getSilentFrame(Ge,Je){if(Ge==="mp4a.40.2"){if(Je===1)return new Uint8Array([0,200,0,128,35,128]);if(Je===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(Je===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(Je===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(Je===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(Je===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(Je===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(Je===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(Je===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}var hn=kt;class en{constructor(Ge,Je,ot,Et,Nt){this.dts=Ge,this.pts=Je,this.duration=ot,this.originalDts=Et,this.isSyncPoint=Nt,this.fileposition=null}}class Gt{constructor(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}appendSyncPoint(Ge){Ge.isSyncPoint=!0,this.syncPoints.push(Ge)}}class gn{constructor(){this._list=[]}clear(){this._list=[]}appendArray(Ge){let Je=this._list;Ge.length!==0&&(Je.length>0&&Ge[0].originalDts<Je[Je.length-1].originalDts&&this.clear(),Array.prototype.push.apply(Je,Ge))}getLastSyncPointBeforeDts(Ge){if(this._list.length==0)return null;let Je=this._list,ot=0,Et=Je.length-1,Nt=0,pn=0,jt=Et;for(Ge<Je[0].dts&&(ot=0,pn=jt+1);pn<=jt;)if(Nt=pn+Math.floor((jt-pn)/2),Nt===Et||Ge>=Je[Nt].dts&&Ge<Je[Nt+1].dts){ot=Nt;break}else Je[Nt].dts<Ge?pn=Nt+1:jt=Nt-1;return this._list[ot]}}class bn{constructor(Ge){this._type=Ge,this._list=[],this._lastAppendLocation=-1}get type(){return this._type}get length(){return this._list.length}isEmpty(){return this._list.length===0}clear(){this._list=[],this._lastAppendLocation=-1}_searchNearestSegmentBefore(Ge){let Je=this._list;if(Je.length===0)return-2;let ot=Je.length-1,Et=0,Nt=0,pn=ot,jt=0;if(Ge<Je[0].originalBeginDts)return jt=-1,jt;for(;Nt<=pn;)if(Et=Nt+Math.floor((pn-Nt)/2),Et===ot||Ge>Je[Et].lastSample.originalDts&&Ge<Je[Et+1].originalBeginDts){jt=Et;break}else Je[Et].originalBeginDts<Ge?Nt=Et+1:pn=Et-1;return jt}_searchNearestSegmentAfter(Ge){return this._searchNearestSegmentBefore(Ge)+1}append(Ge){let Je=this._list,ot=Ge,Et=this._lastAppendLocation,Nt=0;Et!==-1&&Et<Je.length&&ot.originalBeginDts>=Je[Et].lastSample.originalDts&&(Et===Je.length-1||Et<Je.length-1&&ot.originalBeginDts<Je[Et+1].originalBeginDts)?Nt=Et+1:Je.length>0&&(Nt=this._searchNearestSegmentBefore(ot.originalBeginDts)+1),this._lastAppendLocation=Nt,this._list.splice(Nt,0,ot)}getLastSegmentBefore(Ge){let Je=this._searchNearestSegmentBefore(Ge);return Je>=0?this._list[Je]:null}getLastSampleBefore(Ge){let Je=this.getLastSegmentBefore(Ge);return Je!=null?Je.lastSample:null}getLastSyncPointBefore(Ge){let Je=this._searchNearestSegmentBefore(Ge),ot=this._list[Je].syncPoints;for(;ot.length===0&&Je>0;)Je--,ot=this._list[Je].syncPoints;return ot.length>0?ot[ot.length-1]:null}}class yn{constructor(Ge){this.TAG="MP4Remuxer",this._config=Ge,this._isLive=Ge.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new bn("audio"),this._videoSegmentInfoList=new bn("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(re.chrome&&(re.version.major<50||re.version.major===50&&re.version.build<2661)),this._fillSilentAfterSeek=re.msedge||re.msie,this._mp3UseMpegAudio=!re.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}destroy(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}bindDataSource(Ge){return Ge.onDataAvailable=this.remux.bind(this),Ge.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}get onInitSegment(){return this._onInitSegment}set onInitSegment(Ge){this._onInitSegment=Ge}get onMediaSegment(){return this._onMediaSegment}set onMediaSegment(Ge){this._onMediaSegment=Ge}insertDiscontinuity(){this._audioNextDts=this._videoNextDts=void 0}seek(Ge){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}remux(Ge,Je){if(!this._onMediaSegment)throw new pe("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(Ge,Je),this._remuxVideo(Je),this._remuxAudio(Ge)}_onTrackMetadataReceived(Ge,Je){let ot=null,Et="mp4",Nt=Je.codec;if(Ge==="audio")this._audioMeta=Je,Je.codec==="mp3"&&this._mp3UseMpegAudio?(Et="mpeg",Nt="",ot=new Uint8Array):ot=vt.generateInitSegment(Je);else if(Ge==="video")this._videoMeta=Je,ot=vt.generateInitSegment(Je);else return;if(!this._onInitSegment)throw new pe("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(Ge,{type:Ge,data:ot.buffer,codec:Nt,container:`${Ge}/${Et}`,mediaDuration:Je.duration})}_calculateDtsBase(Ge,Je){this._dtsBaseInited||(Ge.samples&&Ge.samples.length&&(this._audioDtsBase=Ge.samples[0].dts),Je.samples&&Je.samples.length&&(this._videoDtsBase=Je.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}flushStashedSamples(){let Ge=this._videoStashedLastSample,Je=this._audioStashedLastSample,ot={type:"video",id:1,sequenceNumber:0,samples:[],length:0};Ge!=null&&(ot.samples.push(Ge),ot.length=Ge.length);let Et={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};Je!=null&&(Et.samples.push(Je),Et.length=Je.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(ot,!0),this._remuxAudio(Et,!0)}_remuxAudio(Ge,Je){if(this._audioMeta==null)return;let ot=Ge,Et=ot.samples,Nt,pn=-1,jt=-1,cn=-1,On=this._audioMeta.refSampleDuration,pi=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,Fn=this._dtsBaseInited&&this._audioNextDts===void 0,Lt=!1;if(!Et||Et.length===0||Et.length===1&&!Je)return;let Ht=0,Pn=null,Sn=0;pi?(Ht=0,Sn=ot.length):(Ht=8,Sn=8+ot.length);let Kt=null;if(Et.length>1&&(Kt=Et.pop(),Sn-=Kt.length),this._audioStashedLastSample!=null){let Mn=this._audioStashedLastSample;this._audioStashedLastSample=null,Et.unshift(Mn),Sn+=Mn.length}Kt!=null&&(this._audioStashedLastSample=Kt);let vn=Et[0].dts-this._dtsBase;if(this._audioNextDts)Nt=vn-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())Nt=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(Lt=!0);else{let Mn=this._audioSegmentInfoList.getLastSampleBefore(vn);if(Mn!=null){let wi=vn-(Mn.originalDts+Mn.duration);wi<=3&&(wi=0);let mi=Mn.dts+Mn.duration+wi;Nt=vn-mi}else Nt=0}if(Lt){let Mn=vn-Nt,wi=this._videoSegmentInfoList.getLastSegmentBefore(vn);if(wi!=null&&wi.beginDts<Mn){let mi=hn.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(mi){let En=wi.beginDts,ei=Mn-wi.beginDts;xe.v(this.TAG,`InsertPrefixSilentAudio: dts: ${En}, duration: ${ei}`),Et.unshift({unit:mi,dts:En,pts:En}),Sn+=mi.byteLength}}else Lt=!1}let Hn=[];for(let Mn=0;Mn<Et.length;Mn++){let wi=Et[Mn],mi=wi.unit,En=wi.dts-this._dtsBase,ei=En-Nt;pn===-1&&(pn=ei);let er=0;Mn!==Et.length-1?er=Et[Mn+1].dts-this._dtsBase-Nt-ei:Kt!=null?er=Kt.dts-this._dtsBase-Nt-ei:Hn.length>=1?er=Hn[Hn.length-1].duration:er=Math.floor(On);let Sr=!1,Tr=null;if(er>On*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!re.safari){Sr=!0;let nn=Math.abs(er-On),Mi=Math.ceil(nn/On),tr=ei+On;xe.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
|
|
|
dts: ${ei+er} ms, expected: ${ei+Math.round(On)} ms, delta: ${Math.round(nn)} ms, generate: ${Mi} frames`);let vi=hn.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);vi==null&&(xe.w(this.TAG,`Unable to generate silent frame for ${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`),vi=mi),Tr=[];for(let Vi=0;Vi<Mi;Vi++){let yr=Math.round(tr);if(Tr.length>0){let _r=Tr[Tr.length-1];_r.duration=yr-_r.dts}let fr={dts:yr,pts:yr,cts:0,unit:vi,size:vi.byteLength,duration:0,originalDts:En,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};Tr.push(fr),Sn+=fr.size,tr+=On}let or=Tr[Tr.length-1];or.duration=ei+er-or.dts,er=Math.round(On)}Hn.push({dts:ei,pts:ei,cts:0,unit:wi.unit,size:wi.unit.byteLength,duration:er,originalDts:En,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),Sr&&Hn.push.apply(Hn,Tr)}pi?Pn=new Uint8Array(Sn):(Pn=new Uint8Array(Sn),Pn[0]=Sn>>>24&255,Pn[1]=Sn>>>16&255,Pn[2]=Sn>>>8&255,Pn[3]=Sn&255,Pn.set(vt.types.mdat,4));for(let Mn=0;Mn<Hn.length;Mn++){let wi=Hn[Mn].unit;Pn.set(wi,Ht),Ht+=wi.byteLength}let Gn=Hn[Hn.length-1];jt=Gn.dts+Gn.duration,this._audioNextDts=jt;let oi=new Gt;oi.beginDts=pn,oi.endDts=jt,oi.beginPts=pn,oi.endPts=jt,oi.originalBeginDts=Hn[0].originalDts,oi.originalEndDts=Gn.originalDts+Gn.duration,oi.firstSample=new en(Hn[0].dts,Hn[0].pts,Hn[0].duration,Hn[0].originalDts,!1),oi.lastSample=new en(Gn.dts,Gn.pts,Gn.duration,Gn.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(oi),ot.samples=Hn,ot.sequenceNumber++;let Wn=null;pi?Wn=new Uint8Array:Wn=vt.moof(ot,pn),ot.samples=[],ot.length=0;let zn={type:"audio",data:this._mergeBoxes(Wn,Pn).buffer,sampleCount:Hn.length,info:oi};pi&&Fn&&(zn.timestampOffset=pn),this._onMediaSegment("audio",zn)}_remuxVideo(Ge,Je){if(this._videoMeta==null)return;let ot=Ge,Et=ot.samples,Nt,pn=-1,jt=-1,cn=-1,On=-1;if(!Et||Et.length===0||Et.length===1&&!Je)return;let pi=8,Fn=null,Lt=8+Ge.length,Ht=null;if(Et.length>1&&(Ht=Et.pop(),Lt-=Ht.length),this._videoStashedLastSample!=null){let Gn=this._videoStashedLastSample;this._videoStashedLastSample=null,Et.unshift(Gn),Lt+=Gn.length}Ht!=null&&(this._videoStashedLastSample=Ht);let Pn=Et[0].dts-this._dtsBase;if(this._videoNextDts)Nt=Pn-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())Nt=0;else{let Gn=this._videoSegmentInfoList.getLastSampleBefore(Pn);if(Gn!=null){let oi=Pn-(Gn.originalDts+Gn.duration);oi<=3&&(oi=0);let Wn=Gn.dts+Gn.duration+oi;Nt=Pn-Wn}else Nt=0}let Sn=new Gt,Kt=[];for(let Gn=0;Gn<Et.length;Gn++){let oi=Et[Gn],Wn=oi.dts-this._dtsBase,zn=oi.isKeyframe,Mn=Wn-Nt,wi=oi.cts,mi=Mn+wi;pn===-1&&(pn=Mn,cn=mi);let En=0;if(Gn!==Et.length-1?En=Et[Gn+1].dts-this._dtsBase-Nt-Mn:Ht!=null?En=Ht.dts-this._dtsBase-Nt-Mn:Kt.length>=1?En=Kt[Kt.length-1].duration:En=Math.floor(this._videoMeta.refSampleDuration),zn){let ei=new en(Mn,mi,En,oi.dts,!0);ei.fileposition=oi.fileposition,Sn.appendSyncPoint(ei)}Kt.push({dts:Mn,pts:mi,cts:wi,units:oi.units,size:oi.length,isKeyframe:zn,duration:En,originalDts:Wn,flags:{isLeading:0,dependsOn:zn?2:1,isDependedOn:zn?1:0,hasRedundancy:0,isNonSync:zn?0:1}})}Fn=new Uint8Array(Lt),Fn[0]=Lt>>>24&255,Fn[1]=Lt>>>16&255,Fn[2]=Lt>>>8&255,Fn[3]=Lt&255,Fn.set(vt.types.mdat,4);for(let Gn=0;Gn<Kt.length;Gn++){let oi=Kt[Gn].units;for(;oi.length;){let zn=oi.shift().data;Fn.set(zn,pi),pi+=zn.byteLength}}let vn=Kt[Kt.length-1];if(jt=vn.dts+vn.duration,On=vn.pts+vn.duration,this._videoNextDts=jt,Sn.beginDts=pn,Sn.endDts=jt,Sn.beginPts=cn,Sn.endPts=On,Sn.originalBeginDts=Kt[0].originalDts,Sn.originalEndDts=vn.originalDts+vn.duration,Sn.firstSample=new en(Kt[0].dts,Kt[0].pts,Kt[0].duration,Kt[0].originalDts,Kt[0].isKeyframe),Sn.lastSample=new en(vn.dts,vn.pts,vn.duration,vn.originalDts,vn.isKeyframe),this._isLive||this._videoSegmentInfoList.append(Sn),ot.samples=Kt,ot.sequenceNumber++,this._forceFirstIDR){let Gn=Kt[0].flags;Gn.dependsOn=2,Gn.isNonSync=0}let Hn=vt.moof(ot,pn);ot.samples=[],ot.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(Hn,Fn).buffer,sampleCount:Kt.length,info:Sn})}_mergeBoxes(Ge,Je){let ot=new Uint8Array(Ge.byteLength+Je.byteLength);return ot.set(Ge,0),ot.set(Je,Ge.byteLength),ot}}var un=yn,mn={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"};class Yn{constructor(Ge,Je){this.TAG="TransmuxingController",this._emitter=new(Me()),this._config=Je,Ge.segments||(Ge.segments=[{duration:Ge.duration,filesize:Ge.filesize,url:Ge.url}]),typeof Ge.cors!="boolean"&&(Ge.cors=!0),typeof Ge.withCredentials!="boolean"&&(Ge.withCredentials=!1),this._mediaDataSource=Ge,this._currentSegmentIndex=0;let ot=0;this._mediaDataSource.segments.forEach(Et=>{Et.timestampBase=ot,ot+=Et.duration,Et.cors=Ge.cors,Et.withCredentials=Ge.withCredentials,Je.referrerPolicy&&(Et.referrerPolicy=Je.referrerPolicy)}),!isNaN(ot)&&this._mediaDataSource.duration!==ot&&(this._mediaDataSource.duration=ot),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}destroy(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}on(Ge,Je){this._emitter.addListener(Ge,Je)}off(Ge,Je){this._emitter.removeListener(Ge,Je)}start(){this._loadSegment(0),this._enableStatisticsReporter()}_loadSegment(Ge,Je){this._currentSegmentIndex=Ge;let ot=this._mediaDataSource.segments[Ge],Et=this._ioctl=new _t(ot,this._config,Ge);Et.onError=this._onIOException.bind(this),Et.onSeeked=this._onIOSeeked.bind(this),Et.onComplete=this._onIOComplete.bind(this),Et.onRedirect=this._onIORedirect.bind(this),Et.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),Je?this._demuxer.bindDataSource(this._ioctl):Et.onDataArrival=this._onInitChunkArrival.bind(this),Et.open(Je)}stop(){this._internalAbort(),this._disableStatisticsReporter()}_internalAbort(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}pause(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}resume(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}seek(Ge){if(this._mediaInfo==null||!this._mediaInfo.isSeekable())return;let Je=this._searchSegmentIndexContains(Ge);if(Je===this._currentSegmentIndex){let ot=this._mediaInfo.segments[Je];if(ot==null)this._pendingSeekTime=Ge;else{let Et=ot.getNearestKeyframe(Ge);this._remuxer.seek(Et.milliseconds),this._ioctl.seek(Et.fileposition),this._pendingResolveSeekPoint=Et.milliseconds}}else{let ot=this._mediaInfo.segments[Je];if(ot==null)this._pendingSeekTime=Ge,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(Je);else{let Et=ot.getNearestKeyframe(Ge);this._internalAbort(),this._remuxer.seek(Ge),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[Je].timestampBase,this._loadSegment(Je,Et.fileposition),this._pendingResolveSeekPoint=Et.milliseconds,this._reportSegmentMediaInfo(Je)}}this._enableStatisticsReporter()}_searchSegmentIndexContains(Ge){let Je=this._mediaDataSource.segments,ot=Je.length-1;for(let Et=0;Et<Je.length;Et++)if(Ge<Je[Et].timestampBase){ot=Et-1;break}return ot}_onInitChunkArrival(Ge,Je){let ot=null,Et=0;if(Je>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,Et=this._demuxer.parseChunks(Ge,Je);else if((ot=Ke.probe(Ge)).match){this._demuxer=new Ke(ot,this._config),this._remuxer||(this._remuxer=new un(this._config));let Nt=this._mediaDataSource;Nt.duration!=null&&!isNaN(Nt.duration)&&(this._demuxer.overridedDuration=Nt.duration),typeof Nt.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=Nt.hasAudio),typeof Nt.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=Nt.hasVideo),this._demuxer.timestampBase=Nt.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),Et=this._demuxer.parseChunks(Ge,Je)}else ot=null,xe.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(()=>{this._internalAbort()}),this._emitter.emit(mn.DEMUX_ERROR,et.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),Et=0;return Et}_onMediaInfo(Ge){this._mediaInfo==null&&(this._mediaInfo=Object.assign({},Ge),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,zt.prototype));let Je=Object.assign({},Ge);Object.setPrototypeOf(Je,zt.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=Je,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(()=>{let ot=this._pendingSeekTime;this._pendingSeekTime=null,this.seek(ot)})}_onMetaDataArrived(Ge){this._emitter.emit(mn.METADATA_ARRIVED,Ge)}_onScriptDataArrived(Ge){this._emitter.emit(mn.SCRIPTDATA_ARRIVED,Ge)}_onIOSeeked(){this._remuxer.insertDiscontinuity()}_onIOComplete(Ge){let ot=Ge+1;ot<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(ot)):(this._remuxer.flushStashedSamples(),this._emitter.emit(mn.LOADING_COMPLETE),this._disableStatisticsReporter())}_onIORedirect(Ge){let Je=this._ioctl.extraData;this._mediaDataSource.segments[Je].redirectedURL=Ge}_onIORecoveredEarlyEof(){this._emitter.emit(mn.RECOVERED_EARLY_EOF)}_onIOException(Ge,Je){xe.e(this.TAG,`IOException: type = ${Ge}, code = ${Je.code}, msg = ${Je.msg}`),this._emitter.emit(mn.IO_ERROR,Ge,Je),this._disableStatisticsReporter()}_onDemuxException(Ge,Je){xe.e(this.TAG,`DemuxException: type = ${Ge}, info = ${Je}`),this._emitter.emit(mn.DEMUX_ERROR,Ge,Je)}_onRemuxerInitSegmentArrival(Ge,Je){this._emitter.emit(mn.INIT_SEGMENT,Ge,Je)}_onRemuxerMediaSegmentArrival(Ge,Je){if(this._pendingSeekTime==null&&(this._emitter.emit(mn.MEDIA_SEGMENT,Ge,Je),this._pendingResolveSeekPoint!=null&&Ge==="video")){let ot=Je.info.syncPoints,Et=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,re.safari&&ot.length>0&&ot[0].originalDts===Et&&(Et=ot[0].pts),this._emitter.emit(mn.RECOMMEND_SEEKPOINT,Et)}}_enableStatisticsReporter(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}_disableStatisticsReporter(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}_reportSegmentMediaInfo(Ge){let Je=this._mediaInfo.segments[Ge],ot=Object.assign({},Je);ot.duration=this._mediaInfo.duration,ot.segmentCount=this._mediaInfo.segmentCount,delete ot.segments,delete ot.keyframesIndex,this._emitter.emit(mn.MEDIA_INFO,ot)}_reportStatisticsInfo(){let Ge={};Ge.url=this._ioctl.currentURL,Ge.hasRedirect=this._ioctl.hasRedirect,Ge.hasRedirect&&(Ge.redirectedURL=this._ioctl.currentRedirectedURL),Ge.speed=this._ioctl.currentSpeed,Ge.loaderType=this._ioctl.loaderType,Ge.currentSegmentIndex=this._currentSegmentIndex,Ge.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(mn.STATISTICS_INFO,Ge)}}var ri=Yn,jn=function($t){let Ge="TransmuxingWorker",Je=null,ot=Sn.bind(this);Se.install(),$t.addEventListener("message",function(Kt){switch(Kt.data.cmd){case"init":Je=new ri(Kt.data.param[0],Kt.data.param[1]),Je.on(mn.IO_ERROR,Lt.bind(this)),Je.on(mn.DEMUX_ERROR,Ht.bind(this)),Je.on(mn.INIT_SEGMENT,Et.bind(this)),Je.on(mn.MEDIA_SEGMENT,Nt.bind(this)),Je.on(mn.LOADING_COMPLETE,pn.bind(this)),Je.on(mn.RECOVERED_EARLY_EOF,jt.bind(this)),Je.on(mn.MEDIA_INFO,cn.bind(this)),Je.on(mn.METADATA_ARRIVED,On.bind(this)),Je.on(mn.SCRIPTDATA_ARRIVED,pi.bind(this)),Je.on(mn.STATISTICS_INFO,Fn.bind(this)),Je.on(mn.RECOMMEND_SEEKPOINT,Pn.bind(this));break;case"destroy":Je&&(Je.destroy(),Je=null),$t.postMessage({msg:"destroyed"});break;case"start":Je.start();break;case"stop":Je.stop();break;case"seek":Je.seek(Kt.data.param);break;case"pause":Je.pause();break;case"resume":Je.resume();break;case"logging_config":{let vn=Kt.data.param;xt.applyConfig(vn),vn.enableCallback===!0?xt.addLogListener(ot):xt.removeLogListener(ot);break}}});function Et(Kt,vn){let Hn={msg:mn.INIT_SEGMENT,data:{type:Kt,data:vn}};$t.postMessage(Hn,[vn.data])}function Nt(Kt,vn){let Hn={msg:mn.MEDIA_SEGMENT,data:{type:Kt,data:vn}};$t.postMessage(Hn,[vn.data])}function pn(){let Kt={msg:mn.LOADING_COMPLETE};$t.postMessage(Kt)}function jt(){let Kt={msg:mn.RECOVERED_EARLY_EOF};$t.postMessage(Kt)}function cn(Kt){let vn={msg:mn.MEDIA_INFO,data:Kt};$t.postMessage(vn)}function On(Kt){let vn={msg:mn.METADATA_ARRIVED,data:Kt};$t.postMessage(vn)}function pi(Kt){let vn={msg:mn.SCRIPTDATA_ARRIVED,data:Kt};$t.postMessage(vn)}function Fn(Kt){let vn={msg:mn.STATISTICS_INFO,data:Kt};$t.postMessage(vn)}function Lt(Kt,vn){$t.postMessage({msg:mn.IO_ERROR,data:{type:Kt,info:vn}})}function Ht(Kt,vn){$t.postMessage({msg:mn.DEMUX_ERROR,data:{type:Kt,info:vn}})}function Pn(Kt){$t.postMessage({msg:mn.RECOMMEND_SEEKPOINT,data:Kt})}function Sn(Kt,vn){$t.postMessage({msg:"logcat_callback",data:{type:Kt,logcat:vn}})}};class ki{constructor(Ge,Je){if(this.TAG="Transmuxer",this._emitter=new(Me()),Je.enableWorker&&typeof Worker!="undefined")try{let ot=Ie(82059);this._worker=ot(jn),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[Ge,Je]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},xt.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:xt.getConfig()})}catch(ot){xe.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new ri(Ge,Je)}else this._controller=new ri(Ge,Je);if(this._controller){let ot=this._controller;ot.on(mn.IO_ERROR,this._onIOError.bind(this)),ot.on(mn.DEMUX_ERROR,this._onDemuxError.bind(this)),ot.on(mn.INIT_SEGMENT,this._onInitSegment.bind(this)),ot.on(mn.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),ot.on(mn.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),ot.on(mn.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),ot.on(mn.MEDIA_INFO,this._onMediaInfo.bind(this)),ot.on(mn.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),ot.on(mn.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),ot.on(mn.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),ot.on(mn.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}destroy(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),xt.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}on(Ge,Je){this._emitter.addListener(Ge,Je)}off(Ge,Je){this._emitter.removeListener(Ge,Je)}hasWorker(){return this._worker!=null}open(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}close(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}seek(Ge){this._worker?this._worker.postMessage({cmd:"seek",param:Ge}):this._controller.seek(Ge)}pause(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}resume(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}_onInitSegment(Ge,Je){Promise.resolve().then(()=>{this._emitter.emit(mn.INIT_SEGMENT,Ge,Je)})}_onMediaSegment(Ge,Je){Promise.resolve().then(()=>{this._emitter.emit(mn.MEDIA_SEGMENT,Ge,Je)})}_onLoadingComplete(){Promise.resolve().then(()=>{this._emitter.emit(mn.LOADING_COMPLETE)})}_onRecoveredEarlyEof(){Promise.resolve().then(()=>{this._emitter.emit(mn.RECOVERED_EARLY_EOF)})}_onMediaInfo(Ge){Promise.resolve().then(()=>{this._emitter.emit(mn.MEDIA_INFO,Ge)})}_onMetaDataArrived(Ge){Promise.resolve().then(()=>{this._emitter.emit(mn.METADATA_ARRIVED,Ge)})}_onScriptDataArrived(Ge){Promise.resolve().then(()=>{this._emitter.emit(mn.SCRIPTDATA_ARRIVED,Ge)})}_onStatisticsInfo(Ge){Promise.resolve().then(()=>{this._emitter.emit(mn.STATISTICS_INFO,Ge)})}_onIOError(Ge,Je){Promise.resolve().then(()=>{this._emitter.emit(mn.IO_ERROR,Ge,Je)})}_onDemuxError(Ge,Je){Promise.resolve().then(()=>{this._emitter.emit(mn.DEMUX_ERROR,Ge,Je)})}_onRecommendSeekpoint(Ge){Promise.resolve().then(()=>{this._emitter.emit(mn.RECOMMEND_SEEKPOINT,Ge)})}_onLoggingConfigChanged(Ge){this._worker&&this._worker.postMessage({cmd:"logging_config",param:Ge})}_onWorkerMessage(Ge){let Je=Ge.data,ot=Je.data;if(Je.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(Je.msg){case mn.INIT_SEGMENT:case mn.MEDIA_SEGMENT:this._emitter.emit(Je.msg,ot.type,ot.data);break;case mn.LOADING_COMPLETE:case mn.RECOVERED_EARLY_EOF:this._emitter.emit(Je.msg);break;case mn.MEDIA_INFO:Object.setPrototypeOf(ot,zt.prototype),this._emitter.emit(Je.msg,ot);break;case mn.METADATA_ARRIVED:case mn.SCRIPTDATA_ARRIVED:case mn.STATISTICS_INFO:this._emitter.emit(Je.msg,ot);break;case mn.IO_ERROR:case mn.DEMUX_ERROR:this._emitter.emit(Je.msg,ot.type,ot.info);break;case mn.RECOMMEND_SEEKPOINT:this._emitter.emit(Je.msg,ot);break;case"logcat_callback":xe.emitter.emit("log",ot.type,ot.logcat);break;default:break}}}var Hi=ki,rr={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};class Cr{constructor(Ge){this.TAG="MSEController",this._config=Ge,this._emitter=new(Me()),this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new gn}destroy(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}on(Ge,Je){this._emitter.addListener(Ge,Je)}off(Ge,Je){this._emitter.removeListener(Ge,Je)}attachMediaElement(Ge){if(this._mediaSource)throw new pe("MediaSource has been attached to an HTMLMediaElement!");let Je=this._mediaSource=new window.MediaSource;Je.addEventListener("sourceopen",this.e.onSourceOpen),Je.addEventListener("sourceended",this.e.onSourceEnded),Je.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=Ge,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),Ge.src=this._mediaSourceObjectURL}detachMediaElement(){if(this._mediaSource){let Ge=this._mediaSource;for(let Je in this._sourceBuffers){let ot=this._pendingSegments[Je];ot.splice(0,ot.length),this._pendingSegments[Je]=null,this._pendingRemoveRanges[Je]=null,this._lastInitSegments[Je]=null;let Et=this._sourceBuffers[Je];if(Et){if(Ge.readyState!=="closed"){try{Ge.removeSourceBuffer(Et)}catch(Nt){xe.e(this.TAG,Nt.message)}Et.removeEventListener("error",this.e.onSourceBufferError),Et.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[Je]=null,this._sourceBuffers[Je]=null}}if(Ge.readyState==="open")try{Ge.endOfStream()}catch(Je){xe.e(this.TAG,Je.message)}Ge.removeEventListener("sourceopen",this.e.onSourceOpen),Ge.removeEventListener("sourceended",this.e.onSourceEnded),Ge.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}appendInitSegment(Ge,Je){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(Ge),this._pendingSegments[Ge.type].push(Ge);return}let ot=Ge,Et=`${ot.container}`;ot.codec&&ot.codec.length>0&&(Et+=`;codecs=${ot.codec}`);let Nt=!1;if(xe.v(this.TAG,"Received Initialization Segment, mimeType: "+Et),this._lastInitSegments[ot.type]=ot,Et!==this._mimeTypes[ot.type]){if(this._mimeTypes[ot.type])xe.v(this.TAG,`Notice: ${ot.type} mimeType changed, origin: ${this._mimeTypes[ot.type]}, target: ${Et}`);else{Nt=!0;try{let pn=this._sourceBuffers[ot.type]=this._mediaSource.addSourceBuffer(Et);pn.addEventListener("error",this.e.onSourceBufferError),pn.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(pn){xe.e(this.TAG,pn.message),this._emitter.emit(rr.ERROR,{code:pn.code,msg:pn.message});return}}this._mimeTypes[ot.type]=Et}Je||this._pendingSegments[ot.type].push(ot),Nt||this._sourceBuffers[ot.type]&&!this._sourceBuffers[ot.type].updating&&this._doAppendSegments(),re.safari&&ot.container==="audio/mpeg"&&ot.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=ot.mediaDuration/1e3,this._updateMediaSourceDuration())}appendMediaSegment(Ge){let Je=Ge;this._pendingSegments[Je.type].push(Je),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();let ot=this._sourceBuffers[Je.type];ot&&!ot.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}seek(Ge){for(let Je in this._sourceBuffers){if(!this._sourceBuffers[Je])continue;let ot=this._sourceBuffers[Je];if(this._mediaSource.readyState==="open")try{ot.abort()}catch(Nt){xe.e(this.TAG,Nt.message)}this._idrList.clear();let Et=this._pendingSegments[Je];if(Et.splice(0,Et.length),this._mediaSource.readyState!=="closed"){for(let Nt=0;Nt<ot.buffered.length;Nt++){let pn=ot.buffered.start(Nt),jt=ot.buffered.end(Nt);this._pendingRemoveRanges[Je].push({start:pn,end:jt})}if(ot.updating||this._doRemoveRanges(),re.safari){let Nt=this._lastInitSegments[Je];Nt&&(this._pendingSegments[Je].push(Nt),ot.updating||this._doAppendSegments())}}}}endOfStream(){let Ge=this._mediaSource,Je=this._sourceBuffers;if(!Ge||Ge.readyState!=="open"){Ge&&Ge.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}Je.video&&Je.video.updating||Je.audio&&Je.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,Ge.endOfStream())}getNearestKeyframe(Ge){return this._idrList.getLastSyncPointBeforeDts(Ge)}_needCleanupSourceBuffer(){if(!this._config.autoCleanupSourceBuffer)return!1;let Ge=this._mediaElement.currentTime;for(let Je in this._sourceBuffers){let ot=this._sourceBuffers[Je];if(ot){let Et=ot.buffered;if(Et.length>=1&&Ge-Et.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}_doCleanupSourceBuffer(){let Ge=this._mediaElement.currentTime;for(let Je in this._sourceBuffers){let ot=this._sourceBuffers[Je];if(ot){let Et=ot.buffered,Nt=!1;for(let pn=0;pn<Et.length;pn++){let jt=Et.start(pn),cn=Et.end(pn);if(jt<=Ge&&Ge<cn+3){if(Ge-jt>=this._config.autoCleanupMaxBackwardDuration){Nt=!0;let On=Ge-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[Je].push({start:jt,end:On})}}else cn<Ge&&(Nt=!0,this._pendingRemoveRanges[Je].push({start:jt,end:cn}))}Nt&&!ot.updating&&this._doRemoveRanges()}}}_updateMediaSourceDuration(){let Ge=this._sourceBuffers;if(this._mediaElement.readyState===0||this._mediaSource.readyState!=="open"||Ge.video&&Ge.video.updating||Ge.audio&&Ge.audio.updating)return;let Je=this._mediaSource.duration,ot=this._pendingMediaDuration;ot>0&&(isNaN(Je)||ot>Je)&&(xe.v(this.TAG,`Update MediaSource duration from ${Je} to ${ot}`),this._mediaSource.duration=ot),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}_doRemoveRanges(){for(let Ge in this._pendingRemoveRanges){if(!this._sourceBuffers[Ge]||this._sourceBuffers[Ge].updating)continue;let Je=this._sourceBuffers[Ge],ot=this._pendingRemoveRanges[Ge];for(;ot.length&&!Je.updating;){let Et=ot.shift();Je.remove(Et.start,Et.end)}}}_doAppendSegments(){let Ge=this._pendingSegments;for(let Je in Ge)if(!(!this._sourceBuffers[Je]||this._sourceBuffers[Je].updating)&&Ge[Je].length>0){let ot=Ge[Je].shift();if(ot.timestampOffset){let Et=this._sourceBuffers[Je].timestampOffset,Nt=ot.timestampOffset/1e3;Math.abs(Et-Nt)>.1&&(xe.v(this.TAG,`Update MPEG audio timestampOffset from ${Et} to ${Nt}`),this._sourceBuffers[Je].timestampOffset=Nt),delete ot.timestampOffset}if(!ot.data||ot.data.byteLength===0)continue;try{this._sourceBuffers[Je].appendBuffer(ot.data),this._isBufferFull=!1,Je==="video"&&ot.hasOwnProperty("info")&&this._idrList.appendArray(ot.info.syncPoints)}catch(Et){this._pendingSegments[Je].unshift(ot),Et.code===22?(this._isBufferFull||this._emitter.emit(rr.BUFFER_FULL),this._isBufferFull=!0):(xe.e(this.TAG,Et.message),this._emitter.emit(rr.ERROR,{code:Et.code,msg:Et.message}))}}}_onSourceOpen(){if(xe.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0){let Ge=this._pendingSourceBufferInit;for(;Ge.length;){let Je=Ge.shift();this.appendInitSegment(Je,!0)}}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(rr.SOURCE_OPEN)}_onSourceEnded(){xe.v(this.TAG,"MediaSource onSourceEnded")}_onSourceClose(){xe.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}_hasPendingSegments(){let Ge=this._pendingSegments;return Ge.video.length>0||Ge.audio.length>0}_hasPendingRemoveRanges(){let Ge=this._pendingRemoveRanges;return Ge.video.length>0||Ge.audio.length>0}_onSourceBufferUpdateEnd(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(rr.UPDATE_END)}_onSourceBufferError(Ge){xe.e(this.TAG,`SourceBuffer Error: ${Ge}`)}}var gr=Cr;const Ni={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},Ti={NETWORK_EXCEPTION:ue.EXCEPTION,NETWORK_STATUS_CODE_INVALID:ue.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:ue.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:ue.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:et.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:et.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:et.CODEC_UNSUPPORTED};class cr{constructor(Ge,Je){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(Me()),this._config=Rt(),typeof Je=="object"&&Object.assign(this._config,Je),Ge.type.toLowerCase()!=="flv")throw new de("FlvPlayer requires an flv MediaDataSource input!");Ge.isLive===!0&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=Ge,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;let ot=re.chrome&&(re.version.major<50||re.version.major===50&&re.version.build<2661);this._alwaysSeekKeyframe=!!(ot||re.msedge||re.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}destroy(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(Ge,Je){Ge===yt.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(yt.MEDIA_INFO,this.mediaInfo)}):Ge===yt.STATISTICS_INFO&&this._statisticsInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(yt.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(Ge,Je)}off(Ge,Je){this._emitter.removeListener(Ge,Je)}attachMediaElement(Ge){if(this._mediaElement=Ge,Ge.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),Ge.addEventListener("seeking",this.e.onvSeeking),Ge.addEventListener("canplay",this.e.onvCanPlay),Ge.addEventListener("stalled",this.e.onvStalled),Ge.addEventListener("progress",this.e.onvProgress),this._msectl=new gr(this._config),this._msectl.on(rr.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(rr.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(rr.SOURCE_OPEN,()=>{this._mseSourceOpened=!0,this._hasPendingLoad&&(this._hasPendingLoad=!1,this.load())}),this._msectl.on(rr.ERROR,Je=>{this._emitter.emit(yt.ERROR,Ni.MEDIA_ERROR,Ti.MEDIA_MSE_ERROR,Je)}),this._msectl.attachMediaElement(Ge),this._pendingSeekTime!=null)try{Ge.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(Je){}}detachMediaElement(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}load(){if(!this._mediaElement)throw new pe("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new pe("FlvPlayer.load() has been called, please call unload() first!");if(!this._hasPendingLoad){if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new Hi(this._mediaDataSource,this._config),this._transmuxer.on(mn.INIT_SEGMENT,(Ge,Je)=>{this._msectl.appendInitSegment(Je)}),this._transmuxer.on(mn.MEDIA_SEGMENT,(Ge,Je)=>{if(this._msectl.appendMediaSegment(Je),this._config.lazyLoad&&!this._config.isLive){let ot=this._mediaElement.currentTime;Je.info.endDts>=(ot+this._config.lazyLoadMaxDuration)*1e3&&this._progressChecker==null&&(xe.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}),this._transmuxer.on(mn.LOADING_COMPLETE,()=>{this._msectl.endOfStream(),this._emitter.emit(yt.LOADING_COMPLETE)}),this._transmuxer.on(mn.RECOVERED_EARLY_EOF,()=>{this._emitter.emit(yt.RECOVERED_EARLY_EOF)}),this._transmuxer.on(mn.IO_ERROR,(Ge,Je)=>{this._emitter.emit(yt.ERROR,Ni.NETWORK_ERROR,Ge,Je)}),this._transmuxer.on(mn.DEMUX_ERROR,(Ge,Je)=>{this._emitter.emit(yt.ERROR,Ni.MEDIA_ERROR,Ge,{code:-1,msg:Je})}),this._transmuxer.on(mn.MEDIA_INFO,Ge=>{this._mediaInfo=Ge,this._emitter.emit(yt.MEDIA_INFO,Object.assign({},Ge))}),this._transmuxer.on(mn.METADATA_ARRIVED,Ge=>{this._emitter.emit(yt.METADATA_ARRIVED,Ge)}),this._transmuxer.on(mn.SCRIPTDATA_ARRIVED,Ge=>{this._emitter.emit(yt.SCRIPTDATA_ARRIVED,Ge)}),this._transmuxer.on(mn.STATISTICS_INFO,Ge=>{this._statisticsInfo=this._fillStatisticsInfo(Ge),this._emitter.emit(yt.STATISTICS_INFO,Object.assign({},this._statisticsInfo))}),this._transmuxer.on(mn.RECOMMEND_SEEKPOINT,Ge=>{this._mediaElement&&!this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Ge/1e3)}),this._transmuxer.open()}}unload(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}play(){return this._mediaElement.play()}pause(){this._mediaElement.pause()}get type(){return this._type}get buffered(){return this._mediaElement.buffered}get duration(){return this._mediaElement.duration}get volume(){return this._mediaElement.volume}set volume(Ge){this._mediaElement.volume=Ge}get muted(){return this._mediaElement.muted}set muted(Ge){this._mediaElement.muted=Ge}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(Ge){this._mediaElement?this._internalSeek(Ge):this._pendingSeekTime=Ge}get mediaInfo(){return Object.assign({},this._mediaInfo)}get statisticsInfo(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}_fillStatisticsInfo(Ge){if(Ge.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return Ge;let Je=!0,ot=0,Et=0;if(this._mediaElement.getVideoPlaybackQuality){let Nt=this._mediaElement.getVideoPlaybackQuality();ot=Nt.totalVideoFrames,Et=Nt.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(ot=this._mediaElement.webkitDecodedFrameCount,Et=this._mediaElement.webkitDroppedFrameCount):Je=!1;return Je&&(Ge.decodedFrames=ot,Ge.droppedFrames=Et),Ge}_onmseUpdateEnd(){if(!this._config.lazyLoad||this._config.isLive)return;let Ge=this._mediaElement.buffered,Je=this._mediaElement.currentTime,ot=0,Et=0;for(let Nt=0;Nt<Ge.length;Nt++){let pn=Ge.start(Nt),jt=Ge.end(Nt);if(pn<=Je&&Je<jt){ot=pn,Et=jt;break}}Et>=Je+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(xe.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}_onmseBufferFull(){xe.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()}_suspendTransmuxer(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}_checkProgressAndResume(){let Ge=this._mediaElement.currentTime,Je=this._mediaElement.buffered,ot=!1;for(let Et=0;Et<Je.length;Et++){let Nt=Je.start(Et),pn=Je.end(Et);if(Ge>=Nt&&Ge<pn){Ge>=pn-this._config.lazyLoadRecoverDuration&&(ot=!0);break}}ot&&(window.clearInterval(this._progressChecker),this._progressChecker=null,ot&&(xe.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}_isTimepointBuffered(Ge){let Je=this._mediaElement.buffered;for(let ot=0;ot<Je.length;ot++){let Et=Je.start(ot),Nt=Je.end(ot);if(Ge>=Et&&Ge<Nt)return!0}return!1}_internalSeek(Ge){let Je=this._isTimepointBuffered(Ge),ot=!1,Et=0;if(Ge<1&&this._mediaElement.buffered.length>0){let Nt=this._mediaElement.buffered.start(0);(Nt<1&&Ge<Nt||re.safari)&&(ot=!0,Et=re.safari?.1:Nt)}if(ot)this._requestSetTime=!0,this._mediaElement.currentTime=Et;else if(Je){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=Ge;else{let Nt=this._msectl.getNearestKeyframe(Math.floor(Ge*1e3));this._requestSetTime=!0,Nt!=null?this._mediaElement.currentTime=Nt.dts/1e3:this._mediaElement.currentTime=Ge}this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(Ge),this._transmuxer.seek(Math.floor(Ge*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Ge)}_checkAndApplyUnbufferedSeekpoint(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){let Ge=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(Ge)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(Ge),this._transmuxer.seek(Math.floor(Ge*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Ge))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_checkAndResumeStuckPlayback(Ge){let Je=this._mediaElement;if(Ge||!this._receivedCanPlay||Je.readyState<2){let ot=Je.buffered;ot.length>0&&Je.currentTime<ot.start(0)&&(xe.w(this.TAG,`Playback seems stuck at ${Je.currentTime}, seek to ${ot.start(0)}`),this._requestSetTime=!0,this._mediaElement.currentTime=ot.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}_onvLoadedMetadata(Ge){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}_onvSeeking(Ge){let Je=this._mediaElement.currentTime,ot=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(Je<1&&ot.length>0){let Et=ot.start(0);if(Et<1&&Je<Et||re.safari){this._requestSetTime=!0,this._mediaElement.currentTime=re.safari?.1:Et;return}}if(this._isTimepointBuffered(Je)){if(this._alwaysSeekKeyframe){let Et=this._msectl.getNearestKeyframe(Math.floor(Je*1e3));Et!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=Et.dts/1e3)}this._progressChecker!=null&&this._checkProgressAndResume();return}this._seekpointRecord={seekPoint:Je,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_onvCanPlay(Ge){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}_onvStalled(Ge){this._checkAndResumeStuckPlayback(!0)}_onvProgress(Ge){this._checkAndResumeStuckPlayback()}}var $e=cr;class Li{constructor(Ge,Je){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(Me()),this._config=Rt(),typeof Je=="object"&&Object.assign(this._config,Je),Ge.type.toLowerCase()==="flv")throw new de("NativePlayer does't support flv MediaDataSource input!");if(Ge.hasOwnProperty("segments"))throw new de(`NativePlayer(${Ge.type}) doesn't support multipart playback!`);this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=Ge,this._mediaElement=null}destroy(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(Ge,Je){Ge===yt.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(yt.MEDIA_INFO,this.mediaInfo)}):Ge===yt.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(yt.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(Ge,Je)}off(Ge,Je){this._emitter.removeListener(Ge,Je)}attachMediaElement(Ge){if(this._mediaElement=Ge,Ge.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{Ge.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(Je){}}detachMediaElement(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}load(){if(!this._mediaElement)throw new pe("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}unload(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}play(){return this._mediaElement.play()}pause(){this._mediaElement.pause()}get type(){return this._type}get buffered(){return this._mediaElement.buffered}get duration(){return this._mediaElement.duration}get volume(){return this._mediaElement.volume}set volume(Ge){this._mediaElement.volume=Ge}get muted(){return this._mediaElement.muted}set muted(Ge){this._mediaElement.muted=Ge}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(Ge){this._mediaElement?this._mediaElement.currentTime=Ge:this._pendingSeekTime=Ge}get mediaInfo(){let Je={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(Je.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(Je.width=this._mediaElement.videoWidth,Je.height=this._mediaElement.videoHeight)),Je}get statisticsInfo(){let Ge={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return Ge;let Je=!0,ot=0,Et=0;if(this._mediaElement.getVideoPlaybackQuality){let Nt=this._mediaElement.getVideoPlaybackQuality();ot=Nt.totalVideoFrames,Et=Nt.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(ot=this._mediaElement.webkitDecodedFrameCount,Et=this._mediaElement.webkitDroppedFrameCount):Je=!1;return Je&&(Ge.decodedFrames=ot,Ge.droppedFrames=Et),Ge}_onvLoadedMetadata(Ge){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(yt.MEDIA_INFO,this.mediaInfo)}_reportStatisticsInfo(){this._emitter.emit(yt.STATISTICS_INFO,this.statisticsInfo)}}var ti=Li;Se.install();function Oi($t,Ge){let Je=$t;if(Je==null||typeof Je!="object")throw new de("MediaDataSource must be an javascript object!");if(!Je.hasOwnProperty("type"))throw new de("MediaDataSource must has type field to indicate video file type!");switch(Je.type){case"flv":return new $e(Je,Ge);default:return new ti(Je,Ge)}}function pr(){return rt.supportMSEH264Playback()}function dr(){return rt.getFeatureList()}let Qi={};Qi.createPlayer=Oi,Qi.isSupported=pr,Qi.getFeatureList=dr,Qi.BaseLoader=ee,Qi.LoaderStatus=fe,Qi.LoaderErrors=ue,Qi.Events=yt,Qi.ErrorTypes=Ni,Qi.ErrorDetails=Ti,Qi.FlvPlayer=$e,Qi.NativePlayer=ti,Qi.LoggingControl=xt,Object.defineProperty(Qi,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var So=Qi},93125:function(xn,ln,Ie){(function(Le){if(1)window.OSS=Le(),xn.exports=Le();else var Se})(function(){var Le;return function(){function Se(je,Me,Ce){function xe(we,pe){if(!Me[we]){if(!je[we]){var de=void 0;if(!pe&&de)return require(we,!0);if(be)return be(we,!0);var ge=new Error("Cannot find module '"+we+"'");throw ge.code="MODULE_NOT_FOUND",ge}var fe=Me[we]={exports:{}};je[we][0].call(fe.exports,function(ue){return xe(je[we][1][ue]||ue)},fe,fe.exports,Se,je,Me,Ce)}return Me[we].exports}for(var be=void 0,ye=0;ye<Ce.length;ye++)xe(Ce[ye]);return xe}return Se}()({1:[function(Se,je,Me){"use strict";var Ce=Se("./browser/client");Ce.Buffer=Se("buffer").Buffer,Ce.co=Se("co"),Ce.urllib=Se("../shims/xhr"),Ce.version=Se("./browser/version").version,je.exports=Ce},{"../shims/xhr":244,"./browser/client":2,"./browser/version":5,buffer:38,co:41}],2:[function(Se,je,Me){(function(Ce,xe){"use strict";function be(rt){return rt&&rt.__esModule?rt:{default:rt}}function ye(rt,ct){return rt[ct]||rt[ct.toLowerCase()]}function we(rt,ct){var yt=Oe.parse(rt);if(!yt.protocol){var wt=ct?"https://":"http://";yt=Oe.parse(wt+rt)}if(yt.protocol!=="http:"&&yt.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return yt}function pe(rt,ct,yt){var wt=yt?"https://":"http://",xt=ct?"-internal.aliyuncs.com":".aliyuncs.com";return rt.substr(0,14)==="vpc100-oss-cn-"&&(xt=".aliyuncs.com"),Oe.parse(wt+rt+xt)}function de(){return document&&document.location&&document.location.protocol==="https:"}function ge(rt,ct){if(!(this instanceof ge))return new ge(rt,ct);rt&&rt.inited?this.options=rt:this.options=ge.initOptions(rt),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=mt,this.agent=this.options.agent||Rt),this.ctx=ct,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}var fe=Se("babel-runtime/regenerator"),ue=be(fe),ee=Se("babel-runtime/core-js/object/keys"),z=be(ee),oe=Se("debug")("ali-oss"),re=Se("./../../shims/crypto/crypto.js"),ae=Se("path"),le=Se("copy-to"),me=Se("mime"),ve=Se("xml2js"),Pe=Se("humanize-ms"),Ae=Se("agentkeepalive"),De=Se("merge-descriptors"),Oe=Se("url"),Ze=Se("is-type-of"),qe=Se("platform"),Xe=Se("utility"),mt=Se("urllib"),pt=Se("./version"),Mt=Se("dateformat"),at=Se("bowser"),_t=Se("../common/signUtils"),dt=Se("../common/utils"),Rt=new Ae;je.exports=ge,ge.initOptions=function(rt){if(!rt||!rt.accessKeyId||!rt.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");var ct=de(),yt={region:"oss-cn-hangzhou",internal:!1,secure:ct,bucket:null,endpoint:null,cname:!1};if((0,z.default)(rt).forEach(function(wt){rt[wt]!==void 0&&(yt[wt]=rt[wt])}),yt.accessKeyId=yt.accessKeyId.trim(),yt.accessKeySecret=yt.accessKeySecret.trim(),yt.timeout&&(yt.timeout=Pe(yt.timeout)),yt.endpoint)yt.endpoint=we(yt.endpoint,yt.secure);else{if(!yt.region)throw new Error("require options.endpoint or options.region");yt.endpoint=pe(yt.region,yt.internal,yt.secure)}return yt.inited=!0,yt};var ut=ge.prototype;De(ut,Se("./object")),De(ut,Se("./managed_upload")),De(ut,Se("../common/multipart")),De(ut,Se("../common/thunkpool.js")),ge.Wrapper=Se("./wrapper"),ut.signature=function(rt){return oe("authorization stringToSign: %s",rt),_t.computeSignature(this.options.accessKeySecret,rt)},ut.authorization=function(rt,ct,yt,wt){var xt=_t.buildCanonicalString(rt.toUpperCase(),ct,{headers:wt,parameters:yt});return _t.authorization(this.options.accessKeyId,this.options.accessKeySecret,xt)},ut.createRequest=function(rt){var ct={"x-oss-date":Mt(+new Date+this.options.amendTimeSkewed,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.options.stsToken&&(ct["x-oss-security-token"]=this.options.stsToken),le(rt.headers).to(ct),ye(ct,"Content-Type")||(rt.mime===me.default_type&&(rt.mime=""),rt.mime&&rt.mime.indexOf("/")>0?ct["Content-Type"]=rt.mime:ct["Content-Type"]=me.getType(rt.mime||ae.extname(rt.object||""))||"application/octet-stream"),rt.content&&(ct["Content-Md5"]=re.createHash("md5").update(new xe(rt.content,"utf8")).digest("base64"),ct["Content-Length"]||(ct["Content-Length"]=rt.content.length));var yt=this._getResource(rt);ct.authorization=this.authorization(rt.method,yt,rt.subres,ct);var wt=this._getReqUrl(rt);oe("request %s %s, with headers %j, !!stream: %s",rt.method,wt,ct,!!rt.stream);var xt=rt.timeout||this.options.timeout;return{url:wt,params:{agent:this.agent,method:rt.method,content:rt.content,stream:rt.stream,headers:ct,timeout:xt,writeStream:rt.writeStream,customResponse:rt.customResponse,ctx:rt.ctx||this.ctx}}},ut.request=ue.default.mark(function rt(ct){var yt,wt,xt,Ut;return ue.default.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return yt=this.createRequest(ct),wt=void 0,xt=void 0,zt.prev=3,zt.next=6,this.urllib.request(yt.url,yt.params);case 6:wt=zt.sent,oe("response %s %s, got %s, headers: %j",ct.method,yt.url,wt.status,wt.headers),zt.next=13;break;case 10:zt.prev=10,zt.t0=zt.catch(3),xt=zt.t0;case 13:if(Ut=void 0,!wt||!ct.successStatuses||ct.successStatuses.indexOf(wt.status)!==-1){zt.next=26;break}return zt.next=17,this.requestError(wt);case 17:if(Ut=zt.sent,Ut.code!=="RequestTimeTooSkewed"){zt.next=23;break}return this.options.amendTimeSkewed=+new Date(Ut.serverTime)-new Date,zt.next=22,this.request(ct);case 22:return zt.abrupt("return",zt.sent);case 23:Ut.params=ct,zt.next=30;break;case 26:if(!xt){zt.next=30;break}return zt.next=29,this.requestError(xt);case 29:Ut=zt.sent;case 30:if(!Ut){zt.next=32;break}throw Ut;case 32:if(!ct.xmlResponse){zt.next=36;break}return zt.next=35,this.parseXML(wt.data);case 35:wt.data=zt.sent;case 36:return zt.abrupt("return",wt);case 37:case"end":return zt.stop()}},rt,this,[[3,10]])}),ut._getResource=function(rt){var ct="/";return rt.bucket&&(ct+=rt.bucket+"/"),rt.object&&(ct+=rt.object),ct},ut._isIP=function(rt){return dt._isIP(rt)},ut._escape=function(rt){return Xe.encodeURIComponent(rt).replace(/%2F/g,"/")},ut._getReqUrl=function(rt){var ct={};le(this.options.endpoint).to(ct);var yt=this._isIP(ct.hostname),wt=this.options.cname;!rt.bucket||wt||yt||(ct.host=rt.bucket+"."+ct.host);var xt="/";rt.bucket&&yt&&(xt+=rt.bucket+"/"),rt.object&&(xt+=this._escape(rt.object).replace(/\+/g,"%2B")),ct.pathname=xt;var Ut={};if(rt.query&&De(Ut,rt.query),rt.subres){var zt={};Ze.string(rt.subres)?zt[rt.subres]="":Ze.array(rt.subres)?rt.subres.forEach(function(dn){zt[dn]=""}):zt=rt.subres,De(Ut,zt)}return ct.query=Ut,Oe.format(ct)},ut._getUserAgent=function(){var rt=Ce&&Ce.browser?"js":"nodejs",ct="aliyun-sdk-"+rt+"/"+pt.version,yt=qe.description;return!yt&&Ce&&(yt="Node.js "+Ce.version.slice(1)+" on "+Ce.platform+" "+Ce.arch),this._checkUserAgent(ct+" "+yt)},ut._checkUserAgent=function(rt){return rt.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},ut.checkBrowserAndVersion=function(rt,ct){return at.name===rt&&at.version.split(".")[0]===ct},ut.parseXML=function(rt){return function(ct){xe.isBuffer(rt)&&(rt=rt.toString()),ve.parseString(rt,{explicitRoot:!1,explicitArray:!1},ct)}},ut.requestError=ue.default.mark(function rt(ct){var yt,wt,xt,Ut;return ue.default.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:if(yt=null,ct.data&&ct.data.length){zt.next=5;break}ct.status===-1||ct.status===-2?(yt=new Error(ct.message),yt.name=ct.name,yt.status=ct.status,yt.code=ct.name):(ct.status===404?(yt=new Error("Object not exists"),yt.name="NoSuchKeyError",yt.status=404,yt.code="NoSuchKey"):ct.status===412?(yt=new Error("Pre condition failed"),yt.name="PreconditionFailedError",yt.status=412,yt.code="PreconditionFailed"):(yt=new Error("Unknow error, status: "+ct.status),yt.name="UnknowError",yt.status=ct.status),yt.requestId=ct.headers["x-oss-request-id"],yt.host=""),zt.next=30;break;case 5:return wt=String(ct.data),oe("request response error data: %s",wt),xt=void 0,zt.prev=8,zt.next=11,this.parseXML(wt)||{};case 11:xt=zt.sent,zt.next=21;break;case 14:return zt.prev=14,zt.t0=zt.catch(8),oe(wt),zt.t0.message+=`
|
|
|
raw xml: `+wt,zt.t0.status=ct.status,zt.t0.requestId=ct.headers["x-oss-request-id"],zt.abrupt("return",zt.t0);case 21:Ut=xt.Message||"unknow request error, status: "+ct.status,xt.Condition&&(Ut+=" (condition: "+xt.Condition+")"),yt=new Error(Ut),yt.name=xt.Code?xt.Code+"Error":"UnknowError",yt.status=ct.status,yt.code=xt.Code,yt.requestId=xt.RequestId,yt.hostId=xt.HostId,yt.serverTime=xt.ServerTime;case 30:return oe("generate error %j",yt),zt.abrupt("return",yt);case 32:case"end":return zt.stop()}},rt,this,[[8,14]])})}).call(this,Se("_process"),Se("buffer").Buffer)},{"../common/multipart":8,"../common/signUtils":9,"../common/thunkpool.js":10,"../common/utils":11,"./../../shims/crypto/crypto.js":237,"./managed_upload":3,"./object":4,"./version":5,"./wrapper":6,_process:173,agentkeepalive:12,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,bowser:35,buffer:38,"copy-to":43,dateformat:154,debug:155,"humanize-ms":160,"is-type-of":165,"merge-descriptors":168,mime:242,path:170,platform:171,url:203,urllib:244,utility:243,xml2js:213}],3:[function(Se,je,Me){(function(Ce){"use strict";function xe(le){return le&&le.__esModule?le:{default:le}}function be(le,me){if(!(this instanceof be))return new be(le,me);ae.call(this,me),this.file=le,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}var ye=Se("babel-runtime/core-js/array/from"),we=xe(ye),pe=Se("babel-runtime/regenerator"),de=xe(pe),ge=Se("is-type-of"),fe=Se("util"),ue=Se("path"),ee=Se("mime"),z=Se("copy-to"),oe=Me;oe.multipartUpload=de.default.mark(function le(me,ve,Pe){var Ae,De,Oe,Ze,qe,Xe,mt,pt,Mt;return de.default.wrap(function(at){for(;;)switch(at.prev=at.next){case 0:if(this.resetCancelFlag(),Pe=Pe||{},!Pe.checkpoint||!Pe.checkpoint.uploadId){at.next=6;break}return at.next=5,this._resumeMultipart(Pe.checkpoint,Pe);case 5:return at.abrupt("return",at.sent);case 6:return Ae=102400,Pe.mime||(ge.file(ve)?Pe.mime=ee.getType(ue.extname(ve.name)):ge.blob(ve)?Pe.mime=ve.type:Pe.mime=ee.getType(ue.extname(ve))),Pe.headers=Pe.headers||{},this._convertMetaToHeaders(Pe.meta,Pe.headers),at.next=12,this._getFileSize(ve);case 12:if(!((De=at.sent)<Ae)){at.next=25;break}return Oe=this._createStream(ve,0,De),Pe.contentLength=De,at.next=18,this.putStream(me,Oe,Pe);case 18:if(Ze=at.sent,!Pe||!Pe.progress){at.next=22;break}return at.next=22,Pe.progress(1);case 22:return qe={res:Ze.res,bucket:this.options.bucket,name:me,etag:Ze.res.headers.etag},(Pe.headers&&Pe.headers["x-oss-callback"]||Pe.callback)&&(qe.data=Ze.data),at.abrupt("return",qe);case 25:if(!(Pe.partSize&&Pe.partSize<Ae)){at.next=27;break}throw new Error("partSize must not be smaller than "+Ae);case 27:return at.next=29,this.initMultipartUpload(me,Pe);case 29:if(Xe=at.sent,mt=Xe.uploadId,pt=this._getPartSize(De,Pe.partSize),Mt={file:ve,name:me,fileSize:De,partSize:pt,uploadId:mt,doneParts:[]},!Pe||!Pe.progress){at.next=36;break}return at.next=36,Pe.progress(0,Mt,Xe.res);case 36:return at.next=38,this._resumeMultipart(Mt,Pe);case 38:return at.abrupt("return",at.sent);case 39:case"end":return at.stop()}},le,this)}),oe._resumeMultipart=de.default.mark(function le(me,ve){var Pe,Ae,De,Oe,Ze,qe,Xe,mt,pt,Mt,at,_t,dt,Rt,ut,rt,ct,yt,wt,xt,Ut;return de.default.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:if(!this.isCancel()){zt.next=2;break}throw this._makeCancelEvent();case 2:if(Pe=me.file,Ae=me.fileSize,De=me.partSize,Oe=me.uploadId,Ze=me.doneParts,qe=me.name,Xe=[],Ze.length>0&&z(Ze).to(Xe),mt=this._divideParts(Ae,De),pt=mt.length,Mt=!1,at=de.default.mark(function dn(Ft,Dt){var Qt,Yt,Jt;return de.default.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:if(Ft.isCancel()){lt.next=21;break}return lt.prev=1,Qt=mt[Dt-1],Yt={stream:Ft._createStream(Pe,Qt.start,Qt.end),size:Qt.end-Qt.start},lt.next=6,Ft._uploadPart(qe,Oe,Dt,Yt);case 6:if(Jt=lt.sent,Ft.isCancel()||Mt){lt.next=13;break}if(me.doneParts.push({number:Dt,etag:Jt.res.headers.etag}),Xe.push({number:Dt,etag:Jt.res.headers.etag}),!ve||!ve.progress){lt.next=13;break}return lt.next=13,ve.progress(Ze.length/pt,me,Jt.res);case 13:lt.next=21;break;case 15:if(lt.prev=15,lt.t0=lt.catch(1),Ft.isCancel()){lt.next=21;break}throw Ft.cancel(),lt.t0.partNum=Dt,lt.t0;case 21:case"end":return lt.stop()}},dn,this,[[1,15]])}),_t=(0,we.default)(new Array(pt),function(dn,Ft){return Ft+1}),dt=Xe.map(function(dn){return dn.number}),Rt=_t.filter(function(dn){return dt.indexOf(dn)<0}),ut=5,rt=ve.parallel||ut,!this.checkBrowserAndVersion("Internet Explorer","10")&&rt!==1){zt.next=26;break}ct=0;case 16:if(!(ct<Rt.length)){zt.next=24;break}if(!this.isCancel()){zt.next=19;break}throw this._makeCancelEvent();case 19:return zt.next=21,at(this,Rt[ct]);case 21:ct++,zt.next=16;break;case 24:zt.next=40;break;case 26:for(yt=[],wt=0;wt<Rt.length;wt++)yt.push(at(this,Rt[wt]));return zt.next=30,this._thunkPool(yt,rt);case 30:if(xt=zt.sent,Mt=!0,!(xt&&xt.length>0)){zt.next=37;break}throw this.resetCancelFlag(),Ut=xt[0],Ut.message="Failed to upload some parts with error: "+Ut.toString()+" part_num: "+Ut.partNum,Ut;case 37:if(!this.isCancel()){zt.next=40;break}throw yt=null,this._makeCancelEvent();case 40:return zt.next=42,this.completeMultipartUpload(qe,Oe,Xe,ve);case 42:return zt.abrupt("return",zt.sent);case 43:case"end":return zt.stop()}},le,this)}),ge.file=function(le){return typeof File!="undefined"&&le instanceof File},ge.blob=function(le){return typeof Blob!="undefined"&&le instanceof Blob},oe._getFileSize=de.default.mark(function le(me){var ve;return de.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:if(!ge.buffer(me)){Pe.next=4;break}return Pe.abrupt("return",me.length);case 4:if(!ge.blob(me)&&!ge.file(me)){Pe.next=6;break}return Pe.abrupt("return",me.size);case 6:if(!ge.string(me)){Pe.next=11;break}return Pe.next=9,this._statFile(me);case 9:return ve=Pe.sent,Pe.abrupt("return",ve.size);case 11:throw new Error("_getFileSize requires Buffer/File/String.");case 12:case"end":return Pe.stop()}},le,this)});var re=Se("stream"),ae=re.Readable;fe.inherits(be,ae),be.prototype.readFileAndPush=function(le){if(this.fileBuffer)for(var me=!0;me&&this.fileBuffer&&this.start<this.fileBuffer.length;){var ve=this.start,Pe=ve+le;Pe=Pe>this.fileBuffer.length?this.fileBuffer.length:Pe,this.start=Pe,me=this.push(this.fileBuffer.slice(ve,Pe))}},be.prototype._read=function(le){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);le=le||16384;var me=this;this.reader.onload=function(ve){me.fileBuffer=new Ce(new Uint8Array(ve.target.result)),me.file=null,me.readFileAndPush(le)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(le)},oe._createStream=function(le,me,ve){if(ge.blob(le)||ge.file(le))return new be(le.slice(me,ve));throw new Error("_createStream requires File/String.")},oe._getPartSize=function(le,me){return me?Math.max(Math.ceil(le/1e4),me):1048576},oe._divideParts=function(le,me){for(var ve=Math.ceil(le/me),Pe=[],Ae=0;Ae<ve;Ae++){var De=me*Ae,Oe=Math.min(De+me,le);Pe.push({start:De,end:Oe})}return Pe},oe._makeCancelEvent=function(){return{status:0,name:"cancel"}}}).call(this,Se("buffer").Buffer)},{"babel-runtime/core-js/array/from":16,"babel-runtime/regenerator":33,buffer:38,"copy-to":43,"is-type-of":165,mime:242,path:170,stream:195,util:207}],4:[function(Se,je,Me){"use strict";function Ce(me){return me&&me.__esModule?me:{default:me}}var xe=Se("babel-runtime/core-js/object/keys"),be=Ce(xe),ye=Se("babel-runtime/regenerator"),we=Ce(ye),pe=Se("debug")("ali-oss:object"),de=Se("utility"),ge=Se("fs"),fe=Se("is-type-of"),ue=Se("url"),ee=Se("copy-to"),z=Se("path"),oe=Se("mime"),re=Se("../common/callback"),ae=Se("../common/signUtils"),le=Me;le.append=we.default.mark(function me(ve,Pe,Ae){var De;return we.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return Ae=Ae||{},Ae.position===void 0&&(Ae.position="0"),Ae.subres={append:"",position:Ae.position},Ae.method="POST",Oe.next=6,this.put(ve,Pe,Ae);case 6:return De=Oe.sent,De.nextAppendPosition=De.res.headers["x-oss-next-append-position"],Oe.abrupt("return",De);case 9:case"end":return Oe.stop()}},me,this)}),le.put=we.default.mark(function me(ve,Pe,Ae){var De,Oe,Ze,qe,Xe,mt;return we.default.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:if(De=void 0,Ae=Ae||{},!fe.buffer(Pe)){pt.next=6;break}De=Pe,pt.next=18;break;case 6:if(!fe.blob(Pe)&&!fe.file(Pe)){pt.next=17;break}return Ae.mime||(fe.file(Pe)?Ae.mime=oe.getType(z.extname(Pe.name)):Ae.mime=Pe.type),Oe=this._createStream(Pe,0,Pe.size),pt.next=11,this._getFileSize(Pe);case 11:return Ae.contentLength=pt.sent,pt.next=14,this.putStream(ve,Oe,Ae);case 14:return pt.abrupt("return",pt.sent);case 17:throw new TypeError("Must provide Buffer/Blob for put.");case 18:return Ae.headers=Ae.headers||{},this._convertMetaToHeaders(Ae.meta,Ae.headers),Ze=Ae.method||"PUT",qe=this._objectRequestParams(Ze,ve,Ae),re.encodeCallback(qe,Ae),qe.mime=Ae.mime,qe.content=De,qe.successStatuses=[200],pt.next=28,this.request(qe);case 28:return Xe=pt.sent,mt={name:ve,url:this._objectUrl(ve),res:Xe.res},qe.headers&&qe.headers["x-oss-callback"]&&(mt.data=JSON.parse(Xe.data.toString())),pt.abrupt("return",mt);case 32:case"end":return pt.stop()}},me,this)}),le.putStream=we.default.mark(function me(ve,Pe,Ae){var De,Oe,Ze,qe;return we.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Ae=Ae||{},Ae.headers=Ae.headers||{},Ae.contentLength?Ae.headers["Content-Length"]=Ae.contentLength:Ae.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(Ae.meta,Ae.headers),De=Ae.method||"PUT",Oe=this._objectRequestParams(De,ve,Ae),re.encodeCallback(Oe,Ae),Oe.mime=Ae.mime,Oe.stream=Pe,Oe.successStatuses=[200],Xe.next=12,this.request(Oe);case 12:return Ze=Xe.sent,qe={name:ve,url:this._objectUrl(ve),res:Ze.res},Oe.headers&&Oe.headers["x-oss-callback"]&&(qe.data=JSON.parse(Ze.data.toString())),Xe.abrupt("return",qe);case 16:case"end":return Xe.stop()}},me,this)}),le.head=we.default.mark(function me(ve,Pe){var Ae,De,Oe;return we.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return Ae=this._objectRequestParams("HEAD",ve,Pe),Ae.successStatuses=[200,304],Ze.next=4,this.request(Ae);case 4:return De=Ze.sent,Oe={meta:null,res:De.res,status:De.status},De.status===200&&(0,be.default)(De.headers).forEach(function(qe){qe.indexOf("x-oss-meta-")===0&&(Oe.meta||(Oe.meta={}),Oe.meta[qe.substring(11)]=De.headers[qe])}),Ze.abrupt("return",Oe);case 8:case"end":return Ze.stop()}},me,this)}),le.get=we.default.mark(function me(ve,Pe,Ae){var De,Oe,Ze,qe;return we.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return De=null,Oe=!1,fe.writableStream(Pe)?De=Pe:fe.string(Pe)?(De=ge.createWriteStream(Pe),Oe=!0):Ae=Pe,Ae=Ae||{},Ae.process&&(Ae.subres=Ae.subres||{},Ae.subres["x-oss-process"]=Ae.process),Ze=void 0,Xe.prev=6,qe=this._objectRequestParams("GET",ve,Ae),qe.writeStream=De,qe.successStatuses=[200,206,304],Xe.next=12,this.request(qe);case 12:Ze=Xe.sent,Oe&&De.destroy(),Xe.next=24;break;case 16:if(Xe.prev=16,Xe.t0=Xe.catch(6),!Oe){Xe.next=23;break}return De.destroy(),pe("get error: %s, delete the exists file %s",Xe.t0,Pe),Xe.next=23,this._deleteFileSafe(Pe);case 23:throw Xe.t0;case 24:return Xe.abrupt("return",{res:Ze.res,content:Ze.data});case 25:case"end":return Xe.stop()}},me,this,[[6,16]])}),le.getStream=we.default.mark(function me(ve,Pe){var Ae,De;return we.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return Pe=Pe||{},Ae=this._objectRequestParams("GET",ve,Pe),Ae.customResponse=!0,Ae.successStatuses=[200,206,304],Oe.next=6,this.request(Ae);case 6:return De=Oe.sent,Oe.abrupt("return",{stream:De.res,res:{status:De.status,headers:De.headers}});case 8:case"end":return Oe.stop()}},me,this)}),le.delete=we.default.mark(function me(ve,Pe){var Ae,De;return we.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return Ae=this._objectRequestParams("DELETE",ve,Pe),Ae.successStatuses=[204],Oe.next=4,this.request(Ae);case 4:return De=Oe.sent,Oe.abrupt("return",{res:De.res});case 6:case"end":return Oe.stop()}},me,this)}),le.deleteMulti=we.default.mark(function me(ve,Pe){var Ae,De,Oe,Ze,qe,Xe;return we.default.wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:for(Pe=Pe||{},Ae=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<Delete>
|
|
|
`,Pe.quiet?Ae+=` <Quiet>true</Quiet>
|
|
|
`:Ae+=` <Quiet>false</Quiet>
|
|
|
`,De=0;De<ve.length;De++)Ae+=" <Object><Key>"+de.escape(this._objectName(ve[De]))+`</Key></Object>
|
|
|
`;return Ae+="</Delete>",pe("delete multi objects: %s",Ae),Pe.subres="delete",Oe=this._objectRequestParams("POST","",Pe),Oe.mime="xml",Oe.content=Ae,Oe.xmlResponse=!0,Oe.successStatuses=[200],mt.next=14,this.request(Oe);case 14:return Ze=mt.sent,qe=Ze.data,Xe=qe&&qe.Deleted||null,Xe&&(Array.isArray(Xe)||(Xe=[Xe]),Xe=Xe.map(function(pt){return pt.Key})),mt.abrupt("return",{res:Ze.res,deleted:Xe});case 19:case"end":return mt.stop()}},me,this)}),le.copy=we.default.mark(function me(ve,Pe,Ae){var De,Oe,Ze;return we.default.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return Ae=Ae||{},Ae.headers=Ae.headers||{},(0,be.default)(Ae.headers).forEach(function(Xe){Ae.headers["x-oss-copy-source-"+Xe.toLowerCase()]=Ae.headers[Xe]}),Ae.meta&&(Ae.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(Ae.meta,Ae.headers),Pe=Pe[0]!=="/"?"/"+this.options.bucket+"/"+encodeURIComponent(Pe):"/"+encodeURIComponent(Pe.slice(1)),Ae.headers["x-oss-copy-source"]=Pe,De=this._objectRequestParams("PUT",ve,Ae),De.xmlResponse=!0,De.successStatuses=[200,304],qe.next=12,this.request(De);case 12:return Oe=qe.sent,Ze=Oe.data,Ze&&(Ze={etag:Ze.ETag,lastModified:Ze.LastModified}),qe.abrupt("return",{data:Ze,res:Oe.res});case 16:case"end":return qe.stop()}},me,this)}),le.putMeta=we.default.mark(function me(ve,Pe,Ae){return we.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return De.next=2,this.copy(ve,ve,{meta:Pe||{},timeout:Ae&&Ae.timeout,ctx:Ae&&Ae.ctx});case 2:return De.abrupt("return",De.sent);case 3:case"end":return De.stop()}},me,this)}),le.list=we.default.mark(function me(ve,Pe){var Ae,De,Oe,Ze,qe;return we.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Ae=this._objectRequestParams("GET","",Pe),Ae.query=ve,Ae.xmlResponse=!0,Ae.successStatuses=[200],Xe.next=6,this.request(Ae);case 6:return De=Xe.sent,Oe=De.data.Contents,Ze=this,Oe&&(Array.isArray(Oe)||(Oe=[Oe]),Oe=Oe.map(function(mt){return{name:mt.Key,url:Ze._objectUrl(mt.Key),lastModified:mt.LastModified,etag:mt.ETag,type:mt.Type,size:Number(mt.Size),storageClass:mt.StorageClass,owner:{id:mt.Owner.ID,displayName:mt.Owner.DisplayName}}})),qe=De.data.CommonPrefixes||null,qe&&(Array.isArray(qe)||(qe=[qe]),qe=qe.map(function(mt){return mt.Prefix})),Xe.abrupt("return",{res:De.res,objects:Oe,prefixes:qe,nextMarker:De.data.NextMarker||null,isTruncated:De.data.IsTruncated==="true"});case 13:case"end":return Xe.stop()}},me,this)}),le.putACL=we.default.mark(function me(ve,Pe,Ae){var De,Oe;return we.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return Ae=Ae||{},Ae.subres="acl",Ae.headers=Ae.headers||{},Ae.headers["x-oss-object-acl"]=Pe,ve=this._objectName(ve),De=this._objectRequestParams("PUT",ve,Ae),De.successStatuses=[200],Ze.next=9,this.request(De);case 9:return Oe=Ze.sent,Ze.abrupt("return",{res:Oe.res});case 11:case"end":return Ze.stop()}},me,this)}),le.getACL=we.default.mark(function me(ve,Pe){var Ae,De;return we.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return Pe=Pe||{},Pe.subres="acl",ve=this._objectName(ve),Ae=this._objectRequestParams("GET",ve,Pe),Ae.successStatuses=[200],Ae.xmlResponse=!0,Oe.next=8,this.request(Ae);case 8:return De=Oe.sent,Oe.abrupt("return",{acl:De.data.AccessControlList.Grant,owner:{id:De.data.Owner.ID,displayName:De.data.Owner.DisplayName},res:De.res});case 10:case"end":return Oe.stop()}},me,this)}),le.restore=we.default.mark(function me(ve,Pe){var Ae,De;return we.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return Pe=Pe||{},Pe.subres="restore",Ae=this._objectRequestParams("POST",ve,Pe),Ae.successStatuses=[202],Oe.next=6,this.request(Ae);case 6:return De=Oe.sent,Oe.abrupt("return",{res:De.res});case 8:case"end":return Oe.stop()}},me,this)}),le.signatureUrl=function(me,ve){ve=ve||{},me=this._objectName(me),ve.method=ve.method||"GET";var Pe=de.timestamp()+(ve.expires||1800),Ae={bucket:this.options.bucket,object:me},De=this._getResource(Ae);this.options.stsToken&&(ve["security-token"]=this.options.stsToken);var Oe=ae._signatureForURL(this.options.accessKeySecret,ve,De,Pe),Ze=ue.parse(this._getReqUrl(Ae));return Ze.query={OSSAccessKeyId:this.options.accessKeyId,Expires:Pe,Signature:Oe.Signature},ee(Oe.subResource).to(Ze.query),Ze.format()},le.getObjectUrl=function(me,ve){return ve?ve[ve.length-1]!=="/"&&(ve+="/"):ve=this.options.endpoint.format(),ve+this._escape(this._objectName(me))},le._objectUrl=function(me){return this._getReqUrl({bucket:this.options.bucket,object:me})},le.generateObjectUrl=function(me,ve){if(ve)ve[ve.length-1]!=="/"&&(ve+="/");else{ve=this.options.endpoint.format();var Pe=ue.parse(ve),Ae=this.options.bucket;Pe.hostname=Ae+"."+Pe.hostname,Pe.host=Ae+"."+Pe.host,ve=Pe.format()}return ve+this._escape(this._objectName(me))},le._objectRequestParams=function(me,ve,Pe){if(!this.options.bucket)throw new Error("Please create a bucket first");Pe=Pe||{},ve=this._objectName(ve);var Ae={object:ve,bucket:this.options.bucket,method:me,subres:Pe&&Pe.subres,timeout:Pe&&Pe.timeout,ctx:Pe&&Pe.ctx};return Pe.headers&&(Ae.headers={},ee(Pe.headers).to(Ae.headers)),Ae},le._objectName=function(me){return me.replace(/^\/+/,"")},le._statFile=function(me){return function(ve){ge.stat(me,ve)}},le._convertMetaToHeaders=function(me,ve){me&&(0,be.default)(me).forEach(function(Pe){ve["x-oss-meta-"+Pe]=me[Pe]})},le._deleteFileSafe=function(me){return function(ve){ge.exists(me,function(Pe){Pe?ge.unlink(me,function(Ae){Ae&&pe("unlink %j error: %s",me,Ae),ve()}):ve()})}}},{"../common/callback":7,"../common/signUtils":9,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,"copy-to":43,debug:155,fs:36,"is-type-of":165,mime:242,path:170,url:203,utility:243}],5:[function(Se,je,Me){"use strict";Me.version="5.3.1"},{}],6:[function(Se,je,Me){"use strict";function Ce(z){return z&&z.__esModule?z:{default:z}}function xe(z){return z&&typeof z.next=="function"&&typeof z.throw=="function"}function be(z){if(!z)return!1;var oe=z.constructor;return!!oe&&(oe.name==="GeneratorFunction"||oe.displayName==="GeneratorFunction"||xe(oe.prototype)||xe(z.prototype))}function ye(z,oe){var re=new z(oe),ae=(0,fe.default)(re),le=(0,fe.default)((0,de.default)(re));ae.concat(le).forEach(function(me){be(re[me])?this[me]=ue.wrap(re[me]).bind(re):this[me]=re[me]},this)}function we(z){if(!(this instanceof we))return new we(z);ye.call(this,ee,z)}var pe=Se("babel-runtime/core-js/object/get-prototype-of"),de=Ce(pe),ge=Se("babel-runtime/core-js/object/keys"),fe=Ce(ge),ue=Se("co"),ee=Se("./client");je.exports=we,we.STS=function z(oe){if(!(this instanceof z))return new z(oe);ye.call(this,ee.STS,oe)}},{"./client":2,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/core-js/object/keys":23,co:41}],7:[function(Se,je,Me){(function(Ce){"use strict";function xe(de){return de&&de.__esModule?de:{default:de}}var be=Se("babel-runtime/core-js/object/keys"),ye=xe(be),we=Se("babel-runtime/core-js/json/stringify"),pe=xe(we);Me.encodeCallback=function(de,ge){if(de.headers=de.headers||{},!Object.prototype.hasOwnProperty.call(de.headers,"x-oss-callback")&&ge.callback){var fe={callbackUrl:encodeURI(ge.callback.url),callbackBody:ge.callback.body};ge.callback.host&&(fe.callbackHost=ge.callback.host),ge.callback.contentType&&(fe.callbackBodyType=ge.callback.contentType);var ue=new Ce((0,pe.default)(fe)).toString("base64");if(de.headers["x-oss-callback"]=ue,ge.callback.customValue){var ee={};(0,ye.default)(ge.callback.customValue).forEach(function(z){ee["x:"+z]=ge.callback.customValue[z]}),de.headers["x-oss-callback-var"]=new Ce((0,pe.default)(ee)).toString("base64")}}}}).call(this,Se("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38}],8:[function(Se,je,Me){"use strict";var Ce=Se("babel-runtime/regenerator"),xe=function(pe){return pe&&pe.__esModule?pe:{default:pe}}(Ce),be=Se("copy-to"),ye=Se("./callback"),we=Me;we.listUploads=xe.default.mark(function pe(de,ge){var fe,ue,ee,z;return xe.default.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return ge=ge||{},fe={},be(ge).to(fe),fe.subres="uploads",ue=this._objectRequestParams("GET","",fe),ue.query=de,ue.xmlResponse=!0,ue.successStatuses=[200],oe.next=10,this.request(ue);case 10:return ee=oe.sent,z=ee.data.Upload||[],Array.isArray(z)||(z=[z]),z=z.map(function(re){return{name:re.Key,uploadId:re.UploadId,initiated:re.Initiated}}),oe.abrupt("return",{res:ee.res,uploads:z,bucket:ee.data.Bucket,nextKeyMarker:ee.data.NextKeyMarker,nextUploadIdMarker:ee.data.NextUploadIdMarker,isTruncated:ee.data.IsTruncated==="true"});case 15:case"end":return oe.stop()}},pe,this)}),we.listParts=xe.default.mark(function pe(de,ge,fe,ue){var ee,z,oe;return xe.default.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return ue=ue||{},ee={},be(ue).to(ee),ee.subres={uploadId:ge},z=this._objectRequestParams("GET",de,ee),z.query=fe,z.xmlResponse=!0,z.successStatuses=[200],re.next=10,this.request(z);case 10:return oe=re.sent,re.abrupt("return",{res:oe.res,uploadId:oe.data.UploadId,bucket:oe.data.Bucket,name:oe.data.Key,partNumberMarker:oe.data.PartNumberMarker,nextPartNumberMarker:oe.data.NextPartNumberMarker,maxParts:oe.data.MaxParts,isTruncated:oe.data.IsTruncated,parts:oe.data.Part||[]});case 12:case"end":return re.stop()}},pe,this)}),we.abortMultipartUpload=xe.default.mark(function pe(de,ge,fe){var ue,ee,z;return xe.default.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return this.cancel(),fe=fe||{},ue={},be(fe).to(ue),ue.subres={uploadId:ge},ee=this._objectRequestParams("DELETE",de,ue),ee.successStatuses=[204],oe.next=9,this.request(ee);case 9:return z=oe.sent,oe.abrupt("return",{res:z.res});case 11:case"end":return oe.stop()}},pe,this)}),we.initMultipartUpload=xe.default.mark(function pe(de,ge){var fe,ue,ee;return xe.default.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return ge=ge||{},fe={},be(ge).to(fe),fe.headers=fe.headers||{},this._convertMetaToHeaders(ge.meta,fe.headers),fe.subres="uploads",ue=this._objectRequestParams("POST",de,fe),ue.mime=ge.mime,ue.xmlResponse=!0,ue.successStatuses=[200],z.next=12,this.request(ue);case 12:return ee=z.sent,z.abrupt("return",{res:ee.res,bucket:ee.data.Bucket,name:ee.data.Key,uploadId:ee.data.UploadId});case 14:case"end":return z.stop()}},pe,this)}),we.uploadPart=xe.default.mark(function pe(de,ge,fe,ue,ee,z,oe){var re;return xe.default.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:return re={stream:this._createStream(ue,ee,z),size:z-ee},ae.next=3,this._uploadPart(de,ge,fe,re,oe);case 3:return ae.abrupt("return",ae.sent);case 4:case"end":return ae.stop()}},pe,this)}),we.completeMultipartUpload=xe.default.mark(function pe(de,ge,fe,ue){var ee,z,oe,re,ae,le,me,ve;return xe.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:for(ee=fe.concat().sort(function(Ae,De){return Ae.number-De.number}).filter(function(Ae,De,Oe){return!De||Ae.number!==Oe[De-1].number}),z=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,oe=0;oe<ee.length;oe++)re=ee[oe],z+=`<Part>
|
|
|
`,z+="<PartNumber>"+re.number+`</PartNumber>
|
|
|
`,z+="<ETag>"+re.etag+`</ETag>
|
|
|
`,z+=`</Part>
|
|
|
`;return z+="</CompleteMultipartUpload>",ue=ue||{},ae={},be(ue).to(ae),ae.subres={uploadId:ge},le=this._objectRequestParams("POST",de,ae),ye.encodeCallback(le,ae),le.mime="xml",le.content=z,le.headers&&le.headers["x-oss-callback"]||(le.xmlResponse=!0),le.successStatuses=[200],Pe.next=16,this.request(le);case 16:return me=Pe.sent,ve={res:me.res,bucket:le.bucket,name:de,etag:me.res.headers.etag},le.headers&&le.headers["x-oss-callback"]&&(ve.data=JSON.parse(me.data.toString())),Pe.abrupt("return",ve);case 20:case"end":return Pe.stop()}},pe,this)}),we._uploadPart=xe.default.mark(function pe(de,ge,fe,ue,ee){var z,oe,re;return xe.default.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:return ee=ee||{},z={},be(ee).to(z),z.headers={"Content-Length":ue.size},z.subres={partNumber:fe,uploadId:ge},oe=this._objectRequestParams("PUT",de,z),oe.mime=z.mime,oe.stream=ue.stream,oe.successStatuses=[200],ae.next=11,this.request(oe);case 11:return re=ae.sent,ue.stream=null,oe.stream=null,ae.abrupt("return",{name:de,etag:re.res.headers.etag,res:re.res});case 15:case"end":return ae.stop()}},pe,this)})},{"./callback":7,"babel-runtime/regenerator":33,"copy-to":43}],9:[function(Se,je,Me){(function(Ce){"use strict";function xe(fe){return fe&&fe.__esModule?fe:{default:fe}}var be=Se("babel-runtime/core-js/json/stringify"),ye=xe(be),we=Se("babel-runtime/core-js/object/keys"),pe=xe(we),de=Se("./../../shims/crypto/crypto.js"),ge=Se("is-type-of");Me.buildCanonicalizedResource=function(fe,ue){var ee=""+fe,z="?";if(ge.string(ue)&&ue.trim()!=="")ee+=z+ue;else if(ge.array(ue))ue.sort(),ee+=z+ue.join("&");else if(ue){var oe=function(ae,le){return ae[0]>le[0]?1:ae[0]<le[0]?-1:0},re=function(ae){ee+=z+ae,ue[ae]&&(ee+="="+ue[ae]),z="&"};(0,pe.default)(ue).sort(oe).forEach(re)}return ee},Me.buildCanonicalString=function(fe,ue,ee,z){ee=ee||{};var oe=ee.headers||{},re=[],ae={},le=[fe.toUpperCase(),oe["Content-Md5"]||"",oe["Content-Type"]||oe["Content-Type".toLowerCase()],z||oe["x-oss-date"]];return(0,pe.default)(oe).forEach(function(me){var ve=me.toLowerCase();ve.indexOf("x-oss-")===0&&(ae[ve]=String(oe[me]).trim())}),(0,pe.default)(ae).sort().forEach(function(me){re.push(me+":"+ae[me])}),le=le.concat(re),le.push(this.buildCanonicalizedResource(ue,ee.parameters)),le.join(`
|
|
|
`)},Me.computeSignature=function(fe,ue){return de.createHmac("sha1",fe).update(new Ce(ue,"utf8")).digest("base64")},Me.authorization=function(fe,ue,ee){return"OSS "+fe+":"+this.computeSignature(ue,ee)},Me._signatureForURL=function(fe,ue,ee,z){var oe={},re={};if(ue.process&&(re["x-oss-process"]=ue.process),ue.response&&(0,pe.default)(ue.response).forEach(function(ve){var Pe="response-"+ve.toLowerCase();re[Pe]=ue.response[ve]}),(0,pe.default)(ue).forEach(function(ve){var Pe=ve.toLowerCase(),Ae=ue[ve];Pe.indexOf("x-oss-")===0?oe[Pe]=Ae:Pe.indexOf("content-md5")===0||Pe.indexOf("content-type")===0?oe[ve]=Ae:Pe!=="expires"&&Pe!=="response"&&Pe!=="process"&&Pe!=="method"&&(re[Pe]=Ae)}),Object.prototype.hasOwnProperty.call(ue,"security-token")&&(re["security-token"]=ue["security-token"]),Object.prototype.hasOwnProperty.call(ue,"callback")){var ae={callbackUrl:encodeURI(ue.callback.url),callbackBody:ue.callback.body};if(ue.callback.host&&(ae.callbackHost=ue.callback.host),ue.callback.contentType&&(ae.callbackBodyType=ue.callback.contentType),re.callback=new Ce((0,ye.default)(ae)).toString("base64"),ue.callback.customValue){var le={};(0,pe.default)(ue.callback.customValue).forEach(function(ve){le["x:"+ve]=ue.callback.customValue[ve]}),re["callback-var"]=new Ce((0,ye.default)(le)).toString("base64")}}var me=this.buildCanonicalString(ue.method,ee,{headers:oe,parameters:re},z.toString());return{Signature:this.computeSignature(fe,me),subResource:re}}}).call(this,Se("buffer").Buffer)},{"./../../shims/crypto/crypto.js":237,"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38,"is-type-of":165}],10:[function(Se,je,Me){"use strict";var Ce=Se("babel-runtime/regenerator"),xe=function(de){return de&&de.__esModule?de:{default:de}}(Ce),be=Se("co"),ye=Se("co-priority-queue"),we=Se("any-promise"),pe=Me;pe._thunkPool=function(de,ge){function fe(re,ae){++z===re.length&&ae(oe)}function ue(re,ae){function le(){var Oe;return xe.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:Oe=void 0;case 1:if(ee.isCancel()){Ze.next=9;break}return Ze.next=4,Pe.next();case 4:return Oe=Ze.sent,Ze.next=7,Oe();case 7:Ze.next=1;break;case 9:Ae+=1,Ae===re&&(Pe.fns=[],Pe.buffer=[],ae(oe));case 11:case"end":return Ze.stop()}},ve,this)}function me(Oe){console.error(Oe.stack)}for(var ve=xe.default.mark(le),Pe=new ye,Ae=0,De=0;De<re;De++)be(le).catch(me);return function(Oe,Ze){return function(qe){Pe.push(xe.default.mark(function Xe(){return xe.default.wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:return mt.prev=0,mt.t0=qe,mt.next=4,Oe;case 4:mt.t1=mt.sent,(0,mt.t0)(null,mt.t1),mt.next=11;break;case 8:mt.prev=8,mt.t2=mt.catch(0),qe(mt.t2);case 11:case"end":return mt.stop()}},Xe,this,[[0,8]])}),Ze)}}}var ee=this,z=0,oe=[];return new we(function(re){function ae(Ae){return xe.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return De.next=2,ve(de[Ae]);case 2:fe(de,re);case 3:case"end":return De.stop()}},me,this)}function le(Ae){oe.push(Ae),fe(de,re)}for(var me=xe.default.mark(ae),ve=new ue(ge,re),Pe=0;Pe<de.length;Pe++)be(ae(Pe)).catch(le)})},pe.cancel=function(){this.options.cancelFlag=!0},pe.isCancel=function(){return this.options.cancelFlag},pe.resetCancelFlag=function(){this.options.cancelFlag=!1}},{"any-promise":13,"babel-runtime/regenerator":33,co:41,"co-priority-queue":40}],11:[function(Se,je,Me){"use strict";Me._isIP=function(Ce){var xe=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,be=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return xe.test(Ce)||be.test(Ce)}},{}],12:[function(Se,je,Me){function Ce(){}je.exports=Ce,je.exports.HttpsAgent=Ce},{}],13:[function(Se,je,Me){je.exports=Se("./register")().Promise},{"./register":15}],14:[function(Se,je,Me){"use strict";var Ce=null;je.exports=function(xe,be){return function(ye,we){ye=ye||null,we=we||{};var pe=we.global!==!1;if(Ce===null&&pe&&(Ce=xe["@@any-promise/REGISTRATION"]||null),Ce!==null&&ye!==null&&Ce.implementation!==ye)throw new Error('any-promise already defined as "'+Ce.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return Ce===null&&(Ce=ye!==null&&we.Promise!==void 0?{Promise:we.Promise,implementation:ye}:be(ye),pe&&(xe["@@any-promise/REGISTRATION"]=Ce)),Ce}}},{}],15:[function(Se,je,Me){"use strict";function Ce(){if(window.Promise===void 0)throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}je.exports=Se("./loader")(window,Ce)},{"./loader":14}],16:[function(Se,je,Me){je.exports={default:Se("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":44}],17:[function(Se,je,Me){je.exports={default:Se("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":45}],18:[function(Se,je,Me){je.exports={default:Se("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":46}],19:[function(Se,je,Me){je.exports={default:Se("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":47}],20:[function(Se,je,Me){je.exports={default:Se("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":48}],21:[function(Se,je,Me){je.exports={default:Se("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":49}],22:[function(Se,je,Me){je.exports={default:Se("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":50}],23:[function(Se,je,Me){je.exports={default:Se("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":51}],24:[function(Se,je,Me){je.exports={default:Se("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":52}],25:[function(Se,je,Me){je.exports={default:Se("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":53}],26:[function(Se,je,Me){je.exports={default:Se("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":54}],27:[function(Se,je,Me){je.exports={default:Se("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":56}],28:[function(Se,je,Me){je.exports={default:Se("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":55}],29:[function(Se,je,Me){je.exports={default:Se("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":57}],30:[function(Se,je,Me){"use strict";Me.__esModule=!0,Me.default=function(Ce,xe){if(!(Ce instanceof xe))throw new TypeError("Cannot call a class as a function")}},{}],31:[function(Se,je,Me){"use strict";Me.__esModule=!0;var Ce=Se("../core-js/object/define-property"),xe=function(be){return be&&be.__esModule?be:{default:be}}(Ce);Me.default=function(){function be(ye,we){for(var pe=0;pe<we.length;pe++){var de=we[pe];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),(0,xe.default)(ye,de.key,de)}}return function(ye,we,pe){return we&&be(ye.prototype,we),pe&&be(ye,pe),ye}}()},{"../core-js/object/define-property":20}],32:[function(Se,je,Me){"use strict";function Ce(de){return de&&de.__esModule?de:{default:de}}Me.__esModule=!0;var xe=Se("../core-js/symbol/iterator"),be=Ce(xe),ye=Se("../core-js/symbol"),we=Ce(ye),pe=typeof we.default=="function"&&typeof be.default=="symbol"?function(de){return typeof de}:function(de){return de&&typeof we.default=="function"&&de.constructor===we.default&&de!==we.default.prototype?"symbol":typeof de};Me.default=typeof we.default=="function"&&pe(be.default)==="symbol"?function(de){return de===void 0?"undefined":pe(de)}:function(de){return de&&typeof we.default=="function"&&de.constructor===we.default&&de!==we.default.prototype?"symbol":de===void 0?"undefined":pe(de)}},{"../core-js/symbol":27,"../core-js/symbol/iterator":29}],33:[function(Se,je,Me){je.exports=Se("regenerator-runtime")},{"regenerator-runtime":191}],34:[function(Se,je,Me){"use strict";function Ce(re){var ae=re.length;if(ae%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var le=re.indexOf("=");return le===-1&&(le=ae),[le,le===ae?0:4-le%4]}function xe(re){var ae=Ce(re),le=ae[0],me=ae[1];return 3*(le+me)/4-me}function be(re,ae,le){return 3*(ae+le)/4-le}function ye(re){for(var ae,le=Ce(re),me=le[0],ve=le[1],Pe=new ue(be(re,me,ve)),Ae=0,De=ve>0?me-4:me,Oe=0;Oe<De;Oe+=4)ae=fe[re.charCodeAt(Oe)]<<18|fe[re.charCodeAt(Oe+1)]<<12|fe[re.charCodeAt(Oe+2)]<<6|fe[re.charCodeAt(Oe+3)],Pe[Ae++]=ae>>16&255,Pe[Ae++]=ae>>8&255,Pe[Ae++]=255&ae;return ve===2&&(ae=fe[re.charCodeAt(Oe)]<<2|fe[re.charCodeAt(Oe+1)]>>4,Pe[Ae++]=255&ae),ve===1&&(ae=fe[re.charCodeAt(Oe)]<<10|fe[re.charCodeAt(Oe+1)]<<4|fe[re.charCodeAt(Oe+2)]>>2,Pe[Ae++]=ae>>8&255,Pe[Ae++]=255&ae),Pe}function we(re){return ge[re>>18&63]+ge[re>>12&63]+ge[re>>6&63]+ge[63&re]}function pe(re,ae,le){for(var me,ve=[],Pe=ae;Pe<le;Pe+=3)me=(re[Pe]<<16&16711680)+(re[Pe+1]<<8&65280)+(255&re[Pe+2]),ve.push(we(me));return ve.join("")}function de(re){for(var ae,le=re.length,me=le%3,ve=[],Pe=0,Ae=le-me;Pe<Ae;Pe+=16383)ve.push(pe(re,Pe,Pe+16383>Ae?Ae:Pe+16383));return me===1?(ae=re[le-1],ve.push(ge[ae>>2]+ge[ae<<4&63]+"==")):me===2&&(ae=(re[le-2]<<8)+re[le-1],ve.push(ge[ae>>10]+ge[ae>>4&63]+ge[ae<<2&63]+"=")),ve.join("")}Me.byteLength=xe,Me.toByteArray=ye,Me.fromByteArray=de;for(var ge=[],fe=[],ue=typeof Uint8Array!="undefined"?Uint8Array:Array,ee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",z=0,oe=ee.length;z<oe;++z)ge[z]=ee[z],fe[ee.charCodeAt(z)]=z;fe[45]=62,fe[95]=63},{}],35:[function(Se,je,Me){(function(Ce,xe,be){je!==void 0&&je.exports?je.exports=be():typeof Le=="function"&&Le.amd?Le("bowser",be):Ce.bowser=be()})(this,0,function(){function Ce(fe){function ue(rt){var ct=fe.match(rt);return ct&&ct.length>1&&ct[1]||""}function ee(rt){var ct=fe.match(rt);return ct&&ct.length>1&&ct[2]||""}var z,oe=ue(/(ipod|iphone|ipad)/i).toLowerCase(),re=/like android/i.test(fe),ae=!re&&/android/i.test(fe),le=/nexus\s*[0-6]\s*/i.test(fe),me=!le&&/nexus\s*[0-9]+/i.test(fe),ve=/CrOS/.test(fe),Pe=/silk/i.test(fe),Ae=/sailfish/i.test(fe),De=/tizen/i.test(fe),Oe=/(web|hpw)os/i.test(fe),Ze=/windows phone/i.test(fe),qe=(/SamsungBrowser/i.test(fe),!Ze&&/windows/i.test(fe)),Xe=!oe&&!Pe&&/macintosh/i.test(fe),mt=!ae&&!Ae&&!De&&!Oe&&/linux/i.test(fe),pt=ee(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),Mt=ue(/version\/(\d+(\.\d+)?)/i),at=/tablet/i.test(fe)&&!/tablet pc/i.test(fe),_t=!at&&/[^-]mobi/i.test(fe),dt=/xbox/i.test(fe);/opera/i.test(fe)?z={name:"Opera",opera:de,version:Mt||ue(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(fe)?z={name:"Opera",opera:de,version:ue(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||Mt}:/SamsungBrowser/i.test(fe)?z={name:"Samsung Internet for Android",samsungBrowser:de,version:Mt||ue(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(fe)?z={name:"Opera Coast",coast:de,version:Mt||ue(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(fe)?z={name:"Yandex Browser",yandexbrowser:de,version:Mt||ue(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(fe)?z={name:"UC Browser",ucbrowser:de,version:ue(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(fe)?z={name:"Maxthon",maxthon:de,version:ue(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(fe)?z={name:"Epiphany",epiphany:de,version:ue(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(fe)?z={name:"Puffin",puffin:de,version:ue(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(fe)?z={name:"Sleipnir",sleipnir:de,version:ue(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(fe)?z={name:"K-Meleon",kMeleon:de,version:ue(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:Ze?(z={name:"Windows Phone",osname:"Windows Phone",windowsphone:de},pt?(z.msedge=de,z.version=pt):(z.msie=de,z.version=ue(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(fe)?z={name:"Internet Explorer",msie:de,version:ue(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:ve?z={name:"Chrome",osname:"Chrome OS",chromeos:de,chromeBook:de,chrome:de,version:ue(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(fe)?z={name:"Microsoft Edge",msedge:de,version:pt}:/vivaldi/i.test(fe)?z={name:"Vivaldi",vivaldi:de,version:ue(/vivaldi\/(\d+(\.\d+)?)/i)||Mt}:Ae?z={name:"Sailfish",osname:"Sailfish OS",sailfish:de,version:ue(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(fe)?z={name:"SeaMonkey",seamonkey:de,version:ue(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(fe)?(z={name:"Firefox",firefox:de,version:ue(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(fe)&&(z.firefoxos=de,z.osname="Firefox OS")):Pe?z={name:"Amazon Silk",silk:de,version:ue(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(fe)?z={name:"PhantomJS",phantom:de,version:ue(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(fe)?z={name:"SlimerJS",slimer:de,version:ue(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(fe)||/rim\stablet/i.test(fe)?z={name:"BlackBerry",osname:"BlackBerry OS",blackberry:de,version:Mt||ue(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:Oe?(z={name:"WebOS",osname:"WebOS",webos:de,version:Mt||ue(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(fe)&&(z.touchpad=de)):/bada/i.test(fe)?z={name:"Bada",osname:"Bada",bada:de,version:ue(/dolfin\/(\d+(\.\d+)?)/i)}:De?z={name:"Tizen",osname:"Tizen",tizen:de,version:ue(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||Mt}:/qupzilla/i.test(fe)?z={name:"QupZilla",qupzilla:de,version:ue(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||Mt}:/chromium/i.test(fe)?z={name:"Chromium",chromium:de,version:ue(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||Mt}:/chrome|crios|crmo/i.test(fe)?z={name:"Chrome",chrome:de,version:ue(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:ae?z={name:"Android",version:Mt}:/safari|applewebkit/i.test(fe)?(z={name:"Safari",safari:de},Mt&&(z.version=Mt)):oe?(z={name:oe=="iphone"?"iPhone":oe=="ipad"?"iPad":"iPod"},Mt&&(z.version=Mt)):z=/googlebot/i.test(fe)?{name:"Googlebot",googlebot:de,version:ue(/googlebot\/(\d+(\.\d+))/i)||Mt}:{name:ue(/^(.*)\/(.*) /),version:ee(/^(.*)\/(.*) /)},!z.msedge&&/(apple)?webkit/i.test(fe)?(/(apple)?webkit\/537\.36/i.test(fe)?(z.name=z.name||"Blink",z.blink=de):(z.name=z.name||"Webkit",z.webkit=de),!z.version&&Mt&&(z.version=Mt)):!z.opera&&/gecko\//i.test(fe)&&(z.name=z.name||"Gecko",z.gecko=de,z.version=z.version||ue(/gecko\/(\d+(\.\d+)?)/i)),z.windowsphone||!ae&&!z.silk?!z.windowsphone&&oe?(z[oe]=de,z.ios=de,z.osname="iOS"):Xe?(z.mac=de,z.osname="macOS"):dt?(z.xbox=de,z.osname="Xbox"):qe?(z.windows=de,z.osname="Windows"):mt&&(z.linux=de,z.osname="Linux"):(z.android=de,z.osname="Android");var Rt="";z.windows?Rt=function(rt){switch(rt){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}(ue(/Windows ((NT|XP)( \d\d?.\d)?)/i)):z.windowsphone?Rt=ue(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):z.mac?(Rt=ue(/Mac OS X (\d+([_\.\s]\d+)*)/i),Rt=Rt.replace(/[_\s]/g,".")):oe?(Rt=ue(/os (\d+([_\s]\d+)*) like mac os x/i),Rt=Rt.replace(/[_\s]/g,".")):ae?Rt=ue(/android[ \/-](\d+(\.\d+)*)/i):z.webos?Rt=ue(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):z.blackberry?Rt=ue(/rim\stablet\sos\s(\d+(\.\d+)*)/i):z.bada?Rt=ue(/bada\/(\d+(\.\d+)*)/i):z.tizen&&(Rt=ue(/tizen[\/\s](\d+(\.\d+)*)/i)),Rt&&(z.osversion=Rt);var ut=!z.windows&&Rt.split(".")[0];return at||me||oe=="ipad"||ae&&(ut==3||ut>=4&&!_t)||z.silk?z.tablet=de:(_t||oe=="iphone"||oe=="ipod"||ae||le||z.blackberry||z.webos||z.bada)&&(z.mobile=de),z.msedge||z.msie&&z.version>=10||z.yandexbrowser&&z.version>=15||z.vivaldi&&z.version>=1||z.chrome&&z.version>=20||z.samsungBrowser&&z.version>=4||z.firefox&&z.version>=20||z.safari&&z.version>=6||z.opera&&z.version>=10||z.ios&&z.osversion&&z.osversion.split(".")[0]>=6||z.blackberry&&z.version>=10.1||z.chromium&&z.version>=20?z.a=de:z.msie&&z.version<10||z.chrome&&z.version<20||z.firefox&&z.version<20||z.safari&&z.version<6||z.opera&&z.version<10||z.ios&&z.osversion&&z.osversion.split(".")[0]<6||z.chromium&&z.version<20?z.c=de:z.x=de,z}function xe(fe){return fe.split(".").length}function be(fe,ue){var ee,z=[];if(Array.prototype.map)return Array.prototype.map.call(fe,ue);for(ee=0;ee<fe.length;ee++)z.push(ue(fe[ee]));return z}function ye(fe){for(var ue=Math.max(xe(fe[0]),xe(fe[1])),ee=be(fe,function(z){var oe=ue-xe(z);return z+=new Array(oe+1).join(".0"),be(z.split("."),function(re){return new Array(20-re.length).join("0")+re}).reverse()});--ue>=0;){if(ee[0][ue]>ee[1][ue])return 1;if(ee[0][ue]!==ee[1][ue])return-1;if(ue===0)return 0}}function we(fe,ue,ee){var z=ge;typeof ue=="string"&&(ee=ue,ue=void 0),ue===void 0&&(ue=!1),ee&&(z=Ce(ee));var oe=""+z.version;for(var re in fe)if(fe.hasOwnProperty(re)&&z[re]){if(typeof fe[re]!="string")throw new Error("Browser version in the minVersion map should be a string: "+re+": "+String(fe));return ye([oe,fe[re]])<0}return ue}function pe(fe,ue,ee){return!we(fe,ue,ee)}var de=!0,ge=Ce(typeof navigator!="undefined"&&navigator.userAgent||"");return ge.test=function(fe){for(var ue=0;ue<fe.length;++ue){var ee=fe[ue];if(typeof ee=="string"&&ee in ge)return!0}return!1},ge.isUnsupportedBrowser=we,ge.compareVersions=ye,ge.check=pe,ge._detect=Ce,ge.detect=Ce,ge})},{}],36:[function(Se,je,Me){},{}],37:[function(Se,je,Me){function Ce(ge){if(ge&&!pe(ge))throw new Error("Unknown encoding: "+ge)}function xe(ge){return ge.toString(this.encoding)}function be(ge){this.charReceived=ge.length%2,this.charLength=this.charReceived?2:0}function ye(ge){this.charReceived=ge.length%3,this.charLength=this.charReceived?3:0}var we=Se("buffer").Buffer,pe=we.isEncoding||function(ge){switch(ge&&ge.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},de=Me.StringDecoder=function(ge){switch(this.encoding=(ge||"utf8").toLowerCase().replace(/[-_]/,""),Ce(ge),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=be;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=ye;break;default:return void(this.write=xe)}this.charBuffer=new we(6),this.charReceived=0,this.charLength=0};de.prototype.write=function(ge){for(var fe="";this.charLength;){var ue=ge.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:ge.length;if(ge.copy(this.charBuffer,this.charReceived,0,ue),this.charReceived+=ue,this.charReceived<this.charLength)return"";ge=ge.slice(ue,ge.length),fe=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var z=fe.charCodeAt(fe.length-1);if(!(z>=55296&&z<=56319)){if(this.charReceived=this.charLength=0,ge.length===0)return fe;break}this.charLength+=this.surrogateSize,fe=""}this.detectIncompleteChar(ge);var ee=ge.length;this.charLength&&(ge.copy(this.charBuffer,0,ge.length-this.charReceived,ee),ee-=this.charReceived),fe+=ge.toString(this.encoding,0,ee);var ee=fe.length-1,z=fe.charCodeAt(ee);if(z>=55296&&z<=56319){var oe=this.surrogateSize;return this.charLength+=oe,this.charReceived+=oe,this.charBuffer.copy(this.charBuffer,oe,0,oe),ge.copy(this.charBuffer,0,0,oe),fe.substring(0,ee)}return fe},de.prototype.detectIncompleteChar=function(ge){for(var fe=ge.length>=3?3:ge.length;fe>0;fe--){var ue=ge[ge.length-fe];if(fe==1&&ue>>5==6){this.charLength=2;break}if(fe<=2&&ue>>4==14){this.charLength=3;break}if(fe<=3&&ue>>3==30){this.charLength=4;break}}this.charReceived=fe},de.prototype.end=function(ge){var fe="";if(ge&&ge.length&&(fe=this.write(ge)),this.charReceived){var ue=this.charReceived,ee=this.charBuffer,z=this.encoding;fe+=ee.slice(0,ue).toString(z)}return fe}},{buffer:38}],38:[function(Se,je,Me){(function(Ce){"use strict";function xe(){return ye.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function be(Re,ze){if(xe()<ze)throw new RangeError("Invalid typed array length");return ye.TYPED_ARRAY_SUPPORT?(Re=new Uint8Array(ze),Re.__proto__=ye.prototype):(Re===null&&(Re=new ye(ze)),Re.length=ze),Re}function ye(Re,ze,it){if(!(ye.TYPED_ARRAY_SUPPORT||this instanceof ye))return new ye(Re,ze,it);if(typeof Re=="number"){if(typeof ze=="string")throw new Error("If encoding is specified then the first argument must be a string");return ge(this,Re)}return we(this,Re,ze,it)}function we(Re,ze,it,Ke){if(typeof ze=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&ze instanceof ArrayBuffer?ee(Re,ze,it,Ke):typeof ze=="string"?fe(Re,ze,it):z(Re,ze)}function pe(Re){if(typeof Re!="number")throw new TypeError('"size" argument must be a number');if(Re<0)throw new RangeError('"size" argument must not be negative')}function de(Re,ze,it,Ke){return pe(ze),ze<=0?be(Re,ze):it!==void 0?typeof Ke=="string"?be(Re,ze).fill(it,Ke):be(Re,ze).fill(it):be(Re,ze)}function ge(Re,ze){if(pe(ze),Re=be(Re,ze<0?0:0|oe(ze)),!ye.TYPED_ARRAY_SUPPORT)for(var it=0;it<ze;++it)Re[it]=0;return Re}function fe(Re,ze,it){if(typeof it=="string"&&it!==""||(it="utf8"),!ye.isEncoding(it))throw new TypeError('"encoding" must be a valid string encoding');var Ke=0|ae(ze,it);Re=be(Re,Ke);var We=Re.write(ze,it);return We!==Ke&&(Re=Re.slice(0,We)),Re}function ue(Re,ze){var it=ze.length<0?0:0|oe(ze.length);Re=be(Re,it);for(var Ke=0;Ke<it;Ke+=1)Re[Ke]=255&ze[Ke];return Re}function ee(Re,ze,it,Ke){if(ze.byteLength,it<0||ze.byteLength<it)throw new RangeError("'offset' is out of bounds");if(ze.byteLength<it+(Ke||0))throw new RangeError("'length' is out of bounds");return ze=it===void 0&&Ke===void 0?new Uint8Array(ze):Ke===void 0?new Uint8Array(ze,it):new Uint8Array(ze,it,Ke),ye.TYPED_ARRAY_SUPPORT?(Re=ze,Re.__proto__=ye.prototype):Re=ue(Re,ze),Re}function z(Re,ze){if(ye.isBuffer(ze)){var it=0|oe(ze.length);return Re=be(Re,it),Re.length===0||ze.copy(Re,0,0,it),Re}if(ze){if(typeof ArrayBuffer!="undefined"&&ze.buffer instanceof ArrayBuffer||"length"in ze)return typeof ze.length!="number"||Ue(ze.length)?be(Re,0):ue(Re,ze);if(ze.type==="Buffer"&&ht(ze.data))return ue(Re,ze.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function oe(Re){if(Re>=xe())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+xe().toString(16)+" bytes");return 0|Re}function re(Re){return+Re!=Re&&(Re=0),ye.alloc(+Re)}function ae(Re,ze){if(ye.isBuffer(Re))return Re.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(Re)||Re instanceof ArrayBuffer))return Re.byteLength;typeof Re!="string"&&(Re=""+Re);var it=Re.length;if(it===0)return 0;for(var Ke=!1;;)switch(ze){case"ascii":case"latin1":case"binary":return it;case"utf8":case"utf-8":case void 0:return Dt(Re).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*it;case"hex":return it>>>1;case"base64":return Jt(Re).length;default:if(Ke)return Dt(Re).length;ze=(""+ze).toLowerCase(),Ke=!0}}function le(Re,ze,it){var Ke=!1;if((ze===void 0||ze<0)&&(ze=0),ze>this.length||((it===void 0||it>this.length)&&(it=this.length),it<=0)||(it>>>=0,ze>>>=0,it<=ze))return"";for(Re||(Re="utf8");;)switch(Re){case"hex":return dt(this,ze,it);case"utf8":case"utf-8":return pt(this,ze,it);case"ascii":return at(this,ze,it);case"latin1":case"binary":return _t(this,ze,it);case"base64":return mt(this,ze,it);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Rt(this,ze,it);default:if(Ke)throw new TypeError("Unknown encoding: "+Re);Re=(Re+"").toLowerCase(),Ke=!0}}function me(Re,ze,it){var Ke=Re[ze];Re[ze]=Re[it],Re[it]=Ke}function ve(Re,ze,it,Ke,We){if(Re.length===0)return-1;if(typeof it=="string"?(Ke=it,it=0):it>2147483647?it=2147483647:it<-2147483648&&(it=-2147483648),it=+it,isNaN(it)&&(it=We?0:Re.length-1),it<0&&(it=Re.length+it),it>=Re.length){if(We)return-1;it=Re.length-1}else if(it<0){if(!We)return-1;it=0}if(typeof ze=="string"&&(ze=ye.from(ze,Ke)),ye.isBuffer(ze))return ze.length===0?-1:Pe(Re,ze,it,Ke,We);if(typeof ze=="number")return ze&=255,ye.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?We?Uint8Array.prototype.indexOf.call(Re,ze,it):Uint8Array.prototype.lastIndexOf.call(Re,ze,it):Pe(Re,[ze],it,Ke,We);throw new TypeError("val must be string, number or Buffer")}function Pe(Re,ze,it,Ke,We){function vt(un,Jn){return kt===1?un[Jn]:un.readUInt16BE(Jn*kt)}var kt=1,hn=Re.length,en=ze.length;if(Ke!==void 0&&((Ke=String(Ke).toLowerCase())==="ucs2"||Ke==="ucs-2"||Ke==="utf16le"||Ke==="utf-16le")){if(Re.length<2||ze.length<2)return-1;kt=2,hn/=2,en/=2,it/=2}var Gt;if(We){var gn=-1;for(Gt=it;Gt<hn;Gt++)if(vt(Re,Gt)===vt(ze,gn===-1?0:Gt-gn)){if(gn===-1&&(gn=Gt),Gt-gn+1===en)return gn*kt}else gn!==-1&&(Gt-=Gt-gn),gn=-1}else for(it+en>hn&&(it=hn-en),Gt=it;Gt>=0;Gt--){for(var bn=!0,yn=0;yn<en;yn++)if(vt(Re,Gt+yn)!==vt(ze,yn)){bn=!1;break}if(bn)return Gt}return-1}function Ae(Re,ze,it,Ke){it=Number(it)||0;var We=Re.length-it;Ke?(Ke=Number(Ke))>We&&(Ke=We):Ke=We;var vt=ze.length;if(vt%2!=0)throw new TypeError("Invalid hex string");Ke>vt/2&&(Ke=vt/2);for(var kt=0;kt<Ke;++kt){var hn=parseInt(ze.substr(2*kt,2),16);if(isNaN(hn))return kt;Re[it+kt]=hn}return kt}function De(Re,ze,it,Ke){return lt(Dt(ze,Re.length-it),Re,it,Ke)}function Oe(Re,ze,it,Ke){return lt(Qt(ze),Re,it,Ke)}function Ze(Re,ze,it,Ke){return Oe(Re,ze,it,Ke)}function qe(Re,ze,it,Ke){return lt(Jt(ze),Re,it,Ke)}function Xe(Re,ze,it,Ke){return lt(Yt(ze,Re.length-it),Re,it,Ke)}function mt(Re,ze,it){return ze===0&&it===Re.length?Be.fromByteArray(Re):Be.fromByteArray(Re.slice(ze,it))}function pt(Re,ze,it){it=Math.min(Re.length,it);for(var Ke=[],We=ze;We<it;){var vt=Re[We],kt=null,hn=vt>239?4:vt>223?3:vt>191?2:1;if(We+hn<=it){var en,Gt,gn,bn;switch(hn){case 1:vt<128&&(kt=vt);break;case 2:en=Re[We+1],(192&en)==128&&(bn=(31&vt)<<6|63&en)>127&&(kt=bn);break;case 3:en=Re[We+1],Gt=Re[We+2],(192&en)==128&&(192&Gt)==128&&(bn=(15&vt)<<12|(63&en)<<6|63&Gt)>2047&&(bn<55296||bn>57343)&&(kt=bn);break;case 4:en=Re[We+1],Gt=Re[We+2],gn=Re[We+3],(192&en)==128&&(192&Gt)==128&&(192&gn)==128&&(bn=(15&vt)<<18|(63&en)<<12|(63&Gt)<<6|63&gn)>65535&&bn<1114112&&(kt=bn)}}kt===null?(kt=65533,hn=1):kt>65535&&(kt-=65536,Ke.push(kt>>>10&1023|55296),kt=56320|1023&kt),Ke.push(kt),We+=hn}return Mt(Ke)}function Mt(Re){var ze=Re.length;if(ze<=et)return String.fromCharCode.apply(String,Re);for(var it="",Ke=0;Ke<ze;)it+=String.fromCharCode.apply(String,Re.slice(Ke,Ke+=et));return it}function at(Re,ze,it){var Ke="";it=Math.min(Re.length,it);for(var We=ze;We<it;++We)Ke+=String.fromCharCode(127&Re[We]);return Ke}function _t(Re,ze,it){var Ke="";it=Math.min(Re.length,it);for(var We=ze;We<it;++We)Ke+=String.fromCharCode(Re[We]);return Ke}function dt(Re,ze,it){var Ke=Re.length;(!ze||ze<0)&&(ze=0),(!it||it<0||it>Ke)&&(it=Ke);for(var We="",vt=ze;vt<it;++vt)We+=Ft(Re[vt]);return We}function Rt(Re,ze,it){for(var Ke=Re.slice(ze,it),We="",vt=0;vt<Ke.length;vt+=2)We+=String.fromCharCode(Ke[vt]+256*Ke[vt+1]);return We}function ut(Re,ze,it){if(Re%1!=0||Re<0)throw new RangeError("offset is not uint");if(Re+ze>it)throw new RangeError("Trying to access beyond buffer length")}function rt(Re,ze,it,Ke,We,vt){if(!ye.isBuffer(Re))throw new TypeError('"buffer" argument must be a Buffer instance');if(ze>We||ze<vt)throw new RangeError('"value" argument is out of bounds');if(it+Ke>Re.length)throw new RangeError("Index out of range")}function ct(Re,ze,it,Ke){ze<0&&(ze=65535+ze+1);for(var We=0,vt=Math.min(Re.length-it,2);We<vt;++We)Re[it+We]=(ze&255<<8*(Ke?We:1-We))>>>8*(Ke?We:1-We)}function yt(Re,ze,it,Ke){ze<0&&(ze=4294967295+ze+1);for(var We=0,vt=Math.min(Re.length-it,4);We<vt;++We)Re[it+We]=ze>>>8*(Ke?We:3-We)&255}function wt(Re,ze,it,Ke,We,vt){if(it+Ke>Re.length)throw new RangeError("Index out of range");if(it<0)throw new RangeError("Index out of range")}function xt(Re,ze,it,Ke,We){return We||wt(Re,ze,it,4,34028234663852886e22,-34028234663852886e22),tt.write(Re,ze,it,Ke,23,4),it+4}function Ut(Re,ze,it,Ke,We){return We||wt(Re,ze,it,8,17976931348623157e292,-17976931348623157e292),tt.write(Re,ze,it,Ke,52,8),it+8}function zt(Re){if(Re=dn(Re).replace(Ve,""),Re.length<2)return"";for(;Re.length%4!=0;)Re+="=";return Re}function dn(Re){return Re.trim?Re.trim():Re.replace(/^\s+|\s+$/g,"")}function Ft(Re){return Re<16?"0"+Re.toString(16):Re.toString(16)}function Dt(Re,ze){ze=ze||1/0;for(var it,Ke=Re.length,We=null,vt=[],kt=0;kt<Ke;++kt){if((it=Re.charCodeAt(kt))>55295&&it<57344){if(!We){if(it>56319){(ze-=3)>-1&&vt.push(239,191,189);continue}if(kt+1===Ke){(ze-=3)>-1&&vt.push(239,191,189);continue}We=it;continue}if(it<56320){(ze-=3)>-1&&vt.push(239,191,189),We=it;continue}it=65536+(We-55296<<10|it-56320)}else We&&(ze-=3)>-1&&vt.push(239,191,189);if(We=null,it<128){if((ze-=1)<0)break;vt.push(it)}else if(it<2048){if((ze-=2)<0)break;vt.push(it>>6|192,63&it|128)}else if(it<65536){if((ze-=3)<0)break;vt.push(it>>12|224,it>>6&63|128,63&it|128)}else{if(!(it<1114112))throw new Error("Invalid code point");if((ze-=4)<0)break;vt.push(it>>18|240,it>>12&63|128,it>>6&63|128,63&it|128)}}return vt}function Qt(Re){for(var ze=[],it=0;it<Re.length;++it)ze.push(255&Re.charCodeAt(it));return ze}function Yt(Re,ze){for(var it,Ke,We,vt=[],kt=0;kt<Re.length&&!((ze-=2)<0);++kt)it=Re.charCodeAt(kt),Ke=it>>8,We=it%256,vt.push(We),vt.push(Ke);return vt}function Jt(Re){return Be.toByteArray(zt(Re))}function lt(Re,ze,it,Ke){for(var We=0;We<Ke&&!(We+it>=ze.length||We>=Re.length);++We)ze[We+it]=Re[We];return We}function Ue(Re){return Re!==Re}var Be=Se("base64-js"),tt=Se("ieee754"),ht=Se("isarray");Me.Buffer=ye,Me.SlowBuffer=re,Me.INSPECT_MAX_BYTES=50,ye.TYPED_ARRAY_SUPPORT=Ce.TYPED_ARRAY_SUPPORT!==void 0?Ce.TYPED_ARRAY_SUPPORT:function(){try{var Re=new Uint8Array(1);return Re.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},Re.foo()===42&&typeof Re.subarray=="function"&&Re.subarray(1,1).byteLength===0}catch(ze){return!1}}(),Me.kMaxLength=xe(),ye.poolSize=8192,ye._augment=function(Re){return Re.__proto__=ye.prototype,Re},ye.from=function(Re,ze,it){return we(null,Re,ze,it)},ye.TYPED_ARRAY_SUPPORT&&(ye.prototype.__proto__=Uint8Array.prototype,ye.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&ye[Symbol.species]===ye&&Object.defineProperty(ye,Symbol.species,{value:null,configurable:!0})),ye.alloc=function(Re,ze,it){return de(null,Re,ze,it)},ye.allocUnsafe=function(Re){return ge(null,Re)},ye.allocUnsafeSlow=function(Re){return ge(null,Re)},ye.isBuffer=function(Re){return!(Re==null||!Re._isBuffer)},ye.compare=function(Re,ze){if(!ye.isBuffer(Re)||!ye.isBuffer(ze))throw new TypeError("Arguments must be Buffers");if(Re===ze)return 0;for(var it=Re.length,Ke=ze.length,We=0,vt=Math.min(it,Ke);We<vt;++We)if(Re[We]!==ze[We]){it=Re[We],Ke=ze[We];break}return it<Ke?-1:Ke<it?1:0},ye.isEncoding=function(Re){switch(String(Re).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},ye.concat=function(Re,ze){if(!ht(Re))throw new TypeError('"list" argument must be an Array of Buffers');if(Re.length===0)return ye.alloc(0);var it;if(ze===void 0)for(ze=0,it=0;it<Re.length;++it)ze+=Re[it].length;var Ke=ye.allocUnsafe(ze),We=0;for(it=0;it<Re.length;++it){var vt=Re[it];if(!ye.isBuffer(vt))throw new TypeError('"list" argument must be an Array of Buffers');vt.copy(Ke,We),We+=vt.length}return Ke},ye.byteLength=ae,ye.prototype._isBuffer=!0,ye.prototype.swap16=function(){var Re=this.length;if(Re%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ze=0;ze<Re;ze+=2)me(this,ze,ze+1);return this},ye.prototype.swap32=function(){var Re=this.length;if(Re%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var ze=0;ze<Re;ze+=4)me(this,ze,ze+3),me(this,ze+1,ze+2);return this},ye.prototype.swap64=function(){var Re=this.length;if(Re%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var ze=0;ze<Re;ze+=8)me(this,ze,ze+7),me(this,ze+1,ze+6),me(this,ze+2,ze+5),me(this,ze+3,ze+4);return this},ye.prototype.toString=function(){var Re=0|this.length;return Re===0?"":arguments.length===0?pt(this,0,Re):le.apply(this,arguments)},ye.prototype.equals=function(Re){if(!ye.isBuffer(Re))throw new TypeError("Argument must be a Buffer");return this===Re||ye.compare(this,Re)===0},ye.prototype.inspect=function(){var Re="",ze=Me.INSPECT_MAX_BYTES;return this.length>0&&(Re=this.toString("hex",0,ze).match(/.{2}/g).join(" "),this.length>ze&&(Re+=" ... ")),"<Buffer "+Re+">"},ye.prototype.compare=function(Re,ze,it,Ke,We){if(!ye.isBuffer(Re))throw new TypeError("Argument must be a Buffer");if(ze===void 0&&(ze=0),it===void 0&&(it=Re?Re.length:0),Ke===void 0&&(Ke=0),We===void 0&&(We=this.length),ze<0||it>Re.length||Ke<0||We>this.length)throw new RangeError("out of range index");if(Ke>=We&&ze>=it)return 0;if(Ke>=We)return-1;if(ze>=it)return 1;if(ze>>>=0,it>>>=0,Ke>>>=0,We>>>=0,this===Re)return 0;for(var vt=We-Ke,kt=it-ze,hn=Math.min(vt,kt),en=this.slice(Ke,We),Gt=Re.slice(ze,it),gn=0;gn<hn;++gn)if(en[gn]!==Gt[gn]){vt=en[gn],kt=Gt[gn];break}return vt<kt?-1:kt<vt?1:0},ye.prototype.includes=function(Re,ze,it){return this.indexOf(Re,ze,it)!==-1},ye.prototype.indexOf=function(Re,ze,it){return ve(this,Re,ze,it,!0)},ye.prototype.lastIndexOf=function(Re,ze,it){return ve(this,Re,ze,it,!1)},ye.prototype.write=function(Re,ze,it,Ke){if(ze===void 0)Ke="utf8",it=this.length,ze=0;else if(it===void 0&&typeof ze=="string")Ke=ze,it=this.length,ze=0;else{if(!isFinite(ze))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");ze|=0,isFinite(it)?(it|=0,Ke===void 0&&(Ke="utf8")):(Ke=it,it=void 0)}var We=this.length-ze;if((it===void 0||it>We)&&(it=We),Re.length>0&&(it<0||ze<0)||ze>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ke||(Ke="utf8");for(var vt=!1;;)switch(Ke){case"hex":return Ae(this,Re,ze,it);case"utf8":case"utf-8":return De(this,Re,ze,it);case"ascii":return Oe(this,Re,ze,it);case"latin1":case"binary":return Ze(this,Re,ze,it);case"base64":return qe(this,Re,ze,it);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Xe(this,Re,ze,it);default:if(vt)throw new TypeError("Unknown encoding: "+Ke);Ke=(""+Ke).toLowerCase(),vt=!0}},ye.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var et=4096;ye.prototype.slice=function(Re,ze){var it=this.length;Re=~~Re,ze=ze===void 0?it:~~ze,Re<0?(Re+=it)<0&&(Re=0):Re>it&&(Re=it),ze<0?(ze+=it)<0&&(ze=0):ze>it&&(ze=it),ze<Re&&(ze=Re);var Ke;if(ye.TYPED_ARRAY_SUPPORT)Ke=this.subarray(Re,ze),Ke.__proto__=ye.prototype;else{var We=ze-Re;Ke=new ye(We,void 0);for(var vt=0;vt<We;++vt)Ke[vt]=this[vt+Re]}return Ke},ye.prototype.readUIntLE=function(Re,ze,it){Re|=0,ze|=0,it||ut(Re,ze,this.length);for(var Ke=this[Re],We=1,vt=0;++vt<ze&&(We*=256);)Ke+=this[Re+vt]*We;return Ke},ye.prototype.readUIntBE=function(Re,ze,it){Re|=0,ze|=0,it||ut(Re,ze,this.length);for(var Ke=this[Re+--ze],We=1;ze>0&&(We*=256);)Ke+=this[Re+--ze]*We;return Ke},ye.prototype.readUInt8=function(Re,ze){return ze||ut(Re,1,this.length),this[Re]},ye.prototype.readUInt16LE=function(Re,ze){return ze||ut(Re,2,this.length),this[Re]|this[Re+1]<<8},ye.prototype.readUInt16BE=function(Re,ze){return ze||ut(Re,2,this.length),this[Re]<<8|this[Re+1]},ye.prototype.readUInt32LE=function(Re,ze){return ze||ut(Re,4,this.length),(this[Re]|this[Re+1]<<8|this[Re+2]<<16)+16777216*this[Re+3]},ye.prototype.readUInt32BE=function(Re,ze){return ze||ut(Re,4,this.length),16777216*this[Re]+(this[Re+1]<<16|this[Re+2]<<8|this[Re+3])},ye.prototype.readIntLE=function(Re,ze,it){Re|=0,ze|=0,it||ut(Re,ze,this.length);for(var Ke=this[Re],We=1,vt=0;++vt<ze&&(We*=256);)Ke+=this[Re+vt]*We;return We*=128,Ke>=We&&(Ke-=Math.pow(2,8*ze)),Ke},ye.prototype.readIntBE=function(Re,ze,it){Re|=0,ze|=0,it||ut(Re,ze,this.length);for(var Ke=ze,We=1,vt=this[Re+--Ke];Ke>0&&(We*=256);)vt+=this[Re+--Ke]*We;return We*=128,vt>=We&&(vt-=Math.pow(2,8*ze)),vt},ye.prototype.readInt8=function(Re,ze){return ze||ut(Re,1,this.length),128&this[Re]?-1*(255-this[Re]+1):this[Re]},ye.prototype.readInt16LE=function(Re,ze){ze||ut(Re,2,this.length);var it=this[Re]|this[Re+1]<<8;return 32768&it?4294901760|it:it},ye.prototype.readInt16BE=function(Re,ze){ze||ut(Re,2,this.length);var it=this[Re+1]|this[Re]<<8;return 32768&it?4294901760|it:it},ye.prototype.readInt32LE=function(Re,ze){return ze||ut(Re,4,this.length),this[Re]|this[Re+1]<<8|this[Re+2]<<16|this[Re+3]<<24},ye.prototype.readInt32BE=function(Re,ze){return ze||ut(Re,4,this.length),this[Re]<<24|this[Re+1]<<16|this[Re+2]<<8|this[Re+3]},ye.prototype.readFloatLE=function(Re,ze){return ze||ut(Re,4,this.length),tt.read(this,Re,!0,23,4)},ye.prototype.readFloatBE=function(Re,ze){return ze||ut(Re,4,this.length),tt.read(this,Re,!1,23,4)},ye.prototype.readDoubleLE=function(Re,ze){return ze||ut(Re,8,this.length),tt.read(this,Re,!0,52,8)},ye.prototype.readDoubleBE=function(Re,ze){return ze||ut(Re,8,this.length),tt.read(this,Re,!1,52,8)},ye.prototype.writeUIntLE=function(Re,ze,it,Ke){Re=+Re,ze|=0,it|=0,!Ke&&rt(this,Re,ze,it,Math.pow(2,8*it)-1,0);var We=1,vt=0;for(this[ze]=255ℜ++vt<it&&(We*=256);)this[ze+vt]=Re/We&255;return ze+it},ye.prototype.writeUIntBE=function(Re,ze,it,Ke){Re=+Re,ze|=0,it|=0,!Ke&&rt(this,Re,ze,it,Math.pow(2,8*it)-1,0);var We=it-1,vt=1;for(this[ze+We]=255ℜ--We>=0&&(vt*=256);)this[ze+We]=Re/vt&255;return ze+it},ye.prototype.writeUInt8=function(Re,ze,it){return Re=+Re,ze|=0,it||rt(this,Re,ze,1,255,0),ye.TYPED_ARRAY_SUPPORT||(Re=Math.floor(Re)),this[ze]=255&Re,ze+1},ye.prototype.writeUInt16LE=function(Re,ze,it){return Re=+Re,ze|=0,it||rt(this,Re,ze,2,65535,0),ye.TYPED_ARRAY_SUPPORT?(this[ze]=255&Re,this[ze+1]=Re>>>8):ct(this,Re,ze,!0),ze+2},ye.prototype.writeUInt16BE=function(Re,ze,it){return Re=+Re,ze|=0,it||rt(this,Re,ze,2,65535,0),ye.TYPED_ARRAY_SUPPORT?(this[ze]=Re>>>8,this[ze+1]=255&Re):ct(this,Re,ze,!1),ze+2},ye.prototype.writeUInt32LE=function(Re,ze,it){return Re=+Re,ze|=0,it||rt(this,Re,ze,4,4294967295,0),ye.TYPED_ARRAY_SUPPORT?(this[ze+3]=Re>>>24,this[ze+2]=Re>>>16,this[ze+1]=Re>>>8,this[ze]=255&Re):yt(this,Re,ze,!0),ze+4},ye.prototype.writeUInt32BE=function(Re,ze,it){return Re=+Re,ze|=0,it||rt(this,Re,ze,4,4294967295,0),ye.TYPED_ARRAY_SUPPORT?(this[ze]=Re>>>24,this[ze+1]=Re>>>16,this[ze+2]=Re>>>8,this[ze+3]=255&Re):yt(this,Re,ze,!1),ze+4},ye.prototype.writeIntLE=function(Re,ze,it,Ke){if(Re=+Re,ze|=0,!Ke){var We=Math.pow(2,8*it-1);rt(this,Re,ze,it,We-1,-We)}var vt=0,kt=1,hn=0;for(this[ze]=255ℜ++vt<it&&(kt*=256);)Re<0&&hn===0&&this[ze+vt-1]!==0&&(hn=1),this[ze+vt]=(Re/kt>>0)-hn&255;return ze+it},ye.prototype.writeIntBE=function(Re,ze,it,Ke){if(Re=+Re,ze|=0,!Ke){var We=Math.pow(2,8*it-1);rt(this,Re,ze,it,We-1,-We)}var vt=it-1,kt=1,hn=0;for(this[ze+vt]=255ℜ--vt>=0&&(kt*=256);)Re<0&&hn===0&&this[ze+vt+1]!==0&&(hn=1),this[ze+vt]=(Re/kt>>0)-hn&255;return ze+it},ye.prototype.writeInt8=function(Re,ze,it){return Re=+Re,ze|=0,it||rt(this,Re,ze,1,127,-128),ye.TYPED_ARRAY_SUPPORT||(Re=Math.floor(Re)),Re<0&&(Re=255+Re+1),this[ze]=255&Re,ze+1},ye.prototype.writeInt16LE=function(Re,ze,it){return Re=+Re,ze|=0,it||rt(this,Re,ze,2,32767,-32768),ye.TYPED_ARRAY_SUPPORT?(this[ze]=255&Re,this[ze+1]=Re>>>8):ct(this,Re,ze,!0),ze+2},ye.prototype.writeInt16BE=function(Re,ze,it){return Re=+Re,ze|=0,it||rt(this,Re,ze,2,32767,-32768),ye.TYPED_ARRAY_SUPPORT?(this[ze]=Re>>>8,this[ze+1]=255&Re):ct(this,Re,ze,!1),ze+2},ye.prototype.writeInt32LE=function(Re,ze,it){return Re=+Re,ze|=0,it||rt(this,Re,ze,4,2147483647,-2147483648),ye.TYPED_ARRAY_SUPPORT?(this[ze]=255&Re,this[ze+1]=Re>>>8,this[ze+2]=Re>>>16,this[ze+3]=Re>>>24):yt(this,Re,ze,!0),ze+4},ye.prototype.writeInt32BE=function(Re,ze,it){return Re=+Re,ze|=0,it||rt(this,Re,ze,4,2147483647,-2147483648),Re<0&&(Re=4294967295+Re+1),ye.TYPED_ARRAY_SUPPORT?(this[ze]=Re>>>24,this[ze+1]=Re>>>16,this[ze+2]=Re>>>8,this[ze+3]=255&Re):yt(this,Re,ze,!1),ze+4},ye.prototype.writeFloatLE=function(Re,ze,it){return xt(this,Re,ze,!0,it)},ye.prototype.writeFloatBE=function(Re,ze,it){return xt(this,Re,ze,!1,it)},ye.prototype.writeDoubleLE=function(Re,ze,it){return Ut(this,Re,ze,!0,it)},ye.prototype.writeDoubleBE=function(Re,ze,it){return Ut(this,Re,ze,!1,it)},ye.prototype.copy=function(Re,ze,it,Ke){if(it||(it=0),Ke||Ke===0||(Ke=this.length),ze>=Re.length&&(ze=Re.length),ze||(ze=0),Ke>0&&Ke<it&&(Ke=it),Ke===it||Re.length===0||this.length===0)return 0;if(ze<0)throw new RangeError("targetStart out of bounds");if(it<0||it>=this.length)throw new RangeError("sourceStart out of bounds");if(Ke<0)throw new RangeError("sourceEnd out of bounds");Ke>this.length&&(Ke=this.length),Re.length-ze<Ke-it&&(Ke=Re.length-ze+it);var We,vt=Ke-it;if(this===Re&&it<ze&&ze<Ke)for(We=vt-1;We>=0;--We)Re[We+ze]=this[We+it];else if(vt<1e3||!ye.TYPED_ARRAY_SUPPORT)for(We=0;We<vt;++We)Re[We+ze]=this[We+it];else Uint8Array.prototype.set.call(Re,this.subarray(it,it+vt),ze);return vt},ye.prototype.fill=function(Re,ze,it,Ke){if(typeof Re=="string"){if(typeof ze=="string"?(Ke=ze,ze=0,it=this.length):typeof it=="string"&&(Ke=it,it=this.length),Re.length===1){var We=Re.charCodeAt(0);We<256&&(Re=We)}if(Ke!==void 0&&typeof Ke!="string")throw new TypeError("encoding must be a string");if(typeof Ke=="string"&&!ye.isEncoding(Ke))throw new TypeError("Unknown encoding: "+Ke)}else typeof Re=="number"&&(Re&=255);if(ze<0||this.length<ze||this.length<it)throw new RangeError("Out of range index");if(it<=ze)return this;ze>>>=0,it=it===void 0?this.length:it>>>0,Re||(Re=0);var vt;if(typeof Re=="number")for(vt=ze;vt<it;++vt)this[vt]=Re;else{var kt=ye.isBuffer(Re)?Re:Dt(new ye(Re,Ke).toString()),hn=kt.length;for(vt=0;vt<it-ze;++vt)this[vt+ze]=kt[vt%hn]}return this};var Ve=/[^+\/0-9A-Za-z-_]/g}).call(this,typeof Ie.g!="undefined"?Ie.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"base64-js":34,ieee754:161,isarray:166}],39:[function(Se,je,Me){je.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],40:[function(Se,je,Me){"use strict";var Ce=function(){this.buffer=[],this.fns=[]};Ce.prototype.push=function(be,ye){if(this.fns.length)return this.fns.shift()(null,be);var we={data:be,priority:ye},pe=xe(this.buffer,we,function(de){return de.priority});this.buffer.splice(pe,0,we)},Ce.prototype.next=function(){var be=this;return function(ye){if(be.buffer.length)return ye(null,be.buffer.pop().data);be.fns.push(ye)}};var xe=function(be,ye,we){ye=we(ye);for(var pe=0,de=be?be.length:pe;pe<de;){var ge=pe+de>>>1;we(be[ge])<ye?pe=ge+1:de=ge}return pe};je.exports=Ce},{}],41:[function(Se,je,Me){function Ce(ee){var z=this,oe=ue.call(arguments,1);return new Promise(function(re,ae){function le(Pe){var Ae;try{Ae=ee.next(Pe)}catch(De){return ae(De)}ve(Ae)}function me(Pe){var Ae;try{Ae=ee.throw(Pe)}catch(De){return ae(De)}ve(Ae)}function ve(Pe){if(Pe.done)return re(Pe.value);var Ae=xe.call(z,Pe.value);return Ae&&pe(Ae)?Ae.then(le,me):me(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(Pe.value)+'"'))}if(typeof ee=="function"&&(ee=ee.apply(z,oe)),!ee||typeof ee.next!="function")return re(ee);le()})}function xe(ee){return ee&&(pe(ee)?ee:ge(ee)||de(ee)?Ce.call(this,ee):typeof ee=="function"?be.call(this,ee):Array.isArray(ee)?ye.call(this,ee):fe(ee)?we.call(this,ee):ee)}function be(ee){var z=this;return new Promise(function(oe,re){ee.call(z,function(ae,le){if(ae)return re(ae);arguments.length>2&&(le=ue.call(arguments,1)),oe(le)})})}function ye(ee){return Promise.all(ee.map(xe,this))}function we(ee){for(var z=new ee.constructor,oe=Object.keys(ee),re=[],ae=0;ae<oe.length;ae++){var le=oe[ae],me=xe.call(this,ee[le]);me&&pe(me)?function(ve,Pe){z[Pe]=void 0,re.push(ve.then(function(Ae){z[Pe]=Ae}))}(me,le):z[le]=ee[le]}return Promise.all(re).then(function(){return z})}function pe(ee){return typeof ee.then=="function"}function de(ee){return typeof ee.next=="function"&&typeof ee.throw=="function"}function ge(ee){var z=ee.constructor;return!!z&&(z.name==="GeneratorFunction"||z.displayName==="GeneratorFunction"||de(z.prototype))}function fe(ee){return Object==ee.constructor}var ue=Array.prototype.slice;je.exports=Ce.default=Ce.co=Ce,Ce.wrap=function(ee){function z(){return Ce.call(this,ee.apply(this,arguments))}return z.__generatorFunction__=ee,z}},{}],42:[function(Se,je,Me){je.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],43:[function(Se,je,Me){"use strict";function Ce(ye,we){if(!(this instanceof Ce))return new Ce(ye,we);this.src=ye,this._withAccess=we}function xe(ye,we){return ye[we]===void 0&&ye.__lookupGetter__(we)===void 0&&ye.__lookupSetter__(we)===void 0}var be=Array.prototype.slice;je.exports=Ce,Ce.prototype.withAccess=function(ye){return this._withAccess=ye!==!1,this},Ce.prototype.pick=function(ye){return Array.isArray(ye)||(ye=be.call(arguments)),ye.length&&(this.keys=ye),this},Ce.prototype.to=function(ye){if(ye=ye||{},!this.src)return ye;var we=this.keys||Object.keys(this.src);if(!this._withAccess){for(var pe=0;pe<we.length;pe++)de=we[pe],ye[de]===void 0&&(ye[de]=this.src[de]);return ye}for(var pe=0;pe<we.length;pe++){var de=we[pe];if(xe(ye,de)){var ge=this.src.__lookupGetter__(de),fe=this.src.__lookupSetter__(de);ge&&ye.__defineGetter__(de,ge),fe&&ye.__defineSetter__(de,fe),ge||fe||(ye[de]=this.src[de])}}return ye},Ce.prototype.toCover=function(ye){for(var we=this.keys||Object.keys(this.src),pe=0;pe<we.length;pe++){var de=we[pe];delete ye[de];var ge=this.src.__lookupGetter__(de),fe=this.src.__lookupSetter__(de);ge&&ye.__defineGetter__(de,ge),fe&&ye.__defineSetter__(de,fe),ge||fe||(ye[de]=this.src[de])}},Ce.prototype.override=Ce.prototype.toCover,Ce.prototype.and=function(ye){var we={};return this.to(we),this.src=ye,this.to(we),this.src=we,this}},{}],44:[function(Se,je,Me){Se("../../modules/es6.string.iterator"),Se("../../modules/es6.array.from"),je.exports=Se("../../modules/_core").Array.from},{"../../modules/_core":65,"../../modules/es6.array.from":133,"../../modules/es6.string.iterator":145}],45:[function(Se,je,Me){var Ce=Se("../../modules/_core"),xe=Ce.JSON||(Ce.JSON={stringify:JSON.stringify});je.exports=function(be){return xe.stringify.apply(xe,arguments)}},{"../../modules/_core":65}],46:[function(Se,je,Me){Se("../../modules/es6.object.assign"),je.exports=Se("../../modules/_core").Object.assign},{"../../modules/_core":65,"../../modules/es6.object.assign":136}],47:[function(Se,je,Me){Se("../../modules/es6.object.create");var Ce=Se("../../modules/_core").Object;je.exports=function(xe,be){return Ce.create(xe,be)}},{"../../modules/_core":65,"../../modules/es6.object.create":137}],48:[function(Se,je,Me){Se("../../modules/es6.object.define-property");var Ce=Se("../../modules/_core").Object;je.exports=function(xe,be,ye){return Ce.defineProperty(xe,be,ye)}},{"../../modules/_core":65,"../../modules/es6.object.define-property":138}],49:[function(Se,je,Me){Se("../../modules/es6.object.get-own-property-names");var Ce=Se("../../modules/_core").Object;je.exports=function(xe){return Ce.getOwnPropertyNames(xe)}},{"../../modules/_core":65,"../../modules/es6.object.get-own-property-names":139}],50:[function(Se,je,Me){Se("../../modules/es6.object.get-prototype-of"),je.exports=Se("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":65,"../../modules/es6.object.get-prototype-of":140}],51:[function(Se,je,Me){Se("../../modules/es6.object.keys"),je.exports=Se("../../modules/_core").Object.keys},{"../../modules/_core":65,"../../modules/es6.object.keys":141}],52:[function(Se,je,Me){Se("../modules/es6.object.to-string"),Se("../modules/es6.string.iterator"),Se("../modules/web.dom.iterable"),Se("../modules/es6.promise"),Se("../modules/es7.promise.finally"),Se("../modules/es7.promise.try"),je.exports=Se("../modules/_core").Promise},{"../modules/_core":65,"../modules/es6.object.to-string":142,"../modules/es6.promise":143,"../modules/es6.string.iterator":145,"../modules/es7.promise.finally":147,"../modules/es7.promise.try":148,"../modules/web.dom.iterable":151}],53:[function(Se,je,Me){Se("../modules/web.immediate"),je.exports=Se("../modules/_core").setImmediate},{"../modules/_core":65,"../modules/web.immediate":152}],54:[function(Se,je,Me){Se("../../modules/es6.string.from-code-point"),je.exports=Se("../../modules/_core").String.fromCodePoint},{"../../modules/_core":65,"../../modules/es6.string.from-code-point":144}],55:[function(Se,je,Me){Se("../../modules/es6.function.has-instance"),je.exports=Se("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":130,"../../modules/es6.function.has-instance":135}],56:[function(Se,je,Me){Se("../../modules/es6.symbol"),Se("../../modules/es6.object.to-string"),Se("../../modules/es7.symbol.async-iterator"),Se("../../modules/es7.symbol.observable"),je.exports=Se("../../modules/_core").Symbol},{"../../modules/_core":65,"../../modules/es6.object.to-string":142,"../../modules/es6.symbol":146,"../../modules/es7.symbol.async-iterator":149,"../../modules/es7.symbol.observable":150}],57:[function(Se,je,Me){Se("../../modules/es6.string.iterator"),Se("../../modules/web.dom.iterable"),je.exports=Se("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":130,"../../modules/es6.string.iterator":145,"../../modules/web.dom.iterable":151}],58:[function(Se,je,Me){je.exports=function(Ce){if(typeof Ce!="function")throw TypeError(Ce+" is not a function!");return Ce}},{}],59:[function(Se,je,Me){je.exports=function(){}},{}],60:[function(Se,je,Me){je.exports=function(Ce,xe,be,ye){if(!(Ce instanceof xe)||ye!==void 0&&ye in Ce)throw TypeError(be+": incorrect invocation!");return Ce}},{}],61:[function(Se,je,Me){var Ce=Se("./_is-object");je.exports=function(xe){if(!Ce(xe))throw TypeError(xe+" is not an object!");return xe}},{"./_is-object":85}],62:[function(Se,je,Me){var Ce=Se("./_to-iobject"),xe=Se("./_to-length"),be=Se("./_to-absolute-index");je.exports=function(ye){return function(we,pe,de){var ge,fe=Ce(we),ue=xe(fe.length),ee=be(de,ue);if(ye&&pe!=pe){for(;ue>ee;)if((ge=fe[ee++])!=ge)return!0}else for(;ue>ee;ee++)if((ye||ee in fe)&&fe[ee]===pe)return ye||ee||0;return!ye&&-1}}},{"./_to-absolute-index":121,"./_to-iobject":123,"./_to-length":124}],63:[function(Se,je,Me){var Ce=Se("./_cof"),xe=Se("./_wks")("toStringTag"),be=Ce(function(){return arguments}())=="Arguments",ye=function(we,pe){try{return we[pe]}catch(de){}};je.exports=function(we){var pe,de,ge;return we===void 0?"Undefined":we===null?"Null":typeof(de=ye(pe=Object(we),xe))=="string"?de:be?Ce(pe):(ge=Ce(pe))=="Object"&&typeof pe.callee=="function"?"Arguments":ge}},{"./_cof":64,"./_wks":131}],64:[function(Se,je,Me){var Ce={}.toString;je.exports=function(xe){return Ce.call(xe).slice(8,-1)}},{}],65:[function(Se,je,Me){var Ce=je.exports={version:"2.5.7"};typeof __e=="number"&&(__e=Ce)},{}],66:[function(Se,je,Me){"use strict";var Ce=Se("./_object-dp"),xe=Se("./_property-desc");je.exports=function(be,ye,we){ye in be?Ce.f(be,ye,xe(0,we)):be[ye]=we}},{"./_object-dp":98,"./_property-desc":111}],67:[function(Se,je,Me){var Ce=Se("./_a-function");je.exports=function(xe,be,ye){if(Ce(xe),be===void 0)return xe;switch(ye){case 1:return function(we){return xe.call(be,we)};case 2:return function(we,pe){return xe.call(be,we,pe)};case 3:return function(we,pe,de){return xe.call(be,we,pe,de)}}return function(){return xe.apply(be,arguments)}}},{"./_a-function":58}],68:[function(Se,je,Me){je.exports=function(Ce){if(Ce==null)throw TypeError("Can't call method on "+Ce);return Ce}},{}],69:[function(Se,je,Me){je.exports=!Se("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":74}],70:[function(Se,je,Me){var Ce=Se("./_is-object"),xe=Se("./_global").document,be=Ce(xe)&&Ce(xe.createElement);je.exports=function(ye){return be?xe.createElement(ye):{}}},{"./_global":76,"./_is-object":85}],71:[function(Se,je,Me){je.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],72:[function(Se,je,Me){var Ce=Se("./_object-keys"),xe=Se("./_object-gops"),be=Se("./_object-pie");je.exports=function(ye){var we=Ce(ye),pe=xe.f;if(pe)for(var de,ge=pe(ye),fe=be.f,ue=0;ge.length>ue;)fe.call(ye,de=ge[ue++])&&we.push(de);return we}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(Se,je,Me){var Ce=Se("./_global"),xe=Se("./_core"),be=Se("./_ctx"),ye=Se("./_hide"),we=Se("./_has"),pe=function(de,ge,fe){var ue,ee,z,oe=de&pe.F,re=de&pe.G,ae=de&pe.S,le=de&pe.P,me=de&pe.B,ve=de&pe.W,Pe=re?xe:xe[ge]||(xe[ge]={}),Ae=Pe.prototype,De=re?Ce:ae?Ce[ge]:(Ce[ge]||{}).prototype;re&&(fe=ge);for(ue in fe)(ee=!oe&&De&&De[ue]!==void 0)&&we(Pe,ue)||(z=ee?De[ue]:fe[ue],Pe[ue]=re&&typeof De[ue]!="function"?fe[ue]:me&&ee?be(z,Ce):ve&&De[ue]==z?function(Oe){var Ze=function(qe,Xe,mt){if(this instanceof Oe){switch(arguments.length){case 0:return new Oe;case 1:return new Oe(qe);case 2:return new Oe(qe,Xe)}return new Oe(qe,Xe,mt)}return Oe.apply(this,arguments)};return Ze.prototype=Oe.prototype,Ze}(z):le&&typeof z=="function"?be(Function.call,z):z,le&&((Pe.virtual||(Pe.virtual={}))[ue]=z,de&pe.R&&Ae&&!Ae[ue]&&ye(Ae,ue,z)))};pe.F=1,pe.G=2,pe.S=4,pe.P=8,pe.B=16,pe.W=32,pe.U=64,pe.R=128,je.exports=pe},{"./_core":65,"./_ctx":67,"./_global":76,"./_has":77,"./_hide":78}],74:[function(Se,je,Me){je.exports=function(Ce){try{return!!Ce()}catch(xe){return!0}}},{}],75:[function(Se,je,fe){var Ce=Se("./_ctx"),xe=Se("./_iter-call"),be=Se("./_is-array-iter"),ye=Se("./_an-object"),we=Se("./_to-length"),pe=Se("./core.get-iterator-method"),de={},ge={},fe=je.exports=function(ue,ee,z,oe,re){var ae,le,me,ve,Pe=re?function(){return ue}:pe(ue),Ae=Ce(z,oe,ee?2:1),De=0;if(typeof Pe!="function")throw TypeError(ue+" is not iterable!");if(be(Pe)){for(ae=we(ue.length);ae>De;De++)if((ve=ee?Ae(ye(le=ue[De])[0],le[1]):Ae(ue[De]))===de||ve===ge)return ve}else for(me=Pe.call(ue);!(le=me.next()).done;)if((ve=xe(me,Ae,le.value,ee))===de||ve===ge)return ve};fe.BREAK=de,fe.RETURN=ge},{"./_an-object":61,"./_ctx":67,"./_is-array-iter":83,"./_iter-call":86,"./_to-length":124,"./core.get-iterator-method":132}],76:[function(Se,je,Me){var Ce=je.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=Ce)},{}],77:[function(Se,je,Me){var Ce={}.hasOwnProperty;je.exports=function(xe,be){return Ce.call(xe,be)}},{}],78:[function(Se,je,Me){var Ce=Se("./_object-dp"),xe=Se("./_property-desc");je.exports=Se("./_descriptors")?function(be,ye,we){return Ce.f(be,ye,xe(1,we))}:function(be,ye,we){return be[ye]=we,be}},{"./_descriptors":69,"./_object-dp":98,"./_property-desc":111}],79:[function(Se,je,Me){var Ce=Se("./_global").document;je.exports=Ce&&Ce.documentElement},{"./_global":76}],80:[function(Se,je,Me){je.exports=!Se("./_descriptors")&&!Se("./_fails")(function(){return Object.defineProperty(Se("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":69,"./_dom-create":70,"./_fails":74}],81:[function(Se,je,Me){je.exports=function(Ce,xe,be){var ye=be===void 0;switch(xe.length){case 0:return ye?Ce():Ce.call(be);case 1:return ye?Ce(xe[0]):Ce.call(be,xe[0]);case 2:return ye?Ce(xe[0],xe[1]):Ce.call(be,xe[0],xe[1]);case 3:return ye?Ce(xe[0],xe[1],xe[2]):Ce.call(be,xe[0],xe[1],xe[2]);case 4:return ye?Ce(xe[0],xe[1],xe[2],xe[3]):Ce.call(be,xe[0],xe[1],xe[2],xe[3])}return Ce.apply(be,xe)}},{}],82:[function(Se,je,Me){var Ce=Se("./_cof");je.exports=Object("z").propertyIsEnumerable(0)?Object:function(xe){return Ce(xe)=="String"?xe.split(""):Object(xe)}},{"./_cof":64}],83:[function(Se,je,Me){var Ce=Se("./_iterators"),xe=Se("./_wks")("iterator"),be=Array.prototype;je.exports=function(ye){return ye!==void 0&&(Ce.Array===ye||be[xe]===ye)}},{"./_iterators":91,"./_wks":131}],84:[function(Se,je,Me){var Ce=Se("./_cof");je.exports=Array.isArray||function(xe){return Ce(xe)=="Array"}},{"./_cof":64}],85:[function(Se,je,Me){je.exports=function(Ce){return typeof Ce=="object"?Ce!==null:typeof Ce=="function"}},{}],86:[function(Se,je,Me){var Ce=Se("./_an-object");je.exports=function(xe,be,ye,we){try{return we?be(Ce(ye)[0],ye[1]):be(ye)}catch(de){var pe=xe.return;throw pe!==void 0&&Ce(pe.call(xe)),de}}},{"./_an-object":61}],87:[function(Se,je,Me){"use strict";var Ce=Se("./_object-create"),xe=Se("./_property-desc"),be=Se("./_set-to-string-tag"),ye={};Se("./_hide")(ye,Se("./_wks")("iterator"),function(){return this}),je.exports=function(we,pe,de){we.prototype=Ce(ye,{next:xe(1,de)}),be(we,pe+" Iterator")}},{"./_hide":78,"./_object-create":97,"./_property-desc":111,"./_set-to-string-tag":115,"./_wks":131}],88:[function(Se,je,Me){"use strict";var Ce=Se("./_library"),xe=Se("./_export"),be=Se("./_redefine"),ye=Se("./_hide"),we=Se("./_iterators"),pe=Se("./_iter-create"),de=Se("./_set-to-string-tag"),ge=Se("./_object-gpo"),fe=Se("./_wks")("iterator"),ue=!([].keys&&"next"in[].keys()),ee=function(){return this};je.exports=function(z,oe,re,ae,le,me,ve){pe(re,oe,ae);var Pe,Ae,De,Oe=function(dt){if(!ue&&dt in mt)return mt[dt];switch(dt){case"keys":case"values":return function(){return new re(this,dt)}}return function(){return new re(this,dt)}},Ze=oe+" Iterator",qe=le=="values",Xe=!1,mt=z.prototype,pt=mt[fe]||mt["@@iterator"]||le&&mt[le],Mt=pt||Oe(le),at=le?qe?Oe("entries"):Mt:void 0,_t=oe=="Array"&&mt.entries||pt;if(_t&&(De=ge(_t.call(new z)))!==Object.prototype&&De.next&&(de(De,Ze,!0),Ce||typeof De[fe]=="function"||ye(De,fe,ee)),qe&&pt&&pt.name!=="values"&&(Xe=!0,Mt=function(){return pt.call(this)}),Ce&&!ve||!ue&&!Xe&&mt[fe]||ye(mt,fe,Mt),we[oe]=Mt,we[Ze]=ee,le)if(Pe={values:qe?Mt:Oe("values"),keys:me?Mt:Oe("keys"),entries:at},ve)for(Ae in Pe)Ae in mt||be(mt,Ae,Pe[Ae]);else xe(xe.P+xe.F*(ue||Xe),oe,Pe);return Pe}},{"./_export":73,"./_hide":78,"./_iter-create":87,"./_iterators":91,"./_library":92,"./_object-gpo":104,"./_redefine":113,"./_set-to-string-tag":115,"./_wks":131}],89:[function(Se,je,Me){var Ce=Se("./_wks")("iterator"),xe=!1;try{var be=[7][Ce]();be.return=function(){xe=!0},Array.from(be,function(){throw 2})}catch(ye){}je.exports=function(ye,we){if(!we&&!xe)return!1;var pe=!1;try{var de=[7],ge=de[Ce]();ge.next=function(){return{done:pe=!0}},de[Ce]=function(){return ge},ye(de)}catch(fe){}return pe}},{"./_wks":131}],90:[function(Se,je,Me){je.exports=function(Ce,xe){return{value:xe,done:!!Ce}}},{}],91:[function(Se,je,Me){je.exports={}},{}],92:[function(Se,je,Me){je.exports=!0},{}],93:[function(Se,je,Me){var Ce=Se("./_uid")("meta"),xe=Se("./_is-object"),be=Se("./_has"),ye=Se("./_object-dp").f,we=0,pe=Object.isExtensible||function(){return!0},de=!Se("./_fails")(function(){return pe(Object.preventExtensions({}))}),ge=function(oe){ye(oe,Ce,{value:{i:"O"+ ++we,w:{}}})},fe=function(oe,re){if(!xe(oe))return typeof oe=="symbol"?oe:(typeof oe=="string"?"S":"P")+oe;if(!be(oe,Ce)){if(!pe(oe))return"F";if(!re)return"E";ge(oe)}return oe[Ce].i},ue=function(oe,re){if(!be(oe,Ce)){if(!pe(oe))return!0;if(!re)return!1;ge(oe)}return oe[Ce].w},ee=function(oe){return de&&z.NEED&&pe(oe)&&!be(oe,Ce)&&ge(oe),oe},z=je.exports={KEY:Ce,NEED:!1,fastKey:fe,getWeak:ue,onFreeze:ee}},{"./_fails":74,"./_has":77,"./_is-object":85,"./_object-dp":98,"./_uid":127}],94:[function(Se,je,Me){var Ce=Se("./_global"),xe=Se("./_task").set,be=Ce.MutationObserver||Ce.WebKitMutationObserver,ye=Ce.process,we=Ce.Promise,pe=Se("./_cof")(ye)=="process";je.exports=function(){var de,ge,fe,ue=function(){var re,ae;for(pe&&(re=ye.domain)&&re.exit();de;){ae=de.fn,de=de.next;try{ae()}catch(le){throw de?fe():ge=void 0,le}}ge=void 0,re&&re.enter()};if(pe)fe=function(){ye.nextTick(ue)};else if(!be||Ce.navigator&&Ce.navigator.standalone)if(we&&we.resolve){var ee=we.resolve(void 0);fe=function(){ee.then(ue)}}else fe=function(){xe.call(Ce,ue)};else{var z=!0,oe=document.createTextNode("");new be(ue).observe(oe,{characterData:!0}),fe=function(){oe.data=z=!z}}return function(re){var ae={fn:re,next:void 0};ge&&(ge.next=ae),de||(de=ae,fe()),ge=ae}}},{"./_cof":64,"./_global":76,"./_task":120}],95:[function(Se,je,Me){"use strict";function Ce(be){var ye,we;this.promise=new be(function(pe,de){if(ye!==void 0||we!==void 0)throw TypeError("Bad Promise constructor");ye=pe,we=de}),this.resolve=xe(ye),this.reject=xe(we)}var xe=Se("./_a-function");je.exports.f=function(be){return new Ce(be)}},{"./_a-function":58}],96:[function(Se,je,Me){"use strict";var Ce=Se("./_object-keys"),xe=Se("./_object-gops"),be=Se("./_object-pie"),ye=Se("./_to-object"),we=Se("./_iobject"),pe=Object.assign;je.exports=!pe||Se("./_fails")(function(){var de={},ge={},fe=Symbol(),ue="abcdefghijklmnopqrst";return de[fe]=7,ue.split("").forEach(function(ee){ge[ee]=ee}),pe({},de)[fe]!=7||Object.keys(pe({},ge)).join("")!=ue})?function(de,ge){for(var fe=ye(de),ue=arguments.length,ee=1,z=xe.f,oe=be.f;ue>ee;)for(var re,ae=we(arguments[ee++]),le=z?Ce(ae).concat(z(ae)):Ce(ae),me=le.length,ve=0;me>ve;)oe.call(ae,re=le[ve++])&&(fe[re]=ae[re]);return fe}:pe},{"./_fails":74,"./_iobject":82,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_to-object":125}],97:[function(Se,je,Me){var Ce=Se("./_an-object"),xe=Se("./_object-dps"),be=Se("./_enum-bug-keys"),ye=Se("./_shared-key")("IE_PROTO"),we=function(){},pe=function(){var de,ge=Se("./_dom-create")("iframe"),fe=be.length;for(ge.style.display="none",Se("./_html").appendChild(ge),ge.src="javascript:",de=ge.contentWindow.document,de.open(),de.write("<script>document.F=Object<\/script>"),de.close(),pe=de.F;fe--;)delete pe.prototype[be[fe]];return pe()};je.exports=Object.create||function(de,ge){var fe;return de!==null?(we.prototype=Ce(de),fe=new we,we.prototype=null,fe[ye]=de):fe=pe(),ge===void 0?fe:xe(fe,ge)}},{"./_an-object":61,"./_dom-create":70,"./_enum-bug-keys":71,"./_html":79,"./_object-dps":99,"./_shared-key":116}],98:[function(Se,je,Me){var Ce=Se("./_an-object"),xe=Se("./_ie8-dom-define"),be=Se("./_to-primitive"),ye=Object.defineProperty;Me.f=Se("./_descriptors")?Object.defineProperty:function(we,pe,de){if(Ce(we),pe=be(pe,!0),Ce(de),xe)try{return ye(we,pe,de)}catch(ge){}if("get"in de||"set"in de)throw TypeError("Accessors not supported!");return"value"in de&&(we[pe]=de.value),we}},{"./_an-object":61,"./_descriptors":69,"./_ie8-dom-define":80,"./_to-primitive":126}],99:[function(Se,je,Me){var Ce=Se("./_object-dp"),xe=Se("./_an-object"),be=Se("./_object-keys");je.exports=Se("./_descriptors")?Object.defineProperties:function(ye,we){xe(ye);for(var pe,de=be(we),ge=de.length,fe=0;ge>fe;)Ce.f(ye,pe=de[fe++],we[pe]);return ye}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(Se,je,Me){var Ce=Se("./_object-pie"),xe=Se("./_property-desc"),be=Se("./_to-iobject"),ye=Se("./_to-primitive"),we=Se("./_has"),pe=Se("./_ie8-dom-define"),de=Object.getOwnPropertyDescriptor;Me.f=Se("./_descriptors")?de:function(ge,fe){if(ge=be(ge),fe=ye(fe,!0),pe)try{return de(ge,fe)}catch(ue){}if(we(ge,fe))return xe(!Ce.f.call(ge,fe),ge[fe])}},{"./_descriptors":69,"./_has":77,"./_ie8-dom-define":80,"./_object-pie":107,"./_property-desc":111,"./_to-iobject":123,"./_to-primitive":126}],101:[function(Se,je,Me){var Ce=Se("./_to-iobject"),xe=Se("./_object-gopn").f,be={}.toString,ye=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],we=function(pe){try{return xe(pe)}catch(de){return ye.slice()}};je.exports.f=function(pe){return ye&&be.call(pe)=="[object Window]"?we(pe):xe(Ce(pe))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(Se,je,Me){var Ce=Se("./_object-keys-internal"),xe=Se("./_enum-bug-keys").concat("length","prototype");Me.f=Object.getOwnPropertyNames||function(be){return Ce(be,xe)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],103:[function(Se,je,Me){Me.f=Object.getOwnPropertySymbols},{}],104:[function(Se,je,Me){var Ce=Se("./_has"),xe=Se("./_to-object"),be=Se("./_shared-key")("IE_PROTO"),ye=Object.prototype;je.exports=Object.getPrototypeOf||function(we){return we=xe(we),Ce(we,be)?we[be]:typeof we.constructor=="function"&&we instanceof we.constructor?we.constructor.prototype:we instanceof Object?ye:null}},{"./_has":77,"./_shared-key":116,"./_to-object":125}],105:[function(Se,je,Me){var Ce=Se("./_has"),xe=Se("./_to-iobject"),be=Se("./_array-includes")(!1),ye=Se("./_shared-key")("IE_PROTO");je.exports=function(we,pe){var de,ge=xe(we),fe=0,ue=[];for(de in ge)de!=ye&&Ce(ge,de)&&ue.push(de);for(;pe.length>fe;)Ce(ge,de=pe[fe++])&&(~be(ue,de)||ue.push(de));return ue}},{"./_array-includes":62,"./_has":77,"./_shared-key":116,"./_to-iobject":123}],106:[function(Se,je,Me){var Ce=Se("./_object-keys-internal"),xe=Se("./_enum-bug-keys");je.exports=Object.keys||function(be){return Ce(be,xe)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(Se,je,Me){Me.f={}.propertyIsEnumerable},{}],108:[function(Se,je,Me){var Ce=Se("./_export"),xe=Se("./_core"),be=Se("./_fails");je.exports=function(ye,we){var pe=(xe.Object||{})[ye]||Object[ye],de={};de[ye]=we(pe),Ce(Ce.S+Ce.F*be(function(){pe(1)}),"Object",de)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(Se,je,Me){je.exports=function(Ce){try{return{e:!1,v:Ce()}}catch(xe){return{e:!0,v:xe}}}},{}],110:[function(Se,je,Me){var Ce=Se("./_an-object"),xe=Se("./_is-object"),be=Se("./_new-promise-capability");je.exports=function(ye,we){if(Ce(ye),xe(we)&&we.constructor===ye)return we;var pe=be.f(ye);return(0,pe.resolve)(we),pe.promise}},{"./_an-object":61,"./_is-object":85,"./_new-promise-capability":95}],111:[function(Se,je,Me){je.exports=function(Ce,xe){return{enumerable:!(1&Ce),configurable:!(2&Ce),writable:!(4&Ce),value:xe}}},{}],112:[function(Se,je,Me){var Ce=Se("./_hide");je.exports=function(xe,be,ye){for(var we in be)ye&&xe[we]?xe[we]=be[we]:Ce(xe,we,be[we]);return xe}},{"./_hide":78}],113:[function(Se,je,Me){je.exports=Se("./_hide")},{"./_hide":78}],114:[function(Se,je,Me){"use strict";var Ce=Se("./_global"),xe=Se("./_core"),be=Se("./_object-dp"),ye=Se("./_descriptors"),we=Se("./_wks")("species");je.exports=function(pe){var de=typeof xe[pe]=="function"?xe[pe]:Ce[pe];ye&&de&&!de[we]&&be.f(de,we,{configurable:!0,get:function(){return this}})}},{"./_core":65,"./_descriptors":69,"./_global":76,"./_object-dp":98,"./_wks":131}],115:[function(Se,je,Me){var Ce=Se("./_object-dp").f,xe=Se("./_has"),be=Se("./_wks")("toStringTag");je.exports=function(ye,we,pe){ye&&!xe(ye=pe?ye:ye.prototype,be)&&Ce(ye,be,{configurable:!0,value:we})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(Se,je,Me){var Ce=Se("./_shared")("keys"),xe=Se("./_uid");je.exports=function(be){return Ce[be]||(Ce[be]=xe(be))}},{"./_shared":117,"./_uid":127}],117:[function(Se,je,Me){var Ce=Se("./_core"),xe=Se("./_global"),be=xe["__core-js_shared__"]||(xe["__core-js_shared__"]={});(je.exports=function(ye,we){return be[ye]||(be[ye]=we!==void 0?we:{})})("versions",[]).push({version:Ce.version,mode:Se("./_library")?"pure":"global",copyright:"\u6F0F 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":65,"./_global":76,"./_library":92}],118:[function(Se,je,Me){var Ce=Se("./_an-object"),xe=Se("./_a-function"),be=Se("./_wks")("species");je.exports=function(ye,we){var pe,de=Ce(ye).constructor;return de===void 0||(pe=Ce(de)[be])==null?we:xe(pe)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(Se,je,Me){var Ce=Se("./_to-integer"),xe=Se("./_defined");je.exports=function(be){return function(ye,we){var pe,de,ge=String(xe(ye)),fe=Ce(we),ue=ge.length;return fe<0||fe>=ue?be?"":void 0:(pe=ge.charCodeAt(fe),pe<55296||pe>56319||fe+1===ue||(de=ge.charCodeAt(fe+1))<56320||de>57343?be?ge.charAt(fe):pe:be?ge.slice(fe,fe+2):de-56320+(pe-55296<<10)+65536)}}},{"./_defined":68,"./_to-integer":122}],120:[function(Se,je,Me){var Ce,xe,be,ye=Se("./_ctx"),we=Se("./_invoke"),pe=Se("./_html"),de=Se("./_dom-create"),ge=Se("./_global"),fe=ge.process,ue=ge.setImmediate,ee=ge.clearImmediate,z=ge.MessageChannel,oe=ge.Dispatch,re=0,ae={},le=function(){var ve=+this;if(ae.hasOwnProperty(ve)){var Pe=ae[ve];delete ae[ve],Pe()}},me=function(ve){le.call(ve.data)};ue&&ee||(ue=function(ve){for(var Pe=[],Ae=1;arguments.length>Ae;)Pe.push(arguments[Ae++]);return ae[++re]=function(){we(typeof ve=="function"?ve:Function(ve),Pe)},Ce(re),re},ee=function(ve){delete ae[ve]},Se("./_cof")(fe)=="process"?Ce=function(ve){fe.nextTick(ye(le,ve,1))}:oe&&oe.now?Ce=function(ve){oe.now(ye(le,ve,1))}:z?(xe=new z,be=xe.port2,xe.port1.onmessage=me,Ce=ye(be.postMessage,be,1)):ge.addEventListener&&typeof postMessage=="function"&&!ge.importScripts?(Ce=function(ve){ge.postMessage(ve+"","*")},ge.addEventListener("message",me,!1)):Ce="onreadystatechange"in de("script")?function(ve){pe.appendChild(de("script")).onreadystatechange=function(){pe.removeChild(this),le.call(ve)}}:function(ve){setTimeout(ye(le,ve,1),0)}),je.exports={set:ue,clear:ee}},{"./_cof":64,"./_ctx":67,"./_dom-create":70,"./_global":76,"./_html":79,"./_invoke":81}],121:[function(Se,je,Me){var Ce=Se("./_to-integer"),xe=Math.max,be=Math.min;je.exports=function(ye,we){return ye=Ce(ye),ye<0?xe(ye+we,0):be(ye,we)}},{"./_to-integer":122}],122:[function(Se,je,Me){var Ce=Math.ceil,xe=Math.floor;je.exports=function(be){return isNaN(be=+be)?0:(be>0?xe:Ce)(be)}},{}],123:[function(Se,je,Me){var Ce=Se("./_iobject"),xe=Se("./_defined");je.exports=function(be){return Ce(xe(be))}},{"./_defined":68,"./_iobject":82}],124:[function(Se,je,Me){var Ce=Se("./_to-integer"),xe=Math.min;je.exports=function(be){return be>0?xe(Ce(be),9007199254740991):0}},{"./_to-integer":122}],125:[function(Se,je,Me){var Ce=Se("./_defined");je.exports=function(xe){return Object(Ce(xe))}},{"./_defined":68}],126:[function(Se,je,Me){var Ce=Se("./_is-object");je.exports=function(xe,be){if(!Ce(xe))return xe;var ye,we;if(be&&typeof(ye=xe.toString)=="function"&&!Ce(we=ye.call(xe))||typeof(ye=xe.valueOf)=="function"&&!Ce(we=ye.call(xe))||!be&&typeof(ye=xe.toString)=="function"&&!Ce(we=ye.call(xe)))return we;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(Se,je,Me){var Ce=0,xe=Math.random();je.exports=function(be){return"Symbol(".concat(be===void 0?"":be,")_",(++Ce+xe).toString(36))}},{}],128:[function(Se,je,Me){var Ce=Se("./_global"),xe=Ce.navigator;je.exports=xe&&xe.userAgent||""},{"./_global":76}],129:[function(Se,je,Me){var Ce=Se("./_global"),xe=Se("./_core"),be=Se("./_library"),ye=Se("./_wks-ext"),we=Se("./_object-dp").f;je.exports=function(pe){var de=xe.Symbol||(xe.Symbol=be?{}:Ce.Symbol||{});pe.charAt(0)=="_"||pe in de||we(de,pe,{value:ye.f(pe)})}},{"./_core":65,"./_global":76,"./_library":92,"./_object-dp":98,"./_wks-ext":130}],130:[function(Se,je,Me){Me.f=Se("./_wks")},{"./_wks":131}],131:[function(Se,je,Me){var Ce=Se("./_shared")("wks"),xe=Se("./_uid"),be=Se("./_global").Symbol,ye=typeof be=="function";(je.exports=function(we){return Ce[we]||(Ce[we]=ye&&be[we]||(ye?be:xe)("Symbol."+we))}).store=Ce},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(Se,je,Me){var Ce=Se("./_classof"),xe=Se("./_wks")("iterator"),be=Se("./_iterators");je.exports=Se("./_core").getIteratorMethod=function(ye){if(ye!=null)return ye[xe]||ye["@@iterator"]||be[Ce(ye)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(Se,je,Me){"use strict";var Ce=Se("./_ctx"),xe=Se("./_export"),be=Se("./_to-object"),ye=Se("./_iter-call"),we=Se("./_is-array-iter"),pe=Se("./_to-length"),de=Se("./_create-property"),ge=Se("./core.get-iterator-method");xe(xe.S+xe.F*!Se("./_iter-detect")(function(fe){Array.from(fe)}),"Array",{from:function(fe){var ue,ee,z,oe,re=be(fe),ae=typeof this=="function"?this:Array,le=arguments.length,me=le>1?arguments[1]:void 0,ve=me!==void 0,Pe=0,Ae=ge(re);if(ve&&(me=Ce(me,le>2?arguments[2]:void 0,2)),Ae==null||ae==Array&&we(Ae))for(ue=pe(re.length),ee=new ae(ue);ue>Pe;Pe++)de(ee,Pe,ve?me(re[Pe],Pe):re[Pe]);else for(oe=Ae.call(re),ee=new ae;!(z=oe.next()).done;Pe++)de(ee,Pe,ve?ye(oe,me,[z.value,Pe],!0):z.value);return ee.length=Pe,ee}})},{"./_create-property":66,"./_ctx":67,"./_export":73,"./_is-array-iter":83,"./_iter-call":86,"./_iter-detect":89,"./_to-length":124,"./_to-object":125,"./core.get-iterator-method":132}],134:[function(Se,je,Me){"use strict";var Ce=Se("./_add-to-unscopables"),xe=Se("./_iter-step"),be=Se("./_iterators"),ye=Se("./_to-iobject");je.exports=Se("./_iter-define")(Array,"Array",function(we,pe){this._t=ye(we),this._i=0,this._k=pe},function(){var we=this._t,pe=this._k,de=this._i++;return!we||de>=we.length?(this._t=void 0,xe(1)):pe=="keys"?xe(0,de):pe=="values"?xe(0,we[de]):xe(0,[de,we[de]])},"values"),be.Arguments=be.Array,Ce("keys"),Ce("values"),Ce("entries")},{"./_add-to-unscopables":59,"./_iter-define":88,"./_iter-step":90,"./_iterators":91,"./_to-iobject":123}],135:[function(Se,je,Me){"use strict";var Ce=Se("./_is-object"),xe=Se("./_object-gpo"),be=Se("./_wks")("hasInstance"),ye=Function.prototype;be in ye||Se("./_object-dp").f(ye,be,{value:function(we){if(typeof this!="function"||!Ce(we))return!1;if(!Ce(this.prototype))return we instanceof this;for(;we=xe(we);)if(this.prototype===we)return!0;return!1}})},{"./_is-object":85,"./_object-dp":98,"./_object-gpo":104,"./_wks":131}],136:[function(Se,je,Me){var Ce=Se("./_export");Ce(Ce.S+Ce.F,"Object",{assign:Se("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(Se,je,Me){var Ce=Se("./_export");Ce(Ce.S,"Object",{create:Se("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(Se,je,Me){var Ce=Se("./_export");Ce(Ce.S+Ce.F*!Se("./_descriptors"),"Object",{defineProperty:Se("./_object-dp").f})},{"./_descriptors":69,"./_export":73,"./_object-dp":98}],139:[function(Se,je,Me){Se("./_object-sap")("getOwnPropertyNames",function(){return Se("./_object-gopn-ext").f})},{"./_object-gopn-ext":101,"./_object-sap":108}],140:[function(Se,je,Me){var Ce=Se("./_to-object"),xe=Se("./_object-gpo");Se("./_object-sap")("getPrototypeOf",function(){return function(be){return xe(Ce(be))}})},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(Se,je,Me){var Ce=Se("./_to-object"),xe=Se("./_object-keys");Se("./_object-sap")("keys",function(){return function(be){return xe(Ce(be))}})},{"./_object-keys":106,"./_object-sap":108,"./_to-object":125}],142:[function(Se,je,Me){arguments[4][36][0].apply(Me,arguments)},{dup:36}],143:[function(Se,je,Me){"use strict";var Ce,xe,be,ye,we=Se("./_library"),pe=Se("./_global"),de=Se("./_ctx"),ge=Se("./_classof"),fe=Se("./_export"),ue=Se("./_is-object"),ee=Se("./_a-function"),z=Se("./_an-instance"),oe=Se("./_for-of"),re=Se("./_species-constructor"),ae=Se("./_task").set,le=Se("./_microtask")(),me=Se("./_new-promise-capability"),ve=Se("./_perform"),Pe=Se("./_user-agent"),Ae=Se("./_promise-resolve"),De=pe.TypeError,Oe=pe.process,Ze=Oe&&Oe.versions,qe=Ze&&Ze.v8||"",Xe=pe.Promise,mt=ge(Oe)=="process",pt=function(){},Mt=xe=me.f,at=!!function(){try{var wt=Xe.resolve(1),xt=(wt.constructor={})[Se("./_wks")("species")]=function(Ut){Ut(pt,pt)};return(mt||typeof PromiseRejectionEvent=="function")&&wt.then(pt)instanceof xt&&qe.indexOf("6.6")!==0&&Pe.indexOf("Chrome/66")===-1}catch(Ut){}}(),_t=function(wt){var xt;return!(!ue(wt)||typeof(xt=wt.then)!="function")&&xt},dt=function(wt,xt){if(!wt._n){wt._n=!0;var Ut=wt._c;le(function(){for(var zt=wt._v,dn=wt._s==1,Ft=0;Ut.length>Ft;)(function(Dt){var Qt,Yt,Jt,lt=dn?Dt.ok:Dt.fail,Ue=Dt.resolve,Be=Dt.reject,tt=Dt.domain;try{lt?(dn||(wt._h==2&&rt(wt),wt._h=1),lt===!0?Qt=zt:(tt&&tt.enter(),Qt=lt(zt),tt&&(tt.exit(),Jt=!0)),Qt===Dt.promise?Be(De("Promise-chain cycle")):(Yt=_t(Qt))?Yt.call(Qt,Ue,Be):Ue(Qt)):Be(zt)}catch(ht){tt&&!Jt&&tt.exit(),Be(ht)}})(Ut[Ft++]);wt._c=[],wt._n=!1,xt&&!wt._h&&Rt(wt)})}},Rt=function(wt){ae.call(pe,function(){var xt,Ut,zt,dn=wt._v,Ft=ut(wt);if(Ft&&(xt=ve(function(){mt?Oe.emit("unhandledRejection",dn,wt):(Ut=pe.onunhandledrejection)?Ut({promise:wt,reason:dn}):(zt=pe.console)&&zt.error&&zt.error("Unhandled promise rejection",dn)}),wt._h=mt||ut(wt)?2:1),wt._a=void 0,Ft&&xt.e)throw xt.v})},ut=function(wt){return wt._h!==1&&(wt._a||wt._c).length===0},rt=function(wt){ae.call(pe,function(){var xt;mt?Oe.emit("rejectionHandled",wt):(xt=pe.onrejectionhandled)&&xt({promise:wt,reason:wt._v})})},ct=function(wt){var xt=this;xt._d||(xt._d=!0,xt=xt._w||xt,xt._v=wt,xt._s=2,xt._a||(xt._a=xt._c.slice()),dt(xt,!0))},yt=function(wt){var xt,Ut=this;if(!Ut._d){Ut._d=!0,Ut=Ut._w||Ut;try{if(Ut===wt)throw De("Promise can't be resolved itself");(xt=_t(wt))?le(function(){var zt={_w:Ut,_d:!1};try{xt.call(wt,de(yt,zt,1),de(ct,zt,1))}catch(dn){ct.call(zt,dn)}}):(Ut._v=wt,Ut._s=1,dt(Ut,!1))}catch(zt){ct.call({_w:Ut,_d:!1},zt)}}};at||(Xe=function(wt){z(this,Xe,"Promise","_h"),ee(wt),Ce.call(this);try{wt(de(yt,this,1),de(ct,this,1))}catch(xt){ct.call(this,xt)}},Ce=function(wt){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},Ce.prototype=Se("./_redefine-all")(Xe.prototype,{then:function(wt,xt){var Ut=Mt(re(this,Xe));return Ut.ok=typeof wt!="function"||wt,Ut.fail=typeof xt=="function"&&xt,Ut.domain=mt?Oe.domain:void 0,this._c.push(Ut),this._a&&this._a.push(Ut),this._s&&dt(this,!1),Ut.promise},catch:function(wt){return this.then(void 0,wt)}}),be=function(){var wt=new Ce;this.promise=wt,this.resolve=de(yt,wt,1),this.reject=de(ct,wt,1)},me.f=Mt=function(wt){return wt===Xe||wt===ye?new be(wt):xe(wt)}),fe(fe.G+fe.W+fe.F*!at,{Promise:Xe}),Se("./_set-to-string-tag")(Xe,"Promise"),Se("./_set-species")("Promise"),ye=Se("./_core").Promise,fe(fe.S+fe.F*!at,"Promise",{reject:function(wt){var xt=Mt(this);return(0,xt.reject)(wt),xt.promise}}),fe(fe.S+fe.F*(we||!at),"Promise",{resolve:function(wt){return Ae(we&&this===ye?Xe:this,wt)}}),fe(fe.S+fe.F*!(at&&Se("./_iter-detect")(function(wt){Xe.all(wt).catch(pt)})),"Promise",{all:function(wt){var xt=this,Ut=Mt(xt),zt=Ut.resolve,dn=Ut.reject,Ft=ve(function(){var Dt=[],Qt=0,Yt=1;oe(wt,!1,function(Jt){var lt=Qt++,Ue=!1;Dt.push(void 0),Yt++,xt.resolve(Jt).then(function(Be){Ue||(Ue=!0,Dt[lt]=Be,--Yt||zt(Dt))},dn)}),--Yt||zt(Dt)});return Ft.e&&dn(Ft.v),Ut.promise},race:function(wt){var xt=this,Ut=Mt(xt),zt=Ut.reject,dn=ve(function(){oe(wt,!1,function(Ft){xt.resolve(Ft).then(Ut.resolve,zt)})});return dn.e&&zt(dn.v),Ut.promise}})},{"./_a-function":58,"./_an-instance":60,"./_classof":63,"./_core":65,"./_ctx":67,"./_export":73,"./_for-of":75,"./_global":76,"./_is-object":85,"./_iter-detect":89,"./_library":92,"./_microtask":94,"./_new-promise-capability":95,"./_perform":109,"./_promise-resolve":110,"./_redefine-all":112,"./_set-species":114,"./_set-to-string-tag":115,"./_species-constructor":118,"./_task":120,"./_user-agent":128,"./_wks":131}],144:[function(Se,je,Me){var Ce=Se("./_export"),xe=Se("./_to-absolute-index"),be=String.fromCharCode,ye=String.fromCodePoint;Ce(Ce.S+Ce.F*(!!ye&&ye.length!=1),"String",{fromCodePoint:function(we){for(var pe,de=[],ge=arguments.length,fe=0;ge>fe;){if(pe=+arguments[fe++],xe(pe,1114111)!==pe)throw RangeError(pe+" is not a valid code point");de.push(pe<65536?be(pe):be(55296+((pe-=65536)>>10),pe%1024+56320))}return de.join("")}})},{"./_export":73,"./_to-absolute-index":121}],145:[function(Se,je,Me){"use strict";var Ce=Se("./_string-at")(!0);Se("./_iter-define")(String,"String",function(xe){this._t=String(xe),this._i=0},function(){var xe,be=this._t,ye=this._i;return ye>=be.length?{value:void 0,done:!0}:(xe=Ce(be,ye),this._i+=xe.length,{value:xe,done:!1})})},{"./_iter-define":88,"./_string-at":119}],146:[function(Se,je,Me){"use strict";var Ce=Se("./_global"),xe=Se("./_has"),be=Se("./_descriptors"),ye=Se("./_export"),we=Se("./_redefine"),pe=Se("./_meta").KEY,de=Se("./_fails"),ge=Se("./_shared"),fe=Se("./_set-to-string-tag"),ue=Se("./_uid"),ee=Se("./_wks"),z=Se("./_wks-ext"),oe=Se("./_wks-define"),re=Se("./_enum-keys"),ae=Se("./_is-array"),le=Se("./_an-object"),me=Se("./_is-object"),ve=Se("./_to-iobject"),Pe=Se("./_to-primitive"),Ae=Se("./_property-desc"),De=Se("./_object-create"),Oe=Se("./_object-gopn-ext"),Ze=Se("./_object-gopd"),qe=Se("./_object-dp"),Xe=Se("./_object-keys"),mt=Ze.f,pt=qe.f,Mt=Oe.f,at=Ce.Symbol,_t=Ce.JSON,dt=_t&&_t.stringify,Rt=ee("_hidden"),ut=ee("toPrimitive"),rt={}.propertyIsEnumerable,ct=ge("symbol-registry"),yt=ge("symbols"),wt=ge("op-symbols"),xt=Object.prototype,Ut=typeof at=="function",zt=Ce.QObject,dn=!zt||!zt.prototype||!zt.prototype.findChild,Ft=be&&de(function(){return De(pt({},"a",{get:function(){return pt(this,"a",{value:7}).a}})).a!=7})?function(it,Ke,We){var vt=mt(xt,Ke);vt&&delete xt[Ke],pt(it,Ke,We),vt&&it!==xt&&pt(xt,Ke,vt)}:pt,Dt=function(it){var Ke=yt[it]=De(at.prototype);return Ke._k=it,Ke},Qt=Ut&&typeof at.iterator=="symbol"?function(it){return typeof it=="symbol"}:function(it){return it instanceof at},Yt=function(it,Ke,We){return it===xt&&Yt(wt,Ke,We),le(it),Ke=Pe(Ke,!0),le(We),xe(yt,Ke)?(We.enumerable?(xe(it,Rt)&&it[Rt][Ke]&&(it[Rt][Ke]=!1),We=De(We,{enumerable:Ae(0,!1)})):(xe(it,Rt)||pt(it,Rt,Ae(1,{})),it[Rt][Ke]=!0),Ft(it,Ke,We)):pt(it,Ke,We)},Jt=function(it,Ke){le(it);for(var We,vt=re(Ke=ve(Ke)),kt=0,hn=vt.length;hn>kt;)Yt(it,We=vt[kt++],Ke[We]);return it},lt=function(it,Ke){return Ke===void 0?De(it):Jt(De(it),Ke)},Ue=function(it){var Ke=rt.call(this,it=Pe(it,!0));return!(this===xt&&xe(yt,it)&&!xe(wt,it))&&(!(Ke||!xe(this,it)||!xe(yt,it)||xe(this,Rt)&&this[Rt][it])||Ke)},Be=function(it,Ke){if(it=ve(it),Ke=Pe(Ke,!0),it!==xt||!xe(yt,Ke)||xe(wt,Ke)){var We=mt(it,Ke);return!We||!xe(yt,Ke)||xe(it,Rt)&&it[Rt][Ke]||(We.enumerable=!0),We}},tt=function(it){for(var Ke,We=Mt(ve(it)),vt=[],kt=0;We.length>kt;)xe(yt,Ke=We[kt++])||Ke==Rt||Ke==pe||vt.push(Ke);return vt},ht=function(it){for(var Ke,We=it===xt,vt=Mt(We?wt:ve(it)),kt=[],hn=0;vt.length>hn;)!xe(yt,Ke=vt[hn++])||We&&!xe(xt,Ke)||kt.push(yt[Ke]);return kt};Ut||(at=function(){if(this instanceof at)throw TypeError("Symbol is not a constructor!");var it=ue(arguments.length>0?arguments[0]:void 0),Ke=function(We){this===xt&&Ke.call(wt,We),xe(this,Rt)&&xe(this[Rt],it)&&(this[Rt][it]=!1),Ft(this,it,Ae(1,We))};return be&&dn&&Ft(xt,it,{configurable:!0,set:Ke}),Dt(it)},we(at.prototype,"toString",function(){return this._k}),Ze.f=Be,qe.f=Yt,Se("./_object-gopn").f=Oe.f=tt,Se("./_object-pie").f=Ue,Se("./_object-gops").f=ht,be&&!Se("./_library")&&we(xt,"propertyIsEnumerable",Ue,!0),z.f=function(it){return Dt(ee(it))}),ye(ye.G+ye.W+ye.F*!Ut,{Symbol:at});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Ve=0;et.length>Ve;)ee(et[Ve++]);for(var Re=Xe(ee.store),ze=0;Re.length>ze;)oe(Re[ze++]);ye(ye.S+ye.F*!Ut,"Symbol",{for:function(it){return xe(ct,it+="")?ct[it]:ct[it]=at(it)},keyFor:function(it){if(!Qt(it))throw TypeError(it+" is not a symbol!");for(var Ke in ct)if(ct[Ke]===it)return Ke},useSetter:function(){dn=!0},useSimple:function(){dn=!1}}),ye(ye.S+ye.F*!Ut,"Object",{create:lt,defineProperty:Yt,defineProperties:Jt,getOwnPropertyDescriptor:Be,getOwnPropertyNames:tt,getOwnPropertySymbols:ht}),_t&&ye(ye.S+ye.F*(!Ut||de(function(){var it=at();return dt([it])!="[null]"||dt({a:it})!="{}"||dt(Object(it))!="{}"})),"JSON",{stringify:function(it){for(var Ke,We,vt=[it],kt=1;arguments.length>kt;)vt.push(arguments[kt++]);if(We=Ke=vt[1],(me(Ke)||it!==void 0)&&!Qt(it))return ae(Ke)||(Ke=function(hn,en){if(typeof We=="function"&&(en=We.call(this,hn,en)),!Qt(en))return en}),vt[1]=Ke,dt.apply(_t,vt)}}),at.prototype[ut]||Se("./_hide")(at.prototype,ut,at.prototype.valueOf),fe(at,"Symbol"),fe(Math,"Math",!0),fe(Ce.JSON,"JSON",!0)},{"./_an-object":61,"./_descriptors":69,"./_enum-keys":72,"./_export":73,"./_fails":74,"./_global":76,"./_has":77,"./_hide":78,"./_is-array":84,"./_is-object":85,"./_library":92,"./_meta":93,"./_object-create":97,"./_object-dp":98,"./_object-gopd":100,"./_object-gopn":102,"./_object-gopn-ext":101,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_property-desc":111,"./_redefine":113,"./_set-to-string-tag":115,"./_shared":117,"./_to-iobject":123,"./_to-primitive":126,"./_uid":127,"./_wks":131,"./_wks-define":129,"./_wks-ext":130}],147:[function(Se,je,Me){"use strict";var Ce=Se("./_export"),xe=Se("./_core"),be=Se("./_global"),ye=Se("./_species-constructor"),we=Se("./_promise-resolve");Ce(Ce.P+Ce.R,"Promise",{finally:function(pe){var de=ye(this,xe.Promise||be.Promise),ge=typeof pe=="function";return this.then(ge?function(fe){return we(de,pe()).then(function(){return fe})}:pe,ge?function(fe){return we(de,pe()).then(function(){throw fe})}:pe)}})},{"./_core":65,"./_export":73,"./_global":76,"./_promise-resolve":110,"./_species-constructor":118}],148:[function(Se,je,Me){"use strict";var Ce=Se("./_export"),xe=Se("./_new-promise-capability"),be=Se("./_perform");Ce(Ce.S,"Promise",{try:function(ye){var we=xe.f(this),pe=be(ye);return(pe.e?we.reject:we.resolve)(pe.v),we.promise}})},{"./_export":73,"./_new-promise-capability":95,"./_perform":109}],149:[function(Se,je,Me){Se("./_wks-define")("asyncIterator")},{"./_wks-define":129}],150:[function(Se,je,Me){Se("./_wks-define")("observable")},{"./_wks-define":129}],151:[function(Se,je,Me){Se("./es6.array.iterator");for(var Ce=Se("./_global"),xe=Se("./_hide"),be=Se("./_iterators"),ye=Se("./_wks")("toStringTag"),we="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),pe=0;pe<we.length;pe++){var de=we[pe],ge=Ce[de],fe=ge&&ge.prototype;fe&&!fe[ye]&&xe(fe,ye,de),be[de]=be.Array}},{"./_global":76,"./_hide":78,"./_iterators":91,"./_wks":131,"./es6.array.iterator":134}],152:[function(Se,je,Me){var Ce=Se("./_export"),xe=Se("./_task");Ce(Ce.G+Ce.B,{setImmediate:xe.set,clearImmediate:xe.clear})},{"./_export":73,"./_task":120}],153:[function(Se,je,Me){(function(Ce){"use strict";function xe(Pe){return Array.isArray?Array.isArray(Pe):le(Pe)==="[object Array]"}function be(Pe){return typeof Pe=="boolean"}function ye(Pe){return Pe===null}function we(Pe){return Pe==null}function pe(Pe){return typeof Pe=="number"}function de(Pe){return typeof Pe=="string"}function ge(Pe){return(Pe===void 0?"undefined":(0,ve.default)(Pe))==="symbol"}function fe(Pe){return Pe===void 0}function ue(Pe){return le(Pe)==="[object RegExp]"}function ee(Pe){return(Pe===void 0?"undefined":(0,ve.default)(Pe))==="object"&&Pe!==null}function z(Pe){return le(Pe)==="[object Date]"}function oe(Pe){return le(Pe)==="[object Error]"||Pe instanceof Error}function re(Pe){return typeof Pe=="function"}function ae(Pe){return Pe===null||typeof Pe=="boolean"||typeof Pe=="number"||typeof Pe=="string"||(Pe===void 0?"undefined":(0,ve.default)(Pe))==="symbol"||Pe===void 0}function le(Pe){return Object.prototype.toString.call(Pe)}var me=Se("babel-runtime/helpers/typeof"),ve=function(Pe){return Pe&&Pe.__esModule?Pe:{default:Pe}}(me);Me.isArray=xe,Me.isBoolean=be,Me.isNull=ye,Me.isNullOrUndefined=we,Me.isNumber=pe,Me.isString=de,Me.isSymbol=ge,Me.isUndefined=fe,Me.isRegExp=ue,Me.isObject=ee,Me.isDate=z,Me.isError=oe,Me.isFunction=re,Me.isPrimitive=ae,Me.isBuffer=Ce.isBuffer}).call(this,{isBuffer:Se("../../is-buffer/index.js")})},{"../../is-buffer/index.js":163,"babel-runtime/helpers/typeof":32}],154:[function(Se,je,Me){"use strict";var Ce=Se("babel-runtime/helpers/typeof"),xe=function(be){return be&&be.__esModule?be:{default:be}}(Ce);(function(be){function ye(fe,ue){for(fe=String(fe),ue=ue||2;fe.length<ue;)fe="0"+fe;return fe}function we(fe){var ue=new Date(fe.getFullYear(),fe.getMonth(),fe.getDate());ue.setDate(ue.getDate()-(ue.getDay()+6)%7+3);var ee=new Date(ue.getFullYear(),0,4);ee.setDate(ee.getDate()-(ee.getDay()+6)%7+3);var z=ue.getTimezoneOffset()-ee.getTimezoneOffset();ue.setHours(ue.getHours()-z);var oe=(ue-ee)/6048e5;return 1+Math.floor(oe)}function pe(fe){var ue=fe.getDay();return ue===0&&(ue=7),ue}function de(fe){return fe===null?"null":fe===void 0?"undefined":(fe===void 0?"undefined":(0,xe.default)(fe))!=="object"?fe===void 0?"undefined":(0,xe.default)(fe):Array.isArray(fe)?"array":{}.toString.call(fe).slice(8,-1).toLowerCase()}var ge=function(){var fe=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,ue=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,ee=/[^-+\dA-Z]/g;return function(z,oe,re,ae){if(arguments.length!==1||de(z)!=="string"||/\d/.test(z)||(oe=z,z=void 0),z=z||new Date,z instanceof Date||(z=new Date(z)),isNaN(z))throw TypeError("Invalid date");oe=String(ge.masks[oe]||oe||ge.masks.default);var le=oe.slice(0,4);le!=="UTC:"&&le!=="GMT:"||(oe=oe.slice(4),re=!0,le==="GMT:"&&(ae=!0));var me=re?"getUTC":"get",ve=z[me+"Date"](),Pe=z[me+"Day"](),Ae=z[me+"Month"](),De=z[me+"FullYear"](),Oe=z[me+"Hours"](),Ze=z[me+"Minutes"](),qe=z[me+"Seconds"](),Xe=z[me+"Milliseconds"](),mt=re?0:z.getTimezoneOffset(),pt=we(z),Mt=pe(z),at={d:ve,dd:ye(ve),ddd:ge.i18n.dayNames[Pe],dddd:ge.i18n.dayNames[Pe+7],m:Ae+1,mm:ye(Ae+1),mmm:ge.i18n.monthNames[Ae],mmmm:ge.i18n.monthNames[Ae+12],yy:String(De).slice(2),yyyy:De,h:Oe%12||12,hh:ye(Oe%12||12),H:Oe,HH:ye(Oe),M:Ze,MM:ye(Ze),s:qe,ss:ye(qe),l:ye(Xe,3),L:ye(Math.round(Xe/10)),t:Oe<12?"a":"p",tt:Oe<12?"am":"pm",T:Oe<12?"A":"P",TT:Oe<12?"AM":"PM",Z:ae?"GMT":re?"UTC":(String(z).match(ue)||[""]).pop().replace(ee,""),o:(mt>0?"-":"+")+ye(100*Math.floor(Math.abs(mt)/60)+Math.abs(mt)%60,4),S:["th","st","nd","rd"][ve%10>3?0:(ve%100-ve%10!=10)*ve%10],W:pt,N:Mt};return oe.replace(fe,function(_t){return _t in at?at[_t]:_t.slice(1,_t.length-1)})}}();ge.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},ge.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},typeof Le=="function"&&Le.amd?Le(function(){return ge}):(Me===void 0?"undefined":(0,xe.default)(Me))==="object"?je.exports=ge:be.dateFormat=ge})(void 0)},{"babel-runtime/helpers/typeof":32}],155:[function(Se,je,Me){(function(Ce){function xe(){return!(typeof window=="undefined"||!window.process||window.process.type!=="renderer")||typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function be(de){var ge=this.useColors;if(de[0]=(ge?"%c":"")+this.namespace+(ge?" %c":" ")+de[0]+(ge?"%c ":" ")+"+"+Me.humanize(this.diff),ge){var fe="color: "+this.color;de.splice(1,0,fe,"color: inherit");var ue=0,ee=0;de[0].replace(/%[a-zA-Z%]/g,function(z){z!=="%%"&&(ue++,z==="%c"&&(ee=ue))}),de.splice(ee,0,fe)}}function ye(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function we(de){try{de==null?Me.storage.removeItem("debug"):Me.storage.debug=de}catch(ge){}}function pe(){var de;try{de=Me.storage.debug}catch(ge){}return!de&&Ce!==void 0&&"env"in Ce&&(de=Ce.env.DEBUG),de}Me=je.exports=Se("./debug"),Me.log=ye,Me.formatArgs=be,Me.save=we,Me.load=pe,Me.useColors=xe,Me.storage=typeof chrome!="undefined"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch(de){}}(),Me.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],Me.formatters.j=function(de){try{return JSON.stringify(de)}catch(ge){return"[UnexpectedJSONParseError]: "+ge.message}},Me.enable(pe())}).call(this,Se("_process"))},{"./debug":156,_process:173}],156:[function(Se,je,Me){function Ce(ge){var fe,ue=0;for(fe in ge)ue=(ue<<5)-ue+ge.charCodeAt(fe),ue|=0;return Me.colors[Math.abs(ue)%Me.colors.length]}function xe(ge){function fe(){if(fe.enabled){var ue=fe,ee=+new Date,z=ee-(de||ee);ue.diff=z,ue.prev=de,ue.curr=ee,de=ee;for(var oe=new Array(arguments.length),re=0;re<oe.length;re++)oe[re]=arguments[re];oe[0]=Me.coerce(oe[0]),typeof oe[0]!="string"&&oe.unshift("%O");var ae=0;oe[0]=oe[0].replace(/%([a-zA-Z%])/g,function(le,me){if(le==="%%")return le;ae++;var ve=Me.formatters[me];if(typeof ve=="function"){var Pe=oe[ae];le=ve.call(ue,Pe),oe.splice(ae,1),ae--}return le}),Me.formatArgs.call(ue,oe),(fe.log||Me.log||console.log.bind(console)).apply(ue,oe)}}return fe.namespace=ge,fe.enabled=Me.enabled(ge),fe.useColors=Me.useColors(),fe.color=Ce(ge),typeof Me.init=="function"&&Me.init(fe),fe}function be(ge){Me.save(ge),Me.names=[],Me.skips=[];for(var fe=(typeof ge=="string"?ge:"").split(/[\s,]+/),ue=fe.length,ee=0;ee<ue;ee++)fe[ee]&&(ge=fe[ee].replace(/\*/g,".*?"),ge[0]==="-"?Me.skips.push(new RegExp("^"+ge.substr(1)+"$")):Me.names.push(new RegExp("^"+ge+"$")))}function ye(){Me.enable("")}function we(ge){var fe,ue;for(fe=0,ue=Me.skips.length;fe<ue;fe++)if(Me.skips[fe].test(ge))return!1;for(fe=0,ue=Me.names.length;fe<ue;fe++)if(Me.names[fe].test(ge))return!0;return!1}function pe(ge){return ge instanceof Error?ge.stack||ge.message:ge}Me=je.exports=xe.debug=xe.default=xe,Me.coerce=pe,Me.disable=ye,Me.enable=be,Me.enabled=we,Me.humanize=Se("ms"),Me.names=[],Me.skips=[],Me.formatters={};var de},{ms:169}],157:[function(Se,je,Me){"use strict";function Ce(be){var ye=""+be,we=xe.exec(ye);if(!we)return ye;var pe,de="",ge=0,fe=0;for(ge=we.index;ge<ye.length;ge++){switch(ye.charCodeAt(ge)){case 34:pe=""";break;case 38:pe="&";break;case 39:pe="'";break;case 60:pe="<";break;case 62:pe=">";break;default:continue}fe!==ge&&(de+=ye.substring(fe,ge)),fe=ge+1,de+=pe}return fe!==ge?de+ye.substring(fe,ge):de}var xe=/["'&<>]/;je.exports=Ce},{}],158:[function(Se,je,Me){function Ce(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function xe(pe){return typeof pe=="function"}function be(pe){return typeof pe=="number"}function ye(pe){return typeof pe=="object"&&pe!==null}function we(pe){return pe===void 0}je.exports=Ce,Ce.EventEmitter=Ce,Ce.prototype._events=void 0,Ce.prototype._maxListeners=void 0,Ce.defaultMaxListeners=10,Ce.prototype.setMaxListeners=function(pe){if(!be(pe)||pe<0||isNaN(pe))throw TypeError("n must be a positive number");return this._maxListeners=pe,this},Ce.prototype.emit=function(pe){var de,ge,fe,ue,ee,z;if(this._events||(this._events={}),pe==="error"&&(!this._events.error||ye(this._events.error)&&!this._events.error.length)){if((de=arguments[1])instanceof Error)throw de;var oe=new Error('Uncaught, unspecified "error" event. ('+de+")");throw oe.context=de,oe}if(ge=this._events[pe],we(ge))return!1;if(xe(ge))switch(arguments.length){case 1:ge.call(this);break;case 2:ge.call(this,arguments[1]);break;case 3:ge.call(this,arguments[1],arguments[2]);break;default:ue=Array.prototype.slice.call(arguments,1),ge.apply(this,ue)}else if(ye(ge))for(ue=Array.prototype.slice.call(arguments,1),z=ge.slice(),fe=z.length,ee=0;ee<fe;ee++)z[ee].apply(this,ue);return!0},Ce.prototype.addListener=function(pe,de){var ge;if(!xe(de))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",pe,xe(de.listener)?de.listener:de),this._events[pe]?ye(this._events[pe])?this._events[pe].push(de):this._events[pe]=[this._events[pe],de]:this._events[pe]=de,ye(this._events[pe])&&!this._events[pe].warned&&(ge=we(this._maxListeners)?Ce.defaultMaxListeners:this._maxListeners)&&ge>0&&this._events[pe].length>ge&&(this._events[pe].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[pe].length),typeof console.trace=="function"&&console.trace()),this},Ce.prototype.on=Ce.prototype.addListener,Ce.prototype.once=function(pe,de){function ge(){this.removeListener(pe,ge),fe||(fe=!0,de.apply(this,arguments))}if(!xe(de))throw TypeError("listener must be a function");var fe=!1;return ge.listener=de,this.on(pe,ge),this},Ce.prototype.removeListener=function(pe,de){var ge,fe,ue,ee;if(!xe(de))throw TypeError("listener must be a function");if(!this._events||!this._events[pe])return this;if(ge=this._events[pe],ue=ge.length,fe=-1,ge===de||xe(ge.listener)&&ge.listener===de)delete this._events[pe],this._events.removeListener&&this.emit("removeListener",pe,de);else if(ye(ge)){for(ee=ue;ee-- >0;)if(ge[ee]===de||ge[ee].listener&&ge[ee].listener===de){fe=ee;break}if(fe<0)return this;ge.length===1?(ge.length=0,delete this._events[pe]):ge.splice(fe,1),this._events.removeListener&&this.emit("removeListener",pe,de)}return this},Ce.prototype.removeAllListeners=function(pe){var de,ge;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[pe]&&delete this._events[pe],this;if(arguments.length===0){for(de in this._events)de!=="removeListener"&&this.removeAllListeners(de);return this.removeAllListeners("removeListener"),this._events={},this}if(ge=this._events[pe],xe(ge))this.removeListener(pe,ge);else if(ge)for(;ge.length;)this.removeListener(pe,ge[ge.length-1]);return delete this._events[pe],this},Ce.prototype.listeners=function(pe){return this._events&&this._events[pe]?xe(this._events[pe])?[this._events[pe]]:this._events[pe].slice():[]},Ce.prototype.listenerCount=function(pe){if(this._events){var de=this._events[pe];if(xe(de))return 1;if(de)return de.length}return 0},Ce.listenerCount=function(pe,de){return pe.listenerCount(de)}},{}],159:[function(Se,je,Me){var Ce=Se("http"),xe=je.exports;for(var be in Ce)Ce.hasOwnProperty(be)&&(xe[be]=Ce[be]);xe.request=function(ye,we){return ye||(ye={}),ye.scheme="https",ye.protocol="https:",Ce.request.call(this,ye,we)}},{http:196}],160:[function(Se,je,Me){"use strict";var Ce=Se("util"),xe=Se("ms");je.exports=function(be){if(typeof be=="number")return be;var ye=xe(be);if(ye===void 0){var we=new Error(Ce.format("humanize-ms(%j) result undefined",be));console.warn(we.stack)}return ye}},{ms:169,util:207}],161:[function(Se,je,Me){Me.read=function(Ce,xe,be,ye,we){var pe,de,ge=8*we-ye-1,fe=(1<<ge)-1,ue=fe>>1,ee=-7,z=be?we-1:0,oe=be?-1:1,re=Ce[xe+z];for(z+=oe,pe=re&(1<<-ee)-1,re>>=-ee,ee+=ge;ee>0;pe=256*pe+Ce[xe+z],z+=oe,ee-=8);for(de=pe&(1<<-ee)-1,pe>>=-ee,ee+=ye;ee>0;de=256*de+Ce[xe+z],z+=oe,ee-=8);if(pe===0)pe=1-ue;else{if(pe===fe)return de?NaN:1/0*(re?-1:1);de+=Math.pow(2,ye),pe-=ue}return(re?-1:1)*de*Math.pow(2,pe-ye)},Me.write=function(Ce,xe,be,ye,we,pe){var de,ge,fe,ue=8*pe-we-1,ee=(1<<ue)-1,z=ee>>1,oe=we===23?Math.pow(2,-24)-Math.pow(2,-77):0,re=ye?0:pe-1,ae=ye?1:-1,le=xe<0||xe===0&&1/xe<0?1:0;for(xe=Math.abs(xe),isNaN(xe)||xe===1/0?(ge=isNaN(xe)?1:0,de=ee):(de=Math.floor(Math.log(xe)/Math.LN2),xe*(fe=Math.pow(2,-de))<1&&(de--,fe*=2),xe+=de+z>=1?oe/fe:oe*Math.pow(2,1-z),xe*fe>=2&&(de++,fe/=2),de+z>=ee?(ge=0,de=ee):de+z>=1?(ge=(xe*fe-1)*Math.pow(2,we),de+=z):(ge=xe*Math.pow(2,z-1)*Math.pow(2,we),de=0));we>=8;Ce[be+re]=255&ge,re+=ae,ge/=256,we-=8);for(de=de<<we|ge,ue+=we;ue>0;Ce[be+re]=255&de,re+=ae,de/=256,ue-=8);Ce[be+re-ae]|=128*le}},{}],162:[function(Se,je,Me){typeof Object.create=="function"?je.exports=function(Ce,xe){Ce.super_=xe,Ce.prototype=Object.create(xe.prototype,{constructor:{value:Ce,enumerable:!1,writable:!0,configurable:!0}})}:je.exports=function(Ce,xe){Ce.super_=xe;var be=function(){};be.prototype=xe.prototype,Ce.prototype=new be,Ce.prototype.constructor=Ce}},{}],163:[function(Se,je,Me){function Ce(be){return!!be.constructor&&typeof be.constructor.isBuffer=="function"&&be.constructor.isBuffer(be)}function xe(be){return typeof be.readFloatLE=="function"&&typeof be.slice=="function"&&Ce(be.slice(0,0))}je.exports=function(be){return be!=null&&(Ce(be)||xe(be)||!!be._isBuffer)}},{}],164:[function(Se,je,Me){(function(Ce){function xe(we){return ye.call(we).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}function be(we){return typeof we=="function"&&(/^class(\s|\{\}$)/.test(ye.call(we))||/^.*classCallCheck\(/.test(xe(we)))}var ye=Function.prototype.toString;Me!==void 0?(je!==void 0&&je.exports&&(Me=je.exports=be),Me.isClass=be):typeof Le=="function"&&Le.amd?Le([],function(){return be}):Ce.isClass=be})(this)},{}],165:[function(Se,je,Me){"use strict";function Ce(pe){var de=pe.slice(2);return de=de[0].toLowerCase()+de.slice(1)}var xe=Se("core-util-is"),be=Se("isstream"),ye=Se("is-class");Object.keys(xe).map(function(pe){Me[Ce(pe)]=xe[pe]}),Me.stream=be,Me.readableStream=be.isReadable,Me.writableStream=be.isWritable,Me.duplexStream=be.isDuplex,Me.class=ye,Me.finite=function(pe){return Number.isFinite(pe)},Me.NaN=function(pe){return Number.isNaN(pe)},Me.generator=function(pe){return pe&&typeof pe.next=="function"&&typeof pe.throw=="function"},Me.generatorFunction=function(pe){return pe&&pe.constructor&&pe.constructor.name==="GeneratorFunction"},Me.asyncFunction=function(pe){return pe&&pe.constructor&&pe.constructor.name==="AsyncFunction"},Me.promise=function(pe){return pe&&typeof pe.then=="function"};var we=Math.pow(2,31);Me.int=function(pe){return xe.isNumber(pe)&&pe%1==0},Me.int32=function(pe){return Me.int(pe)&&pe<we&&pe>=-we},Me.long=function(pe){return Me.int(pe)&&(pe>=we||pe<-we)},Me.Long=function(pe){return Me.object(pe)&&Me.number(pe.high)&&Me.number(pe.low)},Me.double=function(pe){return xe.isNumber(pe)&&!isNaN(pe)&&pe%1!=0},Me.date=function(pe){return pe instanceof Date},Me.regExp=function(pe){return pe instanceof RegExp},Me.regexp=Me.regExp,Me.error=function(pe){return pe instanceof Error},Me.array=function(pe){return Array.isArray(pe)}},{"core-util-is":153,"is-class":164,isstream:167}],166:[function(Se,je,Me){var Ce={}.toString;je.exports=Array.isArray||function(xe){return Ce.call(xe)=="[object Array]"}},{}],167:[function(Se,je,Me){function Ce(pe){return pe instanceof we.Stream}function xe(pe){return Ce(pe)&&typeof pe._read=="function"&&typeof pe._readableState=="object"}function be(pe){return Ce(pe)&&typeof pe._write=="function"&&typeof pe._writableState=="object"}function ye(pe){return xe(pe)&&be(pe)}var we=Se("stream");je.exports=Ce,je.exports.isReadable=xe,je.exports.isWritable=be,je.exports.isDuplex=ye},{stream:195}],168:[function(Se,je,Me){"use strict";function Ce(be,ye,we){if(!be)throw new TypeError("argument dest is required");if(!ye)throw new TypeError("argument src is required");return we===void 0&&(we=!0),Object.getOwnPropertyNames(ye).forEach(function(pe){if(we||!xe.call(be,pe)){var de=Object.getOwnPropertyDescriptor(ye,pe);Object.defineProperty(be,pe,de)}}),be}je.exports=Ce;var xe=Object.prototype.hasOwnProperty},{}],169:[function(Se,je,Me){function Ce(ue){if(ue=String(ue),!(ue.length>100)){var ee=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(ue);if(ee){var z=parseFloat(ee[1]);switch((ee[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return z*fe;case"days":case"day":case"d":return z*ge;case"hours":case"hour":case"hrs":case"hr":case"h":return z*de;case"minutes":case"minute":case"mins":case"min":case"m":return z*pe;case"seconds":case"second":case"secs":case"sec":case"s":return z*we;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return z;default:return}}}}function xe(ue){return ue>=ge?Math.round(ue/ge)+"d":ue>=de?Math.round(ue/de)+"h":ue>=pe?Math.round(ue/pe)+"m":ue>=we?Math.round(ue/we)+"s":ue+"ms"}function be(ue){return ye(ue,ge,"day")||ye(ue,de,"hour")||ye(ue,pe,"minute")||ye(ue,we,"second")||ue+" ms"}function ye(ue,ee,z){if(!(ue<ee))return ue<1.5*ee?Math.floor(ue/ee)+" "+z:Math.ceil(ue/ee)+" "+z+"s"}var we=1e3,pe=60*we,de=60*pe,ge=24*de,fe=365.25*ge;je.exports=function(ue,ee){ee=ee||{};var z=typeof ue;if(z==="string"&&ue.length>0)return Ce(ue);if(z==="number"&&isNaN(ue)===!1)return ee.long?be(ue):xe(ue);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(ue))}},{}],170:[function(Se,je,Me){(function(Ce){function xe(pe,de){for(var ge=0,fe=pe.length-1;fe>=0;fe--){var ue=pe[fe];ue==="."?pe.splice(fe,1):ue===".."?(pe.splice(fe,1),ge++):ge&&(pe.splice(fe,1),ge--)}if(de)for(;ge--;ge)pe.unshift("..");return pe}function be(pe){typeof pe!="string"&&(pe+="");var de,ge=0,fe=-1,ue=!0;for(de=pe.length-1;de>=0;--de)if(pe.charCodeAt(de)===47){if(!ue){ge=de+1;break}}else fe===-1&&(ue=!1,fe=de+1);return fe===-1?"":pe.slice(ge,fe)}function ye(pe,de){if(pe.filter)return pe.filter(de);for(var ge=[],fe=0;fe<pe.length;fe++)de(pe[fe],fe,pe)&&ge.push(pe[fe]);return ge}Me.resolve=function(){for(var pe="",de=!1,ge=arguments.length-1;ge>=-1&&!de;ge--){var fe=ge>=0?arguments[ge]:Ce.cwd();if(typeof fe!="string")throw new TypeError("Arguments to path.resolve must be strings");fe&&(pe=fe+"/"+pe,de=fe.charAt(0)==="/")}return pe=xe(ye(pe.split("/"),function(ue){return!!ue}),!de).join("/"),(de?"/":"")+pe||"."},Me.normalize=function(pe){var de=Me.isAbsolute(pe),ge=we(pe,-1)==="/";return pe=xe(ye(pe.split("/"),function(fe){return!!fe}),!de).join("/"),pe||de||(pe="."),pe&&ge&&(pe+="/"),(de?"/":"")+pe},Me.isAbsolute=function(pe){return pe.charAt(0)==="/"},Me.join=function(){var pe=Array.prototype.slice.call(arguments,0);return Me.normalize(ye(pe,function(de,ge){if(typeof de!="string")throw new TypeError("Arguments to path.join must be strings");return de}).join("/"))},Me.relative=function(pe,de){function ge(ae){for(var le=0;le<ae.length&&ae[le]==="";le++);for(var me=ae.length-1;me>=0&&ae[me]==="";me--);return le>me?[]:ae.slice(le,me-le+1)}pe=Me.resolve(pe).substr(1),de=Me.resolve(de).substr(1);for(var fe=ge(pe.split("/")),ue=ge(de.split("/")),ee=Math.min(fe.length,ue.length),z=ee,oe=0;oe<ee;oe++)if(fe[oe]!==ue[oe]){z=oe;break}for(var re=[],oe=z;oe<fe.length;oe++)re.push("..");return re=re.concat(ue.slice(z)),re.join("/")},Me.sep="/",Me.delimiter=":",Me.dirname=function(pe){if(typeof pe!="string"&&(pe+=""),pe.length===0)return".";for(var de=pe.charCodeAt(0),ge=de===47,fe=-1,ue=!0,ee=pe.length-1;ee>=1;--ee)if((de=pe.charCodeAt(ee))===47){if(!ue){fe=ee;break}}else ue=!1;return fe===-1?ge?"/":".":ge&&fe===1?"/":pe.slice(0,fe)},Me.basename=function(pe,de){var ge=be(pe);return de&&ge.substr(-1*de.length)===de&&(ge=ge.substr(0,ge.length-de.length)),ge},Me.extname=function(pe){typeof pe!="string"&&(pe+="");for(var de=-1,ge=0,fe=-1,ue=!0,ee=0,z=pe.length-1;z>=0;--z){var oe=pe.charCodeAt(z);if(oe!==47)fe===-1&&(ue=!1,fe=z+1),oe===46?de===-1?de=z:ee!==1&&(ee=1):de!==-1&&(ee=-1);else if(!ue){ge=z+1;break}}return de===-1||fe===-1||ee===0||ee===1&&de===fe-1&&de===ge+1?"":pe.slice(de,fe)};var we=function(pe,de,ge){return pe.substr(de,ge)}}).call(this,Se("_process"))},{_process:173}],171:[function(Se,je,Me){(function(Ce){(function(){"use strict";function xe(qe){return qe=String(qe),qe.charAt(0).toUpperCase()+qe.slice(1)}function be(qe,Xe,mt){var pt={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return Xe&&mt&&/^Win/i.test(qe)&&!/^Windows Phone /i.test(qe)&&(pt=pt[/[\d.]+$/.exec(qe)])&&(qe="Windows "+pt),qe=String(qe),Xe&&mt&&(qe=qe.replace(RegExp(Xe,"i"),mt)),qe=we(qe.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}function ye(qe,Xe){var mt=-1,pt=qe?qe.length:0;if(typeof pt=="number"&&pt>-1&&pt<=ve)for(;++mt<pt;)Xe(qe[mt],mt,qe);else pe(qe,Xe)}function we(qe){return qe=ee(qe),/^(?:webOS|i(?:OS|P))/.test(qe)?qe:xe(qe)}function pe(qe,Xe){for(var mt in qe)De.call(qe,mt)&&Xe(qe[mt],mt,qe)}function de(qe){return qe==null?xe(qe):Oe.call(qe).slice(8,-1)}function ge(qe,Xe){var mt=qe!=null?typeof qe[Xe]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(mt)||mt=="object"&&!qe[Xe])}function fe(qe){return String(qe).replace(/([ -])(?!$)/g,"$1?")}function ue(qe,Xe){var mt=null;return ye(qe,function(pt,Mt){mt=Xe(mt,pt,Mt,qe)}),mt}function ee(qe){return String(qe).replace(/^ +| +$/g,"")}function z(qe){function Xe(it){return ue(it,function(Ke,We){var vt=We.pattern||fe(We);return!Ke&&(Ke=RegExp("\\b"+vt+" *\\d+[.\\w_]*","i").exec(qe)||RegExp("\\b"+vt+" *\\w+-[\\w]*","i").exec(qe)||RegExp("\\b"+vt+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(qe))&&((Ke=String(We.label&&!RegExp(vt,"i").test(We.label)?We.label:Ke).split("/"))[1]&&!/[\d.]+/.test(Ke[0])&&(Ke[0]+=" "+Ke[1]),We=We.label||We,Ke=we(Ke[0].replace(RegExp(vt,"i"),We).replace(RegExp("; *(?:"+We+"[_-])?","i")," ").replace(RegExp("("+We+")[-_.]?(\\w)","i"),"$1 $2"))),Ke})}function mt(){return this.description||""}var pt=re,Mt=qe&&typeof qe=="object"&&de(qe)!="String";Mt&&(pt=qe,qe=null);var at=pt.navigator||{},_t=at.userAgent||"";qe||(qe=_t);var dt,Rt,ut=Mt?!!at.likeChrome:/\bChrome\b/.test(qe)&&!/internal|\n/i.test(Oe.toString()),rt=Mt?"Object":"ScriptBridgingProxyObject",ct=Mt?"Object":"Environment",yt=Mt&&pt.java?"JavaPackage":de(pt.java),wt=Mt?"Object":"RuntimeObject",xt=/\bJava/.test(yt)&&pt.java,Ut=xt&&de(pt.environment)==ct,zt=xt?"a":"\u4F2A",dn=xt?"b":"\u5C3E",Ft=pt.document||{},Dt=pt.operamini||pt.opera,Qt=Pe.test(Qt=Mt&&Dt?Dt["[[Class]]"]:de(Dt))?Qt:Dt=null,Yt=qe,Jt=[],lt=null,Ue=qe==_t,Be=Ue&&Dt&&typeof Dt.version=="function"&&Dt.version(),tt=function(it){return ue(it,function(Ke,We){return Ke||RegExp("\\b"+(We.pattern||fe(We))+"\\b","i").exec(qe)&&(We.label||We)})}([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),ht=function(it){return ue(it,function(Ke,We){return Ke||RegExp("\\b"+(We.pattern||fe(We))+"\\b","i").exec(qe)&&(We.label||We)})}(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),et=Xe([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),Ve=function(it){return ue(it,function(Ke,We,vt){return Ke||(We[et]||We[/^[a-z]+(?: +[a-z]+\b)*/i.exec(et)]||RegExp("\\b"+fe(vt)+"(?:\\b|\\w*\\d)","i").exec(qe))&&vt})}({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),Re=function(it){return ue(it,function(Ke,We){var vt=We.pattern||fe(We);return!Ke&&(Ke=RegExp("\\b"+vt+"(?:/[\\d.]+|[ \\w.]*)","i").exec(qe))&&(Ke=be(Ke,vt,We.label||We)),Ke})}(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);if(tt&&(tt=[tt]),Ve&&!et&&(et=Xe([Ve])),(dt=/\bGoogle TV\b/.exec(et))&&(et=dt[0]),/\bSimulator\b/i.test(qe)&&(et=(et?et+" ":"")+"Simulator"),ht=="Opera Mini"&&/\bOPiOS\b/.test(qe)&&Jt.push("running in Turbo/Uncompressed mode"),ht=="IE"&&/\blike iPhone OS\b/.test(qe)?(dt=z(qe.replace(/like iPhone OS/,"")),Ve=dt.manufacturer,et=dt.product):/^iP/.test(et)?(ht||(ht="Safari"),Re="iOS"+((dt=/ OS ([\d_]+)/i.exec(qe))?" "+dt[1].replace(/_/g,"."):"")):ht!="Konqueror"||/buntu/i.test(Re)?Ve&&Ve!="Google"&&(/Chrome/.test(ht)&&!/\bMobile Safari\b/i.test(qe)||/\bVita\b/.test(et))||/\bAndroid\b/.test(Re)&&/^Chrome/.test(ht)&&/\bVersion\//i.test(qe)?(ht="Android Browser",Re=/\bAndroid\b/.test(Re)?Re:"Android"):ht=="Silk"?(/\bMobi/i.test(qe)||(Re="Android",Jt.unshift("desktop mode")),/Accelerated *= *true/i.test(qe)&&Jt.unshift("accelerated")):ht=="PaleMoon"&&(dt=/\bFirefox\/([\d.]+)\b/.exec(qe))?Jt.push("identifying as Firefox "+dt[1]):ht=="Firefox"&&(dt=/\b(Mobile|Tablet|TV)\b/i.exec(qe))?(Re||(Re="Firefox OS"),et||(et=dt[1])):!ht||(dt=!/\bMinefield\b/i.test(qe)&&/\b(?:Firefox|Safari)\b/.exec(ht))?(ht&&!et&&/[\/,]|^[^(]+?\)/.test(qe.slice(qe.indexOf(dt+"/")+8))&&(ht=null),(dt=et||Ve||Re)&&(et||Ve||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Re))&&(ht=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Re)?Re:dt)+" Browser")):ht=="Electron"&&(dt=(/\bChrome\/([\d.]+)\b/.exec(qe)||0)[1])&&Jt.push("Chromium "+dt):Re="Kubuntu",Be||(Be=function(it){return ue(it,function(Ke,We){return Ke||(RegExp(We+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(qe)||0)[1]||null})}(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",fe(ht),"(?:Firefox|Minefield|NetFront)"])),(dt=tt=="iCab"&&parseFloat(Be)>3&&"WebKit"||/\bOpera\b/.test(ht)&&(/\bOPR\b/.test(qe)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(qe)&&!/^(?:Trident|EdgeHTML)$/.test(tt)&&"WebKit"||!tt&&/\bMSIE\b/i.test(qe)&&(Re=="Mac OS"?"Tasman":"Trident")||tt=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(ht)&&"NetFront")&&(tt=[dt]),ht=="IE"&&(dt=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(qe)||0)[1])?(ht+=" Mobile",Re="Windows Phone "+(/\+$/.test(dt)?dt:dt+".x"),Jt.unshift("desktop mode")):/\bWPDesktop\b/i.test(qe)?(ht="IE Mobile",Re="Windows Phone 8.x",Jt.unshift("desktop mode"),Be||(Be=(/\brv:([\d.]+)/.exec(qe)||0)[1])):ht!="IE"&&tt=="Trident"&&(dt=/\brv:([\d.]+)/.exec(qe))&&(ht&&Jt.push("identifying as "+ht+(Be?" "+Be:"")),ht="IE",Be=dt[1]),Ue){if(ge(pt,"global"))if(xt&&(dt=xt.lang.System,Yt=dt.getProperty("os.arch"),Re=Re||dt.getProperty("os.name")+" "+dt.getProperty("os.version")),Ut){try{Be=pt.require("ringo/engine").version.join("."),ht="RingoJS"}catch(it){(dt=pt.system)&&dt.global.system==pt.system&&(ht="Narwhal",Re||(Re=dt[0].os||null))}ht||(ht="Rhino")}else typeof pt.process=="object"&&!pt.process.browser&&(dt=pt.process)&&(typeof dt.versions=="object"&&(typeof dt.versions.electron=="string"?(Jt.push("Node "+dt.versions.node),ht="Electron",Be=dt.versions.electron):typeof dt.versions.nw=="string"&&(Jt.push("Chromium "+Be,"Node "+dt.versions.node),ht="NW.js",Be=dt.versions.nw)),ht||(ht="Node.js",Yt=dt.arch,Re=dt.platform,Be=/[\d.]+/.exec(dt.version),Be=Be?Be[0]:null));else de(dt=pt.runtime)==rt?(ht="Adobe AIR",Re=dt.flash.system.Capabilities.os):de(dt=pt.phantom)==wt?(ht="PhantomJS",Be=(dt=dt.version||null)&&dt.major+"."+dt.minor+"."+dt.patch):typeof Ft.documentMode=="number"&&(dt=/\bTrident\/(\d+)/i.exec(qe))?(Be=[Be,Ft.documentMode],(dt=+dt[1]+4)!=Be[1]&&(Jt.push("IE "+Be[1]+" mode"),tt&&(tt[1]=""),Be[1]=dt),Be=ht=="IE"?String(Be[1].toFixed(1)):Be[0]):typeof Ft.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(ht)&&(Jt.push("masking as "+ht+" "+Be),ht="IE",Be="11.0",tt=["Trident"],Re="Windows");Re=Re&&we(Re)}if(Be&&(dt=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(Be)||/(?:alpha|beta)(?: ?\d)?/i.exec(qe+";"+(Ue&&at.appMinorVersion))||/\bMinefield\b/i.test(qe)&&"a")&&(lt=/b/i.test(dt)?"beta":"alpha",Be=Be.replace(RegExp(dt+"\\+?$"),"")+(lt=="beta"?dn:zt)+(/\d+\+?/.exec(dt)||"")),ht=="Fennec"||ht=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(Re))ht="Firefox Mobile";else if(ht=="Maxthon"&&Be)Be=Be.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(et))et=="Xbox 360"&&(Re=null),et=="Xbox 360"&&/\bIEMobile\b/.test(qe)&&Jt.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(ht)&&(!ht||et||/Browser|Mobi/.test(ht))||Re!="Windows CE"&&!/Mobi/i.test(qe))if(ht=="IE"&&Ue)try{pt.external===null&&Jt.unshift("platform preview")}catch(it){Jt.unshift("embedded")}else(/\bBlackBerry\b/.test(et)||/\bBB10\b/.test(qe))&&(dt=(RegExp(et.replace(/ +/g," *")+"/([.\\d]+)","i").exec(qe)||0)[1]||Be)?(dt=[dt,/BB10/.test(qe)],Re=(dt[1]?(et=null,Ve="BlackBerry"):"Device Software")+" "+dt[0],Be=null):this!=pe&&et!="Wii"&&(Ue&&Dt||/Opera/.test(ht)&&/\b(?:MSIE|Firefox)\b/i.test(qe)||ht=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Re)||ht=="IE"&&(Re&&!/^Win/.test(Re)&&Be>5.5||/\bWindows XP\b/.test(Re)&&Be>8||Be==8&&!/\bTrident\b/.test(qe)))&&!Pe.test(dt=z.call(pe,qe.replace(Pe,"")+";"))&&dt.name&&(dt="ing as "+dt.name+((dt=dt.version)?" "+dt:""),Pe.test(ht)?(/\bIE\b/.test(dt)&&Re=="Mac OS"&&(Re=null),dt="identify"+dt):(dt="mask"+dt,ht=Qt?we(Qt.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(dt)&&(Re=null),Ue||(Be=null)),tt=["Presto"],Jt.push(dt));else ht+=" Mobile";(dt=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(qe)||0)[1])&&(dt=[parseFloat(dt.replace(/\.(\d)$/,".0$1")),dt],ht=="Safari"&&dt[1].slice(-1)=="+"?(ht="WebKit Nightly",lt="alpha",Be=dt[1].slice(0,-1)):Be!=dt[1]&&Be!=(dt[2]=(/\bSafari\/([\d.]+\+?)/i.exec(qe)||0)[1])||(Be=null),dt[1]=(/\bChrome\/([\d.]+)/i.exec(qe)||0)[1],dt[0]==537.36&&dt[2]==537.36&&parseFloat(dt[1])>=28&&tt=="WebKit"&&(tt=["Blink"]),Ue&&(ut||dt[1])?(tt&&(tt[1]="like Chrome"),dt=dt[1]||(dt=dt[0],dt<530?1:dt<532?2:dt<532.05?3:dt<533?4:dt<534.03?5:dt<534.07?6:dt<534.1?7:dt<534.13?8:dt<534.16?9:dt<534.24?10:dt<534.3?11:dt<535.01?12:dt<535.02?"13+":dt<535.07?15:dt<535.11?16:dt<535.19?17:dt<536.05?18:dt<536.1?19:dt<537.01?20:dt<537.11?"21+":dt<537.13?23:dt<537.18?24:dt<537.24?25:dt<537.36?26:tt!="Blink"?"27":"28")):(tt&&(tt[1]="like Safari"),dt=dt[0],dt=dt<400?1:dt<500?2:dt<526?3:dt<533?4:dt<534?"4+":dt<535?5:dt<537?6:dt<538?7:dt<601?8:"8"),tt&&(tt[1]+=" "+(dt+=typeof dt=="number"?".x":/[.+]/.test(dt)?"":"+")),ht=="Safari"&&(!Be||parseInt(Be)>45)&&(Be=dt)),ht=="Opera"&&(dt=/\bzbov|zvav$/.exec(Re))?(ht+=" ",Jt.unshift("desktop mode"),dt=="zvav"?(ht+="Mini",Be=null):ht+="Mobile",Re=Re.replace(RegExp(" *"+dt+"$"),"")):ht=="Safari"&&/\bChrome\b/.exec(tt&&tt[1])&&(Jt.unshift("desktop mode"),ht="Chrome Mobile",Be=null,/\bOS X\b/.test(Re)?(Ve="Apple",Re="iOS 4.3+"):Re=null),Be&&Be.indexOf(dt=/[\d.]+$/.exec(Re))==0&&qe.indexOf("/"+dt+"-")>-1&&(Re=ee(Re.replace(dt,""))),tt&&!/\b(?:Avant|Nook)\b/.test(ht)&&(/Browser|Lunascape|Maxthon/.test(ht)||ht!="Safari"&&/^iOS/.test(Re)&&/\bSafari\b/.test(tt[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(ht)&&tt[1])&&(dt=tt[tt.length-1])&&Jt.push(dt),Jt.length&&(Jt=["("+Jt.join("; ")+")"]),Ve&&et&&et.indexOf(Ve)<0&&Jt.push("on "+Ve),et&&Jt.push((/^on /.test(Jt[Jt.length-1])?"":"on ")+et),Re&&(dt=/ ([\d.+]+)$/.exec(Re),Rt=dt&&Re.charAt(Re.length-dt[0].length-1)=="/",Re={architecture:32,family:dt&&!Rt?Re.replace(dt[0],""):Re,version:dt?dt[1]:null,toString:function(){var it=this.version;return this.family+(it&&!Rt?" "+it:"")+(this.architecture==64?" 64-bit":"")}}),(dt=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Yt))&&!/\bi686\b/i.test(Yt)?(Re&&(Re.architecture=64,Re.family=Re.family.replace(RegExp(" *"+dt),"")),ht&&(/\bWOW64\b/i.test(qe)||Ue&&/\w(?:86|32)$/.test(at.cpuClass||at.platform)&&!/\bWin64; x64\b/i.test(qe))&&Jt.unshift("32-bit")):Re&&/^OS X/.test(Re.family)&&ht=="Chrome"&&parseFloat(Be)>=39&&(Re.architecture=64),qe||(qe=null);var ze={};return ze.description=qe,ze.layout=tt&&tt[0],ze.manufacturer=Ve,ze.name=ht,ze.prerelease=lt,ze.product=et,ze.ua=qe,ze.version=ht&&Be,ze.os=Re||{architecture:null,family:null,version:null,toString:function(){return"null"}},ze.parse=z,ze.toString=mt,ze.version&&Jt.unshift(Be),ze.name&&Jt.unshift(ht),Re&&ht&&(Re!=String(Re).split(" ")[0]||Re!=ht.split(" ")[0]&&!et)&&Jt.push(et?"("+Re+")":"on "+Re),Jt.length&&(ze.description=Jt.join(" ")),ze}var oe={function:!0,object:!0},re=oe[typeof window]&&window||this,ae=oe[typeof Me]&&Me,le=oe[typeof je]&&je&&!je.nodeType&&je,me=ae&&le&&typeof Ce=="object"&&Ce;!me||me.global!==me&&me.window!==me&&me.self!==me||(re=me);var ve=Math.pow(2,53)-1,Pe=/\bOpera/,Ae=Object.prototype,De=Ae.hasOwnProperty,Oe=Ae.toString,Ze=z();typeof Le=="function"&&typeof Le.amd=="object"&&Le.amd?(re.platform=Ze,Le(function(){return Ze})):ae&&le?pe(Ze,function(qe,Xe){ae[Xe]=qe}):re.platform=Ze}).call(this)}).call(this,typeof Ie.g!="undefined"?Ie.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],172:[function(Se,je,Me){(function(Ce){"use strict";function xe(be,ye,we,pe){if(typeof be!="function")throw new TypeError('"callback" argument must be a function');var de,ge,fe=arguments.length;switch(fe){case 0:case 1:return Ce.nextTick(be);case 2:return Ce.nextTick(function(){be.call(null,ye)});case 3:return Ce.nextTick(function(){be.call(null,ye,we)});case 4:return Ce.nextTick(function(){be.call(null,ye,we,pe)});default:for(de=new Array(fe-1),ge=0;ge<de.length;)de[ge++]=arguments[ge];return Ce.nextTick(function(){be.apply(null,de)})}}!Ce.version||Ce.version.indexOf("v0.")===0||Ce.version.indexOf("v1.")===0&&Ce.version.indexOf("v1.8.")!==0?je.exports={nextTick:xe}:je.exports=Ce}).call(this,Se("_process"))},{_process:173}],173:[function(Se,je,Me){function Ce(){throw new Error("setTimeout has not been defined")}function xe(){throw new Error("clearTimeout has not been defined")}function be(le){if(fe===setTimeout)return setTimeout(le,0);if((fe===Ce||!fe)&&setTimeout)return fe=setTimeout,setTimeout(le,0);try{return fe(le,0)}catch(me){try{return fe.call(null,le,0)}catch(ve){return fe.call(this,le,0)}}}function ye(le){if(ue===clearTimeout)return clearTimeout(le);if((ue===xe||!ue)&&clearTimeout)return ue=clearTimeout,clearTimeout(le);try{return ue(le)}catch(me){try{return ue.call(null,le)}catch(ve){return ue.call(this,le)}}}function we(){re&&z&&(re=!1,z.length?oe=z.concat(oe):ae=-1,oe.length&&pe())}function pe(){if(!re){var le=be(we);re=!0;for(var me=oe.length;me;){for(z=oe,oe=[];++ae<me;)z&&z[ae].run();ae=-1,me=oe.length}z=null,re=!1,ye(le)}}function de(le,me){this.fun=le,this.array=me}function ge(){}var fe,ue,ee=je.exports={};(function(){try{fe=typeof setTimeout=="function"?setTimeout:Ce}catch(le){fe=Ce}try{ue=typeof clearTimeout=="function"?clearTimeout:xe}catch(le){ue=xe}})();var z,oe=[],re=!1,ae=-1;ee.nextTick=function(le){var me=new Array(arguments.length-1);if(arguments.length>1)for(var ve=1;ve<arguments.length;ve++)me[ve-1]=arguments[ve];oe.push(new de(le,me)),oe.length!==1||re||be(pe)},de.prototype.run=function(){this.fun.apply(null,this.array)},ee.title="browser",ee.browser=!0,ee.env={},ee.argv=[],ee.version="",ee.versions={},ee.on=ge,ee.addListener=ge,ee.once=ge,ee.off=ge,ee.removeListener=ge,ee.removeAllListeners=ge,ee.emit=ge,ee.prependListener=ge,ee.prependOnceListener=ge,ee.listeners=function(le){return[]},ee.binding=function(le){throw new Error("process.binding is not supported")},ee.cwd=function(){return"/"},ee.chdir=function(le){throw new Error("process.chdir is not supported")},ee.umask=function(){return 0}},{}],174:[function(Se,je,Me){(function(Ce){(function(xe){function be(yt){throw new RangeError(Rt[yt])}function ye(yt,wt){for(var xt=yt.length,Ut=[];xt--;)Ut[xt]=wt(yt[xt]);return Ut}function we(yt,wt){var xt=yt.split("@"),Ut="";return xt.length>1&&(Ut=xt[0]+"@",yt=xt[1]),yt=yt.replace(dt,"."),Ut+ye(yt.split("."),wt).join(".")}function pe(yt){for(var wt,xt,Ut=[],zt=0,dn=yt.length;zt<dn;)wt=yt.charCodeAt(zt++),wt>=55296&&wt<=56319&&zt<dn?(xt=yt.charCodeAt(zt++),(64512&xt)==56320?Ut.push(((1023&wt)<<10)+(1023&xt)+65536):(Ut.push(wt),zt--)):Ut.push(wt);return Ut}function de(yt){return ye(yt,function(wt){var xt="";return wt>65535&&(wt-=65536,xt+=ct(wt>>>10&1023|55296),wt=56320|1023&wt),xt+=ct(wt)}).join("")}function ge(yt){return yt-48<10?yt-22:yt-65<26?yt-65:yt-97<26?yt-97:De}function fe(yt,wt){return yt+22+75*(yt<26)-((wt!=0)<<5)}function ue(yt,wt,xt){var Ut=0;for(yt=xt?rt(yt/Xe):yt>>1,yt+=rt(yt/wt);yt>ut*Ze>>1;Ut+=De)yt=rt(yt/ut);return rt(Ut+(ut+1)*yt/(yt+qe))}function ee(yt){var wt,xt,Ut,zt,dn,Ft,Dt,Qt,Yt,Jt,lt=[],Ue=yt.length,Be=0,tt=pt,ht=mt;for(xt=yt.lastIndexOf(Mt),xt<0&&(xt=0),Ut=0;Ut<xt;++Ut)yt.charCodeAt(Ut)>=128&&be("not-basic"),lt.push(yt.charCodeAt(Ut));for(zt=xt>0?xt+1:0;zt<Ue;){for(dn=Be,Ft=1,Dt=De;zt>=Ue&&be("invalid-input"),Qt=ge(yt.charCodeAt(zt++)),(Qt>=De||Qt>rt((Ae-Be)/Ft))&&be("overflow"),Be+=Qt*Ft,Yt=Dt<=ht?Oe:Dt>=ht+Ze?Ze:Dt-ht,!(Qt<Yt);Dt+=De)Jt=De-Yt,Ft>rt(Ae/Jt)&&be("overflow"),Ft*=Jt;wt=lt.length+1,ht=ue(Be-dn,wt,dn==0),rt(Be/wt)>Ae-tt&&be("overflow"),tt+=rt(Be/wt),Be%=wt,lt.splice(Be++,0,tt)}return de(lt)}function z(yt){var wt,xt,Ut,zt,dn,Ft,Dt,Qt,Yt,Jt,lt,Ue,Be,tt,ht,et=[];for(yt=pe(yt),Ue=yt.length,wt=pt,xt=0,dn=mt,Ft=0;Ft<Ue;++Ft)(lt=yt[Ft])<128&&et.push(ct(lt));for(Ut=zt=et.length,zt&&et.push(Mt);Ut<Ue;){for(Dt=Ae,Ft=0;Ft<Ue;++Ft)(lt=yt[Ft])>=wt&<<Dt&&(Dt=lt);for(Be=Ut+1,Dt-wt>rt((Ae-xt)/Be)&&be("overflow"),xt+=(Dt-wt)*Be,wt=Dt,Ft=0;Ft<Ue;++Ft)if(lt=yt[Ft],lt<wt&&++xt>Ae&&be("overflow"),lt==wt){for(Qt=xt,Yt=De;Jt=Yt<=dn?Oe:Yt>=dn+Ze?Ze:Yt-dn,!(Qt<Jt);Yt+=De)ht=Qt-Jt,tt=De-Jt,et.push(ct(fe(Jt+ht%tt,0))),Qt=rt(ht/tt);et.push(ct(fe(Qt,0))),dn=ue(xt,Be,Ut==zt),xt=0,++Ut}++xt,++wt}return et.join("")}function oe(yt){return we(yt,function(wt){return at.test(wt)?ee(wt.slice(4).toLowerCase()):wt})}function re(yt){return we(yt,function(wt){return _t.test(wt)?"xn--"+z(wt):wt})}var ae=typeof Me=="object"&&Me&&!Me.nodeType&&Me,le=typeof je=="object"&&je&&!je.nodeType&&je,me=typeof Ce=="object"&&Ce;me.global!==me&&me.window!==me&&me.self!==me||(xe=me);var ve,Pe,Ae=2147483647,De=36,Oe=1,Ze=26,qe=38,Xe=700,mt=72,pt=128,Mt="-",at=/^xn--/,_t=/[^\x20-\x7E]/,dt=/[\x2E\u3002\uFF0E\uFF61]/g,Rt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ut=De-Oe,rt=Math.floor,ct=String.fromCharCode;if(ve={version:"1.4.1",ucs2:{decode:pe,encode:de},decode:ee,encode:z,toASCII:re,toUnicode:oe},typeof Le=="function"&&typeof Le.amd=="object"&&Le.amd)Le("punycode",function(){return ve});else if(ae&&le)if(je.exports==ae)le.exports=ve;else for(Pe in ve)ve.hasOwnProperty(Pe)&&(ae[Pe]=ve[Pe]);else xe.punycode=ve})(this)}).call(this,typeof Ie.g!="undefined"?Ie.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],175:[function(Se,je,Me){"use strict";function Ce(be,ye){return Object.prototype.hasOwnProperty.call(be,ye)}je.exports=function(be,ye,we,pe){ye=ye||"&",we=we||"=";var de={};if(typeof be!="string"||be.length===0)return de;var ge=/\+/g;be=be.split(ye);var fe=1e3;pe&&typeof pe.maxKeys=="number"&&(fe=pe.maxKeys);var ue=be.length;fe>0&&ue>fe&&(ue=fe);for(var ee=0;ee<ue;++ee){var z,oe,re,ae,le=be[ee].replace(ge,"%20"),me=le.indexOf(we);me>=0?(z=le.substr(0,me),oe=le.substr(me+1)):(z=le,oe=""),re=decodeURIComponent(z),ae=decodeURIComponent(oe),Ce(de,re)?xe(de[re])?de[re].push(ae):de[re]=[de[re],ae]:de[re]=ae}return de};var xe=Array.isArray||function(be){return Object.prototype.toString.call(be)==="[object Array]"}},{}],176:[function(Se,je,Me){"use strict";function Ce(we,pe){if(we.map)return we.map(pe);for(var de=[],ge=0;ge<we.length;ge++)de.push(pe(we[ge],ge));return de}var xe=function(we){switch(typeof we){case"string":return we;case"boolean":return we?"true":"false";case"number":return isFinite(we)?we:"";default:return""}};je.exports=function(we,pe,de,ge){return pe=pe||"&",de=de||"=",we===null&&(we=void 0),typeof we=="object"?Ce(ye(we),function(fe){var ue=encodeURIComponent(xe(fe))+de;return be(we[fe])?Ce(we[fe],function(ee){return ue+encodeURIComponent(xe(ee))}).join(pe):ue+encodeURIComponent(xe(we[fe]))}).join(pe):ge?encodeURIComponent(xe(ge))+de+encodeURIComponent(xe(we)):""};var be=Array.isArray||function(we){return Object.prototype.toString.call(we)==="[object Array]"},ye=Object.keys||function(we){var pe=[];for(var de in we)Object.prototype.hasOwnProperty.call(we,de)&&pe.push(de);return pe}},{}],177:[function(Se,je,Me){"use strict";Me.decode=Me.parse=Se("./decode"),Me.encode=Me.stringify=Se("./encode")},{"./decode":175,"./encode":176}],178:[function(Se,je,Me){je.exports=Se("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":179}],179:[function(Se,je,Me){"use strict";function Ce(re){if(!(this instanceof Ce))return new Ce(re);fe.call(this,re),ue.call(this,re),re&&re.readable===!1&&(this.readable=!1),re&&re.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,re&&re.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",xe)}function xe(){this.allowHalfOpen||this._writableState.ended||pe.nextTick(be,this)}function be(re){re.end()}var ye=Se("babel-runtime/core-js/object/keys"),we=function(re){return re&&re.__esModule?re:{default:re}}(ye),pe=Se("process-nextick-args"),de=we.default||function(re){var ae=[];for(var le in re)ae.push(le);return ae};je.exports=Ce;var ge=Se("core-util-is");ge.inherits=Se("inherits");var fe=Se("./_stream_readable"),ue=Se("./_stream_writable");ge.inherits(Ce,fe);for(var ee=de(ue.prototype),z=0;z<ee.length;z++){var oe=ee[z];Ce.prototype[oe]||(Ce.prototype[oe]=ue.prototype[oe])}Object.defineProperty(Ce.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(Ce.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(re){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=re,this._writableState.destroyed=re)}}),Ce.prototype._destroy=function(re,ae){this.push(null),this.end(),pe.nextTick(ae,re)}},{"./_stream_readable":181,"./_stream_writable":183,"babel-runtime/core-js/object/keys":23,"core-util-is":153,inherits:162,"process-nextick-args":172}],180:[function(Se,je,Me){"use strict";function Ce(ye){if(!(this instanceof Ce))return new Ce(ye);xe.call(this,ye)}je.exports=Ce;var xe=Se("./_stream_transform"),be=Se("core-util-is");be.inherits=Se("inherits"),be.inherits(Ce,xe),Ce.prototype._transform=function(ye,we,pe){pe(null,ye)}},{"./_stream_transform":182,"core-util-is":153,inherits:162}],181:[function(Se,je,Me){(function(Ce,xe){"use strict";function be(Ue){return xt.from(Ue)}function ye(Ue){return xt.isBuffer(Ue)||Ue instanceof Ut}function we(Ue,Be,tt){if(typeof Ue.prependListener=="function")return Ue.prependListener(Be,tt);Ue._events&&Ue._events[Be]?ct(Ue._events[Be])?Ue._events[Be].unshift(tt):Ue._events[Be]=[tt,Ue._events[Be]]:Ue.on(Be,tt)}function pe(Ue,Be){rt=rt||Se("./_stream_duplex"),Ue=Ue||{};var tt=Be instanceof rt;this.objectMode=!!Ue.objectMode,tt&&(this.objectMode=this.objectMode||!!Ue.readableObjectMode);var ht=Ue.highWaterMark,et=Ue.readableHighWaterMark,Ve=this.objectMode?16:16384;this.highWaterMark=ht||ht===0?ht:tt&&(et||et===0)?et:Ve,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Qt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=Ue.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Ue.encoding&&(Dt||(Dt=Se("string_decoder/").StringDecoder),this.decoder=new Dt(Ue.encoding),this.encoding=Ue.encoding)}function de(Ue){if(rt=rt||Se("./_stream_duplex"),!(this instanceof de))return new de(Ue);this._readableState=new pe(Ue,this),this.readable=!0,Ue&&(typeof Ue.read=="function"&&(this._read=Ue.read),typeof Ue.destroy=="function"&&(this._destroy=Ue.destroy)),wt.call(this)}function ge(Ue,Be,tt,ht,et){var Ve=Ue._readableState;if(Be===null)Ve.reading=!1,re(Ue,Ve);else{var Re;et||(Re=ue(Ve,Be)),Re?Ue.emit("error",Re):Ve.objectMode||Be&&Be.length>0?(typeof Be=="string"||Ve.objectMode||(0,Rt.default)(Be)===xt.prototype||(Be=be(Be)),ht?Ve.endEmitted?Ue.emit("error",new Error("stream.unshift() after end event")):fe(Ue,Ve,Be,!0):Ve.ended?Ue.emit("error",new Error("stream.push() after EOF")):(Ve.reading=!1,Ve.decoder&&!tt?(Be=Ve.decoder.write(Be),Ve.objectMode||Be.length!==0?fe(Ue,Ve,Be,!1):me(Ue,Ve)):fe(Ue,Ve,Be,!1))):ht||(Ve.reading=!1)}return ee(Ve)}function fe(Ue,Be,tt,ht){Be.flowing&&Be.length===0&&!Be.sync?(Ue.emit("data",tt),Ue.read(0)):(Be.length+=Be.objectMode?1:tt.length,ht?Be.buffer.unshift(tt):Be.buffer.push(tt),Be.needReadable&&ae(Ue)),me(Ue,Be)}function ue(Ue,Be){var tt;return ye(Be)||typeof Be=="string"||Be===void 0||Ue.objectMode||(tt=new TypeError("Invalid non-string/buffer chunk")),tt}function ee(Ue){return!Ue.ended&&(Ue.needReadable||Ue.length<Ue.highWaterMark||Ue.length===0)}function z(Ue){return Ue>=lt?Ue=lt:(Ue--,Ue|=Ue>>>1,Ue|=Ue>>>2,Ue|=Ue>>>4,Ue|=Ue>>>8,Ue|=Ue>>>16,Ue++),Ue}function oe(Ue,Be){return Ue<=0||Be.length===0&&Be.ended?0:Be.objectMode?1:Ue!==Ue?Be.flowing&&Be.length?Be.buffer.head.data.length:Be.length:(Ue>Be.highWaterMark&&(Be.highWaterMark=z(Ue)),Ue<=Be.length?Ue:Be.ended?Be.length:(Be.needReadable=!0,0))}function re(Ue,Be){if(!Be.ended){if(Be.decoder){var tt=Be.decoder.end();tt&&tt.length&&(Be.buffer.push(tt),Be.length+=Be.objectMode?1:tt.length)}Be.ended=!0,ae(Ue)}}function ae(Ue){var Be=Ue._readableState;Be.needReadable=!1,Be.emittedReadable||(Ft("emitReadable",Be.flowing),Be.emittedReadable=!0,Be.sync?ut.nextTick(le,Ue):le(Ue))}function le(Ue){Ft("emit readable"),Ue.emit("readable"),Ze(Ue)}function me(Ue,Be){Be.readingMore||(Be.readingMore=!0,ut.nextTick(ve,Ue,Be))}function ve(Ue,Be){for(var tt=Be.length;!Be.reading&&!Be.flowing&&!Be.ended&&Be.length<Be.highWaterMark&&(Ft("maybeReadMore read 0"),Ue.read(0),tt!==Be.length);)tt=Be.length;Be.readingMore=!1}function Pe(Ue){return function(){var Be=Ue._readableState;Ft("pipeOnDrain",Be.awaitDrain),Be.awaitDrain&&Be.awaitDrain--,Be.awaitDrain===0&&yt(Ue,"data")&&(Be.flowing=!0,Ze(Ue))}}function Ae(Ue){Ft("readable nexttick read 0"),Ue.read(0)}function De(Ue,Be){Be.resumeScheduled||(Be.resumeScheduled=!0,ut.nextTick(Oe,Ue,Be))}function Oe(Ue,Be){Be.reading||(Ft("resume read 0"),Ue.read(0)),Be.resumeScheduled=!1,Be.awaitDrain=0,Ue.emit("resume"),Ze(Ue),Be.flowing&&!Be.reading&&Ue.read(0)}function Ze(Ue){var Be=Ue._readableState;for(Ft("flow",Be.flowing);Be.flowing&&Ue.read()!==null;);}function qe(Ue,Be){if(Be.length===0)return null;var tt;return Be.objectMode?tt=Be.buffer.shift():!Ue||Ue>=Be.length?(tt=Be.decoder?Be.buffer.join(""):Be.buffer.length===1?Be.buffer.head.data:Be.buffer.concat(Be.length),Be.buffer.clear()):tt=Xe(Ue,Be.buffer,Be.decoder),tt}function Xe(Ue,Be,tt){var ht;return Ue<Be.head.data.length?(ht=Be.head.data.slice(0,Ue),Be.head.data=Be.head.data.slice(Ue)):ht=Ue===Be.head.data.length?Be.shift():tt?mt(Ue,Be):pt(Ue,Be),ht}function mt(Ue,Be){var tt=Be.head,ht=1,et=tt.data;for(Ue-=et.length;tt=tt.next;){var Ve=tt.data,Re=Ue>Ve.length?Ve.length:Ue;if(Re===Ve.length?et+=Ve:et+=Ve.slice(0,Ue),(Ue-=Re)===0){Re===Ve.length?(++ht,tt.next?Be.head=tt.next:Be.head=Be.tail=null):(Be.head=tt,tt.data=Ve.slice(Re));break}++ht}return Be.length-=ht,et}function pt(Ue,Be){var tt=xt.allocUnsafe(Ue),ht=Be.head,et=1;for(ht.data.copy(tt),Ue-=ht.data.length;ht=ht.next;){var Ve=ht.data,Re=Ue>Ve.length?Ve.length:Ue;if(Ve.copy(tt,tt.length-Ue,0,Re),(Ue-=Re)===0){Re===Ve.length?(++et,ht.next?Be.head=ht.next:Be.head=Be.tail=null):(Be.head=ht,ht.data=Ve.slice(Re));break}++et}return Be.length-=et,tt}function Mt(Ue){var Be=Ue._readableState;if(Be.length>0)throw new Error('"endReadable()" called on non-empty stream');Be.endEmitted||(Be.ended=!0,ut.nextTick(at,Be,Ue))}function at(Ue,Be){Ue.endEmitted||Ue.length!==0||(Ue.endEmitted=!0,Be.readable=!1,Be.emit("end"))}function _t(Ue,Be){for(var tt=0,ht=Ue.length;tt<ht;tt++)if(Ue[tt]===Be)return tt;return-1}var dt=Se("babel-runtime/core-js/object/get-prototype-of"),Rt=function(Ue){return Ue&&Ue.__esModule?Ue:{default:Ue}}(dt),ut=Se("process-nextick-args");je.exports=de;var rt,ct=Se("isarray");de.ReadableState=pe;var yt=(Se("events").EventEmitter,function(Ue,Be){return Ue.listeners(Be).length}),wt=Se("./internal/streams/stream"),xt=Se("safe-buffer").Buffer,Ut=xe.Uint8Array||function(){},zt=Se("core-util-is");zt.inherits=Se("inherits");var dn=Se("util"),Ft=void 0;Ft=dn&&dn.debuglog?dn.debuglog("stream"):function(){};var Dt,Qt=Se("./internal/streams/BufferList"),Yt=Se("./internal/streams/destroy");zt.inherits(de,wt);var Jt=["error","close","destroy","pause","resume"];Object.defineProperty(de.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(Ue){this._readableState&&(this._readableState.destroyed=Ue)}}),de.prototype.destroy=Yt.destroy,de.prototype._undestroy=Yt.undestroy,de.prototype._destroy=function(Ue,Be){this.push(null),Be(Ue)},de.prototype.push=function(Ue,Be){var tt,ht=this._readableState;return ht.objectMode?tt=!0:typeof Ue=="string"&&(Be=Be||ht.defaultEncoding,Be!==ht.encoding&&(Ue=xt.from(Ue,Be),Be=""),tt=!0),ge(this,Ue,Be,!1,tt)},de.prototype.unshift=function(Ue){return ge(this,Ue,null,!0,!1)},de.prototype.isPaused=function(){return this._readableState.flowing===!1},de.prototype.setEncoding=function(Ue){return Dt||(Dt=Se("string_decoder/").StringDecoder),this._readableState.decoder=new Dt(Ue),this._readableState.encoding=Ue,this};var lt=8388608;de.prototype.read=function(Ue){Ft("read",Ue),Ue=parseInt(Ue,10);var Be=this._readableState,tt=Ue;if(Ue!==0&&(Be.emittedReadable=!1),Ue===0&&Be.needReadable&&(Be.length>=Be.highWaterMark||Be.ended))return Ft("read: emitReadable",Be.length,Be.ended),Be.length===0&&Be.ended?Mt(this):ae(this),null;if((Ue=oe(Ue,Be))===0&&Be.ended)return Be.length===0&&Mt(this),null;var ht=Be.needReadable;Ft("need readable",ht),(Be.length===0||Be.length-Ue<Be.highWaterMark)&&(ht=!0,Ft("length less than watermark",ht)),Be.ended||Be.reading?(ht=!1,Ft("reading or ended",ht)):ht&&(Ft("do read"),Be.reading=!0,Be.sync=!0,Be.length===0&&(Be.needReadable=!0),this._read(Be.highWaterMark),Be.sync=!1,Be.reading||(Ue=oe(tt,Be)));var et;return et=Ue>0?qe(Ue,Be):null,et===null?(Be.needReadable=!0,Ue=0):Be.length-=Ue,Be.length===0&&(Be.ended||(Be.needReadable=!0),tt!==Ue&&Be.ended&&Mt(this)),et!==null&&this.emit("data",et),et},de.prototype._read=function(Ue){this.emit("error",new Error("_read() is not implemented"))},de.prototype.pipe=function(Ue,Be){function tt(bn,yn){Ft("onunpipe"),bn===We&&yn&&yn.hasUnpiped===!1&&(yn.hasUnpiped=!0,et())}function ht(){Ft("onend"),Ue.end()}function et(){Ft("cleanup"),Ue.removeListener("close",ze),Ue.removeListener("finish",it),Ue.removeListener("drain",en),Ue.removeListener("error",Re),Ue.removeListener("unpipe",tt),We.removeListener("end",ht),We.removeListener("end",Ke),We.removeListener("data",Ve),Gt=!0,!vt.awaitDrain||Ue._writableState&&!Ue._writableState.needDrain||en()}function Ve(bn){Ft("ondata"),gn=!1,Ue.write(bn)!==!1||gn||((vt.pipesCount===1&&vt.pipes===Ue||vt.pipesCount>1&&_t(vt.pipes,Ue)!==-1)&&!Gt&&(Ft("false write response, pause",We._readableState.awaitDrain),We._readableState.awaitDrain++,gn=!0),We.pause())}function Re(bn){Ft("onerror",bn),Ke(),Ue.removeListener("error",Re),yt(Ue,"error")===0&&Ue.emit("error",bn)}function ze(){Ue.removeListener("finish",it),Ke()}function it(){Ft("onfinish"),Ue.removeListener("close",ze),Ke()}function Ke(){Ft("unpipe"),We.unpipe(Ue)}var We=this,vt=this._readableState;switch(vt.pipesCount){case 0:vt.pipes=Ue;break;case 1:vt.pipes=[vt.pipes,Ue];break;default:vt.pipes.push(Ue)}vt.pipesCount+=1,Ft("pipe count=%d opts=%j",vt.pipesCount,Be);var kt=(!Be||Be.end!==!1)&&Ue!==Ce.stdout&&Ue!==Ce.stderr,hn=kt?ht:Ke;vt.endEmitted?ut.nextTick(hn):We.once("end",hn),Ue.on("unpipe",tt);var en=Pe(We);Ue.on("drain",en);var Gt=!1,gn=!1;return We.on("data",Ve),we(Ue,"error",Re),Ue.once("close",ze),Ue.once("finish",it),Ue.emit("pipe",We),vt.flowing||(Ft("pipe resume"),We.resume()),Ue},de.prototype.unpipe=function(Ue){var Be=this._readableState,tt={hasUnpiped:!1};if(Be.pipesCount===0)return this;if(Be.pipesCount===1)return Ue&&Ue!==Be.pipes?this:(Ue||(Ue=Be.pipes),Be.pipes=null,Be.pipesCount=0,Be.flowing=!1,Ue&&Ue.emit("unpipe",this,tt),this);if(!Ue){var ht=Be.pipes,et=Be.pipesCount;Be.pipes=null,Be.pipesCount=0,Be.flowing=!1;for(var Ve=0;Ve<et;Ve++)ht[Ve].emit("unpipe",this,tt);return this}var Re=_t(Be.pipes,Ue);return Re===-1?this:(Be.pipes.splice(Re,1),Be.pipesCount-=1,Be.pipesCount===1&&(Be.pipes=Be.pipes[0]),Ue.emit("unpipe",this,tt),this)},de.prototype.on=function(Ue,Be){var tt=wt.prototype.on.call(this,Ue,Be);if(Ue==="data")this._readableState.flowing!==!1&&this.resume();else if(Ue==="readable"){var ht=this._readableState;ht.endEmitted||ht.readableListening||(ht.readableListening=ht.needReadable=!0,ht.emittedReadable=!1,ht.reading?ht.length&&ae(this):ut.nextTick(Ae,this))}return tt},de.prototype.addListener=de.prototype.on,de.prototype.resume=function(){var Ue=this._readableState;return Ue.flowing||(Ft("resume"),Ue.flowing=!0,De(this,Ue)),this},de.prototype.pause=function(){return Ft("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ft("pause"),this._readableState.flowing=!1,this.emit("pause")),this},de.prototype.wrap=function(Ue){var Be=this,tt=this._readableState,ht=!1;Ue.on("end",function(){if(Ft("wrapped end"),tt.decoder&&!tt.ended){var Re=tt.decoder.end();Re&&Re.length&&Be.push(Re)}Be.push(null)}),Ue.on("data",function(Re){Ft("wrapped data"),tt.decoder&&(Re=tt.decoder.write(Re)),(!tt.objectMode||Re!=null)&&(tt.objectMode||Re&&Re.length)&&(Be.push(Re)||(ht=!0,Ue.pause()))});for(var et in Ue)this[et]===void 0&&typeof Ue[et]=="function"&&(this[et]=function(Re){return function(){return Ue[Re].apply(Ue,arguments)}}(et));for(var Ve=0;Ve<Jt.length;Ve++)Ue.on(Jt[Ve],this.emit.bind(this,Jt[Ve]));return this._read=function(Re){Ft("wrapped _read",Re),ht&&(ht=!1,Ue.resume())},this},Object.defineProperty(de.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),de._fromList=qe}).call(this,Se("_process"),typeof Ie.g!="undefined"?Ie.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/BufferList":184,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/get-prototype-of":22,"core-util-is":153,events:158,inherits:162,isarray:166,"process-nextick-args":172,"safe-buffer":193,"string_decoder/":200,util:36}],182:[function(Se,je,Me){"use strict";function Ce(de,ge){var fe=this._transformState;fe.transforming=!1;var ue=fe.writecb;if(!ue)return this.emit("error",new Error("write callback called multiple times"));fe.writechunk=null,fe.writecb=null,ge!=null&&this.push(ge),ue(de);var ee=this._readableState;ee.reading=!1,(ee.needReadable||ee.length<ee.highWaterMark)&&this._read(ee.highWaterMark)}function xe(de){if(!(this instanceof xe))return new xe(de);we.call(this,de),this._transformState={afterTransform:Ce.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,de&&(typeof de.transform=="function"&&(this._transform=de.transform),typeof de.flush=="function"&&(this._flush=de.flush)),this.on("prefinish",be)}function be(){var de=this;typeof this._flush=="function"?this._flush(function(ge,fe){ye(de,ge,fe)}):ye(this,null,null)}function ye(de,ge,fe){if(ge)return de.emit("error",ge);if(fe!=null&&de.push(fe),de._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(de._transformState.transforming)throw new Error("Calling transform done when still transforming");return de.push(null)}je.exports=xe;var we=Se("./_stream_duplex"),pe=Se("core-util-is");pe.inherits=Se("inherits"),pe.inherits(xe,we),xe.prototype.push=function(de,ge){return this._transformState.needTransform=!1,we.prototype.push.call(this,de,ge)},xe.prototype._transform=function(de,ge,fe){throw new Error("_transform() is not implemented")},xe.prototype._write=function(de,ge,fe){var ue=this._transformState;if(ue.writecb=fe,ue.writechunk=de,ue.writeencoding=ge,!ue.transforming){var ee=this._readableState;(ue.needTransform||ee.needReadable||ee.length<ee.highWaterMark)&&this._read(ee.highWaterMark)}},xe.prototype._read=function(de){var ge=this._transformState;ge.writechunk!==null&&ge.writecb&&!ge.transforming?(ge.transforming=!0,this._transform(ge.writechunk,ge.writeencoding,ge.afterTransform)):ge.needTransform=!0},xe.prototype._destroy=function(de,ge){var fe=this;we.prototype._destroy.call(this,de,function(ue){ge(ue),fe.emit("close")})}},{"./_stream_duplex":179,"core-util-is":153,inherits:162}],183:[function(Se,je,Me){(function(Ce,xe){"use strict";function be(Yt){return Yt&&Yt.__esModule?Yt:{default:Yt}}function ye(Yt){var Jt=this;this.next=null,this.entry=null,this.finish=function(){mt(Jt,Yt)}}function we(Yt){return dn.from(Yt)}function pe(Yt){return dn.isBuffer(Yt)||Yt instanceof Ft}function de(){}function ge(Yt,Jt){yt=yt||Se("./_stream_duplex"),Yt=Yt||{};var lt=Jt instanceof yt;this.objectMode=!!Yt.objectMode,lt&&(this.objectMode=this.objectMode||!!Yt.writableObjectMode);var Ue=Yt.highWaterMark,Be=Yt.writableHighWaterMark,tt=this.objectMode?16:16384;this.highWaterMark=Ue||Ue===0?Ue:lt&&(Be||Be===0)?Be:tt,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ht=Yt.decodeStrings===!1;this.decodeStrings=!ht,this.defaultEncoding=Yt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(et){me(Jt,et)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new ye(this)}function fe(Yt){if(yt=yt||Se("./_stream_duplex"),!(Qt.call(fe,this)||this instanceof yt))return new fe(Yt);this._writableState=new ge(Yt,this),this.writable=!0,Yt&&(typeof Yt.write=="function"&&(this._write=Yt.write),typeof Yt.writev=="function"&&(this._writev=Yt.writev),typeof Yt.destroy=="function"&&(this._destroy=Yt.destroy),typeof Yt.final=="function"&&(this._final=Yt.final)),zt.call(this)}function ue(Yt,Jt){var lt=new Error("write after end");Yt.emit("error",lt),ct.nextTick(Jt,lt)}function ee(Yt,Jt,lt,Ue){var Be=!0,tt=!1;return lt===null?tt=new TypeError("May not write null values to stream"):typeof lt=="string"||lt===void 0||Jt.objectMode||(tt=new TypeError("Invalid non-string/buffer chunk")),tt&&(Yt.emit("error",tt),ct.nextTick(Ue,tt),Be=!1),Be}function z(Yt,Jt,lt){return Yt.objectMode||Yt.decodeStrings===!1||typeof Jt!="string"||(Jt=dn.from(Jt,lt)),Jt}function oe(Yt,Jt,lt,Ue,Be,tt){if(!lt){var ht=z(Jt,Ue,Be);Ue!==ht&&(lt=!0,Be="buffer",Ue=ht)}var et=Jt.objectMode?1:Ue.length;Jt.length+=et;var Ve=Jt.length<Jt.highWaterMark;if(Ve||(Jt.needDrain=!0),Jt.writing||Jt.corked){var Re=Jt.lastBufferedRequest;Jt.lastBufferedRequest={chunk:Ue,encoding:Be,isBuf:lt,callback:tt,next:null},Re?Re.next=Jt.lastBufferedRequest:Jt.bufferedRequest=Jt.lastBufferedRequest,Jt.bufferedRequestCount+=1}else re(Yt,Jt,!1,et,Ue,Be,tt);return Ve}function re(Yt,Jt,lt,Ue,Be,tt,ht){Jt.writelen=Ue,Jt.writecb=ht,Jt.writing=!0,Jt.sync=!0,lt?Yt._writev(Be,Jt.onwrite):Yt._write(Be,tt,Jt.onwrite),Jt.sync=!1}function ae(Yt,Jt,lt,Ue,Be){--Jt.pendingcb,lt?(ct.nextTick(Be,Ue),ct.nextTick(qe,Yt,Jt),Yt._writableState.errorEmitted=!0,Yt.emit("error",Ue)):(Be(Ue),Yt._writableState.errorEmitted=!0,Yt.emit("error",Ue),qe(Yt,Jt))}function le(Yt){Yt.writing=!1,Yt.writecb=null,Yt.length-=Yt.writelen,Yt.writelen=0}function me(Yt,Jt){var lt=Yt._writableState,Ue=lt.sync,Be=lt.writecb;if(le(lt),Jt)ae(Yt,lt,Ue,Jt,Be);else{var tt=De(lt);tt||lt.corked||lt.bufferProcessing||!lt.bufferedRequest||Ae(Yt,lt),Ue?wt(ve,Yt,lt,tt,Be):ve(Yt,lt,tt,Be)}}function ve(Yt,Jt,lt,Ue){lt||Pe(Yt,Jt),Jt.pendingcb--,Ue(),qe(Yt,Jt)}function Pe(Yt,Jt){Jt.length===0&&Jt.needDrain&&(Jt.needDrain=!1,Yt.emit("drain"))}function Ae(Yt,Jt){Jt.bufferProcessing=!0;var lt=Jt.bufferedRequest;if(Yt._writev&<&<.next){var Ue=Jt.bufferedRequestCount,Be=new Array(Ue),tt=Jt.corkedRequestsFree;tt.entry=lt;for(var ht=0,et=!0;lt;)Be[ht]=lt,lt.isBuf||(et=!1),lt=lt.next,ht+=1;Be.allBuffers=et,re(Yt,Jt,!0,Jt.length,Be,"",tt.finish),Jt.pendingcb++,Jt.lastBufferedRequest=null,tt.next?(Jt.corkedRequestsFree=tt.next,tt.next=null):Jt.corkedRequestsFree=new ye(Jt),Jt.bufferedRequestCount=0}else{for(;lt;){var Ve=lt.chunk,Re=lt.encoding,ze=lt.callback;if(re(Yt,Jt,!1,Jt.objectMode?1:Ve.length,Ve,Re,ze),lt=lt.next,Jt.bufferedRequestCount--,Jt.writing)break}lt===null&&(Jt.lastBufferedRequest=null)}Jt.bufferedRequest=lt,Jt.bufferProcessing=!1}function De(Yt){return Yt.ending&&Yt.length===0&&Yt.bufferedRequest===null&&!Yt.finished&&!Yt.writing}function Oe(Yt,Jt){Yt._final(function(lt){Jt.pendingcb--,lt&&Yt.emit("error",lt),Jt.prefinished=!0,Yt.emit("prefinish"),qe(Yt,Jt)})}function Ze(Yt,Jt){Jt.prefinished||Jt.finalCalled||(typeof Yt._final=="function"?(Jt.pendingcb++,Jt.finalCalled=!0,ct.nextTick(Oe,Yt,Jt)):(Jt.prefinished=!0,Yt.emit("prefinish")))}function qe(Yt,Jt){var lt=De(Jt);return lt&&(Ze(Yt,Jt),Jt.pendingcb===0&&(Jt.finished=!0,Yt.emit("finish"))),lt}function Xe(Yt,Jt,lt){Jt.ending=!0,qe(Yt,Jt),lt&&(Jt.finished?ct.nextTick(lt):Yt.once("finish",lt)),Jt.ended=!0,Yt.writable=!1}function mt(Yt,Jt,lt){var Ue=Yt.entry;for(Yt.entry=null;Ue;){var Be=Ue.callback;Jt.pendingcb--,Be(lt),Ue=Ue.next}Jt.corkedRequestsFree?Jt.corkedRequestsFree.next=Yt:Jt.corkedRequestsFree=Yt}var pt=Se("babel-runtime/core-js/object/define-property"),Mt=be(pt),at=Se("babel-runtime/core-js/symbol/has-instance"),_t=be(at),dt=Se("babel-runtime/core-js/symbol"),Rt=be(dt),ut=Se("babel-runtime/core-js/set-immediate"),rt=be(ut),ct=Se("process-nextick-args");je.exports=fe;var yt,wt=!Ce.browser&&["v0.10","v0.9."].indexOf(Ce.version.slice(0,5))>-1?rt.default:ct.nextTick;fe.WritableState=ge;var xt=Se("core-util-is");xt.inherits=Se("inherits");var Ut={deprecate:Se("util-deprecate")},zt=Se("./internal/streams/stream"),dn=Se("safe-buffer").Buffer,Ft=xe.Uint8Array||function(){},Dt=Se("./internal/streams/destroy");xt.inherits(fe,zt),ge.prototype.getBuffer=function(){for(var Yt=this.bufferedRequest,Jt=[];Yt;)Jt.push(Yt),Yt=Yt.next;return Jt},function(){try{Object.defineProperty(ge.prototype,"buffer",{get:Ut.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Yt){}}();var Qt;typeof Rt.default=="function"&&_t.default&&typeof Function.prototype[_t.default]=="function"?(Qt=Function.prototype[_t.default],(0,Mt.default)(fe,_t.default,{value:function(Yt){return!!Qt.call(this,Yt)||this===fe&&Yt&&Yt._writableState instanceof ge}})):Qt=function(Yt){return Yt instanceof this},fe.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},fe.prototype.write=function(Yt,Jt,lt){var Ue=this._writableState,Be=!1,tt=!Ue.objectMode&&pe(Yt);return tt&&!dn.isBuffer(Yt)&&(Yt=we(Yt)),typeof Jt=="function"&&(lt=Jt,Jt=null),tt?Jt="buffer":Jt||(Jt=Ue.defaultEncoding),typeof lt!="function"&&(lt=de),Ue.ended?ue(this,lt):(tt||ee(this,Ue,Yt,lt))&&(Ue.pendingcb++,Be=oe(this,Ue,tt,Yt,Jt,lt)),Be},fe.prototype.cork=function(){this._writableState.corked++},fe.prototype.uncork=function(){var Yt=this._writableState;Yt.corked&&(Yt.corked--,Yt.writing||Yt.corked||Yt.finished||Yt.bufferProcessing||!Yt.bufferedRequest||Ae(this,Yt))},fe.prototype.setDefaultEncoding=function(Yt){if(typeof Yt=="string"&&(Yt=Yt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Yt+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+Yt);return this._writableState.defaultEncoding=Yt,this},Object.defineProperty(fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),fe.prototype._write=function(Yt,Jt,lt){lt(new Error("_write() is not implemented"))},fe.prototype._writev=null,fe.prototype.end=function(Yt,Jt,lt){var Ue=this._writableState;typeof Yt=="function"?(lt=Yt,Yt=null,Jt=null):typeof Jt=="function"&&(lt=Jt,Jt=null),Yt!=null&&this.write(Yt,Jt),Ue.corked&&(Ue.corked=1,this.uncork()),Ue.ending||Ue.finished||Xe(this,Ue,lt)},Object.defineProperty(fe.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(Yt){this._writableState&&(this._writableState.destroyed=Yt)}}),fe.prototype.destroy=Dt.destroy,fe.prototype._undestroy=Dt.undestroy,fe.prototype._destroy=function(Yt,Jt){this.end(),Jt(Yt)}}).call(this,Se("_process"),typeof Ie.g!="undefined"?Ie.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/set-immediate":25,"babel-runtime/core-js/symbol":27,"babel-runtime/core-js/symbol/has-instance":28,"core-util-is":153,inherits:162,"process-nextick-args":172,"safe-buffer":193,"util-deprecate":205}],184:[function(Se,je,Me){"use strict";function Ce(we,pe){if(!(we instanceof pe))throw new TypeError("Cannot call a class as a function")}function xe(we,pe,de){we.copy(pe,de)}var be=Se("safe-buffer").Buffer,ye=Se("util");je.exports=function(){function we(){Ce(this,we),this.head=null,this.tail=null,this.length=0}return we.prototype.push=function(pe){var de={data:pe,next:null};this.length>0?this.tail.next=de:this.head=de,this.tail=de,++this.length},we.prototype.unshift=function(pe){var de={data:pe,next:this.head};this.length===0&&(this.tail=de),this.head=de,++this.length},we.prototype.shift=function(){if(this.length!==0){var pe=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,pe}},we.prototype.clear=function(){this.head=this.tail=null,this.length=0},we.prototype.join=function(pe){if(this.length===0)return"";for(var de=this.head,ge=""+de.data;de=de.next;)ge+=pe+de.data;return ge},we.prototype.concat=function(pe){if(this.length===0)return be.alloc(0);if(this.length===1)return this.head.data;for(var de=be.allocUnsafe(pe>>>0),ge=this.head,fe=0;ge;)xe(ge.data,de,fe),fe+=ge.data.length,ge=ge.next;return de},we}(),ye&&ye.inspect&&ye.inspect.custom&&(je.exports.prototype[ye.inspect.custom]=function(){var we=ye.inspect({length:this.length});return this.constructor.name+" "+we})},{"safe-buffer":193,util:36}],185:[function(Se,je,Me){"use strict";function Ce(we,pe){var de=this,ge=this._readableState&&this._readableState.destroyed,fe=this._writableState&&this._writableState.destroyed;return ge||fe?(pe?pe(we):!we||this._writableState&&this._writableState.errorEmitted||ye.nextTick(be,this,we),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(we||null,function(ue){!pe&&ue?(ye.nextTick(be,de,ue),de._writableState&&(de._writableState.errorEmitted=!0)):pe&&pe(ue)}),this)}function xe(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function be(we,pe){we.emit("error",pe)}var ye=Se("process-nextick-args");je.exports={destroy:Ce,undestroy:xe}},{"process-nextick-args":172}],186:[function(Se,je,Me){"use strict";je.exports=Se("events").EventEmitter},{events:158}],187:[function(Se,je,Me){je.exports=Se("./readable").PassThrough},{"./readable":188}],188:[function(Se,je,Me){Me=je.exports=Se("./lib/_stream_readable.js"),Me.Stream=Me,Me.Readable=Me,Me.Writable=Se("./lib/_stream_writable.js"),Me.Duplex=Se("./lib/_stream_duplex.js"),Me.Transform=Se("./lib/_stream_transform.js"),Me.PassThrough=Se("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":179,"./lib/_stream_passthrough.js":180,"./lib/_stream_readable.js":181,"./lib/_stream_transform.js":182,"./lib/_stream_writable.js":183}],189:[function(Se,je,Me){je.exports=Se("./readable").Transform},{"./readable":188}],190:[function(Se,je,Me){je.exports=Se("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":183}],191:[function(Se,je,Me){var Ce=function(){return this}()||Function("return this")(),xe=Ce.regeneratorRuntime&&Object.getOwnPropertyNames(Ce).indexOf("regeneratorRuntime")>=0,be=xe&&Ce.regeneratorRuntime;if(Ce.regeneratorRuntime=void 0,je.exports=Se("./runtime"),xe)Ce.regeneratorRuntime=be;else try{delete Ce.regeneratorRuntime}catch(ye){Ce.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(Se,je,Me){(function(Ce){"use strict";function xe(rt,ct,yt,wt){var xt=ct&&ct.prototype instanceof ye?ct:ye,Ut=Object.create(xt.prototype),zt=new oe(wt||[]);return Ut._invoke=fe(rt,yt,zt),Ut}function be(rt,ct,yt){try{return{type:"normal",arg:rt.call(ct,yt)}}catch(wt){return{type:"throw",arg:wt}}}function ye(){}function we(){}function pe(){}function de(rt){["next","throw","return"].forEach(function(ct){rt[ct]=function(yt){return this._invoke(ct,yt)}})}function ge(rt){function ct(xt,Ut,zt,dn){var Ft=be(rt[xt],rt,Ut);if(Ft.type!=="throw"){var Dt=Ft.arg,Qt=Dt.value;return Qt&&typeof Qt=="object"&&ve.call(Qt,"__await")?Promise.resolve(Qt.__await).then(function(Yt){ct("next",Yt,zt,dn)},function(Yt){ct("throw",Yt,zt,dn)}):Promise.resolve(Qt).then(function(Yt){Dt.value=Yt,zt(Dt)},dn)}dn(Ft.arg)}function yt(xt,Ut){function zt(){return new Promise(function(dn,Ft){ct(xt,Ut,dn,Ft)})}return wt=wt?wt.then(zt,zt):zt()}var wt;this._invoke=yt}function fe(rt,ct,yt){var wt=Xe;return function(xt,Ut){if(wt===pt)throw new Error("Generator is already running");if(wt===Mt){if(xt==="throw")throw Ut;return ae()}for(yt.method=xt,yt.arg=Ut;;){var zt=yt.delegate;if(zt){var dn=ue(zt,yt);if(dn){if(dn===at)continue;return dn}}if(yt.method==="next")yt.sent=yt._sent=yt.arg;else if(yt.method==="throw"){if(wt===Xe)throw wt=Mt,yt.arg;yt.dispatchException(yt.arg)}else yt.method==="return"&&yt.abrupt("return",yt.arg);wt=pt;var Ft=be(rt,ct,yt);if(Ft.type==="normal"){if(wt=yt.done?Mt:mt,Ft.arg===at)continue;return{value:Ft.arg,done:yt.done}}Ft.type==="throw"&&(wt=Mt,yt.method="throw",yt.arg=Ft.arg)}}}function ue(rt,ct){var yt=rt.iterator[ct.method];if(yt===le){if(ct.delegate=null,ct.method==="throw"){if(rt.iterator.return&&(ct.method="return",ct.arg=le,ue(rt,ct),ct.method==="throw"))return at;ct.method="throw",ct.arg=new TypeError("The iterator does not provide a 'throw' method")}return at}var wt=be(yt,rt.iterator,ct.arg);if(wt.type==="throw")return ct.method="throw",ct.arg=wt.arg,ct.delegate=null,at;var xt=wt.arg;return xt?xt.done?(ct[rt.resultName]=xt.value,ct.next=rt.nextLoc,ct.method!=="return"&&(ct.method="next",ct.arg=le),ct.delegate=null,at):xt:(ct.method="throw",ct.arg=new TypeError("iterator result is not an object"),ct.delegate=null,at)}function ee(rt){var ct={tryLoc:rt[0]};1 in rt&&(ct.catchLoc=rt[1]),2 in rt&&(ct.finallyLoc=rt[2],ct.afterLoc=rt[3]),this.tryEntries.push(ct)}function z(rt){var ct=rt.completion||{};ct.type="normal",delete ct.arg,rt.completion=ct}function oe(rt){this.tryEntries=[{tryLoc:"root"}],rt.forEach(ee,this),this.reset(!0)}function re(rt){if(rt){var ct=rt[Ae];if(ct)return ct.call(rt);if(typeof rt.next=="function")return rt;if(!isNaN(rt.length)){var yt=-1,wt=function xt(){for(;++yt<rt.length;)if(ve.call(rt,yt))return xt.value=rt[yt],xt.done=!1,xt;return xt.value=le,xt.done=!0,xt};return wt.next=wt}}return{next:ae}}function ae(){return{value:le,done:!0}}var le,me=Object.prototype,ve=me.hasOwnProperty,Pe=typeof Symbol=="function"?Symbol:{},Ae=Pe.iterator||"@@iterator",De=Pe.asyncIterator||"@@asyncIterator",Oe=Pe.toStringTag||"@@toStringTag",Ze=typeof je=="object",qe=Ce.regeneratorRuntime;if(qe)return void(Ze&&(je.exports=qe));qe=Ce.regeneratorRuntime=Ze?je.exports:{},qe.wrap=xe;var Xe="suspendedStart",mt="suspendedYield",pt="executing",Mt="completed",at={},_t={};_t[Ae]=function(){return this};var dt=Object.getPrototypeOf,Rt=dt&&dt(dt(re([])));Rt&&Rt!==me&&ve.call(Rt,Ae)&&(_t=Rt);var ut=pe.prototype=ye.prototype=Object.create(_t);we.prototype=ut.constructor=pe,pe.constructor=we,pe[Oe]=we.displayName="GeneratorFunction",qe.isGeneratorFunction=function(rt){var ct=typeof rt=="function"&&rt.constructor;return!!ct&&(ct===we||(ct.displayName||ct.name)==="GeneratorFunction")},qe.mark=function(rt){return Object.setPrototypeOf?Object.setPrototypeOf(rt,pe):(rt.__proto__=pe,Oe in rt||(rt[Oe]="GeneratorFunction")),rt.prototype=Object.create(ut),rt},qe.awrap=function(rt){return{__await:rt}},de(ge.prototype),ge.prototype[De]=function(){return this},qe.AsyncIterator=ge,qe.async=function(rt,ct,yt,wt){var xt=new ge(xe(rt,ct,yt,wt));return qe.isGeneratorFunction(ct)?xt:xt.next().then(function(Ut){return Ut.done?Ut.value:xt.next()})},de(ut),ut[Oe]="Generator",ut[Ae]=function(){return this},ut.toString=function(){return"[object Generator]"},qe.keys=function(rt){var ct=[];for(var yt in rt)ct.push(yt);return ct.reverse(),function wt(){for(;ct.length;){var xt=ct.pop();if(xt in rt)return wt.value=xt,wt.done=!1,wt}return wt.done=!0,wt}},qe.values=re,oe.prototype={constructor:oe,reset:function(rt){if(this.prev=0,this.next=0,this.sent=this._sent=le,this.done=!1,this.delegate=null,this.method="next",this.arg=le,this.tryEntries.forEach(z),!rt)for(var ct in this)ct.charAt(0)==="t"&&ve.call(this,ct)&&!isNaN(+ct.slice(1))&&(this[ct]=le)},stop:function(){this.done=!0;var rt=this.tryEntries[0],ct=rt.completion;if(ct.type==="throw")throw ct.arg;return this.rval},dispatchException:function(rt){function ct(Ft,Dt){return Ut.type="throw",Ut.arg=rt,yt.next=Ft,Dt&&(yt.method="next",yt.arg=le),!!Dt}if(this.done)throw rt;for(var yt=this,wt=this.tryEntries.length-1;wt>=0;--wt){var xt=this.tryEntries[wt],Ut=xt.completion;if(xt.tryLoc==="root")return ct("end");if(xt.tryLoc<=this.prev){var zt=ve.call(xt,"catchLoc"),dn=ve.call(xt,"finallyLoc");if(zt&&dn){if(this.prev<xt.catchLoc)return ct(xt.catchLoc,!0);if(this.prev<xt.finallyLoc)return ct(xt.finallyLoc)}else if(zt){if(this.prev<xt.catchLoc)return ct(xt.catchLoc,!0)}else{if(!dn)throw new Error("try statement without catch or finally");if(this.prev<xt.finallyLoc)return ct(xt.finallyLoc)}}}},abrupt:function(rt,ct){for(var yt=this.tryEntries.length-1;yt>=0;--yt){var wt=this.tryEntries[yt];if(wt.tryLoc<=this.prev&&ve.call(wt,"finallyLoc")&&this.prev<wt.finallyLoc){var xt=wt;break}}xt&&(rt==="break"||rt==="continue")&&xt.tryLoc<=ct&&ct<=xt.finallyLoc&&(xt=null);var Ut=xt?xt.completion:{};return Ut.type=rt,Ut.arg=ct,xt?(this.method="next",this.next=xt.finallyLoc,at):this.complete(Ut)},complete:function(rt,ct){if(rt.type==="throw")throw rt.arg;return rt.type==="break"||rt.type==="continue"?this.next=rt.arg:rt.type==="return"?(this.rval=this.arg=rt.arg,this.method="return",this.next="end"):rt.type==="normal"&&ct&&(this.next=ct),at},finish:function(rt){for(var ct=this.tryEntries.length-1;ct>=0;--ct){var yt=this.tryEntries[ct];if(yt.finallyLoc===rt)return this.complete(yt.completion,yt.afterLoc),z(yt),at}},catch:function(rt){for(var ct=this.tryEntries.length-1;ct>=0;--ct){var yt=this.tryEntries[ct];if(yt.tryLoc===rt){var wt=yt.completion;if(wt.type==="throw"){var xt=wt.arg;z(yt)}return xt}}throw new Error("illegal catch attempt")},delegateYield:function(rt,ct,yt){return this.delegate={iterator:re(rt),resultName:ct,nextLoc:yt},this.method==="next"&&(this.arg=le),at}}})(function(){return this}()||Function("return this")())},{}],193:[function(Se,je,Me){function Ce(we,pe){for(var de in we)pe[de]=we[de]}function xe(we,pe,de){return ye(we,pe,de)}var be=Se("buffer"),ye=be.Buffer;ye.from&&ye.alloc&&ye.allocUnsafe&&ye.allocUnsafeSlow?je.exports=be:(Ce(be,Me),Me.Buffer=xe),Ce(ye,xe),xe.from=function(we,pe,de){if(typeof we=="number")throw new TypeError("Argument must not be a number");return ye(we,pe,de)},xe.alloc=function(we,pe,de){if(typeof we!="number")throw new TypeError("Argument must be a number");var ge=ye(we);return pe!==void 0?typeof de=="string"?ge.fill(pe,de):ge.fill(pe):ge.fill(0),ge},xe.allocUnsafe=function(we){if(typeof we!="number")throw new TypeError("Argument must be a number");return ye(we)},xe.allocUnsafeSlow=function(we){if(typeof we!="number")throw new TypeError("Argument must be a number");return be.SlowBuffer(we)}},{buffer:38}],194:[function(Se,je,Me){(function(Ce){"use strict";function xe(ae){return ae&&ae.__esModule?ae:{default:ae}}var be=Se("babel-runtime/core-js/string/from-code-point"),ye=xe(be),we=Se("babel-runtime/core-js/json/stringify"),pe=xe(we),de=Se("babel-runtime/helpers/typeof"),ge=xe(de),fe=Se("babel-runtime/core-js/object/define-property"),ue=xe(fe),ee=Se("babel-runtime/core-js/object/keys"),z=xe(ee),oe=Se("babel-runtime/core-js/object/create"),re=xe(oe);(function(ae){function le(Ke,We){if(!(this instanceof le))return new le(Ke,We);var vt=this;ve(vt),vt.q=vt.c="",vt.bufferCheckPosition=ae.MAX_BUFFER_LENGTH,vt.opt=We||{},vt.opt.lowercase=vt.opt.lowercase||vt.opt.lowercasetags,vt.looseCase=vt.opt.lowercase?"toLowerCase":"toUpperCase",vt.tags=[],vt.closed=vt.closedRoot=vt.sawRoot=!1,vt.tag=vt.error=null,vt.strict=!!Ke,vt.noscript=!(!Ke&&!vt.opt.noscript),vt.state=ze.BEGIN,vt.strictEntities=vt.opt.strictEntities,vt.ENTITIES=vt.strictEntities?(0,re.default)(ae.XML_ENTITIES):(0,re.default)(ae.ENTITIES),vt.attribList=[],vt.opt.xmlns&&(vt.ns=(0,re.default)(tt)),vt.trackPosition=vt.opt.position!==!1,vt.trackPosition&&(vt.position=vt.line=vt.column=0),pt(vt,"onready")}function me(Ke){for(var We=Math.max(ae.MAX_BUFFER_LENGTH,10),vt=0,kt=0,hn=Dt.length;kt<hn;kt++){var en=Ke[Dt[kt]].length;if(en>We)switch(Dt[kt]){case"textNode":at(Ke);break;case"cdata":Mt(Ke,"oncdata",Ke.cdata),Ke.cdata="";break;case"script":Mt(Ke,"onscript",Ke.script),Ke.script="";break;default:dt(Ke,"Max buffer length exceeded: "+Dt[kt])}vt=Math.max(vt,en)}var Gt=ae.MAX_BUFFER_LENGTH-vt;Ke.bufferCheckPosition=Gt+Ke.position}function ve(Ke){for(var We=0,vt=Dt.length;We<vt;We++)Ke[Dt[We]]=""}function Pe(Ke){at(Ke),Ke.cdata!==""&&(Mt(Ke,"oncdata",Ke.cdata),Ke.cdata=""),Ke.script!==""&&(Mt(Ke,"onscript",Ke.script),Ke.script="")}function Ae(Ke,We){return new De(Ke,We)}function De(Ke,We){if(!(this instanceof De))return new De(Ke,We);Qt.apply(this),this._parser=new le(Ke,We),this.writable=!0,this.readable=!0;var vt=this;this._parser.onend=function(){vt.emit("end")},this._parser.onerror=function(kt){vt.emit("error",kt),vt._parser.error=null},this._decoder=null,Yt.forEach(function(kt){(0,ue.default)(vt,"on"+kt,{get:function(){return vt._parser["on"+kt]},set:function(hn){if(!hn)return vt.removeAllListeners(kt),vt._parser["on"+kt]=hn,hn;vt.on(kt,hn)},enumerable:!0,configurable:!1})})}function Oe(Ke){return Ke===" "||Ke===`
|
|
|
`||Ke==="\r"||Ke===" "}function Ze(Ke){return Ke==='"'||Ke==="'"}function qe(Ke){return Ke===">"||Oe(Ke)}function Xe(Ke,We){return Ke.test(We)}function mt(Ke,We){return!Xe(Ke,We)}function pt(Ke,We,vt){Ke[We]&&Ke[We](vt)}function Mt(Ke,We,vt){Ke.textNode&&at(Ke),pt(Ke,We,vt)}function at(Ke){Ke.textNode=_t(Ke.opt,Ke.textNode),Ke.textNode&&pt(Ke,"ontext",Ke.textNode),Ke.textNode=""}function _t(Ke,We){return Ke.trim&&(We=We.trim()),Ke.normalize&&(We=We.replace(/\s+/g," ")),We}function dt(Ke,We){return at(Ke),Ke.trackPosition&&(We+=`
|
|
|
Line: `+Ke.line+`
|
|
|
Column: `+Ke.column+`
|
|
|
Char: `+Ke.c),We=new Error(We),Ke.error=We,pt(Ke,"onerror",We),Ke}function Rt(Ke){return Ke.sawRoot&&!Ke.closedRoot&&ut(Ke,"Unclosed root tag"),Ke.state!==ze.BEGIN&&Ke.state!==ze.BEGIN_WHITESPACE&&Ke.state!==ze.TEXT&&dt(Ke,"Unexpected end"),at(Ke),Ke.c="",Ke.closed=!0,pt(Ke,"onend"),le.call(Ke,Ke.strict,Ke.opt),Ke}function ut(Ke,We){if((Ke===void 0?"undefined":(0,ge.default)(Ke))!=="object"||!(Ke instanceof le))throw new Error("bad call to strictFail");Ke.strict&&dt(Ke,We)}function rt(Ke){Ke.strict||(Ke.tagName=Ke.tagName[Ke.looseCase]());var We=Ke.tags[Ke.tags.length-1]||Ke,vt=Ke.tag={name:Ke.tagName,attributes:{}};Ke.opt.xmlns&&(vt.ns=We.ns),Ke.attribList.length=0,Mt(Ke,"onopentagstart",vt)}function ct(Ke,We){var vt=Ke.indexOf(":"),kt=vt<0?["",Ke]:Ke.split(":"),hn=kt[0],en=kt[1];return We&&Ke==="xmlns"&&(hn="xmlns",en=""),{prefix:hn,local:en}}function yt(Ke){if(Ke.strict||(Ke.attribName=Ke.attribName[Ke.looseCase]()),Ke.attribList.indexOf(Ke.attribName)!==-1||Ke.tag.attributes.hasOwnProperty(Ke.attribName))return void(Ke.attribName=Ke.attribValue="");if(Ke.opt.xmlns){var We=ct(Ke.attribName,!0),vt=We.prefix,kt=We.local;if(vt==="xmlns")if(kt==="xml"&&Ke.attribValue!==Ue)ut(Ke,"xml: prefix must be bound to "+Ue+`
|
|
|
Actual: `+Ke.attribValue);else if(kt==="xmlns"&&Ke.attribValue!==Be)ut(Ke,"xmlns: prefix must be bound to "+Be+`
|
|
|
Actual: `+Ke.attribValue);else{var hn=Ke.tag,en=Ke.tags[Ke.tags.length-1]||Ke;hn.ns===en.ns&&(hn.ns=(0,re.default)(en.ns)),hn.ns[kt]=Ke.attribValue}Ke.attribList.push([Ke.attribName,Ke.attribValue])}else Ke.tag.attributes[Ke.attribName]=Ke.attribValue,Mt(Ke,"onattribute",{name:Ke.attribName,value:Ke.attribValue});Ke.attribName=Ke.attribValue=""}function wt(Ke,We){if(Ke.opt.xmlns){var vt=Ke.tag,kt=ct(Ke.tagName);vt.prefix=kt.prefix,vt.local=kt.local,vt.uri=vt.ns[kt.prefix]||"",vt.prefix&&!vt.uri&&(ut(Ke,"Unbound namespace prefix: "+(0,pe.default)(Ke.tagName)),vt.uri=kt.prefix);var hn=Ke.tags[Ke.tags.length-1]||Ke;vt.ns&&hn.ns!==vt.ns&&(0,z.default)(vt.ns).forEach(function(bi){Mt(Ke,"onopennamespace",{prefix:bi,uri:vt.ns[bi]})});for(var en=0,Gt=Ke.attribList.length;en<Gt;en++){var gn=Ke.attribList[en],bn=gn[0],yn=gn[1],un=ct(bn,!0),Jn=un.prefix,mn=un.local,Yn=Jn===""?"":vt.ns[Jn]||"",ri={name:bn,value:yn,prefix:Jn,local:mn,uri:Yn};Jn&&Jn!=="xmlns"&&!Yn&&(ut(Ke,"Unbound namespace prefix: "+(0,pe.default)(Jn)),ri.uri=Jn),Ke.tag.attributes[bn]=ri,Mt(Ke,"onattribute",ri)}Ke.attribList.length=0}Ke.tag.isSelfClosing=!!We,Ke.sawRoot=!0,Ke.tags.push(Ke.tag),Mt(Ke,"onopentag",Ke.tag),We||(Ke.noscript||Ke.tagName.toLowerCase()!=="script"?Ke.state=ze.TEXT:Ke.state=ze.SCRIPT,Ke.tag=null,Ke.tagName=""),Ke.attribName=Ke.attribValue="",Ke.attribList.length=0}function xt(Ke){if(!Ke.tagName)return ut(Ke,"Weird empty close tag."),Ke.textNode+="</>",void(Ke.state=ze.TEXT);if(Ke.script){if(Ke.tagName!=="script")return Ke.script+="</"+Ke.tagName+">",Ke.tagName="",void(Ke.state=ze.SCRIPT);Mt(Ke,"onscript",Ke.script),Ke.script=""}var We=Ke.tags.length,vt=Ke.tagName;Ke.strict||(vt=vt[Ke.looseCase]());for(var kt=vt;We--&&Ke.tags[We].name!==kt;)ut(Ke,"Unexpected close tag");if(We<0)return ut(Ke,"Unmatched closing tag: "+Ke.tagName),Ke.textNode+="</"+Ke.tagName+">",void(Ke.state=ze.TEXT);Ke.tagName=vt;for(var hn=Ke.tags.length;hn-- >We;){var en=Ke.tag=Ke.tags.pop();Ke.tagName=Ke.tag.name,Mt(Ke,"onclosetag",Ke.tagName);var Gt={};for(var gn in en.ns)Gt[gn]=en.ns[gn];var bn=Ke.tags[Ke.tags.length-1]||Ke;Ke.opt.xmlns&&en.ns!==bn.ns&&(0,z.default)(en.ns).forEach(function(yn){var un=en.ns[yn];Mt(Ke,"onclosenamespace",{prefix:yn,uri:un})})}We===0&&(Ke.closedRoot=!0),Ke.tagName=Ke.attribValue=Ke.attribName="",Ke.attribList.length=0,Ke.state=ze.TEXT}function Ut(Ke){var We,vt=Ke.entity,kt=vt.toLowerCase(),hn="";return Ke.ENTITIES[vt]?Ke.ENTITIES[vt]:Ke.ENTITIES[kt]?Ke.ENTITIES[kt]:(vt=kt,vt.charAt(0)==="#"&&(vt.charAt(1)==="x"?(vt=vt.slice(2),We=parseInt(vt,16),hn=We.toString(16)):(vt=vt.slice(1),We=parseInt(vt,10),hn=We.toString(10))),vt=vt.replace(/^0+/,""),isNaN(We)||hn.toLowerCase()!==vt?(ut(Ke,"Invalid character entity"),"&"+Ke.entity+";"):(0,ye.default)(We))}function zt(Ke,We){We==="<"?(Ke.state=ze.OPEN_WAKA,Ke.startTagPosition=Ke.position):Oe(We)||(ut(Ke,"Non-whitespace before first tag."),Ke.textNode=We,Ke.state=ze.TEXT)}function dn(Ke,We){var vt="";return We<Ke.length&&(vt=Ke.charAt(We)),vt}function Ft(Ke){var We=this;if(this.error)throw this.error;if(We.closed)return dt(We,"Cannot write after close. Assign an onready handler.");if(Ke===null)return Rt(We);(Ke===void 0?"undefined":(0,ge.default)(Ke))==="object"&&(Ke=Ke.toString());for(var vt=0,kt="";kt=dn(Ke,vt++),We.c=kt,!!kt;)switch(We.trackPosition&&(We.position++,kt===`
|
|
|
`?(We.line++,We.column=0):We.column++),We.state){case ze.BEGIN:if(We.state=ze.BEGIN_WHITESPACE,kt==="\uFEFF")continue;zt(We,kt);continue;case ze.BEGIN_WHITESPACE:zt(We,kt);continue;case ze.TEXT:if(We.sawRoot&&!We.closedRoot){for(var hn=vt-1;kt&&kt!=="<"&&kt!=="&";)(kt=dn(Ke,vt++))&&We.trackPosition&&(We.position++,kt===`
|
|
|
`?(We.line++,We.column=0):We.column++);We.textNode+=Ke.substring(hn,vt-1)}kt!=="<"||We.sawRoot&&We.closedRoot&&!We.strict?(Oe(kt)||We.sawRoot&&!We.closedRoot||ut(We,"Text data outside of root node."),kt==="&"?We.state=ze.TEXT_ENTITY:We.textNode+=kt):(We.state=ze.OPEN_WAKA,We.startTagPosition=We.position);continue;case ze.SCRIPT:kt==="<"?We.state=ze.SCRIPT_ENDING:We.script+=kt;continue;case ze.SCRIPT_ENDING:kt==="/"?We.state=ze.CLOSE_TAG:(We.script+="<"+kt,We.state=ze.SCRIPT);continue;case ze.OPEN_WAKA:if(kt==="!")We.state=ze.SGML_DECL,We.sgmlDecl="";else if(!Oe(kt))if(Xe(ht,kt))We.state=ze.OPEN_TAG,We.tagName=kt;else if(kt==="/")We.state=ze.CLOSE_TAG,We.tagName="";else if(kt==="?")We.state=ze.PROC_INST,We.procInstName=We.procInstBody="";else{if(ut(We,"Unencoded <"),We.startTagPosition+1<We.position){var en=We.position-We.startTagPosition;kt=new Array(en).join(" ")+kt}We.textNode+="<"+kt,We.state=ze.TEXT}continue;case ze.SGML_DECL:(We.sgmlDecl+kt).toUpperCase()===Jt?(Mt(We,"onopencdata"),We.state=ze.CDATA,We.sgmlDecl="",We.cdata=""):We.sgmlDecl+kt==="--"?(We.state=ze.COMMENT,We.comment="",We.sgmlDecl=""):(We.sgmlDecl+kt).toUpperCase()===lt?(We.state=ze.DOCTYPE,(We.doctype||We.sawRoot)&&ut(We,"Inappropriately located doctype declaration"),We.doctype="",We.sgmlDecl=""):kt===">"?(Mt(We,"onsgmldeclaration",We.sgmlDecl),We.sgmlDecl="",We.state=ze.TEXT):(Ze(kt)&&(We.state=ze.SGML_DECL_QUOTED),We.sgmlDecl+=kt);continue;case ze.SGML_DECL_QUOTED:kt===We.q&&(We.state=ze.SGML_DECL,We.q=""),We.sgmlDecl+=kt;continue;case ze.DOCTYPE:kt===">"?(We.state=ze.TEXT,Mt(We,"ondoctype",We.doctype),We.doctype=!0):(We.doctype+=kt,kt==="["?We.state=ze.DOCTYPE_DTD:Ze(kt)&&(We.state=ze.DOCTYPE_QUOTED,We.q=kt));continue;case ze.DOCTYPE_QUOTED:We.doctype+=kt,kt===We.q&&(We.q="",We.state=ze.DOCTYPE);continue;case ze.DOCTYPE_DTD:We.doctype+=kt,kt==="]"?We.state=ze.DOCTYPE:Ze(kt)&&(We.state=ze.DOCTYPE_DTD_QUOTED,We.q=kt);continue;case ze.DOCTYPE_DTD_QUOTED:We.doctype+=kt,kt===We.q&&(We.state=ze.DOCTYPE_DTD,We.q="");continue;case ze.COMMENT:kt==="-"?We.state=ze.COMMENT_ENDING:We.comment+=kt;continue;case ze.COMMENT_ENDING:kt==="-"?(We.state=ze.COMMENT_ENDED,We.comment=_t(We.opt,We.comment),We.comment&&Mt(We,"oncomment",We.comment),We.comment=""):(We.comment+="-"+kt,We.state=ze.COMMENT);continue;case ze.COMMENT_ENDED:kt!==">"?(ut(We,"Malformed comment"),We.comment+="--"+kt,We.state=ze.COMMENT):We.state=ze.TEXT;continue;case ze.CDATA:kt==="]"?We.state=ze.CDATA_ENDING:We.cdata+=kt;continue;case ze.CDATA_ENDING:kt==="]"?We.state=ze.CDATA_ENDING_2:(We.cdata+="]"+kt,We.state=ze.CDATA);continue;case ze.CDATA_ENDING_2:kt===">"?(We.cdata&&Mt(We,"oncdata",We.cdata),Mt(We,"onclosecdata"),We.cdata="",We.state=ze.TEXT):kt==="]"?We.cdata+="]":(We.cdata+="]]"+kt,We.state=ze.CDATA);continue;case ze.PROC_INST:kt==="?"?We.state=ze.PROC_INST_ENDING:Oe(kt)?We.state=ze.PROC_INST_BODY:We.procInstName+=kt;continue;case ze.PROC_INST_BODY:if(!We.procInstBody&&Oe(kt))continue;kt==="?"?We.state=ze.PROC_INST_ENDING:We.procInstBody+=kt;continue;case ze.PROC_INST_ENDING:kt===">"?(Mt(We,"onprocessinginstruction",{name:We.procInstName,body:We.procInstBody}),We.procInstName=We.procInstBody="",We.state=ze.TEXT):(We.procInstBody+="?"+kt,We.state=ze.PROC_INST_BODY);continue;case ze.OPEN_TAG:Xe(et,kt)?We.tagName+=kt:(rt(We),kt===">"?wt(We):kt==="/"?We.state=ze.OPEN_TAG_SLASH:(Oe(kt)||ut(We,"Invalid character in tag name"),We.state=ze.ATTRIB));continue;case ze.OPEN_TAG_SLASH:kt===">"?(wt(We,!0),xt(We)):(ut(We,"Forward-slash in opening tag not followed by >"),We.state=ze.ATTRIB);continue;case ze.ATTRIB:if(Oe(kt))continue;kt===">"?wt(We):kt==="/"?We.state=ze.OPEN_TAG_SLASH:Xe(ht,kt)?(We.attribName=kt,We.attribValue="",We.state=ze.ATTRIB_NAME):ut(We,"Invalid attribute name");continue;case ze.ATTRIB_NAME:kt==="="?We.state=ze.ATTRIB_VALUE:kt===">"?(ut(We,"Attribute without value"),We.attribValue=We.attribName,yt(We),wt(We)):Oe(kt)?We.state=ze.ATTRIB_NAME_SAW_WHITE:Xe(et,kt)?We.attribName+=kt:ut(We,"Invalid attribute name");continue;case ze.ATTRIB_NAME_SAW_WHITE:if(kt==="=")We.state=ze.ATTRIB_VALUE;else{if(Oe(kt))continue;ut(We,"Attribute without value"),We.tag.attributes[We.attribName]="",We.attribValue="",Mt(We,"onattribute",{name:We.attribName,value:""}),We.attribName="",kt===">"?wt(We):Xe(ht,kt)?(We.attribName=kt,We.state=ze.ATTRIB_NAME):(ut(We,"Invalid attribute name"),We.state=ze.ATTRIB)}continue;case ze.ATTRIB_VALUE:if(Oe(kt))continue;Ze(kt)?(We.q=kt,We.state=ze.ATTRIB_VALUE_QUOTED):(ut(We,"Unquoted attribute value"),We.state=ze.ATTRIB_VALUE_UNQUOTED,We.attribValue=kt);continue;case ze.ATTRIB_VALUE_QUOTED:if(kt!==We.q){kt==="&"?We.state=ze.ATTRIB_VALUE_ENTITY_Q:We.attribValue+=kt;continue}yt(We),We.q="",We.state=ze.ATTRIB_VALUE_CLOSED;continue;case ze.ATTRIB_VALUE_CLOSED:Oe(kt)?We.state=ze.ATTRIB:kt===">"?wt(We):kt==="/"?We.state=ze.OPEN_TAG_SLASH:Xe(ht,kt)?(ut(We,"No whitespace between attributes"),We.attribName=kt,We.attribValue="",We.state=ze.ATTRIB_NAME):ut(We,"Invalid attribute name");continue;case ze.ATTRIB_VALUE_UNQUOTED:if(!qe(kt)){kt==="&"?We.state=ze.ATTRIB_VALUE_ENTITY_U:We.attribValue+=kt;continue}yt(We),kt===">"?wt(We):We.state=ze.ATTRIB;continue;case ze.CLOSE_TAG:if(We.tagName)kt===">"?xt(We):Xe(et,kt)?We.tagName+=kt:We.script?(We.script+="</"+We.tagName,We.tagName="",We.state=ze.SCRIPT):(Oe(kt)||ut(We,"Invalid tagname in closing tag"),We.state=ze.CLOSE_TAG_SAW_WHITE);else{if(Oe(kt))continue;mt(ht,kt)?We.script?(We.script+="</"+kt,We.state=ze.SCRIPT):ut(We,"Invalid tagname in closing tag."):We.tagName=kt}continue;case ze.CLOSE_TAG_SAW_WHITE:if(Oe(kt))continue;kt===">"?xt(We):ut(We,"Invalid characters in closing tag");continue;case ze.TEXT_ENTITY:case ze.ATTRIB_VALUE_ENTITY_Q:case ze.ATTRIB_VALUE_ENTITY_U:var Gt,gn;switch(We.state){case ze.TEXT_ENTITY:Gt=ze.TEXT,gn="textNode";break;case ze.ATTRIB_VALUE_ENTITY_Q:Gt=ze.ATTRIB_VALUE_QUOTED,gn="attribValue";break;case ze.ATTRIB_VALUE_ENTITY_U:Gt=ze.ATTRIB_VALUE_UNQUOTED,gn="attribValue"}kt===";"?(We[gn]+=Ut(We),We.entity="",We.state=Gt):Xe(We.entity.length?Re:Ve,kt)?We.entity+=kt:(ut(We,"Invalid character in entity name"),We[gn]+="&"+We.entity+kt,We.entity="",We.state=Gt);continue;default:throw new Error(We,"Unknown state: "+We.state)}return We.position>=We.bufferCheckPosition&&me(We),We}ae.parser=function(Ke,We){return new le(Ke,We)},ae.SAXParser=le,ae.SAXStream=De,ae.createStream=Ae,ae.MAX_BUFFER_LENGTH=65536;var Dt=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];ae.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],re.default||(Object.create=function(Ke){function We(){}return We.prototype=Ke,new We}),z.default||(Object.keys=function(Ke){var We=[];for(var vt in Ke)Ke.hasOwnProperty(vt)&&We.push(vt);return We}),le.prototype={end:function(){Rt(this)},write:Ft,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){Pe(this)}};var Qt;try{Qt=Se("stream").Stream}catch(Ke){Qt=function(){}}var Yt=ae.EVENTS.filter(function(Ke){return Ke!=="error"&&Ke!=="end"});De.prototype=(0,re.default)(Qt.prototype,{constructor:{value:De}}),De.prototype.write=function(Ke){if(typeof Ce=="function"&&typeof Ce.isBuffer=="function"&&Ce.isBuffer(Ke)){if(!this._decoder){var We=Se("string_decoder").StringDecoder;this._decoder=new We("utf8")}Ke=this._decoder.write(Ke)}return this._parser.write(Ke.toString()),this.emit("data",Ke),!0},De.prototype.end=function(Ke){return Ke&&Ke.length&&this.write(Ke),this._parser.end(),!0},De.prototype.on=function(Ke,We){var vt=this;return vt._parser["on"+Ke]||Yt.indexOf(Ke)===-1||(vt._parser["on"+Ke]=function(){var kt=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);kt.splice(0,0,Ke),vt.emit.apply(vt,kt)}),Qt.prototype.on.call(vt,Ke,We)};var Jt="[CDATA[",lt="DOCTYPE",Ue="http://www.w3.org/XML/1998/namespace",Be="http://www.w3.org/2000/xmlns/",tt={xml:Ue,xmlns:Be},ht=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,et=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,Ve=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Re=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,ze=0;ae.STATE={BEGIN:ze++,BEGIN_WHITESPACE:ze++,TEXT:ze++,TEXT_ENTITY:ze++,OPEN_WAKA:ze++,SGML_DECL:ze++,SGML_DECL_QUOTED:ze++,DOCTYPE:ze++,DOCTYPE_QUOTED:ze++,DOCTYPE_DTD:ze++,DOCTYPE_DTD_QUOTED:ze++,COMMENT_STARTING:ze++,COMMENT:ze++,COMMENT_ENDING:ze++,COMMENT_ENDED:ze++,CDATA:ze++,CDATA_ENDING:ze++,CDATA_ENDING_2:ze++,PROC_INST:ze++,PROC_INST_BODY:ze++,PROC_INST_ENDING:ze++,OPEN_TAG:ze++,OPEN_TAG_SLASH:ze++,ATTRIB:ze++,ATTRIB_NAME:ze++,ATTRIB_NAME_SAW_WHITE:ze++,ATTRIB_VALUE:ze++,ATTRIB_VALUE_QUOTED:ze++,ATTRIB_VALUE_CLOSED:ze++,ATTRIB_VALUE_UNQUOTED:ze++,ATTRIB_VALUE_ENTITY_Q:ze++,ATTRIB_VALUE_ENTITY_U:ze++,CLOSE_TAG:ze++,CLOSE_TAG_SAW_WHITE:ze++,SCRIPT:ze++,SCRIPT_ENDING:ze++},ae.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},ae.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,z.default)(ae.ENTITIES).forEach(function(Ke){var We=ae.ENTITIES[Ke],vt=typeof We=="number"?String.fromCharCode(We):We;ae.ENTITIES[Ke]=vt});for(var it in ae.STATE)ae.STATE[ae.STATE[it]]=it;ze=ae.STATE,ye.default||function(){var Ke=String.fromCharCode,We=Math.floor,vt=function(){var kt,hn,en=[],Gt=-1,gn=arguments.length;if(!gn)return"";for(var bn="";++Gt<gn;){var yn=Number(arguments[Gt]);if(!isFinite(yn)||yn<0||yn>1114111||We(yn)!==yn)throw RangeError("Invalid code point: "+yn);yn<=65535?en.push(yn):(yn-=65536,kt=55296+(yn>>10),hn=yn%1024+56320,en.push(kt,hn)),(Gt+1===gn||en.length>16384)&&(bn+=Ke.apply(null,en),en.length=0)}return bn};ue.default?Object.defineProperty(String,"fromCodePoint",{value:vt,configurable:!0,writable:!0}):String.fromCodePoint=vt}()})(Me===void 0?(void 0).sax={}:Me)}).call(this,Se("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/create":19,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/object/keys":23,"babel-runtime/core-js/string/from-code-point":26,"babel-runtime/helpers/typeof":32,buffer:38,stream:195,string_decoder:37}],195:[function(Se,je,Me){function Ce(){xe.call(this)}je.exports=Ce;var xe=Se("events").EventEmitter;Se("inherits")(Ce,xe),Ce.Readable=Se("readable-stream/readable.js"),Ce.Writable=Se("readable-stream/writable.js"),Ce.Duplex=Se("readable-stream/duplex.js"),Ce.Transform=Se("readable-stream/transform.js"),Ce.PassThrough=Se("readable-stream/passthrough.js"),Ce.Stream=Ce,Ce.prototype.pipe=function(be,ye){function we(oe){be.writable&&be.write(oe)===!1&&ee.pause&&ee.pause()}function pe(){ee.readable&&ee.resume&&ee.resume()}function de(){z||(z=!0,be.end())}function ge(){z||(z=!0,typeof be.destroy=="function"&&be.destroy())}function fe(oe){if(ue(),xe.listenerCount(this,"error")===0)throw oe}function ue(){ee.removeListener("data",we),be.removeListener("drain",pe),ee.removeListener("end",de),ee.removeListener("close",ge),ee.removeListener("error",fe),be.removeListener("error",fe),ee.removeListener("end",ue),ee.removeListener("close",ue),be.removeListener("close",ue)}var ee=this;ee.on("data",we),be.on("drain",pe),be._isStdio||ye&&ye.end===!1||(ee.on("end",de),ee.on("close",ge));var z=!1;return ee.on("error",fe),be.on("error",fe),ee.on("end",ue),ee.on("close",ue),be.on("close",ue),be.emit("pipe",ee),be}},{events:158,inherits:162,"readable-stream/duplex.js":178,"readable-stream/passthrough.js":187,"readable-stream/readable.js":188,"readable-stream/transform.js":189,"readable-stream/writable.js":190}],196:[function(Se,je,Me){(function(Ce){var xe=Se("./lib/request"),be=Se("./lib/response"),ye=Se("xtend"),we=Se("builtin-status-codes"),pe=Se("url"),de=Me;de.request=function(ge,fe){ge=typeof ge=="string"?pe.parse(ge):ye(ge);var ue=Ce.location.protocol.search(/^https?:$/)===-1?"http:":"",ee=ge.protocol||ue,z=ge.hostname||ge.host,oe=ge.port,re=ge.path||"/";z&&z.indexOf(":")!==-1&&(z="["+z+"]"),ge.url=(z?ee+"//"+z:"")+(oe?":"+oe:"")+re,ge.method=(ge.method||"GET").toUpperCase(),ge.headers=ge.headers||{};var ae=new xe(ge);return fe&&ae.on("response",fe),ae},de.get=function(ge,fe){var ue=de.request(ge,fe);return ue.end(),ue},de.ClientRequest=xe,de.IncomingMessage=be.IncomingMessage,de.Agent=function(){},de.Agent.defaultMaxSockets=4,de.globalAgent=new de.Agent,de.STATUS_CODES=we,de.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,typeof Ie.g!="undefined"?Ie.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":198,"./lib/response":199,"builtin-status-codes":39,url:203,xtend:236}],197:[function(Se,je,Me){(function(Ce){"use strict";function xe(){if(we!==void 0)return we;if(Ce.XMLHttpRequest){we=new Ce.XMLHttpRequest;try{we.open("GET",Ce.XDomainRequest?"/":"https://example.com")}catch(ge){we=null}}else we=null;return we}function be(ge){var fe=xe();if(!fe)return!1;try{return fe.responseType=ge,fe.responseType===ge}catch(ue){}return!1}function ye(ge){return typeof ge=="function"}Me.fetch=ye(Ce.fetch)&&ye(Ce.ReadableStream),Me.writableStream=ye(Ce.WritableStream),Me.abortController=ye(Ce.AbortController),Me.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),Me.blobConstructor=!0}catch(ge){}var we,pe=Ce.ArrayBuffer!==void 0,de=pe&&ye(Ce.ArrayBuffer.prototype.slice);Me.arraybuffer=Me.fetch||pe&&be("arraybuffer"),Me.msstream=!Me.fetch&&de&&be("ms-stream"),Me.mozchunkedarraybuffer=!Me.fetch&&pe&&be("moz-chunked-arraybuffer"),Me.overrideMimeType=Me.fetch||!!xe()&&ye(xe().overrideMimeType),Me.vbArray=ye(Ce.VBArray),we=null}).call(this,typeof Ie.g!="undefined"?Ie.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],198:[function(Se,je,Me){(function(Ce,xe,be){"use strict";function ye(me,ve){return ge.fetch&&ve?"fetch":ge.mozchunkedarraybuffer?"moz-chunked-arraybuffer":ge.msstream?"ms-stream":ge.arraybuffer&&me?"arraybuffer":ge.vbArray&&me?"text:vbarray":"text"}function we(me){try{var ve=me.status;return ve!==null&&ve!==0}catch(Pe){return!1}}var pe=Se("babel-runtime/core-js/object/keys"),de=function(me){return me&&me.__esModule?me:{default:me}}(pe),ge=Se("./capability"),fe=Se("inherits"),ue=Se("./response"),ee=Se("readable-stream"),z=Se("to-arraybuffer"),oe=ue.IncomingMessage,re=ue.readyStates,ae=je.exports=function(me){var ve=this;ee.Writable.call(ve),ve._opts=me,ve._body=[],ve._headers={},me.auth&&ve.setHeader("Authorization","Basic "+new be(me.auth).toString("base64")),(0,de.default)(me.headers).forEach(function(De){ve.setHeader(De,me.headers[De])});var Pe,Ae=!0;if(me.mode==="disable-fetch"||"requestTimeout"in me&&!ge.abortController)Ae=!1,Pe=!0;else if(me.mode==="prefer-streaming")Pe=!1;else if(me.mode==="allow-wrong-content-type")Pe=!ge.overrideMimeType;else{if(me.mode&&me.mode!=="default"&&me.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");Pe=!0}ve._mode=ye(Pe,Ae),ve._fetchTimer=null,ve.on("finish",function(){ve._onFinish()})};fe(ae,ee.Writable),ae.prototype.setHeader=function(me,ve){var Pe=this,Ae=me.toLowerCase();le.indexOf(Ae)===-1&&(Pe._headers[Ae]={name:me,value:ve})},ae.prototype.getHeader=function(me){var ve=this._headers[me.toLowerCase()];return ve?ve.value:null},ae.prototype.removeHeader=function(me){delete this._headers[me.toLowerCase()]},ae.prototype._onFinish=function(){var me=this;if(!me._destroyed){var ve=me._opts,Pe=me._headers,Ae=null;ve.method!=="GET"&&ve.method!=="HEAD"&&(Ae=ge.arraybuffer?z(be.concat(me._body)):ge.blobConstructor?new xe.Blob(me._body.map(function(Xe){return z(Xe)}),{type:(Pe["content-type"]||{}).value||""}):be.concat(me._body).toString());var De=[];if((0,de.default)(Pe).forEach(function(Xe){var mt=Pe[Xe].name,pt=Pe[Xe].value;Array.isArray(pt)?pt.forEach(function(Mt){De.push([mt,Mt])}):De.push([mt,pt])}),me._mode==="fetch"){var Oe=null;if(ge.abortController){var Ze=new AbortController;Oe=Ze.signal,me._fetchAbortController=Ze,"requestTimeout"in ve&&ve.requestTimeout!==0&&(me._fetchTimer=xe.setTimeout(function(){me.emit("requestTimeout"),me._fetchAbortController&&me._fetchAbortController.abort()},ve.requestTimeout))}xe.fetch(me._opts.url,{method:me._opts.method,headers:De,body:Ae||void 0,mode:"cors",credentials:ve.withCredentials?"include":"same-origin",signal:Oe}).then(function(Xe){me._fetchResponse=Xe,me._connect()},function(Xe){xe.clearTimeout(me._fetchTimer),me._destroyed||me.emit("error",Xe)})}else{var qe=me._xhr=new xe.XMLHttpRequest;try{qe.open(me._opts.method,me._opts.url,!0)}catch(Xe){return void Ce.nextTick(function(){me.emit("error",Xe)})}"responseType"in qe&&(qe.responseType=me._mode.split(":")[0]),"withCredentials"in qe&&(qe.withCredentials=!!ve.withCredentials),me._mode==="text"&&"overrideMimeType"in qe&&qe.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in ve&&(qe.timeout=ve.requestTimeout,qe.ontimeout=function(){me.emit("requestTimeout")}),De.forEach(function(Xe){qe.setRequestHeader(Xe[0],Xe[1])}),me._response=null,qe.onreadystatechange=function(){switch(qe.readyState){case re.LOADING:case re.DONE:me._onXHRProgress()}},me._mode==="moz-chunked-arraybuffer"&&(qe.onprogress=function(){me._onXHRProgress()}),qe.onerror=function(){me._destroyed||me.emit("error",new Error("XHR error"))};try{qe.send(Ae)}catch(Xe){return void Ce.nextTick(function(){me.emit("error",Xe)})}}}},ae.prototype._onXHRProgress=function(){var me=this;we(me._xhr)&&!me._destroyed&&(me._response||me._connect(),me._response._onXHRProgress())},ae.prototype._connect=function(){var me=this;me._destroyed||(me._response=new oe(me._xhr,me._fetchResponse,me._mode,me._fetchTimer),me._response.on("error",function(ve){me.emit("error",ve)}),me.emit("response",me._response))},ae.prototype._write=function(me,ve,Pe){this._body.push(me),Pe()},ae.prototype.abort=ae.prototype.destroy=function(){var me=this;me._destroyed=!0,xe.clearTimeout(me._fetchTimer),me._response&&(me._response._destroyed=!0),me._xhr?me._xhr.abort():me._fetchAbortController&&me._fetchAbortController.abort()},ae.prototype.end=function(me,ve,Pe){var Ae=this;typeof me=="function"&&(Pe=me,me=void 0),ee.Writable.prototype.end.call(Ae,me,ve,Pe)},ae.prototype.flushHeaders=function(){},ae.prototype.setTimeout=function(){},ae.prototype.setNoDelay=function(){},ae.prototype.setSocketKeepAlive=function(){};var le=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,Se("_process"),typeof Ie.g!="undefined"?Ie.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{},Se("buffer").Buffer)},{"./capability":197,"./response":199,_process:173,"babel-runtime/core-js/object/keys":23,buffer:38,inherits:162,"readable-stream":188,"to-arraybuffer":202}],199:[function(Se,je,Me){(function(Ce,xe,be){"use strict";var ye=Se("babel-runtime/core-js/promise"),we=function(ee){return ee&&ee.__esModule?ee:{default:ee}}(ye),pe=Se("./capability"),de=Se("inherits"),ge=Se("readable-stream"),fe=Me.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},ue=Me.IncomingMessage=function(ee,z,oe,re){var ae=this;if(ge.Readable.call(ae),ae._mode=oe,ae.headers={},ae.rawHeaders=[],ae.trailers={},ae.rawTrailers=[],ae.on("end",function(){Ce.nextTick(function(){ae.emit("close")})}),oe==="fetch"){if(ae._fetchResponse=z,ae.url=z.url,ae.statusCode=z.status,ae.statusMessage=z.statusText,z.headers.forEach(function(Ae,De){ae.headers[De.toLowerCase()]=Ae,ae.rawHeaders.push(De,Ae)}),pe.writableStream){var le=new WritableStream({write:function(Ae){return new we.default(function(De,Oe){ae._destroyed?Oe():ae.push(new be(Ae))?De():ae._resumeFetch=De})},close:function(){xe.clearTimeout(re),ae._destroyed||ae.push(null)},abort:function(Ae){ae._destroyed||ae.emit("error",Ae)}});try{return void z.body.pipeTo(le).catch(function(Ae){xe.clearTimeout(re),ae._destroyed||ae.emit("error",Ae)})}catch(Ae){}}var me=z.body.getReader();(function Ae(){me.read().then(function(De){if(!ae._destroyed){if(De.done)return xe.clearTimeout(re),void ae.push(null);ae.push(new be(De.value)),Ae()}}).catch(function(De){xe.clearTimeout(re),ae._destroyed||ae.emit("error",De)})})()}else if(ae._xhr=ee,ae._pos=0,ae.url=ee.responseURL,ae.statusCode=ee.status,ae.statusMessage=ee.statusText,ee.getAllResponseHeaders().split(/\r?\n/).forEach(function(Ae){var De=Ae.match(/^([^:]+):\s*(.*)/);if(De){var Oe=De[1].toLowerCase();Oe==="set-cookie"?(ae.headers[Oe]===void 0&&(ae.headers[Oe]=[]),ae.headers[Oe].push(De[2])):ae.headers[Oe]!==void 0?ae.headers[Oe]+=", "+De[2]:ae.headers[Oe]=De[2],ae.rawHeaders.push(De[1],De[2])}}),ae._charset="x-user-defined",!pe.overrideMimeType){var ve=ae.rawHeaders["mime-type"];if(ve){var Pe=ve.match(/;\s*charset=([^;])(;|$)/);Pe&&(ae._charset=Pe[1].toLowerCase())}ae._charset||(ae._charset="utf-8")}};de(ue,ge.Readable),ue.prototype._read=function(){var ee=this,z=ee._resumeFetch;z&&(ee._resumeFetch=null,z())},ue.prototype._onXHRProgress=function(){var ee=this,z=ee._xhr,oe=null;switch(ee._mode){case"text:vbarray":if(z.readyState!==fe.DONE)break;try{oe=new xe.VBArray(z.responseBody).toArray()}catch(ve){}if(oe!==null){ee.push(new be(oe));break}case"text":try{oe=z.responseText}catch(ve){ee._mode="text:vbarray";break}if(oe.length>ee._pos){var re=oe.substr(ee._pos);if(ee._charset==="x-user-defined"){for(var ae=new be(re.length),le=0;le<re.length;le++)ae[le]=255&re.charCodeAt(le);ee.push(ae)}else ee.push(re,ee._charset);ee._pos=oe.length}break;case"arraybuffer":if(z.readyState!==fe.DONE||!z.response)break;oe=z.response,ee.push(new be(new Uint8Array(oe)));break;case"moz-chunked-arraybuffer":if(oe=z.response,z.readyState!==fe.LOADING||!oe)break;ee.push(new be(new Uint8Array(oe)));break;case"ms-stream":if(oe=z.response,z.readyState!==fe.LOADING)break;var me=new xe.MSStreamReader;me.onprogress=function(){me.result.byteLength>ee._pos&&(ee.push(new be(new Uint8Array(me.result.slice(ee._pos)))),ee._pos=me.result.byteLength)},me.onload=function(){ee.push(null)},me.readAsArrayBuffer(oe)}ee._xhr.readyState===fe.DONE&&ee._mode!=="ms-stream"&&ee.push(null)}}).call(this,Se("_process"),typeof Ie.g!="undefined"?Ie.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{},Se("buffer").Buffer)},{"./capability":197,_process:173,"babel-runtime/core-js/promise":24,buffer:38,inherits:162,"readable-stream":188}],200:[function(Se,je,Me){"use strict";function Ce(ve){if(!ve)return"utf8";for(var Pe;;)switch(ve){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return ve;default:if(Pe)return;ve=(""+ve).toLowerCase(),Pe=!0}}function xe(ve){var Pe=Ce(ve);if(typeof Pe!="string"&&(le.isEncoding===me||!me(ve)))throw new Error("Unknown encoding: "+ve);return Pe||ve}function be(ve){this.encoding=xe(ve);var Pe;switch(this.encoding){case"utf16le":this.text=ue,this.end=ee,Pe=4;break;case"utf8":this.fillLast=de,Pe=4;break;case"base64":this.text=z,this.end=oe,Pe=3;break;default:return this.write=re,void(this.end=ae)}this.lastNeed=0,this.lastTotal=0,this.lastChar=le.allocUnsafe(Pe)}function ye(ve){return ve<=127?0:ve>>5==6?2:ve>>4==14?3:ve>>3==30?4:ve>>6==2?-1:-2}function we(ve,Pe,Ae){var De=Pe.length-1;if(De<Ae)return 0;var Oe=ye(Pe[De]);return Oe>=0?(Oe>0&&(ve.lastNeed=Oe-1),Oe):--De<Ae||Oe===-2?0:(Oe=ye(Pe[De]))>=0?(Oe>0&&(ve.lastNeed=Oe-2),Oe):--De<Ae||Oe===-2?0:(Oe=ye(Pe[De]),Oe>=0?(Oe>0&&(Oe===2?Oe=0:ve.lastNeed=Oe-3),Oe):0)}function pe(ve,Pe,Ae){if((192&Pe[0])!=128)return ve.lastNeed=0,"\u951F\uFFFD";if(ve.lastNeed>1&&Pe.length>1){if((192&Pe[1])!=128)return ve.lastNeed=1,"\u951F\uFFFD";if(ve.lastNeed>2&&Pe.length>2&&(192&Pe[2])!=128)return ve.lastNeed=2,"\u951F\uFFFD"}}function de(ve){var Pe=this.lastTotal-this.lastNeed,Ae=pe(this,ve,Pe);return Ae!==void 0?Ae:this.lastNeed<=ve.length?(ve.copy(this.lastChar,Pe,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(ve.copy(this.lastChar,Pe,0,ve.length),void(this.lastNeed-=ve.length))}function ge(ve,Pe){var Ae=we(this,ve,Pe);if(!this.lastNeed)return ve.toString("utf8",Pe);this.lastTotal=Ae;var De=ve.length-(Ae-this.lastNeed);return ve.copy(this.lastChar,0,De),ve.toString("utf8",Pe,De)}function fe(ve){var Pe=ve&&ve.length?this.write(ve):"";return this.lastNeed?Pe+"\u951F\uFFFD":Pe}function ue(ve,Pe){if((ve.length-Pe)%2==0){var Ae=ve.toString("utf16le",Pe);if(Ae){var De=Ae.charCodeAt(Ae.length-1);if(De>=55296&&De<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=ve[ve.length-2],this.lastChar[1]=ve[ve.length-1],Ae.slice(0,-1)}return Ae}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=ve[ve.length-1],ve.toString("utf16le",Pe,ve.length-1)}function ee(ve){var Pe=ve&&ve.length?this.write(ve):"";if(this.lastNeed){var Ae=this.lastTotal-this.lastNeed;return Pe+this.lastChar.toString("utf16le",0,Ae)}return Pe}function z(ve,Pe){var Ae=(ve.length-Pe)%3;return Ae===0?ve.toString("base64",Pe):(this.lastNeed=3-Ae,this.lastTotal=3,Ae===1?this.lastChar[0]=ve[ve.length-1]:(this.lastChar[0]=ve[ve.length-2],this.lastChar[1]=ve[ve.length-1]),ve.toString("base64",Pe,ve.length-Ae))}function oe(ve){var Pe=ve&&ve.length?this.write(ve):"";return this.lastNeed?Pe+this.lastChar.toString("base64",0,3-this.lastNeed):Pe}function re(ve){return ve.toString(this.encoding)}function ae(ve){return ve&&ve.length?this.write(ve):""}var le=Se("safe-buffer").Buffer,me=le.isEncoding||function(ve){switch((ve=""+ve)&&ve.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};Me.StringDecoder=be,be.prototype.write=function(ve){if(ve.length===0)return"";var Pe,Ae;if(this.lastNeed){if((Pe=this.fillLast(ve))===void 0)return"";Ae=this.lastNeed,this.lastNeed=0}else Ae=0;return Ae<ve.length?Pe?Pe+this.text(ve,Ae):this.text(ve,Ae):Pe||""},be.prototype.end=fe,be.prototype.text=ge,be.prototype.fillLast=function(ve){if(this.lastNeed<=ve.length)return ve.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);ve.copy(this.lastChar,this.lastTotal-this.lastNeed,0,ve.length),this.lastNeed-=ve.length}},{"safe-buffer":193}],201:[function(Se,je,Me){(function(Ce,xe){function be(fe,ue){this._id=fe,this._clearFn=ue}var ye=Se("process/browser.js").nextTick,we=Function.prototype.apply,pe=Array.prototype.slice,de={},ge=0;Me.setTimeout=function(){return new be(we.call(setTimeout,window,arguments),clearTimeout)},Me.setInterval=function(){return new be(we.call(setInterval,window,arguments),clearInterval)},Me.clearTimeout=Me.clearInterval=function(fe){fe.close()},be.prototype.unref=be.prototype.ref=function(){},be.prototype.close=function(){this._clearFn.call(window,this._id)},Me.enroll=function(fe,ue){clearTimeout(fe._idleTimeoutId),fe._idleTimeout=ue},Me.unenroll=function(fe){clearTimeout(fe._idleTimeoutId),fe._idleTimeout=-1},Me._unrefActive=Me.active=function(fe){clearTimeout(fe._idleTimeoutId);var ue=fe._idleTimeout;ue>=0&&(fe._idleTimeoutId=setTimeout(function(){fe._onTimeout&&fe._onTimeout()},ue))},Me.setImmediate=typeof Ce=="function"?Ce:function(fe){var ue=ge++,ee=!(arguments.length<2)&&pe.call(arguments,1);return de[ue]=!0,ye(function(){de[ue]&&(ee?fe.apply(null,ee):fe.call(null),Me.clearImmediate(ue))}),ue},Me.clearImmediate=typeof xe=="function"?xe:function(fe){delete de[fe]}}).call(this,Se("timers").setImmediate,Se("timers").clearImmediate)},{"process/browser.js":173,timers:201}],202:[function(Se,je,Me){var Ce=Se("buffer").Buffer;je.exports=function(xe){if(xe instanceof Uint8Array){if(xe.byteOffset===0&&xe.byteLength===xe.buffer.byteLength)return xe.buffer;if(typeof xe.buffer.slice=="function")return xe.buffer.slice(xe.byteOffset,xe.byteOffset+xe.byteLength)}if(Ce.isBuffer(xe)){for(var be=new Uint8Array(xe.length),ye=xe.length,we=0;we<ye;we++)be[we]=xe[we];return be.buffer}throw new Error("Argument must be a Buffer")}},{buffer:38}],203:[function(Se,je,Me){"use strict";function Ce(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function xe(Oe,Ze,qe){if(Oe&&de.isObject(Oe)&&Oe instanceof Ce)return Oe;var Xe=new Ce;return Xe.parse(Oe,Ze,qe),Xe}function be(Oe){return de.isString(Oe)&&(Oe=xe(Oe)),Oe instanceof Ce?Oe.format():Ce.prototype.format.call(Oe)}function ye(Oe,Ze){return xe(Oe,!1,!0).resolve(Ze)}function we(Oe,Ze){return Oe?xe(Oe,!1,!0).resolveObject(Ze):Ze}var pe=Se("punycode"),de=Se("./util");Me.parse=xe,Me.resolve=ye,Me.resolveObject=we,Me.format=be,Me.Url=Ce;var ge=/^([a-z0-9.+-]+:)/i,fe=/:[0-9]*$/,ue=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,ee=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],z=["{","}","|","\\","^","`"].concat(ee),oe=["'"].concat(z),re=["%","/","?",";","#"].concat(oe),ae=["/","?","#"],le=/^[+a-z0-9A-Z_-]{0,63}$/,me=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,ve={javascript:!0,"javascript:":!0},Pe={javascript:!0,"javascript:":!0},Ae={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},De=Se("querystring");Ce.prototype.parse=function(Oe,Ze,qe){if(!de.isString(Oe))throw new TypeError("Parameter 'url' must be a string, not "+typeof Oe);var Xe=Oe.indexOf("?"),mt=Xe!==-1&&Xe<Oe.indexOf("#")?"?":"#",pt=Oe.split(mt),Mt=/\\/g;pt[0]=pt[0].replace(Mt,"/"),Oe=pt.join(mt);var at=Oe;if(at=at.trim(),!qe&&Oe.split("#").length===1){var _t=ue.exec(at);if(_t)return this.path=at,this.href=at,this.pathname=_t[1],_t[2]?(this.search=_t[2],this.query=Ze?De.parse(this.search.substr(1)):this.search.substr(1)):Ze&&(this.search="",this.query={}),this}var dt=ge.exec(at);if(dt){dt=dt[0];var Rt=dt.toLowerCase();this.protocol=Rt,at=at.substr(dt.length)}if(qe||dt||at.match(/^\/\/[^@\/]+@[^@\/]+/)){var ut=at.substr(0,2)==="//";!ut||dt&&Pe[dt]||(at=at.substr(2),this.slashes=!0)}if(!Pe[dt]&&(ut||dt&&!Ae[dt])){for(var rt=-1,ct=0;ct<ae.length;ct++){var yt=at.indexOf(ae[ct]);yt!==-1&&(rt===-1||yt<rt)&&(rt=yt)}var wt,xt;xt=rt===-1?at.lastIndexOf("@"):at.lastIndexOf("@",rt),xt!==-1&&(wt=at.slice(0,xt),at=at.slice(xt+1),this.auth=decodeURIComponent(wt)),rt=-1;for(var ct=0;ct<re.length;ct++){var yt=at.indexOf(re[ct]);yt!==-1&&(rt===-1||yt<rt)&&(rt=yt)}rt===-1&&(rt=at.length),this.host=at.slice(0,rt),at=at.slice(rt),this.parseHost(),this.hostname=this.hostname||"";var Ut=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Ut)for(var zt=this.hostname.split(/\./),ct=0,dn=zt.length;ct<dn;ct++){var Ft=zt[ct];if(Ft&&!Ft.match(le)){for(var Dt="",Qt=0,Yt=Ft.length;Qt<Yt;Qt++)Ft.charCodeAt(Qt)>127?Dt+="x":Dt+=Ft[Qt];if(!Dt.match(le)){var Jt=zt.slice(0,ct),lt=zt.slice(ct+1),Ue=Ft.match(me);Ue&&(Jt.push(Ue[1]),lt.unshift(Ue[2])),lt.length&&(at="/"+lt.join(".")+at),this.hostname=Jt.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),Ut||(this.hostname=pe.toASCII(this.hostname));var Be=this.port?":"+this.port:"",tt=this.hostname||"";this.host=tt+Be,this.href+=this.host,Ut&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),at[0]!=="/"&&(at="/"+at))}if(!ve[Rt])for(var ct=0,dn=oe.length;ct<dn;ct++){var ht=oe[ct];if(at.indexOf(ht)!==-1){var et=encodeURIComponent(ht);et===ht&&(et=escape(ht)),at=at.split(ht).join(et)}}var Ve=at.indexOf("#");Ve!==-1&&(this.hash=at.substr(Ve),at=at.slice(0,Ve));var Re=at.indexOf("?");if(Re!==-1?(this.search=at.substr(Re),this.query=at.substr(Re+1),Ze&&(this.query=De.parse(this.query)),at=at.slice(0,Re)):Ze&&(this.search="",this.query={}),at&&(this.pathname=at),Ae[Rt]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Be=this.pathname||"",ze=this.search||"";this.path=Be+ze}return this.href=this.format(),this},Ce.prototype.format=function(){var Oe=this.auth||"";Oe&&(Oe=encodeURIComponent(Oe),Oe=Oe.replace(/%3A/i,":"),Oe+="@");var Ze=this.protocol||"",qe=this.pathname||"",Xe=this.hash||"",mt=!1,pt="";this.host?mt=Oe+this.host:this.hostname&&(mt=Oe+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(mt+=":"+this.port)),this.query&&de.isObject(this.query)&&Object.keys(this.query).length&&(pt=De.stringify(this.query));var Mt=this.search||pt&&"?"+pt||"";return Ze&&Ze.substr(-1)!==":"&&(Ze+=":"),this.slashes||(!Ze||Ae[Ze])&&mt!==!1?(mt="//"+(mt||""),qe&&qe.charAt(0)!=="/"&&(qe="/"+qe)):mt||(mt=""),Xe&&Xe.charAt(0)!=="#"&&(Xe="#"+Xe),Mt&&Mt.charAt(0)!=="?"&&(Mt="?"+Mt),qe=qe.replace(/[?#]/g,function(at){return encodeURIComponent(at)}),Mt=Mt.replace("#","%23"),Ze+mt+qe+Mt+Xe},Ce.prototype.resolve=function(Oe){return this.resolveObject(xe(Oe,!1,!0)).format()},Ce.prototype.resolveObject=function(Oe){if(de.isString(Oe)){var Ze=new Ce;Ze.parse(Oe,!1,!0),Oe=Ze}for(var qe=new Ce,Xe=Object.keys(this),mt=0;mt<Xe.length;mt++){var pt=Xe[mt];qe[pt]=this[pt]}if(qe.hash=Oe.hash,Oe.href==="")return qe.href=qe.format(),qe;if(Oe.slashes&&!Oe.protocol){for(var Mt=Object.keys(Oe),at=0;at<Mt.length;at++){var _t=Mt[at];_t!=="protocol"&&(qe[_t]=Oe[_t])}return Ae[qe.protocol]&&qe.hostname&&!qe.pathname&&(qe.path=qe.pathname="/"),qe.href=qe.format(),qe}if(Oe.protocol&&Oe.protocol!==qe.protocol){if(!Ae[Oe.protocol]){for(var dt=Object.keys(Oe),Rt=0;Rt<dt.length;Rt++){var ut=dt[Rt];qe[ut]=Oe[ut]}return qe.href=qe.format(),qe}if(qe.protocol=Oe.protocol,Oe.host||Pe[Oe.protocol])qe.pathname=Oe.pathname;else{for(var dn=(Oe.pathname||"").split("/");dn.length&&!(Oe.host=dn.shift()););Oe.host||(Oe.host=""),Oe.hostname||(Oe.hostname=""),dn[0]!==""&&dn.unshift(""),dn.length<2&&dn.unshift(""),qe.pathname=dn.join("/")}if(qe.search=Oe.search,qe.query=Oe.query,qe.host=Oe.host||"",qe.auth=Oe.auth,qe.hostname=Oe.hostname||Oe.host,qe.port=Oe.port,qe.pathname||qe.search){var rt=qe.pathname||"",ct=qe.search||"";qe.path=rt+ct}return qe.slashes=qe.slashes||Oe.slashes,qe.href=qe.format(),qe}var yt=qe.pathname&&qe.pathname.charAt(0)==="/",wt=Oe.host||Oe.pathname&&Oe.pathname.charAt(0)==="/",xt=wt||yt||qe.host&&Oe.pathname,Ut=xt,zt=qe.pathname&&qe.pathname.split("/")||[],dn=Oe.pathname&&Oe.pathname.split("/")||[],Ft=qe.protocol&&!Ae[qe.protocol];if(Ft&&(qe.hostname="",qe.port=null,qe.host&&(zt[0]===""?zt[0]=qe.host:zt.unshift(qe.host)),qe.host="",Oe.protocol&&(Oe.hostname=null,Oe.port=null,Oe.host&&(dn[0]===""?dn[0]=Oe.host:dn.unshift(Oe.host)),Oe.host=null),xt=xt&&(dn[0]===""||zt[0]==="")),wt)qe.host=Oe.host||Oe.host===""?Oe.host:qe.host,qe.hostname=Oe.hostname||Oe.hostname===""?Oe.hostname:qe.hostname,qe.search=Oe.search,qe.query=Oe.query,zt=dn;else if(dn.length)zt||(zt=[]),zt.pop(),zt=zt.concat(dn),qe.search=Oe.search,qe.query=Oe.query;else if(!de.isNullOrUndefined(Oe.search)){if(Ft){qe.hostname=qe.host=zt.shift();var Dt=!!(qe.host&&qe.host.indexOf("@")>0)&&qe.host.split("@");Dt&&(qe.auth=Dt.shift(),qe.host=qe.hostname=Dt.shift())}return qe.search=Oe.search,qe.query=Oe.query,de.isNull(qe.pathname)&&de.isNull(qe.search)||(qe.path=(qe.pathname?qe.pathname:"")+(qe.search?qe.search:"")),qe.href=qe.format(),qe}if(!zt.length)return qe.pathname=null,qe.search?qe.path="/"+qe.search:qe.path=null,qe.href=qe.format(),qe;for(var Qt=zt.slice(-1)[0],Yt=(qe.host||Oe.host||zt.length>1)&&(Qt==="."||Qt==="..")||Qt==="",Jt=0,lt=zt.length;lt>=0;lt--)Qt=zt[lt],Qt==="."?zt.splice(lt,1):Qt===".."?(zt.splice(lt,1),Jt++):Jt&&(zt.splice(lt,1),Jt--);if(!xt&&!Ut)for(;Jt--;Jt)zt.unshift("..");!xt||zt[0]===""||zt[0]&&zt[0].charAt(0)==="/"||zt.unshift(""),Yt&&zt.join("/").substr(-1)!=="/"&&zt.push("");var Ue=zt[0]===""||zt[0]&&zt[0].charAt(0)==="/";if(Ft){qe.hostname=qe.host=Ue?"":zt.length?zt.shift():"";var Dt=!!(qe.host&&qe.host.indexOf("@")>0)&&qe.host.split("@");Dt&&(qe.auth=Dt.shift(),qe.host=qe.hostname=Dt.shift())}return xt=xt||qe.host&&zt.length,xt&&!Ue&&zt.unshift(""),zt.length?qe.pathname=zt.join("/"):(qe.pathname=null,qe.path=null),de.isNull(qe.pathname)&&de.isNull(qe.search)||(qe.path=(qe.pathname?qe.pathname:"")+(qe.search?qe.search:"")),qe.auth=Oe.auth||qe.auth,qe.slashes=qe.slashes||Oe.slashes,qe.href=qe.format(),qe},Ce.prototype.parseHost=function(){var Oe=this.host,Ze=fe.exec(Oe);Ze&&(Ze=Ze[0],Ze!==":"&&(this.port=Ze.substr(1)),Oe=Oe.substr(0,Oe.length-Ze.length)),Oe&&(this.hostname=Oe)}},{"./util":204,punycode:174,querystring:177}],204:[function(Se,je,Me){"use strict";je.exports={isString:function(Ce){return typeof Ce=="string"},isObject:function(Ce){return typeof Ce=="object"&&Ce!==null},isNull:function(Ce){return Ce===null},isNullOrUndefined:function(Ce){return Ce==null}}},{}],205:[function(Se,je,Me){(function(Ce){function xe(ye,we){function pe(){if(!de){if(be("throwDeprecation"))throw new Error(we);be("traceDeprecation")?console.trace(we):console.warn(we),de=!0}return ye.apply(this,arguments)}if(be("noDeprecation"))return ye;var de=!1;return pe}function be(ye){try{if(!Ce.localStorage)return!1}catch(pe){return!1}var we=Ce.localStorage[ye];return we!=null&&String(we).toLowerCase()==="true"}je.exports=xe}).call(this,typeof Ie.g!="undefined"?Ie.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],206:[function(Se,je,Me){je.exports=function(Ce){return Ce&&typeof Ce=="object"&&typeof Ce.copy=="function"&&typeof Ce.fill=="function"&&typeof Ce.readUInt8=="function"}},{}],207:[function(Se,je,Me){(function(Ce,xe){function be(ct,yt){var wt={seen:[],stylize:we};return arguments.length>=3&&(wt.depth=arguments[2]),arguments.length>=4&&(wt.colors=arguments[3]),re(yt)?wt.showHidden=yt:yt&&Me._extend(wt,yt),Ae(wt.showHidden)&&(wt.showHidden=!1),Ae(wt.depth)&&(wt.depth=2),Ae(wt.colors)&&(wt.colors=!1),Ae(wt.customInspect)&&(wt.customInspect=!0),wt.colors&&(wt.stylize=ye),de(wt,ct,wt.depth)}function ye(ct,yt){var wt=be.styles[yt];return wt?"\x1B["+be.colors[wt][0]+"m"+ct+"\x1B["+be.colors[wt][1]+"m":ct}function we(ct,yt){return ct}function pe(ct){var yt={};return ct.forEach(function(wt,xt){yt[wt]=!0}),yt}function de(ct,yt,wt){if(ct.customInspect&&yt&&Xe(yt.inspect)&&yt.inspect!==Me.inspect&&(!yt.constructor||yt.constructor.prototype!==yt)){var xt=yt.inspect(wt,ct);return ve(xt)||(xt=de(ct,xt,wt)),xt}var Ut=ge(ct,yt);if(Ut)return Ut;var zt=Object.keys(yt),dn=pe(zt);if(ct.showHidden&&(zt=Object.getOwnPropertyNames(yt)),qe(yt)&&(zt.indexOf("message")>=0||zt.indexOf("description")>=0))return fe(yt);if(zt.length===0){if(Xe(yt)){var Ft=yt.name?": "+yt.name:"";return ct.stylize("[Function"+Ft+"]","special")}if(De(yt))return ct.stylize(RegExp.prototype.toString.call(yt),"regexp");if(Ze(yt))return ct.stylize(Date.prototype.toString.call(yt),"date");if(qe(yt))return fe(yt)}var Dt="",Qt=!1,Yt=["{","}"];if(oe(yt)&&(Qt=!0,Yt=["[","]"]),Xe(yt)&&(Dt=" [Function"+(yt.name?": "+yt.name:"")+"]"),De(yt)&&(Dt=" "+RegExp.prototype.toString.call(yt)),Ze(yt)&&(Dt=" "+Date.prototype.toUTCString.call(yt)),qe(yt)&&(Dt=" "+fe(yt)),zt.length===0&&(!Qt||yt.length==0))return Yt[0]+Dt+Yt[1];if(wt<0)return De(yt)?ct.stylize(RegExp.prototype.toString.call(yt),"regexp"):ct.stylize("[Object]","special");ct.seen.push(yt);var Jt;return Jt=Qt?ue(ct,yt,wt,dn,zt):zt.map(function(lt){return ee(ct,yt,wt,dn,lt,Qt)}),ct.seen.pop(),z(Jt,Dt,Yt)}function ge(ct,yt){if(Ae(yt))return ct.stylize("undefined","undefined");if(ve(yt)){var wt="'"+JSON.stringify(yt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ct.stylize(wt,"string")}return me(yt)?ct.stylize(""+yt,"number"):re(yt)?ct.stylize(""+yt,"boolean"):ae(yt)?ct.stylize("null","null"):void 0}function fe(ct){return"["+Error.prototype.toString.call(ct)+"]"}function ue(ct,yt,wt,xt,Ut){for(var zt=[],dn=0,Ft=yt.length;dn<Ft;++dn)_t(yt,String(dn))?zt.push(ee(ct,yt,wt,xt,String(dn),!0)):zt.push("");return Ut.forEach(function(Dt){Dt.match(/^\d+$/)||zt.push(ee(ct,yt,wt,xt,Dt,!0))}),zt}function ee(ct,yt,wt,xt,Ut,zt){var dn,Ft,Dt;if(Dt=Object.getOwnPropertyDescriptor(yt,Ut)||{value:yt[Ut]},Dt.get?Ft=Dt.set?ct.stylize("[Getter/Setter]","special"):ct.stylize("[Getter]","special"):Dt.set&&(Ft=ct.stylize("[Setter]","special")),_t(xt,Ut)||(dn="["+Ut+"]"),Ft||(ct.seen.indexOf(Dt.value)<0?(Ft=ae(wt)?de(ct,Dt.value,null):de(ct,Dt.value,wt-1),Ft.indexOf(`
|
|
|
`)>-1&&(Ft=zt?Ft.split(`
|
|
|
`).map(function(Qt){return" "+Qt}).join(`
|
|
|
`).substr(2):`
|
|
|
`+Ft.split(`
|
|
|
`).map(function(Qt){return" "+Qt}).join(`
|
|
|
`))):Ft=ct.stylize("[Circular]","special")),Ae(dn)){if(zt&&Ut.match(/^\d+$/))return Ft;dn=JSON.stringify(""+Ut),dn.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(dn=dn.substr(1,dn.length-2),dn=ct.stylize(dn,"name")):(dn=dn.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),dn=ct.stylize(dn,"string"))}return dn+": "+Ft}function z(ct,yt,wt){var xt=0;return ct.reduce(function(Ut,zt){return xt++,zt.indexOf(`
|
|
|
`)>=0&&xt++,Ut+zt.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?wt[0]+(yt===""?"":yt+`
|
|
|
`)+" "+ct.join(`,
|
|
|
`)+" "+wt[1]:wt[0]+yt+" "+ct.join(", ")+" "+wt[1]}function oe(ct){return Array.isArray(ct)}function re(ct){return typeof ct=="boolean"}function ae(ct){return ct===null}function le(ct){return ct==null}function me(ct){return typeof ct=="number"}function ve(ct){return typeof ct=="string"}function Pe(ct){return typeof ct=="symbol"}function Ae(ct){return ct===void 0}function De(ct){return Oe(ct)&&pt(ct)==="[object RegExp]"}function Oe(ct){return typeof ct=="object"&&ct!==null}function Ze(ct){return Oe(ct)&&pt(ct)==="[object Date]"}function qe(ct){return Oe(ct)&&(pt(ct)==="[object Error]"||ct instanceof Error)}function Xe(ct){return typeof ct=="function"}function mt(ct){return ct===null||typeof ct=="boolean"||typeof ct=="number"||typeof ct=="string"||typeof ct=="symbol"||ct===void 0}function pt(ct){return Object.prototype.toString.call(ct)}function Mt(ct){return ct<10?"0"+ct.toString(10):ct.toString(10)}function at(){var ct=new Date,yt=[Mt(ct.getHours()),Mt(ct.getMinutes()),Mt(ct.getSeconds())].join(":");return[ct.getDate(),rt[ct.getMonth()],yt].join(" ")}function _t(ct,yt){return Object.prototype.hasOwnProperty.call(ct,yt)}var dt=/%[sdj%]/g;Me.format=function(ct){if(!ve(ct)){for(var yt=[],wt=0;wt<arguments.length;wt++)yt.push(be(arguments[wt]));return yt.join(" ")}for(var wt=1,xt=arguments,Ut=xt.length,zt=String(ct).replace(dt,function(Dt){if(Dt==="%%")return"%";if(wt>=Ut)return Dt;switch(Dt){case"%s":return String(xt[wt++]);case"%d":return Number(xt[wt++]);case"%j":try{return JSON.stringify(xt[wt++])}catch(Qt){return"[Circular]"}default:return Dt}}),dn=xt[wt];wt<Ut;dn=xt[++wt])ae(dn)||!Oe(dn)?zt+=" "+dn:zt+=" "+be(dn);return zt},Me.deprecate=function(ct,yt){function wt(){if(!xt){if(Ce.throwDeprecation)throw new Error(yt);Ce.traceDeprecation?console.trace(yt):console.error(yt),xt=!0}return ct.apply(this,arguments)}if(Ae(xe.process))return function(){return Me.deprecate(ct,yt).apply(this,arguments)};if(Ce.noDeprecation===!0)return ct;var xt=!1;return wt};var Rt,ut={};Me.debuglog=function(ct){if(Ae(Rt)&&(Rt=Ce.env.NODE_DEBUG||""),ct=ct.toUpperCase(),!ut[ct])if(new RegExp("\\b"+ct+"\\b","i").test(Rt)){var yt=Ce.pid;ut[ct]=function(){var wt=Me.format.apply(Me,arguments);console.error("%s %d: %s",ct,yt,wt)}}else ut[ct]=function(){};return ut[ct]},Me.inspect=be,be.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},be.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},Me.isArray=oe,Me.isBoolean=re,Me.isNull=ae,Me.isNullOrUndefined=le,Me.isNumber=me,Me.isString=ve,Me.isSymbol=Pe,Me.isUndefined=Ae,Me.isRegExp=De,Me.isObject=Oe,Me.isDate=Ze,Me.isError=qe,Me.isFunction=Xe,Me.isPrimitive=mt,Me.isBuffer=Se("./support/isBuffer");var rt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Me.log=function(){console.log("%s - %s",at(),Me.format.apply(Me,arguments))},Me.inherits=Se("inherits"),Me._extend=function(ct,yt){if(!yt||!Oe(yt))return ct;for(var wt=Object.keys(yt),xt=wt.length;xt--;)ct[wt[xt]]=yt[wt[xt]];return ct}}).call(this,Se("_process"),typeof Ie.g!="undefined"?Ie.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":206,_process:173,inherits:162}],208:[function(Se,je,Me){"use strict";(function(){Me.stripBOM=function(Ce){return Ce[0]==="\uFEFF"?Ce.substring(1):Ce}}).call(void 0)},{}],209:[function(Se,je,Me){"use strict";function Ce(pe){return pe&&pe.__esModule?pe:{default:pe}}var xe=Se("babel-runtime/helpers/typeof"),be=Ce(xe),ye=Se("babel-runtime/core-js/object/keys"),we=Ce(ye);(function(){var pe,de,ge,fe,ue,ee={}.hasOwnProperty;pe=Se("xmlbuilder"),de=Se("./defaults").defaults,fe=function(z){return typeof z=="string"&&(z.indexOf("&")>=0||z.indexOf(">")>=0||z.indexOf("<")>=0)},ue=function(z){return"<![CDATA["+ge(z)+"]]>"},ge=function(z){return z.replace("]]>","]]]]><![CDATA[>")},Me.Builder=function(){function z(oe){var re,ae,le;this.options={},ae=de[.2];for(re in ae)ee.call(ae,re)&&(le=ae[re],this.options[re]=le);for(re in oe)ee.call(oe,re)&&(le=oe[re],this.options[re]=le)}return z.prototype.buildObject=function(oe){var re,ae,le,me,ve;return re=this.options.attrkey,ae=this.options.charkey,(0,we.default)(oe).length===1&&this.options.rootName===de[.2].rootName?(ve=(0,we.default)(oe)[0],oe=oe[ve]):ve=this.options.rootName,le=function(Pe){return function(Ae,De){var Oe,Ze,qe,Xe,mt,pt;if((De===void 0?"undefined":(0,be.default)(De))!=="object")Pe.options.cdata&&fe(De)?Ae.raw(ue(De)):Ae.txt(De);else if(Array.isArray(De)){for(Xe in De)if(ee.call(De,Xe)){Ze=De[Xe];for(mt in Ze)qe=Ze[mt],Ae=le(Ae.ele(mt),qe).up()}}else for(mt in De)if(ee.call(De,mt))if(Ze=De[mt],mt===re){if((Ze===void 0?"undefined":(0,be.default)(Ze))==="object")for(Oe in Ze)pt=Ze[Oe],Ae=Ae.att(Oe,pt)}else if(mt===ae)Ae=Pe.options.cdata&&fe(Ze)?Ae.raw(ue(Ze)):Ae.txt(Ze);else if(Array.isArray(Ze))for(Xe in Ze)ee.call(Ze,Xe)&&(qe=Ze[Xe],Ae=typeof qe=="string"?Pe.options.cdata&&fe(qe)?Ae.ele(mt).raw(ue(qe)).up():Ae.ele(mt,qe).up():le(Ae.ele(mt),qe).up());else(Ze===void 0?"undefined":(0,be.default)(Ze))==="object"?Ae=le(Ae.ele(mt),Ze).up():typeof Ze=="string"&&Pe.options.cdata&&fe(Ze)?Ae=Ae.ele(mt).raw(ue(Ze)).up():(Ze==null&&(Ze=""),Ae=Ae.ele(mt,Ze.toString()).up());return Ae}}(this),me=pe.create(ve,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),le(me,oe).end(this.options.renderOpts)},z}()}).call(void 0)},{"./defaults":210,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,xmlbuilder:235}],210:[function(Se,je,Me){"use strict";(function(){Me.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
|
|
|
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],211:[function(Se,je,Me){"use strict";function Ce(ge){return ge&&ge.__esModule?ge:{default:ge}}var xe=Se("babel-runtime/core-js/object/get-own-property-names"),be=Ce(xe),ye=Se("babel-runtime/core-js/object/keys"),we=Ce(ye),pe=Se("babel-runtime/helpers/typeof"),de=Ce(pe);(function(){var ge,fe,ue,ee,z,oe,re,ae,le=function(Pe,Ae){return function(){return Pe.apply(Ae,arguments)}},me=function(Pe,Ae){function De(){this.constructor=Pe}for(var Oe in Ae)ve.call(Ae,Oe)&&(Pe[Oe]=Ae[Oe]);return De.prototype=Ae.prototype,Pe.prototype=new De,Pe.__super__=Ae.prototype,Pe},ve={}.hasOwnProperty;re=Se("sax"),ue=Se("events"),ge=Se("./bom"),oe=Se("./processors"),ae=Se("timers").setImmediate,fe=Se("./defaults").defaults,ee=function(Pe){return(Pe===void 0?"undefined":(0,de.default)(Pe))==="object"&&Pe!=null&&(0,we.default)(Pe).length===0},z=function(Pe,Ae,De){var Oe,Ze,qe;for(Oe=0,Ze=Pe.length;Oe<Ze;Oe++)qe=Pe[Oe],Ae=qe(Ae,De);return Ae},Me.Parser=function(Pe){function Ae(De){this.parseString=le(this.parseString,this),this.reset=le(this.reset,this),this.assignOrPush=le(this.assignOrPush,this),this.processAsync=le(this.processAsync,this);var Oe,Ze,qe;if(!(this instanceof Me.Parser))return new Me.Parser(De);this.options={},Ze=fe[.2];for(Oe in Ze)ve.call(Ze,Oe)&&(qe=Ze[Oe],this.options[Oe]=qe);for(Oe in De)ve.call(De,Oe)&&(qe=De[Oe],this.options[Oe]=qe);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(oe.normalize)),this.reset()}return me(Ae,Pe),Ae.prototype.processAsync=function(){var De,Oe;try{return this.remaining.length<=this.options.chunkSize?(De=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(De),this.saxParser.close()):(De=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(De),ae(this.processAsync))}catch(Ze){if(Oe=Ze,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(Oe)}},Ae.prototype.assignOrPush=function(De,Oe,Ze){return Oe in De?(De[Oe]instanceof Array||(De[Oe]=[De[Oe]]),De[Oe].push(Ze)):this.options.explicitArray?De[Oe]=[Ze]:De[Oe]=Ze},Ae.prototype.reset=function(){var De,Oe,Ze,qe;return this.removeAllListeners(),this.saxParser=re.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(Xe){return function(mt){if(Xe.saxParser.resume(),!Xe.saxParser.errThrown)return Xe.saxParser.errThrown=!0,Xe.emit("error",mt)}}(this),this.saxParser.onend=function(Xe){return function(){if(!Xe.saxParser.ended)return Xe.saxParser.ended=!0,Xe.emit("end",Xe.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,qe=[],De=this.options.attrkey,Oe=this.options.charkey,this.saxParser.onopentag=function(Xe){return function(mt){var pt,Mt,at,_t,dt;if(at={},at[Oe]="",!Xe.options.ignoreAttrs){dt=mt.attributes;for(pt in dt)ve.call(dt,pt)&&(De in at||Xe.options.mergeAttrs||(at[De]={}),Mt=Xe.options.attrValueProcessors?z(Xe.options.attrValueProcessors,mt.attributes[pt],pt):mt.attributes[pt],_t=Xe.options.attrNameProcessors?z(Xe.options.attrNameProcessors,pt):pt,Xe.options.mergeAttrs?Xe.assignOrPush(at,_t,Mt):at[De][_t]=Mt)}return at["#name"]=Xe.options.tagNameProcessors?z(Xe.options.tagNameProcessors,mt.name):mt.name,Xe.options.xmlns&&(at[Xe.options.xmlnskey]={uri:mt.uri,local:mt.local}),qe.push(at)}}(this),this.saxParser.onclosetag=function(Xe){return function(){var mt,pt,Mt,at,_t,dt,Rt,ut,rt,ct;if(dt=qe.pop(),_t=dt["#name"],Xe.options.explicitChildren&&Xe.options.preserveChildrenOrder||delete dt["#name"],dt.cdata===!0&&(mt=dt.cdata,delete dt.cdata),rt=qe[qe.length-1],dt[Oe].match(/^\s*$/)&&!mt?(pt=dt[Oe],delete dt[Oe]):(Xe.options.trim&&(dt[Oe]=dt[Oe].trim()),Xe.options.normalize&&(dt[Oe]=dt[Oe].replace(/\s{2,}/g," ").trim()),dt[Oe]=Xe.options.valueProcessors?z(Xe.options.valueProcessors,dt[Oe],_t):dt[Oe],(0,we.default)(dt).length===1&&Oe in dt&&!Xe.EXPLICIT_CHARKEY&&(dt=dt[Oe])),ee(dt)&&(dt=Xe.options.emptyTag!==""?Xe.options.emptyTag:pt),Xe.options.validator!=null&&(ct="/"+function(){var yt,wt,xt;for(xt=[],yt=0,wt=qe.length;yt<wt;yt++)at=qe[yt],xt.push(at["#name"]);return xt}().concat(_t).join("/"),function(){var yt;try{dt=Xe.options.validator(ct,rt&&rt[_t],dt)}catch(wt){return yt=wt,Xe.emit("error",yt)}}()),Xe.options.explicitChildren&&!Xe.options.mergeAttrs&&(dt===void 0?"undefined":(0,de.default)(dt))==="object")if(Xe.options.preserveChildrenOrder){if(rt){rt[Xe.options.childkey]=rt[Xe.options.childkey]||[],Rt={};for(Mt in dt)ve.call(dt,Mt)&&(Rt[Mt]=dt[Mt]);rt[Xe.options.childkey].push(Rt),delete dt["#name"],(0,we.default)(dt).length===1&&Oe in dt&&!Xe.EXPLICIT_CHARKEY&&(dt=dt[Oe])}}else at={},Xe.options.attrkey in dt&&(at[Xe.options.attrkey]=dt[Xe.options.attrkey],delete dt[Xe.options.attrkey]),!Xe.options.charsAsChildren&&Xe.options.charkey in dt&&(at[Xe.options.charkey]=dt[Xe.options.charkey],delete dt[Xe.options.charkey]),(0,be.default)(dt).length>0&&(at[Xe.options.childkey]=dt),dt=at;return qe.length>0?Xe.assignOrPush(rt,_t,dt):(Xe.options.explicitRoot&&(ut=dt,dt={},dt[_t]=ut),Xe.resultObject=dt,Xe.saxParser.ended=!0,Xe.emit("end",Xe.resultObject))}}(this),Ze=function(Xe){return function(mt){var pt,Mt;if(Mt=qe[qe.length-1])return Mt[Oe]+=mt,Xe.options.explicitChildren&&Xe.options.preserveChildrenOrder&&Xe.options.charsAsChildren&&(Xe.options.includeWhiteChars||mt.replace(/\\n/g,"").trim()!=="")&&(Mt[Xe.options.childkey]=Mt[Xe.options.childkey]||[],pt={"#name":"__text__"},pt[Oe]=mt,Xe.options.normalize&&(pt[Oe]=pt[Oe].replace(/\s{2,}/g," ").trim()),Mt[Xe.options.childkey].push(pt)),Mt}}(this),this.saxParser.ontext=Ze,this.saxParser.oncdata=function(Xe){return function(mt){var pt;if(pt=Ze(mt))return pt.cdata=!0}}()},Ae.prototype.parseString=function(De,Oe){var Ze;Oe!=null&&typeof Oe=="function"&&(this.on("end",function(qe){return this.reset(),Oe(null,qe)}),this.on("error",function(qe){return this.reset(),Oe(qe)}));try{return De=De.toString(),De.trim()===""?(this.emit("end",null),!0):(De=ge.stripBOM(De),this.options.async?(this.remaining=De,ae(this.processAsync),this.saxParser):this.saxParser.write(De).close())}catch(qe){if(Ze=qe,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",Ze),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw Ze}},Ae}(ue.EventEmitter),Me.parseString=function(Pe,Ae,De){var Oe,Ze,qe;return De!=null?(typeof De=="function"&&(Oe=De),(Ae===void 0?"undefined":(0,de.default)(Ae))==="object"&&(Ze=Ae)):(typeof Ae=="function"&&(Oe=Ae),Ze={}),qe=new Me.Parser(Ze),qe.parseString(Pe,Oe)}}).call(void 0)},{"./bom":208,"./defaults":210,"./processors":212,"babel-runtime/core-js/object/get-own-property-names":21,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,events:158,sax:194,timers:201}],212:[function(Se,je,Me){"use strict";(function(){var Ce;Ce=new RegExp(/(?!xmlns)^.*:/),Me.normalize=function(xe){return xe.toLowerCase()},Me.firstCharLowerCase=function(xe){return xe.charAt(0).toLowerCase()+xe.slice(1)},Me.stripPrefix=function(xe){return xe.replace(Ce,"")},Me.parseNumbers=function(xe){return isNaN(xe)||(xe=xe%1==0?parseInt(xe,10):parseFloat(xe)),xe},Me.parseBooleans=function(xe){return/^(?:true|false)$/i.test(xe)&&(xe=xe.toLowerCase()==="true"),xe}}).call(void 0)},{}],213:[function(Se,je,Me){"use strict";(function(){var Ce,xe,be,ye,we=function(de,ge){function fe(){this.constructor=de}for(var ue in ge)pe.call(ge,ue)&&(de[ue]=ge[ue]);return fe.prototype=ge.prototype,de.prototype=new fe,de.__super__=ge.prototype,de},pe={}.hasOwnProperty;xe=Se("./defaults"),Ce=Se("./builder"),be=Se("./parser"),ye=Se("./processors"),Me.defaults=xe.defaults,Me.processors=ye,Me.ValidationError=function(de){function ge(fe){this.message=fe}return we(ge,de),ge}(Error),Me.Builder=Ce.Builder,Me.Parser=be.Parser,Me.parseString=be.parseString}).call(void 0)},{"./builder":209,"./defaults":210,"./parser":211,"./processors":212}],214:[function(Se,je,Me){"use strict";function Ce(ge){return ge&&ge.__esModule?ge:{default:ge}}var xe=Se("babel-runtime/core-js/object/get-prototype-of"),be=Ce(xe),ye=Se("babel-runtime/helpers/typeof"),we=Ce(ye),pe=Se("babel-runtime/core-js/object/assign"),de=Ce(pe);(function(){var ge,fe,ue,ee,z,oe,re=[].slice,ae={}.hasOwnProperty;ge=function(){var le,me,ve,Pe,Ae,De;if(De=arguments[0],Ae=2<=arguments.length?re.call(arguments,1):[],ee(de.default))de.default.apply(null,arguments);else for(le=0,ve=Ae.length;le<ve;le++)if((Pe=Ae[le])!=null)for(me in Pe)ae.call(Pe,me)&&(De[me]=Pe[me]);return De},ee=function(le){return!!le&&Object.prototype.toString.call(le)==="[object Function]"},z=function(le){var me;return!!le&&((me=le===void 0?"undefined":(0,we.default)(le))==="function"||me==="object")},fe=function(le){return ee(Array.isArray)?Array.isArray(le):Object.prototype.toString.call(le)==="[object Array]"},ue=function(le){var me;if(fe(le))return!le.length;for(me in le)if(ae.call(le,me))return!1;return!0},oe=function(le){var me,ve;return z(le)&&(ve=(0,be.default)(le))&&(me=ve.constructor)&&typeof me=="function"&&me instanceof me&&Function.prototype.toString.call(me)===Function.prototype.toString.call(Object)},je.exports.assign=ge,je.exports.isFunction=ee,je.exports.isObject=z,je.exports.isArray=fe,je.exports.isEmpty=ue,je.exports.isPlainObject=oe}).call(void 0)},{"babel-runtime/core-js/object/assign":18,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/helpers/typeof":32}],215:[function(Se,je,Me){"use strict";var Ce=Se("babel-runtime/core-js/object/create"),xe=function(be){return be&&be.__esModule?be:{default:be}}(Ce);(function(){je.exports=function(){function be(ye,we,pe){if(this.options=ye.options,this.stringify=ye.stringify,we==null)throw new Error("Missing attribute name of element "+ye.name);if(pe==null)throw new Error("Missing attribute value for attribute "+we+" of element "+ye.name);this.name=this.stringify.attName(we),this.value=this.stringify.attValue(pe)}return be.prototype.clone=function(){return(0,xe.default)(this)},be.prototype.toString=function(ye){return this.options.writer.set(ye).attribute(this)},be}()}).call(void 0)},{"babel-runtime/core-js/object/create":19}],216:[function(Se,je,Me){"use strict";var Ce=Se("babel-runtime/core-js/object/create"),xe=function(be){return be&&be.__esModule?be:{default:be}}(Ce);(function(){var be,ye=function(pe,de){function ge(){this.constructor=pe}for(var fe in de)we.call(de,fe)&&(pe[fe]=de[fe]);return ge.prototype=de.prototype,pe.prototype=new ge,pe.__super__=de.prototype,pe},we={}.hasOwnProperty;be=Se("./XMLNode"),je.exports=function(pe){function de(ge,fe){if(de.__super__.constructor.call(this,ge),fe==null)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(fe)}return ye(de,pe),de.prototype.clone=function(){return(0,xe.default)(this)},de.prototype.toString=function(ge){return this.options.writer.set(ge).cdata(this)},de}(be)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],217:[function(Se,je,Me){"use strict";var Ce=Se("babel-runtime/core-js/object/create"),xe=function(be){return be&&be.__esModule?be:{default:be}}(Ce);(function(){var be,ye=function(pe,de){function ge(){this.constructor=pe}for(var fe in de)we.call(de,fe)&&(pe[fe]=de[fe]);return ge.prototype=de.prototype,pe.prototype=new ge,pe.__super__=de.prototype,pe},we={}.hasOwnProperty;be=Se("./XMLNode"),je.exports=function(pe){function de(ge,fe){if(de.__super__.constructor.call(this,ge),fe==null)throw new Error("Missing comment text");this.text=this.stringify.comment(fe)}return ye(de,pe),de.prototype.clone=function(){return(0,xe.default)(this)},de.prototype.toString=function(ge){return this.options.writer.set(ge).comment(this)},de}(be)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],218:[function(Se,je,Me){"use strict";(function(){var Ce,xe=function(ye,we){function pe(){this.constructor=ye}for(var de in we)be.call(we,de)&&(ye[de]=we[de]);return pe.prototype=we.prototype,ye.prototype=new pe,ye.__super__=we.prototype,ye},be={}.hasOwnProperty;Ce=Se("./XMLNode"),je.exports=function(ye){function we(pe,de,ge,fe,ue,ee){if(we.__super__.constructor.call(this,pe),de==null)throw new Error("Missing DTD element name");if(ge==null)throw new Error("Missing DTD attribute name");if(!fe)throw new Error("Missing DTD attribute type");if(!ue)throw new Error("Missing DTD attribute default");if(ue.indexOf("#")!==0&&(ue="#"+ue),!ue.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(ee&&!ue.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(de),this.attributeName=this.stringify.attName(ge),this.attributeType=this.stringify.dtdAttType(fe),this.defaultValue=this.stringify.dtdAttDefault(ee),this.defaultValueType=ue}return xe(we,ye),we.prototype.toString=function(pe){return this.options.writer.set(pe).dtdAttList(this)},we}(Ce)}).call(void 0)},{"./XMLNode":227}],219:[function(Se,je,Me){"use strict";(function(){var Ce,xe=function(ye,we){function pe(){this.constructor=ye}for(var de in we)be.call(we,de)&&(ye[de]=we[de]);return pe.prototype=we.prototype,ye.prototype=new pe,ye.__super__=we.prototype,ye},be={}.hasOwnProperty;Ce=Se("./XMLNode"),je.exports=function(ye){function we(pe,de,ge){if(we.__super__.constructor.call(this,pe),de==null)throw new Error("Missing DTD element name");ge||(ge="(#PCDATA)"),Array.isArray(ge)&&(ge="("+ge.join(",")+")"),this.name=this.stringify.eleName(de),this.value=this.stringify.dtdElementValue(ge)}return xe(we,ye),we.prototype.toString=function(pe){return this.options.writer.set(pe).dtdElement(this)},we}(Ce)}).call(void 0)},{"./XMLNode":227}],220:[function(Se,je,Me){"use strict";(function(){var Ce,xe,be=function(we,pe){function de(){this.constructor=we}for(var ge in pe)ye.call(pe,ge)&&(we[ge]=pe[ge]);return de.prototype=pe.prototype,we.prototype=new de,we.__super__=pe.prototype,we},ye={}.hasOwnProperty;xe=Se("./Utility").isObject,Ce=Se("./XMLNode"),je.exports=function(we){function pe(de,ge,fe,ue){if(pe.__super__.constructor.call(this,de),fe==null)throw new Error("Missing entity name");if(ue==null)throw new Error("Missing entity value");if(this.pe=!!ge,this.name=this.stringify.eleName(fe),xe(ue)){if(!ue.pubID&&!ue.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(ue.pubID&&!ue.sysID)throw new Error("System identifier is required for a public external entity");if(ue.pubID!=null&&(this.pubID=this.stringify.dtdPubID(ue.pubID)),ue.sysID!=null&&(this.sysID=this.stringify.dtdSysID(ue.sysID)),ue.nData!=null&&(this.nData=this.stringify.dtdNData(ue.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(ue)}return be(pe,we),pe.prototype.toString=function(de){return this.options.writer.set(de).dtdEntity(this)},pe}(Ce)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],221:[function(Se,je,Me){"use strict";(function(){var Ce,xe=function(ye,we){function pe(){this.constructor=ye}for(var de in we)be.call(we,de)&&(ye[de]=we[de]);return pe.prototype=we.prototype,ye.prototype=new pe,ye.__super__=we.prototype,ye},be={}.hasOwnProperty;Ce=Se("./XMLNode"),je.exports=function(ye){function we(pe,de,ge){if(we.__super__.constructor.call(this,pe),de==null)throw new Error("Missing notation name");if(!ge.pubID&&!ge.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(de),ge.pubID!=null&&(this.pubID=this.stringify.dtdPubID(ge.pubID)),ge.sysID!=null&&(this.sysID=this.stringify.dtdSysID(ge.sysID))}return xe(we,ye),we.prototype.toString=function(pe){return this.options.writer.set(pe).dtdNotation(this)},we}(Ce)}).call(void 0)},{"./XMLNode":227}],222:[function(Se,je,Me){"use strict";(function(){var Ce,xe,be=function(we,pe){function de(){this.constructor=we}for(var ge in pe)ye.call(pe,ge)&&(we[ge]=pe[ge]);return de.prototype=pe.prototype,we.prototype=new de,we.__super__=pe.prototype,we},ye={}.hasOwnProperty;xe=Se("./Utility").isObject,Ce=Se("./XMLNode"),je.exports=function(we){function pe(de,ge,fe,ue){var ee;pe.__super__.constructor.call(this,de),xe(ge)&&(ee=ge,ge=ee.version,fe=ee.encoding,ue=ee.standalone),ge||(ge="1.0"),this.version=this.stringify.xmlVersion(ge),fe!=null&&(this.encoding=this.stringify.xmlEncoding(fe)),ue!=null&&(this.standalone=this.stringify.xmlStandalone(ue))}return be(pe,we),pe.prototype.toString=function(de){return this.options.writer.set(de).declaration(this)},pe}(Ce)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],223:[function(Se,je,Me){"use strict";(function(){var Ce,xe,be,ye,we,pe,de=function(fe,ue){function ee(){this.constructor=fe}for(var z in ue)ge.call(ue,z)&&(fe[z]=ue[z]);return ee.prototype=ue.prototype,fe.prototype=new ee,fe.__super__=ue.prototype,fe},ge={}.hasOwnProperty;pe=Se("./Utility").isObject,we=Se("./XMLNode"),Ce=Se("./XMLDTDAttList"),be=Se("./XMLDTDEntity"),xe=Se("./XMLDTDElement"),ye=Se("./XMLDTDNotation"),je.exports=function(fe){function ue(ee,z,oe){var re,ae;ue.__super__.constructor.call(this,ee),this.documentObject=ee,pe(z)&&(re=z,z=re.pubID,oe=re.sysID),oe==null&&(ae=[z,oe],oe=ae[0],z=ae[1]),z!=null&&(this.pubID=this.stringify.dtdPubID(z)),oe!=null&&(this.sysID=this.stringify.dtdSysID(oe))}return de(ue,fe),ue.prototype.element=function(ee,z){var oe;return oe=new xe(this,ee,z),this.children.push(oe),this},ue.prototype.attList=function(ee,z,oe,re,ae){var le;return le=new Ce(this,ee,z,oe,re,ae),this.children.push(le),this},ue.prototype.entity=function(ee,z){var oe;return oe=new be(this,!1,ee,z),this.children.push(oe),this},ue.prototype.pEntity=function(ee,z){var oe;return oe=new be(this,!0,ee,z),this.children.push(oe),this},ue.prototype.notation=function(ee,z){var oe;return oe=new ye(this,ee,z),this.children.push(oe),this},ue.prototype.toString=function(ee){return this.options.writer.set(ee).docType(this)},ue.prototype.ele=function(ee,z){return this.element(ee,z)},ue.prototype.att=function(ee,z,oe,re,ae){return this.attList(ee,z,oe,re,ae)},ue.prototype.ent=function(ee,z){return this.entity(ee,z)},ue.prototype.pent=function(ee,z){return this.pEntity(ee,z)},ue.prototype.not=function(ee,z){return this.notation(ee,z)},ue.prototype.up=function(){return this.root()||this.documentObject},ue}(we)}).call(void 0)},{"./Utility":214,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLNode":227}],224:[function(Se,je,Me){"use strict";(function(){var Ce,xe,be,ye,we=function(de,ge){function fe(){this.constructor=de}for(var ue in ge)pe.call(ge,ue)&&(de[ue]=ge[ue]);return fe.prototype=ge.prototype,de.prototype=new fe,de.__super__=ge.prototype,de},pe={}.hasOwnProperty;ye=Se("./Utility").isPlainObject,Ce=Se("./XMLNode"),be=Se("./XMLStringifier"),xe=Se("./XMLStringWriter"),je.exports=function(de){function ge(fe){ge.__super__.constructor.call(this,null),fe||(fe={}),fe.writer||(fe.writer=new xe),this.options=fe,this.stringify=new be(fe),this.isDocument=!0}return we(ge,de),ge.prototype.end=function(fe){var ue;return fe?ye(fe)&&(ue=fe,fe=this.options.writer.set(ue)):fe=this.options.writer,fe.document(this)},ge.prototype.toString=function(fe){return this.options.writer.set(fe).document(this)},ge}(Ce)}).call(void 0)},{"./Utility":214,"./XMLNode":227,"./XMLStringWriter":231,"./XMLStringifier":232}],225:[function(Se,je,Me){"use strict";(function(){var Ce,xe,be,ye,we,pe,de,ge,fe,ue,ee,z,oe,re,ae,le,me,ve,Pe,Ae={}.hasOwnProperty;Pe=Se("./Utility"),me=Pe.isObject,le=Pe.isFunction,ve=Pe.isPlainObject,ue=Se("./XMLElement"),xe=Se("./XMLCData"),be=Se("./XMLComment"),z=Se("./XMLRaw"),ae=Se("./XMLText"),ee=Se("./XMLProcessingInstruction"),ge=Se("./XMLDeclaration"),fe=Se("./XMLDocType"),ye=Se("./XMLDTDAttList"),pe=Se("./XMLDTDEntity"),we=Se("./XMLDTDElement"),de=Se("./XMLDTDNotation"),Ce=Se("./XMLAttribute"),re=Se("./XMLStringifier"),oe=Se("./XMLStringWriter"),je.exports=function(){function De(Oe,Ze,qe){var Xe;Oe||(Oe={}),Oe.writer?ve(Oe.writer)&&(Xe=Oe.writer,Oe.writer=new oe(Xe)):Oe.writer=new oe(Oe),this.options=Oe,this.writer=Oe.writer,this.stringify=new re(Oe),this.onDataCallback=Ze||function(){},this.onEndCallback=qe||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return De.prototype.node=function(Oe,Ze,qe){var Xe;if(Oe==null)throw new Error("Missing node name");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node");return this.openCurrent(),Oe=Oe.valueOf(),Ze==null&&(Ze={}),Ze=Ze.valueOf(),me(Ze)||(Xe=[Ze,qe],qe=Xe[0],Ze=Xe[1]),this.currentNode=new ue(this,Oe,Ze),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,qe!=null&&this.text(qe),this},De.prototype.element=function(Oe,Ze,qe){return this.currentNode&&this.currentNode instanceof fe?this.dtdElement.apply(this,arguments):this.node(Oe,Ze,qe)},De.prototype.attribute=function(Oe,Ze){var qe,Xe;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(Oe!=null&&(Oe=Oe.valueOf()),me(Oe))for(qe in Oe)Ae.call(Oe,qe)&&(Xe=Oe[qe],this.attribute(qe,Xe));else le(Ze)&&(Ze=Ze.apply()),this.options.skipNullAttributes&&Ze==null||(this.currentNode.attributes[Oe]=new Ce(this,Oe,Ze));return this},De.prototype.text=function(Oe){var Ze;return this.openCurrent(),Ze=new ae(this,Oe),this.onData(this.writer.text(Ze,this.currentLevel+1)),this},De.prototype.cdata=function(Oe){var Ze;return this.openCurrent(),Ze=new xe(this,Oe),this.onData(this.writer.cdata(Ze,this.currentLevel+1)),this},De.prototype.comment=function(Oe){var Ze;return this.openCurrent(),Ze=new be(this,Oe),this.onData(this.writer.comment(Ze,this.currentLevel+1)),this},De.prototype.raw=function(Oe){var Ze;return this.openCurrent(),Ze=new z(this,Oe),this.onData(this.writer.raw(Ze,this.currentLevel+1)),this},De.prototype.instruction=function(Oe,Ze){var qe,Xe,mt,pt,Mt;if(this.openCurrent(),Oe!=null&&(Oe=Oe.valueOf()),Ze!=null&&(Ze=Ze.valueOf()),Array.isArray(Oe))for(qe=0,pt=Oe.length;qe<pt;qe++)Xe=Oe[qe],this.instruction(Xe);else if(me(Oe))for(Xe in Oe)Ae.call(Oe,Xe)&&(mt=Oe[Xe],this.instruction(Xe,mt));else le(Ze)&&(Ze=Ze.apply()),Mt=new ee(this,Oe,Ze),this.onData(this.writer.processingInstruction(Mt,this.currentLevel+1));return this},De.prototype.declaration=function(Oe,Ze,qe){var Xe;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return Xe=new ge(this,Oe,Ze,qe),this.onData(this.writer.declaration(Xe,this.currentLevel+1)),this},De.prototype.doctype=function(Oe,Ze,qe){if(this.openCurrent(),Oe==null)throw new Error("Missing root node name");if(this.root)throw new Error("dtd() must come before the root node");return this.currentNode=new fe(this,Ze,qe),this.currentNode.rootNodeName=Oe,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},De.prototype.dtdElement=function(Oe,Ze){var qe;return this.openCurrent(),qe=new we(this,Oe,Ze),this.onData(this.writer.dtdElement(qe,this.currentLevel+1)),this},De.prototype.attList=function(Oe,Ze,qe,Xe,mt){var pt;return this.openCurrent(),pt=new ye(this,Oe,Ze,qe,Xe,mt),this.onData(this.writer.dtdAttList(pt,this.currentLevel+1)),this},De.prototype.entity=function(Oe,Ze){var qe;return this.openCurrent(),qe=new pe(this,!1,Oe,Ze),this.onData(this.writer.dtdEntity(qe,this.currentLevel+1)),this},De.prototype.pEntity=function(Oe,Ze){var qe;return this.openCurrent(),qe=new pe(this,!0,Oe,Ze),this.onData(this.writer.dtdEntity(qe,this.currentLevel+1)),this},De.prototype.notation=function(Oe,Ze){var qe;return this.openCurrent(),qe=new de(this,Oe,Ze),this.onData(this.writer.dtdNotation(qe,this.currentLevel+1)),this},De.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},De.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},De.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},De.prototype.openNode=function(Oe){if(!Oe.isOpen)return!this.root&&this.currentLevel===0&&Oe instanceof ue&&(this.root=Oe),this.onData(this.writer.openNode(Oe,this.currentLevel)),Oe.isOpen=!0},De.prototype.closeNode=function(Oe){if(!Oe.isClosed)return this.onData(this.writer.closeNode(Oe,this.currentLevel)),Oe.isClosed=!0},De.prototype.onData=function(Oe){return this.documentStarted=!0,this.onDataCallback(Oe)},De.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},De.prototype.ele=function(){return this.element.apply(this,arguments)},De.prototype.nod=function(Oe,Ze,qe){return this.node(Oe,Ze,qe)},De.prototype.txt=function(Oe){return this.text(Oe)},De.prototype.dat=function(Oe){return this.cdata(Oe)},De.prototype.com=function(Oe){return this.comment(Oe)},De.prototype.ins=function(Oe,Ze){return this.instruction(Oe,Ze)},De.prototype.dec=function(Oe,Ze,qe){return this.declaration(Oe,Ze,qe)},De.prototype.dtd=function(Oe,Ze,qe){return this.doctype(Oe,Ze,qe)},De.prototype.e=function(Oe,Ze,qe){return this.element(Oe,Ze,qe)},De.prototype.n=function(Oe,Ze,qe){return this.node(Oe,Ze,qe)},De.prototype.t=function(Oe){return this.text(Oe)},De.prototype.d=function(Oe){return this.cdata(Oe)},De.prototype.c=function(Oe){return this.comment(Oe)},De.prototype.r=function(Oe){return this.raw(Oe)},De.prototype.i=function(Oe,Ze){return this.instruction(Oe,Ze)},De.prototype.att=function(){return this.currentNode&&this.currentNode instanceof fe?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},De.prototype.a=function(){return this.currentNode&&this.currentNode instanceof fe?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},De.prototype.ent=function(Oe,Ze){return this.entity(Oe,Ze)},De.prototype.pent=function(Oe,Ze){return this.pEntity(Oe,Ze)},De.prototype.not=function(Oe,Ze){return this.notation(Oe,Ze)},De}()}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLStringWriter":231,"./XMLStringifier":232,"./XMLText":233}],226:[function(Se,je,Me){"use strict";var Ce=Se("babel-runtime/core-js/object/create"),xe=function(be){return be&&be.__esModule?be:{default:be}}(Ce);(function(){var be,ye,we,pe,de,ge=function(ue,ee){function z(){this.constructor=ue}for(var oe in ee)fe.call(ee,oe)&&(ue[oe]=ee[oe]);return z.prototype=ee.prototype,ue.prototype=new z,ue.__super__=ee.prototype,ue},fe={}.hasOwnProperty;de=Se("./Utility"),pe=de.isObject,we=de.isFunction,ye=Se("./XMLNode"),be=Se("./XMLAttribute"),je.exports=function(ue){function ee(z,oe,re){if(ee.__super__.constructor.call(this,z),oe==null)throw new Error("Missing element name");this.name=this.stringify.eleName(oe),this.attributes={},re!=null&&this.attribute(re),z.isDocument&&(this.isRoot=!0,this.documentObject=z,z.rootObject=this)}return ge(ee,ue),ee.prototype.clone=function(){var z,oe,re,ae;re=(0,xe.default)(this),re.isRoot&&(re.documentObject=null),re.attributes={},ae=this.attributes;for(oe in ae)fe.call(ae,oe)&&(z=ae[oe],re.attributes[oe]=z.clone());return re.children=[],this.children.forEach(function(le){var me;return me=le.clone(),me.parent=re,re.children.push(me)}),re},ee.prototype.attribute=function(z,oe){var re,ae;if(z!=null&&(z=z.valueOf()),pe(z))for(re in z)fe.call(z,re)&&(ae=z[re],this.attribute(re,ae));else we(oe)&&(oe=oe.apply()),this.options.skipNullAttributes&&oe==null||(this.attributes[z]=new be(this,z,oe));return this},ee.prototype.removeAttribute=function(z){var oe,re,ae;if(z==null)throw new Error("Missing attribute name");if(z=z.valueOf(),Array.isArray(z))for(re=0,ae=z.length;re<ae;re++)oe=z[re],delete this.attributes[oe];else delete this.attributes[z];return this},ee.prototype.toString=function(z){return this.options.writer.set(z).element(this)},ee.prototype.att=function(z,oe){return this.attribute(z,oe)},ee.prototype.a=function(z,oe){return this.attribute(z,oe)},ee}(ye)}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLNode":227,"babel-runtime/core-js/object/create":19}],227:[function(Se,je,Me){"use strict";(function(){var Ce,xe,be,ye,we,pe,de,ge,fe,ue,ee,z,oe={}.hasOwnProperty;z=Se("./Utility"),ee=z.isObject,ue=z.isFunction,fe=z.isEmpty,we=null,Ce=null,xe=null,be=null,ye=null,de=null,ge=null,pe=null,je.exports=function(){function re(ae){this.parent=ae,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.children=[],we||(we=Se("./XMLElement"),Ce=Se("./XMLCData"),xe=Se("./XMLComment"),be=Se("./XMLDeclaration"),ye=Se("./XMLDocType"),de=Se("./XMLRaw"),ge=Se("./XMLText"),pe=Se("./XMLProcessingInstruction"))}return re.prototype.element=function(ae,le,me){var ve,Pe,Ae,De,Oe,Ze,qe,Xe,mt,pt;if(Ze=null,le==null&&(le={}),le=le.valueOf(),ee(le)||(mt=[le,me],me=mt[0],le=mt[1]),ae!=null&&(ae=ae.valueOf()),Array.isArray(ae))for(Ae=0,qe=ae.length;Ae<qe;Ae++)Pe=ae[Ae],Ze=this.element(Pe);else if(ue(ae))Ze=this.element(ae.apply());else if(ee(ae)){for(Oe in ae)if(oe.call(ae,Oe))if(pt=ae[Oe],ue(pt)&&(pt=pt.apply()),ee(pt)&&fe(pt)&&(pt=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&Oe.indexOf(this.stringify.convertAttKey)===0)Ze=this.attribute(Oe.substr(this.stringify.convertAttKey.length),pt);else if(!this.options.separateArrayItems&&Array.isArray(pt))for(De=0,Xe=pt.length;De<Xe;De++)Pe=pt[De],ve={},ve[Oe]=Pe,Ze=this.element(ve);else ee(pt)?(Ze=this.element(Oe),Ze.element(pt)):Ze=this.element(Oe,pt)}else Ze=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&ae.indexOf(this.stringify.convertTextKey)===0?this.text(me):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&ae.indexOf(this.stringify.convertCDataKey)===0?this.cdata(me):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&ae.indexOf(this.stringify.convertCommentKey)===0?this.comment(me):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&ae.indexOf(this.stringify.convertRawKey)===0?this.raw(me):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&ae.indexOf(this.stringify.convertPIKey)===0?this.instruction(ae.substr(this.stringify.convertPIKey.length),me):this.node(ae,le,me);if(Ze==null)throw new Error("Could not create any elements with: "+ae);return Ze},re.prototype.insertBefore=function(ae,le,me){var ve,Pe,Ae;if(this.isRoot)throw new Error("Cannot insert elements at root level");return Pe=this.parent.children.indexOf(this),Ae=this.parent.children.splice(Pe),ve=this.parent.element(ae,le,me),Array.prototype.push.apply(this.parent.children,Ae),ve},re.prototype.insertAfter=function(ae,le,me){var ve,Pe,Ae;if(this.isRoot)throw new Error("Cannot insert elements at root level");return Pe=this.parent.children.indexOf(this),Ae=this.parent.children.splice(Pe+1),ve=this.parent.element(ae,le,me),Array.prototype.push.apply(this.parent.children,Ae),ve},re.prototype.remove=function(){var ae;if(this.isRoot)throw new Error("Cannot remove the root element");return ae=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[ae,ae-ae+1].concat([])),this.parent},re.prototype.node=function(ae,le,me){var ve,Pe;return ae!=null&&(ae=ae.valueOf()),le||(le={}),le=le.valueOf(),ee(le)||(Pe=[le,me],me=Pe[0],le=Pe[1]),ve=new we(this,ae,le),me!=null&&ve.text(me),this.children.push(ve),ve},re.prototype.text=function(ae){var le;return le=new ge(this,ae),this.children.push(le),this},re.prototype.cdata=function(ae){var le;return le=new Ce(this,ae),this.children.push(le),this},re.prototype.comment=function(ae){var le;return le=new xe(this,ae),this.children.push(le),this},re.prototype.commentBefore=function(ae){var le,me;return le=this.parent.children.indexOf(this),me=this.parent.children.splice(le),this.parent.comment(ae),Array.prototype.push.apply(this.parent.children,me),this},re.prototype.commentAfter=function(ae){var le,me;return le=this.parent.children.indexOf(this),me=this.parent.children.splice(le+1),this.parent.comment(ae),Array.prototype.push.apply(this.parent.children,me),this},re.prototype.raw=function(ae){var le;return le=new de(this,ae),this.children.push(le),this},re.prototype.instruction=function(ae,le){var me,ve,Pe,Ae,De;if(ae!=null&&(ae=ae.valueOf()),le!=null&&(le=le.valueOf()),Array.isArray(ae))for(Ae=0,De=ae.length;Ae<De;Ae++)me=ae[Ae],this.instruction(me);else if(ee(ae))for(me in ae)oe.call(ae,me)&&(ve=ae[me],this.instruction(me,ve));else ue(le)&&(le=le.apply()),Pe=new pe(this,ae,le),this.children.push(Pe);return this},re.prototype.instructionBefore=function(ae,le){var me,ve;return me=this.parent.children.indexOf(this),ve=this.parent.children.splice(me),this.parent.instruction(ae,le),Array.prototype.push.apply(this.parent.children,ve),this},re.prototype.instructionAfter=function(ae,le){var me,ve;return me=this.parent.children.indexOf(this),ve=this.parent.children.splice(me+1),this.parent.instruction(ae,le),Array.prototype.push.apply(this.parent.children,ve),this},re.prototype.declaration=function(ae,le,me){var ve,Pe;return ve=this.document(),Pe=new be(ve,ae,le,me),ve.children[0]instanceof be?ve.children[0]=Pe:ve.children.unshift(Pe),ve.root()||ve},re.prototype.doctype=function(ae,le){var me,ve,Pe,Ae,De,Oe,Ze,qe,Xe,mt;for(ve=this.document(),Pe=new ye(ve,ae,le),Xe=ve.children,Ae=De=0,Ze=Xe.length;De<Ze;Ae=++De)if((me=Xe[Ae])instanceof ye)return ve.children[Ae]=Pe,Pe;for(mt=ve.children,Ae=Oe=0,qe=mt.length;Oe<qe;Ae=++Oe)if(me=mt[Ae],me.isRoot)return ve.children.splice(Ae,0,Pe),Pe;return ve.children.push(Pe),Pe},re.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},re.prototype.root=function(){var ae;for(ae=this;ae;){if(ae.isDocument)return ae.rootObject;if(ae.isRoot)return ae;ae=ae.parent}},re.prototype.document=function(){var ae;for(ae=this;ae;){if(ae.isDocument)return ae;ae=ae.parent}},re.prototype.end=function(ae){return this.document().end(ae)},re.prototype.prev=function(){var ae;if((ae=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node");return this.parent.children[ae-1]},re.prototype.next=function(){var ae;if((ae=this.parent.children.indexOf(this))===-1||ae===this.parent.children.length-1)throw new Error("Already at the last node");return this.parent.children[ae+1]},re.prototype.importDocument=function(ae){var le;return le=ae.root().clone(),le.parent=this,le.isRoot=!1,this.children.push(le),this},re.prototype.ele=function(ae,le,me){return this.element(ae,le,me)},re.prototype.nod=function(ae,le,me){return this.node(ae,le,me)},re.prototype.txt=function(ae){return this.text(ae)},re.prototype.dat=function(ae){return this.cdata(ae)},re.prototype.com=function(ae){return this.comment(ae)},re.prototype.ins=function(ae,le){return this.instruction(ae,le)},re.prototype.doc=function(){return this.document()},re.prototype.dec=function(ae,le,me){return this.declaration(ae,le,me)},re.prototype.dtd=function(ae,le){return this.doctype(ae,le)},re.prototype.e=function(ae,le,me){return this.element(ae,le,me)},re.prototype.n=function(ae,le,me){return this.node(ae,le,me)},re.prototype.t=function(ae){return this.text(ae)},re.prototype.d=function(ae){return this.cdata(ae)},re.prototype.c=function(ae){return this.comment(ae)},re.prototype.r=function(ae){return this.raw(ae)},re.prototype.i=function(ae,le){return this.instruction(ae,le)},re.prototype.u=function(){return this.up()},re.prototype.importXMLBuilder=function(ae){return this.importDocument(ae)},re}()}).call(void 0)},{"./Utility":214,"./XMLCData":216,"./XMLComment":217,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233}],228:[function(Se,je,Me){"use strict";var Ce=Se("babel-runtime/core-js/object/create"),xe=function(be){return be&&be.__esModule?be:{default:be}}(Ce);(function(){var be,ye=function(pe,de){function ge(){this.constructor=pe}for(var fe in de)we.call(de,fe)&&(pe[fe]=de[fe]);return ge.prototype=de.prototype,pe.prototype=new ge,pe.__super__=de.prototype,pe},we={}.hasOwnProperty;be=Se("./XMLNode"),je.exports=function(pe){function de(ge,fe,ue){if(de.__super__.constructor.call(this,ge),fe==null)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(fe),ue&&(this.value=this.stringify.insValue(ue))}return ye(de,pe),de.prototype.clone=function(){return(0,xe.default)(this)},de.prototype.toString=function(ge){return this.options.writer.set(ge).processingInstruction(this)},de}(be)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],229:[function(Se,je,Me){"use strict";var Ce=Se("babel-runtime/core-js/object/create"),xe=function(be){return be&&be.__esModule?be:{default:be}}(Ce);(function(){var be,ye=function(pe,de){function ge(){this.constructor=pe}for(var fe in de)we.call(de,fe)&&(pe[fe]=de[fe]);return ge.prototype=de.prototype,pe.prototype=new ge,pe.__super__=de.prototype,pe},we={}.hasOwnProperty;be=Se("./XMLNode"),je.exports=function(pe){function de(ge,fe){if(de.__super__.constructor.call(this,ge),fe==null)throw new Error("Missing raw text");this.value=this.stringify.raw(fe)}return ye(de,pe),de.prototype.clone=function(){return(0,xe.default)(this)},de.prototype.toString=function(ge){return this.options.writer.set(ge).raw(this)},de}(be)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],230:[function(Se,je,Me){"use strict";(function(){var Ce,xe,be,ye,we,pe,de,ge,fe,ue,ee,z,oe,re=function(le,me){function ve(){this.constructor=le}for(var Pe in me)ae.call(me,Pe)&&(le[Pe]=me[Pe]);return ve.prototype=me.prototype,le.prototype=new ve,le.__super__=me.prototype,le},ae={}.hasOwnProperty;de=Se("./XMLDeclaration"),ge=Se("./XMLDocType"),Ce=Se("./XMLCData"),xe=Se("./XMLComment"),fe=Se("./XMLElement"),ee=Se("./XMLRaw"),z=Se("./XMLText"),ue=Se("./XMLProcessingInstruction"),be=Se("./XMLDTDAttList"),ye=Se("./XMLDTDElement"),we=Se("./XMLDTDEntity"),pe=Se("./XMLDTDNotation"),oe=Se("./XMLWriterBase"),je.exports=function(le){function me(ve,Pe){me.__super__.constructor.call(this,Pe),this.stream=ve}return re(me,le),me.prototype.document=function(ve){var Pe,Ae,De,Oe,Ze,qe,Xe,mt;for(qe=ve.children,Ae=0,Oe=qe.length;Ae<Oe;Ae++)Pe=qe[Ae],Pe.isLastRootNode=!1;for(ve.children[ve.children.length-1].isLastRootNode=!0,Xe=ve.children,mt=[],De=0,Ze=Xe.length;De<Ze;De++)switch(Pe=Xe[De],!1){case!(Pe instanceof de):mt.push(this.declaration(Pe));break;case!(Pe instanceof ge):mt.push(this.docType(Pe));break;case!(Pe instanceof xe):mt.push(this.comment(Pe));break;case!(Pe instanceof ue):mt.push(this.processingInstruction(Pe));break;default:mt.push(this.element(Pe))}return mt},me.prototype.attribute=function(ve){return this.stream.write(" "+ve.name+'="'+ve.value+'"')},me.prototype.cdata=function(ve,Pe){return this.stream.write(this.space(Pe)+"<![CDATA["+ve.text+"]]>"+this.endline(ve))},me.prototype.comment=function(ve,Pe){return this.stream.write(this.space(Pe)+"<!-- "+ve.text+" -->"+this.endline(ve))},me.prototype.declaration=function(ve,Pe){return this.stream.write(this.space(Pe)),this.stream.write('<?xml version="'+ve.version+'"'),ve.encoding!=null&&this.stream.write(' encoding="'+ve.encoding+'"'),ve.standalone!=null&&this.stream.write(' standalone="'+ve.standalone+'"'),this.stream.write(this.spacebeforeslash+"?>"),this.stream.write(this.endline(ve))},me.prototype.docType=function(ve,Pe){var Ae,De,Oe,Ze;if(Pe||(Pe=0),this.stream.write(this.space(Pe)),this.stream.write("<!DOCTYPE "+ve.root().name),ve.pubID&&ve.sysID?this.stream.write(' PUBLIC "'+ve.pubID+'" "'+ve.sysID+'"'):ve.sysID&&this.stream.write(' SYSTEM "'+ve.sysID+'"'),ve.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(ve)),Ze=ve.children,De=0,Oe=Ze.length;De<Oe;De++)switch(Ae=Ze[De],!1){case!(Ae instanceof be):this.dtdAttList(Ae,Pe+1);break;case!(Ae instanceof ye):this.dtdElement(Ae,Pe+1);break;case!(Ae instanceof we):this.dtdEntity(Ae,Pe+1);break;case!(Ae instanceof pe):this.dtdNotation(Ae,Pe+1);break;case!(Ae instanceof Ce):this.cdata(Ae,Pe+1);break;case!(Ae instanceof xe):this.comment(Ae,Pe+1);break;case!(Ae instanceof ue):this.processingInstruction(Ae,Pe+1);break;default:throw new Error("Unknown DTD node type: "+Ae.constructor.name)}this.stream.write("]")}return this.stream.write(this.spacebeforeslash+">"),this.stream.write(this.endline(ve))},me.prototype.element=function(ve,Pe){var Ae,De,Oe,Ze,qe,Xe,mt,pt;Pe||(Pe=0),pt=this.space(Pe),this.stream.write(pt+"<"+ve.name),Xe=ve.attributes;for(qe in Xe)ae.call(Xe,qe)&&(Ae=Xe[qe],this.attribute(Ae));if(ve.children.length===0||ve.children.every(function(Mt){return Mt.value===""}))this.allowEmpty?this.stream.write("></"+ve.name+">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&ve.children.length===1&&ve.children[0].value!=null)this.stream.write(">"),this.stream.write(ve.children[0].value),this.stream.write("</"+ve.name+">");else{for(this.stream.write(">"+this.newline),mt=ve.children,Oe=0,Ze=mt.length;Oe<Ze;Oe++)switch(De=mt[Oe],!1){case!(De instanceof Ce):this.cdata(De,Pe+1);break;case!(De instanceof xe):this.comment(De,Pe+1);break;case!(De instanceof fe):this.element(De,Pe+1);break;case!(De instanceof ee):this.raw(De,Pe+1);break;case!(De instanceof z):this.text(De,Pe+1);break;case!(De instanceof ue):this.processingInstruction(De,Pe+1);break;default:throw new Error("Unknown XML node type: "+De.constructor.name)}this.stream.write(pt+"</"+ve.name+">")}return this.stream.write(this.endline(ve))},me.prototype.processingInstruction=function(ve,Pe){return this.stream.write(this.space(Pe)+"<?"+ve.target),ve.value&&this.stream.write(" "+ve.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(ve))},me.prototype.raw=function(ve,Pe){return this.stream.write(this.space(Pe)+ve.value+this.endline(ve))},me.prototype.text=function(ve,Pe){return this.stream.write(this.space(Pe)+ve.value+this.endline(ve))},me.prototype.dtdAttList=function(ve,Pe){return this.stream.write(this.space(Pe)+"<!ATTLIST "+ve.elementName+" "+ve.attributeName+" "+ve.attributeType),ve.defaultValueType!=="#DEFAULT"&&this.stream.write(" "+ve.defaultValueType),ve.defaultValue&&this.stream.write(' "'+ve.defaultValue+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(ve))},me.prototype.dtdElement=function(ve,Pe){return this.stream.write(this.space(Pe)+"<!ELEMENT "+ve.name+" "+ve.value),this.stream.write(this.spacebeforeslash+">"+this.endline(ve))},me.prototype.dtdEntity=function(ve,Pe){return this.stream.write(this.space(Pe)+"<!ENTITY"),ve.pe&&this.stream.write(" %"),this.stream.write(" "+ve.name),ve.value?this.stream.write(' "'+ve.value+'"'):(ve.pubID&&ve.sysID?this.stream.write(' PUBLIC "'+ve.pubID+'" "'+ve.sysID+'"'):ve.sysID&&this.stream.write(' SYSTEM "'+ve.sysID+'"'),ve.nData&&this.stream.write(" NDATA "+ve.nData)),this.stream.write(this.spacebeforeslash+">"+this.endline(ve))},me.prototype.dtdNotation=function(ve,Pe){return this.stream.write(this.space(Pe)+"<!NOTATION "+ve.name),ve.pubID&&ve.sysID?this.stream.write(' PUBLIC "'+ve.pubID+'" "'+ve.sysID+'"'):ve.pubID?this.stream.write(' PUBLIC "'+ve.pubID+'"'):ve.sysID&&this.stream.write(' SYSTEM "'+ve.sysID+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(ve))},me.prototype.endline=function(ve){return ve.isLastRootNode?"":this.newline},me}(oe)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],231:[function(Se,je,Me){"use strict";(function(){var Ce,xe,be,ye,we,pe,de,ge,fe,ue,ee,z,oe,re=function(le,me){function ve(){this.constructor=le}for(var Pe in me)ae.call(me,Pe)&&(le[Pe]=me[Pe]);return ve.prototype=me.prototype,le.prototype=new ve,le.__super__=me.prototype,le},ae={}.hasOwnProperty;de=Se("./XMLDeclaration"),ge=Se("./XMLDocType"),Ce=Se("./XMLCData"),xe=Se("./XMLComment"),fe=Se("./XMLElement"),ee=Se("./XMLRaw"),z=Se("./XMLText"),ue=Se("./XMLProcessingInstruction"),be=Se("./XMLDTDAttList"),ye=Se("./XMLDTDElement"),we=Se("./XMLDTDEntity"),pe=Se("./XMLDTDNotation"),oe=Se("./XMLWriterBase"),je.exports=function(le){function me(ve){me.__super__.constructor.call(this,ve)}return re(me,le),me.prototype.document=function(ve){var Pe,Ae,De,Oe,Ze;for(this.textispresent=!1,Oe="",Ze=ve.children,Ae=0,De=Ze.length;Ae<De;Ae++)Pe=Ze[Ae],Oe+=function(){switch(!1){case!(Pe instanceof de):return this.declaration(Pe);case!(Pe instanceof ge):return this.docType(Pe);case!(Pe instanceof xe):return this.comment(Pe);case!(Pe instanceof ue):return this.processingInstruction(Pe);default:return this.element(Pe,0)}}.call(this);return this.pretty&&Oe.slice(-this.newline.length)===this.newline&&(Oe=Oe.slice(0,-this.newline.length)),Oe},me.prototype.attribute=function(ve){return" "+ve.name+'="'+ve.value+'"'},me.prototype.cdata=function(ve,Pe){return this.space(Pe)+"<![CDATA["+ve.text+"]]>"+this.newline},me.prototype.comment=function(ve,Pe){return this.space(Pe)+"<!-- "+ve.text+" -->"+this.newline},me.prototype.declaration=function(ve,Pe){var Ae;return Ae=this.space(Pe),Ae+='<?xml version="'+ve.version+'"',ve.encoding!=null&&(Ae+=' encoding="'+ve.encoding+'"'),ve.standalone!=null&&(Ae+=' standalone="'+ve.standalone+'"'),Ae+=this.spacebeforeslash+"?>",Ae+=this.newline},me.prototype.docType=function(ve,Pe){var Ae,De,Oe,Ze,qe;if(Pe||(Pe=0),Ze=this.space(Pe),Ze+="<!DOCTYPE "+ve.root().name,ve.pubID&&ve.sysID?Ze+=' PUBLIC "'+ve.pubID+'" "'+ve.sysID+'"':ve.sysID&&(Ze+=' SYSTEM "'+ve.sysID+'"'),ve.children.length>0){for(Ze+=" [",Ze+=this.newline,qe=ve.children,De=0,Oe=qe.length;De<Oe;De++)Ae=qe[De],Ze+=function(){switch(!1){case!(Ae instanceof be):return this.dtdAttList(Ae,Pe+1);case!(Ae instanceof ye):return this.dtdElement(Ae,Pe+1);case!(Ae instanceof we):return this.dtdEntity(Ae,Pe+1);case!(Ae instanceof pe):return this.dtdNotation(Ae,Pe+1);case!(Ae instanceof Ce):return this.cdata(Ae,Pe+1);case!(Ae instanceof xe):return this.comment(Ae,Pe+1);case!(Ae instanceof ue):return this.processingInstruction(Ae,Pe+1);default:throw new Error("Unknown DTD node type: "+Ae.constructor.name)}}.call(this);Ze+="]"}return Ze+=this.spacebeforeslash+">",Ze+=this.newline},me.prototype.element=function(ve,Pe){var Ae,De,Oe,Ze,qe,Xe,mt,pt,Mt,at,_t,dt,Rt;Pe||(Pe=0),Rt=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),dt=this.space(Pe),pt="",pt+=dt+"<"+ve.name,Mt=ve.attributes;for(mt in Mt)ae.call(Mt,mt)&&(Ae=Mt[mt],pt+=this.attribute(Ae));if(ve.children.length===0||ve.children.every(function(ut){return ut.value===""}))this.allowEmpty?pt+="></"+ve.name+">"+this.newline:pt+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&ve.children.length===1&&ve.children[0].value!=null)pt+=">",pt+=ve.children[0].value,pt+="</"+ve.name+">"+this.newline;else{if(this.dontprettytextnodes){for(at=ve.children,Oe=0,qe=at.length;Oe<qe;Oe++)if(De=at[Oe],De.value!=null){this.textispresent++,Rt=!0;break}}for(this.textispresent&&(this.newline="",this.pretty=!1,dt=this.space(Pe)),pt+=">"+this.newline,_t=ve.children,Ze=0,Xe=_t.length;Ze<Xe;Ze++)De=_t[Ze],pt+=function(){switch(!1){case!(De instanceof Ce):return this.cdata(De,Pe+1);case!(De instanceof xe):return this.comment(De,Pe+1);case!(De instanceof fe):return this.element(De,Pe+1);case!(De instanceof ee):return this.raw(De,Pe+1);case!(De instanceof z):return this.text(De,Pe+1);case!(De instanceof ue):return this.processingInstruction(De,Pe+1);default:throw new Error("Unknown XML node type: "+De.constructor.name)}}.call(this);Rt&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),pt+=dt+"</"+ve.name+">"+this.newline}return pt},me.prototype.processingInstruction=function(ve,Pe){var Ae;return Ae=this.space(Pe)+"<?"+ve.target,ve.value&&(Ae+=" "+ve.value),Ae+=this.spacebeforeslash+"?>"+this.newline},me.prototype.raw=function(ve,Pe){return this.space(Pe)+ve.value+this.newline},me.prototype.text=function(ve,Pe){return this.space(Pe)+ve.value+this.newline},me.prototype.dtdAttList=function(ve,Pe){var Ae;return Ae=this.space(Pe)+"<!ATTLIST "+ve.elementName+" "+ve.attributeName+" "+ve.attributeType,ve.defaultValueType!=="#DEFAULT"&&(Ae+=" "+ve.defaultValueType),ve.defaultValue&&(Ae+=' "'+ve.defaultValue+'"'),Ae+=this.spacebeforeslash+">"+this.newline},me.prototype.dtdElement=function(ve,Pe){return this.space(Pe)+"<!ELEMENT "+ve.name+" "+ve.value+this.spacebeforeslash+">"+this.newline},me.prototype.dtdEntity=function(ve,Pe){var Ae;return Ae=this.space(Pe)+"<!ENTITY",ve.pe&&(Ae+=" %"),Ae+=" "+ve.name,ve.value?Ae+=' "'+ve.value+'"':(ve.pubID&&ve.sysID?Ae+=' PUBLIC "'+ve.pubID+'" "'+ve.sysID+'"':ve.sysID&&(Ae+=' SYSTEM "'+ve.sysID+'"'),ve.nData&&(Ae+=" NDATA "+ve.nData)),Ae+=this.spacebeforeslash+">"+this.newline},me.prototype.dtdNotation=function(ve,Pe){var Ae;return Ae=this.space(Pe)+"<!NOTATION "+ve.name,ve.pubID&&ve.sysID?Ae+=' PUBLIC "'+ve.pubID+'" "'+ve.sysID+'"':ve.pubID?Ae+=' PUBLIC "'+ve.pubID+'"':ve.sysID&&(Ae+=' SYSTEM "'+ve.sysID+'"'),Ae+=this.spacebeforeslash+">"+this.newline},me.prototype.openNode=function(ve,Pe){var Ae,De,Oe,Ze;if(Pe||(Pe=0),ve instanceof fe){Oe=this.space(Pe)+"<"+ve.name,Ze=ve.attributes;for(De in Ze)ae.call(Ze,De)&&(Ae=Ze[De],Oe+=this.attribute(Ae));return Oe+=(ve.children?">":"/>")+this.newline}return Oe=this.space(Pe)+"<!DOCTYPE "+ve.rootNodeName,ve.pubID&&ve.sysID?Oe+=' PUBLIC "'+ve.pubID+'" "'+ve.sysID+'"':ve.sysID&&(Oe+=' SYSTEM "'+ve.sysID+'"'),Oe+=(ve.children?" [":">")+this.newline},me.prototype.closeNode=function(ve,Pe){switch(Pe||(Pe=0),!1){case!(ve instanceof fe):return this.space(Pe)+"</"+ve.name+">"+this.newline;case!(ve instanceof ge):return this.space(Pe)+"]>"+this.newline}},me}(oe)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],232:[function(Se,je,Me){"use strict";(function(){var Ce=function(be,ye){return function(){return be.apply(ye,arguments)}},xe={}.hasOwnProperty;je.exports=function(){function be(ye){this.assertLegalChar=Ce(this.assertLegalChar,this);var we,pe,de;ye||(ye={}),this.noDoubleEncoding=ye.noDoubleEncoding,pe=ye.stringify||{};for(we in pe)xe.call(pe,we)&&(de=pe[we],this[we]=de)}return be.prototype.eleName=function(ye){return ye=""+ye||"",this.assertLegalChar(ye)},be.prototype.eleText=function(ye){return ye=""+ye||"",this.assertLegalChar(this.elEscape(ye))},be.prototype.cdata=function(ye){return ye=""+ye||"",ye=ye.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(ye)},be.prototype.comment=function(ye){if(ye=""+ye||"",ye.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+ye);return this.assertLegalChar(ye)},be.prototype.raw=function(ye){return""+ye||""},be.prototype.attName=function(ye){return ye=""+ye||""},be.prototype.attValue=function(ye){return ye=""+ye||"",this.attEscape(ye)},be.prototype.insTarget=function(ye){return""+ye||""},be.prototype.insValue=function(ye){if(ye=""+ye||"",ye.match(/\?>/))throw new Error("Invalid processing instruction value: "+ye);return ye},be.prototype.xmlVersion=function(ye){if(ye=""+ye||"",!ye.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+ye);return ye},be.prototype.xmlEncoding=function(ye){if(ye=""+ye||"",!ye.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+ye);return ye},be.prototype.xmlStandalone=function(ye){return ye?"yes":"no"},be.prototype.dtdPubID=function(ye){return""+ye||""},be.prototype.dtdSysID=function(ye){return""+ye||""},be.prototype.dtdElementValue=function(ye){return""+ye||""},be.prototype.dtdAttType=function(ye){return""+ye||""},be.prototype.dtdAttDefault=function(ye){return ye!=null?""+ye||"":ye},be.prototype.dtdEntityValue=function(ye){return""+ye||""},be.prototype.dtdNData=function(ye){return""+ye||""},be.prototype.convertAttKey="@",be.prototype.convertPIKey="?",be.prototype.convertTextKey="#text",be.prototype.convertCDataKey="#cdata",be.prototype.convertCommentKey="#comment",be.prototype.convertRawKey="#raw",be.prototype.assertLegalChar=function(ye){var we;if(we=ye.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+ye+" at index "+we.index);return ye},be.prototype.elEscape=function(ye){var we;return we=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,ye.replace(we,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
")},be.prototype.attEscape=function(ye){var we;return we=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,ye.replace(we,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
")},be}()}).call(void 0)},{}],233:[function(Se,je,Me){"use strict";var Ce=Se("babel-runtime/core-js/object/create"),xe=function(be){return be&&be.__esModule?be:{default:be}}(Ce);(function(){var be,ye=function(pe,de){function ge(){this.constructor=pe}for(var fe in de)we.call(de,fe)&&(pe[fe]=de[fe]);return ge.prototype=de.prototype,pe.prototype=new ge,pe.__super__=de.prototype,pe},we={}.hasOwnProperty;be=Se("./XMLNode"),je.exports=function(pe){function de(ge,fe){if(de.__super__.constructor.call(this,ge),fe==null)throw new Error("Missing element text");this.value=this.stringify.eleText(fe)}return ye(de,pe),de.prototype.clone=function(){return(0,xe.default)(this)},de.prototype.toString=function(ge){return this.options.writer.set(ge).text(this)},de}(be)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],234:[function(Se,je,Me){"use strict";(function(){var Ce={}.hasOwnProperty;je.exports=function(){function xe(be){var ye,we,pe,de,ge,fe,ue,ee,z;be||(be={}),this.pretty=be.pretty||!1,this.allowEmpty=(we=be.allowEmpty)!=null&&we,this.pretty?(this.indent=(pe=be.indent)!=null?pe:" ",this.newline=(de=be.newline)!=null?de:`
|
|
|
`,this.offset=(ge=be.offset)!=null?ge:0,this.dontprettytextnodes=(fe=be.dontprettytextnodes)!=null?fe:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash=(ue=be.spacebeforeslash)!=null?ue:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,ee=be.writer||{};for(ye in ee)Ce.call(ee,ye)&&(z=ee[ye],this[ye]=z)}return xe.prototype.set=function(be){var ye,we,pe;be||(be={}),"pretty"in be&&(this.pretty=be.pretty),"allowEmpty"in be&&(this.allowEmpty=be.allowEmpty),this.pretty?(this.indent="indent"in be?be.indent:" ",this.newline="newline"in be?be.newline:`
|
|
|
`,this.offset="offset"in be?be.offset:0,this.dontprettytextnodes="dontprettytextnodes"in be?be.dontprettytextnodes:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash="spacebeforeslash"in be?be.spacebeforeslash:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,we=be.writer||{};for(ye in we)Ce.call(we,ye)&&(pe=we[ye],this[ye]=pe);return this},xe.prototype.space=function(be){var ye;return this.pretty?(ye=(be||0)+this.offset+1,ye>0?new Array(ye).join(this.indent):""):""},xe}()}).call(void 0)},{}],235:[function(Se,je,Me){"use strict";(function(){var Ce,xe,be,ye,we,pe,de;de=Se("./Utility"),we=de.assign,pe=de.isFunction,Ce=Se("./XMLDocument"),xe=Se("./XMLDocumentCB"),ye=Se("./XMLStringWriter"),be=Se("./XMLStreamWriter"),je.exports.create=function(ge,fe,ue,ee){var z,oe;if(ge==null)throw new Error("Root element needs a name");return ee=we({},fe,ue,ee),z=new Ce(ee),oe=z.element(ge),ee.headless||(z.declaration(ee),ee.pubID==null&&ee.sysID==null||z.doctype(ee)),oe},je.exports.begin=function(ge,fe,ue){var ee;return pe(ge)&&(ee=[ge,fe],fe=ee[0],ue=ee[1],ge={}),fe?new xe(ge,fe,ue):new Ce(ge)},je.exports.stringWriter=function(ge){return new ye(ge)},je.exports.streamWriter=function(ge,fe){return new be(ge,fe)}}).call(void 0)},{"./Utility":214,"./XMLDocument":224,"./XMLDocumentCB":225,"./XMLStreamWriter":230,"./XMLStringWriter":231}],236:[function(Se,je,Me){function Ce(){for(var be={},ye=0;ye<arguments.length;ye++){var we=arguments[ye];for(var pe in we)xe.call(we,pe)&&(be[pe]=we[pe])}return be}je.exports=Ce;var xe=Object.prototype.hasOwnProperty},{}],237:[function(Se,je,Me){"use strict";function Ce(ee,z,oe){ye.isBuffer(z)||(z=new ye(z)),ye.isBuffer(oe)||(oe=new ye(oe)),z.length>fe?z=ee(z):z.length<fe&&(z=ye.concat([z,ue],fe));for(var re=new ye(fe),ae=new ye(fe),le=0;le<fe;le++)re[le]=54^z[le],ae[le]=92^z[le];var me=ee(ye.concat([re,oe]));return ee(ye.concat([ae,me]))}function xe(ee,z){ee=ee||"sha1";var oe=ge[ee],re=[],ae=0;return oe||be("algorithm:",ee,"is not yet supported"),{update:function(le){return ye.isBuffer(le)||(le=new ye(le)),re.push(le),ae+=le.length,this},digest:function(le){var me=ye.concat(re),ve=z?Ce(oe,z,me):oe(me);return re=null,le?ve.toString(le):ve}}}function be(){var ee=[].slice.call(arguments).join(" ");throw new Error([ee,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
|
`))}var ye=Se("buffer").Buffer,we=Se("./sha"),pe=Se("./sha256"),de=Se("./md5"),ge={sha1:we,sha256:pe,md5:de},fe=64,ue=new ye(fe);ue.fill(0),Me.createHash=function(ee){return xe(ee)},Me.createHmac=function(ee,z){return xe(ee,z)},function(ee,z){for(var oe in ee)z(ee[oe],oe)}(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(ee){Me[ee]=function(){be("sorry,",ee,"is not implemented yet")}})},{"./md5":239,"./sha":240,"./sha256":241,buffer:38}],238:[function(Se,je,Me){"use strict";function Ce(ge,fe){if(ge.length%we!=0){var ue=ge.length+(we-ge.length%we);ge=ye.concat([ge,pe],ue)}for(var ee=[],z=fe?ge.readInt32BE:ge.readInt32LE,oe=0;oe<ge.length;oe+=we)ee.push(z.call(ge,oe));return ee}function xe(ge,fe,ue){for(var ee=new ye(fe),z=ue?ee.writeInt32BE:ee.writeInt32LE,oe=0;oe<ge.length;oe++)z.call(ee,ge[oe],4*oe,!0);return ee}function be(ge,fe,ue,ee){return ye.isBuffer(ge)||(ge=new ye(ge)),xe(fe(Ce(ge,ee),ge.length*de),ue,ee)}var ye=Se("buffer").Buffer,we=4,pe=new ye(we);pe.fill(0);var de=8;je.exports={hash:be}},{buffer:38}],239:[function(Se,je,Me){"use strict";function Ce(ue,ee){ue[ee>>5]|=128<<ee%32,ue[14+(ee+64>>>9<<4)]=ee;for(var z=1732584193,oe=-271733879,re=-1732584194,ae=271733878,le=0;le<ue.length;le+=16){var me=z,ve=oe,Pe=re,Ae=ae;z=be(z,oe,re,ae,ue[le+0],7,-680876936),ae=be(ae,z,oe,re,ue[le+1],12,-389564586),re=be(re,ae,z,oe,ue[le+2],17,606105819),oe=be(oe,re,ae,z,ue[le+3],22,-1044525330),z=be(z,oe,re,ae,ue[le+4],7,-176418897),ae=be(ae,z,oe,re,ue[le+5],12,1200080426),re=be(re,ae,z,oe,ue[le+6],17,-1473231341),oe=be(oe,re,ae,z,ue[le+7],22,-45705983),z=be(z,oe,re,ae,ue[le+8],7,1770035416),ae=be(ae,z,oe,re,ue[le+9],12,-1958414417),re=be(re,ae,z,oe,ue[le+10],17,-42063),oe=be(oe,re,ae,z,ue[le+11],22,-1990404162),z=be(z,oe,re,ae,ue[le+12],7,1804603682),ae=be(ae,z,oe,re,ue[le+13],12,-40341101),re=be(re,ae,z,oe,ue[le+14],17,-1502002290),oe=be(oe,re,ae,z,ue[le+15],22,1236535329),z=ye(z,oe,re,ae,ue[le+1],5,-165796510),ae=ye(ae,z,oe,re,ue[le+6],9,-1069501632),re=ye(re,ae,z,oe,ue[le+11],14,643717713),oe=ye(oe,re,ae,z,ue[le+0],20,-373897302),z=ye(z,oe,re,ae,ue[le+5],5,-701558691),ae=ye(ae,z,oe,re,ue[le+10],9,38016083),re=ye(re,ae,z,oe,ue[le+15],14,-660478335),oe=ye(oe,re,ae,z,ue[le+4],20,-405537848),z=ye(z,oe,re,ae,ue[le+9],5,568446438),ae=ye(ae,z,oe,re,ue[le+14],9,-1019803690),re=ye(re,ae,z,oe,ue[le+3],14,-187363961),oe=ye(oe,re,ae,z,ue[le+8],20,1163531501),z=ye(z,oe,re,ae,ue[le+13],5,-1444681467),ae=ye(ae,z,oe,re,ue[le+2],9,-51403784),re=ye(re,ae,z,oe,ue[le+7],14,1735328473),oe=ye(oe,re,ae,z,ue[le+12],20,-1926607734),z=we(z,oe,re,ae,ue[le+5],4,-378558),ae=we(ae,z,oe,re,ue[le+8],11,-2022574463),re=we(re,ae,z,oe,ue[le+11],16,1839030562),oe=we(oe,re,ae,z,ue[le+14],23,-35309556),z=we(z,oe,re,ae,ue[le+1],4,-1530992060),ae=we(ae,z,oe,re,ue[le+4],11,1272893353),re=we(re,ae,z,oe,ue[le+7],16,-155497632),oe=we(oe,re,ae,z,ue[le+10],23,-1094730640),z=we(z,oe,re,ae,ue[le+13],4,681279174),ae=we(ae,z,oe,re,ue[le+0],11,-358537222),re=we(re,ae,z,oe,ue[le+3],16,-722521979),oe=we(oe,re,ae,z,ue[le+6],23,76029189),z=we(z,oe,re,ae,ue[le+9],4,-640364487),ae=we(ae,z,oe,re,ue[le+12],11,-421815835),re=we(re,ae,z,oe,ue[le+15],16,530742520),oe=we(oe,re,ae,z,ue[le+2],23,-995338651),z=pe(z,oe,re,ae,ue[le+0],6,-198630844),ae=pe(ae,z,oe,re,ue[le+7],10,1126891415),re=pe(re,ae,z,oe,ue[le+14],15,-1416354905),oe=pe(oe,re,ae,z,ue[le+5],21,-57434055),z=pe(z,oe,re,ae,ue[le+12],6,1700485571),ae=pe(ae,z,oe,re,ue[le+3],10,-1894986606),re=pe(re,ae,z,oe,ue[le+10],15,-1051523),oe=pe(oe,re,ae,z,ue[le+1],21,-2054922799),z=pe(z,oe,re,ae,ue[le+8],6,1873313359),ae=pe(ae,z,oe,re,ue[le+15],10,-30611744),re=pe(re,ae,z,oe,ue[le+6],15,-1560198380),oe=pe(oe,re,ae,z,ue[le+13],21,1309151649),z=pe(z,oe,re,ae,ue[le+4],6,-145523070),ae=pe(ae,z,oe,re,ue[le+11],10,-1120210379),re=pe(re,ae,z,oe,ue[le+2],15,718787259),oe=pe(oe,re,ae,z,ue[le+9],21,-343485551),z=de(z,me),oe=de(oe,ve),re=de(re,Pe),ae=de(ae,Ae)}return Array(z,oe,re,ae)}function xe(ue,ee,z,oe,re,ae){return de(ge(de(de(ee,ue),de(oe,ae)),re),z)}function be(ue,ee,z,oe,re,ae,le){return xe(ee&z|~ee&oe,ue,ee,re,ae,le)}function ye(ue,ee,z,oe,re,ae,le){return xe(ee&oe|z&~oe,ue,ee,re,ae,le)}function we(ue,ee,z,oe,re,ae,le){return xe(ee^z^oe,ue,ee,re,ae,le)}function pe(ue,ee,z,oe,re,ae,le){return xe(z^(ee|~oe),ue,ee,re,ae,le)}function de(ue,ee){var z=(65535&ue)+(65535&ee);return(ue>>16)+(ee>>16)+(z>>16)<<16|65535&z}function ge(ue,ee){return ue<<ee|ue>>>32-ee}var fe=Se("./helpers");je.exports=function(ue){return fe.hash(ue,Ce,16)}},{"./helpers":238}],240:[function(Se,je,Me){"use strict";function Ce(de,ge){de[ge>>5]|=128<<24-ge%32,de[15+(ge+64>>9<<4)]=ge;for(var fe=Array(80),ue=1732584193,ee=-271733879,z=-1732584194,oe=271733878,re=-1009589776,ae=0;ae<de.length;ae+=16){for(var le=ue,me=ee,ve=z,Pe=oe,Ae=re,De=0;De<80;De++){fe[De]=De<16?de[ae+De]:we(fe[De-3]^fe[De-8]^fe[De-14]^fe[De-16],1);var Oe=ye(ye(we(ue,5),xe(De,ee,z,oe)),ye(ye(re,fe[De]),be(De)));re=oe,oe=z,z=we(ee,30),ee=ue,ue=Oe}ue=ye(ue,le),ee=ye(ee,me),z=ye(z,ve),oe=ye(oe,Pe),re=ye(re,Ae)}return Array(ue,ee,z,oe,re)}function xe(de,ge,fe,ue){return de<20?ge&fe|~ge&ue:de<40?ge^fe^ue:de<60?ge&fe|ge&ue|fe&ue:ge^fe^ue}function be(de){return de<20?1518500249:de<40?1859775393:de<60?-1894007588:-899497514}function ye(de,ge){var fe=(65535&de)+(65535&ge);return(de>>16)+(ge>>16)+(fe>>16)<<16|65535&fe}function we(de,ge){return de<<ge|de>>>32-ge}var pe=Se("./helpers");je.exports=function(de){return pe.hash(de,Ce,20,!0)}},{"./helpers":238}],241:[function(Se,je,Me){"use strict";var Ce=Se("./helpers"),xe=function(z,oe){var re=(65535&z)+(65535&oe);return(z>>16)+(oe>>16)+(re>>16)<<16|65535&re},be=function(z,oe){return z>>>oe|z<<32-oe},ye=function(z,oe){return z>>>oe},we=function(z,oe,re){return z&oe^~z&re},pe=function(z,oe,re){return z&oe^z&re^oe&re},de=function(z){return be(z,2)^be(z,13)^be(z,22)},ge=function(z){return be(z,6)^be(z,11)^be(z,25)},fe=function(z){return be(z,7)^be(z,18)^ye(z,3)},ue=function(z){return be(z,17)^be(z,19)^ye(z,10)},ee=function(z,oe){var re,ae,le,me,ve,Pe,Ae,De,Oe,Ze,qe,Xe,mt=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),pt=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),Mt=new Array(64);z[oe>>5]|=128<<24-oe%32,z[15+(oe+64>>9<<4)]=oe;for(var Oe=0;Oe<z.length;Oe+=16){re=pt[0],ae=pt[1],le=pt[2],me=pt[3],ve=pt[4],Pe=pt[5],Ae=pt[6],De=pt[7];for(var Ze=0;Ze<64;Ze++)Mt[Ze]=Ze<16?z[Ze+Oe]:xe(xe(xe(ue(Mt[Ze-2]),Mt[Ze-7]),fe(Mt[Ze-15])),Mt[Ze-16]),qe=xe(xe(xe(xe(De,ge(ve)),we(ve,Pe,Ae)),mt[Ze]),Mt[Ze]),Xe=xe(de(re),pe(re,ae,le)),De=Ae,Ae=Pe,Pe=ve,ve=xe(me,qe),me=le,le=ae,ae=re,re=xe(qe,Xe);pt[0]=xe(re,pt[0]),pt[1]=xe(ae,pt[1]),pt[2]=xe(le,pt[2]),pt[3]=xe(me,pt[3]),pt[4]=xe(ve,pt[4]),pt[5]=xe(Pe,pt[5]),pt[6]=xe(Ae,pt[6]),pt[7]=xe(De,pt[7])}return pt};je.exports=function(z){return Ce.hash(z,ee,32,!0)}},{"./helpers":238}],242:[function(Se,je,Me){(function(Ce){"use strict";function xe(ee){return ee&&ee.__esModule?ee:{default:ee}}var be=Se("babel-runtime/core-js/object/create"),ye=xe(be),we=Se("babel-runtime/helpers/classCallCheck"),pe=xe(we),de=Se("babel-runtime/helpers/createClass"),ge=xe(de),fe=Se("babel-runtime/helpers/typeof"),ue=xe(fe);(function(ee){if((Me===void 0?"undefined":(0,ue.default)(Me))==="object"&&je!==void 0)je.exports=ee();else if(typeof Le=="function"&&Le.amd)Le([],ee);else{var z;z=typeof window!="undefined"?window:Ce!==void 0?Ce:typeof self!="undefined"?self:this,z.mime=ee()}})(function(){return function ee(z,oe,re){function ae(ve,Pe){if(!oe[ve]){if(!z[ve]){var Ae=typeof Se=="function"&&Se;if(!Pe&&Ae)return Ae(ve,!0);if(le)return le(ve,!0);var De=new Error("Cannot find module '"+ve+"'");throw De.code="MODULE_NOT_FOUND",De}var Oe=oe[ve]={exports:{}};z[ve][0].call(Oe.exports,function(Ze){var qe=z[ve][1][Ze];return ae(qe||Ze)},Oe,Oe.exports,ee,z,oe,re)}return oe[ve].exports}for(var le=typeof Se=="function"&&Se,me=0;me<re.length;me++)ae(re[me]);return ae}({1:[function(ee,z,oe){var re=function(){function ae(){(0,pe.default)(this,ae),this._types=(0,ye.default)(null),this._extensions=(0,ye.default)(null);for(var le=0;le<arguments.length;le++)this.define(arguments[le])}return(0,ge.default)(ae,[{key:"define",value:function(le,me){for(var ve in le){for(var Pe=le[ve],Ae=0;Ae<Pe.length;Ae++){var De=Pe[Ae];if(!me&&De in this._types)throw new Error('Attempt to change mapping for "'+De+'" extension from "'+this._types[De]+'" to "'+ve+'". Pass `force=true` to allow this, otherwise remove "'+De+'" from the list of extensions for "'+ve+'".');this._types[De]=ve}!me&&this._extensions[ve]||(this._extensions[ve]=Pe[0])}}},{key:"getType",value:function(le){le=String(le);var me=le.replace(/^.*[\/\\]/,"").toLowerCase(),ve=me.replace(/^.*\./,"").toLowerCase(),Pe=me.length<le.length;return(ve.length<me.length-1||!Pe)&&this._types[ve]||null}},{key:"getExtension",value:function(le){return(le=/^\s*([^;\s]*)/.test(le)&&RegExp.$1)&&this._extensions[le.toLowerCase()]||null}}]),ae}();z.exports=re},{}],2:[function(ee,z,oe){var re=ee("./Mime");z.exports=new re(ee("./types/standard"),ee("./types/other"))},{"./Mime":1,"./types/other":3,"./types/standard":4}],3:[function(ee,z,oe){z.exports={"application/prs.cww":["cww"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":[],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":[],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-otf":[],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-ttf":["ttf","ttc"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":[],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":[],"application/x-msdownload":["com","bat"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":[],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":[],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":[],"audio/x-wav":[],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":[],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":[],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":[],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}},{}],4:[function(ee,z,oe){z.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/bdoc":["bdoc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":["woff"],"application/font-woff2":["woff2"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/pskc+xml":["pskcxml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/voicexml+xml":["vxml"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":[],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp3":[],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":[],"audio/webm":["weba"],"audio/xm":["xm"],"font/otf":["otf"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jpeg":["jpeg","jpg","jpe"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/webp":["webp"],"message/rfc822":["eml","mime"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":[],"text/sgml":["sgml","sgm"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":[],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}]},{},[2])(2)})}).call(this,typeof Ie.g!="undefined"?Ie.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"babel-runtime/core-js/object/create":19,"babel-runtime/helpers/classCallCheck":30,"babel-runtime/helpers/createClass":31,"babel-runtime/helpers/typeof":32}],243:[function(Se,je,Me){"use strict";Me.encodeURIComponent=function(Ce){try{return encodeURIComponent(Ce)}catch(xe){return Ce}},Me.escape=Se("escape-html"),Me.timestamp=function(Ce){if(Ce){var xe=Ce;return typeof xe=="string"&&(xe=Number(xe)),String(Ce).length===10&&(xe*=1e3),new Date(xe)}return Math.round(Date.now()/1e3)}},{"escape-html":157}],244:[function(Se,je,Me){(function(Ce,xe){"use strict";function be(De){return De&&De.__esModule?De:{default:De}}function ye(De,Oe){return De===void 0?Oe:De}function we(De,Oe){return function(Ze,qe,Xe){if(Ze)return Oe(Ze);De({data:qe,status:Xe.statusCode,headers:Xe.headers,res:Xe})}}var pe,de=Se("babel-runtime/core-js/json/stringify"),ge=be(de),fe=Se("babel-runtime/helpers/typeof"),ue=be(fe),ee=Se("util"),z=Se("url"),oe=Se("http"),re=Se("https"),ae=Se("debug")("urllib"),le=Se("humanize-ms"),me=0,ve=Math.pow(2,31)-10,Pe=/^https?:\/\//i;Me.TIMEOUTS=[le("300s"),le("300s")];var Ae=["json","text"];Me.request=function(De,Oe,Ze){return arguments.length===2&&typeof Oe=="function"&&(Ze=Oe,Oe=null),typeof Ze=="function"?Me.requestWithCallback(De,Oe,Ze):(pe||(pe=Se("any-promise")),new pe(function(qe,Xe){Me.requestWithCallback(De,Oe,we(qe,Xe))}))},Me.requestWithCallback=function(De,Oe,Ze){function qe(){et&&(clearTimeout(et),et=null)}function Xe(){Ve&&(clearTimeout(Ve),Ve=null)}function mt(un,Jn,mn){if(Xe(),!Ze)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),ut,Ce.pid,Ft.method,De),void(un&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),ut,Ce.pid,un.name,un.message,un.stack));var Yn=Ze;Ze=null;var ri={};if(mn&&(We=mn.statusCode,ri=mn.headers),We===401&&ri["www-authenticate"]&&(!Oe.headers||!Oe.headers.Authorization)&&Oe.digestAuth){var bi=ri["www-authenticate"];if(bi.indexOf("Digest ")>=0)return ae("Request#%d %s: got digest auth header WWW-Authenticate: %s",ut,De,bi),Oe.headers=Oe.headers||{},Oe.headers.Authorization=digestAuthHeader(Ft.method,Ft.path,bi,Oe.digestAuth),ae("Request#%d %s: auth with digest header: %s",ut,De,Oe.headers.Authorization),mn.headers["set-cookie"]&&(Oe.headers.Cookie=mn.headers["set-cookie"].join(";")),Me.requestWithCallback(De,Oe,Yn)}var jn=Date.now()-yt;en&&(en.contentDownload=jn),ae("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",jn,Ke,We,Ft.method,Ft.host,Ft.path,it,en);var ki={status:We,statusCode:We,headers:ri,size:Ke,aborted:vt,rt:jn,keepAliveSocket:it,data:Jn,requestUrls:Oe.requestUrls,timing:en,remoteAddress:kt,remotePort:hn};if(un){var Hi="";zt&&typeof zt.getCurrentStatus=="function"&&(Hi=", agent status: "+(0,ge.default)(zt.getCurrentStatus())),un.message+=", "+Ft.method+" "+De+" "+We+" (connected: "+ze+", keepalive socket: "+it+Hi+`)
|
|
|
headers: `+(0,ge.default)(ri),un.data=Jn,un.path=Ft.path,un.status=We,un.headers=ri,un.res=ki}Yn(un,Jn,Oe.streaming?mn:ki),Oe.emitter&&(rt.url=De,rt.socket=yn&&yn.connection,rt.options=Ft,rt.size=tt,Oe.emitter.emit("response",{requestId:ut,error:un,ctx:Oe.ctx,req:rt,res:ki}))}function pt(un){var Jn=null;if(Oe.followRedirect&&statuses.redirect[un.statusCode]){Oe._followRedirectCount=(Oe._followRedirectCount||0)+1;var mn=un.headers.location;if(mn){if(!(Oe._followRedirectCount>Oe.maxRedirects)){var Yn=Oe.formatRedirectUrl?Oe.formatRedirectUrl(De,mn):z.resolve(De,mn);ae("Request#%d %s: `redirected` from %s to %s",ut,Ft.path,De,Yn),Xe(),Oe.headers&&Oe.headers.Host&&Pe.test(mn)&&(Oe.headers.Host=null);var ri=Ze;return Ze=null,Me.requestWithCallback(Yn,Oe,ri),{redirect:!0,error:null}}Jn=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+De),Jn.name="MaxRedirectError"}else Jn=new Error("Got statusCode "+un.statusCode+" but cannot resolve next location from headers"),Jn.name="FollowRedirectError"}return{redirect:!1,error:Jn}}function Mt(un,Jn,mn){return mn(null,Jn,un.headers["content-encoding"])}function at(un){if(en&&(en.waiting=Date.now()-yt),ae("Request#%d %s `req response` event emit: status %d, headers: %j",ut,De,un.statusCode,un.headers),Oe.streaming){var Jn=pt(un);return Jn.redirect?void un.resume():Jn.error?(un.resume(),mt(Jn.error,null,un)):mt(null,null,un)}if(un.on("close",function(){ae("Request#%d %s: `res close` event emit, total size %d",ut,De,Ke)}),un.on("error",function(){ae("Request#%d %s: `res error` event emit, total size %d",ut,De,Ke)}),un.on("aborted",function(){vt=!0,ae("Request#%d %s: `res aborted` event emit, total size %d",ut,De,Ke)}),Gt){var Jn=pt(un);return Jn.redirect?void un.resume():Jn.error?(un.resume(),Gt.end(),mt(Jn.error,null,un)):(Oe.consumeWriteStream===!1?un.on("end",mt.bind(null,null,null,un)):isNode010||isNode012?first([[Gt,"close"],[un,"aborted"]],function(ri,bi,jn){ae("Request#%d %s: writeStream or res %s event emitted",ut,De,jn),mt(Re||null,null,un)}):Gt.on("close",function(){ae("Request#%d %s: writeStream close event emitted",ut,De),mt(Re||null,null,un)}),un.pipe(Gt))}var mn=[];un.on("data",function(Yn){ae("Request#%d %s: `res data` event emit, size %d",ut,De,Yn.length),Ke+=Yn.length,mn.push(Yn)}),un.on("end",function(){var Yn=xe.concat(mn,Ke);if(ae("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",ut,De,Ke,un._dumped),Re)return mt(Re,Yn,un);var ri=pt(un);if(ri.error)return mt(ri.error,Yn,un);ri.redirect||Mt(un,Yn,function(bi,jn,ki){if(bi)return mt(bi,Yn,un);if(!ki&&Ae.indexOf(Oe.dataType)>=0){try{jn=decodeBodyByCharset(jn,un)}catch(Fi){return ae("decodeBodyByCharset error: %s",Fi),mt(null,jn,un)}if(Oe.dataType==="json")if(Ke===0)jn=null;else{var Hi=parseJSON(jn,dn);Hi.error?bi=Hi.error:jn=Hi.data}}vt&&ae("Request#%d %s: Remote socket was terminated before `response.end()` was called",ut,De),mt(bi,jn,un)})})}function _t(){ae("Response timer ticking, timeout: %d",bn),Ve=setTimeout(function(){Ve=null;var un="Response timeout for "+bn+"ms";Re=new Error(un),Re.name="ResponseTimeoutError",Re.requestId=ut,ae("ResponseTimeout: Request#%d %s %s: %s, connected: %s",ut,De,Re.name,un,ze),dt()},bn)}function dt(){ae("Request#%d %s abort, connected: %s",ut,De,ze),yn.socket||(Re.noSocket=!0,mt(Re)),yn.abort()}if(!De||typeof De!="string"&&(De===void 0?"undefined":(0,ue.default)(De))!=="object"){var Rt=ee.format("expect request url to be a string or a http request options, but got %j",De);throw new Error(Rt)}arguments.length===2&&typeof Oe=="function"&&(Ze=Oe,Oe=null),Oe=Oe||{},me>=ve&&(me=0);var ut=++me;Oe.requestUrls=Oe.requestUrls||[];var rt={requestId:ut,url:De,args:Oe,ctx:Oe.ctx};Oe.emitter&&Oe.emitter.emit("request",rt),Oe.timeout=Oe.timeout||Me.TIMEOUTS,Oe.maxRedirects=Oe.maxRedirects||10,Oe.streaming=Oe.streaming||Oe.customResponse;var ct,yt=Date.now();typeof De=="string"?(Pe.test(De)||(De="http://"+De),ct=z.parse(De)):ct=De;var wt=(Oe.type||Oe.method||ct.method||"GET").toUpperCase(),xt=ct.port||80,Ut=oe,zt=ye(Oe.agent,Me.agent),dn=Oe.fixJSONCtlChars;ct.protocol==="https:"&&(Ut=re,zt=ye(Oe.httpsAgent,Me.httpsAgent),ct.port||(xt=443));var Ft={host:ct.hostname||ct.host||"localhost",path:ct.path||"/",method:wt,port:xt,agent:zt,headers:Oe.headers||{},lookup:Oe.lookup};Array.isArray(Oe.timeout)?Ft.requestTimeout=Oe.timeout[Oe.timeout.length-1]:Oe.timeout!==void 0&&(Ft.requestTimeout=Oe.timeout);for(var Dt=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],Qt=0;Qt<Dt.length;Qt++){var Yt=Dt[Qt];Oe.hasOwnProperty(Yt)&&(Ft[Yt]=Oe[Yt])}Ft.rejectUnauthorized!==!1||Ft.hasOwnProperty("secureOptions")||(Ft.secureOptions=Se("constants").SSL_OP_NO_TLSv1_2);var Jt=Oe.auth||ct.auth;Jt&&(Ft.auth=Jt);var lt=Oe.content||Oe.data,Ue=wt==="GET"||wt==="HEAD"||Oe.dataAsQueryString;if(!Oe.content&<&&typeof lt!="string"&&!xe.isBuffer(lt))if(Ue)lt=Oe.nestedQuerystring?qs.stringify(lt):querystring.stringify(lt);else{var Be=Ft.headers["Content-Type"]||Ft.headers["content-type"];Be||(Be=Oe.contentType==="json"?"application/json":"application/x-www-form-urlencoded",Ft.headers["Content-Type"]=Be),lt=parseContentType(Be).type==="application/json"?(0,ge.default)(lt):Oe.nestedQuerystring?qs.stringify(lt):querystring.stringify(lt)}Ue&<&&(Ft.path+=(ct.query?"&":"?")+lt,lt=null);var tt=0;if(lt){var ht=lt.length;xe.isBuffer(lt)||(ht=xe.byteLength(lt)),tt=Ft.headers["Content-Length"]=ht}Oe.dataType==="json"&&(Ft.headers.Accept="application/json"),typeof Oe.beforeRequest=="function"&&Oe.beforeRequest(Ft);var et=null,Ve=null,Re=null,ze=!1,it=!1,Ke=0,We=-1,vt=!1,kt="",hn="",en=null;Oe.timing&&(en={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),Ft.headers["User-Agent"]||Ft.headers["user-agent"]||(Ft.headers["User-Agent"]=navigator.userAgent),Oe.gzip&&(Ft.headers["Accept-Encoding"]||Ft.headers["accept-encoding"]||(Ft.headers["Accept-Encoding"]="gzip"));var Gt=Oe.writeStream;ae("Request#%d %s %s with headers %j, options.path: %s",ut,wt,De,Ft.headers,Ft.path),Oe.requestUrls.push(De);var gn,bn;Array.isArray(Oe.timeout)?(gn=le(Oe.timeout[0]),bn=le(Oe.timeout[1])):gn=bn=le(Oe.timeout),ae("ConnectTimeout: %d, ResponseTimeout: %d",gn,bn);var yn;try{yn=Ut.request(Ft,at)}catch(un){return mt(un)}return typeof window=="undefined"?function(){ae("Connect timer ticking, timeout: %d",gn),et=setTimeout(function(){et=null,We===-1&&(We=-2);var un="Connect timeout for "+gn+"ms",Jn="ConnectionTimeoutError";yn.socket||(Jn="SocketAssignTimeoutError",un+=", working sockets is full"),Re=new Error(un),Re.name=Jn,Re.requestId=ut,ae("ConnectTimeout: Request#%d %s %s: %s, connected: %s",ut,De,Re.name,un,ze),dt()},gn)}():yn.on("requestTimeout",function(){We===-1&&(We=-2);var un="Connect timeout for "+gn+"ms";Re=new Error(un),Re.name="ConnectionTimeoutError",Re.requestId=ut,dt()}),en&&yn.on("finish",function(){en.requestSent=Date.now()-yt}),yn.once("socket",function(un){en&&(en.queuing=Date.now()-yt),isNode010&&un.socket&&(un=un.socket);var Jn=un.readyState;if(Jn==="opening")return un.once("lookup",function(mn,Yn,ri){ae("Request#%d %s lookup: %s, %s, %s",ut,De,mn,Yn,ri),en&&(en.dnslookup=Date.now()-yt),Yn&&(kt=Yn)}),void un.once("connect",function(){en&&(en.connected=Date.now()-yt),qe(),_t(),ae("Request#%d %s new socket connected",ut,De),ze=!0,kt||(kt=un.remoteAddress),hn=un.remotePort});ae("Request#%d %s reuse socket connected, readyState: %s",ut,De,Jn),ze=!0,it=!0,kt||(kt=un.remoteAddress),hn=un.remotePort,qe(),_t()}),yn.on("error",function(un){un.name!=="Error"&&un.name!=="TypeError"||(un.name=ze?"ResponseError":"RequestError"),un.message+=' (req "error")',ae("Request#%d %s `req error` event emit, %s: %s",ut,De,un.name,un.message),mt(Re||un)}),Gt&&Gt.once("error",function(un){un.message+=' (writeStream "error")',Re=un,ae("Request#%d %s `writeStream error` event emit, %s: %s",ut,De,un.name,un.message),dt()}),Oe.stream?(Oe.stream.pipe(yn),Oe.stream.once("error",function(un){un.message+=' (stream "error")',Re=un,ae("Request#%d %s `readStream error` event emit, %s: %s",ut,De,un.name,un.message),dt()})):yn.end(lt),yn.requestId=ut,yn}}).call(this,Se("_process"),Se("buffer").Buffer)},{_process:173,"any-promise":13,"babel-runtime/core-js/json/stringify":17,"babel-runtime/helpers/typeof":32,buffer:38,constants:42,debug:155,http:196,https:159,"humanize-ms":160,url:203,util:207}]},{},[1])(1)}),function(Le){function Se(Me){if(je[Me])return je[Me].exports;var Ce=je[Me]={i:Me,l:!1,exports:{}};return Le[Me].call(Ce.exports,Ce,Ce.exports,Se),Ce.l=!0,Ce.exports}var je={};Se.m=Le,Se.c=je,Se.d=function(Me,Ce,xe){Se.o(Me,Ce)||Object.defineProperty(Me,Ce,{configurable:!1,enumerable:!0,get:xe})},Se.n=function(Me){var Ce=Me&&Me.__esModule?function(){return Me.default}:function(){return Me};return Se.d(Ce,"a",Ce),Ce},Se.o=function(Me,Ce){return Object.prototype.hasOwnProperty.call(Me,Ce)},Se.p="",Se(Se.s=12)}([function(Le,Se,je){(function(Me,Ce){Le.exports=Se=Ce()})(0,function(){var Me=Me||function(Ce,xe){var be=Object.create||function(){function re(){}return function(ae){var le;return re.prototype=ae,le=new re,re.prototype=null,le}}(),ye={},we=ye.lib={},pe=we.Base=function(){return{extend:function(re){var ae=be(this);return re&&ae.mixIn(re),ae.hasOwnProperty("init")&&this.init!==ae.init||(ae.init=function(){ae.$super.init.apply(this,arguments)}),ae.init.prototype=ae,ae.$super=this,ae},create:function(){var re=this.extend();return re.init.apply(re,arguments),re},init:function(){},mixIn:function(re){for(var ae in re)re.hasOwnProperty(ae)&&(this[ae]=re[ae]);re.hasOwnProperty("toString")&&(this.toString=re.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),de=we.WordArray=pe.extend({init:function(re,ae){re=this.words=re||[],this.sigBytes=ae!=null?ae:4*re.length},toString:function(re){return(re||fe).stringify(this)},concat:function(re){var ae=this.words,le=re.words,me=this.sigBytes,ve=re.sigBytes;if(this.clamp(),me%4)for(var Pe=0;Pe<ve;Pe++){var Ae=le[Pe>>>2]>>>24-Pe%4*8&255;ae[me+Pe>>>2]|=Ae<<24-(me+Pe)%4*8}else for(var Pe=0;Pe<ve;Pe+=4)ae[me+Pe>>>2]=le[Pe>>>2];return this.sigBytes+=ve,this},clamp:function(){var re=this.words,ae=this.sigBytes;re[ae>>>2]&=4294967295<<32-ae%4*8,re.length=Ce.ceil(ae/4)},clone:function(){var re=pe.clone.call(this);return re.words=this.words.slice(0),re},random:function(re){for(var ae,le=[],me=0;me<re;me+=4){var ve=function(Ae){var Ae=Ae,De=987654321,Oe=4294967295;return function(){De=36969*(65535&De)+(De>>16)&Oe,Ae=18e3*(65535&Ae)+(Ae>>16)&Oe;var Ze=(De<<16)+Ae&Oe;return Ze/=4294967296,(Ze+=.5)*(Ce.random()>.5?1:-1)}}(4294967296*(ae||Ce.random()));ae=987654071*ve(),le.push(4294967296*ve()|0)}return new de.init(le,re)}}),ge=ye.enc={},fe=ge.Hex={stringify:function(re){for(var ae=re.words,le=re.sigBytes,me=[],ve=0;ve<le;ve++){var Pe=ae[ve>>>2]>>>24-ve%4*8&255;me.push((Pe>>>4).toString(16)),me.push((15&Pe).toString(16))}return me.join("")},parse:function(re){for(var ae=re.length,le=[],me=0;me<ae;me+=2)le[me>>>3]|=parseInt(re.substr(me,2),16)<<24-me%8*4;return new de.init(le,ae/2)}},ue=ge.Latin1={stringify:function(re){for(var ae=re.words,le=re.sigBytes,me=[],ve=0;ve<le;ve++){var Pe=ae[ve>>>2]>>>24-ve%4*8&255;me.push(String.fromCharCode(Pe))}return me.join("")},parse:function(re){for(var ae=re.length,le=[],me=0;me<ae;me++)le[me>>>2]|=(255&re.charCodeAt(me))<<24-me%4*8;return new de.init(le,ae)}},ee=ge.Utf8={stringify:function(re){try{return decodeURIComponent(escape(ue.stringify(re)))}catch(ae){throw new Error("Malformed UTF-8 data")}},parse:function(re){return ue.parse(unescape(encodeURIComponent(re)))}},z=we.BufferedBlockAlgorithm=pe.extend({reset:function(){this._data=new de.init,this._nDataBytes=0},_append:function(re){typeof re=="string"&&(re=ee.parse(re)),this._data.concat(re),this._nDataBytes+=re.sigBytes},_process:function(re){var ae=this._data,le=ae.words,me=ae.sigBytes,ve=this.blockSize,Pe=4*ve,Ae=me/Pe;Ae=re?Ce.ceil(Ae):Ce.max((0|Ae)-this._minBufferSize,0);var De=Ae*ve,Oe=Ce.min(4*De,me);if(De){for(var Ze=0;Ze<De;Ze+=ve)this._doProcessBlock(le,Ze);var qe=le.splice(0,De);ae.sigBytes-=Oe}return new de.init(qe,Oe)},clone:function(){var re=pe.clone.call(this);return re._data=this._data.clone(),re},_minBufferSize:0}),oe=(we.Hasher=z.extend({cfg:pe.extend(),init:function(re){this.cfg=this.cfg.extend(re),this.reset()},reset:function(){z.reset.call(this),this._doReset()},update:function(re){return this._append(re),this._process(),this},finalize:function(re){return re&&this._append(re),this._doFinalize()},blockSize:16,_createHelper:function(re){return function(ae,le){return new re.init(le).finalize(ae)}},_createHmacHelper:function(re){return function(ae,le){return new oe.HMAC.init(re,le).finalize(ae)}}}),ye.algo={});return ye}(Math);return Me})},function(Le,Se,je){"use strict";function Me(be,ye){if(!(be instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var Ce=function(){function be(ye,we){for(var pe=0;pe<we.length;pe++){var de=we[pe];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(ye,de.key,de)}}return function(ye,we,pe){return we&&be(ye.prototype,we),pe&&be(ye,pe),ye}}(),xe=function(){function be(){Me(this,be)}return Ce(be,null,[{key:"detectIEVersion",value:function(){for(var ye=4,we=document.createElement("div"),pe=we.getElementsByTagName("i");we.innerHTML="<!--[if gt IE "+ye+"]><i></i><![endif]-->",pe[0];)ye++;return ye>4&&ye}},{key:"extend",value:function(ye,we){for(var pe in we)Object.prototype.hasOwnProperty.call(we,pe)&&we[pe]&&(ye[pe]=we[pe])}},{key:"isArray",value:function(ye){return Object.prototype.toString.call(arg)==="[object Array]"}},{key:"getFileType",value:function(ye){return ye=ye.toLowerCase(),/.mp4|.flv|.m3u8|.avi|.rm|.rmvb|.mpeg|.mpg|.mov|.wmv|.3gp|.asf|.dat|.dv|.f4v|.gif|.m2t|.m4v|.mj2|.mjpeg|.mpe|.mts|.ogg|.qt|.swf|.ts|.vob|.wmv|.webm/.test(ye)?"video":/.mp3|.wav|.ape|.cda|.au|.midi|.mac|.aac|.ac3|.acm|.amr|.caf|.flac|.m4a|.ra|.wma/.test(ye)?"audio":/.bmp|.jpg|.jpeg|.png/.test(ye)?"img":"other"}},{key:"isImage",value:function(ye){return ye=ye.toLowerCase(),!!/.jpg|.jpeg|.png/.test(ye)}},{key:"ISODateString",value:function(ye){function we(pe){return pe<10?"0"+pe:pe}return ye.getUTCFullYear()+"-"+we(ye.getUTCMonth()+1)+"-"+we(ye.getUTCDate())+"T"+we(ye.getUTCHours())+":"+we(ye.getUTCMinutes())+":"+we(ye.getUTCSeconds())+"Z"}},{key:"isIntNum",value:function(ye){return!!/^\d+$/.test(ye)}}]),be}();Se.default=xe},function(Le,Se,je){(function(Me,Ce){Le.exports=Se=Ce(je(0))})(0,function(Me){return function(Ce){function xe(oe,re,ae,le,me,ve,Pe){var Ae=oe+(re&ae|~re&le)+me+Pe;return(Ae<<ve|Ae>>>32-ve)+re}function be(oe,re,ae,le,me,ve,Pe){var Ae=oe+(re&le|ae&~le)+me+Pe;return(Ae<<ve|Ae>>>32-ve)+re}function ye(oe,re,ae,le,me,ve,Pe){var Ae=oe+(re^ae^le)+me+Pe;return(Ae<<ve|Ae>>>32-ve)+re}function we(oe,re,ae,le,me,ve,Pe){var Ae=oe+(ae^(re|~le))+me+Pe;return(Ae<<ve|Ae>>>32-ve)+re}var pe=Me,de=pe.lib,ge=de.WordArray,fe=de.Hasher,ue=pe.algo,ee=[];(function(){for(var oe=0;oe<64;oe++)ee[oe]=4294967296*Ce.abs(Ce.sin(oe+1))|0})();var z=ue.MD5=fe.extend({_doReset:function(){this._hash=new ge.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(oe,re){for(var ae=0;ae<16;ae++){var le=re+ae,me=oe[le];oe[le]=16711935&(me<<8|me>>>24)|4278255360&(me<<24|me>>>8)}var ve=this._hash.words,Pe=oe[re+0],Ae=oe[re+1],De=oe[re+2],Oe=oe[re+3],Ze=oe[re+4],qe=oe[re+5],Xe=oe[re+6],mt=oe[re+7],pt=oe[re+8],Mt=oe[re+9],at=oe[re+10],_t=oe[re+11],dt=oe[re+12],Rt=oe[re+13],ut=oe[re+14],rt=oe[re+15],ct=ve[0],yt=ve[1],wt=ve[2],xt=ve[3];ct=xe(ct,yt,wt,xt,Pe,7,ee[0]),xt=xe(xt,ct,yt,wt,Ae,12,ee[1]),wt=xe(wt,xt,ct,yt,De,17,ee[2]),yt=xe(yt,wt,xt,ct,Oe,22,ee[3]),ct=xe(ct,yt,wt,xt,Ze,7,ee[4]),xt=xe(xt,ct,yt,wt,qe,12,ee[5]),wt=xe(wt,xt,ct,yt,Xe,17,ee[6]),yt=xe(yt,wt,xt,ct,mt,22,ee[7]),ct=xe(ct,yt,wt,xt,pt,7,ee[8]),xt=xe(xt,ct,yt,wt,Mt,12,ee[9]),wt=xe(wt,xt,ct,yt,at,17,ee[10]),yt=xe(yt,wt,xt,ct,_t,22,ee[11]),ct=xe(ct,yt,wt,xt,dt,7,ee[12]),xt=xe(xt,ct,yt,wt,Rt,12,ee[13]),wt=xe(wt,xt,ct,yt,ut,17,ee[14]),yt=xe(yt,wt,xt,ct,rt,22,ee[15]),ct=be(ct,yt,wt,xt,Ae,5,ee[16]),xt=be(xt,ct,yt,wt,Xe,9,ee[17]),wt=be(wt,xt,ct,yt,_t,14,ee[18]),yt=be(yt,wt,xt,ct,Pe,20,ee[19]),ct=be(ct,yt,wt,xt,qe,5,ee[20]),xt=be(xt,ct,yt,wt,at,9,ee[21]),wt=be(wt,xt,ct,yt,rt,14,ee[22]),yt=be(yt,wt,xt,ct,Ze,20,ee[23]),ct=be(ct,yt,wt,xt,Mt,5,ee[24]),xt=be(xt,ct,yt,wt,ut,9,ee[25]),wt=be(wt,xt,ct,yt,Oe,14,ee[26]),yt=be(yt,wt,xt,ct,pt,20,ee[27]),ct=be(ct,yt,wt,xt,Rt,5,ee[28]),xt=be(xt,ct,yt,wt,De,9,ee[29]),wt=be(wt,xt,ct,yt,mt,14,ee[30]),yt=be(yt,wt,xt,ct,dt,20,ee[31]),ct=ye(ct,yt,wt,xt,qe,4,ee[32]),xt=ye(xt,ct,yt,wt,pt,11,ee[33]),wt=ye(wt,xt,ct,yt,_t,16,ee[34]),yt=ye(yt,wt,xt,ct,ut,23,ee[35]),ct=ye(ct,yt,wt,xt,Ae,4,ee[36]),xt=ye(xt,ct,yt,wt,Ze,11,ee[37]),wt=ye(wt,xt,ct,yt,mt,16,ee[38]),yt=ye(yt,wt,xt,ct,at,23,ee[39]),ct=ye(ct,yt,wt,xt,Rt,4,ee[40]),xt=ye(xt,ct,yt,wt,Pe,11,ee[41]),wt=ye(wt,xt,ct,yt,Oe,16,ee[42]),yt=ye(yt,wt,xt,ct,Xe,23,ee[43]),ct=ye(ct,yt,wt,xt,Mt,4,ee[44]),xt=ye(xt,ct,yt,wt,dt,11,ee[45]),wt=ye(wt,xt,ct,yt,rt,16,ee[46]),yt=ye(yt,wt,xt,ct,De,23,ee[47]),ct=we(ct,yt,wt,xt,Pe,6,ee[48]),xt=we(xt,ct,yt,wt,mt,10,ee[49]),wt=we(wt,xt,ct,yt,ut,15,ee[50]),yt=we(yt,wt,xt,ct,qe,21,ee[51]),ct=we(ct,yt,wt,xt,dt,6,ee[52]),xt=we(xt,ct,yt,wt,Oe,10,ee[53]),wt=we(wt,xt,ct,yt,at,15,ee[54]),yt=we(yt,wt,xt,ct,Ae,21,ee[55]),ct=we(ct,yt,wt,xt,pt,6,ee[56]),xt=we(xt,ct,yt,wt,rt,10,ee[57]),wt=we(wt,xt,ct,yt,Xe,15,ee[58]),yt=we(yt,wt,xt,ct,Rt,21,ee[59]),ct=we(ct,yt,wt,xt,Ze,6,ee[60]),xt=we(xt,ct,yt,wt,_t,10,ee[61]),wt=we(wt,xt,ct,yt,De,15,ee[62]),yt=we(yt,wt,xt,ct,Mt,21,ee[63]),ve[0]=ve[0]+ct|0,ve[1]=ve[1]+yt|0,ve[2]=ve[2]+wt|0,ve[3]=ve[3]+xt|0},_doFinalize:function(){var oe=this._data,re=oe.words,ae=8*this._nDataBytes,le=8*oe.sigBytes;re[le>>>5]|=128<<24-le%32;var me=Ce.floor(ae/4294967296),ve=ae;re[15+(le+64>>>9<<4)]=16711935&(me<<8|me>>>24)|4278255360&(me<<24|me>>>8),re[14+(le+64>>>9<<4)]=16711935&(ve<<8|ve>>>24)|4278255360&(ve<<24|ve>>>8),oe.sigBytes=4*(re.length+1),this._process();for(var Pe=this._hash,Ae=Pe.words,De=0;De<4;De++){var Oe=Ae[De];Ae[De]=16711935&(Oe<<8|Oe>>>24)|4278255360&(Oe<<24|Oe>>>8)}return Pe},clone:function(){var oe=fe.clone.call(this);return oe._hash=this._hash.clone(),oe}});pe.MD5=fe._createHelper(z),pe.HmacMD5=fe._createHmacHelper(z)}(Math),Me.MD5})},function(Le,Se,je){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.UPLOADSTATE={INIT:"init",UPLOADING:"uploading",COMPLETE:"complete",INTERRUPT:"interrupt"},Se.UPLOADSTEP={INIT:"init",PART:"part",COMPLETE:"complete"},Se.UPLOADDEFAULT={PARALLEL:5,PARTSIZE:1048576}},function(Le,Se,je){"use strict";function Me(z){return z&&z.__esModule?z:{default:z}}function Ce(z,oe){if(!(z instanceof oe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var xe=function(){function z(oe,re){for(var ae=0;ae<re.length;ae++){var le=re[ae];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(oe,le.key,le)}}return function(oe,re,ae){return re&&z(oe.prototype,re),ae&&z(oe,ae),oe}}(),be=je(5),ye=Me(be),we=je(25),pe=Me(we),de=je(6),ge=Me(de),fe=je(7),ue=Me(fe),ee=function(){function z(oe){Ce(this,z);var re=ue.default.os.name,ae=ue.default.os.version||"",le=ue.default.browser.name,me=ue.default.browser.version||"",ve=window.location.href,Pe="";ve&&(Pe=ue.default.getHost(ve));var Ae="pc";ue.default.os.ipad?Ae="pad":(ue.default.os.iphone||ue.default.os.android)&&(Ae="phone"),this._ri=ye.default.create(),this.initParam={APIVersion:"0.6.0",lv:"1",av:ge.default.version,pd:"upload",sm:"upload",md:"uploader",uuid:z.getUuid(),os:re,ov:ae,et:le,ev:me,uat:navigator.userAgent,app_n:Pe,tt:Ae,dm:"h5",ut:""}}return xe(z,[{key:"log",value:function(oe,re){re&&re.ri?(this._ri=re.ri,delete re.ri):this._ri=ye.default.create(),re&&re.ut&&(this.initParam.ut=re.ut,delete re.ut),this.initParam.t=new Date().getTime(),this.initParam.ll=oe=="20006"?"error":"info",this.initParam.ri=this._ri,this.initParam.e=oe;var ae=[];if(re)for(var le in re)ae.push(le+"="+re[le]);var me=ae.join("&");this.initParam.args=encodeURIComponent(me==""?"0":me);var ve=[];for(var le in this.initParam)ve.push(le+"="+this.initParam[le]);var Pe=ve.join("&");AliyunUpload&&AliyunUpload.__logTestCallback__?AliyunUpload.__logTestCallback__(Pe):new Image(0,0).src="https://videocloud.cn-hangzhou.log.aliyuncs.com/logstores/upload/track?"+Pe}}],[{key:"getUuid",value:function(){var oe=pe.default.get("p_h5_upload_u");return oe||(oe=ye.default.create(),pe.default.set("p_h5_upload_u",oe,730)),oe}},{key:"getClientId",value:function(){return pe.default.get("p_h5_upload_clientId")}},{key:"setClientId",value:function(oe){return oe||(oe=ye.default.create()),pe.default.set("p_h5_upload_clientId",oe,730),oe}}]),z}();Se.default=ee},function(Le,Se,je){"use strict";function Me(be,ye){if(!(be instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var Ce=function(){function be(ye,we){for(var pe=0;pe<we.length;pe++){var de=we[pe];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(ye,de.key,de)}}return function(ye,we,pe){return we&&be(ye.prototype,we),pe&&be(ye,pe),ye}}(),xe=function(){function be(){Me(this,be)}return Ce(be,null,[{key:"create",value:function(ye,we){var pe,de="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),ge=[];if(we=we||de.length,ye)for(pe=0;pe<ye;pe++)ge[pe]=de[0|Math.random()*we];else{var fe;for(ge[8]=ge[13]=ge[18]=ge[23]="-",ge[14]="4",pe=0;pe<36;pe++)ge[pe]||(fe=0|16*Math.random(),ge[pe]=de[pe==19?3&fe|8:fe])}return ge.join("")}}]),be}();Se.default=xe},function(Le,Se,je){"use strict";Object.defineProperty(Se,"__esModule",{value:!0});var Me={version:"1.5.0"};Se.default=Me},function(Le,Se,je){"use strict";function Me(de,ge){if(!(de instanceof ge))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var Ce=function(){function de(ge,fe){for(var ue=0;ue<fe.length;ue++){var ee=fe[ue];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(ge,ee.key,ee)}}return function(ge,fe,ue){return fe&&de(ge.prototype,fe),ue&&de(ge,ue),ge}}(),xe=function(de){var ge=navigator.userAgent,fe="other";if(de.ios)return"iOS";if(de.android)return"android";if(ge.indexOf("Baiduspider")>-1)return"Baiduspider";if(ge.indexOf("PlayStation")>-1)return"PS4";var ue=navigator.platform=="Win32"||navigator.platform=="Windows"||ge.indexOf("Windows")>-1,ee=navigator.platform=="Mac68K"||navigator.platform=="MacPPC"||navigator.platform=="Macintosh"||navigator.platform=="MacIntel";return ee&&(fe="macOS"),navigator.platform=="X11"&&!ue&&!ee&&(fe="Unix"),String(navigator.platform).indexOf("Linux")>-1&&(fe="Linux"),ue?"windows":fe},be=function(){var de=navigator.userAgent,ge="";return(de.indexOf("Windows NT 5.0")>-1||de.indexOf("Windows 2000")>-1)&&(ge="2000"),(de.indexOf("Windows NT 5.1")>-1||de.indexOf("Windows XP")>-1)&&(ge="XP"),(de.indexOf("Windows NT 5.2")>-1||de.indexOf("Windows 2003")>-1)&&(ge="2003"),(de.indexOf("Windows NT 6.0")>-1||de.indexOf("Windows Vista")>-1)&&(ge="Vista"),(de.indexOf("Windows NT 6.1")>-1||de.indexOf("Windows 7")>-1)&&(ge="7"),(de.indexOf("Windows NT 6.2")>-1||de.indexOf("Windows 8")>-1)&&(ge="8"),(de.indexOf("Windows NT 6.3")>-1||de.indexOf("Windows 8.1")>-1)&&(ge="8.1"),(de.indexOf("Windows NT 10")>-1||de.indexOf("Windows 10")>-1)&&(ge="10"),ge},ye=function(de){var ge=navigator.userAgent.toLowerCase();return de.chrome?"Chrome":de.firefox?"Firefox":de.safari?"Safari":de.webview?"webview":de.ie?/edge/.test(ge)?"Edge":"IE":/baiduspider/.test(ge)?"Baiduspider":/ucweb/.test(ge)||/UCBrowser/.test(ge)?"UC":/opera/.test(ge)?"Opera":/ucweb/.test(ge)?"UC":/360se/.test(ge)?"360\u6D4F\u89C8\u5668":/bidubrowser/.test(ge)?"\u767E\u5EA6\u6D4F\u89C8\u5668":/metasr/.test(ge)?"\u641C\u72D7\u6D4F\u89C8\u5668":/lbbrowser/.test(ge)?"\u730E\u8C79\u6D4F\u89C8\u5668":/micromessenger/.test(ge)?"\u5FAE\u4FE1\u5185\u7F6E\u6D4F\u89C8\u5668":/qqbrowser/.test(ge)?"QQ\u6D4F\u89C8\u5668":/playstation/.test(ge)?"PS4\u6D4F\u89C8\u5668":void 0},we=function(){var de={},ge={},fe=navigator.userAgent,ue=navigator.platform,ee=fe.match(/Web[kK]it[\/]{0,1}([\d.]+)/),z=fe.match(/(Android);?[\s\/]+([\d.]+)?/),oe=!!fe.match(/\(Macintosh\; Intel /),re=fe.match(/(iPad).*OS\s([\d_]+)/),ae=fe.match(/(iPod)(.*OS\s([\d_]+))?/),le=!re&&fe.match(/(iPhone\sOS)\s([\d_]+)/),me=fe.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),ve=/Win\d{2}|Windows/.test(ue),Pe=fe.match(/Windows Phone ([\d.]+)/),Ae=me&&fe.match(/TouchPad/),De=fe.match(/Kindle\/([\d.]+)/),Oe=fe.match(/Silk\/([\d._]+)/),Ze=fe.match(/(BlackBerry).*Version\/([\d.]+)/),qe=fe.match(/(BB10).*Version\/([\d.]+)/),Xe=fe.match(/(RIM\sTablet\sOS)\s([\d.]+)/),mt=fe.match(/PlayBook/),pt=fe.match(/Chrome\/([\d.]+)/)||fe.match(/CriOS\/([\d.]+)/),Mt=fe.match(/Firefox\/([\d.]+)/),at=fe.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),_t=fe.match(/MSIE\s([\d.]+)/)||fe.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),dt=!pt&&fe.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),Rt=dt||fe.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);if((ge.webkit=!!ee)&&(ge.version=ee[1]),z&&(de.android=!0,de.version=z[2]),le&&!ae&&(de.ios=de.iphone=!0,de.version=le[2].replace(/_/g,".")),re&&(de.ios=de.ipad=!0,de.version=re[2].replace(/_/g,".")),ae&&(de.ios=de.ipod=!0,de.version=ae[3]?ae[3].replace(/_/g,"."):null),Pe&&(de.wp=!0,de.version=Pe[1]),me&&(de.webos=!0,de.version=me[2]),Ae&&(de.touchpad=!0),Ze&&(de.blackberry=!0,de.version=Ze[2]),qe&&(de.bb10=!0,de.version=qe[2]),Xe&&(de.rimtabletos=!0,de.version=Xe[2]),mt&&(ge.playbook=!0),De&&(de.kindle=!0,de.version=De[1]),Oe&&(ge.silk=!0,ge.version=Oe[1]),!Oe&&de.android&&fe.match(/Kindle Fire/)&&(ge.silk=!0),pt&&(ge.chrome=!0,ge.version=pt[1]),Mt&&(ge.firefox=!0,ge.version=Mt[1]),at&&(de.firefoxos=!0,de.version=at[1]),_t&&(ge.ie=!0,ge.version=_t[1]),Rt&&(oe||de.ios||ve||z)&&(ge.safari=!0,de.ios||(ge.version=Rt[1])),dt&&(ge.webview=!0),oe){var ut=fe.match(/[\d]*_[\d]*_[\d]*/);ut&&ut.length>0&&ut[0]&&(de.version=ut[0].replace(/_/g,"."))}return de.tablet=!!(re||mt||z&&!fe.match(/Mobile/)||Mt&&fe.match(/Tablet/)||_t&&!fe.match(/Phone/)&&fe.match(/Touch/)),de.phone=!(de.tablet||de.ipod||!(z||le||me||Ze||qe||pt&&fe.match(/Android/)||pt&&fe.match(/CriOS\/([\d.]+)/)||Mt&&fe.match(/Mobile/)||_t&&fe.match(/Touch/))),de.pc=!de.tablet&&!de.phone,oe?de.name="macOS":ve?(de.name="windows",de.version=be()):de.name=xe(de),ge.name=ye(ge),{os:de,browser:ge}}(),pe=function(){function de(){Me(this,de)}return Ce(de,null,[{key:"getHost",value:function(ge){var ee="";if(ge===void 0||ge==null||ge=="")return"";var fe=ge.indexOf("//"),ue=ge;fe>-1&&(ue=ge.substring(fe+2));var ee=ue,z=ue.split("/");return z&&z.length>0&&(ee=z[0]),z=ee.split(":"),z&&z.length>0&&(ee=z[0]),ee}},{key:"os",get:function(){return we.os}},{key:"browser",get:function(){var ge=we.browser;return ge.name||(ge.name=ye()),ge}}]),de}();Se.default=pe},function(Le,Se,je){"use strict";function Me(be,ye){if(!(be instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var Ce=function(){function be(ye,we){for(var pe=0;pe<we.length;pe++){var de=we[pe];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(ye,de.key,de)}}return function(ye,we,pe){return we&&be(ye.prototype,we),pe&&be(ye,pe),ye}}(),xe=function(){function be(){Me(this,be)}return Ce(be,null,[{key:"get",value:function(ye,we,pe,de,ge){var fe;pe=pe||function(){},typeof XMLHttpRequest=="undefined"&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(ue){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(ue){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(ue){}throw new Error("This browser does not support XMLHttpRequest.")}),fe=new XMLHttpRequest,fe.onreadystatechange=function(){fe.readyState===4&&(fe.status===200?we(fe.responseText):pe(fe.responseText))};try{de===void 0&&(de=!0),fe.open("GET",ye,de),ge&&(fe.withCredentials=!0)}catch(ue){return void pe(ue)}try{fe.send()}catch(ue){pe(ue)}}}]),be}();Se.default=xe},function(Le,Se,je){"use strict";function Me(we,pe){if(!(we instanceof pe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var Ce=function(){function we(pe,de){for(var ge=0;ge<de.length;ge++){var fe=de[ge];fe.enumerable=fe.enumerable||!1,fe.configurable=!0,"value"in fe&&(fe.writable=!0),Object.defineProperty(pe,fe.key,fe)}}return function(pe,de,ge){return de&&we(pe.prototype,de),ge&&we(pe,ge),pe}}(),xe=je(27),be=je(30),ye=(je(10),function(){function we(){Me(this,we)}return Ce(we,null,[{key:"randomUUID",value:function(){for(var pe=[],de="0123456789abcdef",ge=0;ge<36;ge++)pe[ge]=de.substr(Math.floor(16*Math.random()),1);return pe[14]="4",pe[19]=de.substr(3&pe[19]|8,1),pe[8]=pe[13]=pe[18]=pe[23]="-",pe.join("")}},{key:"aliyunEncodeURI",value:function(pe){var de=encodeURIComponent(pe);return de=de.replace(/\+/g,"%20").replace(/\*/g,"%2A").replace(/%7E/g,"~").replace(/!/g,"%21").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27")}},{key:"makeUTF8sort",value:function(pe,de,ge){if(!pe)throw new Error("PrismPlayer Error: vid should not be null!");var fe=[];for(var ue in pe)fe.push(ue);for(var ee=fe.sort(),z="",oe=ee.length,ue=0;ue<oe;ue++){var re=we.aliyunEncodeURI(ee[ue]),ae=we.aliyunEncodeURI(pe[ee[ue]]);z==""?z=re+de+ae:z+=ge+re+de+ae}return z}},{key:"makeChangeSiga",value:function(pe,de){if(!pe)throw new Error("PrismPlayer Error: vid should not be null!");return be.stringify(xe("GET&"+we.aliyunEncodeURI("/")+"&"+we.aliyunEncodeURI(we.makeUTF8sort(pe,"=","&")),de+"&"))}}]),we}());Se.default=ye},function(Le,Se,je){(function(Me,Ce){Le.exports=Se=Ce(je(0))})(0,function(Me){return Me.enc.Utf8})},function(Le,Se,je){(function(Me,Ce){Le.exports=Se=Ce(je(0))})(0,function(Me){return Me.enc.Hex})},function(Le,Se,je){Le.exports=je(13)},function(Le,Se,je){"use strict";var Me,Ce,xe=je(14),be=function(we){return we&&we.__esModule?we:{default:we}}(xe),ye={Vod:be.default};Me=[],(Ce=function(){return ye}.apply(Se,Me))!==void 0&&(Le.exports=Ce),window.AliyunUpload=ye,xn.exports=AliyunUpload},function(Le,Se,je){"use strict";function Me(qe){return qe&&qe.__esModule?qe:{default:qe}}function Ce(qe,Xe){if(!(qe instanceof Xe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var xe=function(){function qe(Xe,mt){for(var pt=0;pt<mt.length;pt++){var Mt=mt[pt];Mt.enumerable=Mt.enumerable||!1,Mt.configurable=!0,"value"in Mt&&(Mt.writable=!0),Object.defineProperty(Xe,Mt.key,Mt)}}return function(Xe,mt,pt){return mt&&qe(Xe.prototype,mt),pt&&qe(Xe,pt),Xe}}(),be=je(15),ye=je(3),we=je(16),pe=Me(we),de=je(18),ge=Me(de),fe=je(24),ue=Me(fe),ee=je(4),z=Me(ee),oe=je(1),re=Me(oe),ae=je(5),le=Me(ae),me=je(26),ve=Me(me),Pe=je(31),Ae=Me(Pe),De=je(32),Oe=Me(De),Ze=(je(2),function(){function qe(Xe){Ce(this,qe),this.options=Xe,this.options.partSize=this.options.partSize||ye.UPLOADDEFAULT.PARTSIZE,this.options.parallel=this.options.parallel||ye.UPLOADDEFAULT.PARALLEL,this.options.region=this.options.region||"cn-shanghai",this.options.cname=this.options.cname||!1,this.options.localCheckpoint=this.options.localCheckpoint||!1,this.options.enableUploadProgress===void 0&&(this.options.enableUploadProgress=!0),this._ossCreditor=new Object,this._state=be.VODSTATE.INIT,this._uploadList=[],this._curIndex=-1,this._ossUpload=null,this._log=new z.default,this._retryCount=0,this._retryTotal=this.options.retryCount||3,this._retryDuration=this.options.retryDuration||2,this._state=be.VODSTATE.INIT,this._uploadWay="vod",this._onbeforeunload=!1,this._invalidUserId=!1,this._initEvent()}return xe(qe,[{key:"init",value:function(Xe,mt,pt,Mt){return this._retryCount=0,!(pt&&!Mt||!pt&&Mt)&&!(Xe&&!mt||!Xe&&mt)&&(this._ossCreditor.accessKeyId=Xe,this._ossCreditor.accessKeySecret=mt,this._ossCreditor.securityToken=pt,this._ossCreditor.expireTime=Mt,!0)}},{key:"addFile",value:function(Xe,mt,pt,Mt,at,_t){if(!Xe)return!1;if(Xe.size==0)try{this.options.onUploadFailed({file:Xe},"EmptyFile","\u6587\u4EF6\u5927\u5C0F\u4E3A0\uFF0C\u4E0D\u80FD\u4E0A\u4F20")}catch(rt){console.log(rt)}for(var dt=(this.options,0);dt<this._uploadList.length;dt++)if(this._uploadList[dt].file==Xe)return!1;var Rt=new Object;if(Rt.file=Xe,Rt._endpoint=mt,Rt._bucket=pt,Rt._object=Mt,Rt.state=be.UPLOADSTATE.INIT,Rt.isImage=re.default.isImage(Xe.name),!Rt.isImage&&this.options.enableUploadProgress){var ut=this;Oe.default.getMd5(Xe,function(rt){Rt.fileHash=rt;var ct=ut._getCheckoutpoint(Rt);ut.options.localCheckpoint||ct||ut._getCheckoutpointFromCloud(Rt,function(yt){if(yt.UploadPoint){var wt=JSON.parse(yt.UploadPoint);wt.loaded!=1&&(Rt.checkpoint=wt.checkpoint,Rt.loaded=wt.loaded,Rt.videoId=yt.VideoId,ut._saveCheckoutpoint(Rt,wt.checkpoint))}},function(yt){try{if((yt=JSON.parse(yt))&&yt.Code=="InvalidParameter"&&yt.Message.indexOf("UserId")>0){ut._invalidUserId=!0;var wt=yt.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(wt)}}catch(xt){console.log(xt)}})})}at&&(Rt.videoInfo=at?JSON.parse(at).Vod:{},Rt.userData=ge.default.encode(at)),Rt.ri=le.default.create(),this._uploadList.push(Rt),this._reportLog("20001",Rt,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess(Rt)}catch(rt){console.log(rt)}return!0}},{key:"deleteFile",value:function(Xe){return!!this.cancelFile(Xe)&&(this._uploadList.splice(Xe,1),!0)}},{key:"cleanList",value:function(){this.stopUpload(),this._uploadList.length=0,this._curIndex=-1}},{key:"cancelFile",value:function(Xe){if(this.options,Xe<0||Xe>=this._uploadList.length)return!1;var mt=this._uploadList[Xe];if(Xe==this._curIndex&&mt.state==be.UPLOADSTATE.UPLOADING){mt.state=be.UPLOADSTATE.CANCELED;var pt=this._getCheckoutpoint(mt);pt&&pt.checkpoint&&(pt=pt.checkpoint),pt&&this._ossUpload.abort(mt),this._removeCheckoutpoint(mt),this.nextUpload()}else mt.state!=be.UPLOADSTATE.SUCCESS&&(mt.state=be.UPLOADSTATE.CANCELED);return this._reportLog("20008",mt),!0}},{key:"resumeFile",value:function(Xe){if(this.options,Xe<0||Xe>=this._uploadList.length)return!1;var mt=this._uploadList[Xe];return mt.state==be.UPLOADSTATE.CANCELED&&(mt.state=be.UPLOADSTATE.INIT,!0)}},{key:"listFiles",value:function(){return this._uploadList}},{key:"getCheckpoint",value:function(Xe){return this._getCheckoutpoint({file:Xe})}},{key:"startUpload",value:function(Xe){if(this._retryCount=0,this.options,this._state==be.VODSTATE.START||this._state==be.VODSTATE.EXPIRE)return void console.log("already started or expired");if(this._initState(),this._curIndex=this._findUploadIndex(),this._curIndex==-1)return void(this._state=be.VODSTATE.END);var mt=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(mt),this._state=be.VODSTATE.START}},{key:"nextUpload",value:function(){var Xe=this.options;if(this._state==be.VODSTATE.START)if(this._curIndex=this._findUploadIndex(),this._curIndex!=-1){var mt=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(mt)}else{this._state=be.VODSTATE.END;try{Xe.onUploadEnd&&Xe.onUploadEnd(mt)}catch(pt){console.log(pt)}}}},{key:"clear",value:function(Xe){for(var mt=this.options,pt=0,Mt=0;Mt<this._uploadList.length;Mt++)mt.uploadList[Mt].state==be.UPLOADSTATE.SUCCESS&&pt++,this._uploadList[Mt].state==Xe&&(mt.uploadList.splice(Mt,1),Mt--);mt.onClear&&mt.onClear(mt.uploadList.length,pt)}},{key:"stopUpload",value:function(){if((this._state==be.VODSTATE.START||this._state==be.VODSTATE.FAILURE||this._curIndex==-1)&&this._curIndex!=-1){var Xe=this._uploadList[this._curIndex];this._state=be.VODSTATE.STOP,Xe.state=be.UPLOADSTATE.STOPED,this._changeState(Xe,be.UPLOADSTATE.STOPED),this._ossUpload.cancel()}}},{key:"resumeUploadWithAuth",value:function(Xe){var mt=this;if(!Xe)return!1;var pt=JSON.parse(ge.default.decode(Xe));return!!(pt.AccessKeyId&&pt.AccessKeySecret&&pt.SecurityToken&&pt.Expiration)&&mt.resumeUploadWithToken(pt.AccessKeyId,pt.AccessKeySecret,pt.SecurityToken,pt.Expiration)}},{key:"resumeUploadWithToken",value:function(Xe,mt,pt,Mt){if(this.options,!(Xe&&mt&&pt&&Mt)||this._state!=be.VODSTATE.EXPIRE||this._curIndex==-1)return!1;var at="";return this._uploadList.length>this._curIndex&&(at=this._uploadList[this._curIndex]),at&&(this.init(Xe,mt,pt,Mt),this._state=be.VODSTATE.START,this._ossUpload=null,this._uploadCore(at,at.retry),at.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(Xe,mt,pt){if(this._curIndex==-1||this._state!=be.VODSTATE.EXPIRE)return!1;if(this._uploadList.length>this._curIndex){var Mt=this._uploadList[this._curIndex];Mt.object?this._refreshSTSTokenUpload(Mt,Xe,mt,pt):this.setSTSToken(Mt,Xe,mt,pt)}}},{key:"setSTSTokenDirectlyUpload",value:function(Xe,mt,pt,Mt,at){if(!(mt&&pt&&Mt&&at))return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken and expiration should not be empty."),!1;this._ut="oss";var _t=Xe;this.init(mt,pt,Mt,at),_t.endpoint=_t._endpoint,_t.bucket=_t._bucket,_t.object=_t._object,this._ossUpload=null,this._uploadCore(_t,Xe.retry),Xe.retry=!1}},{key:"setSTSToken",value:function(Xe,mt,pt,Mt){if(!mt||!pt||!Mt)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var at=Xe.videoInfo,_t={accessKeyId:mt,securityToken:Mt,accessKeySecret:pt,fileName:Xe.file.name,title:at.Title,requestId:Xe.ri,region:this.options.region};at.ImageType&&(_t.imageType=at.ImageType),at.ImageExt&&(_t.imageExt=at.ImageExt),at.FileSize&&(_t.fileSize=at.FileSize),at.Description&&(_t.description=at.Description),at.CateId&&(_t.cateId=at.CateId),at.Tags&&(_t.tags=at.Tags),at.TemplateGroupId&&(_t.templateGroupId=at.TemplateGroupId),at.StorageLocation&&(_t.storageLocation=at.StorageLocation),at.CoverURL&&(_t.coverUrl=at.CoverURL),at.TransCodeMode&&(_t.transCodeMode=at.TransCodeMode),at.UserData&&(_t.userData=at.UserData);var dt=this,Rt="getUploadAuth";Xe.videoId?(_t.videoId=Xe.videoId,Rt="refreshUploadAuth"):Xe.isImage&&(Rt="getImageUploadAuth"),ve.default[Rt](_t,function(ut){Xe.videoId=ut.VideoId?ut.VideoId:Xe.videoId,dt.setUploadAuthAndAddress(Xe,ut.UploadAuth,ut.UploadAddress),dt._state=be.VODSTATE.START},function(ut){dt._error(Xe,{name:ut.Code,code:ut.Code,message:ut.Message,requestId:ut.RequestId})})}},{key:"setUploadAuthAndAddress",value:function(Xe,mt,pt,Mt){if(!Xe||!mt||!pt)return!1;var at=JSON.parse(ge.default.decode(mt));if(!(at.AccessKeyId&&at.AccessKeySecret&&at.SecurityToken&&at.Expiration))return console.error("uploadauth is invalid"),!1;var _t={},dt=Xe;if(pt){if(_t=JSON.parse(ge.default.decode(pt)),!_t.Endpoint||!_t.Bucket||!_t.FileName)return console.error("uploadAddress is invalid"),!1}else _t.Endpoint=dt.endpoint,_t.Bucket=dt.bucket,_t.FileName=dt.object;this._ut="vod",this._uploadWay="vod",this.options.region=at.Region||this.options.region,this.init(at.AccessKeyId,at.AccessKeySecret,at.SecurityToken,at.Expiration),dt.endpoint=dt._endpoint?dt._endpoint:_t.Endpoint,dt.bucket=dt._bucket?dt._bucket:_t.Bucket,dt.object=dt._object?dt._object:_t.FileName,dt.region=this.options.region,Mt&&(dt.videoId=Mt),this._ossUpload=null,this._uploadCore(dt,Xe.retry),Xe.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(Xe,mt,pt,Mt){if(!mt||!pt||!Mt)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;var at={accessKeyId:mt,securityToken:Mt,accessKeySecret:pt,videoId:Xe.object,requestId:Xe.ri,region:this.options.region},_t=this,dt="refreshUploadAuth";Xe.isImage&&(dt="getImageUploadAuth"),ve.default[dt](at,function(Rt){_t.setUploadAuthAndAddress(Xe,Rt.UploadAuth,UploadAddress),_t._state=be.VODSTATE.START},function(Rt){_t._error(Xe,{name:Rt.Code,code:Rt.Code,message:Rt.Message,requestId:Rt.RequestId})})}},{key:"_upload",value:function(Xe){var mt=arguments.length>1&&arguments[1]!==void 0&&arguments[1],pt=this.options;if(Xe.retry=mt,pt.onUploadstarted&&!mt)try{var Mt=this._getCheckoutpoint(Xe);Mt&&Mt.state!=be.UPLOADSTATE.UPLOADING&&(Xe.checkpoint=Mt,Xe.videoId=Mt.videoId),pt.onUploadstarted(Xe)}catch(at){console.log(at)}}},{key:"_uploadCore",value:function(Xe){if(arguments.length>1&&arguments[1]!==void 0&&arguments[1],!this._ossCreditor.accessKeyId||!this._ossCreditor.accessKeySecret||!this._ossCreditor.securityToken)throw new Error("AccessKeyId\u3001AccessKeySecret\u3001securityToken should not be null");if(Xe.state=be.UPLOADSTATE.UPLOADING,!this._ossUpload){Xe.endpoint=Xe.endpoint||"http://oss-cn-hangzhou.aliyuncs.com";var mt=this;this._ossUpload=new pe.default({bucket:Xe.bucket,endpoint:Xe.endpoint,AccessKeyId:this._ossCreditor.accessKeyId,AccessKeySecret:this._ossCreditor.accessKeySecret,SecurityToken:this._ossCreditor.securityToken,timeout:this.options.timeout,cname:this.options.cname},{onerror:function(ut,rt){mt._error.call(mt,ut,rt)},oncomplete:function(ut,rt){mt._complete.call(mt,ut,rt)},onprogress:function(ut,rt,ct){mt._progress.call(mt,ut,rt,ct)}})}var pt=re.default.getFileType(Xe.file.name),Mt=this._getCheckoutpoint(Xe),at="",_t="";Mt&&Mt.checkpoint&&(_t=Mt.state,at=Mt.videoId,Mt=Mt.checkpoint),Mt&&at==Xe.videoId&&_t!=be.UPLOADSTATE.UPLOADING&&(Mt.file=Xe.file,Xe.checkpoint=Mt,Mt.uploadId);var dt=this._adjustPartSize(Xe);this._reportLog("20002",Xe,{ft:pt,fs:Xe.file.size,bu:Xe.bucket,ok:Xe.object,vid:Xe.videoId||"",fn:Xe.file.name,fw:null,fh:null,ps:dt});var Rt={headers:{"x-oss-notification":Xe.userData?Xe.userData:""},partSize:dt,parallel:this.options.parallel};this._ossUpload.upload(Xe,Rt)}},{key:"_findUploadIndex",value:function(){for(var Xe=-1,mt=0;mt<this._uploadList.length;mt++)if(this._uploadList[mt].state==be.UPLOADSTATE.INIT){Xe=mt;break}return Xe}},{key:"_error",value:function(Xe,mt){if(mt.name=="cancel")try{this.options.onUploadCanceled(Xe,mt)}catch(Mt){console.log(Mt)}else{if(mt.message.indexOf("InvalidAccessKeyIdError")>0||mt.name=="SignatureDoesNotMatchError"||mt.code=="SecurityTokenExpired"||mt.code=="InvalidSecurityToken.Expired"||mt.code=="InvalidAccessKeyId"&&this._ossCreditor.securityToken){if(this.options.onUploadTokenExpired){this._state=be.VODSTATE.EXPIRE,Xe.state=be.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(Xe,mt)}catch(Mt){console.log(Mt)}}return}if((mt.name=="RequestTimeoutError"||mt.name=="ConnectionTimeout"||mt.name=="ConnectionTimeoutError")&&this._retryTotal>this._retryCount){var pt=this;return setTimeout(function(){pt._uploadCore(Xe,!0)},1e3*pt._retryDuration),void this._retryCount++}mt.name=="NoSuchUploadError"&&this._removeCheckoutpoint(Xe),this._handleError(Xe,mt)}}},{key:"_handleError",value:function(Xe,mt){var pt=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],Mt=be.UPLOADSTATE.FAIlURE;if(Xe.state!=be.UPLOADSTATE.CANCELED&&(Xe.state=be.UPLOADSTATE.FAIlURE,this._state=be.VODSTATE.FAILURE,this.options.onUploadFailed&&mt&&mt.code&&mt.message))try{this.options.onUploadFailed(Xe,mt.code,mt.message)}catch(_t){console.log(_t)}if(pt&&this._changeState(Xe,Mt),this._reportLog("20006",Xe,{code:mt.name,message:mt.message,requestId:mt.requestId,fs:Xe.file.size,bu:Xe.bucket,ok:Xe.object,fn:Xe.file.name}),this._reportLog("20004",Xe,{requestId:mt.requestId,fs:Xe.file.size,bu:Xe.bucket,ok:Xe.object,fn:Xe.file.name}),Xe.ri=le.default.create(),this._findUploadIndex()!=-1){var at=this;this._state=be.VODSTATE.START,setTimeout(function(){at.nextUpload()},100)}}},{key:"_complete",value:function(Xe,mt){if(Xe.state=be.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(Xe)}catch(at){console.log(at)}var pt=0;mt&&mt.res&&mt.res.headers&&(pt=mt.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(Xe);var Mt=this;setTimeout(function(){Mt.nextUpload()},100),this._retryCount=0,this._reportLog("20003",Xe,{requestId:pt})}},{key:"_progress",value:function(Xe,mt,pt){if(this.options.onUploadProgress)try{Xe.loaded=mt.loaded,this.options.onUploadProgress(Xe,mt.total,mt.loaded)}catch(rt){console.log(rt)}var Mt=mt.checkpoint,at=0;Mt&&(Xe.checkpoint=Mt,this._saveCheckoutpoint(Xe,Mt,be.UPLOADSTATE.UPLOADING),at=Mt.uploadId),this._retryCount=0;var _t=this._getPortNumber(Mt),dt=0;if(pt&&pt.headers&&(dt=pt.headers["x-oss-request-id"]),mt.loaded!=0&&this._reportLog("20007",Xe,{pn:_t,requestId:dt}),mt.loaded!=1&&this._reportLog("20005",Xe,{UploadId:at,pn:_t+1,pr:Xe.retry?1:0,fs:Xe.file.size,bu:Xe.bucket,ok:Xe.object,fn:Xe.file.name}),!this._invalidUserId&&!Xe.isImage&&this._ut=="vod"&&this.options.enableUploadProgress){var Rt={file:Xe.file,checkpoint:mt,userId:this.options.userId,videoId:Xe.videoId,region:this.options.region,fileHash:Xe.fileHash};try{var ut=this;Ae.default.upload(Rt,function(){},function(rt){if((rt=JSON.parse(rt))&&rt.Code=="InvalidParameter"&&rt.Message.indexOf("UserId")>0){ut._invalidUserId=!0;var ct=rt.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(ct)}})}catch(rt){console.log(rt)}}}},{key:"_getPortNumber",value:function(Xe){if(Xe){var mt=Xe.doneParts;if(mt&&mt.length>0)return mt[mt.length-1].number}return 0}},{key:"_removeCheckoutpoint",value:function(Xe){var mt=this._getCheckoutpointKey(Xe);ue.default.remove(mt)}},{key:"_getCheckoutpoint",value:function(Xe){var mt=this._getCheckoutpointKey(Xe),pt=ue.default.get(mt);if(pt)try{return JSON.parse(pt)}catch(Mt){}return""}},{key:"_saveCheckoutpoint",value:function(Xe,mt,pt){if(mt){var Mt=this._getCheckoutpointKey(Xe),at=Xe.file,_t={fileName:at.name,lastModified:at.lastModified,size:at.size,object:Xe.object,videoId:Xe.videoId,bucket:Xe.bucket,endpoint:Xe.endpoint,checkpoint:mt,loaded:Xe.loaded,state:pt};ue.default.set(Mt,JSON.stringify(_t))}}},{key:"_changeState",value:function(Xe,mt){var pt=this._getCheckoutpoint(Xe);pt&&((this._onbeforeunload=!0)&&(mt=be.UPLOADSTATE.STOPED),this._saveCheckoutpoint(Xe,pt.checkpoint,mt))}},{key:"_getCheckoutpointKey",value:function(Xe){return"upload_"+Xe.file.lastModified+"_"+Xe.file.name+"_"+Xe.file.size}},{key:"_getCheckoutpointFromCloud",value:function(Xe,mt,pt){var Mt={userId:this.options.userId,uploadInfoList:[{FileName:Xe.file.name,FileSize:Xe.file.size,FileCreateTime:Xe.file.lastModified,FileHash:Xe.fileHash}],region:this.options.region};Ae.default.get(Mt,function(at){mt(at)},pt)}},{key:"_reportLog",value:function(Xe,mt,pt){pt||(pt={}),pt.ri=mt.ri,this._ut&&(pt.ut=this._ut),this._log.log(Xe,pt)}},{key:"_initEvent",value:function(){var Xe=this;window&&(window.onbeforeunload=function(mt){if(Xe._onbeforeunload=!0,Xe._curIndex!=-1&&Xe._uploadList.length>Xe._curIndex){var pt=Xe._uploadList[Xe._curIndex];Xe._changeState(pt,be.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var Xe=0;Xe<this._uploadList.length;Xe++){var mt=this._uploadList[Xe];mt.state!=be.UPLOADSTATE.FAIlURE&&mt.state!=be.UPLOADSTATE.STOPED||(mt.state=be.UPLOADSTATE.INIT)}this._state=be.VODSTATE.INIT}},{key:"_adjustPartSize",value:function(Xe){return Xe.file.size/this.options.partSize>1e4?Xe.file.size/9999:this.options.partSize}}]),qe}());Se.default=Ze},function(Le,Se,je){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.UPLOADSTATE={INIT:"Ready",UPLOADING:"Uploading",SUCCESS:"Success",FAIlURE:"Failure",CANCELED:"Canceled",STOPED:"Stoped"},Se.VODSTATE={INIT:"Init",START:"Start",STOP:"Stop",FAILURE:"Failure",EXPIRE:"Expire",END:"End"}},function(Le,Se,je){"use strict";function Me(de){return de&&de.__esModule?de:{default:de}}function Ce(de,ge){if(!(de instanceof ge))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var xe=function(){function de(ge,fe){for(var ue=0;ue<fe.length;ue++){var ee=fe[ue];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(ge,ee.key,ee)}}return function(ge,fe,ue){return fe&&de(ge.prototype,fe),ue&&de(ge,ue),ge}}(),be=je(3),ye=je(17),we=(Me(ye),je(1)),pe=(Me(we),function(){function de(ge,fe){if(Ce(this,de),ge){this._config=ge,this.create(this._config),this._uploadInfo=null,this._callback={};var ue=function(){};this._callback.onerror=fe.onerror||ue,this._callback.oncomplete=fe.oncomplete||ue,this._callback.onprogress=fe.onprogress||ue}}return xe(de,[{key:"create",value:function(ge){if(ge.endpoint=ge.endpoint||this._config.endpoint,ge.bucket=ge.bucket||this._config.bucket,!(ge.AccessKeyId&&ge.AccessKeySecret&&ge.endpoint&&ge.SecurityToken))throw new Error("AccessKeyId\u3001AccessKeySecret\u3001endpoint should not be null");var fe={accessKeyId:ge.AccessKeyId,accessKeySecret:ge.AccessKeySecret,stsToken:ge.SecurityToken,endpoint:ge.endpoint||this._config.endpoint,bucket:ge.bucket||this._config.bucket,secure:!0,cname:ge.cname};ge.timeout&&(fe.timeout=ge.timeout),this.oss=new OSS.Wrapper(fe)}},{key:"abort",value:function(ge){if(ge.checkpoint){var fe=ge.checkpoint.uploadId;this.oss.abortMultipartUpload(ge.object,fe)}}},{key:"getVersion",value:function(){}},{key:"cancel",value:function(){this.oss.cancel&&this.oss.cancel()}},{key:"upload",value:function(ge,fe){this._uploadInfo=ge;var ue=this,ee=function(oe,re,ae){return function(le){ue._progress(oe,re,ae),le()}},z={parallel:fe.parallel||this._config.parallel||be.UPLOADDEFAULT.PARALLEL,partSize:fe.partSize||this._config.partSize||be.UPLOADDEFAULT.PARTSIZE,progress:ee};fe.headers&&(z.headers=fe.headers),ge.checkpoint&&(z.checkpoint=ge.checkpoint),ge.bucket||(this.oss.options.bucket=ge.bucket),ge.endpoint||(this.oss.options.endpoint=ge.endpoint),this.oss.multipartUpload(ge.object,ge.file,z).then(function(oe,re){ue._complete(oe)}).catch(function(oe){ue.oss.cancel&&(ue.oss&&ue.oss.isCancel()?console.log("oss is cancel as error"):ue.oss.cancel()),ue._error(oe)})}},{key:"header",value:function(ge,fe,ue){this.oss.get(ge.object).then(function(ee){fe(ee)}).catch(function(ee){ue(ee)})}},{key:"_progress",value:function(ge,fe,ue){this._callback.onprogress(this._uploadInfo,{loaded:ge,total:this._uploadInfo.file.size,checkpoint:fe},ue)}},{key:"_error",value:function(ge){this._callback.onerror(this._uploadInfo,ge)}},{key:"_complete",value:function(ge){this._callback.oncomplete(this._uploadInfo,ge)}}]),de}());Se.default=pe},function(Le,Se,je){"use strict";function Me(be,ye){if(!(be instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var Ce=function(){function be(ye,we){for(var pe=0;pe<we.length;pe++){var de=we[pe];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(ye,de.key,de)}}return function(ye,we,pe){return we&&be(ye.prototype,we),pe&&be(ye,pe),ye}}(),xe=function(){function be(){Me(this,be)}return Ce(be,null,[{key:"format",value:function(ye){if(arguments.length<2)return null;for(var we=arguments[1],pe=1;pe<arguments.length;pe++){var de=new RegExp("\\{"+(pe-1)+"\\}","gm");we=we.replace(de,arguments[pe+1])}return{code:ye,message:we}}},{key:"CODE",get:function(){return{SUCCESS:"Successful",EmptyValue:"InvalidParameter.EmptyValue",STSInvalid:"InvalidParameter.TokenInvalid",ReadFileError:"ReadFileError",FILEDUPLICATION:"FileDuplication",UploadALEADRYSTARTED:"UploadAlearyStarted"}}},{key:"MESSAGE",get:function(){return{SUCCESS:"Successful",EmptyValue:"\u53C2\u6570 {0} \u4E0D\u80FD\u4E3A\u7A7A\u3002",STSInvalid:"STS\u53C2\u6570\u975E\u6CD5\uFF0C accessKeyId\u3001accessKeySecret\u3001secretToken\u3001expireTime\u90FD\u4E0D\u80FD\u4E3A\u7A7A\u3002",ReadFileError:"\u8BFB\u53D6\u6587\u4EF6{0}{1}\u5931\u8D25.",FILEDUPLICATION:"\u6587\u4EF6\u91CD\u590D\u6DFB\u52A0 {0}",UploadALEADRYSTARTED:"\u91CD\u590D\u5F00\u59CB."}}}]),be}();Se.default=xe},function(Le,Se,je){"use strict";(function(Me){function Ce(ye,we){if(!(ye instanceof we))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var xe=function(){function ye(we,pe){for(var de=0;de<pe.length;de++){var ge=pe[de];ge.enumerable=ge.enumerable||!1,ge.configurable=!0,"value"in ge&&(ge.writable=!0),Object.defineProperty(we,ge.key,ge)}}return function(we,pe,de){return pe&&ye(we.prototype,pe),de&&ye(we,de),we}}(),be=function(){function ye(){Ce(this,ye)}return xe(ye,null,[{key:"encode",value:function(we){return new Me(we).toString("base64")}},{key:"decode",value:function(we){return new Me(we,"base64").toString()}}]),ye}();Se.default=be}).call(Se,je(19).Buffer)},function(Le,Se,je){"use strict";(function(Me){function Ce(){return be.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function xe(Ve,Re){if(Ce()<Re)throw new RangeError("Invalid typed array length");return be.TYPED_ARRAY_SUPPORT?(Ve=new Uint8Array(Re),Ve.__proto__=be.prototype):(Ve===null&&(Ve=new be(Re)),Ve.length=Re),Ve}function be(Ve,Re,ze){if(!(be.TYPED_ARRAY_SUPPORT||this instanceof be))return new be(Ve,Re,ze);if(typeof Ve=="number"){if(typeof Re=="string")throw new Error("If encoding is specified then the first argument must be a string");return de(this,Ve)}return ye(this,Ve,Re,ze)}function ye(Ve,Re,ze,it){if(typeof Re=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Re instanceof ArrayBuffer?ue(Ve,Re,ze,it):typeof Re=="string"?ge(Ve,Re,ze):ee(Ve,Re)}function we(Ve){if(typeof Ve!="number")throw new TypeError('"size" argument must be a number');if(Ve<0)throw new RangeError('"size" argument must not be negative')}function pe(Ve,Re,ze,it){return we(Re),Re<=0?xe(Ve,Re):ze!==void 0?typeof it=="string"?xe(Ve,Re).fill(ze,it):xe(Ve,Re).fill(ze):xe(Ve,Re)}function de(Ve,Re){if(we(Re),Ve=xe(Ve,Re<0?0:0|z(Re)),!be.TYPED_ARRAY_SUPPORT)for(var ze=0;ze<Re;++ze)Ve[ze]=0;return Ve}function ge(Ve,Re,ze){if(typeof ze=="string"&&ze!==""||(ze="utf8"),!be.isEncoding(ze))throw new TypeError('"encoding" must be a valid string encoding');var it=0|re(Re,ze);Ve=xe(Ve,it);var Ke=Ve.write(Re,ze);return Ke!==it&&(Ve=Ve.slice(0,Ke)),Ve}function fe(Ve,Re){var ze=Re.length<0?0:0|z(Re.length);Ve=xe(Ve,ze);for(var it=0;it<ze;it+=1)Ve[it]=255&Re[it];return Ve}function ue(Ve,Re,ze,it){if(Re.byteLength,ze<0||Re.byteLength<ze)throw new RangeError("'offset' is out of bounds");if(Re.byteLength<ze+(it||0))throw new RangeError("'length' is out of bounds");return Re=ze===void 0&&it===void 0?new Uint8Array(Re):it===void 0?new Uint8Array(Re,ze):new Uint8Array(Re,ze,it),be.TYPED_ARRAY_SUPPORT?(Ve=Re,Ve.__proto__=be.prototype):Ve=fe(Ve,Re),Ve}function ee(Ve,Re){if(be.isBuffer(Re)){var ze=0|z(Re.length);return Ve=xe(Ve,ze),Ve.length===0||Re.copy(Ve,0,0,ze),Ve}if(Re){if(typeof ArrayBuffer!="undefined"&&Re.buffer instanceof ArrayBuffer||"length"in Re)return typeof Re.length!="number"||lt(Re.length)?xe(Ve,0):fe(Ve,Re);if(Re.type==="Buffer"&&tt(Re.data))return fe(Ve,Re.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function z(Ve){if(Ve>=Ce())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ce().toString(16)+" bytes");return 0|Ve}function oe(Ve){return+Ve!=Ve&&(Ve=0),be.alloc(+Ve)}function re(Ve,Re){if(be.isBuffer(Ve))return Ve.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(Ve)||Ve instanceof ArrayBuffer))return Ve.byteLength;typeof Ve!="string"&&(Ve=""+Ve);var ze=Ve.length;if(ze===0)return 0;for(var it=!1;;)switch(Re){case"ascii":case"latin1":case"binary":return ze;case"utf8":case"utf-8":case void 0:return Ft(Ve).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*ze;case"hex":return ze>>>1;case"base64":return Yt(Ve).length;default:if(it)return Ft(Ve).length;Re=(""+Re).toLowerCase(),it=!0}}function ae(Ve,Re,ze){var it=!1;if((Re===void 0||Re<0)&&(Re=0),Re>this.length||((ze===void 0||ze>this.length)&&(ze=this.length),ze<=0)||(ze>>>=0,Re>>>=0,ze<=Re))return"";for(Ve||(Ve="utf8");;)switch(Ve){case"hex":return _t(this,Re,ze);case"utf8":case"utf-8":return mt(this,Re,ze);case"ascii":return Mt(this,Re,ze);case"latin1":case"binary":return at(this,Re,ze);case"base64":return Xe(this,Re,ze);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return dt(this,Re,ze);default:if(it)throw new TypeError("Unknown encoding: "+Ve);Ve=(Ve+"").toLowerCase(),it=!0}}function le(Ve,Re,ze){var it=Ve[Re];Ve[Re]=Ve[ze],Ve[ze]=it}function me(Ve,Re,ze,it,Ke){if(Ve.length===0)return-1;if(typeof ze=="string"?(it=ze,ze=0):ze>2147483647?ze=2147483647:ze<-2147483648&&(ze=-2147483648),ze=+ze,isNaN(ze)&&(ze=Ke?0:Ve.length-1),ze<0&&(ze=Ve.length+ze),ze>=Ve.length){if(Ke)return-1;ze=Ve.length-1}else if(ze<0){if(!Ke)return-1;ze=0}if(typeof Re=="string"&&(Re=be.from(Re,it)),be.isBuffer(Re))return Re.length===0?-1:ve(Ve,Re,ze,it,Ke);if(typeof Re=="number")return Re&=255,be.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Ke?Uint8Array.prototype.indexOf.call(Ve,Re,ze):Uint8Array.prototype.lastIndexOf.call(Ve,Re,ze):ve(Ve,[Re],ze,it,Ke);throw new TypeError("val must be string, number or Buffer")}function ve(Ve,Re,ze,it,Ke){function We(yn,un){return vt===1?yn[un]:yn.readUInt16BE(un*vt)}var vt=1,kt=Ve.length,hn=Re.length;if(it!==void 0&&((it=String(it).toLowerCase())==="ucs2"||it==="ucs-2"||it==="utf16le"||it==="utf-16le")){if(Ve.length<2||Re.length<2)return-1;vt=2,kt/=2,hn/=2,ze/=2}var en;if(Ke){var Gt=-1;for(en=ze;en<kt;en++)if(We(Ve,en)===We(Re,Gt===-1?0:en-Gt)){if(Gt===-1&&(Gt=en),en-Gt+1===hn)return Gt*vt}else Gt!==-1&&(en-=en-Gt),Gt=-1}else for(ze+hn>kt&&(ze=kt-hn),en=ze;en>=0;en--){for(var gn=!0,bn=0;bn<hn;bn++)if(We(Ve,en+bn)!==We(Re,bn)){gn=!1;break}if(gn)return en}return-1}function Pe(Ve,Re,ze,it){ze=Number(ze)||0;var Ke=Ve.length-ze;it?(it=Number(it))>Ke&&(it=Ke):it=Ke;var We=Re.length;if(We%2!=0)throw new TypeError("Invalid hex string");it>We/2&&(it=We/2);for(var vt=0;vt<it;++vt){var kt=parseInt(Re.substr(2*vt,2),16);if(isNaN(kt))return vt;Ve[ze+vt]=kt}return vt}function Ae(Ve,Re,ze,it){return Jt(Ft(Re,Ve.length-ze),Ve,ze,it)}function De(Ve,Re,ze,it){return Jt(Dt(Re),Ve,ze,it)}function Oe(Ve,Re,ze,it){return De(Ve,Re,ze,it)}function Ze(Ve,Re,ze,it){return Jt(Yt(Re),Ve,ze,it)}function qe(Ve,Re,ze,it){return Jt(Qt(Re,Ve.length-ze),Ve,ze,it)}function Xe(Ve,Re,ze){return Re===0&&ze===Ve.length?Ue.fromByteArray(Ve):Ue.fromByteArray(Ve.slice(Re,ze))}function mt(Ve,Re,ze){ze=Math.min(Ve.length,ze);for(var it=[],Ke=Re;Ke<ze;){var We=Ve[Ke],vt=null,kt=We>239?4:We>223?3:We>191?2:1;if(Ke+kt<=ze){var hn,en,Gt,gn;switch(kt){case 1:We<128&&(vt=We);break;case 2:hn=Ve[Ke+1],(192&hn)==128&&(gn=(31&We)<<6|63&hn)>127&&(vt=gn);break;case 3:hn=Ve[Ke+1],en=Ve[Ke+2],(192&hn)==128&&(192&en)==128&&(gn=(15&We)<<12|(63&hn)<<6|63&en)>2047&&(gn<55296||gn>57343)&&(vt=gn);break;case 4:hn=Ve[Ke+1],en=Ve[Ke+2],Gt=Ve[Ke+3],(192&hn)==128&&(192&en)==128&&(192&Gt)==128&&(gn=(15&We)<<18|(63&hn)<<12|(63&en)<<6|63&Gt)>65535&&gn<1114112&&(vt=gn)}}vt===null?(vt=65533,kt=1):vt>65535&&(vt-=65536,it.push(vt>>>10&1023|55296),vt=56320|1023&vt),it.push(vt),Ke+=kt}return pt(it)}function pt(Ve){var Re=Ve.length;if(Re<=ht)return String.fromCharCode.apply(String,Ve);for(var ze="",it=0;it<Re;)ze+=String.fromCharCode.apply(String,Ve.slice(it,it+=ht));return ze}function Mt(Ve,Re,ze){var it="";ze=Math.min(Ve.length,ze);for(var Ke=Re;Ke<ze;++Ke)it+=String.fromCharCode(127&Ve[Ke]);return it}function at(Ve,Re,ze){var it="";ze=Math.min(Ve.length,ze);for(var Ke=Re;Ke<ze;++Ke)it+=String.fromCharCode(Ve[Ke]);return it}function _t(Ve,Re,ze){var it=Ve.length;(!Re||Re<0)&&(Re=0),(!ze||ze<0||ze>it)&&(ze=it);for(var Ke="",We=Re;We<ze;++We)Ke+=dn(Ve[We]);return Ke}function dt(Ve,Re,ze){for(var it=Ve.slice(Re,ze),Ke="",We=0;We<it.length;We+=2)Ke+=String.fromCharCode(it[We]+256*it[We+1]);return Ke}function Rt(Ve,Re,ze){if(Ve%1!=0||Ve<0)throw new RangeError("offset is not uint");if(Ve+Re>ze)throw new RangeError("Trying to access beyond buffer length")}function ut(Ve,Re,ze,it,Ke,We){if(!be.isBuffer(Ve))throw new TypeError('"buffer" argument must be a Buffer instance');if(Re>Ke||Re<We)throw new RangeError('"value" argument is out of bounds');if(ze+it>Ve.length)throw new RangeError("Index out of range")}function rt(Ve,Re,ze,it){Re<0&&(Re=65535+Re+1);for(var Ke=0,We=Math.min(Ve.length-ze,2);Ke<We;++Ke)Ve[ze+Ke]=(Re&255<<8*(it?Ke:1-Ke))>>>8*(it?Ke:1-Ke)}function ct(Ve,Re,ze,it){Re<0&&(Re=4294967295+Re+1);for(var Ke=0,We=Math.min(Ve.length-ze,4);Ke<We;++Ke)Ve[ze+Ke]=Re>>>8*(it?Ke:3-Ke)&255}function yt(Ve,Re,ze,it,Ke,We){if(ze+it>Ve.length)throw new RangeError("Index out of range");if(ze<0)throw new RangeError("Index out of range")}function wt(Ve,Re,ze,it,Ke){return Ke||yt(Ve,Re,ze,4,34028234663852886e22,-34028234663852886e22),Be.write(Ve,Re,ze,it,23,4),ze+4}function xt(Ve,Re,ze,it,Ke){return Ke||yt(Ve,Re,ze,8,17976931348623157e292,-17976931348623157e292),Be.write(Ve,Re,ze,it,52,8),ze+8}function Ut(Ve){if(Ve=zt(Ve).replace(et,""),Ve.length<2)return"";for(;Ve.length%4!=0;)Ve+="=";return Ve}function zt(Ve){return Ve.trim?Ve.trim():Ve.replace(/^\s+|\s+$/g,"")}function dn(Ve){return Ve<16?"0"+Ve.toString(16):Ve.toString(16)}function Ft(Ve,Re){Re=Re||1/0;for(var ze,it=Ve.length,Ke=null,We=[],vt=0;vt<it;++vt){if((ze=Ve.charCodeAt(vt))>55295&&ze<57344){if(!Ke){if(ze>56319){(Re-=3)>-1&&We.push(239,191,189);continue}if(vt+1===it){(Re-=3)>-1&&We.push(239,191,189);continue}Ke=ze;continue}if(ze<56320){(Re-=3)>-1&&We.push(239,191,189),Ke=ze;continue}ze=65536+(Ke-55296<<10|ze-56320)}else Ke&&(Re-=3)>-1&&We.push(239,191,189);if(Ke=null,ze<128){if((Re-=1)<0)break;We.push(ze)}else if(ze<2048){if((Re-=2)<0)break;We.push(ze>>6|192,63&ze|128)}else if(ze<65536){if((Re-=3)<0)break;We.push(ze>>12|224,ze>>6&63|128,63&ze|128)}else{if(!(ze<1114112))throw new Error("Invalid code point");if((Re-=4)<0)break;We.push(ze>>18|240,ze>>12&63|128,ze>>6&63|128,63&ze|128)}}return We}function Dt(Ve){for(var Re=[],ze=0;ze<Ve.length;++ze)Re.push(255&Ve.charCodeAt(ze));return Re}function Qt(Ve,Re){for(var ze,it,Ke,We=[],vt=0;vt<Ve.length&&!((Re-=2)<0);++vt)ze=Ve.charCodeAt(vt),it=ze>>8,Ke=ze%256,We.push(Ke),We.push(it);return We}function Yt(Ve){return Ue.toByteArray(Ut(Ve))}function Jt(Ve,Re,ze,it){for(var Ke=0;Ke<it&&!(Ke+ze>=Re.length||Ke>=Ve.length);++Ke)Re[Ke+ze]=Ve[Ke];return Ke}function lt(Ve){return Ve!==Ve}var Ue=je(21),Be=je(22),tt=je(23);Se.Buffer=be,Se.SlowBuffer=oe,Se.INSPECT_MAX_BYTES=50,be.TYPED_ARRAY_SUPPORT=Me.TYPED_ARRAY_SUPPORT!==void 0?Me.TYPED_ARRAY_SUPPORT:function(){try{var Ve=new Uint8Array(1);return Ve.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},Ve.foo()===42&&typeof Ve.subarray=="function"&&Ve.subarray(1,1).byteLength===0}catch(Re){return!1}}(),Se.kMaxLength=Ce(),be.poolSize=8192,be._augment=function(Ve){return Ve.__proto__=be.prototype,Ve},be.from=function(Ve,Re,ze){return ye(null,Ve,Re,ze)},be.TYPED_ARRAY_SUPPORT&&(be.prototype.__proto__=Uint8Array.prototype,be.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&be[Symbol.species]===be&&Object.defineProperty(be,Symbol.species,{value:null,configurable:!0})),be.alloc=function(Ve,Re,ze){return pe(null,Ve,Re,ze)},be.allocUnsafe=function(Ve){return de(null,Ve)},be.allocUnsafeSlow=function(Ve){return de(null,Ve)},be.isBuffer=function(Ve){return!(Ve==null||!Ve._isBuffer)},be.compare=function(Ve,Re){if(!be.isBuffer(Ve)||!be.isBuffer(Re))throw new TypeError("Arguments must be Buffers");if(Ve===Re)return 0;for(var ze=Ve.length,it=Re.length,Ke=0,We=Math.min(ze,it);Ke<We;++Ke)if(Ve[Ke]!==Re[Ke]){ze=Ve[Ke],it=Re[Ke];break}return ze<it?-1:it<ze?1:0},be.isEncoding=function(Ve){switch(String(Ve).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},be.concat=function(Ve,Re){if(!tt(Ve))throw new TypeError('"list" argument must be an Array of Buffers');if(Ve.length===0)return be.alloc(0);var ze;if(Re===void 0)for(Re=0,ze=0;ze<Ve.length;++ze)Re+=Ve[ze].length;var it=be.allocUnsafe(Re),Ke=0;for(ze=0;ze<Ve.length;++ze){var We=Ve[ze];if(!be.isBuffer(We))throw new TypeError('"list" argument must be an Array of Buffers');We.copy(it,Ke),Ke+=We.length}return it},be.byteLength=re,be.prototype._isBuffer=!0,be.prototype.swap16=function(){var Ve=this.length;if(Ve%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Re=0;Re<Ve;Re+=2)le(this,Re,Re+1);return this},be.prototype.swap32=function(){var Ve=this.length;if(Ve%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Re=0;Re<Ve;Re+=4)le(this,Re,Re+3),le(this,Re+1,Re+2);return this},be.prototype.swap64=function(){var Ve=this.length;if(Ve%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Re=0;Re<Ve;Re+=8)le(this,Re,Re+7),le(this,Re+1,Re+6),le(this,Re+2,Re+5),le(this,Re+3,Re+4);return this},be.prototype.toString=function(){var Ve=0|this.length;return Ve===0?"":arguments.length===0?mt(this,0,Ve):ae.apply(this,arguments)},be.prototype.equals=function(Ve){if(!be.isBuffer(Ve))throw new TypeError("Argument must be a Buffer");return this===Ve||be.compare(this,Ve)===0},be.prototype.inspect=function(){var Ve="",Re=Se.INSPECT_MAX_BYTES;return this.length>0&&(Ve=this.toString("hex",0,Re).match(/.{2}/g).join(" "),this.length>Re&&(Ve+=" ... ")),"<Buffer "+Ve+">"},be.prototype.compare=function(Ve,Re,ze,it,Ke){if(!be.isBuffer(Ve))throw new TypeError("Argument must be a Buffer");if(Re===void 0&&(Re=0),ze===void 0&&(ze=Ve?Ve.length:0),it===void 0&&(it=0),Ke===void 0&&(Ke=this.length),Re<0||ze>Ve.length||it<0||Ke>this.length)throw new RangeError("out of range index");if(it>=Ke&&Re>=ze)return 0;if(it>=Ke)return-1;if(Re>=ze)return 1;if(Re>>>=0,ze>>>=0,it>>>=0,Ke>>>=0,this===Ve)return 0;for(var We=Ke-it,vt=ze-Re,kt=Math.min(We,vt),hn=this.slice(it,Ke),en=Ve.slice(Re,ze),Gt=0;Gt<kt;++Gt)if(hn[Gt]!==en[Gt]){We=hn[Gt],vt=en[Gt];break}return We<vt?-1:vt<We?1:0},be.prototype.includes=function(Ve,Re,ze){return this.indexOf(Ve,Re,ze)!==-1},be.prototype.indexOf=function(Ve,Re,ze){return me(this,Ve,Re,ze,!0)},be.prototype.lastIndexOf=function(Ve,Re,ze){return me(this,Ve,Re,ze,!1)},be.prototype.write=function(Ve,Re,ze,it){if(Re===void 0)it="utf8",ze=this.length,Re=0;else if(ze===void 0&&typeof Re=="string")it=Re,ze=this.length,Re=0;else{if(!isFinite(Re))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");Re|=0,isFinite(ze)?(ze|=0,it===void 0&&(it="utf8")):(it=ze,ze=void 0)}var Ke=this.length-Re;if((ze===void 0||ze>Ke)&&(ze=Ke),Ve.length>0&&(ze<0||Re<0)||Re>this.length)throw new RangeError("Attempt to write outside buffer bounds");it||(it="utf8");for(var We=!1;;)switch(it){case"hex":return Pe(this,Ve,Re,ze);case"utf8":case"utf-8":return Ae(this,Ve,Re,ze);case"ascii":return De(this,Ve,Re,ze);case"latin1":case"binary":return Oe(this,Ve,Re,ze);case"base64":return Ze(this,Ve,Re,ze);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qe(this,Ve,Re,ze);default:if(We)throw new TypeError("Unknown encoding: "+it);it=(""+it).toLowerCase(),We=!0}},be.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ht=4096;be.prototype.slice=function(Ve,Re){var ze=this.length;Ve=~~Ve,Re=Re===void 0?ze:~~Re,Ve<0?(Ve+=ze)<0&&(Ve=0):Ve>ze&&(Ve=ze),Re<0?(Re+=ze)<0&&(Re=0):Re>ze&&(Re=ze),Re<Ve&&(Re=Ve);var it;if(be.TYPED_ARRAY_SUPPORT)it=this.subarray(Ve,Re),it.__proto__=be.prototype;else{var Ke=Re-Ve;it=new be(Ke,void 0);for(var We=0;We<Ke;++We)it[We]=this[We+Ve]}return it},be.prototype.readUIntLE=function(Ve,Re,ze){Ve|=0,Re|=0,ze||Rt(Ve,Re,this.length);for(var it=this[Ve],Ke=1,We=0;++We<Re&&(Ke*=256);)it+=this[Ve+We]*Ke;return it},be.prototype.readUIntBE=function(Ve,Re,ze){Ve|=0,Re|=0,ze||Rt(Ve,Re,this.length);for(var it=this[Ve+--Re],Ke=1;Re>0&&(Ke*=256);)it+=this[Ve+--Re]*Ke;return it},be.prototype.readUInt8=function(Ve,Re){return Re||Rt(Ve,1,this.length),this[Ve]},be.prototype.readUInt16LE=function(Ve,Re){return Re||Rt(Ve,2,this.length),this[Ve]|this[Ve+1]<<8},be.prototype.readUInt16BE=function(Ve,Re){return Re||Rt(Ve,2,this.length),this[Ve]<<8|this[Ve+1]},be.prototype.readUInt32LE=function(Ve,Re){return Re||Rt(Ve,4,this.length),(this[Ve]|this[Ve+1]<<8|this[Ve+2]<<16)+16777216*this[Ve+3]},be.prototype.readUInt32BE=function(Ve,Re){return Re||Rt(Ve,4,this.length),16777216*this[Ve]+(this[Ve+1]<<16|this[Ve+2]<<8|this[Ve+3])},be.prototype.readIntLE=function(Ve,Re,ze){Ve|=0,Re|=0,ze||Rt(Ve,Re,this.length);for(var it=this[Ve],Ke=1,We=0;++We<Re&&(Ke*=256);)it+=this[Ve+We]*Ke;return Ke*=128,it>=Ke&&(it-=Math.pow(2,8*Re)),it},be.prototype.readIntBE=function(Ve,Re,ze){Ve|=0,Re|=0,ze||Rt(Ve,Re,this.length);for(var it=Re,Ke=1,We=this[Ve+--it];it>0&&(Ke*=256);)We+=this[Ve+--it]*Ke;return Ke*=128,We>=Ke&&(We-=Math.pow(2,8*Re)),We},be.prototype.readInt8=function(Ve,Re){return Re||Rt(Ve,1,this.length),128&this[Ve]?-1*(255-this[Ve]+1):this[Ve]},be.prototype.readInt16LE=function(Ve,Re){Re||Rt(Ve,2,this.length);var ze=this[Ve]|this[Ve+1]<<8;return 32768&ze?4294901760|ze:ze},be.prototype.readInt16BE=function(Ve,Re){Re||Rt(Ve,2,this.length);var ze=this[Ve+1]|this[Ve]<<8;return 32768&ze?4294901760|ze:ze},be.prototype.readInt32LE=function(Ve,Re){return Re||Rt(Ve,4,this.length),this[Ve]|this[Ve+1]<<8|this[Ve+2]<<16|this[Ve+3]<<24},be.prototype.readInt32BE=function(Ve,Re){return Re||Rt(Ve,4,this.length),this[Ve]<<24|this[Ve+1]<<16|this[Ve+2]<<8|this[Ve+3]},be.prototype.readFloatLE=function(Ve,Re){return Re||Rt(Ve,4,this.length),Be.read(this,Ve,!0,23,4)},be.prototype.readFloatBE=function(Ve,Re){return Re||Rt(Ve,4,this.length),Be.read(this,Ve,!1,23,4)},be.prototype.readDoubleLE=function(Ve,Re){return Re||Rt(Ve,8,this.length),Be.read(this,Ve,!0,52,8)},be.prototype.readDoubleBE=function(Ve,Re){return Re||Rt(Ve,8,this.length),Be.read(this,Ve,!1,52,8)},be.prototype.writeUIntLE=function(Ve,Re,ze,it){Ve=+Ve,Re|=0,ze|=0,!it&&ut(this,Ve,Re,ze,Math.pow(2,8*ze)-1,0);var Ke=1,We=0;for(this[Re]=255&Ve;++We<ze&&(Ke*=256);)this[Re+We]=Ve/Ke&255;return Re+ze},be.prototype.writeUIntBE=function(Ve,Re,ze,it){Ve=+Ve,Re|=0,ze|=0,!it&&ut(this,Ve,Re,ze,Math.pow(2,8*ze)-1,0);var Ke=ze-1,We=1;for(this[Re+Ke]=255&Ve;--Ke>=0&&(We*=256);)this[Re+Ke]=Ve/We&255;return Re+ze},be.prototype.writeUInt8=function(Ve,Re,ze){return Ve=+Ve,Re|=0,ze||ut(this,Ve,Re,1,255,0),be.TYPED_ARRAY_SUPPORT||(Ve=Math.floor(Ve)),this[Re]=255&Ve,Re+1},be.prototype.writeUInt16LE=function(Ve,Re,ze){return Ve=+Ve,Re|=0,ze||ut(this,Ve,Re,2,65535,0),be.TYPED_ARRAY_SUPPORT?(this[Re]=255&Ve,this[Re+1]=Ve>>>8):rt(this,Ve,Re,!0),Re+2},be.prototype.writeUInt16BE=function(Ve,Re,ze){return Ve=+Ve,Re|=0,ze||ut(this,Ve,Re,2,65535,0),be.TYPED_ARRAY_SUPPORT?(this[Re]=Ve>>>8,this[Re+1]=255&Ve):rt(this,Ve,Re,!1),Re+2},be.prototype.writeUInt32LE=function(Ve,Re,ze){return Ve=+Ve,Re|=0,ze||ut(this,Ve,Re,4,4294967295,0),be.TYPED_ARRAY_SUPPORT?(this[Re+3]=Ve>>>24,this[Re+2]=Ve>>>16,this[Re+1]=Ve>>>8,this[Re]=255&Ve):ct(this,Ve,Re,!0),Re+4},be.prototype.writeUInt32BE=function(Ve,Re,ze){return Ve=+Ve,Re|=0,ze||ut(this,Ve,Re,4,4294967295,0),be.TYPED_ARRAY_SUPPORT?(this[Re]=Ve>>>24,this[Re+1]=Ve>>>16,this[Re+2]=Ve>>>8,this[Re+3]=255&Ve):ct(this,Ve,Re,!1),Re+4},be.prototype.writeIntLE=function(Ve,Re,ze,it){if(Ve=+Ve,Re|=0,!it){var Ke=Math.pow(2,8*ze-1);ut(this,Ve,Re,ze,Ke-1,-Ke)}var We=0,vt=1,kt=0;for(this[Re]=255&Ve;++We<ze&&(vt*=256);)Ve<0&&kt===0&&this[Re+We-1]!==0&&(kt=1),this[Re+We]=(Ve/vt>>0)-kt&255;return Re+ze},be.prototype.writeIntBE=function(Ve,Re,ze,it){if(Ve=+Ve,Re|=0,!it){var Ke=Math.pow(2,8*ze-1);ut(this,Ve,Re,ze,Ke-1,-Ke)}var We=ze-1,vt=1,kt=0;for(this[Re+We]=255&Ve;--We>=0&&(vt*=256);)Ve<0&&kt===0&&this[Re+We+1]!==0&&(kt=1),this[Re+We]=(Ve/vt>>0)-kt&255;return Re+ze},be.prototype.writeInt8=function(Ve,Re,ze){return Ve=+Ve,Re|=0,ze||ut(this,Ve,Re,1,127,-128),be.TYPED_ARRAY_SUPPORT||(Ve=Math.floor(Ve)),Ve<0&&(Ve=255+Ve+1),this[Re]=255&Ve,Re+1},be.prototype.writeInt16LE=function(Ve,Re,ze){return Ve=+Ve,Re|=0,ze||ut(this,Ve,Re,2,32767,-32768),be.TYPED_ARRAY_SUPPORT?(this[Re]=255&Ve,this[Re+1]=Ve>>>8):rt(this,Ve,Re,!0),Re+2},be.prototype.writeInt16BE=function(Ve,Re,ze){return Ve=+Ve,Re|=0,ze||ut(this,Ve,Re,2,32767,-32768),be.TYPED_ARRAY_SUPPORT?(this[Re]=Ve>>>8,this[Re+1]=255&Ve):rt(this,Ve,Re,!1),Re+2},be.prototype.writeInt32LE=function(Ve,Re,ze){return Ve=+Ve,Re|=0,ze||ut(this,Ve,Re,4,2147483647,-2147483648),be.TYPED_ARRAY_SUPPORT?(this[Re]=255&Ve,this[Re+1]=Ve>>>8,this[Re+2]=Ve>>>16,this[Re+3]=Ve>>>24):ct(this,Ve,Re,!0),Re+4},be.prototype.writeInt32BE=function(Ve,Re,ze){return Ve=+Ve,Re|=0,ze||ut(this,Ve,Re,4,2147483647,-2147483648),Ve<0&&(Ve=4294967295+Ve+1),be.TYPED_ARRAY_SUPPORT?(this[Re]=Ve>>>24,this[Re+1]=Ve>>>16,this[Re+2]=Ve>>>8,this[Re+3]=255&Ve):ct(this,Ve,Re,!1),Re+4},be.prototype.writeFloatLE=function(Ve,Re,ze){return wt(this,Ve,Re,!0,ze)},be.prototype.writeFloatBE=function(Ve,Re,ze){return wt(this,Ve,Re,!1,ze)},be.prototype.writeDoubleLE=function(Ve,Re,ze){return xt(this,Ve,Re,!0,ze)},be.prototype.writeDoubleBE=function(Ve,Re,ze){return xt(this,Ve,Re,!1,ze)},be.prototype.copy=function(Ve,Re,ze,it){if(ze||(ze=0),it||it===0||(it=this.length),Re>=Ve.length&&(Re=Ve.length),Re||(Re=0),it>0&&it<ze&&(it=ze),it===ze||Ve.length===0||this.length===0)return 0;if(Re<0)throw new RangeError("targetStart out of bounds");if(ze<0||ze>=this.length)throw new RangeError("sourceStart out of bounds");if(it<0)throw new RangeError("sourceEnd out of bounds");it>this.length&&(it=this.length),Ve.length-Re<it-ze&&(it=Ve.length-Re+ze);var Ke,We=it-ze;if(this===Ve&&ze<Re&&Re<it)for(Ke=We-1;Ke>=0;--Ke)Ve[Ke+Re]=this[Ke+ze];else if(We<1e3||!be.TYPED_ARRAY_SUPPORT)for(Ke=0;Ke<We;++Ke)Ve[Ke+Re]=this[Ke+ze];else Uint8Array.prototype.set.call(Ve,this.subarray(ze,ze+We),Re);return We},be.prototype.fill=function(Ve,Re,ze,it){if(typeof Ve=="string"){if(typeof Re=="string"?(it=Re,Re=0,ze=this.length):typeof ze=="string"&&(it=ze,ze=this.length),Ve.length===1){var Ke=Ve.charCodeAt(0);Ke<256&&(Ve=Ke)}if(it!==void 0&&typeof it!="string")throw new TypeError("encoding must be a string");if(typeof it=="string"&&!be.isEncoding(it))throw new TypeError("Unknown encoding: "+it)}else typeof Ve=="number"&&(Ve&=255);if(Re<0||this.length<Re||this.length<ze)throw new RangeError("Out of range index");if(ze<=Re)return this;Re>>>=0,ze=ze===void 0?this.length:ze>>>0,Ve||(Ve=0);var We;if(typeof Ve=="number")for(We=Re;We<ze;++We)this[We]=Ve;else{var vt=be.isBuffer(Ve)?Ve:Ft(new be(Ve,it).toString()),kt=vt.length;for(We=0;We<ze-Re;++We)this[We+Re]=vt[We%kt]}return this};var et=/[^+\/0-9A-Za-z-_]/g}).call(Se,je(20))},function(Le,Se){var je;je=function(){return this}();try{je=je||Function("return this")()||(0,eval)("this")}catch(Me){typeof window=="object"&&(je=window)}Le.exports=je},function(Le,Se,je){"use strict";function Me(z){var oe=z.length;if(oe%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return z[oe-2]==="="?2:z[oe-1]==="="?1:0}function Ce(z){return 3*z.length/4-Me(z)}function xe(z){var oe,re,ae,le,me,ve=z.length;le=Me(z),me=new ge(3*ve/4-le),re=le>0?ve-4:ve;var Pe=0;for(oe=0;oe<re;oe+=4)ae=de[z.charCodeAt(oe)]<<18|de[z.charCodeAt(oe+1)]<<12|de[z.charCodeAt(oe+2)]<<6|de[z.charCodeAt(oe+3)],me[Pe++]=ae>>16&255,me[Pe++]=ae>>8&255,me[Pe++]=255&ae;return le===2?(ae=de[z.charCodeAt(oe)]<<2|de[z.charCodeAt(oe+1)]>>4,me[Pe++]=255&ae):le===1&&(ae=de[z.charCodeAt(oe)]<<10|de[z.charCodeAt(oe+1)]<<4|de[z.charCodeAt(oe+2)]>>2,me[Pe++]=ae>>8&255,me[Pe++]=255&ae),me}function be(z){return pe[z>>18&63]+pe[z>>12&63]+pe[z>>6&63]+pe[63&z]}function ye(z,oe,re){for(var ae,le=[],me=oe;me<re;me+=3)ae=(z[me]<<16)+(z[me+1]<<8)+z[me+2],le.push(be(ae));return le.join("")}function we(z){for(var oe,re=z.length,ae=re%3,le="",me=[],ve=0,Pe=re-ae;ve<Pe;ve+=16383)me.push(ye(z,ve,ve+16383>Pe?Pe:ve+16383));return ae===1?(oe=z[re-1],le+=pe[oe>>2],le+=pe[oe<<4&63],le+="=="):ae===2&&(oe=(z[re-2]<<8)+z[re-1],le+=pe[oe>>10],le+=pe[oe>>4&63],le+=pe[oe<<2&63],le+="="),me.push(le),me.join("")}Se.byteLength=Ce,Se.toByteArray=xe,Se.fromByteArray=we;for(var pe=[],de=[],ge=typeof Uint8Array!="undefined"?Uint8Array:Array,fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ue=0,ee=fe.length;ue<ee;++ue)pe[ue]=fe[ue],de[fe.charCodeAt(ue)]=ue;de[45]=62,de[95]=63},function(Le,Se){Se.read=function(je,Me,Ce,xe,be){var ye,we,pe=8*be-xe-1,de=(1<<pe)-1,ge=de>>1,fe=-7,ue=Ce?be-1:0,ee=Ce?-1:1,z=je[Me+ue];for(ue+=ee,ye=z&(1<<-fe)-1,z>>=-fe,fe+=pe;fe>0;ye=256*ye+je[Me+ue],ue+=ee,fe-=8);for(we=ye&(1<<-fe)-1,ye>>=-fe,fe+=xe;fe>0;we=256*we+je[Me+ue],ue+=ee,fe-=8);if(ye===0)ye=1-ge;else{if(ye===de)return we?NaN:1/0*(z?-1:1);we+=Math.pow(2,xe),ye-=ge}return(z?-1:1)*we*Math.pow(2,ye-xe)},Se.write=function(je,Me,Ce,xe,be,ye){var we,pe,de,ge=8*ye-be-1,fe=(1<<ge)-1,ue=fe>>1,ee=be===23?Math.pow(2,-24)-Math.pow(2,-77):0,z=xe?0:ye-1,oe=xe?1:-1,re=Me<0||Me===0&&1/Me<0?1:0;for(Me=Math.abs(Me),isNaN(Me)||Me===1/0?(pe=isNaN(Me)?1:0,we=fe):(we=Math.floor(Math.log(Me)/Math.LN2),Me*(de=Math.pow(2,-we))<1&&(we--,de*=2),Me+=we+ue>=1?ee/de:ee*Math.pow(2,1-ue),Me*de>=2&&(we++,de/=2),we+ue>=fe?(pe=0,we=fe):we+ue>=1?(pe=(Me*de-1)*Math.pow(2,be),we+=ue):(pe=Me*Math.pow(2,ue-1)*Math.pow(2,be),we=0));be>=8;je[Ce+z]=255&pe,z+=oe,pe/=256,be-=8);for(we=we<<be|pe,ge+=be;ge>0;je[Ce+z]=255&we,z+=oe,we/=256,ge-=8);je[Ce+z-oe]|=128*re}},function(Le,Se){var je={}.toString;Le.exports=Array.isArray||function(Me){return je.call(Me)=="[object Array]"}},function(Le,Se,je){"use strict";function Me(be,ye){if(!(be instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var Ce=function(){function be(ye,we){for(var pe=0;pe<we.length;pe++){var de=we[pe];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(ye,de.key,de)}}return function(ye,we,pe){return we&&be(ye.prototype,we),pe&&be(ye,pe),ye}}(),xe=function(){function be(){Me(this,be)}return Ce(be,null,[{key:"set",value:function(ye,we){try{window.localStorage&&localStorage.setItem(ye,we)}catch(pe){window[ye+"_localStorage"]=we}}},{key:"get",value:function(ye){try{if(window.localStorage)return localStorage.getItem(ye)}catch(we){return window[ye+"_localStorage"]}return""}},{key:"remove",value:function(ye){try{window.localStorage&&localStorage.removeItem(ye)}catch(we){delete window[ye+"_localStorage"]}}}]),be}();Se.default=xe},function(Le,Se,je){"use strict";function Me(be,ye){if(!(be instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var Ce=function(){function be(ye,we){for(var pe=0;pe<we.length;pe++){var de=we[pe];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(ye,de.key,de)}}return function(ye,we,pe){return we&&be(ye.prototype,we),pe&&be(ye,pe),ye}}(),xe=function(){function be(){Me(this,be)}return Ce(be,null,[{key:"get",value:function(ye){for(var we=ye+"",pe=document.cookie.split(";"),de=0;de<pe.length;de++){var ge=pe[de].trim();if(ge.indexOf(we)==0)return unescape(ge.substring(we.length+1,ge.length))}return""}},{key:"set",value:function(ye,we,pe){var de=new Date;de.setTime(de.getTime()+24*pe*60*60*1e3);var ge="expires="+de.toGMTString();document.cookie=ye+"="+escape(we)+"; "+ge}}]),be}();Se.default=xe},function(Le,Se,je){"use strict";function Me(ge){return ge&&ge.__esModule?ge:{default:ge}}function Ce(ge,fe){if(!(ge instanceof fe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var xe=function(){function ge(fe,ue){for(var ee=0;ee<ue.length;ee++){var z=ue[ee];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(fe,z.key,z)}}return function(fe,ue,ee){return ue&&ge(fe.prototype,ue),ee&&ge(fe,ee),fe}}(),be=je(8),ye=Me(be),we=je(9),pe=Me(we),de=function(){function ge(){Ce(this,ge)}return xe(ge,null,[{key:"refreshUploadAuth",value:function(fe,ue,ee){var z=(pe.default.randomUUID(),pe.default.randomUUID()),oe={AccessKeyId:fe.accessKeyId,SecurityToken:fe.securityToken,Action:"RefreshUploadVideo",VideoId:fe.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:z,RequestId:fe.requestId},re=pe.default.makeUTF8sort(oe,"=","&")+"&Signature="+pe.default.aliyunEncodeURI(pe.default.makeChangeSiga(oe,fe.accessKeySecret)),ae="https://vod."+fe.region+".aliyuncs.com/?"+re;ye.default.get(ae,function(me){var me=JSON.parse(me);ue&&ue(me)},function(le){if(ee){var me=JSON.parse(le);ee(me)}})}},{key:"getUploadAuth",value:function(fe,ue,ee){var z=(pe.default.randomUUID(),pe.default.randomUUID()),oe={AccessKeyId:fe.accessKeyId,SecurityToken:fe.securityToken,Action:"CreateUploadVideo",Title:fe.title,FileName:fe.fileName,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:z,RequestId:fe.requestId};fe.fileSize&&(oe.FileSize=fe.fileSize),fe.description&&(oe.Description=fe.description),fe.cateId&&(oe.CateId=fe.cateId),fe.tags&&(oe.Tags=fe.tags),fe.templateGroupId&&(oe.TemplateGroupId=fe.templateGroupId),fe.storageLocation&&(oe.StorageLocation=fe.storageLocation),fe.coverUrl&&(oe.CoverURL=fe.coverUrl),fe.transCodeMode&&(oe.TransCodeMode=fe.transCodeMode),fe.userData&&(oe.UserData=JSON.stringify(fe.userData));var re=pe.default.makeUTF8sort(oe,"=","&")+"&Signature="+pe.default.aliyunEncodeURI(pe.default.makeChangeSiga(oe,fe.accessKeySecret)),ae="https://vod."+fe.region+".aliyuncs.com/?"+re;ye.default.get(ae,function(le){try{le=JSON.parse(le)}catch(me){if(ee)return void ee({Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"})}ue&&ue(le)},function(le){if(ee){var me={Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"};try{me=JSON.parse(le)}catch(ve){}ee(me)}})}},{key:"getImageUploadAuth",value:function(fe,ue,ee){var z=(pe.default.randomUUID(),pe.default.randomUUID()),oe={AccessKeyId:fe.accessKeyId,SecurityToken:fe.securityToken,Action:"CreateUploadImage",ImageType:fe.imageType?fe.imageType:"default",Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:z,RequestId:fe.requestId};fe.title&&(oe.Title=fe.title),fe.imageExt&&(oe.ImageExt=fe.imageExt),fe.tags&&(oe.Tags=fe.tags),fe.storageLocation&&(oe.StorageLocation=fe.storageLocation);var re=pe.default.makeUTF8sort(oe,"=","&")+"&Signature="+pe.default.aliyunEncodeURI(pe.default.makeChangeSiga(oe,fe.accessKeySecret)),ae="https://vod."+fe.region+".aliyuncs.com/?"+re;ye.default.get(ae,function(le){le=JSON.parse(le),ue&&ue(le)},function(le){if(ee){var me=JSON.parse(le);ee(me)}})}}]),ge}();Se.default=de},function(Le,Se,je){(function(Me,Ce,xe){Le.exports=Se=Ce(je(0),je(28),je(29))})(0,function(Me){return Me.HmacSHA1})},function(Le,Se,je){(function(Me,Ce){Le.exports=Se=Ce(je(0))})(0,function(Me){return function(){var Ce=Me,xe=Ce.lib,be=xe.WordArray,ye=xe.Hasher,we=Ce.algo,pe=[],de=we.SHA1=ye.extend({_doReset:function(){this._hash=new be.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(ge,fe){for(var ue=this._hash.words,ee=ue[0],z=ue[1],oe=ue[2],re=ue[3],ae=ue[4],le=0;le<80;le++){if(le<16)pe[le]=0|ge[fe+le];else{var me=pe[le-3]^pe[le-8]^pe[le-14]^pe[le-16];pe[le]=me<<1|me>>>31}var ve=(ee<<5|ee>>>27)+ae+pe[le];ve+=le<20?1518500249+(z&oe|~z&re):le<40?1859775393+(z^oe^re):le<60?(z&oe|z&re|oe&re)-1894007588:(z^oe^re)-899497514,ae=re,re=oe,oe=z<<30|z>>>2,z=ee,ee=ve}ue[0]=ue[0]+ee|0,ue[1]=ue[1]+z|0,ue[2]=ue[2]+oe|0,ue[3]=ue[3]+re|0,ue[4]=ue[4]+ae|0},_doFinalize:function(){var ge=this._data,fe=ge.words,ue=8*this._nDataBytes,ee=8*ge.sigBytes;return fe[ee>>>5]|=128<<24-ee%32,fe[14+(ee+64>>>9<<4)]=Math.floor(ue/4294967296),fe[15+(ee+64>>>9<<4)]=ue,ge.sigBytes=4*fe.length,this._process(),this._hash},clone:function(){var ge=ye.clone.call(this);return ge._hash=this._hash.clone(),ge}});Ce.SHA1=ye._createHelper(de),Ce.HmacSHA1=ye._createHmacHelper(de)}(),Me.SHA1})},function(Le,Se,je){(function(Me,Ce){Le.exports=Se=Ce(je(0))})(0,function(Me){(function(){var Ce=Me,xe=Ce.lib,be=xe.Base,ye=Ce.enc,we=ye.Utf8,pe=Ce.algo;pe.HMAC=be.extend({init:function(de,ge){de=this._hasher=new de.init,typeof ge=="string"&&(ge=we.parse(ge));var fe=de.blockSize,ue=4*fe;ge.sigBytes>ue&&(ge=de.finalize(ge)),ge.clamp();for(var ee=this._oKey=ge.clone(),z=this._iKey=ge.clone(),oe=ee.words,re=z.words,ae=0;ae<fe;ae++)oe[ae]^=1549556828,re[ae]^=909522486;ee.sigBytes=z.sigBytes=ue,this.reset()},reset:function(){var de=this._hasher;de.reset(),de.update(this._iKey)},update:function(de){return this._hasher.update(de),this},finalize:function(de){var ge=this._hasher,fe=ge.finalize(de);return ge.reset(),ge.finalize(this._oKey.clone().concat(fe))}})})()})},function(Le,Se,je){(function(Me,Ce){Le.exports=Se=Ce(je(0))})(0,function(Me){return function(){function Ce(pe,de,ge){for(var fe=[],ue=0,ee=0;ee<de;ee++)if(ee%4){var z=ge[pe.charCodeAt(ee-1)]<<ee%4*2,oe=ge[pe.charCodeAt(ee)]>>>6-ee%4*2;fe[ue>>>2]|=(z|oe)<<24-ue%4*8,ue++}return ye.create(fe,ue)}var xe=Me,be=xe.lib,ye=be.WordArray,we=xe.enc;we.Base64={stringify:function(pe){var de=pe.words,ge=pe.sigBytes,fe=this._map;pe.clamp();for(var ue=[],ee=0;ee<ge;ee+=3)for(var z=de[ee>>>2]>>>24-ee%4*8&255,oe=de[ee+1>>>2]>>>24-(ee+1)%4*8&255,re=de[ee+2>>>2]>>>24-(ee+2)%4*8&255,ae=z<<16|oe<<8|re,le=0;le<4&&ee+.75*le<ge;le++)ue.push(fe.charAt(ae>>>6*(3-le)&63));var me=fe.charAt(64);if(me)for(;ue.length%4;)ue.push(me);return ue.join("")},parse:function(pe){var de=pe.length,ge=this._map,fe=this._reverseMap;if(!fe){fe=this._reverseMap=[];for(var ue=0;ue<ge.length;ue++)fe[ge.charCodeAt(ue)]=ue}var ee=ge.charAt(64);if(ee){var z=pe.indexOf(ee);z!==-1&&(de=z)}return Ce(pe,de,fe)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),Me.enc.Base64})},function(Le,Se,je){"use strict";function Me(Pe){return Pe&&Pe.__esModule?Pe:{default:Pe}}function Ce(Pe,Ae){if(!(Pe instanceof Ae))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var xe=function(){function Pe(Ae,De){for(var Oe=0;Oe<De.length;Oe++){var Ze=De[Oe];Ze.enumerable=Ze.enumerable||!1,Ze.configurable=!0,"value"in Ze&&(Ze.writable=!0),Object.defineProperty(Ae,Ze.key,Ze)}}return function(Ae,De,Oe){return De&&Pe(Ae.prototype,De),Oe&&Pe(Ae,Oe),Ae}}(),be=je(8),ye=Me(be),we=je(7),pe=Me(we),de=je(4),ge=Me(de),fe=je(6),ue=Me(fe),ee=je(1),z=Me(ee),oe=je(9),re=Me(oe),ae=je(2),le=je(11),me=je(10),ve=function(){function Pe(){Ce(this,Pe)}return xe(Pe,null,[{key:"getAuthInfo",value:function(Ae,De,Oe){var Ze=Ae+"|f#Ylm&^1TppeRhLg|"+Oe;return De&&(Ze=Ae+"|"+De+"|f#Ylm&^1TppeRhLg|"+Oe),ae(me.parse(Ze)).toString(le)}},{key:"upload",value:function(Ae,De,Oe){var Ze=z.default.ISODateString(new Date),qe=Math.floor(new Date().valueOf()/1e3),Xe=ge.default.getClientId();Xe=ge.default.setClientId(Xe);var mt=Pe.getAuthInfo(Ae.userId,Xe,qe),pt=re.default.randomUUID(),Mt={Source:"WebSDK",BusinessType:"UploadVideo",Action:"ReportUploadProgress",TerminalType:"H5",DeviceModel:pe.default.browser.name+(pe.default.browser.version||""),AppVersion:ue.default.version,AuthTimestamp:qe,Timestamp:Ze,AuthInfo:mt,FileName:Ae.file.name,FileSize:Ae.file.size,FileCreateTime:Ae.file.lastModified,FileHash:Ae.fileHash,UploadId:Ae.checkpoint.checkpoint.uploadId,PartSize:Ae.checkpoint.checkpoint.partSize,DonePartsCount:Ae.checkpoint.checkpoint.doneParts.length,UploadPoint:JSON.stringify(Ae.checkpoint),UploadRatio:Ae.checkpoint.loaded,UserId:Ae.userId,VideoId:Ae.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:pt};Xe&&(Mt.ClientId=Xe);var at=re.default.makeUTF8sort(Mt,"=","&")+"&Signature="+re.default.aliyunEncodeURI(re.default.makeChangeSiga(Mt,Ae.accessKeySecret)),_t="https://vod."+Ae.region+".aliyuncs.com/?"+at;ye.default.get(_t,function(dt){De&&De()},function(dt){dt&&(Oe(dt),console.log(dt))})}},{key:"get",value:function(Ae,De,Oe){var Ze=z.default.ISODateString(new Date),qe=Math.floor(new Date().valueOf()/1e3),Xe=ge.default.getClientId(),mt=Pe.getAuthInfo(Ae.userId,Xe,qe),pt=re.default.randomUUID(),Mt={Source:"WebSDK",BusinessType:"UploadVideo",Action:"GetUploadProgress",TerminalType:"H5",DeviceModel:pe.default.browser.name+(pe.default.browser.version||""),AppVersion:ue.default.version,AuthTimestamp:qe,Timestamp:Ze,AuthInfo:mt,UserId:Ae.userId,UploadInfoList:JSON.stringify(Ae.uploadInfoList),Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:pt};Xe&&(Mt.ClientId=Xe);var at=re.default.makeUTF8sort(Mt,"=","&")+"&Signature="+re.default.aliyunEncodeURI(re.default.makeChangeSiga(Mt,Ae.accessKeySecret)),_t="https://vod."+Ae.region+".aliyuncs.com/?"+at;ye.default.get(_t,function(dt){var Rt={},ut=Xe;dt=dt?JSON.parse(dt):{},dt.UploadProgress&&dt.UploadProgress.UploadProgressList&&dt.UploadProgress.UploadProgressList.length>0&&(Rt=dt.UploadProgress.UploadProgressList[0],ut=Rt.ClientId),ge.default.setClientId(ut),De&&De(Rt)},function(dt){dt&&(Oe(dt),console.log(dt))})}}]),Pe}();Se.default=ve},function(Le,Se,je){"use strict";function Me(we,pe){if(!(we instanceof pe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var Ce=function(){function we(pe,de){for(var ge=0;ge<de.length;ge++){var fe=de[ge];fe.enumerable=fe.enumerable||!1,fe.configurable=!0,"value"in fe&&(fe.writable=!0),Object.defineProperty(pe,fe.key,fe)}}return function(pe,de,ge){return de&&we(pe.prototype,de),ge&&we(pe,ge),pe}}(),xe=je(2),be=je(33),ye=(je(11),function(){function we(){Me(this,we)}return Ce(we,null,[{key:"getMd5",value:function(pe,de,ge){var fe=new FileReader;fe.onload=function(z){try{if(z&&z.target){var oe=xe(be.parse(z.target.result)),re=oe.toString();de(re)}}catch(ae){console.log(ae)}},fe.onerror=function(z){console.log(z),errorCallback(z)};var ue=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,ee=ue.call(pe,0,1024);fe.readAsBinaryString(ee)}}]),we}());Se.default=ye},function(Le,Se,je){(function(Me,Ce){Le.exports=Se=Ce(je(0))})(0,function(Me){return Me.enc.Latin1})}])},99498:function(xn,ln,Ie){(function(Le){Le(Ie(89780))})(function(Le){Le.defineOption("placeholder","",function(ye,we,pe){var de=pe&&pe!=Le.Init;if(we&&!de)ye.on("blur",Ce),ye.on("change",xe),ye.on("swapDoc",xe),Le.on(ye.getInputField(),"compositionupdate",ye.state.placeholderCompose=function(){Me(ye)}),xe(ye);else if(!we&&de){ye.off("blur",Ce),ye.off("change",xe),ye.off("swapDoc",xe),Le.off(ye.getInputField(),"compositionupdate",ye.state.placeholderCompose),Se(ye);var ge=ye.getWrapperElement();ge.className=ge.className.replace(" CodeMirror-empty","")}we&&!ye.hasFocus()&&Ce(ye)});function Se(ye){ye.state.placeholder&&(ye.state.placeholder.parentNode.removeChild(ye.state.placeholder),ye.state.placeholder=null)}function je(ye){Se(ye);var we=ye.state.placeholder=document.createElement("pre");we.style.cssText="height: 0; overflow: visible",we.style.direction=ye.getOption("direction"),we.className="CodeMirror-placeholder CodeMirror-line-like";var pe=ye.getOption("placeholder");typeof pe=="string"&&(pe=document.createTextNode(pe)),we.appendChild(pe),ye.display.lineSpace.insertBefore(we,ye.display.lineSpace.firstChild)}function Me(ye){setTimeout(function(){var we=!1,pe=ye.getInputField();pe.nodeName=="TEXTAREA"?we=!pe.value:ye.lineCount()==1&&(we=!/[^\u200b]/.test(pe.querySelector(".CodeMirror-line").textContent)),we?je(ye):Se(ye)},20)}function Ce(ye){be(ye)&&je(ye)}function xe(ye){var we=ye.getWrapperElement(),pe=be(ye);we.className=we.className.replace(" CodeMirror-empty","")+(pe?" CodeMirror-empty":""),pe?je(ye):Se(ye)}function be(ye){return ye.lineCount()===1&&ye.getLine(0)===""}})},25717:function(xn,ln,Ie){(function(Le){Le(Ie(89780))})(function(Le){var Se={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},je=Le.Pos;Le.defineOption("autoCloseBrackets",!1,function(ee,z,oe){oe&&oe!=Le.Init&&(ee.removeKeyMap(Ce),ee.state.closeBrackets=null),z&&(xe(Me(z,"pairs")),ee.state.closeBrackets=z,ee.addKeyMap(Ce))});function Me(ee,z){return z=="pairs"&&typeof ee=="string"?ee:typeof ee=="object"&&ee[z]!=null?ee[z]:Se[z]}var Ce={Backspace:we,Enter:pe};function xe(ee){for(var z=0;z<ee.length;z++){var oe=ee.charAt(z),re="'"+oe+"'";Ce[re]||(Ce[re]=be(oe))}}xe(Se.pairs+"`");function be(ee){return function(z){return ge(z,ee)}}function ye(ee){var z=ee.state.closeBrackets;if(!z||z.override)return z;var oe=ee.getModeAt(ee.getCursor());return oe.closeBrackets||z}function we(ee){var z=ye(ee);if(!z||ee.getOption("disableInput"))return Le.Pass;for(var oe=Me(z,"pairs"),re=ee.listSelections(),ae=0;ae<re.length;ae++){if(!re[ae].empty())return Le.Pass;var le=fe(ee,re[ae].head);if(!le||oe.indexOf(le)%2!=0)return Le.Pass}for(var ae=re.length-1;ae>=0;ae--){var me=re[ae].head;ee.replaceRange("",je(me.line,me.ch-1),je(me.line,me.ch+1),"+delete")}}function pe(ee){var z=ye(ee),oe=z&&Me(z,"explode");if(!oe||ee.getOption("disableInput"))return Le.Pass;for(var re=ee.listSelections(),ae=0;ae<re.length;ae++){if(!re[ae].empty())return Le.Pass;var le=fe(ee,re[ae].head);if(!le||oe.indexOf(le)%2!=0)return Le.Pass}ee.operation(function(){var me=ee.lineSeparator()||`
|
|
|
`;ee.replaceSelection(me+me,null),ee.execCommand("goCharLeft"),re=ee.listSelections();for(var ve=0;ve<re.length;ve++){var Pe=re[ve].head.line;ee.indentLine(Pe,null,!0),ee.indentLine(Pe+1,null,!0)}})}function de(ee){var z=Le.cmpPos(ee.anchor,ee.head)>0;return{anchor:new je(ee.anchor.line,ee.anchor.ch+(z?-1:1)),head:new je(ee.head.line,ee.head.ch+(z?1:-1))}}function ge(ee,z){var oe=ye(ee);if(!oe||ee.getOption("disableInput"))return Le.Pass;var re=Me(oe,"pairs"),ae=re.indexOf(z);if(ae==-1)return Le.Pass;for(var le=Me(oe,"closeBefore"),me=Me(oe,"triples"),ve=re.charAt(ae+1)==z,Pe=ee.listSelections(),Ae=ae%2==0,De,Oe=0;Oe<Pe.length;Oe++){var Ze=Pe[Oe],qe=Ze.head,Xe,mt=ee.getRange(qe,je(qe.line,qe.ch+1));if(Ae&&!Ze.empty())Xe="surround";else if((ve||!Ae)&&mt==z)ve&&ue(ee,qe)?Xe="both":me.indexOf(z)>=0&&ee.getRange(qe,je(qe.line,qe.ch+3))==z+z+z?Xe="skipThree":Xe="skip";else if(ve&&qe.ch>1&&me.indexOf(z)>=0&&ee.getRange(je(qe.line,qe.ch-2),qe)==z+z){if(qe.ch>2&&/\bstring/.test(ee.getTokenTypeAt(je(qe.line,qe.ch-2))))return Le.Pass;Xe="addFour"}else if(ve){var pt=qe.ch==0?" ":ee.getRange(je(qe.line,qe.ch-1),qe);if(!Le.isWordChar(mt)&&pt!=z&&!Le.isWordChar(pt))Xe="both";else return Le.Pass}else if(Ae&&(mt.length===0||/\s/.test(mt)||le.indexOf(mt)>-1))Xe="both";else return Le.Pass;if(!De)De=Xe;else if(De!=Xe)return Le.Pass}var Mt=ae%2?re.charAt(ae-1):z,at=ae%2?z:re.charAt(ae+1);ee.operation(function(){if(De=="skip")ee.execCommand("goCharRight");else if(De=="skipThree")for(var _t=0;_t<3;_t++)ee.execCommand("goCharRight");else if(De=="surround"){for(var dt=ee.getSelections(),_t=0;_t<dt.length;_t++)dt[_t]=Mt+dt[_t]+at;ee.replaceSelections(dt,"around"),dt=ee.listSelections().slice();for(var _t=0;_t<dt.length;_t++)dt[_t]=de(dt[_t]);ee.setSelections(dt)}else De=="both"?(ee.replaceSelection(Mt+at,null),ee.triggerElectric(Mt+at),ee.execCommand("goCharLeft")):De=="addFour"&&(ee.replaceSelection(Mt+Mt+Mt+Mt,"before"),ee.execCommand("goCharRight"))})}function fe(ee,z){var oe=ee.getRange(je(z.line,z.ch-1),je(z.line,z.ch+1));return oe.length==2?oe:null}function ue(ee,z){var oe=ee.getTokenAt(je(z.line,z.ch+1));return/\bstring/.test(oe.type)&&oe.start==z.ch&&(z.ch==0||!/\bstring/.test(ee.getTokenTypeAt(z)))}})},6313:function(xn,ln,Ie){(function(Le){Le(Ie(89780),Ie(32855))})(function(Le){Le.defineOption("autoCloseTags",!1,function(we,pe,de){if(de!=Le.Init&&de&&we.removeKeyMap("autoCloseTags"),!!pe){var ge={name:"autoCloseTags"};(typeof pe!="object"||pe.whenClosing!==!1)&&(ge["'/'"]=function(fe){return xe(fe)}),(typeof pe!="object"||pe.whenOpening!==!1)&&(ge["'>'"]=function(fe){return Me(fe)}),we.addKeyMap(ge)}});var Se=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],je=["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 Me(we){if(we.getOption("disableInput"))return Le.Pass;for(var pe=we.listSelections(),de=[],ge=we.getOption("autoCloseTags"),fe=0;fe<pe.length;fe++){if(!pe[fe].empty())return Le.Pass;var ue=pe[fe].head,ee=we.getTokenAt(ue),z=Le.innerMode(we.getMode(),ee.state),oe=z.state,re=z.mode.xmlCurrentTag&&z.mode.xmlCurrentTag(oe),ae=re&&re.name;if(!ae)return Le.Pass;var le=z.mode.configuration=="html",me=typeof ge=="object"&&ge.dontCloseTags||le&&Se,ve=typeof ge=="object"&&ge.indentTags||le&&je;ee.end>ue.ch&&(ae=ae.slice(0,ae.length-ee.end+ue.ch));var Pe=ae.toLowerCase();if(!ae||ee.type=="string"&&(ee.end!=ue.ch||!/[\"\']/.test(ee.string.charAt(ee.string.length-1))||ee.string.length==1)||ee.type=="tag"&&re.close||ee.string.indexOf("/")==ue.ch-ee.start-1||me&&be(me,Pe)>-1||ye(we,z.mode.xmlCurrentContext&&z.mode.xmlCurrentContext(oe)||[],ae,ue,!0))return Le.Pass;var Ae=typeof ge=="object"&&ge.emptyTags;if(Ae&&be(Ae,ae)>-1){de[fe]={text:"/>",newPos:Le.Pos(ue.line,ue.ch+2)};continue}var De=ve&&be(ve,Pe)>-1;de[fe]={indent:De,text:">"+(De?`
|
|
|
|
|
|
`:"")+"</"+ae+">",newPos:De?Le.Pos(ue.line+1,0):Le.Pos(ue.line,ue.ch+1)}}for(var Oe=typeof ge=="object"&&ge.dontIndentOnAutoClose,fe=pe.length-1;fe>=0;fe--){var Ze=de[fe];we.replaceRange(Ze.text,pe[fe].head,pe[fe].anchor,"+insert");var qe=we.listSelections().slice(0);qe[fe]={head:Ze.newPos,anchor:Ze.newPos},we.setSelections(qe),!Oe&&Ze.indent&&(we.indentLine(Ze.newPos.line,null,!0),we.indentLine(Ze.newPos.line+1,null,!0))}}function Ce(we,pe){for(var de=we.listSelections(),ge=[],fe=pe?"/":"</",ue=we.getOption("autoCloseTags"),ee=typeof ue=="object"&&ue.dontIndentOnSlash,z=0;z<de.length;z++){if(!de[z].empty())return Le.Pass;var oe=de[z].head,re=we.getTokenAt(oe),ae=Le.innerMode(we.getMode(),re.state),le=ae.state;if(pe&&(re.type=="string"||re.string.charAt(0)!="<"||re.start!=oe.ch-1))return Le.Pass;var me,ve=ae.mode.name!="xml"&&we.getMode().name=="htmlmixed";if(ve&&ae.mode.name=="javascript")me=fe+"script";else if(ve&&ae.mode.name=="css")me=fe+"style";else{var Pe=ae.mode.xmlCurrentContext&&ae.mode.xmlCurrentContext(le);if(!Pe||Pe.length&&ye(we,Pe,Pe[Pe.length-1],oe))return Le.Pass;me=fe+Pe[Pe.length-1]}we.getLine(oe.line).charAt(re.end)!=">"&&(me+=">"),ge[z]=me}if(we.replaceSelections(ge),de=we.listSelections(),!ee)for(var z=0;z<de.length;z++)(z==de.length-1||de[z].head.line<de[z+1].head.line)&&we.indentLine(de[z].head.line)}function xe(we){return we.getOption("disableInput")?Le.Pass:Ce(we,!0)}Le.commands.closeTag=function(we){return Ce(we)};function be(we,pe){if(we.indexOf)return we.indexOf(pe);for(var de=0,ge=we.length;de<ge;++de)if(we[de]==pe)return de;return-1}function ye(we,pe,de,ge,fe){if(!Le.scanForClosingTag)return!1;var ue=Math.min(we.lastLine()+1,ge.line+500),ee=Le.scanForClosingTag(we,ge,null,ue);if(!ee||ee.tag!=de)return!1;for(var z=fe?1:0,oe=pe.length-1;oe>=0&&pe[oe]==de;oe--)++z;ge=ee.to;for(var oe=1;oe<z;oe++){var re=Le.scanForClosingTag(we,ge,null,ue);if(!re||re.tag!=de)return!1;ge=re.to}return!0}})},32855:function(xn,ln,Ie){(function(Le){Le(Ie(89780))})(function(Le){"use strict";var Se=Le.Pos;function je(oe,re){return oe.line-re.line||oe.ch-re.ch}var Me="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Ce=Me+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",xe=new RegExp("<(/?)(["+Me+"]["+Ce+"]*)","g");function be(oe,re,ae,le){this.line=re,this.ch=ae,this.cm=oe,this.text=oe.getLine(re),this.min=le?Math.max(le.from,oe.firstLine()):oe.firstLine(),this.max=le?Math.min(le.to-1,oe.lastLine()):oe.lastLine()}function ye(oe,re){var ae=oe.cm.getTokenTypeAt(Se(oe.line,re));return ae&&/\btag\b/.test(ae)}function we(oe){if(!(oe.line>=oe.max))return oe.ch=0,oe.text=oe.cm.getLine(++oe.line),!0}function pe(oe){if(!(oe.line<=oe.min))return oe.text=oe.cm.getLine(--oe.line),oe.ch=oe.text.length,!0}function de(oe){for(;;){var re=oe.text.indexOf(">",oe.ch);if(re==-1){if(we(oe))continue;return}if(!ye(oe,re+1)){oe.ch=re+1;continue}var ae=oe.text.lastIndexOf("/",re),le=ae>-1&&!/\S/.test(oe.text.slice(ae+1,re));return oe.ch=re+1,le?"selfClose":"regular"}}function ge(oe){for(;;){var re=oe.ch?oe.text.lastIndexOf("<",oe.ch-1):-1;if(re==-1){if(pe(oe))continue;return}if(!ye(oe,re+1)){oe.ch=re;continue}xe.lastIndex=re,oe.ch=re;var ae=xe.exec(oe.text);if(ae&&ae.index==re)return ae}}function fe(oe){for(;;){xe.lastIndex=oe.ch;var re=xe.exec(oe.text);if(!re){if(we(oe))continue;return}if(!ye(oe,re.index+1)){oe.ch=re.index+1;continue}return oe.ch=re.index+re[0].length,re}}function ue(oe){for(;;){var re=oe.ch?oe.text.lastIndexOf(">",oe.ch-1):-1;if(re==-1){if(pe(oe))continue;return}if(!ye(oe,re+1)){oe.ch=re;continue}var ae=oe.text.lastIndexOf("/",re),le=ae>-1&&!/\S/.test(oe.text.slice(ae+1,re));return oe.ch=re+1,le?"selfClose":"regular"}}function ee(oe,re){for(var ae=[];;){var le=fe(oe),me,ve=oe.line,Pe=oe.ch-(le?le[0].length:0);if(!le||!(me=de(oe)))return;if(me!="selfClose")if(le[1]){for(var Ae=ae.length-1;Ae>=0;--Ae)if(ae[Ae]==le[2]){ae.length=Ae;break}if(Ae<0&&(!re||re==le[2]))return{tag:le[2],from:Se(ve,Pe),to:Se(oe.line,oe.ch)}}else ae.push(le[2])}}function z(oe,re){for(var ae=[];;){var le=ue(oe);if(!le)return;if(le=="selfClose"){ge(oe);continue}var me=oe.line,ve=oe.ch,Pe=ge(oe);if(!Pe)return;if(Pe[1])ae.push(Pe[2]);else{for(var Ae=ae.length-1;Ae>=0;--Ae)if(ae[Ae]==Pe[2]){ae.length=Ae;break}if(Ae<0&&(!re||re==Pe[2]))return{tag:Pe[2],from:Se(oe.line,oe.ch),to:Se(me,ve)}}}}Le.registerHelper("fold","xml",function(oe,re){for(var ae=new be(oe,re.line,0);;){var le=fe(ae);if(!le||ae.line!=re.line)return;var me=de(ae);if(!me)return;if(!le[1]&&me!="selfClose"){var ve=Se(ae.line,ae.ch),Pe=ee(ae,le[2]);return Pe&&je(Pe.from,ve)>0?{from:ve,to:Pe.from}:null}}}),Le.findMatchingTag=function(oe,re,ae){var le=new be(oe,re.line,re.ch,ae);if(!(le.text.indexOf(">")==-1&&le.text.indexOf("<")==-1)){var me=de(le),ve=me&&Se(le.line,le.ch),Pe=me&&ge(le);if(!(!me||!Pe||je(le,re)>0)){var Ae={from:Se(le.line,le.ch),to:ve,tag:Pe[2]};return me=="selfClose"?{open:Ae,close:null,at:"open"}:Pe[1]?{open:z(le,Pe[2]),close:Ae,at:"close"}:(le=new be(oe,ve.line,ve.ch,ae),{open:Ae,close:ee(le,Pe[2]),at:"open"})}}},Le.findEnclosingTag=function(oe,re,ae,le){for(var me=new be(oe,re.line,re.ch,ae);;){var ve=z(me,le);if(!ve)break;var Pe=new be(oe,re.line,re.ch,ae),Ae=ee(Pe,ve.tag);if(Ae)return{open:ve,close:Ae}}},Le.scanForClosingTag=function(oe,re,ae,le){var me=new be(oe,re.line,re.ch,le?{from:0,to:le}:null);return ee(me,ae)}})},89780:function(xn){(function(ln,Ie){xn.exports=Ie()})(this,function(){"use strict";var ln=navigator.userAgent,Ie=navigator.platform,Le=/gecko\/\d/i.test(ln),Se=/MSIE \d/.test(ln),je=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ln),Me=/Edge\/(\d+)/.exec(ln),Ce=Se||je||Me,xe=Ce&&(Se?document.documentMode||6:+(Me||je)[1]),be=!Me&&/WebKit\//.test(ln),ye=be&&/Qt\/\d+\.\d+/.test(ln),we=!Me&&/Chrome\//.test(ln),pe=/Opera\//.test(ln),de=/Apple Computer/.test(navigator.vendor),ge=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ln),fe=/PhantomJS/.test(ln),ue=!Me&&/AppleWebKit/.test(ln)&&/Mobile\/\w+/.test(ln),ee=/Android/.test(ln),z=ue||ee||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ln),oe=ue||/Mac/.test(Ie),re=/\bCrOS\b/.test(ln),ae=/win/i.test(Ie),le=pe&&ln.match(/Version\/(\d*\.\d*)/);le&&(le=Number(le[1])),le&&le>=15&&(pe=!1,be=!0);var me=oe&&(ye||pe&&(le==null||le<12.11)),ve=Le||Ce&&xe>=9;function Pe(ie){return new RegExp("(^|\\s)"+ie+"(?:$|\\s)\\s*")}var Ae=function(ie,ce){var Te=ie.className,ke=Pe(ce).exec(Te);if(ke){var Fe=Te.slice(ke.index+ke[0].length);ie.className=Te.slice(0,ke.index)+(Fe?ke[1]+Fe:"")}};function De(ie){for(var ce=ie.childNodes.length;ce>0;--ce)ie.removeChild(ie.firstChild);return ie}function Oe(ie,ce){return De(ie).appendChild(ce)}function Ze(ie,ce,Te,ke){var Fe=document.createElement(ie);if(Te&&(Fe.className=Te),ke&&(Fe.style.cssText=ke),typeof ce=="string")Fe.appendChild(document.createTextNode(ce));else if(ce)for(var nt=0;nt<ce.length;++nt)Fe.appendChild(ce[nt]);return Fe}function qe(ie,ce,Te,ke){var Fe=Ze(ie,ce,Te,ke);return Fe.setAttribute("role","presentation"),Fe}var Xe;document.createRange?Xe=function(ie,ce,Te,ke){var Fe=document.createRange();return Fe.setEnd(ke||ie,Te),Fe.setStart(ie,ce),Fe}:Xe=function(ie,ce,Te){var ke=document.body.createTextRange();try{ke.moveToElementText(ie.parentNode)}catch(Fe){return ke}return ke.collapse(!0),ke.moveEnd("character",Te),ke.moveStart("character",ce),ke};function mt(ie,ce){if(ce.nodeType==3&&(ce=ce.parentNode),ie.contains)return ie.contains(ce);do if(ce.nodeType==11&&(ce=ce.host),ce==ie)return!0;while(ce=ce.parentNode)}function pt(){var ie;try{ie=document.activeElement}catch(ce){ie=document.body||null}for(;ie&&ie.shadowRoot&&ie.shadowRoot.activeElement;)ie=ie.shadowRoot.activeElement;return ie}function Mt(ie,ce){var Te=ie.className;Pe(ce).test(Te)||(ie.className+=(Te?" ":"")+ce)}function at(ie,ce){for(var Te=ie.split(" "),ke=0;ke<Te.length;ke++)Te[ke]&&!Pe(Te[ke]).test(ce)&&(ce+=" "+Te[ke]);return ce}var _t=function(ie){ie.select()};ue?_t=function(ie){ie.selectionStart=0,ie.selectionEnd=ie.value.length}:Ce&&(_t=function(ie){try{ie.select()}catch(ce){}});function dt(ie){var ce=Array.prototype.slice.call(arguments,1);return function(){return ie.apply(null,ce)}}function Rt(ie,ce,Te){ce||(ce={});for(var ke in ie)ie.hasOwnProperty(ke)&&(Te!==!1||!ce.hasOwnProperty(ke))&&(ce[ke]=ie[ke]);return ce}function ut(ie,ce,Te,ke,Fe){ce==null&&(ce=ie.search(/[^\s\u00a0]/),ce==-1&&(ce=ie.length));for(var nt=ke||0,gt=Fe||0;;){var Ct=ie.indexOf(" ",nt);if(Ct<0||Ct>=ce)return gt+(ce-nt);gt+=Ct-nt,gt+=Te-gt%Te,nt=Ct+1}}var rt=function(){this.id=null,this.f=null,this.time=0,this.handler=dt(this.onTimeout,this)};rt.prototype.onTimeout=function(ie){ie.id=0,ie.time<=+new Date?ie.f():setTimeout(ie.handler,ie.time-+new Date)},rt.prototype.set=function(ie,ce){this.f=ce;var Te=+new Date+ie;(!this.id||Te<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,ie),this.time=Te)};function ct(ie,ce){for(var Te=0;Te<ie.length;++Te)if(ie[Te]==ce)return Te;return-1}var yt=50,wt={toString:function(){return"CodeMirror.Pass"}},xt={scroll:!1},Ut={origin:"*mouse"},zt={origin:"+move"};function dn(ie,ce,Te){for(var ke=0,Fe=0;;){var nt=ie.indexOf(" ",ke);nt==-1&&(nt=ie.length);var gt=nt-ke;if(nt==ie.length||Fe+gt>=ce)return ke+Math.min(gt,ce-Fe);if(Fe+=nt-ke,Fe+=Te-Fe%Te,ke=nt+1,Fe>=ce)return ke}}var Ft=[""];function Dt(ie){for(;Ft.length<=ie;)Ft.push(Qt(Ft)+" ");return Ft[ie]}function Qt(ie){return ie[ie.length-1]}function Yt(ie,ce){for(var Te=[],ke=0;ke<ie.length;ke++)Te[ke]=ce(ie[ke],ke);return Te}function Jt(ie,ce,Te){for(var ke=0,Fe=Te(ce);ke<ie.length&&Te(ie[ke])<=Fe;)ke++;ie.splice(ke,0,ce)}function lt(){}function Ue(ie,ce){var Te;return Object.create?Te=Object.create(ie):(lt.prototype=ie,Te=new lt),ce&&Rt(ce,Te),Te}var Be=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function tt(ie){return/\w/.test(ie)||ie>"\x80"&&(ie.toUpperCase()!=ie.toLowerCase()||Be.test(ie))}function ht(ie,ce){return ce?ce.source.indexOf("\\w")>-1&&tt(ie)?!0:ce.test(ie):tt(ie)}function et(ie){for(var ce in ie)if(ie.hasOwnProperty(ce)&&ie[ce])return!1;return!0}var Ve=/[\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 Re(ie){return ie.charCodeAt(0)>=768&&Ve.test(ie)}function ze(ie,ce,Te){for(;(Te<0?ce>0:ce<ie.length)&&Re(ie.charAt(ce));)ce+=Te;return ce}function it(ie,ce,Te){for(var ke=ce>Te?-1:1;;){if(ce==Te)return ce;var Fe=(ce+Te)/2,nt=ke<0?Math.ceil(Fe):Math.floor(Fe);if(nt==ce)return ie(nt)?ce:Te;ie(nt)?Te=nt:ce=nt+ke}}function Ke(ie,ce,Te,ke){if(!ie)return ke(ce,Te,"ltr",0);for(var Fe=!1,nt=0;nt<ie.length;++nt){var gt=ie[nt];(gt.from<Te&>.to>ce||ce==Te&>.to==ce)&&(ke(Math.max(gt.from,ce),Math.min(gt.to,Te),gt.level==1?"rtl":"ltr",nt),Fe=!0)}Fe||ke(ce,Te,"ltr")}var We=null;function vt(ie,ce,Te){var ke;We=null;for(var Fe=0;Fe<ie.length;++Fe){var nt=ie[Fe];if(nt.from<ce&&nt.to>ce)return Fe;nt.to==ce&&(nt.from!=nt.to&&Te=="before"?ke=Fe:We=Fe),nt.from==ce&&(nt.from!=nt.to&&Te!="before"?ke=Fe:We=Fe)}return ke!=null?ke:We}var kt=function(){var ie="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ce="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function Te(Bt){return Bt<=247?ie.charAt(Bt):1424<=Bt&&Bt<=1524?"R":1536<=Bt&&Bt<=1785?ce.charAt(Bt-1536):1774<=Bt&&Bt<=2220?"r":8192<=Bt&&Bt<=8203?"w":Bt==8204?"b":"L"}var ke=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Fe=/[stwN]/,nt=/[LRr]/,gt=/[Lb1n]/,Ct=/[1n]/;function bt(Bt,fn,Zt){this.level=Bt,this.from=fn,this.to=Zt}return function(Bt,fn){var Zt=fn=="ltr"?"L":"R";if(Bt.length==0||fn=="ltr"&&!ke.test(Bt))return!1;for(var Tn=Bt.length,Cn=[],fi=0;fi<Tn;++fi)Cn.push(Te(Bt.charCodeAt(fi)));for(var xi=0,Ai=Zt;xi<Tn;++xi){var Xi=Cn[xi];Xi=="m"?Cn[xi]=Ai:Ai=Xi}for(var Pr=0,lr=Zt;Pr<Tn;++Pr){var Ir=Cn[Pr];Ir=="1"&&lr=="r"?Cn[Pr]="n":nt.test(Ir)&&(lr=Ir,Ir=="r"&&(Cn[Pr]="R"))}for(var lo=1,ar=Cn[0];lo<Tn-1;++lo){var Bo=Cn[lo];Bo=="+"&&ar=="1"&&Cn[lo+1]=="1"?Cn[lo]="1":Bo==","&&ar==Cn[lo+1]&&(ar=="1"||ar=="n")&&(Cn[lo]=ar),ar=Bo}for(var Fs=0;Fs<Tn;++Fs){var La=Cn[Fs];if(La==",")Cn[Fs]="N";else if(La=="%"){var Js=void 0;for(Js=Fs+1;Js<Tn&&Cn[Js]=="%";++Js);for(var Ml=Fs&&Cn[Fs-1]=="!"||Js<Tn&&Cn[Js]=="1"?"1":"N",al=Fs;al<Js;++al)Cn[al]=Ml;Fs=Js-1}}for(var wa=0,Bl=Zt;wa<Tn;++wa){var Ja=Cn[wa];Bl=="L"&&Ja=="1"?Cn[wa]="L":nt.test(Ja)&&(Bl=Ja)}for(var _a=0;_a<Tn;++_a)if(Fe.test(Cn[_a])){var os=void 0;for(os=_a+1;os<Tn&&Fe.test(Cn[os]);++os);for(var na=(_a?Cn[_a-1]:Zt)=="L",Ra=(os<Tn?Cn[os]:Zt)=="L",qa=na==Ra?na?"L":"R":Zt,Nu=_a;Nu<os;++Nu)Cn[Nu]=qa;_a=os-1}for(var Qs=[],gu,la=0;la<Tn;)if(gt.test(Cn[la])){var Zd=la;for(++la;la<Tn&>.test(Cn[la]);++la);Qs.push(new bt(0,Zd,la))}else{var eu=la,jl=Qs.length,kl=fn=="rtl"?1:0;for(++la;la<Tn&&Cn[la]!="L";++la);for(var Cs=eu;Cs<la;)if(Ct.test(Cn[Cs])){eu<Cs&&(Qs.splice(jl,0,new bt(1,eu,Cs)),jl+=kl);var Fa=Cs;for(++Cs;Cs<la&&Ct.test(Cn[Cs]);++Cs);Qs.splice(jl,0,new bt(2,Fa,Cs)),jl+=kl,eu=Cs}else++Cs;eu<la&&Qs.splice(jl,0,new bt(1,eu,la))}return fn=="ltr"&&(Qs[0].level==1&&(gu=Bt.match(/^\s+/))&&(Qs[0].from=gu[0].length,Qs.unshift(new bt(0,0,gu[0].length))),Qt(Qs).level==1&&(gu=Bt.match(/\s+$/))&&(Qt(Qs).to-=gu[0].length,Qs.push(new bt(0,Tn-gu[0].length,Tn)))),fn=="rtl"?Qs.reverse():Qs}}();function hn(ie,ce){var Te=ie.order;return Te==null&&(Te=ie.order=kt(ie.text,ce)),Te}var en=[],Gt=function(ie,ce,Te){if(ie.addEventListener)ie.addEventListener(ce,Te,!1);else if(ie.attachEvent)ie.attachEvent("on"+ce,Te);else{var ke=ie._handlers||(ie._handlers={});ke[ce]=(ke[ce]||en).concat(Te)}};function gn(ie,ce){return ie._handlers&&ie._handlers[ce]||en}function bn(ie,ce,Te){if(ie.removeEventListener)ie.removeEventListener(ce,Te,!1);else if(ie.detachEvent)ie.detachEvent("on"+ce,Te);else{var ke=ie._handlers,Fe=ke&&ke[ce];if(Fe){var nt=ct(Fe,Te);nt>-1&&(ke[ce]=Fe.slice(0,nt).concat(Fe.slice(nt+1)))}}}function yn(ie,ce){var Te=gn(ie,ce);if(Te.length)for(var ke=Array.prototype.slice.call(arguments,2),Fe=0;Fe<Te.length;++Fe)Te[Fe].apply(null,ke)}function un(ie,ce,Te){return typeof ce=="string"&&(ce={type:ce,preventDefault:function(){this.defaultPrevented=!0}}),yn(ie,Te||ce.type,ie,ce),jn(ce)||ce.codemirrorIgnore}function Jn(ie){var ce=ie._handlers&&ie._handlers.cursorActivity;if(ce)for(var Te=ie.curOp.cursorActivityHandlers||(ie.curOp.cursorActivityHandlers=[]),ke=0;ke<ce.length;++ke)ct(Te,ce[ke])==-1&&Te.push(ce[ke])}function mn(ie,ce){return gn(ie,ce).length>0}function Yn(ie){ie.prototype.on=function(ce,Te){Gt(this,ce,Te)},ie.prototype.off=function(ce,Te){bn(this,ce,Te)}}function ri(ie){ie.preventDefault?ie.preventDefault():ie.returnValue=!1}function bi(ie){ie.stopPropagation?ie.stopPropagation():ie.cancelBubble=!0}function jn(ie){return ie.defaultPrevented!=null?ie.defaultPrevented:ie.returnValue==!1}function ki(ie){ri(ie),bi(ie)}function Hi(ie){return ie.target||ie.srcElement}function Fi(ie){var ce=ie.which;return ce==null&&(ie.button&1?ce=1:ie.button&2?ce=3:ie.button&4&&(ce=2)),oe&&ie.ctrlKey&&ce==1&&(ce=3),ce}var rr=function(){if(Ce&&xe<9)return!1;var ie=Ze("div");return"draggable"in ie||"dragDrop"in ie}(),Cr;function gr(ie){if(Cr==null){var ce=Ze("span","\u200B");Oe(ie,Ze("span",[ce,document.createTextNode("x")])),ie.firstChild.offsetHeight!=0&&(Cr=ce.offsetWidth<=1&&ce.offsetHeight>2&&!(Ce&&xe<8))}var Te=Cr?Ze("span","\u200B"):Ze("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return Te.setAttribute("cm-text",""),Te}var Ni;function Ti(ie){if(Ni!=null)return Ni;var ce=Oe(ie,document.createTextNode("A\u062EA")),Te=Xe(ce,0,1).getBoundingClientRect(),ke=Xe(ce,1,2).getBoundingClientRect();return De(ie),!Te||Te.left==Te.right?!1:Ni=ke.right-Te.right<3}var cr=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(ie){for(var ce=0,Te=[],ke=ie.length;ce<=ke;){var Fe=ie.indexOf(`
|
|
|
`,ce);Fe==-1&&(Fe=ie.length);var nt=ie.slice(ce,ie.charAt(Fe-1)=="\r"?Fe-1:Fe),gt=nt.indexOf("\r");gt!=-1?(Te.push(nt.slice(0,gt)),ce+=gt+1):(Te.push(nt),ce=Fe+1)}return Te}:function(ie){return ie.split(/\r\n?|\n/)},$e=window.getSelection?function(ie){try{return ie.selectionStart!=ie.selectionEnd}catch(ce){return!1}}:function(ie){var ce;try{ce=ie.ownerDocument.selection.createRange()}catch(Te){}return!ce||ce.parentElement()!=ie?!1:ce.compareEndPoints("StartToEnd",ce)!=0},Li=function(){var ie=Ze("div");return"oncopy"in ie?!0:(ie.setAttribute("oncopy","return;"),typeof ie.oncopy=="function")}(),ti=null;function Oi(ie){if(ti!=null)return ti;var ce=Oe(ie,Ze("span","x")),Te=ce.getBoundingClientRect(),ke=Xe(ce,0,1).getBoundingClientRect();return ti=Math.abs(Te.left-ke.left)>1}var pr={},dr={};function Qi(ie,ce){arguments.length>2&&(ce.dependencies=Array.prototype.slice.call(arguments,2)),pr[ie]=ce}function So(ie,ce){dr[ie]=ce}function $t(ie){if(typeof ie=="string"&&dr.hasOwnProperty(ie))ie=dr[ie];else if(ie&&typeof ie.name=="string"&&dr.hasOwnProperty(ie.name)){var ce=dr[ie.name];typeof ce=="string"&&(ce={name:ce}),ie=Ue(ce,ie),ie.name=ce.name}else{if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(ie))return $t("application/xml");if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(ie))return $t("application/json")}return typeof ie=="string"?{name:ie}:ie||{name:"null"}}function Ge(ie,ce){ce=$t(ce);var Te=pr[ce.name];if(!Te)return Ge(ie,"text/plain");var ke=Te(ie,ce);if(Je.hasOwnProperty(ce.name)){var Fe=Je[ce.name];for(var nt in Fe)Fe.hasOwnProperty(nt)&&(ke.hasOwnProperty(nt)&&(ke["_"+nt]=ke[nt]),ke[nt]=Fe[nt])}if(ke.name=ce.name,ce.helperType&&(ke.helperType=ce.helperType),ce.modeProps)for(var gt in ce.modeProps)ke[gt]=ce.modeProps[gt];return ke}var Je={};function ot(ie,ce){var Te=Je.hasOwnProperty(ie)?Je[ie]:Je[ie]={};Rt(ce,Te)}function Et(ie,ce){if(ce===!0)return ce;if(ie.copyState)return ie.copyState(ce);var Te={};for(var ke in ce){var Fe=ce[ke];Fe instanceof Array&&(Fe=Fe.concat([])),Te[ke]=Fe}return Te}function Nt(ie,ce){for(var Te;ie.innerMode&&(Te=ie.innerMode(ce),!(!Te||Te.mode==ie));)ce=Te.state,ie=Te.mode;return Te||{mode:ie,state:ce}}function pn(ie,ce,Te){return ie.startState?ie.startState(ce,Te):!0}var jt=function(ie,ce,Te){this.pos=this.start=0,this.string=ie,this.tabSize=ce||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=Te};jt.prototype.eol=function(){return this.pos>=this.string.length},jt.prototype.sol=function(){return this.pos==this.lineStart},jt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},jt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},jt.prototype.eat=function(ie){var ce=this.string.charAt(this.pos),Te;if(typeof ie=="string"?Te=ce==ie:Te=ce&&(ie.test?ie.test(ce):ie(ce)),Te)return++this.pos,ce},jt.prototype.eatWhile=function(ie){for(var ce=this.pos;this.eat(ie););return this.pos>ce},jt.prototype.eatSpace=function(){for(var ie=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>ie},jt.prototype.skipToEnd=function(){this.pos=this.string.length},jt.prototype.skipTo=function(ie){var ce=this.string.indexOf(ie,this.pos);if(ce>-1)return this.pos=ce,!0},jt.prototype.backUp=function(ie){this.pos-=ie},jt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ut(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ut(this.string,this.lineStart,this.tabSize):0)},jt.prototype.indentation=function(){return ut(this.string,null,this.tabSize)-(this.lineStart?ut(this.string,this.lineStart,this.tabSize):0)},jt.prototype.match=function(ie,ce,Te){if(typeof ie=="string"){var ke=function(gt){return Te?gt.toLowerCase():gt},Fe=this.string.substr(this.pos,ie.length);if(ke(Fe)==ke(ie))return ce!==!1&&(this.pos+=ie.length),!0}else{var nt=this.string.slice(this.pos).match(ie);return nt&&nt.index>0?null:(nt&&ce!==!1&&(this.pos+=nt[0].length),nt)}},jt.prototype.current=function(){return this.string.slice(this.start,this.pos)},jt.prototype.hideFirstChars=function(ie,ce){this.lineStart+=ie;try{return ce()}finally{this.lineStart-=ie}},jt.prototype.lookAhead=function(ie){var ce=this.lineOracle;return ce&&ce.lookAhead(ie)},jt.prototype.baseToken=function(){var ie=this.lineOracle;return ie&&ie.baseToken(this.pos)};function cn(ie,ce){if(ce-=ie.first,ce<0||ce>=ie.size)throw new Error("There is no line "+(ce+ie.first)+" in the document.");for(var Te=ie;!Te.lines;)for(var ke=0;;++ke){var Fe=Te.children[ke],nt=Fe.chunkSize();if(ce<nt){Te=Fe;break}ce-=nt}return Te.lines[ce]}function On(ie,ce,Te){var ke=[],Fe=ce.line;return ie.iter(ce.line,Te.line+1,function(nt){var gt=nt.text;Fe==Te.line&&(gt=gt.slice(0,Te.ch)),Fe==ce.line&&(gt=gt.slice(ce.ch)),ke.push(gt),++Fe}),ke}function pi(ie,ce,Te){var ke=[];return ie.iter(ce,Te,function(Fe){ke.push(Fe.text)}),ke}function Fn(ie,ce){var Te=ce-ie.height;if(Te)for(var ke=ie;ke;ke=ke.parent)ke.height+=Te}function Lt(ie){if(ie.parent==null)return null;for(var ce=ie.parent,Te=ct(ce.lines,ie),ke=ce.parent;ke;ce=ke,ke=ke.parent)for(var Fe=0;ke.children[Fe]!=ce;++Fe)Te+=ke.children[Fe].chunkSize();return Te+ce.first}function Ht(ie,ce){var Te=ie.first;e:do{for(var ke=0;ke<ie.children.length;++ke){var Fe=ie.children[ke],nt=Fe.height;if(ce<nt){ie=Fe;continue e}ce-=nt,Te+=Fe.chunkSize()}return Te}while(!ie.lines);for(var gt=0;gt<ie.lines.length;++gt){var Ct=ie.lines[gt],bt=Ct.height;if(ce<bt)break;ce-=bt}return Te+gt}function Pn(ie,ce){return ce>=ie.first&&ce<ie.first+ie.size}function Sn(ie,ce){return String(ie.lineNumberFormatter(ce+ie.firstLineNumber))}function Kt(ie,ce,Te){if(Te===void 0&&(Te=null),!(this instanceof Kt))return new Kt(ie,ce,Te);this.line=ie,this.ch=ce,this.sticky=Te}function vn(ie,ce){return ie.line-ce.line||ie.ch-ce.ch}function Hn(ie,ce){return ie.sticky==ce.sticky&&vn(ie,ce)==0}function Gn(ie){return Kt(ie.line,ie.ch)}function oi(ie,ce){return vn(ie,ce)<0?ce:ie}function Wn(ie,ce){return vn(ie,ce)<0?ie:ce}function zn(ie,ce){return Math.max(ie.first,Math.min(ce,ie.first+ie.size-1))}function Mn(ie,ce){if(ce.line<ie.first)return Kt(ie.first,0);var Te=ie.first+ie.size-1;return ce.line>Te?Kt(Te,cn(ie,Te).text.length):wi(ce,cn(ie,ce.line).text.length)}function wi(ie,ce){var Te=ie.ch;return Te==null||Te>ce?Kt(ie.line,ce):Te<0?Kt(ie.line,0):ie}function mi(ie,ce){for(var Te=[],ke=0;ke<ce.length;ke++)Te[ke]=Mn(ie,ce[ke]);return Te}var En=function(ie,ce){this.state=ie,this.lookAhead=ce},ei=function(ie,ce,Te,ke){this.state=ce,this.doc=ie,this.line=Te,this.maxLookAhead=ke||0,this.baseTokens=null,this.baseTokenPos=1};ei.prototype.lookAhead=function(ie){var ce=this.doc.getLine(this.line+ie);return ce!=null&&ie>this.maxLookAhead&&(this.maxLookAhead=ie),ce},ei.prototype.baseToken=function(ie){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=ie;)this.baseTokenPos+=2;var ce=this.baseTokens[this.baseTokenPos+1];return{type:ce&&ce.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-ie}},ei.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ei.fromSaved=function(ie,ce,Te){return ce instanceof En?new ei(ie,Et(ie.mode,ce.state),Te,ce.lookAhead):new ei(ie,Et(ie.mode,ce),Te)},ei.prototype.save=function(ie){var ce=ie!==!1?Et(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new En(ce,this.maxLookAhead):ce};function er(ie,ce,Te,ke){var Fe=[ie.state.modeGen],nt={};yr(ie,ce.text,ie.doc.mode,Te,function(Bt,fn){return Fe.push(Bt,fn)},nt,ke);for(var gt=Te.state,Ct=function(Bt){Te.baseTokens=Fe;var fn=ie.state.overlays[Bt],Zt=1,Tn=0;Te.state=!0,yr(ie,ce.text,fn.mode,Te,function(Cn,fi){for(var xi=Zt;Tn<Cn;){var Ai=Fe[Zt];Ai>Cn&&Fe.splice(Zt,1,Cn,Fe[Zt+1],Ai),Zt+=2,Tn=Math.min(Cn,Ai)}if(fi)if(fn.opaque)Fe.splice(xi,Zt-xi,Cn,"overlay "+fi),Zt=xi+2;else for(;xi<Zt;xi+=2){var Xi=Fe[xi+1];Fe[xi+1]=(Xi?Xi+" ":"")+"overlay "+fi}},nt),Te.state=gt,Te.baseTokens=null,Te.baseTokenPos=1},bt=0;bt<ie.state.overlays.length;++bt)Ct(bt);return{styles:Fe,classes:nt.bgClass||nt.textClass?nt:null}}function Sr(ie,ce,Te){if(!ce.styles||ce.styles[0]!=ie.state.modeGen){var ke=Tr(ie,Lt(ce)),Fe=ce.text.length>ie.options.maxHighlightLength&&Et(ie.doc.mode,ke.state),nt=er(ie,ce,ke);Fe&&(ke.state=Fe),ce.stateAfter=ke.save(!Fe),ce.styles=nt.styles,nt.classes?ce.styleClasses=nt.classes:ce.styleClasses&&(ce.styleClasses=null),Te===ie.doc.highlightFrontier&&(ie.doc.modeFrontier=Math.max(ie.doc.modeFrontier,++ie.doc.highlightFrontier))}return ce.styles}function Tr(ie,ce,Te){var ke=ie.doc,Fe=ie.display;if(!ke.mode.startState)return new ei(ke,!0,ce);var nt=fr(ie,ce,Te),gt=nt>ke.first&&cn(ke,nt-1).stateAfter,Ct=gt?ei.fromSaved(ke,gt,nt):new ei(ke,pn(ke.mode),nt);return ke.iter(nt,ce,function(bt){nn(ie,bt.text,Ct);var Bt=Ct.line;bt.stateAfter=Bt==ce-1||Bt%5==0||Bt>=Fe.viewFrom&&Bt<Fe.viewTo?Ct.save():null,Ct.nextLine()}),Te&&(ke.modeFrontier=Ct.line),Ct}function nn(ie,ce,Te,ke){var Fe=ie.doc.mode,nt=new jt(ce,ie.options.tabSize,Te);for(nt.start=nt.pos=ke||0,ce==""&&Mi(Fe,Te.state);!nt.eol();)tr(Fe,nt,Te.state),nt.start=nt.pos}function Mi(ie,ce){if(ie.blankLine)return ie.blankLine(ce);if(ie.innerMode){var Te=Nt(ie,ce);if(Te.mode.blankLine)return Te.mode.blankLine(Te.state)}}function tr(ie,ce,Te,ke){for(var Fe=0;Fe<10;Fe++){ke&&(ke[0]=Nt(ie,Te).mode);var nt=ie.token(ce,Te);if(ce.pos>ce.start)return nt}throw new Error("Mode "+ie.name+" failed to advance stream.")}var vi=function(ie,ce,Te){this.start=ie.start,this.end=ie.pos,this.string=ie.current(),this.type=ce||null,this.state=Te};function or(ie,ce,Te,ke){var Fe=ie.doc,nt=Fe.mode,gt;ce=Mn(Fe,ce);var Ct=cn(Fe,ce.line),bt=Tr(ie,ce.line,Te),Bt=new jt(Ct.text,ie.options.tabSize,bt),fn;for(ke&&(fn=[]);(ke||Bt.pos<ce.ch)&&!Bt.eol();)Bt.start=Bt.pos,gt=tr(nt,Bt,bt.state),ke&&fn.push(new vi(Bt,gt,Et(Fe.mode,bt.state)));return ke?fn:new vi(Bt,gt,bt.state)}function Vi(ie,ce){if(ie)for(;;){var Te=ie.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!Te)break;ie=ie.slice(0,Te.index)+ie.slice(Te.index+Te[0].length);var ke=Te[1]?"bgClass":"textClass";ce[ke]==null?ce[ke]=Te[2]:new RegExp("(?:^|\\s)"+Te[2]+"(?:$|\\s)").test(ce[ke])||(ce[ke]+=" "+Te[2])}return ie}function yr(ie,ce,Te,ke,Fe,nt,gt){var Ct=Te.flattenSpans;Ct==null&&(Ct=ie.options.flattenSpans);var bt=0,Bt=null,fn=new jt(ce,ie.options.tabSize,ke),Zt,Tn=ie.options.addModeClass&&[null];for(ce==""&&Vi(Mi(Te,ke.state),nt);!fn.eol();){if(fn.pos>ie.options.maxHighlightLength?(Ct=!1,gt&&nn(ie,ce,ke,fn.pos),fn.pos=ce.length,Zt=null):Zt=Vi(tr(Te,fn,ke.state,Tn),nt),Tn){var Cn=Tn[0].name;Cn&&(Zt="m-"+(Zt?Cn+" "+Zt:Cn))}if(!Ct||Bt!=Zt){for(;bt<fn.start;)bt=Math.min(fn.start,bt+5e3),Fe(bt,Bt);Bt=Zt}fn.start=fn.pos}for(;bt<fn.pos;){var fi=Math.min(fn.pos,bt+5e3);Fe(fi,Bt),bt=fi}}function fr(ie,ce,Te){for(var ke,Fe,nt=ie.doc,gt=Te?-1:ce-(ie.doc.mode.innerMode?1e3:100),Ct=ce;Ct>gt;--Ct){if(Ct<=nt.first)return nt.first;var bt=cn(nt,Ct-1),Bt=bt.stateAfter;if(Bt&&(!Te||Ct+(Bt instanceof En?Bt.lookAhead:0)<=nt.modeFrontier))return Ct;var fn=ut(bt.text,null,ie.options.tabSize);(Fe==null||ke>fn)&&(Fe=Ct-1,ke=fn)}return Fe}function _r(ie,ce){if(ie.modeFrontier=Math.min(ie.modeFrontier,ce),!(ie.highlightFrontier<ce-10)){for(var Te=ie.first,ke=ce-1;ke>Te;ke--){var Fe=cn(ie,ke).stateAfter;if(Fe&&(!(Fe instanceof En)||ke+Fe.lookAhead<ce)){Te=ke+1;break}}ie.highlightFrontier=Math.min(ie.highlightFrontier,Te)}}var Yr=!1,Ln=!1;function oo(){Yr=!0}function kn(){Ln=!0}function Di(ie,ce,Te){this.marker=ie,this.from=ce,this.to=Te}function Lr(ie,ce){if(ie)for(var Te=0;Te<ie.length;++Te){var ke=ie[Te];if(ke.marker==ce)return ke}}function sr(ie,ce){for(var Te,ke=0;ke<ie.length;++ke)ie[ke]!=ce&&(Te||(Te=[])).push(ie[ke]);return Te}function so(ie,ce){ie.markedSpans=ie.markedSpans?ie.markedSpans.concat([ce]):[ce],ce.marker.attachLine(ie)}function Er(ie,ce,Te){var ke;if(ie)for(var Fe=0;Fe<ie.length;++Fe){var nt=ie[Fe],gt=nt.marker,Ct=nt.from==null||(gt.inclusiveLeft?nt.from<=ce:nt.from<ce);if(Ct||nt.from==ce&>.type=="bookmark"&&(!Te||!nt.marker.insertLeft)){var bt=nt.to==null||(gt.inclusiveRight?nt.to>=ce:nt.to>ce);(ke||(ke=[])).push(new Di(gt,nt.from,bt?null:nt.to))}}return ke}function mr(ie,ce,Te){var ke;if(ie)for(var Fe=0;Fe<ie.length;++Fe){var nt=ie[Fe],gt=nt.marker,Ct=nt.to==null||(gt.inclusiveRight?nt.to>=ce:nt.to>ce);if(Ct||nt.from==ce&>.type=="bookmark"&&(!Te||nt.marker.insertLeft)){var bt=nt.from==null||(gt.inclusiveLeft?nt.from<=ce:nt.from<ce);(ke||(ke=[])).push(new Di(gt,bt?null:nt.from-ce,nt.to==null?null:nt.to-ce))}}return ke}function _o(ie,ce){if(ce.full)return null;var Te=Pn(ie,ce.from.line)&&cn(ie,ce.from.line).markedSpans,ke=Pn(ie,ce.to.line)&&cn(ie,ce.to.line).markedSpans;if(!Te&&!ke)return null;var Fe=ce.from.ch,nt=ce.to.ch,gt=vn(ce.from,ce.to)==0,Ct=Er(Te,Fe,gt),bt=mr(ke,nt,gt),Bt=ce.text.length==1,fn=Qt(ce.text).length+(Bt?Fe:0);if(Ct)for(var Zt=0;Zt<Ct.length;++Zt){var Tn=Ct[Zt];if(Tn.to==null){var Cn=Lr(bt,Tn.marker);Cn?Bt&&(Tn.to=Cn.to==null?null:Cn.to+fn):Tn.to=Fe}}if(bt)for(var fi=0;fi<bt.length;++fi){var xi=bt[fi];if(xi.to!=null&&(xi.to+=fn),xi.from==null){var Ai=Lr(Ct,xi.marker);Ai||(xi.from=fn,Bt&&(Ct||(Ct=[])).push(xi))}else xi.from+=fn,Bt&&(Ct||(Ct=[])).push(xi)}Ct&&(Ct=an(Ct)),bt&&bt!=Ct&&(bt=an(bt));var Xi=[Ct];if(!Bt){var Pr=ce.text.length-2,lr;if(Pr>0&&Ct)for(var Ir=0;Ir<Ct.length;++Ir)Ct[Ir].to==null&&(lr||(lr=[])).push(new Di(Ct[Ir].marker,null,null));for(var lo=0;lo<Pr;++lo)Xi.push(lr);Xi.push(bt)}return Xi}function an(ie){for(var ce=0;ce<ie.length;++ce){var Te=ie[ce];Te.from!=null&&Te.from==Te.to&&Te.marker.clearWhenEmpty!==!1&&ie.splice(ce--,1)}return ie.length?ie:null}function Nn(ie,ce,Te){var ke=null;if(ie.iter(ce.line,Te.line+1,function(Cn){if(Cn.markedSpans)for(var fi=0;fi<Cn.markedSpans.length;++fi){var xi=Cn.markedSpans[fi].marker;xi.readOnly&&(!ke||ct(ke,xi)==-1)&&(ke||(ke=[])).push(xi)}}),!ke)return null;for(var Fe=[{from:ce,to:Te}],nt=0;nt<ke.length;++nt)for(var gt=ke[nt],Ct=gt.find(0),bt=0;bt<Fe.length;++bt){var Bt=Fe[bt];if(!(vn(Bt.to,Ct.from)<0||vn(Bt.from,Ct.to)>0)){var fn=[bt,1],Zt=vn(Bt.from,Ct.from),Tn=vn(Bt.to,Ct.to);(Zt<0||!gt.inclusiveLeft&&!Zt)&&fn.push({from:Bt.from,to:Ct.from}),(Tn>0||!gt.inclusiveRight&&!Tn)&&fn.push({from:Ct.to,to:Bt.to}),Fe.splice.apply(Fe,fn),bt+=fn.length-3}}return Fe}function on(ie){var ce=ie.markedSpans;if(ce){for(var Te=0;Te<ce.length;++Te)ce[Te].marker.detachLine(ie);ie.markedSpans=null}}function ft(ie,ce){if(ce){for(var Te=0;Te<ce.length;++Te)ce[Te].marker.attachLine(ie);ie.markedSpans=ce}}function Zn(ie){return ie.inclusiveLeft?-1:0}function si(ie){return ie.inclusiveRight?1:0}function Ei(ie,ce){var Te=ie.lines.length-ce.lines.length;if(Te!=0)return Te;var ke=ie.find(),Fe=ce.find(),nt=vn(ke.from,Fe.from)||Zn(ie)-Zn(ce);if(nt)return-nt;var gt=vn(ke.to,Fe.to)||si(ie)-si(ce);return gt||ce.id-ie.id}function yi(ie,ce){var Te=Ln&&ie.markedSpans,ke;if(Te)for(var Fe=void 0,nt=0;nt<Te.length;++nt)Fe=Te[nt],Fe.marker.collapsed&&(ce?Fe.from:Fe.to)==null&&(!ke||Ei(ke,Fe.marker)<0)&&(ke=Fe.marker);return ke}function di(ie){return yi(ie,!0)}function An(ie){return yi(ie,!1)}function Xn(ie,ce){var Te=Ln&&ie.markedSpans,ke;if(Te)for(var Fe=0;Fe<Te.length;++Fe){var nt=Te[Fe];nt.marker.collapsed&&(nt.from==null||nt.from<ce)&&(nt.to==null||nt.to>ce)&&(!ke||Ei(ke,nt.marker)<0)&&(ke=nt.marker)}return ke}function $n(ie,ce,Te,ke,Fe){var nt=cn(ie,ce),gt=Ln&&nt.markedSpans;if(gt)for(var Ct=0;Ct<gt.length;++Ct){var bt=gt[Ct];if(bt.marker.collapsed){var Bt=bt.marker.find(0),fn=vn(Bt.from,Te)||Zn(bt.marker)-Zn(Fe),Zt=vn(Bt.to,ke)||si(bt.marker)-si(Fe);if(!(fn>=0&&Zt<=0||fn<=0&&Zt>=0)&&(fn<=0&&(bt.marker.inclusiveRight&&Fe.inclusiveLeft?vn(Bt.to,Te)>=0:vn(Bt.to,Te)>0)||fn>=0&&(bt.marker.inclusiveRight&&Fe.inclusiveLeft?vn(Bt.from,ke)<=0:vn(Bt.from,ke)<0)))return!0}}}function Un(ie){for(var ce;ce=di(ie);)ie=ce.find(-1,!0).line;return ie}function Qn(ie){for(var ce;ce=An(ie);)ie=ce.find(1,!0).line;return ie}function Vn(ie){for(var ce,Te;ce=An(ie);)ie=ce.find(1,!0).line,(Te||(Te=[])).push(ie);return Te}function ni(ie,ce){var Te=cn(ie,ce),ke=Un(Te);return Te==ke?ce:Lt(ke)}function ci(ie,ce){if(ce>ie.lastLine())return ce;var Te=cn(ie,ce),ke;if(!wn(ie,Te))return ce;for(;ke=An(Te);)Te=ke.find(1,!0).line;return Lt(Te)+1}function wn(ie,ce){var Te=Ln&&ce.markedSpans;if(Te){for(var ke=void 0,Fe=0;Fe<Te.length;++Fe)if(ke=Te[Fe],!!ke.marker.collapsed){if(ke.from==null)return!0;if(!ke.marker.widgetNode&&ke.from==0&&ke.marker.inclusiveLeft&&zi(ie,ce,ke))return!0}}}function zi(ie,ce,Te){if(Te.to==null){var ke=Te.marker.find(1,!0);return zi(ie,ke.line,Lr(ke.line.markedSpans,Te.marker))}if(Te.marker.inclusiveRight&&Te.to==ce.text.length)return!0;for(var Fe=void 0,nt=0;nt<ce.markedSpans.length;++nt)if(Fe=ce.markedSpans[nt],Fe.marker.collapsed&&!Fe.marker.widgetNode&&Fe.from==Te.to&&(Fe.to==null||Fe.to!=Te.from)&&(Fe.marker.inclusiveLeft||Te.marker.inclusiveRight)&&zi(ie,ce,Fe))return!0}function Gi(ie){ie=Un(ie);for(var ce=0,Te=ie.parent,ke=0;ke<Te.lines.length;++ke){var Fe=Te.lines[ke];if(Fe==ie)break;ce+=Fe.height}for(var nt=Te.parent;nt;Te=nt,nt=Te.parent)for(var gt=0;gt<nt.children.length;++gt){var Ct=nt.children[gt];if(Ct==Te)break;ce+=Ct.height}return ce}function Mr(ie){if(ie.height==0)return 0;for(var ce=ie.text.length,Te,ke=ie;Te=di(ke);){var Fe=Te.find(0,!0);ke=Fe.from.line,ce+=Fe.from.ch-Fe.to.ch}for(ke=ie;Te=An(ke);){var nt=Te.find(0,!0);ce-=ke.text.length-nt.from.ch,ke=nt.to.line,ce+=ke.text.length-nt.to.ch}return ce}function Ji(ie){var ce=ie.display,Te=ie.doc;ce.maxLine=cn(Te,Te.first),ce.maxLineLength=Mr(ce.maxLine),ce.maxLineChanged=!0,Te.iter(function(ke){var Fe=Mr(ke);Fe>ce.maxLineLength&&(ce.maxLineLength=Fe,ce.maxLine=ke)})}var Zr=function(ie,ce,Te){this.text=ie,ft(this,ce),this.height=Te?Te(this):1};Zr.prototype.lineNo=function(){return Lt(this)},Yn(Zr);function jr(ie,ce,Te,ke){ie.text=ce,ie.stateAfter&&(ie.stateAfter=null),ie.styles&&(ie.styles=null),ie.order!=null&&(ie.order=null),on(ie),ft(ie,Te);var Fe=ke?ke(ie):1;Fe!=ie.height&&Fn(ie,Fe)}function $r(ie){ie.parent=null,on(ie)}var Vr={},co={};function ko(ie,ce){if(!ie||/^\s*$/.test(ie))return null;var Te=ce.addModeClass?co:Vr;return Te[ie]||(Te[ie]=ie.replace(/\S+/g,"cm-$&"))}function sn(ie,ce){var Te=qe("span",null,null,be?"padding-right: .1px":null),ke={pre:qe("pre",[Te],"CodeMirror-line"),content:Te,col:0,pos:0,cm:ie,trailingSpace:!1,splitSpaces:ie.getOption("lineWrapping")};ce.measure={};for(var Fe=0;Fe<=(ce.rest?ce.rest.length:0);Fe++){var nt=Fe?ce.rest[Fe-1]:ce.line,gt=void 0;ke.pos=0,ke.addToken=Dr,Ti(ie.display.measure)&&(gt=hn(nt,ie.doc.direction))&&(ke.addToken=Ui(ke.addToken,gt)),ke.map=[];var Ct=ce!=ie.display.externalMeasured&&Lt(nt);fo(nt,ke,Sr(ie,nt,Ct)),nt.styleClasses&&(nt.styleClasses.bgClass&&(ke.bgClass=at(nt.styleClasses.bgClass,ke.bgClass||"")),nt.styleClasses.textClass&&(ke.textClass=at(nt.styleClasses.textClass,ke.textClass||""))),ke.map.length==0&&ke.map.push(0,0,ke.content.appendChild(gr(ie.display.measure))),Fe==0?(ce.measure.map=ke.map,ce.measure.cache={}):((ce.measure.maps||(ce.measure.maps=[])).push(ke.map),(ce.measure.caches||(ce.measure.caches=[])).push({}))}if(be){var bt=ke.content.lastChild;(/\bcm-tab\b/.test(bt.className)||bt.querySelector&&bt.querySelector(".cm-tab"))&&(ke.content.className="cm-tab-wrap-hack")}return yn(ie,"renderLine",ie,ce.line,ke.pre),ke.pre.className&&(ke.textClass=at(ke.pre.className,ke.textClass||"")),ke}function Jr(ie){var ce=Ze("span","\u2022","cm-invalidchar");return ce.title="\\u"+ie.charCodeAt(0).toString(16),ce.setAttribute("aria-label",ce.title),ce}function Dr(ie,ce,Te,ke,Fe,nt,gt){if(ce){var Ct=ie.splitSpaces?ur(ce,ie.trailingSpace):ce,bt=ie.cm.state.specialChars,Bt=!1,fn;if(!bt.test(ce))ie.col+=ce.length,fn=document.createTextNode(Ct),ie.map.push(ie.pos,ie.pos+ce.length,fn),Ce&&xe<9&&(Bt=!0),ie.pos+=ce.length;else{fn=document.createDocumentFragment();for(var Zt=0;;){bt.lastIndex=Zt;var Tn=bt.exec(ce),Cn=Tn?Tn.index-Zt:ce.length-Zt;if(Cn){var fi=document.createTextNode(Ct.slice(Zt,Zt+Cn));Ce&&xe<9?fn.appendChild(Ze("span",[fi])):fn.appendChild(fi),ie.map.push(ie.pos,ie.pos+Cn,fi),ie.col+=Cn,ie.pos+=Cn}if(!Tn)break;Zt+=Cn+1;var xi=void 0;if(Tn[0]==" "){var Ai=ie.cm.options.tabSize,Xi=Ai-ie.col%Ai;xi=fn.appendChild(Ze("span",Dt(Xi),"cm-tab")),xi.setAttribute("role","presentation"),xi.setAttribute("cm-text"," "),ie.col+=Xi}else Tn[0]=="\r"||Tn[0]==`
|
|
|
`?(xi=fn.appendChild(Ze("span",Tn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),xi.setAttribute("cm-text",Tn[0]),ie.col+=1):(xi=ie.cm.options.specialCharPlaceholder(Tn[0]),xi.setAttribute("cm-text",Tn[0]),Ce&&xe<9?fn.appendChild(Ze("span",[xi])):fn.appendChild(xi),ie.col+=1);ie.map.push(ie.pos,ie.pos+1,xi),ie.pos++}}if(ie.trailingSpace=Ct.charCodeAt(ce.length-1)==32,Te||ke||Fe||Bt||nt||gt){var Pr=Te||"";ke&&(Pr+=ke),Fe&&(Pr+=Fe);var lr=Ze("span",[fn],Pr,nt);if(gt)for(var Ir in gt)gt.hasOwnProperty(Ir)&&Ir!="style"&&Ir!="class"&&lr.setAttribute(Ir,gt[Ir]);return ie.content.appendChild(lr)}ie.content.appendChild(fn)}}function ur(ie,ce){if(ie.length>1&&!/ /.test(ie))return ie;for(var Te=ce,ke="",Fe=0;Fe<ie.length;Fe++){var nt=ie.charAt(Fe);nt==" "&&Te&&(Fe==ie.length-1||ie.charCodeAt(Fe+1)==32)&&(nt="\xA0"),ke+=nt,Te=nt==" "}return ke}function Ui(ie,ce){return function(Te,ke,Fe,nt,gt,Ct,bt){Fe=Fe?Fe+" cm-force-border":"cm-force-border";for(var Bt=Te.pos,fn=Bt+ke.length;;){for(var Zt=void 0,Tn=0;Tn<ce.length&&(Zt=ce[Tn],!(Zt.to>Bt&&Zt.from<=Bt));Tn++);if(Zt.to>=fn)return ie(Te,ke,Fe,nt,gt,Ct,bt);ie(Te,ke.slice(0,Zt.to-Bt),Fe,nt,null,Ct,bt),nt=null,ke=ke.slice(Zt.to-Bt),Bt=Zt.to}}}function Hr(ie,ce,Te,ke){var Fe=!ke&&Te.widgetNode;Fe&&ie.map.push(ie.pos,ie.pos+ce,Fe),!ke&&ie.cm.display.input.needsContentAttribute&&(Fe||(Fe=ie.content.appendChild(document.createElement("span"))),Fe.setAttribute("cm-marker",Te.id)),Fe&&(ie.cm.display.input.setUneditable(Fe),ie.content.appendChild(Fe)),ie.pos+=ce,ie.trailingSpace=!1}function fo(ie,ce,Te){var ke=ie.markedSpans,Fe=ie.text,nt=0;if(!ke){for(var gt=1;gt<Te.length;gt+=2)ce.addToken(ce,Fe.slice(nt,nt=Te[gt]),ko(Te[gt+1],ce.cm.options));return}for(var Ct=Fe.length,bt=0,Bt=1,fn="",Zt,Tn,Cn=0,fi,xi,Ai,Xi,Pr;;){if(Cn==bt){fi=xi=Ai=Tn="",Pr=null,Xi=null,Cn=1/0;for(var lr=[],Ir=void 0,lo=0;lo<ke.length;++lo){var ar=ke[lo],Bo=ar.marker;if(Bo.type=="bookmark"&&ar.from==bt&&Bo.widgetNode)lr.push(Bo);else if(ar.from<=bt&&(ar.to==null||ar.to>bt||Bo.collapsed&&ar.to==bt&&ar.from==bt)){if(ar.to!=null&&ar.to!=bt&&Cn>ar.to&&(Cn=ar.to,xi=""),Bo.className&&(fi+=" "+Bo.className),Bo.css&&(Tn=(Tn?Tn+";":"")+Bo.css),Bo.startStyle&&ar.from==bt&&(Ai+=" "+Bo.startStyle),Bo.endStyle&&ar.to==Cn&&(Ir||(Ir=[])).push(Bo.endStyle,ar.to),Bo.title&&((Pr||(Pr={})).title=Bo.title),Bo.attributes)for(var Fs in Bo.attributes)(Pr||(Pr={}))[Fs]=Bo.attributes[Fs];Bo.collapsed&&(!Xi||Ei(Xi.marker,Bo)<0)&&(Xi=ar)}else ar.from>bt&&Cn>ar.from&&(Cn=ar.from)}if(Ir)for(var La=0;La<Ir.length;La+=2)Ir[La+1]==Cn&&(xi+=" "+Ir[La]);if(!Xi||Xi.from==bt)for(var Js=0;Js<lr.length;++Js)Hr(ce,0,lr[Js]);if(Xi&&(Xi.from||0)==bt){if(Hr(ce,(Xi.to==null?Ct+1:Xi.to)-bt,Xi.marker,Xi.from==null),Xi.to==null)return;Xi.to==bt&&(Xi=!1)}}if(bt>=Ct)break;for(var Ml=Math.min(Ct,Cn);;){if(fn){var al=bt+fn.length;if(!Xi){var wa=al>Ml?fn.slice(0,Ml-bt):fn;ce.addToken(ce,wa,Zt?Zt+fi:fi,Ai,bt+wa.length==Cn?xi:"",Tn,Pr)}if(al>=Ml){fn=fn.slice(Ml-bt),bt=Ml;break}bt=al,Ai=""}fn=Fe.slice(nt,nt=Te[Bt++]),Zt=ko(Te[Bt++],ce.cm.options)}}}function uo(ie,ce,Te){this.line=ce,this.rest=Vn(ce),this.size=this.rest?Lt(Qt(this.rest))-Te+1:1,this.node=this.text=null,this.hidden=wn(ie,ce)}function br(ie,ce,Te){for(var ke=[],Fe,nt=ce;nt<Te;nt=Fe){var gt=new uo(ie.doc,cn(ie.doc,nt),nt);Fe=nt+gt.size,ke.push(gt)}return ke}var qr=null;function Ss(ie){qr?qr.ops.push(ie):ie.ownsGroup=qr={ops:[ie],delayedCallbacks:[]}}function Vs(ie){var ce=ie.delayedCallbacks,Te=0;do{for(;Te<ce.length;Te++)ce[Te].call(null);for(var ke=0;ke<ie.ops.length;ke++){var Fe=ie.ops[ke];if(Fe.cursorActivityHandlers)for(;Fe.cursorActivityCalled<Fe.cursorActivityHandlers.length;)Fe.cursorActivityHandlers[Fe.cursorActivityCalled++].call(null,Fe.cm)}}while(Te<ce.length)}function Aa(ie,ce){var Te=ie.ownsGroup;if(Te)try{Vs(Te)}finally{qr=null,ce(Te)}}var oa=null;function nr(ie,ce){var Te=gn(ie,ce);if(Te.length){var ke=Array.prototype.slice.call(arguments,2),Fe;qr?Fe=qr.delayedCallbacks:oa?Fe=oa:(Fe=oa=[],setTimeout(ns,0));for(var nt=function(Ct){Fe.push(function(){return Te[Ct].apply(null,ke)})},gt=0;gt<Te.length;++gt)nt(gt)}}function ns(){var ie=oa;oa=null;for(var ce=0;ce<ie.length;++ce)ie[ce]()}function ss(ie,ce,Te,ke){for(var Fe=0;Fe<ce.changes.length;Fe++){var nt=ce.changes[Fe];nt=="text"?ui(ie,ce):nt=="gutter"?xr(ie,ce,Te,ke):nt=="class"?qi(ie,ce):nt=="widget"&&Br(ie,ce,ke)}ce.changes=null}function zs(ie){return ie.node==ie.text&&(ie.node=Ze("div",null,null,"position: relative"),ie.text.parentNode&&ie.text.parentNode.replaceChild(ie.node,ie.text),ie.node.appendChild(ie.text),Ce&&xe<8&&(ie.node.style.zIndex=2)),ie.node}function us(ie,ce){var Te=ce.bgClass?ce.bgClass+" "+(ce.line.bgClass||""):ce.line.bgClass;if(Te&&(Te+=" CodeMirror-linebackground"),ce.background)Te?ce.background.className=Te:(ce.background.parentNode.removeChild(ce.background),ce.background=null);else if(Te){var ke=zs(ce);ce.background=ke.insertBefore(Ze("div",null,Te),ke.firstChild),ie.display.input.setUneditable(ce.background)}}function Ms(ie,ce){var Te=ie.display.externalMeasured;return Te&&Te.line==ce.line?(ie.display.externalMeasured=null,ce.measure=Te.measure,Te.built):sn(ie,ce)}function ui(ie,ce){var Te=ce.text.className,ke=Ms(ie,ce);ce.text==ce.node&&(ce.node=ke.pre),ce.text.parentNode.replaceChild(ke.pre,ce.text),ce.text=ke.pre,ke.bgClass!=ce.bgClass||ke.textClass!=ce.textClass?(ce.bgClass=ke.bgClass,ce.textClass=ke.textClass,qi(ie,ce)):Te&&(ce.text.className=Te)}function qi(ie,ce){us(ie,ce),ce.line.wrapClass?zs(ce).className=ce.line.wrapClass:ce.node!=ce.text&&(ce.node.className="");var Te=ce.textClass?ce.textClass+" "+(ce.line.textClass||""):ce.line.textClass;ce.text.className=Te||""}function xr(ie,ce,Te,ke){if(ce.gutter&&(ce.node.removeChild(ce.gutter),ce.gutter=null),ce.gutterBackground&&(ce.node.removeChild(ce.gutterBackground),ce.gutterBackground=null),ce.line.gutterClass){var Fe=zs(ce);ce.gutterBackground=Ze("div",null,"CodeMirror-gutter-background "+ce.line.gutterClass,"left: "+(ie.options.fixedGutter?ke.fixedPos:-ke.gutterTotalWidth)+"px; width: "+ke.gutterTotalWidth+"px"),ie.display.input.setUneditable(ce.gutterBackground),Fe.insertBefore(ce.gutterBackground,ce.text)}var nt=ce.line.gutterMarkers;if(ie.options.lineNumbers||nt){var gt=zs(ce),Ct=ce.gutter=Ze("div",null,"CodeMirror-gutter-wrapper","left: "+(ie.options.fixedGutter?ke.fixedPos:-ke.gutterTotalWidth)+"px");if(ie.display.input.setUneditable(Ct),gt.insertBefore(Ct,ce.text),ce.line.gutterClass&&(Ct.className+=" "+ce.line.gutterClass),ie.options.lineNumbers&&(!nt||!nt["CodeMirror-linenumbers"])&&(ce.lineNumber=Ct.appendChild(Ze("div",Sn(ie.options,Te),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+ke.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+ie.display.lineNumInnerWidth+"px"))),nt)for(var bt=0;bt<ie.display.gutterSpecs.length;++bt){var Bt=ie.display.gutterSpecs[bt].className,fn=nt.hasOwnProperty(Bt)&&nt[Bt];fn&&Ct.appendChild(Ze("div",[fn],"CodeMirror-gutter-elt","left: "+ke.gutterLeft[Bt]+"px; width: "+ke.gutterWidth[Bt]+"px"))}}}function Br(ie,ce,Te){ce.alignable&&(ce.alignable=null);for(var ke=Pe("CodeMirror-linewidget"),Fe=ce.node.firstChild,nt=void 0;Fe;Fe=nt)nt=Fe.nextSibling,ke.test(Fe.className)&&ce.node.removeChild(Fe);jo(ie,ce,Te)}function Qr(ie,ce,Te,ke){var Fe=Ms(ie,ce);return ce.text=ce.node=Fe.pre,Fe.bgClass&&(ce.bgClass=Fe.bgClass),Fe.textClass&&(ce.textClass=Fe.textClass),qi(ie,ce),xr(ie,ce,Te,ke),jo(ie,ce,ke),ce.node}function jo(ie,ce,Te){if($i(ie,ce.line,ce,Te,!0),ce.rest)for(var ke=0;ke<ce.rest.length;ke++)$i(ie,ce.rest[ke],ce,Te,!1)}function $i(ie,ce,Te,ke,Fe){if(ce.widgets)for(var nt=zs(Te),gt=0,Ct=ce.widgets;gt<Ct.length;++gt){var bt=Ct[gt],Bt=Ze("div",[bt.node],"CodeMirror-linewidget"+(bt.className?" "+bt.className:""));bt.handleMouseEvents||Bt.setAttribute("cm-ignore-events","true"),pa(bt,Bt,Te,ke),ie.display.input.setUneditable(Bt),Fe&&bt.above?nt.insertBefore(Bt,Te.gutter||Te.text):nt.appendChild(Bt),nr(bt,"redraw")}}function pa(ie,ce,Te,ke){if(ie.noHScroll){(Te.alignable||(Te.alignable=[])).push(ce);var Fe=ke.wrapperWidth;ce.style.left=ke.fixedPos+"px",ie.coverGutter||(Fe-=ke.gutterTotalWidth,ce.style.paddingLeft=ke.gutterTotalWidth+"px"),ce.style.width=Fe+"px"}ie.coverGutter&&(ce.style.zIndex=5,ce.style.position="relative",ie.noHScroll||(ce.style.marginLeft=-ke.gutterTotalWidth+"px"))}function fs(ie){if(ie.height!=null)return ie.height;var ce=ie.doc.cm;if(!ce)return 0;if(!mt(document.body,ie.node)){var Te="position: relative;";ie.coverGutter&&(Te+="margin-left: -"+ce.display.gutters.offsetWidth+"px;"),ie.noHScroll&&(Te+="width: "+ce.display.wrapper.clientWidth+"px;"),Oe(ce.display.measure,Ze("div",[ie.node],null,Te))}return ie.height=ie.node.parentNode.offsetHeight}function hs(ie,ce){for(var Te=Hi(ce);Te!=ie.wrapper;Te=Te.parentNode)if(!Te||Te.nodeType==1&&Te.getAttribute("cm-ignore-events")=="true"||Te.parentNode==ie.sizer&&Te!=ie.mover)return!0}function eo(ie){return ie.lineSpace.offsetTop}function ws(ie){return ie.mover.offsetHeight-ie.lineSpace.offsetHeight}function ga(ie){if(ie.cachedPaddingH)return ie.cachedPaddingH;var ce=Oe(ie.measure,Ze("pre","x","CodeMirror-line-like")),Te=window.getComputedStyle?window.getComputedStyle(ce):ce.currentStyle,ke={left:parseInt(Te.paddingLeft),right:parseInt(Te.paddingRight)};return!isNaN(ke.left)&&!isNaN(ke.right)&&(ie.cachedPaddingH=ke),ke}function is(ie){return yt-ie.display.nativeBarWidth}function Pa(ie){return ie.display.scroller.clientWidth-is(ie)-ie.display.barWidth}function Sa(ie){return ie.display.scroller.clientHeight-is(ie)-ie.display.barHeight}function Na(ie,ce,Te){var ke=ie.options.lineWrapping,Fe=ke&&Pa(ie);if(!ce.measure.heights||ke&&ce.measure.width!=Fe){var nt=ce.measure.heights=[];if(ke){ce.measure.width=Fe;for(var gt=ce.text.firstChild.getClientRects(),Ct=0;Ct<gt.length-1;Ct++){var bt=gt[Ct],Bt=gt[Ct+1];Math.abs(bt.bottom-Bt.bottom)>2&&nt.push((bt.bottom+Bt.top)/2-Te.top)}}nt.push(Te.bottom-Te.top)}}function _s(ie,ce,Te){if(ie.line==ce)return{map:ie.measure.map,cache:ie.measure.cache};for(var ke=0;ke<ie.rest.length;ke++)if(ie.rest[ke]==ce)return{map:ie.measure.maps[ke],cache:ie.measure.caches[ke]};for(var Fe=0;Fe<ie.rest.length;Fe++)if(Lt(ie.rest[Fe])>Te)return{map:ie.measure.maps[Fe],cache:ie.measure.caches[Fe],before:!0}}function nl(ie,ce){ce=Un(ce);var Te=Lt(ce),ke=ie.display.externalMeasured=new uo(ie.doc,ce,Te);ke.lineN=Te;var Fe=ke.built=sn(ie,ke);return ke.text=Fe.pre,Oe(ie.display.lineMeasure,Fe.pre),ke}function Hu(ie,ce,Te,ke){return il(ie,Ol(ie,ce),Te,ke)}function fl(ie,ce){if(ce>=ie.display.viewFrom&&ce<ie.display.viewTo)return ie.display.view[Is(ie,ce)];var Te=ie.display.externalMeasured;if(Te&&ce>=Te.lineN&&ce<Te.lineN+Te.size)return Te}function Ol(ie,ce){var Te=Lt(ce),ke=fl(ie,Te);ke&&!ke.text?ke=null:ke&&ke.changes&&(ss(ie,ke,Te,bl(ie)),ie.curOp.forceUpdate=!0),ke||(ke=nl(ie,ce));var Fe=_s(ke,ce,Te);return{line:ce,view:ke,rect:null,map:Fe.map,cache:Fe.cache,before:Fe.before,hasHeights:!1}}function il(ie,ce,Te,ke,Fe){ce.before&&(Te=-1);var nt=Te+(ke||""),gt;return ce.cache.hasOwnProperty(nt)?gt=ce.cache[nt]:(ce.rect||(ce.rect=ce.view.text.getBoundingClientRect()),ce.hasHeights||(Na(ie,ce.view,ce.rect),ce.hasHeights=!0),gt=As(ie,ce,Te,ke),gt.bogus||(ce.cache[nt]=gt)),{left:gt.left,right:gt.right,top:Fe?gt.rtop:gt.top,bottom:Fe?gt.rbottom:gt.bottom}}var Pu={left:0,right:0,top:0,bottom:0};function eh(ie,ce,Te){for(var ke,Fe,nt,gt,Ct,bt,Bt=0;Bt<ie.length;Bt+=3)if(Ct=ie[Bt],bt=ie[Bt+1],ce<Ct?(Fe=0,nt=1,gt="left"):ce<bt?(Fe=ce-Ct,nt=Fe+1):(Bt==ie.length-3||ce==bt&&ie[Bt+3]>ce)&&(nt=bt-Ct,Fe=nt-1,ce>=bt&&(gt="right")),Fe!=null){if(ke=ie[Bt+2],Ct==bt&&Te==(ke.insertLeft?"left":"right")&&(gt=Te),Te=="left"&&Fe==0)for(;Bt&&ie[Bt-2]==ie[Bt-3]&&ie[Bt-1].insertLeft;)ke=ie[(Bt-=3)+2],gt="left";if(Te=="right"&&Fe==bt-Ct)for(;Bt<ie.length-3&&ie[Bt+3]==ie[Bt+4]&&!ie[Bt+5].insertLeft;)ke=ie[(Bt+=3)+2],gt="right";break}return{node:ke,start:Fe,end:nt,collapse:gt,coverStart:Ct,coverEnd:bt}}function lu(ie,ce){var Te=Pu;if(ce=="left")for(var ke=0;ke<ie.length&&(Te=ie[ke]).left==Te.right;ke++);else for(var Fe=ie.length-1;Fe>=0&&(Te=ie[Fe]).left==Te.right;Fe--);return Te}function As(ie,ce,Te,ke){var Fe=eh(ce.map,Te,ke),nt=Fe.node,gt=Fe.start,Ct=Fe.end,bt=Fe.collapse,Bt;if(nt.nodeType==3){for(var fn=0;fn<4;fn++){for(;gt&&Re(ce.line.text.charAt(Fe.coverStart+gt));)--gt;for(;Fe.coverStart+Ct<Fe.coverEnd&&Re(ce.line.text.charAt(Fe.coverStart+Ct));)++Ct;if(Ce&&xe<9&>==0&&Ct==Fe.coverEnd-Fe.coverStart?Bt=nt.parentNode.getBoundingClientRect():Bt=lu(Xe(nt,gt,Ct).getClientRects(),ke),Bt.left||Bt.right||gt==0)break;Ct=gt,gt=gt-1,bt="right"}Ce&&xe<11&&(Bt=Gu(ie.display.measure,Bt))}else{gt>0&&(bt=ke="right");var Zt;ie.options.lineWrapping&&(Zt=nt.getClientRects()).length>1?Bt=Zt[ke=="right"?Zt.length-1:0]:Bt=nt.getBoundingClientRect()}if(Ce&&xe<9&&!gt&&(!Bt||!Bt.left&&!Bt.right)){var Tn=nt.parentNode.getClientRects()[0];Tn?Bt={left:Tn.left,right:Tn.left+rl(ie.display),top:Tn.top,bottom:Tn.bottom}:Bt=Pu}for(var Cn=Bt.top-ce.rect.top,fi=Bt.bottom-ce.rect.top,xi=(Cn+fi)/2,Ai=ce.view.measure.heights,Xi=0;Xi<Ai.length-1&&!(xi<Ai[Xi]);Xi++);var Pr=Xi?Ai[Xi-1]:0,lr=Ai[Xi],Ir={left:(bt=="right"?Bt.right:Bt.left)-ce.rect.left,right:(bt=="left"?Bt.left:Bt.right)-ce.rect.left,top:Pr,bottom:lr};return!Bt.left&&!Bt.right&&(Ir.bogus=!0),ie.options.singleCursorHeightPerLine||(Ir.rtop=Cn,Ir.rbottom=fi),Ir}function Gu(ie,ce){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Oi(ie))return ce;var Te=screen.logicalXDPI/screen.deviceXDPI,ke=screen.logicalYDPI/screen.deviceYDPI;return{left:ce.left*Te,right:ce.right*Te,top:ce.top*ke,bottom:ce.bottom*ke}}function th(ie){if(ie.measure&&(ie.measure.cache={},ie.measure.heights=null,ie.rest))for(var ce=0;ce<ie.rest.length;ce++)ie.measure.caches[ce]={}}function uu(ie){ie.display.externalMeasure=null,De(ie.display.lineMeasure);for(var ce=0;ce<ie.display.view.length;ce++)th(ie.display.view[ce])}function hu(ie){uu(ie),ie.display.cachedCharWidth=ie.display.cachedTextHeight=ie.display.cachedPaddingH=null,ie.options.lineWrapping||(ie.display.maxLineChanged=!0),ie.display.lineNumChars=null}function ua(){return we&&ee?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ma(){return we&&ee?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Os(ie){var ce=0;if(ie.widgets)for(var Te=0;Te<ie.widgets.length;++Te)ie.widgets[Te].above&&(ce+=fs(ie.widgets[Te]));return ce}function $s(ie,ce,Te,ke,Fe){if(!Fe){var nt=Os(ce);Te.top+=nt,Te.bottom+=nt}if(ke=="line")return Te;ke||(ke="local");var gt=Gi(ce);if(ke=="local"?gt+=eo(ie.display):gt-=ie.display.viewOffset,ke=="page"||ke=="window"){var Ct=ie.display.lineSpace.getBoundingClientRect();gt+=Ct.top+(ke=="window"?0:ma());var bt=Ct.left+(ke=="window"?0:ua());Te.left+=bt,Te.right+=bt}return Te.top+=gt,Te.bottom+=gt,Te}function Il(ie,ce,Te){if(Te=="div")return ce;var ke=ce.left,Fe=ce.top;if(Te=="page")ke-=ua(),Fe-=ma();else if(Te=="local"||!Te){var nt=ie.display.sizer.getBoundingClientRect();ke+=nt.left,Fe+=nt.top}var gt=ie.display.lineSpace.getBoundingClientRect();return{left:ke-gt.left,top:Fe-gt.top}}function Ca(ie,ce,Te,ke,Fe){return ke||(ke=cn(ie.doc,ce.line)),$s(ie,ke,Hu(ie,ke,ce.ch,Fe),Te)}function Yo(ie,ce,Te,ke,Fe,nt){ke=ke||cn(ie.doc,ce.line),Fe||(Fe=Ol(ie,ke));function gt(fi,xi){var Ai=il(ie,Fe,fi,xi?"right":"left",nt);return xi?Ai.left=Ai.right:Ai.right=Ai.left,$s(ie,ke,Ai,Te)}var Ct=hn(ke,ie.doc.direction),bt=ce.ch,Bt=ce.sticky;if(bt>=ke.text.length?(bt=ke.text.length,Bt="before"):bt<=0&&(bt=0,Bt="after"),!Ct)return gt(Bt=="before"?bt-1:bt,Bt=="before");function fn(fi,xi,Ai){var Xi=Ct[xi],Pr=Xi.level==1;return gt(Ai?fi-1:fi,Pr!=Ai)}var Zt=vt(Ct,bt,Bt),Tn=We,Cn=fn(bt,Zt,Bt=="before");return Tn!=null&&(Cn.other=fn(bt,Tn,Bt!="before")),Cn}function zo(ie,ce){var Te=0;ce=Mn(ie.doc,ce),ie.options.lineWrapping||(Te=rl(ie.display)*ce.ch);var ke=cn(ie.doc,ce.line),Fe=Gi(ke)+eo(ie.display);return{left:Te,right:Te,top:Fe,bottom:Fe+ke.height}}function xo(ie,ce,Te,ke,Fe){var nt=Kt(ie,ce,Te);return nt.xRel=Fe,ke&&(nt.outside=ke),nt}function Us(ie,ce,Te){var ke=ie.doc;if(Te+=ie.display.viewOffset,Te<0)return xo(ke.first,0,null,-1,-1);var Fe=Ht(ke,Te),nt=ke.first+ke.size-1;if(Fe>nt)return xo(ke.first+ke.size-1,cn(ke,nt).text.length,null,1,1);ce<0&&(ce=0);for(var gt=cn(ke,Fe);;){var Ct=In(ie,gt,Fe,ce,Te),bt=Xn(gt,Ct.ch+(Ct.xRel>0||Ct.outside>0?1:0));if(!bt)return Ct;var Bt=bt.find(1);if(Bt.line==Fe)return Bt;gt=cn(ke,Fe=Bt.line)}}function Ii(ie,ce,Te,ke){ke-=Os(ce);var Fe=ce.text.length,nt=it(function(gt){return il(ie,Te,gt-1).bottom<=ke},Fe,0);return Fe=it(function(gt){return il(ie,Te,gt).top>ke},nt,Fe),{begin:nt,end:Fe}}function Hs(ie,ce,Te,ke){Te||(Te=Ol(ie,ce));var Fe=$s(ie,ce,il(ie,Te,ke),"line").top;return Ii(ie,ce,Te,Fe)}function Vt(ie,ce,Te,ke){return ie.bottom<=Te?!1:ie.top>Te?!0:(ke?ie.left:ie.right)>ce}function In(ie,ce,Te,ke,Fe){Fe-=Gi(ce);var nt=Ol(ie,ce),gt=Os(ce),Ct=0,bt=ce.text.length,Bt=!0,fn=hn(ce,ie.doc.direction);if(fn){var Zt=(ie.options.lineWrapping?Kl:pl)(ie,ce,Te,nt,fn,ke,Fe);Bt=Zt.level!=1,Ct=Bt?Zt.from:Zt.to-1,bt=Bt?Zt.to:Zt.from-1}var Tn=null,Cn=null,fi=it(function(lo){var ar=il(ie,nt,lo);return ar.top+=gt,ar.bottom+=gt,Vt(ar,ke,Fe,!1)?(ar.top<=Fe&&ar.left<=ke&&(Tn=lo,Cn=ar),!0):!1},Ct,bt),xi,Ai,Xi=!1;if(Cn){var Pr=ke-Cn.left<Cn.right-ke,lr=Pr==Bt;fi=Tn+(lr?0:1),Ai=lr?"after":"before",xi=Pr?Cn.left:Cn.right}else{!Bt&&(fi==bt||fi==Ct)&&fi++,Ai=fi==0?"after":fi==ce.text.length?"before":il(ie,nt,fi-(Bt?1:0)).bottom+gt<=Fe==Bt?"after":"before";var Ir=Yo(ie,Kt(Te,fi,Ai),"line",ce,nt);xi=Ir.left,Xi=Fe<Ir.top?-1:Fe>=Ir.bottom?1:0}return fi=ze(ce.text,fi,1),xo(Te,fi,Ai,Xi,ke-xi)}function pl(ie,ce,Te,ke,Fe,nt,gt){var Ct=it(function(Zt){var Tn=Fe[Zt],Cn=Tn.level!=1;return Vt(Yo(ie,Kt(Te,Cn?Tn.to:Tn.from,Cn?"before":"after"),"line",ce,ke),nt,gt,!0)},0,Fe.length-1),bt=Fe[Ct];if(Ct>0){var Bt=bt.level!=1,fn=Yo(ie,Kt(Te,Bt?bt.from:bt.to,Bt?"after":"before"),"line",ce,ke);Vt(fn,nt,gt,!0)&&fn.top>gt&&(bt=Fe[Ct-1])}return bt}function Kl(ie,ce,Te,ke,Fe,nt,gt){var Ct=Ii(ie,ce,ke,gt),bt=Ct.begin,Bt=Ct.end;/\s/.test(ce.text.charAt(Bt-1))&&Bt--;for(var fn=null,Zt=null,Tn=0;Tn<Fe.length;Tn++){var Cn=Fe[Tn];if(!(Cn.from>=Bt||Cn.to<=bt)){var fi=Cn.level!=1,xi=il(ie,ke,fi?Math.min(Bt,Cn.to)-1:Math.max(bt,Cn.from)).right,Ai=xi<nt?nt-xi+1e9:xi-nt;(!fn||Zt>Ai)&&(fn=Cn,Zt=Ai)}}return fn||(fn=Fe[Fe.length-1]),fn.from<bt&&(fn={from:bt,to:fn.to,level:fn.level}),fn.to>Bt&&(fn={from:fn.from,to:Bt,level:fn.level}),fn}var Ns;function sa(ie){if(ie.cachedTextHeight!=null)return ie.cachedTextHeight;if(Ns==null){Ns=Ze("pre",null,"CodeMirror-line-like");for(var ce=0;ce<49;++ce)Ns.appendChild(document.createTextNode("x")),Ns.appendChild(Ze("br"));Ns.appendChild(document.createTextNode("x"))}Oe(ie.measure,Ns);var Te=Ns.offsetHeight/50;return Te>3&&(ie.cachedTextHeight=Te),De(ie.measure),Te||1}function rl(ie){if(ie.cachedCharWidth!=null)return ie.cachedCharWidth;var ce=Ze("span","xxxxxxxxxx"),Te=Ze("pre",[ce],"CodeMirror-line-like");Oe(ie.measure,Te);var ke=ce.getBoundingClientRect(),Fe=(ke.right-ke.left)/10;return Fe>2&&(ie.cachedCharWidth=Fe),Fe||10}function bl(ie){for(var ce=ie.display,Te={},ke={},Fe=ce.gutters.clientLeft,nt=ce.gutters.firstChild,gt=0;nt;nt=nt.nextSibling,++gt){var Ct=ie.display.gutterSpecs[gt].className;Te[Ct]=nt.offsetLeft+nt.clientLeft+Fe,ke[Ct]=nt.clientWidth}return{fixedPos:Cu(ce),gutterTotalWidth:ce.gutters.offsetWidth,gutterLeft:Te,gutterWidth:ke,wrapperWidth:ce.wrapper.clientWidth}}function Cu(ie){return ie.scroller.getBoundingClientRect().left-ie.sizer.getBoundingClientRect().left}function ps(ie){var ce=sa(ie.display),Te=ie.options.lineWrapping,ke=Te&&Math.max(5,ie.display.scroller.clientWidth/rl(ie.display)-3);return function(Fe){if(wn(ie.doc,Fe))return 0;var nt=0;if(Fe.widgets)for(var gt=0;gt<Fe.widgets.length;gt++)Fe.widgets[gt].height&&(nt+=Fe.widgets[gt].height);return Te?nt+(Math.ceil(Fe.text.length/ke)||1)*ce:nt+ce}}function Rr(ie){var ce=ie.doc,Te=ps(ie);ce.iter(function(ke){var Fe=Te(ke);Fe!=ke.height&&Fn(ke,Fe)})}function va(ie,ce,Te,ke){var Fe=ie.display;if(!Te&&Hi(ce).getAttribute("cm-not-content")=="true")return null;var nt,gt,Ct=Fe.lineSpace.getBoundingClientRect();try{nt=ce.clientX-Ct.left,gt=ce.clientY-Ct.top}catch(Zt){return null}var bt=Us(ie,nt,gt),Bt;if(ke&&bt.xRel>0&&(Bt=cn(ie.doc,bt.line).text).length==bt.ch){var fn=ut(Bt,Bt.length,ie.options.tabSize)-Bt.length;bt=Kt(bt.line,Math.max(0,Math.round((nt-ga(ie.display).left)/rl(ie.display))-fn))}return bt}function Is(ie,ce){if(ce>=ie.display.viewTo||(ce-=ie.display.viewFrom,ce<0))return null;for(var Te=ie.display.view,ke=0;ke<Te.length;ke++)if(ce-=Te[ke].size,ce<0)return ke}function gs(ie,ce,Te,ke){ce==null&&(ce=ie.doc.first),Te==null&&(Te=ie.doc.first+ie.doc.size),ke||(ke=0);var Fe=ie.display;if(ke&&Te<Fe.viewTo&&(Fe.updateLineNumbers==null||Fe.updateLineNumbers>ce)&&(Fe.updateLineNumbers=ce),ie.curOp.viewChanged=!0,ce>=Fe.viewTo)Ln&&ni(ie.doc,ce)<Fe.viewTo&&bs(ie);else if(Te<=Fe.viewFrom)Ln&&ci(ie.doc,Te+ke)>Fe.viewFrom?bs(ie):(Fe.viewFrom+=ke,Fe.viewTo+=ke);else if(ce<=Fe.viewFrom&&Te>=Fe.viewTo)bs(ie);else if(ce<=Fe.viewFrom){var nt=Da(ie,Te,Te+ke,1);nt?(Fe.view=Fe.view.slice(nt.index),Fe.viewFrom=nt.lineN,Fe.viewTo+=ke):bs(ie)}else if(Te>=Fe.viewTo){var gt=Da(ie,ce,ce,-1);gt?(Fe.view=Fe.view.slice(0,gt.index),Fe.viewTo=gt.lineN):bs(ie)}else{var Ct=Da(ie,ce,ce,-1),bt=Da(ie,Te,Te+ke,1);Ct&&bt?(Fe.view=Fe.view.slice(0,Ct.index).concat(br(ie,Ct.lineN,bt.lineN)).concat(Fe.view.slice(bt.index)),Fe.viewTo+=ke):bs(ie)}var Bt=Fe.externalMeasured;Bt&&(Te<Bt.lineN?Bt.lineN+=ke:ce<Bt.lineN+Bt.size&&(Fe.externalMeasured=null))}function to(ie,ce,Te){ie.curOp.viewChanged=!0;var ke=ie.display,Fe=ie.display.externalMeasured;if(Fe&&ce>=Fe.lineN&&ce<Fe.lineN+Fe.size&&(ke.externalMeasured=null),!(ce<ke.viewFrom||ce>=ke.viewTo)){var nt=ke.view[Is(ie,ce)];if(nt.node!=null){var gt=nt.changes||(nt.changes=[]);ct(gt,Te)==-1&>.push(Te)}}}function bs(ie){ie.display.viewFrom=ie.display.viewTo=ie.doc.first,ie.display.view=[],ie.display.viewOffset=0}function Da(ie,ce,Te,ke){var Fe=Is(ie,ce),nt,gt=ie.display.view;if(!Ln||Te==ie.doc.first+ie.doc.size)return{index:Fe,lineN:Te};for(var Ct=ie.display.viewFrom,bt=0;bt<Fe;bt++)Ct+=gt[bt].size;if(Ct!=ce){if(ke>0){if(Fe==gt.length-1)return null;nt=Ct+gt[Fe].size-ce,Fe++}else nt=Ct-ce;ce+=nt,Te+=nt}for(;ni(ie.doc,Te)!=Te;){if(Fe==(ke<0?0:gt.length-1))return null;Te+=ke*gt[Fe-(ke<0?1:0)].size,Fe+=ke}return{index:Fe,lineN:Te}}function Xo(ie,ce,Te){var ke=ie.display,Fe=ke.view;Fe.length==0||ce>=ke.viewTo||Te<=ke.viewFrom?(ke.view=br(ie,ce,Te),ke.viewFrom=ce):(ke.viewFrom>ce?ke.view=br(ie,ce,ke.viewFrom).concat(ke.view):ke.viewFrom<ce&&(ke.view=ke.view.slice(Is(ie,ce))),ke.viewFrom=ce,ke.viewTo<Te?ke.view=ke.view.concat(br(ie,ke.viewTo,Te)):ke.viewTo>Te&&(ke.view=ke.view.slice(0,Is(ie,Te)))),ke.viewTo=Te}function Ka(ie){for(var ce=ie.display.view,Te=0,ke=0;ke<ce.length;ke++){var Fe=ce[ke];!Fe.hidden&&(!Fe.node||Fe.changes)&&++Te}return Te}function ea(ie){ie.display.input.showSelection(ie.display.input.prepareSelection())}function Eu(ie,ce){ce===void 0&&(ce=!0);for(var Te=ie.doc,ke={},Fe=ke.cursors=document.createDocumentFragment(),nt=ke.selection=document.createDocumentFragment(),gt=0;gt<Te.sel.ranges.length;gt++)if(!(!ce&>==Te.sel.primIndex)){var Ct=Te.sel.ranges[gt];if(!(Ct.from().line>=ie.display.viewTo||Ct.to().line<ie.display.viewFrom)){var bt=Ct.empty();(bt||ie.options.showCursorWhenSelecting)&&Io(ie,Ct.head,Fe),bt||Ro(ie,Ct,nt)}}return ke}function Io(ie,ce,Te){var ke=Yo(ie,ce,"div",null,null,!ie.options.singleCursorHeightPerLine),Fe=Te.appendChild(Ze("div","\xA0","CodeMirror-cursor"));if(Fe.style.left=ke.left+"px",Fe.style.top=ke.top+"px",Fe.style.height=Math.max(0,ke.bottom-ke.top)*ie.options.cursorHeight+"px",ke.other){var nt=Te.appendChild(Ze("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));nt.style.display="",nt.style.left=ke.other.left+"px",nt.style.top=ke.other.top+"px",nt.style.height=(ke.other.bottom-ke.other.top)*.85+"px"}}function ha(ie,ce){return ie.top-ce.top||ie.left-ce.left}function Ro(ie,ce,Te){var ke=ie.display,Fe=ie.doc,nt=document.createDocumentFragment(),gt=ga(ie.display),Ct=gt.left,bt=Math.max(ke.sizerWidth,Pa(ie)-ke.sizer.offsetLeft)-gt.right,Bt=Fe.direction=="ltr";function fn(lr,Ir,lo,ar){Ir<0&&(Ir=0),Ir=Math.round(Ir),ar=Math.round(ar),nt.appendChild(Ze("div",null,"CodeMirror-selected","position: absolute; left: "+lr+`px;
|
|
|
top: `+Ir+"px; width: "+(lo==null?bt-lr:lo)+`px;
|
|
|
height: `+(ar-Ir)+"px"))}function Zt(lr,Ir,lo){var ar=cn(Fe,lr),Bo=ar.text.length,Fs,La;function Js(wa,Bl){return Ca(ie,Kt(lr,wa),"div",ar,Bl)}function Ml(wa,Bl,Ja){var _a=Hs(ie,ar,null,wa),os=Bl=="ltr"==(Ja=="after")?"left":"right",na=Ja=="after"?_a.begin:_a.end-(/\s/.test(ar.text.charAt(_a.end-1))?2:1);return Js(na,os)[os]}var al=hn(ar,Fe.direction);return Ke(al,Ir||0,lo==null?Bo:lo,function(wa,Bl,Ja,_a){var os=Ja=="ltr",na=Js(wa,os?"left":"right"),Ra=Js(Bl-1,os?"right":"left"),qa=Ir==null&&wa==0,Nu=lo==null&&Bl==Bo,Qs=_a==0,gu=!al||_a==al.length-1;if(Ra.top-na.top<=3){var la=(Bt?qa:Nu)&&Qs,Zd=(Bt?Nu:qa)&&gu,eu=la?Ct:(os?na:Ra).left,jl=Zd?bt:(os?Ra:na).right;fn(eu,na.top,jl-eu,na.bottom)}else{var kl,Cs,Fa,hh;os?(kl=Bt&&qa&&Qs?Ct:na.left,Cs=Bt?bt:Ml(wa,Ja,"before"),Fa=Bt?Ct:Ml(Bl,Ja,"after"),hh=Bt&&Nu&&gu?bt:Ra.right):(kl=Bt?Ml(wa,Ja,"before"):Ct,Cs=!Bt&&qa&&Qs?bt:na.right,Fa=!Bt&&Nu&&gu?Ct:Ra.left,hh=Bt?Ml(Bl,Ja,"after"):bt),fn(kl,na.top,Cs-kl,na.bottom),na.bottom<Ra.top&&fn(Ct,na.bottom,null,Ra.top),fn(Fa,Ra.top,hh-Fa,Ra.bottom)}(!Fs||ha(na,Fs)<0)&&(Fs=na),ha(Ra,Fs)<0&&(Fs=Ra),(!La||ha(na,La)<0)&&(La=na),ha(Ra,La)<0&&(La=Ra)}),{start:Fs,end:La}}var Tn=ce.from(),Cn=ce.to();if(Tn.line==Cn.line)Zt(Tn.line,Tn.ch,Cn.ch);else{var fi=cn(Fe,Tn.line),xi=cn(Fe,Cn.line),Ai=Un(fi)==Un(xi),Xi=Zt(Tn.line,Tn.ch,Ai?fi.text.length+1:null).end,Pr=Zt(Cn.line,Ai?0:null,Cn.ch).start;Ai&&(Xi.top<Pr.top-2?(fn(Xi.right,Xi.top,null,Xi.bottom),fn(Ct,Pr.top,Pr.left,Pr.bottom)):fn(Xi.right,Xi.top,Pr.left-Xi.right,Xi.bottom)),Xi.bottom<Pr.top&&fn(Ct,Xi.bottom,null,Pr.top)}Te.appendChild(nt)}function es(ie){if(ie.state.focused){var ce=ie.display;clearInterval(ce.blinker);var Te=!0;ce.cursorDiv.style.visibility="",ie.options.cursorBlinkRate>0?ce.blinker=setInterval(function(){ie.hasFocus()||nh(ie),ce.cursorDiv.style.visibility=(Te=!Te)?"":"hidden"},ie.options.cursorBlinkRate):ie.options.cursorBlinkRate<0&&(ce.cursorDiv.style.visibility="hidden")}}function Jo(ie){ie.state.focused||(ie.display.input.focus(),No(ie))}function cs(ie){ie.state.delayingBlurEvent=!0,setTimeout(function(){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1,nh(ie))},100)}function No(ie,ce){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1),ie.options.readOnly!="nocursor"&&(ie.state.focused||(yn(ie,"focus",ie,ce),ie.state.focused=!0,Mt(ie.display.wrapper,"CodeMirror-focused"),!ie.curOp&&ie.display.selForContextMenu!=ie.doc.sel&&(ie.display.input.reset(),be&&setTimeout(function(){return ie.display.input.reset(!0)},20)),ie.display.input.receivedFocus()),es(ie))}function nh(ie,ce){ie.state.delayingBlurEvent||(ie.state.focused&&(yn(ie,"blur",ie,ce),ie.state.focused=!1,Ae(ie.display.wrapper,"CodeMirror-focused")),clearInterval(ie.display.blinker),setTimeout(function(){ie.state.focused||(ie.display.shift=!1)},150))}function Ar(ie){for(var ce=ie.display,Te=ce.lineDiv.offsetTop,ke=0;ke<ce.view.length;ke++){var Fe=ce.view[ke],nt=ie.options.lineWrapping,gt=void 0,Ct=0;if(!Fe.hidden){if(Ce&&xe<8){var bt=Fe.node.offsetTop+Fe.node.offsetHeight;gt=bt-Te,Te=bt}else{var Bt=Fe.node.getBoundingClientRect();gt=Bt.bottom-Bt.top,!nt&&Fe.text.firstChild&&(Ct=Fe.text.firstChild.getBoundingClientRect().right-Bt.left-1)}var fn=Fe.line.height-gt;if((fn>.005||fn<-.005)&&(Fn(Fe.line,gt),vc(Fe.line),Fe.rest))for(var Zt=0;Zt<Fe.rest.length;Zt++)vc(Fe.rest[Zt]);if(Ct>ie.display.sizerWidth){var Tn=Math.ceil(Ct/rl(ie.display));Tn>ie.display.maxLineLength&&(ie.display.maxLineLength=Tn,ie.display.maxLine=Fe.line,ie.display.maxLineChanged=!0)}}}}function vc(ie){if(ie.widgets)for(var ce=0;ce<ie.widgets.length;++ce){var Te=ie.widgets[ce],ke=Te.node.parentNode;ke&&(Te.height=ke.offsetHeight)}}function bo(ie,ce,Te){var ke=Te&&Te.top!=null?Math.max(0,Te.top):ie.scroller.scrollTop;ke=Math.floor(ke-eo(ie));var Fe=Te&&Te.bottom!=null?Te.bottom:ke+ie.wrapper.clientHeight,nt=Ht(ce,ke),gt=Ht(ce,Fe);if(Te&&Te.ensure){var Ct=Te.ensure.from.line,bt=Te.ensure.to.line;Ct<nt?(nt=Ct,gt=Ht(ce,Gi(cn(ce,Ct))+ie.wrapper.clientHeight)):Math.min(bt,ce.lastLine())>=gt&&(nt=Ht(ce,Gi(cn(ce,bt))-ie.wrapper.clientHeight),gt=bt)}return{from:nt,to:Math.max(gt,nt+1)}}function Gh(ie,ce){if(!un(ie,"scrollCursorIntoView")){var Te=ie.display,ke=Te.sizer.getBoundingClientRect(),Fe=null;if(ce.top+ke.top<0?Fe=!0:ce.bottom+ke.top>(window.innerHeight||document.documentElement.clientHeight)&&(Fe=!1),Fe!=null&&!fe){var nt=Ze("div","\u200B",null,`position: absolute;
|
|
|
top: `+(ce.top-Te.viewOffset-eo(ie.display))+`px;
|
|
|
height: `+(ce.bottom-ce.top+is(ie)+Te.barHeight)+`px;
|
|
|
left: `+ce.left+"px; width: "+Math.max(2,ce.right-ce.left)+"px;");ie.display.lineSpace.appendChild(nt),nt.scrollIntoView(Fe),ie.display.lineSpace.removeChild(nt)}}}function Lu(ie,ce,Te,ke){ke==null&&(ke=0);var Fe;!ie.options.lineWrapping&&ce==Te&&(ce=ce.ch?Kt(ce.line,ce.sticky=="before"?ce.ch-1:ce.ch,"after"):ce,Te=ce.sticky=="before"?Kt(ce.line,ce.ch+1,"before"):ce);for(var nt=0;nt<5;nt++){var gt=!1,Ct=Yo(ie,ce),bt=!Te||Te==ce?Ct:Yo(ie,Te);Fe={left:Math.min(Ct.left,bt.left),top:Math.min(Ct.top,bt.top)-ke,right:Math.max(Ct.left,bt.left),bottom:Math.max(Ct.bottom,bt.bottom)+ke};var Bt=Wh(ie,Fe),fn=ie.doc.scrollTop,Zt=ie.doc.scrollLeft;if(Bt.scrollTop!=null&&(Cl(ie,Bt.scrollTop),Math.abs(ie.doc.scrollTop-fn)>1&&(gt=!0)),Bt.scrollLeft!=null&&(Xl(ie,Bt.scrollLeft),Math.abs(ie.doc.scrollLeft-Zt)>1&&(gt=!0)),!gt)break}return Fe}function ih(ie,ce){var Te=Wh(ie,ce);Te.scrollTop!=null&&Cl(ie,Te.scrollTop),Te.scrollLeft!=null&&Xl(ie,Te.scrollLeft)}function Wh(ie,ce){var Te=ie.display,ke=sa(ie.display);ce.top<0&&(ce.top=0);var Fe=ie.curOp&&ie.curOp.scrollTop!=null?ie.curOp.scrollTop:Te.scroller.scrollTop,nt=Sa(ie),gt={};ce.bottom-ce.top>nt&&(ce.bottom=ce.top+nt);var Ct=ie.doc.height+ws(Te),bt=ce.top<ke,Bt=ce.bottom>Ct-ke;if(ce.top<Fe)gt.scrollTop=bt?0:ce.top;else if(ce.bottom>Fe+nt){var fn=Math.min(ce.top,(Bt?Ct:ce.bottom)-nt);fn!=Fe&&(gt.scrollTop=fn)}var Zt=ie.options.fixedGutter?0:Te.gutters.offsetWidth,Tn=ie.curOp&&ie.curOp.scrollLeft!=null?ie.curOp.scrollLeft:Te.scroller.scrollLeft-Zt,Cn=Pa(ie)-Te.gutters.offsetWidth,fi=ce.right-ce.left>Cn;return fi&&(ce.right=ce.left+Cn),ce.left<10?gt.scrollLeft=0:ce.left<Tn?gt.scrollLeft=Math.max(0,ce.left+Zt-(fi?0:10)):ce.right>Cn+Tn-3&&(gt.scrollLeft=ce.right+(fi?0:10)-Cn),gt}function Ph(ie,ce){ce!=null&&(Pl(ie),ie.curOp.scrollTop=(ie.curOp.scrollTop==null?ie.doc.scrollTop:ie.curOp.scrollTop)+ce)}function Yl(ie){Pl(ie);var ce=ie.getCursor();ie.curOp.scrollToPos={from:ce,to:ce,margin:ie.options.cursorScrollMargin}}function Wr(ie,ce,Te){(ce!=null||Te!=null)&&Pl(ie),ce!=null&&(ie.curOp.scrollLeft=ce),Te!=null&&(ie.curOp.scrollTop=Te)}function Ho(ie,ce){Pl(ie),ie.curOp.scrollToPos=ce}function Pl(ie){var ce=ie.curOp.scrollToPos;if(ce){ie.curOp.scrollToPos=null;var Te=zo(ie,ce.from),ke=zo(ie,ce.to);Ch(ie,Te,ke,ce.margin)}}function Ch(ie,ce,Te,ke){var Fe=Wh(ie,{left:Math.min(ce.left,Te.left),top:Math.min(ce.top,Te.top)-ke,right:Math.max(ce.right,Te.right),bottom:Math.max(ce.bottom,Te.bottom)+ke});Wr(ie,Fe.scrollLeft,Fe.scrollTop)}function Cl(ie,ce){Math.abs(ie.doc.scrollTop-ce)<2||(Le||To(ie,{top:ce}),Eh(ie,ce,!0),Le&&To(ie),Si(ie,100))}function Eh(ie,ce,Te){ce=Math.max(0,Math.min(ie.display.scroller.scrollHeight-ie.display.scroller.clientHeight,ce)),!(ie.display.scroller.scrollTop==ce&&!Te)&&(ie.doc.scrollTop=ce,ie.display.scrollbars.setScrollTop(ce),ie.display.scroller.scrollTop!=ce&&(ie.display.scroller.scrollTop=ce))}function Xl(ie,ce,Te,ke){ce=Math.max(0,Math.min(ce,ie.display.scroller.scrollWidth-ie.display.scroller.clientWidth)),!((Te?ce==ie.doc.scrollLeft:Math.abs(ie.doc.scrollLeft-ce)<2)&&!ke)&&(ie.doc.scrollLeft=ce,Vo(ie),ie.display.scroller.scrollLeft!=ce&&(ie.display.scroller.scrollLeft=ce),ie.display.scrollbars.setScrollLeft(ce))}function po(ie){var ce=ie.display,Te=ce.gutters.offsetWidth,ke=Math.round(ie.doc.height+ws(ie.display));return{clientHeight:ce.scroller.clientHeight,viewHeight:ce.wrapper.clientHeight,scrollWidth:ce.scroller.scrollWidth,clientWidth:ce.scroller.clientWidth,viewWidth:ce.wrapper.clientWidth,barLeft:ie.options.fixedGutter?Te:0,docHeight:ke,scrollHeight:ke+is(ie)+ce.barHeight,nativeBarWidth:ce.nativeBarWidth,gutterWidth:Te}}var Nr=function(ie,ce,Te){this.cm=Te;var ke=this.vert=Ze("div",[Ze("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Fe=this.horiz=Ze("div",[Ze("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");ke.tabIndex=Fe.tabIndex=-1,ie(ke),ie(Fe),Gt(ke,"scroll",function(){ke.clientHeight&&ce(ke.scrollTop,"vertical")}),Gt(Fe,"scroll",function(){Fe.clientWidth&&ce(Fe.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Ce&&xe<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Nr.prototype.update=function(ie){var ce=ie.scrollWidth>ie.clientWidth+1,Te=ie.scrollHeight>ie.clientHeight+1,ke=ie.nativeBarWidth;if(Te){this.vert.style.display="block",this.vert.style.bottom=ce?ke+"px":"0";var Fe=ie.viewHeight-(ce?ke:0);this.vert.firstChild.style.height=Math.max(0,ie.scrollHeight-ie.clientHeight+Fe)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(ce){this.horiz.style.display="block",this.horiz.style.right=Te?ke+"px":"0",this.horiz.style.left=ie.barLeft+"px";var nt=ie.viewWidth-ie.barLeft-(Te?ke:0);this.horiz.firstChild.style.width=Math.max(0,ie.scrollWidth-ie.clientWidth+nt)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&ie.clientHeight>0&&(ke==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:Te?ke:0,bottom:ce?ke:0}},Nr.prototype.setScrollLeft=function(ie){this.horiz.scrollLeft!=ie&&(this.horiz.scrollLeft=ie),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Nr.prototype.setScrollTop=function(ie){this.vert.scrollTop!=ie&&(this.vert.scrollTop=ie),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Nr.prototype.zeroWidthHack=function(){var ie=oe&&!ge?"12px":"18px";this.horiz.style.height=this.vert.style.width=ie,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new rt,this.disableVert=new rt},Nr.prototype.enableZeroWidthBar=function(ie,ce,Te){ie.style.pointerEvents="auto";function ke(){var Fe=ie.getBoundingClientRect(),nt=Te=="vert"?document.elementFromPoint(Fe.right-1,(Fe.top+Fe.bottom)/2):document.elementFromPoint((Fe.right+Fe.left)/2,Fe.bottom-1);nt!=ie?ie.style.pointerEvents="none":ce.set(1e3,ke)}ce.set(1e3,ke)},Nr.prototype.clear=function(){var ie=this.horiz.parentNode;ie.removeChild(this.horiz),ie.removeChild(this.vert)};var Do=function(){};Do.prototype.update=function(){return{bottom:0,right:0}},Do.prototype.setScrollLeft=function(){},Do.prototype.setScrollTop=function(){},Do.prototype.clear=function(){};function ya(ie,ce){ce||(ce=po(ie));var Te=ie.display.barWidth,ke=ie.display.barHeight;ls(ie,ce);for(var Fe=0;Fe<4&&Te!=ie.display.barWidth||ke!=ie.display.barHeight;Fe++)Te!=ie.display.barWidth&&ie.options.lineWrapping&&Ar(ie),ls(ie,po(ie)),Te=ie.display.barWidth,ke=ie.display.barHeight}function ls(ie,ce){var Te=ie.display,ke=Te.scrollbars.update(ce);Te.sizer.style.paddingRight=(Te.barWidth=ke.right)+"px",Te.sizer.style.paddingBottom=(Te.barHeight=ke.bottom)+"px",Te.heightForcer.style.borderBottom=ke.bottom+"px solid transparent",ke.right&&ke.bottom?(Te.scrollbarFiller.style.display="block",Te.scrollbarFiller.style.height=ke.bottom+"px",Te.scrollbarFiller.style.width=ke.right+"px"):Te.scrollbarFiller.style.display="",ke.bottom&&ie.options.coverGutterNextToScrollbar&&ie.options.fixedGutter?(Te.gutterFiller.style.display="block",Te.gutterFiller.style.height=ke.bottom+"px",Te.gutterFiller.style.width=ce.gutterWidth+"px"):Te.gutterFiller.style.display=""}var Wu={native:Nr,null:Do};function cu(ie){ie.display.scrollbars&&(ie.display.scrollbars.clear(),ie.display.scrollbars.addClass&&Ae(ie.display.wrapper,ie.display.scrollbars.addClass)),ie.display.scrollbars=new Wu[ie.options.scrollbarStyle](function(ce){ie.display.wrapper.insertBefore(ce,ie.display.scrollbarFiller),Gt(ce,"mousedown",function(){ie.state.focused&&setTimeout(function(){return ie.display.input.focus()},0)}),ce.setAttribute("cm-not-content","true")},function(ce,Te){Te=="horizontal"?Xl(ie,ce):Cl(ie,ce)},ie),ie.display.scrollbars.addClass&&Mt(ie.display.wrapper,ie.display.scrollbars.addClass)}var Mu=0;function Ya(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:++Mu},Ss(ie.curOp)}function Jl(ie){var ce=ie.curOp;ce&&Aa(ce,function(Te){for(var ke=0;ke<Te.ops.length;ke++)Te.ops[ke].cm.curOp=null;vp(Te)})}function vp(ie){for(var ce=ie.ops,Te=0;Te<ce.length;Te++)yp(ce[Te]);for(var ke=0;ke<ce.length;ke++)Sp(ce[ke]);for(var Fe=0;Fe<ce.length;Fe++)gf(ce[Fe]);for(var nt=0;nt<ce.length;nt++)Ot(ce[nt]);for(var gt=0;gt<ce.length;gt++)Xt(ce[gt])}function yp(ie){var ce=ie.cm,Te=ce.display;Yi(ce),ie.updateMaxLine&&Ji(ce),ie.mustUpdate=ie.viewChanged||ie.forceUpdate||ie.scrollTop!=null||ie.scrollToPos&&(ie.scrollToPos.from.line<Te.viewFrom||ie.scrollToPos.to.line>=Te.viewTo)||Te.maxLineChanged&&ce.options.lineWrapping,ie.update=ie.mustUpdate&&new Pi(ce,ie.mustUpdate&&{top:ie.scrollTop,ensure:ie.scrollToPos},ie.forceUpdate)}function Sp(ie){ie.updatedDisplay=ie.mustUpdate&&Go(ie.cm,ie.update)}function gf(ie){var ce=ie.cm,Te=ce.display;ie.updatedDisplay&&Ar(ce),ie.barMeasure=po(ce),Te.maxLineChanged&&!ce.options.lineWrapping&&(ie.adjustWidthTo=Hu(ce,Te.maxLine,Te.maxLine.text.length).left+3,ce.display.sizerWidth=ie.adjustWidthTo,ie.barMeasure.scrollWidth=Math.max(Te.scroller.clientWidth,Te.sizer.offsetLeft+ie.adjustWidthTo+is(ce)+ce.display.barWidth),ie.maxScrollLeft=Math.max(0,Te.sizer.offsetLeft+ie.adjustWidthTo-Pa(ce))),(ie.updatedDisplay||ie.selectionChanged)&&(ie.preparedSelection=Te.input.prepareSelection())}function Ot(ie){var ce=ie.cm;ie.adjustWidthTo!=null&&(ce.display.sizer.style.minWidth=ie.adjustWidthTo+"px",ie.maxScrollLeft<ce.doc.scrollLeft&&Xl(ce,Math.min(ce.display.scroller.scrollLeft,ie.maxScrollLeft),!0),ce.display.maxLineChanged=!1);var Te=ie.focus&&ie.focus==pt();ie.preparedSelection&&ce.display.input.showSelection(ie.preparedSelection,Te),(ie.updatedDisplay||ie.startHeight!=ce.doc.height)&&ya(ce,ie.barMeasure),ie.updatedDisplay&&ho(ce,ie.barMeasure),ie.selectionChanged&&es(ce),ce.state.focused&&ie.updateInput&&ce.display.input.reset(ie.typing),Te&&Jo(ie.cm)}function Xt(ie){var ce=ie.cm,Te=ce.display,ke=ce.doc;if(ie.updatedDisplay&&Wi(ce,ie.update),Te.wheelStartX!=null&&(ie.scrollTop!=null||ie.scrollLeft!=null||ie.scrollToPos)&&(Te.wheelStartX=Te.wheelStartY=null),ie.scrollTop!=null&&Eh(ce,ie.scrollTop,ie.forceScroll),ie.scrollLeft!=null&&Xl(ce,ie.scrollLeft,!0,!0),ie.scrollToPos){var Fe=Lu(ce,Mn(ke,ie.scrollToPos.from),Mn(ke,ie.scrollToPos.to),ie.scrollToPos.margin);Gh(ce,Fe)}var nt=ie.maybeHiddenMarkers,gt=ie.maybeUnhiddenMarkers;if(nt)for(var Ct=0;Ct<nt.length;++Ct)nt[Ct].lines.length||yn(nt[Ct],"hide");if(gt)for(var bt=0;bt<gt.length;++bt)gt[bt].lines.length&&yn(gt[bt],"unhide");Te.wrapper.offsetHeight&&(ke.scrollTop=ce.display.scroller.scrollTop),ie.changeObjs&&yn(ce,"changes",ce,ie.changeObjs),ie.update&&ie.update.finish()}function qt(ie,ce){if(ie.curOp)return ce();Ya(ie);try{return ce()}finally{Jl(ie)}}function Bi(ie,ce){return function(){if(ie.curOp)return ce.apply(ie,arguments);Ya(ie);try{return ce.apply(ie,arguments)}finally{Jl(ie)}}}function _i(ie){return function(){if(this.curOp)return ie.apply(this,arguments);Ya(this);try{return ie.apply(this,arguments)}finally{Jl(this)}}}function li(ie){return function(){var ce=this.cm;if(!ce||ce.curOp)return ie.apply(this,arguments);Ya(ce);try{return ie.apply(this,arguments)}finally{Jl(ce)}}}function Si(ie,ce){ie.doc.highlightFrontier<ie.display.viewTo&&ie.state.highlight.set(ce,dt(ai,ie))}function ai(ie){var ce=ie.doc;if(!(ce.highlightFrontier>=ie.display.viewTo)){var Te=+new Date+ie.options.workTime,ke=Tr(ie,ce.highlightFrontier),Fe=[];ce.iter(ke.line,Math.min(ce.first+ce.size,ie.display.viewTo+500),function(nt){if(ke.line>=ie.display.viewFrom){var gt=nt.styles,Ct=nt.text.length>ie.options.maxHighlightLength?Et(ce.mode,ke.state):null,bt=er(ie,nt,ke,!0);Ct&&(ke.state=Ct),nt.styles=bt.styles;var Bt=nt.styleClasses,fn=bt.classes;fn?nt.styleClasses=fn:Bt&&(nt.styleClasses=null);for(var Zt=!gt||gt.length!=nt.styles.length||Bt!=fn&&(!Bt||!fn||Bt.bgClass!=fn.bgClass||Bt.textClass!=fn.textClass),Tn=0;!Zt&&Tn<gt.length;++Tn)Zt=gt[Tn]!=nt.styles[Tn];Zt&&Fe.push(ke.line),nt.stateAfter=ke.save(),ke.nextLine()}else nt.text.length<=ie.options.maxHighlightLength&&nn(ie,nt.text,ke),nt.stateAfter=ke.line%5==0?ke.save():null,ke.nextLine();if(+new Date>Te)return Si(ie,ie.options.workDelay),!0}),ce.highlightFrontier=ke.line,ce.modeFrontier=Math.max(ce.modeFrontier,ke.line),Fe.length&&qt(ie,function(){for(var nt=0;nt<Fe.length;nt++)to(ie,Fe[nt],"text")})}}var Pi=function(ie,ce,Te){var ke=ie.display;this.viewport=ce,this.visible=bo(ke,ie.doc,ce),this.editorIsHidden=!ke.wrapper.offsetWidth,this.wrapperHeight=ke.wrapper.clientHeight,this.wrapperWidth=ke.wrapper.clientWidth,this.oldDisplayWidth=Pa(ie),this.force=Te,this.dims=bl(ie),this.events=[]};Pi.prototype.signal=function(ie,ce){mn(ie,ce)&&this.events.push(arguments)},Pi.prototype.finish=function(){for(var ie=0;ie<this.events.length;ie++)yn.apply(null,this.events[ie])};function Yi(ie){var ce=ie.display;!ce.scrollbarsClipped&&ce.scroller.offsetWidth&&(ce.nativeBarWidth=ce.scroller.offsetWidth-ce.scroller.clientWidth,ce.heightForcer.style.height=is(ie)+"px",ce.sizer.style.marginBottom=-ce.nativeBarWidth+"px",ce.sizer.style.borderRightWidth=is(ie)+"px",ce.scrollbarsClipped=!0)}function Po(ie){if(ie.hasFocus())return null;var ce=pt();if(!ce||!mt(ie.display.lineDiv,ce))return null;var Te={activeElt:ce};if(window.getSelection){var ke=window.getSelection();ke.anchorNode&&ke.extend&&mt(ie.display.lineDiv,ke.anchorNode)&&(Te.anchorNode=ke.anchorNode,Te.anchorOffset=ke.anchorOffset,Te.focusNode=ke.focusNode,Te.focusOffset=ke.focusOffset)}return Te}function wr(ie){if(!(!ie||!ie.activeElt||ie.activeElt==pt())&&(ie.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(ie.activeElt.nodeName)&&ie.anchorNode&&mt(document.body,ie.anchorNode)&&mt(document.body,ie.focusNode))){var ce=window.getSelection(),Te=document.createRange();Te.setEnd(ie.anchorNode,ie.anchorOffset),Te.collapse(!1),ce.removeAllRanges(),ce.addRange(Te),ce.extend(ie.focusNode,ie.focusOffset)}}function Go(ie,ce){var Te=ie.display,ke=ie.doc;if(ce.editorIsHidden)return bs(ie),!1;if(!ce.force&&ce.visible.from>=Te.viewFrom&&ce.visible.to<=Te.viewTo&&(Te.updateLineNumbers==null||Te.updateLineNumbers>=Te.viewTo)&&Te.renderedView==Te.view&&Ka(ie)==0)return!1;Co(ie)&&(bs(ie),ce.dims=bl(ie));var Fe=ke.first+ke.size,nt=Math.max(ce.visible.from-ie.options.viewportMargin,ke.first),gt=Math.min(Fe,ce.visible.to+ie.options.viewportMargin);Te.viewFrom<nt&&nt-Te.viewFrom<20&&(nt=Math.max(ke.first,Te.viewFrom)),Te.viewTo>gt&&Te.viewTo-gt<20&&(gt=Math.min(Fe,Te.viewTo)),Ln&&(nt=ni(ie.doc,nt),gt=ci(ie.doc,gt));var Ct=nt!=Te.viewFrom||gt!=Te.viewTo||Te.lastWrapHeight!=ce.wrapperHeight||Te.lastWrapWidth!=ce.wrapperWidth;Xo(ie,nt,gt),Te.viewOffset=Gi(cn(ie.doc,Te.viewFrom)),ie.display.mover.style.top=Te.viewOffset+"px";var bt=Ka(ie);if(!Ct&&bt==0&&!ce.force&&Te.renderedView==Te.view&&(Te.updateLineNumbers==null||Te.updateLineNumbers>=Te.viewTo))return!1;var Bt=Po(ie);return bt>4&&(Te.lineDiv.style.display="none"),Kr(ie,Te.updateLineNumbers,ce.dims),bt>4&&(Te.lineDiv.style.display=""),Te.renderedView=Te.view,wr(Bt),De(Te.cursorDiv),De(Te.selectionDiv),Te.gutters.style.height=Te.sizer.style.minHeight=0,Ct&&(Te.lastWrapHeight=ce.wrapperHeight,Te.lastWrapWidth=ce.wrapperWidth,Si(ie,400)),Te.updateLineNumbers=null,!0}function Wi(ie,ce){for(var Te=ce.viewport,ke=!0;;ke=!1){if(!ke||!ie.options.lineWrapping||ce.oldDisplayWidth==Pa(ie)){if(Te&&Te.top!=null&&(Te={top:Math.min(ie.doc.height+ws(ie.display)-Sa(ie),Te.top)}),ce.visible=bo(ie.display,ie.doc,Te),ce.visible.from>=ie.display.viewFrom&&ce.visible.to<=ie.display.viewTo)break}else ke&&(ce.visible=bo(ie.display,ie.doc,Te));if(!Go(ie,ce))break;Ar(ie);var Fe=po(ie);ea(ie),ya(ie,Fe),ho(ie,Fe),ce.force=!1}ce.signal(ie,"update",ie),(ie.display.viewFrom!=ie.display.reportedViewFrom||ie.display.viewTo!=ie.display.reportedViewTo)&&(ce.signal(ie,"viewportChange",ie,ie.display.viewFrom,ie.display.viewTo),ie.display.reportedViewFrom=ie.display.viewFrom,ie.display.reportedViewTo=ie.display.viewTo)}function To(ie,ce){var Te=new Pi(ie,ce);if(Go(ie,Te)){Ar(ie),Wi(ie,Te);var ke=po(ie);ea(ie),ya(ie,ke),ho(ie,ke),Te.finish()}}function Kr(ie,ce,Te){var ke=ie.display,Fe=ie.options.lineNumbers,nt=ke.lineDiv,gt=nt.firstChild;function Ct(fi){var xi=fi.nextSibling;return be&&oe&&ie.display.currentWheelTarget==fi?fi.style.display="none":fi.parentNode.removeChild(fi),xi}for(var bt=ke.view,Bt=ke.viewFrom,fn=0;fn<bt.length;fn++){var Zt=bt[fn];if(!Zt.hidden)if(!Zt.node||Zt.node.parentNode!=nt){var Tn=Qr(ie,Zt,Bt,Te);nt.insertBefore(Tn,gt)}else{for(;gt!=Zt.node;)gt=Ct(gt);var Cn=Fe&&ce!=null&&ce<=Bt&&Zt.lineNumber;Zt.changes&&(ct(Zt.changes,"gutter")>-1&&(Cn=!1),ss(ie,Zt,Bt,Te)),Cn&&(De(Zt.lineNumber),Zt.lineNumber.appendChild(document.createTextNode(Sn(ie.options,Bt)))),gt=Zt.node.nextSibling}Bt+=Zt.size}for(;gt;)gt=Ct(gt)}function rs(ie){var ce=ie.gutters.offsetWidth;ie.sizer.style.marginLeft=ce+"px"}function ho(ie,ce){ie.display.sizer.style.minHeight=ce.docHeight+"px",ie.display.heightForcer.style.top=ce.docHeight+"px",ie.display.gutters.style.height=ce.docHeight+ie.display.barHeight+is(ie)+"px"}function Vo(ie){var ce=ie.display,Te=ce.view;if(!(!ce.alignWidgets&&(!ce.gutters.firstChild||!ie.options.fixedGutter))){for(var ke=Cu(ce)-ce.scroller.scrollLeft+ie.doc.scrollLeft,Fe=ce.gutters.offsetWidth,nt=ke+"px",gt=0;gt<Te.length;gt++)if(!Te[gt].hidden){ie.options.fixedGutter&&(Te[gt].gutter&&(Te[gt].gutter.style.left=nt),Te[gt].gutterBackground&&(Te[gt].gutterBackground.style.left=nt));var Ct=Te[gt].alignable;if(Ct)for(var bt=0;bt<Ct.length;bt++)Ct[bt].style.left=nt}ie.options.fixedGutter&&(ce.gutters.style.left=ke+Fe+"px")}}function Co(ie){if(!ie.options.lineNumbers)return!1;var ce=ie.doc,Te=Sn(ie.options,ce.first+ce.size-1),ke=ie.display;if(Te.length!=ke.lineNumChars){var Fe=ke.measure.appendChild(Ze("div",[Ze("div",Te)],"CodeMirror-linenumber CodeMirror-gutter-elt")),nt=Fe.firstChild.offsetWidth,gt=Fe.offsetWidth-nt;return ke.lineGutter.style.width="",ke.lineNumInnerWidth=Math.max(nt,ke.lineGutter.offsetWidth-gt)+1,ke.lineNumWidth=ke.lineNumInnerWidth+gt,ke.lineNumChars=ke.lineNumInnerWidth?Te.length:-1,ke.lineGutter.style.width=ke.lineNumWidth+"px",rs(ie.display),!0}return!1}function zr(ie,ce){for(var Te=[],ke=!1,Fe=0;Fe<ie.length;Fe++){var nt=ie[Fe],gt=null;if(typeof nt!="string"&&(gt=nt.style,nt=nt.className),nt=="CodeMirror-linenumbers")if(ce)ke=!0;else continue;Te.push({className:nt,style:gt})}return ce&&!ke&&Te.push({className:"CodeMirror-linenumbers",style:null}),Te}function Ko(ie){var ce=ie.gutters,Te=ie.gutterSpecs;De(ce),ie.lineGutter=null;for(var ke=0;ke<Te.length;++ke){var Fe=Te[ke],nt=Fe.className,gt=Fe.style,Ct=ce.appendChild(Ze("div",null,"CodeMirror-gutter "+nt));gt&&(Ct.style.cssText=gt),nt=="CodeMirror-linenumbers"&&(ie.lineGutter=Ct,Ct.style.width=(ie.lineNumWidth||1)+"px")}ce.style.display=Te.length?"":"none",rs(ie)}function ji(ie){Ko(ie.display),gs(ie),Vo(ie)}function $o(ie,ce,Te,ke){var Fe=this;this.input=Te,Fe.scrollbarFiller=Ze("div",null,"CodeMirror-scrollbar-filler"),Fe.scrollbarFiller.setAttribute("cm-not-content","true"),Fe.gutterFiller=Ze("div",null,"CodeMirror-gutter-filler"),Fe.gutterFiller.setAttribute("cm-not-content","true"),Fe.lineDiv=qe("div",null,"CodeMirror-code"),Fe.selectionDiv=Ze("div",null,null,"position: relative; z-index: 1"),Fe.cursorDiv=Ze("div",null,"CodeMirror-cursors"),Fe.measure=Ze("div",null,"CodeMirror-measure"),Fe.lineMeasure=Ze("div",null,"CodeMirror-measure"),Fe.lineSpace=qe("div",[Fe.measure,Fe.lineMeasure,Fe.selectionDiv,Fe.cursorDiv,Fe.lineDiv],null,"position: relative; outline: none");var nt=qe("div",[Fe.lineSpace],"CodeMirror-lines");Fe.mover=Ze("div",[nt],null,"position: relative"),Fe.sizer=Ze("div",[Fe.mover],"CodeMirror-sizer"),Fe.sizerWidth=null,Fe.heightForcer=Ze("div",null,null,"position: absolute; height: "+yt+"px; width: 1px;"),Fe.gutters=Ze("div",null,"CodeMirror-gutters"),Fe.lineGutter=null,Fe.scroller=Ze("div",[Fe.sizer,Fe.heightForcer,Fe.gutters],"CodeMirror-scroll"),Fe.scroller.setAttribute("tabIndex","-1"),Fe.wrapper=Ze("div",[Fe.scrollbarFiller,Fe.gutterFiller,Fe.scroller],"CodeMirror"),Ce&&xe<8&&(Fe.gutters.style.zIndex=-1,Fe.scroller.style.paddingRight=0),!be&&!(Le&&z)&&(Fe.scroller.draggable=!0),ie&&(ie.appendChild?ie.appendChild(Fe.wrapper):ie(Fe.wrapper)),Fe.viewFrom=Fe.viewTo=ce.first,Fe.reportedViewFrom=Fe.reportedViewTo=ce.first,Fe.view=[],Fe.renderedView=null,Fe.externalMeasured=null,Fe.viewOffset=0,Fe.lastWrapHeight=Fe.lastWrapWidth=0,Fe.updateLineNumbers=null,Fe.nativeBarWidth=Fe.barHeight=Fe.barWidth=0,Fe.scrollbarsClipped=!1,Fe.lineNumWidth=Fe.lineNumInnerWidth=Fe.lineNumChars=null,Fe.alignWidgets=!1,Fe.cachedCharWidth=Fe.cachedTextHeight=Fe.cachedPaddingH=null,Fe.maxLine=null,Fe.maxLineLength=0,Fe.maxLineChanged=!1,Fe.wheelDX=Fe.wheelDY=Fe.wheelStartX=Fe.wheelStartY=null,Fe.shift=!1,Fe.selForContextMenu=null,Fe.activeTouch=null,Fe.gutterSpecs=zr(ke.gutters,ke.lineNumbers),Ko(Fe),Te.init(Fe)}var mo=0,Oo=null;Ce?Oo=-.53:Le?Oo=15:we?Oo=-.7:de&&(Oo=-1/3);function Ks(ie){var ce=ie.wheelDeltaX,Te=ie.wheelDeltaY;return ce==null&&ie.detail&&ie.axis==ie.HORIZONTAL_AXIS&&(ce=ie.detail),Te==null&&ie.detail&&ie.axis==ie.VERTICAL_AXIS?Te=ie.detail:Te==null&&(Te=ie.wheelDelta),{x:ce,y:Te}}function hr(ie){var ce=Ks(ie);return ce.x*=Oo,ce.y*=Oo,ce}function Fo(ie,ce){var Te=Ks(ce),ke=Te.x,Fe=Te.y,nt=ie.display,gt=nt.scroller,Ct=gt.scrollWidth>gt.clientWidth,bt=gt.scrollHeight>gt.clientHeight;if(ke&&Ct||Fe&&bt){if(Fe&&oe&&be){e:for(var Bt=ce.target,fn=nt.view;Bt!=gt;Bt=Bt.parentNode)for(var Zt=0;Zt<fn.length;Zt++)if(fn[Zt].node==Bt){ie.display.currentWheelTarget=Bt;break e}}if(ke&&!Le&&!pe&&Oo!=null){Fe&&bt&&Cl(ie,Math.max(0,gt.scrollTop+Fe*Oo)),Xl(ie,Math.max(0,gt.scrollLeft+ke*Oo)),(!Fe||Fe&&bt)&&ri(ce),nt.wheelStartX=null;return}if(Fe&&Oo!=null){var Tn=Fe*Oo,Cn=ie.doc.scrollTop,fi=Cn+nt.wrapper.clientHeight;Tn<0?Cn=Math.max(0,Cn+Tn-50):fi=Math.min(ie.doc.height,fi+Tn+50),To(ie,{top:Cn,bottom:fi})}mo<20&&(nt.wheelStartX==null?(nt.wheelStartX=gt.scrollLeft,nt.wheelStartY=gt.scrollTop,nt.wheelDX=ke,nt.wheelDY=Fe,setTimeout(function(){if(nt.wheelStartX!=null){var xi=gt.scrollLeft-nt.wheelStartX,Ai=gt.scrollTop-nt.wheelStartY,Xi=Ai&&nt.wheelDY&&Ai/nt.wheelDY||xi&&nt.wheelDX&&xi/nt.wheelDX;nt.wheelStartX=nt.wheelStartY=null,Xi&&(Oo=(Oo*mo+Xi)/(mo+1),++mo)}},200)):(nt.wheelDX+=ke,nt.wheelDY+=Fe))}}var Eo=function(ie,ce){this.ranges=ie,this.primIndex=ce};Eo.prototype.primary=function(){return this.ranges[this.primIndex]},Eo.prototype.equals=function(ie){if(ie==this)return!0;if(ie.primIndex!=this.primIndex||ie.ranges.length!=this.ranges.length)return!1;for(var ce=0;ce<this.ranges.length;ce++){var Te=this.ranges[ce],ke=ie.ranges[ce];if(!Hn(Te.anchor,ke.anchor)||!Hn(Te.head,ke.head))return!1}return!0},Eo.prototype.deepCopy=function(){for(var ie=[],ce=0;ce<this.ranges.length;ce++)ie[ce]=new Or(Gn(this.ranges[ce].anchor),Gn(this.ranges[ce].head));return new Eo(ie,this.primIndex)},Eo.prototype.somethingSelected=function(){for(var ie=0;ie<this.ranges.length;ie++)if(!this.ranges[ie].empty())return!0;return!1},Eo.prototype.contains=function(ie,ce){ce||(ce=ie);for(var Te=0;Te<this.ranges.length;Te++){var ke=this.ranges[Te];if(vn(ce,ke.from())>=0&&vn(ie,ke.to())<=0)return Te}return-1};var Or=function(ie,ce){this.anchor=ie,this.head=ce};Or.prototype.from=function(){return Wn(this.anchor,this.head)},Or.prototype.to=function(){return oi(this.anchor,this.head)},Or.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Xr(ie,ce,Te){var ke=ie&&ie.options.selectionsMayTouch,Fe=ce[Te];ce.sort(function(Tn,Cn){return vn(Tn.from(),Cn.from())}),Te=ct(ce,Fe);for(var nt=1;nt<ce.length;nt++){var gt=ce[nt],Ct=ce[nt-1],bt=vn(Ct.to(),gt.from());if(ke&&!gt.empty()?bt>0:bt>=0){var Bt=Wn(Ct.from(),gt.from()),fn=oi(Ct.to(),gt.to()),Zt=Ct.empty()?gt.from()==gt.head:Ct.from()==Ct.head;nt<=Te&&--Te,ce.splice(--nt,2,new Or(Zt?fn:Bt,Zt?Bt:fn))}}return new Eo(ce,Te)}function Uo(ie,ce){return new Eo([new Or(ie,ce||ie)],0)}function Gr(ie){return ie.text?Kt(ie.from.line+ie.text.length-1,Qt(ie.text).length+(ie.text.length==1?ie.from.ch:0)):ie.to}function Oa(ie,ce){if(vn(ie,ce.from)<0)return ie;if(vn(ie,ce.to)<=0)return Gr(ce);var Te=ie.line+ce.text.length-(ce.to.line-ce.from.line)-1,ke=ie.ch;return ie.line==ce.to.line&&(ke+=Gr(ce).ch-ce.to.ch),Kt(Te,ke)}function Ys(ie,ce){for(var Te=[],ke=0;ke<ie.sel.ranges.length;ke++){var Fe=ie.sel.ranges[ke];Te.push(new Or(Oa(Fe.anchor,ce),Oa(Fe.head,ce)))}return Xr(ie.cm,Te,ie.sel.primIndex)}function ol(ie,ce,Te){return ie.line==ce.line?Kt(Te.line,ie.ch-ce.ch+Te.ch):Kt(Te.line+(ie.line-ce.line),ie.ch)}function ku(ie,ce,Te){for(var ke=[],Fe=Kt(ie.first,0),nt=Fe,gt=0;gt<ce.length;gt++){var Ct=ce[gt],bt=ol(Ct.from,Fe,nt),Bt=ol(Gr(Ct),Fe,nt);if(Fe=Ct.to,nt=Bt,Te=="around"){var fn=ie.sel.ranges[gt],Zt=vn(fn.head,fn.anchor)<0;ke[gt]=new Or(Zt?Bt:bt,Zt?bt:Bt)}else ke[gt]=new Or(bt,bt)}return new Eo(ke,ie.sel.primIndex)}function ao(ie){ie.doc.mode=Ge(ie.options,ie.doc.modeOption),Tu(ie)}function Tu(ie){ie.doc.iter(function(ce){ce.stateAfter&&(ce.stateAfter=null),ce.styles&&(ce.styles=null)}),ie.doc.modeFrontier=ie.doc.highlightFrontier=ie.doc.first,Si(ie,100),ie.state.modeGen++,ie.curOp&&gs(ie)}function vo(ie,ce){return ce.from.ch==0&&ce.to.ch==0&&Qt(ce.text)==""&&(!ie.cm||ie.cm.options.wholeLineUpdateBefore)}function qo(ie,ce,Te,ke){function Fe(Pr){return Te?Te[Pr]:null}function nt(Pr,lr,Ir){jr(Pr,lr,Ir,ke),nr(Pr,"change",Pr,ce)}function gt(Pr,lr){for(var Ir=[],lo=Pr;lo<lr;++lo)Ir.push(new Zr(Bt[lo],Fe(lo),ke));return Ir}var Ct=ce.from,bt=ce.to,Bt=ce.text,fn=cn(ie,Ct.line),Zt=cn(ie,bt.line),Tn=Qt(Bt),Cn=Fe(Bt.length-1),fi=bt.line-Ct.line;if(ce.full)ie.insert(0,gt(0,Bt.length)),ie.remove(Bt.length,ie.size-Bt.length);else if(vo(ie,ce)){var xi=gt(0,Bt.length-1);nt(Zt,Zt.text,Cn),fi&&ie.remove(Ct.line,fi),xi.length&&ie.insert(Ct.line,xi)}else if(fn==Zt)if(Bt.length==1)nt(fn,fn.text.slice(0,Ct.ch)+Tn+fn.text.slice(bt.ch),Cn);else{var Ai=gt(1,Bt.length-1);Ai.push(new Zr(Tn+fn.text.slice(bt.ch),Cn,ke)),nt(fn,fn.text.slice(0,Ct.ch)+Bt[0],Fe(0)),ie.insert(Ct.line+1,Ai)}else if(Bt.length==1)nt(fn,fn.text.slice(0,Ct.ch)+Bt[0]+Zt.text.slice(bt.ch),Fe(0)),ie.remove(Ct.line+1,fi);else{nt(fn,fn.text.slice(0,Ct.ch)+Bt[0],Fe(0)),nt(Zt,Tn+Zt.text.slice(bt.ch),Cn);var Xi=gt(1,Bt.length-1);fi>1&&ie.remove(Ct.line+1,fi-1),ie.insert(Ct.line+1,Xi)}nr(ie,"change",ie,ce)}function Rs(ie,ce,Te){function ke(Fe,nt,gt){if(Fe.linked)for(var Ct=0;Ct<Fe.linked.length;++Ct){var bt=Fe.linked[Ct];if(bt.doc!=nt){var Bt=gt&&bt.sharedHist;Te&&!Bt||(ce(bt.doc,Bt),ke(bt.doc,Fe,Bt))}}}ke(ie,null,!0)}function Au(ie,ce){if(ce.cm)throw new Error("This document is already in use.");ie.doc=ce,ce.cm=ie,Rr(ie),ao(ie),Ia(ie),ie.options.lineWrapping||Ji(ie),ie.options.mode=ce.modeOption,gs(ie)}function Ia(ie){(ie.doc.direction=="rtl"?Mt:Ae)(ie.display.lineDiv,"CodeMirror-rtl")}function $c(ie){qt(ie,function(){Ia(ie),gs(ie)})}function gl(ie){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=ie||1}function ta(ie,ce){var Te={from:Gn(ce.from),to:Gr(ce),text:On(ie,ce.from,ce.to)};return aa(ie,Te,ce.from.line,ce.to.line+1),Rs(ie,function(ke){return aa(ke,Te,ce.from.line,ce.to.line+1)},!0),Te}function ql(ie){for(;ie.length;){var ce=Qt(ie);if(ce.ranges)ie.pop();else break}}function yc(ie,ce){if(ce)return ql(ie.done),Qt(ie.done);if(ie.done.length&&!Qt(ie.done).ranges)return Qt(ie.done);if(ie.done.length>1&&!ie.done[ie.done.length-2].ranges)return ie.done.pop(),Qt(ie.done)}function Sc(ie,ce,Te,ke){var Fe=ie.history;Fe.undone.length=0;var nt=+new Date,gt,Ct;if((Fe.lastOp==ke||Fe.lastOrigin==ce.origin&&ce.origin&&(ce.origin.charAt(0)=="+"&&Fe.lastModTime>nt-(ie.cm?ie.cm.options.historyEventDelay:500)||ce.origin.charAt(0)=="*"))&&(gt=yc(Fe,Fe.lastOp==ke)))Ct=Qt(gt.changes),vn(ce.from,ce.to)==0&&vn(ce.from,Ct.to)==0?Ct.to=Gr(ce):gt.changes.push(ta(ie,ce));else{var bt=Qt(Fe.done);for((!bt||!bt.ranges)&&Ds(ie.sel,Fe.done),gt={changes:[ta(ie,ce)],generation:Fe.generation},Fe.done.push(gt);Fe.done.length>Fe.undoDepth;)Fe.done.shift(),Fe.done[0].ranges||Fe.done.shift()}Fe.done.push(Te),Fe.generation=++Fe.maxGeneration,Fe.lastModTime=Fe.lastSelTime=nt,Fe.lastOp=Fe.lastSelOp=ke,Fe.lastOrigin=Fe.lastSelOrigin=ce.origin,Ct||yn(ie,"historyAdded")}function Td(ie,ce,Te,ke){var Fe=ce.charAt(0);return Fe=="*"||Fe=="+"&&Te.ranges.length==ke.ranges.length&&Te.somethingSelected()==ke.somethingSelected()&&new Date-ie.history.lastSelTime<=(ie.cm?ie.cm.options.historyEventDelay:500)}function yo(ie,ce,Te,ke){var Fe=ie.history,nt=ke&&ke.origin;Te==Fe.lastSelOp||nt&&Fe.lastSelOrigin==nt&&(Fe.lastModTime==Fe.lastSelTime&&Fe.lastOrigin==nt||Td(ie,nt,Qt(Fe.done),ce))?Fe.done[Fe.done.length-1]=ce:Ds(ce,Fe.done),Fe.lastSelTime=+new Date,Fe.lastSelOrigin=nt,Fe.lastSelOp=Te,ke&&ke.clearRedo!==!1&&ql(Fe.undone)}function Ds(ie,ce){var Te=Qt(ce);Te&&Te.ranges&&Te.equals(ie)||ce.push(ie)}function aa(ie,ce,Te,ke){var Fe=ce["spans_"+ie.id],nt=0;ie.iter(Math.max(ie.first,Te),Math.min(ie.first+ie.size,ke),function(gt){gt.markedSpans&&((Fe||(Fe=ce["spans_"+ie.id]={}))[nt]=gt.markedSpans),++nt})}function Gs(ie){if(!ie)return null;for(var ce,Te=0;Te<ie.length;++Te)ie[Te].marker.explicitlyCleared?ce||(ce=ie.slice(0,Te)):ce&&ce.push(ie[Te]);return ce?ce.length?ce:null:ie}function xs(ie,ce){var Te=ce["spans_"+ie.id];if(!Te)return null;for(var ke=[],Fe=0;Fe<ce.text.length;++Fe)ke.push(Gs(Te[Fe]));return ke}function Ql(ie,ce){var Te=xs(ie,ce),ke=_o(ie,ce);if(!Te)return ke;if(!ke)return Te;for(var Fe=0;Fe<Te.length;++Fe){var nt=Te[Fe],gt=ke[Fe];if(nt&>)e:for(var Ct=0;Ct<gt.length;++Ct){for(var bt=gt[Ct],Bt=0;Bt<nt.length;++Bt)if(nt[Bt].marker==bt.marker)continue e;nt.push(bt)}else gt&&(Te[Fe]=gt)}return Te}function El(ie,ce,Te){for(var ke=[],Fe=0;Fe<ie.length;++Fe){var nt=ie[Fe];if(nt.ranges){ke.push(Te?Eo.prototype.deepCopy.call(nt):nt);continue}var gt=nt.changes,Ct=[];ke.push({changes:Ct});for(var bt=0;bt<gt.length;++bt){var Bt=gt[bt],fn=void 0;if(Ct.push({from:Bt.from,to:Bt.to,text:Bt.text}),ce)for(var Zt in Bt)(fn=Zt.match(/^spans_(\d+)$/))&&ct(ce,Number(fn[1]))>-1&&(Qt(Ct)[Zt]=Bt[Zt],delete Bt[Zt])}}return ke}function rh(ie,ce,Te,ke){if(ke){var Fe=ie.anchor;if(Te){var nt=vn(ce,Fe)<0;nt!=vn(Te,Fe)<0?(Fe=ce,ce=Te):nt!=vn(ce,Te)<0&&(ce=Te)}return new Or(Fe,ce)}else return new Or(Te||ce,ce)}function Lh(ie,ce,Te,ke,Fe){Fe==null&&(Fe=ie.cm&&(ie.cm.display.shift||ie.extend)),sl(ie,new Eo([rh(ie.sel.primary(),ce,Te,Fe)],0),ke)}function oh(ie,ce,Te){for(var ke=[],Fe=ie.cm&&(ie.cm.display.shift||ie.extend),nt=0;nt<ie.sel.ranges.length;nt++)ke[nt]=rh(ie.sel.ranges[nt],ce[nt],null,Fe);var gt=Xr(ie.cm,ke,ie.sel.primIndex);sl(ie,gt,Te)}function sh(ie,ce,Te,ke){var Fe=ie.sel.ranges.slice(0);Fe[ce]=Te,sl(ie,Xr(ie.cm,Fe,ie.sel.primIndex),ke)}function du(ie,ce,Te,ke){sl(ie,Uo(ce,Te),ke)}function mf(ie,ce,Te){var ke={ranges:ce.ranges,update:function(Fe){this.ranges=[];for(var nt=0;nt<Fe.length;nt++)this.ranges[nt]=new Or(Mn(ie,Fe[nt].anchor),Mn(ie,Fe[nt].head))},origin:Te&&Te.origin};return yn(ie,"beforeSelectionChange",ie,ke),ie.cm&&yn(ie.cm,"beforeSelectionChange",ie.cm,ke),ke.ranges!=ce.ranges?Xr(ie.cm,ke.ranges,ke.ranges.length-1):ce}function vf(ie,ce,Te){var ke=ie.history.done,Fe=Qt(ke);Fe&&Fe.ranges?(ke[ke.length-1]=ce,xc(ie,ce,Te)):sl(ie,ce,Te)}function sl(ie,ce,Te){xc(ie,ce,Te),yo(ie,ie.sel,ie.cm?ie.cm.curOp.id:NaN,Te)}function xc(ie,ce,Te){(mn(ie,"beforeSelectionChange")||ie.cm&&mn(ie.cm,"beforeSelectionChange"))&&(ce=mf(ie,ce,Te));var ke=Te&&Te.bias||(vn(ce.primary().head,ie.sel.primary().head)<0?-1:1);xp(ie,Nd(ie,ce,ke,!0)),!(Te&&Te.scroll===!1)&&ie.cm&&Yl(ie.cm)}function xp(ie,ce){ce.equals(ie.sel)||(ie.sel=ce,ie.cm&&(ie.cm.curOp.updateInput=1,ie.cm.curOp.selectionChanged=!0,Jn(ie.cm)),nr(ie,"cursorActivity",ie))}function Ad(ie){xp(ie,Nd(ie,ie.sel,null,!1))}function Nd(ie,ce,Te,ke){for(var Fe,nt=0;nt<ce.ranges.length;nt++){var gt=ce.ranges[nt],Ct=ce.ranges.length==ie.sel.ranges.length&&ie.sel.ranges[nt],bt=Dd(ie,gt.anchor,Ct&&Ct.anchor,Te,ke),Bt=Dd(ie,gt.head,Ct&&Ct.head,Te,ke);(Fe||bt!=gt.anchor||Bt!=gt.head)&&(Fe||(Fe=ce.ranges.slice(0,nt)),Fe[nt]=new Or(bt,Bt))}return Fe?Xr(ie.cm,Fe,ce.primIndex):ce}function Mh(ie,ce,Te,ke,Fe){var nt=cn(ie,ce.line);if(nt.markedSpans)for(var gt=0;gt<nt.markedSpans.length;++gt){var Ct=nt.markedSpans[gt],bt=Ct.marker,Bt="selectLeft"in bt?!bt.selectLeft:bt.inclusiveLeft,fn="selectRight"in bt?!bt.selectRight:bt.inclusiveRight;if((Ct.from==null||(Bt?Ct.from<=ce.ch:Ct.from<ce.ch))&&(Ct.to==null||(fn?Ct.to>=ce.ch:Ct.to>ce.ch))){if(Fe&&(yn(bt,"beforeCursorEnter"),bt.explicitlyCleared))if(nt.markedSpans){--gt;continue}else break;if(!bt.atomic)continue;if(Te){var Zt=bt.find(ke<0?1:-1),Tn=void 0;if((ke<0?fn:Bt)&&(Zt=wp(ie,Zt,-ke,Zt&&Zt.line==ce.line?nt:null)),Zt&&Zt.line==ce.line&&(Tn=vn(Zt,Te))&&(ke<0?Tn<0:Tn>0))return Mh(ie,Zt,ce,ke,Fe)}var Cn=bt.find(ke<0?-1:1);return(ke<0?Bt:fn)&&(Cn=wp(ie,Cn,ke,Cn.line==ce.line?nt:null)),Cn?Mh(ie,Cn,ce,ke,Fe):null}}return ce}function Dd(ie,ce,Te,ke,Fe){var nt=ke||1,gt=Mh(ie,ce,Te,nt,Fe)||!Fe&&Mh(ie,ce,Te,nt,!0)||Mh(ie,ce,Te,-nt,Fe)||!Fe&&Mh(ie,ce,Te,-nt,!0);return gt||(ie.cantEdit=!0,Kt(ie.first,0))}function wp(ie,ce,Te,ke){return Te<0&&ce.ch==0?ce.line>ie.first?Mn(ie,Kt(ce.line-1)):null:Te>0&&ce.ch==(ke||cn(ie,ce.line)).text.length?ce.line<ie.first+ie.size-1?Kt(ce.line+1,0):null:new Kt(ce.line,ce.ch+Te)}function ca(ie){ie.setSelection(Kt(ie.firstLine(),0),Kt(ie.lastLine()),xt)}function Od(ie,ce,Te){var ke={canceled:!1,from:ce.from,to:ce.to,text:ce.text,origin:ce.origin,cancel:function(){return ke.canceled=!0}};return Te&&(ke.update=function(Fe,nt,gt,Ct){Fe&&(ke.from=Mn(ie,Fe)),nt&&(ke.to=Mn(ie,nt)),gt&&(ke.text=gt),Ct!==void 0&&(ke.origin=Ct)}),yn(ie,"beforeChange",ie,ke),ie.cm&&yn(ie.cm,"beforeChange",ie.cm,ke),ke.canceled?(ie.cm&&(ie.cm.curOp.updateInput=2),null):{from:ke.from,to:ke.to,text:ke.text,origin:ke.origin}}function Zh(ie,ce,Te){if(ie.cm){if(!ie.cm.curOp)return Bi(ie.cm,Zh)(ie,ce,Te);if(ie.cm.state.suppressEdits)return}if(!((mn(ie,"beforeChange")||ie.cm&&mn(ie.cm,"beforeChange"))&&(ce=Od(ie,ce,!0),!ce))){var ke=Yr&&!Te&&Nn(ie,ce.from,ce.to);if(ke)for(var Fe=ke.length-1;Fe>=0;--Fe)wc(ie,{from:ke[Fe].from,to:ke[Fe].to,text:Fe?[""]:ce.text,origin:ce.origin});else wc(ie,ce)}}function wc(ie,ce){if(!(ce.text.length==1&&ce.text[0]==""&&vn(ce.from,ce.to)==0)){var Te=Ys(ie,ce);Sc(ie,ce,Te,ie.cm?ie.cm.curOp.id:NaN),ed(ie,ce,Te,_o(ie,ce));var ke=[];Rs(ie,function(Fe,nt){!nt&&ct(ke,Fe.history)==-1&&(bp(Fe.history,ce),ke.push(Fe.history)),ed(Fe,ce,null,_o(Fe,ce))})}}function Id(ie,ce,Te){var ke=ie.cm&&ie.cm.state.suppressEdits;if(!(ke&&!Te)){for(var Fe=ie.history,nt,gt=ie.sel,Ct=ce=="undo"?Fe.done:Fe.undone,bt=ce=="undo"?Fe.undone:Fe.done,Bt=0;Bt<Ct.length&&(nt=Ct[Bt],!(Te?nt.ranges&&!nt.equals(ie.sel):!nt.ranges));Bt++);if(Bt!=Ct.length){for(Fe.lastOrigin=Fe.lastSelOrigin=null;;)if(nt=Ct.pop(),nt.ranges){if(Ds(nt,bt),Te&&!nt.equals(ie.sel)){sl(ie,nt,{clearRedo:!1});return}gt=nt}else if(ke){Ct.push(nt);return}else break;var fn=[];Ds(gt,bt),bt.push({changes:fn,generation:Fe.generation}),Fe.generation=nt.generation||++Fe.maxGeneration;for(var Zt=mn(ie,"beforeChange")||ie.cm&&mn(ie.cm,"beforeChange"),Tn=function(xi){var Ai=nt.changes[xi];if(Ai.origin=ce,Zt&&!Od(ie,Ai,!1))return Ct.length=0,{};fn.push(ta(ie,Ai));var Xi=xi?Ys(ie,Ai):Qt(Ct);ed(ie,Ai,Xi,Ql(ie,Ai)),!xi&&ie.cm&&ie.cm.scrollIntoView({from:Ai.from,to:Gr(Ai)});var Pr=[];Rs(ie,function(lr,Ir){!Ir&&ct(Pr,lr.history)==-1&&(bp(lr.history,Ai),Pr.push(lr.history)),ed(lr,Ai,null,Ql(lr,Ai))})},Cn=nt.changes.length-1;Cn>=0;--Cn){var fi=Tn(Cn);if(fi)return fi.v}}}}function _p(ie,ce){if(ce!=0&&(ie.first+=ce,ie.sel=new Eo(Yt(ie.sel.ranges,function(Fe){return new Or(Kt(Fe.anchor.line+ce,Fe.anchor.ch),Kt(Fe.head.line+ce,Fe.head.ch))}),ie.sel.primIndex),ie.cm)){gs(ie.cm,ie.first,ie.first-ce,ce);for(var Te=ie.cm.display,ke=Te.viewFrom;ke<Te.viewTo;ke++)to(ie.cm,ke,"gutter")}}function ed(ie,ce,Te,ke){if(ie.cm&&!ie.cm.curOp)return Bi(ie.cm,ed)(ie,ce,Te,ke);if(ce.to.line<ie.first){_p(ie,ce.text.length-1-(ce.to.line-ce.from.line));return}if(!(ce.from.line>ie.lastLine())){if(ce.from.line<ie.first){var Fe=ce.text.length-1-(ie.first-ce.from.line);_p(ie,Fe),ce={from:Kt(ie.first,0),to:Kt(ce.to.line+Fe,ce.to.ch),text:[Qt(ce.text)],origin:ce.origin}}var nt=ie.lastLine();ce.to.line>nt&&(ce={from:ce.from,to:Kt(nt,cn(ie,nt).text.length),text:[ce.text[0]],origin:ce.origin}),ce.removed=On(ie,ce.from,ce.to),Te||(Te=Ys(ie,ce)),ie.cm?Kg(ie.cm,ce,ke):qo(ie,ce,ke),xc(ie,Te,xt),ie.cantEdit&&Dd(ie,Kt(ie.firstLine(),0))&&(ie.cantEdit=!1)}}function Kg(ie,ce,Te){var ke=ie.doc,Fe=ie.display,nt=ce.from,gt=ce.to,Ct=!1,bt=nt.line;ie.options.lineWrapping||(bt=Lt(Un(cn(ke,nt.line))),ke.iter(bt,gt.line+1,function(Cn){if(Cn==Fe.maxLine)return Ct=!0,!0})),ke.sel.contains(ce.from,ce.to)>-1&&Jn(ie),qo(ke,ce,Te,ps(ie)),ie.options.lineWrapping||(ke.iter(bt,nt.line+ce.text.length,function(Cn){var fi=Mr(Cn);fi>Fe.maxLineLength&&(Fe.maxLine=Cn,Fe.maxLineLength=fi,Fe.maxLineChanged=!0,Ct=!1)}),Ct&&(ie.curOp.updateMaxLine=!0)),_r(ke,nt.line),Si(ie,400);var Bt=ce.text.length-(gt.line-nt.line)-1;ce.full?gs(ie):nt.line==gt.line&&ce.text.length==1&&!vo(ie.doc,ce)?to(ie,nt.line,"text"):gs(ie,nt.line,gt.line+1,Bt);var fn=mn(ie,"changes"),Zt=mn(ie,"change");if(Zt||fn){var Tn={from:nt,to:gt,text:ce.text,removed:ce.removed,origin:ce.origin};Zt&&nr(ie,"change",ie,Tn),fn&&(ie.curOp.changeObjs||(ie.curOp.changeObjs=[])).push(Tn)}ie.display.selForContextMenu=null}function _c(ie,ce,Te,ke,Fe){var nt;ke||(ke=Te),vn(ke,Te)<0&&(nt=[ke,Te],Te=nt[0],ke=nt[1]),typeof ce=="string"&&(ce=ie.splitLines(ce)),Zh(ie,{from:Te,to:ke,text:ce,origin:Fe})}function fu(ie,ce,Te,ke){Te<ie.line?ie.line+=ke:ce<ie.line&&(ie.line=ce,ie.ch=0)}function Yg(ie,ce,Te,ke){for(var Fe=0;Fe<ie.length;++Fe){var nt=ie[Fe],gt=!0;if(nt.ranges){nt.copied||(nt=ie[Fe]=nt.deepCopy(),nt.copied=!0);for(var Ct=0;Ct<nt.ranges.length;Ct++)fu(nt.ranges[Ct].anchor,ce,Te,ke),fu(nt.ranges[Ct].head,ce,Te,ke);continue}for(var bt=0;bt<nt.changes.length;++bt){var Bt=nt.changes[bt];if(Te<Bt.from.line)Bt.from=Kt(Bt.from.line+ke,Bt.from.ch),Bt.to=Kt(Bt.to.line+ke,Bt.to.ch);else if(ce<=Bt.to.line){gt=!1;break}}gt||(ie.splice(0,Fe+1),Fe=0)}}function bp(ie,ce){var Te=ce.from.line,ke=ce.to.line,Fe=ce.text.length-(ke-Te)-1;Yg(ie.done,Te,ke,Fe),Yg(ie.undone,Te,ke,Fe)}function bc(ie,ce,Te,ke){var Fe=ce,nt=ce;return typeof ce=="number"?nt=cn(ie,zn(ie,ce)):Fe=Lt(ce),Fe==null?null:(ke(nt,Fe)&&ie.cm&&to(ie.cm,Fe,Te),nt)}function td(ie){this.lines=ie,this.parent=null;for(var ce=0,Te=0;Te<ie.length;++Te)ie[Te].parent=this,ce+=ie[Te].height;this.height=ce}td.prototype={chunkSize:function(){return this.lines.length},removeInner:function(ie,ce){for(var Te=ie,ke=ie+ce;Te<ke;++Te){var Fe=this.lines[Te];this.height-=Fe.height,$r(Fe),nr(Fe,"delete")}this.lines.splice(ie,ce)},collapse:function(ie){ie.push.apply(ie,this.lines)},insertInner:function(ie,ce,Te){this.height+=Te,this.lines=this.lines.slice(0,ie).concat(ce).concat(this.lines.slice(ie));for(var ke=0;ke<ce.length;++ke)ce[ke].parent=this},iterN:function(ie,ce,Te){for(var ke=ie+ce;ie<ke;++ie)if(Te(this.lines[ie]))return!0}};function Xs(ie){this.children=ie;for(var ce=0,Te=0,ke=0;ke<ie.length;++ke){var Fe=ie[ke];ce+=Fe.chunkSize(),Te+=Fe.height,Fe.parent=this}this.size=ce,this.height=Te,this.parent=null}Xs.prototype={chunkSize:function(){return this.size},removeInner:function(ie,ce){this.size-=ce;for(var Te=0;Te<this.children.length;++Te){var ke=this.children[Te],Fe=ke.chunkSize();if(ie<Fe){var nt=Math.min(ce,Fe-ie),gt=ke.height;if(ke.removeInner(ie,nt),this.height-=gt-ke.height,Fe==nt&&(this.children.splice(Te--,1),ke.parent=null),(ce-=nt)==0)break;ie=0}else ie-=Fe}if(this.size-ce<25&&(this.children.length>1||!(this.children[0]instanceof td))){var Ct=[];this.collapse(Ct),this.children=[new td(Ct)],this.children[0].parent=this}},collapse:function(ie){for(var ce=0;ce<this.children.length;++ce)this.children[ce].collapse(ie)},insertInner:function(ie,ce,Te){this.size+=ce.length,this.height+=Te;for(var ke=0;ke<this.children.length;++ke){var Fe=this.children[ke],nt=Fe.chunkSize();if(ie<=nt){if(Fe.insertInner(ie,ce,Te),Fe.lines&&Fe.lines.length>50){for(var gt=Fe.lines.length%25+25,Ct=gt;Ct<Fe.lines.length;){var bt=new td(Fe.lines.slice(Ct,Ct+=25));Fe.height-=bt.height,this.children.splice(++ke,0,bt),bt.parent=this}Fe.lines=Fe.lines.slice(0,gt),this.maybeSpill()}break}ie-=nt}},maybeSpill:function(){if(!(this.children.length<=10)){var ie=this;do{var ce=ie.children.splice(ie.children.length-5,5),Te=new Xs(ce);if(ie.parent){ie.size-=Te.size,ie.height-=Te.height;var Fe=ct(ie.parent.children,ie);ie.parent.children.splice(Fe+1,0,Te)}else{var ke=new Xs(ie.children);ke.parent=ie,ie.children=[ke,Te],ie=ke}Te.parent=ie.parent}while(ie.children.length>10);ie.parent.maybeSpill()}},iterN:function(ie,ce,Te){for(var ke=0;ke<this.children.length;++ke){var Fe=this.children[ke],nt=Fe.chunkSize();if(ie<nt){var gt=Math.min(ce,nt-ie);if(Fe.iterN(ie,gt,Te))return!0;if((ce-=gt)==0)break;ie=0}else ie-=nt}}};var kh=function(ie,ce,Te){if(Te)for(var ke in Te)Te.hasOwnProperty(ke)&&(this[ke]=Te[ke]);this.doc=ie,this.node=ce};kh.prototype.clear=function(){var ie=this.doc.cm,ce=this.line.widgets,Te=this.line,ke=Lt(Te);if(!(ke==null||!ce)){for(var Fe=0;Fe<ce.length;++Fe)ce[Fe]==this&&ce.splice(Fe--,1);ce.length||(Te.widgets=null);var nt=fs(this);Fn(Te,Math.max(0,Te.height-nt)),ie&&(qt(ie,function(){Xg(ie,Te,-nt),to(ie,ke,"widget")}),nr(ie,"lineWidgetCleared",ie,this,ke))}},kh.prototype.changed=function(){var ie=this,ce=this.height,Te=this.doc.cm,ke=this.line;this.height=null;var Fe=fs(this)-ce;Fe&&(wn(this.doc,ke)||Fn(ke,ke.height+Fe),Te&&qt(Te,function(){Te.curOp.forceUpdate=!0,Xg(Te,ke,Fe),nr(Te,"lineWidgetChanged",Te,ie,Lt(ke))}))},Yn(kh);function Xg(ie,ce,Te){Gi(ce)<(ie.curOp&&ie.curOp.scrollTop||ie.doc.scrollTop)&&Ph(ie,Te)}function yf(ie,ce,Te,ke){var Fe=new kh(ie,Te,ke),nt=ie.cm;return nt&&Fe.noHScroll&&(nt.display.alignWidgets=!0),bc(ie,ce,"widget",function(gt){var Ct=gt.widgets||(gt.widgets=[]);if(Fe.insertAt==null?Ct.push(Fe):Ct.splice(Math.min(Ct.length-1,Math.max(0,Fe.insertAt)),0,Fe),Fe.line=gt,nt&&!wn(ie,gt)){var bt=Gi(gt)<ie.scrollTop;Fn(gt,gt.height+fs(Fe)),bt&&Ph(nt,Fe.height),nt.curOp.forceUpdate=!0}return!0}),nt&&nr(nt,"lineWidgetAdded",nt,Fe,typeof ce=="number"?ce:Lt(ce)),Fe}var Jg=0,rn=function(ie,ce){this.lines=[],this.type=ce,this.doc=ie,this.id=++Jg};rn.prototype.clear=function(){if(!this.explicitlyCleared){var ie=this.doc.cm,ce=ie&&!ie.curOp;if(ce&&Ya(ie),mn(this,"clear")){var Te=this.find();Te&&nr(this,"clear",Te.from,Te.to)}for(var ke=null,Fe=null,nt=0;nt<this.lines.length;++nt){var gt=this.lines[nt],Ct=Lr(gt.markedSpans,this);ie&&!this.collapsed?to(ie,Lt(gt),"text"):ie&&(Ct.to!=null&&(Fe=Lt(gt)),Ct.from!=null&&(ke=Lt(gt))),gt.markedSpans=sr(gt.markedSpans,Ct),Ct.from==null&&this.collapsed&&!wn(this.doc,gt)&&ie&&Fn(gt,sa(ie.display))}if(ie&&this.collapsed&&!ie.options.lineWrapping)for(var bt=0;bt<this.lines.length;++bt){var Bt=Un(this.lines[bt]),fn=Mr(Bt);fn>ie.display.maxLineLength&&(ie.display.maxLine=Bt,ie.display.maxLineLength=fn,ie.display.maxLineChanged=!0)}ke!=null&&ie&&this.collapsed&&gs(ie,ke,Fe+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,ie&&Ad(ie.doc)),ie&&nr(ie,"markerCleared",ie,this,ke,Fe),ce&&Jl(ie),this.parent&&this.parent.clear()}},rn.prototype.find=function(ie,ce){ie==null&&this.type=="bookmark"&&(ie=1);for(var Te,ke,Fe=0;Fe<this.lines.length;++Fe){var nt=this.lines[Fe],gt=Lr(nt.markedSpans,this);if(gt.from!=null&&(Te=Kt(ce?nt:Lt(nt),gt.from),ie==-1))return Te;if(gt.to!=null&&(ke=Kt(ce?nt:Lt(nt),gt.to),ie==1))return ke}return Te&&{from:Te,to:ke}},rn.prototype.changed=function(){var ie=this,ce=this.find(-1,!0),Te=this,ke=this.doc.cm;!ce||!ke||qt(ke,function(){var Fe=ce.line,nt=Lt(ce.line),gt=fl(ke,nt);if(gt&&(th(gt),ke.curOp.selectionChanged=ke.curOp.forceUpdate=!0),ke.curOp.updateMaxLine=!0,!wn(Te.doc,Fe)&&Te.height!=null){var Ct=Te.height;Te.height=null;var bt=fs(Te)-Ct;bt&&Fn(Fe,Fe.height+bt)}nr(ke,"markerChanged",ke,ie)})},rn.prototype.attachLine=function(ie){if(!this.lines.length&&this.doc.cm){var ce=this.doc.cm.curOp;(!ce.maybeHiddenMarkers||ct(ce.maybeHiddenMarkers,this)==-1)&&(ce.maybeUnhiddenMarkers||(ce.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(ie)},rn.prototype.detachLine=function(ie){if(this.lines.splice(ct(this.lines,ie),1),!this.lines.length&&this.doc.cm){var ce=this.doc.cm.curOp;(ce.maybeHiddenMarkers||(ce.maybeHiddenMarkers=[])).push(this)}},Yn(rn);function Pc(ie,ce,Te,ke,Fe){if(ke&&ke.shared)return qg(ie,ce,Te,ke,Fe);if(ie.cm&&!ie.cm.curOp)return Bi(ie.cm,Pc)(ie,ce,Te,ke,Fe);var nt=new rn(ie,Fe),gt=vn(ce,Te);if(ke&&Rt(ke,nt,!1),gt>0||gt==0&&nt.clearWhenEmpty!==!1)return nt;if(nt.replacedWith&&(nt.collapsed=!0,nt.widgetNode=qe("span",[nt.replacedWith],"CodeMirror-widget"),ke.handleMouseEvents||nt.widgetNode.setAttribute("cm-ignore-events","true"),ke.insertLeft&&(nt.widgetNode.insertLeft=!0)),nt.collapsed){if($n(ie,ce.line,ce,Te,nt)||ce.line!=Te.line&&$n(ie,Te.line,ce,Te,nt))throw new Error("Inserting collapsed marker partially overlapping an existing one");kn()}nt.addToHistory&&Sc(ie,{from:ce,to:Te,origin:"markText"},ie.sel,NaN);var Ct=ce.line,bt=ie.cm,Bt;if(ie.iter(Ct,Te.line+1,function(Zt){bt&&nt.collapsed&&!bt.options.lineWrapping&&Un(Zt)==bt.display.maxLine&&(Bt=!0),nt.collapsed&&Ct!=ce.line&&Fn(Zt,0),so(Zt,new Di(nt,Ct==ce.line?ce.ch:null,Ct==Te.line?Te.ch:null)),++Ct}),nt.collapsed&&ie.iter(ce.line,Te.line+1,function(Zt){wn(ie,Zt)&&Fn(Zt,0)}),nt.clearOnEnter&&Gt(nt,"beforeCursorEnter",function(){return nt.clear()}),nt.readOnly&&(oo(),(ie.history.done.length||ie.history.undone.length)&&ie.clearHistory()),nt.collapsed&&(nt.id=++Jg,nt.atomic=!0),bt){if(Bt&&(bt.curOp.updateMaxLine=!0),nt.collapsed)gs(bt,ce.line,Te.line+1);else if(nt.className||nt.startStyle||nt.endStyle||nt.css||nt.attributes||nt.title)for(var fn=ce.line;fn<=Te.line;fn++)to(bt,fn,"text");nt.atomic&&Ad(bt.doc),nr(bt,"markerAdded",bt,nt)}return nt}var ah=function(ie,ce){this.markers=ie,this.primary=ce;for(var Te=0;Te<ie.length;++Te)ie[Te].parent=this};ah.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var ie=0;ie<this.markers.length;++ie)this.markers[ie].clear();nr(this,"clear")}},ah.prototype.find=function(ie,ce){return this.primary.find(ie,ce)},Yn(ah);function qg(ie,ce,Te,ke,Fe){ke=Rt(ke),ke.shared=!1;var nt=[Pc(ie,ce,Te,ke,Fe)],gt=nt[0],Ct=ke.widgetNode;return Rs(ie,function(bt){Ct&&(ke.widgetNode=Ct.cloneNode(!0)),nt.push(Pc(bt,Mn(bt,ce),Mn(bt,Te),ke,Fe));for(var Bt=0;Bt<bt.linked.length;++Bt)if(bt.linked[Bt].isParent)return;gt=Qt(nt)}),new ah(nt,gt)}function Pp(ie){return ie.findMarks(Kt(ie.first,0),ie.clipPos(Kt(ie.lastLine())),function(ce){return ce.parent})}function Qg(ie,ce){for(var Te=0;Te<ce.length;Te++){var ke=ce[Te],Fe=ke.find(),nt=ie.clipPos(Fe.from),gt=ie.clipPos(Fe.to);if(vn(nt,gt)){var Ct=Pc(ie,nt,gt,ke.primary,ke.primary.type);ke.markers.push(Ct),Ct.parent=ke}}}function Cp(ie){for(var ce=function(ke){var Fe=ie[ke],nt=[Fe.primary.doc];Rs(Fe.primary.doc,function(bt){return nt.push(bt)});for(var gt=0;gt<Fe.markers.length;gt++){var Ct=Fe.markers[gt];ct(nt,Ct.doc)==-1&&(Ct.parent=null,Fe.markers.splice(gt--,1))}},Te=0;Te<ie.length;Te++)ce(Te)}var tv=0,Xa=function(ie,ce,Te,ke,Fe){if(!(this instanceof Xa))return new Xa(ie,ce,Te,ke,Fe);Te==null&&(Te=0),Xs.call(this,[new td([new Zr("",null)])]),this.first=Te,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=Te;var nt=Kt(Te,0);this.sel=Uo(nt),this.history=new gl(null),this.id=++tv,this.modeOption=ce,this.lineSep=ke,this.direction=Fe=="rtl"?"rtl":"ltr",this.extend=!1,typeof ie=="string"&&(ie=this.splitLines(ie)),qo(this,{from:nt,to:nt,text:ie}),sl(this,Uo(nt),xt)};Xa.prototype=Ue(Xs.prototype,{constructor:Xa,iter:function(ie,ce,Te){Te?this.iterN(ie-this.first,ce-ie,Te):this.iterN(this.first,this.first+this.size,ie)},insert:function(ie,ce){for(var Te=0,ke=0;ke<ce.length;++ke)Te+=ce[ke].height;this.insertInner(ie-this.first,ce,Te)},remove:function(ie,ce){this.removeInner(ie-this.first,ce)},getValue:function(ie){var ce=pi(this,this.first,this.first+this.size);return ie===!1?ce:ce.join(ie||this.lineSeparator())},setValue:li(function(ie){var ce=Kt(this.first,0),Te=this.first+this.size-1;Zh(this,{from:ce,to:Kt(Te,cn(this,Te).text.length),text:this.splitLines(ie),origin:"setValue",full:!0},!0),this.cm&&Wr(this.cm,0,0),sl(this,Uo(ce),xt)}),replaceRange:function(ie,ce,Te,ke){ce=Mn(this,ce),Te=Te?Mn(this,Te):ce,_c(this,ie,ce,Te,ke)},getRange:function(ie,ce,Te){var ke=On(this,Mn(this,ie),Mn(this,ce));return Te===!1?ke:ke.join(Te||this.lineSeparator())},getLine:function(ie){var ce=this.getLineHandle(ie);return ce&&ce.text},getLineHandle:function(ie){if(Pn(this,ie))return cn(this,ie)},getLineNumber:function(ie){return Lt(ie)},getLineHandleVisualStart:function(ie){return typeof ie=="number"&&(ie=cn(this,ie)),Un(ie)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(ie){return Mn(this,ie)},getCursor:function(ie){var ce=this.sel.primary(),Te;return ie==null||ie=="head"?Te=ce.head:ie=="anchor"?Te=ce.anchor:ie=="end"||ie=="to"||ie===!1?Te=ce.to():Te=ce.from(),Te},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:li(function(ie,ce,Te){du(this,Mn(this,typeof ie=="number"?Kt(ie,ce||0):ie),null,Te)}),setSelection:li(function(ie,ce,Te){du(this,Mn(this,ie),Mn(this,ce||ie),Te)}),extendSelection:li(function(ie,ce,Te){Lh(this,Mn(this,ie),ce&&Mn(this,ce),Te)}),extendSelections:li(function(ie,ce){oh(this,mi(this,ie),ce)}),extendSelectionsBy:li(function(ie,ce){var Te=Yt(this.sel.ranges,ie);oh(this,mi(this,Te),ce)}),setSelections:li(function(ie,ce,Te){if(ie.length){for(var ke=[],Fe=0;Fe<ie.length;Fe++)ke[Fe]=new Or(Mn(this,ie[Fe].anchor),Mn(this,ie[Fe].head));ce==null&&(ce=Math.min(ie.length-1,this.sel.primIndex)),sl(this,Xr(this.cm,ke,ce),Te)}}),addSelection:li(function(ie,ce,Te){var ke=this.sel.ranges.slice(0);ke.push(new Or(Mn(this,ie),Mn(this,ce||ie))),sl(this,Xr(this.cm,ke,ke.length-1),Te)}),getSelection:function(ie){for(var ce=this.sel.ranges,Te,ke=0;ke<ce.length;ke++){var Fe=On(this,ce[ke].from(),ce[ke].to());Te=Te?Te.concat(Fe):Fe}return ie===!1?Te:Te.join(ie||this.lineSeparator())},getSelections:function(ie){for(var ce=[],Te=this.sel.ranges,ke=0;ke<Te.length;ke++){var Fe=On(this,Te[ke].from(),Te[ke].to());ie!==!1&&(Fe=Fe.join(ie||this.lineSeparator())),ce[ke]=Fe}return ce},replaceSelection:function(ie,ce,Te){for(var ke=[],Fe=0;Fe<this.sel.ranges.length;Fe++)ke[Fe]=ie;this.replaceSelections(ke,ce,Te||"+input")},replaceSelections:li(function(ie,ce,Te){for(var ke=[],Fe=this.sel,nt=0;nt<Fe.ranges.length;nt++){var gt=Fe.ranges[nt];ke[nt]={from:gt.from(),to:gt.to(),text:this.splitLines(ie[nt]),origin:Te}}for(var Ct=ce&&ce!="end"&&ku(this,ke,ce),bt=ke.length-1;bt>=0;bt--)Zh(this,ke[bt]);Ct?vf(this,Ct):this.cm&&Yl(this.cm)}),undo:li(function(){Id(this,"undo")}),redo:li(function(){Id(this,"redo")}),undoSelection:li(function(){Id(this,"undo",!0)}),redoSelection:li(function(){Id(this,"redo",!0)}),setExtending:function(ie){this.extend=ie},getExtending:function(){return this.extend},historySize:function(){for(var ie=this.history,ce=0,Te=0,ke=0;ke<ie.done.length;ke++)ie.done[ke].ranges||++ce;for(var Fe=0;Fe<ie.undone.length;Fe++)ie.undone[Fe].ranges||++Te;return{undo:ce,redo:Te}},clearHistory:function(){var ie=this;this.history=new gl(this.history.maxGeneration),Rs(this,function(ce){return ce.history=ie.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(ie){return ie&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(ie){return this.history.generation==(ie||this.cleanGeneration)},getHistory:function(){return{done:El(this.history.done),undone:El(this.history.undone)}},setHistory:function(ie){var ce=this.history=new gl(this.history.maxGeneration);ce.done=El(ie.done.slice(0),null,!0),ce.undone=El(ie.undone.slice(0),null,!0)},setGutterMarker:li(function(ie,ce,Te){return bc(this,ie,"gutter",function(ke){var Fe=ke.gutterMarkers||(ke.gutterMarkers={});return Fe[ce]=Te,!Te&&et(Fe)&&(ke.gutterMarkers=null),!0})}),clearGutter:li(function(ie){var ce=this;this.iter(function(Te){Te.gutterMarkers&&Te.gutterMarkers[ie]&&bc(ce,Te,"gutter",function(){return Te.gutterMarkers[ie]=null,et(Te.gutterMarkers)&&(Te.gutterMarkers=null),!0})})}),lineInfo:function(ie){var ce;if(typeof ie=="number"){if(!Pn(this,ie)||(ce=ie,ie=cn(this,ie),!ie))return null}else if(ce=Lt(ie),ce==null)return null;return{line:ce,handle:ie,text:ie.text,gutterMarkers:ie.gutterMarkers,textClass:ie.textClass,bgClass:ie.bgClass,wrapClass:ie.wrapClass,widgets:ie.widgets}},addLineClass:li(function(ie,ce,Te){return bc(this,ie,ce=="gutter"?"gutter":"class",function(ke){var Fe=ce=="text"?"textClass":ce=="background"?"bgClass":ce=="gutter"?"gutterClass":"wrapClass";if(!ke[Fe])ke[Fe]=Te;else{if(Pe(Te).test(ke[Fe]))return!1;ke[Fe]+=" "+Te}return!0})}),removeLineClass:li(function(ie,ce,Te){return bc(this,ie,ce=="gutter"?"gutter":"class",function(ke){var Fe=ce=="text"?"textClass":ce=="background"?"bgClass":ce=="gutter"?"gutterClass":"wrapClass",nt=ke[Fe];if(nt)if(Te==null)ke[Fe]=null;else{var gt=nt.match(Pe(Te));if(!gt)return!1;var Ct=gt.index+gt[0].length;ke[Fe]=nt.slice(0,gt.index)+(!gt.index||Ct==nt.length?"":" ")+nt.slice(Ct)||null}else return!1;return!0})}),addLineWidget:li(function(ie,ce,Te){return yf(this,ie,ce,Te)}),removeLineWidget:function(ie){ie.clear()},markText:function(ie,ce,Te){return Pc(this,Mn(this,ie),Mn(this,ce),Te,Te&&Te.type||"range")},setBookmark:function(ie,ce){var Te={replacedWith:ce&&(ce.nodeType==null?ce.widget:ce),insertLeft:ce&&ce.insertLeft,clearWhenEmpty:!1,shared:ce&&ce.shared,handleMouseEvents:ce&&ce.handleMouseEvents};return ie=Mn(this,ie),Pc(this,ie,ie,Te,"bookmark")},findMarksAt:function(ie){ie=Mn(this,ie);var ce=[],Te=cn(this,ie.line).markedSpans;if(Te)for(var ke=0;ke<Te.length;++ke){var Fe=Te[ke];(Fe.from==null||Fe.from<=ie.ch)&&(Fe.to==null||Fe.to>=ie.ch)&&ce.push(Fe.marker.parent||Fe.marker)}return ce},findMarks:function(ie,ce,Te){ie=Mn(this,ie),ce=Mn(this,ce);var ke=[],Fe=ie.line;return this.iter(ie.line,ce.line+1,function(nt){var gt=nt.markedSpans;if(gt)for(var Ct=0;Ct<gt.length;Ct++){var bt=gt[Ct];!(bt.to!=null&&Fe==ie.line&&ie.ch>=bt.to||bt.from==null&&Fe!=ie.line||bt.from!=null&&Fe==ce.line&&bt.from>=ce.ch)&&(!Te||Te(bt.marker))&&ke.push(bt.marker.parent||bt.marker)}++Fe}),ke},getAllMarks:function(){var ie=[];return this.iter(function(ce){var Te=ce.markedSpans;if(Te)for(var ke=0;ke<Te.length;++ke)Te[ke].from!=null&&ie.push(Te[ke].marker)}),ie},posFromIndex:function(ie){var ce,Te=this.first,ke=this.lineSeparator().length;return this.iter(function(Fe){var nt=Fe.text.length+ke;if(nt>ie)return ce=ie,!0;ie-=nt,++Te}),Mn(this,Kt(Te,ce))},indexFromPos:function(ie){ie=Mn(this,ie);var ce=ie.ch;if(ie.line<this.first||ie.ch<0)return 0;var Te=this.lineSeparator().length;return this.iter(this.first,ie.line,function(ke){ce+=ke.text.length+Te}),ce},copy:function(ie){var ce=new Xa(pi(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return ce.scrollTop=this.scrollTop,ce.scrollLeft=this.scrollLeft,ce.sel=this.sel,ce.extend=!1,ie&&(ce.history.undoDepth=this.history.undoDepth,ce.setHistory(this.getHistory())),ce},linkedDoc:function(ie){ie||(ie={});var ce=this.first,Te=this.first+this.size;ie.from!=null&&ie.from>ce&&(ce=ie.from),ie.to!=null&&ie.to<Te&&(Te=ie.to);var ke=new Xa(pi(this,ce,Te),ie.mode||this.modeOption,ce,this.lineSep,this.direction);return ie.sharedHist&&(ke.history=this.history),(this.linked||(this.linked=[])).push({doc:ke,sharedHist:ie.sharedHist}),ke.linked=[{doc:this,isParent:!0,sharedHist:ie.sharedHist}],Qg(ke,Pp(this)),ke},unlinkDoc:function(ie){if(ie instanceof ts&&(ie=ie.doc),this.linked)for(var ce=0;ce<this.linked.length;++ce){var Te=this.linked[ce];if(Te.doc==ie){this.linked.splice(ce,1),ie.unlinkDoc(this),Cp(Pp(this));break}}if(ie.history==this.history){var ke=[ie.id];Rs(ie,function(Fe){return ke.push(Fe.id)},!0),ie.history=new gl(null),ie.history.done=El(this.history.done,ke),ie.history.undone=El(this.history.undone,ke)}},iterLinkedDocs:function(ie){Rs(this,ie)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(ie){return this.lineSep?ie.split(this.lineSep):cr(ie)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:li(function(ie){ie!="rtl"&&(ie="ltr"),ie!=this.direction&&(this.direction=ie,this.iter(function(ce){return ce.order=null}),this.cm&&$c(this.cm))})}),Xa.prototype.eachLine=Xa.prototype.iter;var Rd=0;function Ep(ie){var ce=this;if(tm(ce),!(un(ce,ie)||hs(ce.display,ie))){ri(ie),Ce&&(Rd=+new Date);var Te=va(ce,ie,!0),ke=ie.dataTransfer.files;if(!(!Te||ce.isReadOnly()))if(ke&&ke.length&&window.FileReader&&window.File)for(var Fe=ke.length,nt=Array(Fe),gt=0,Ct=function(){++gt==Fe&&Bi(ce,function(){Te=Mn(ce.doc,Te);var Cn={from:Te,to:Te,text:ce.doc.splitLines(nt.filter(function(fi){return fi!=null}).join(ce.doc.lineSeparator())),origin:"paste"};Zh(ce.doc,Cn),vf(ce.doc,Uo(Mn(ce.doc,Te),Mn(ce.doc,Gr(Cn))))})()},bt=function(Cn,fi){if(ce.options.allowDropFileTypes&&ct(ce.options.allowDropFileTypes,Cn.type)==-1){Ct();return}var xi=new FileReader;xi.onerror=function(){return Ct()},xi.onload=function(){var Ai=xi.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ai)){Ct();return}nt[fi]=Ai,Ct()},xi.readAsText(Cn)},Bt=0;Bt<ke.length;Bt++)bt(ke[Bt],Bt);else{if(ce.state.draggingText&&ce.doc.sel.contains(Te)>-1){ce.state.draggingText(ie),setTimeout(function(){return ce.display.input.focus()},20);return}try{var fn=ie.dataTransfer.getData("Text");if(fn){var Zt;if(ce.state.draggingText&&!ce.state.draggingText.copy&&(Zt=ce.listSelections()),xc(ce.doc,Uo(Te,Te)),Zt)for(var Tn=0;Tn<Zt.length;++Tn)_c(ce.doc,"",Zt[Tn].anchor,Zt[Tn].head,"drag");ce.replaceSelection(fn,"around","paste"),ce.display.input.focus()}}catch(Cn){}}}}function $g(ie,ce){if(Ce&&(!ie.state.draggingText||+new Date-Rd<100)){ki(ce);return}if(!(un(ie,ce)||hs(ie.display,ce))&&(ce.dataTransfer.setData("Text",ie.getSelection()),ce.dataTransfer.effectAllowed="copyMove",ce.dataTransfer.setDragImage&&!de)){var Te=Ze("img",null,null,"position: fixed; left: 0; top: 0;");Te.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",pe&&(Te.width=Te.height=1,ie.display.wrapper.appendChild(Te),Te._top=Te.offsetTop),ce.dataTransfer.setDragImage(Te,0,0),pe&&Te.parentNode.removeChild(Te)}}function em(ie,ce){var Te=va(ie,ce);if(Te){var ke=document.createDocumentFragment();Io(ie,Te,ke),ie.display.dragCursor||(ie.display.dragCursor=Ze("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),ie.display.lineSpace.insertBefore(ie.display.dragCursor,ie.display.cursorDiv)),Oe(ie.display.dragCursor,ke)}}function tm(ie){ie.display.dragCursor&&(ie.display.lineSpace.removeChild(ie.display.dragCursor),ie.display.dragCursor=null)}function nm(ie){if(document.getElementsByClassName){for(var ce=document.getElementsByClassName("CodeMirror"),Te=[],ke=0;ke<ce.length;ke++){var Fe=ce[ke].CodeMirror;Fe&&Te.push(Fe)}Te.length&&Te[0].operation(function(){for(var nt=0;nt<Te.length;nt++)ie(Te[nt])})}}var Lp=!1;function $l(){Lp||(nd(),Lp=!0)}function nd(){var ie;Gt(window,"resize",function(){ie==null&&(ie=setTimeout(function(){ie=null,nm(Mp)},100))}),Gt(window,"blur",function(){return nm(nh)})}function Mp(ie){var ce=ie.display;ce.cachedCharWidth=ce.cachedTextHeight=ce.cachedPaddingH=null,ce.scrollbarsClipped=!1,ie.setSize()}for(var lh={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Fd=0;Fd<10;Fd++)lh[Fd+48]=lh[Fd+96]=String(Fd);for(var Sf=65;Sf<=90;Sf++)lh[Sf]=String.fromCharCode(Sf);for(var Bd=1;Bd<=12;Bd++)lh[Bd+111]=lh[Bd+63235]="F"+Bd;var Rl={};Rl.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Rl.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Rl.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Rl.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Rl.default=oe?Rl.macDefault:Rl.pcDefault;function kp(ie){var ce=ie.split(/-(?!$)/);ie=ce[ce.length-1];for(var Te,ke,Fe,nt,gt=0;gt<ce.length-1;gt++){var Ct=ce[gt];if(/^(cmd|meta|m)$/i.test(Ct))nt=!0;else if(/^a(lt)?$/i.test(Ct))Te=!0;else if(/^(c|ctrl|control)$/i.test(Ct))ke=!0;else if(/^s(hift)?$/i.test(Ct))Fe=!0;else throw new Error("Unrecognized modifier name: "+Ct)}return Te&&(ie="Alt-"+ie),ke&&(ie="Ctrl-"+ie),nt&&(ie="Cmd-"+ie),Fe&&(ie="Shift-"+ie),ie}function Tp(ie){var ce={};for(var Te in ie)if(ie.hasOwnProperty(Te)){var ke=ie[Te];if(/^(name|fallthrough|(de|at)tach)$/.test(Te))continue;if(ke=="..."){delete ie[Te];continue}for(var Fe=Yt(Te.split(" "),kp),nt=0;nt<Fe.length;nt++){var gt=void 0,Ct=void 0;nt==Fe.length-1?(Ct=Fe.join(" "),gt=ke):(Ct=Fe.slice(0,nt+1).join(" "),gt="...");var bt=ce[Ct];if(!bt)ce[Ct]=gt;else if(bt!=gt)throw new Error("Inconsistent bindings for "+Ct)}delete ie[Te]}for(var Bt in ce)ie[Bt]=ce[Bt];return ie}function pu(ie,ce,Te,ke){ce=Cc(ce);var Fe=ce.call?ce.call(ie,ke):ce[ie];if(Fe===!1)return"nothing";if(Fe==="...")return"multi";if(Fe!=null&&Te(Fe))return"handled";if(ce.fallthrough){if(Object.prototype.toString.call(ce.fallthrough)!="[object Array]")return pu(ie,ce.fallthrough,Te,ke);for(var nt=0;nt<ce.fallthrough.length;nt++){var gt=pu(ie,ce.fallthrough[nt],Te,ke);if(gt)return gt}}}function id(ie){var ce=typeof ie=="string"?ie:lh[ie.keyCode];return ce=="Ctrl"||ce=="Alt"||ce=="Shift"||ce=="Mod"}function Ap(ie,ce,Te){var ke=ie;return ce.altKey&&ke!="Alt"&&(ie="Alt-"+ie),(me?ce.metaKey:ce.ctrlKey)&&ke!="Ctrl"&&(ie="Ctrl-"+ie),(me?ce.ctrlKey:ce.metaKey)&&ke!="Mod"&&(ie="Cmd-"+ie),!Te&&ce.shiftKey&&ke!="Shift"&&(ie="Shift-"+ie),ie}function im(ie,ce){if(pe&&ie.keyCode==34&&ie.char)return!1;var Te=lh[ie.keyCode];return Te==null||ie.altGraphKey?!1:(ie.keyCode==3&&ie.code&&(Te=ie.code),Ap(Te,ie,ce))}function Cc(ie){return typeof ie=="string"?Rl[ie]:ie}function Fl(ie,ce){for(var Te=ie.doc.sel.ranges,ke=[],Fe=0;Fe<Te.length;Fe++){for(var nt=ce(Te[Fe]);ke.length&&vn(nt.from,Qt(ke).to)<=0;){var gt=ke.pop();if(vn(gt.from,nt.from)<0){nt.from=gt.from;break}}ke.push(nt)}qt(ie,function(){for(var Ct=ke.length-1;Ct>=0;Ct--)_c(ie.doc,"",ke[Ct].from,ke[Ct].to,"+delete");Yl(ie)})}function Np(ie,ce,Te){var ke=ze(ie.text,ce+Te,Te);return ke<0||ke>ie.text.length?null:ke}function da(ie,ce,Te){var ke=Np(ie,ce.ch,Te);return ke==null?null:new Kt(ce.line,ke,Te<0?"after":"before")}function jd(ie,ce,Te,ke,Fe){if(ie){ce.doc.direction=="rtl"&&(Fe=-Fe);var nt=hn(Te,ce.doc.direction);if(nt){var gt=Fe<0?Qt(nt):nt[0],Ct=Fe<0==(gt.level==1),bt=Ct?"after":"before",Bt;if(gt.level>0||ce.doc.direction=="rtl"){var fn=Ol(ce,Te);Bt=Fe<0?Te.text.length-1:0;var Zt=il(ce,fn,Bt).top;Bt=it(function(Tn){return il(ce,fn,Tn).top==Zt},Fe<0==(gt.level==1)?gt.from:gt.to-1,Bt),bt=="before"&&(Bt=Np(Te,Bt,1))}else Bt=Fe<0?gt.to:gt.from;return new Kt(ke,Bt,bt)}}return new Kt(ke,Fe<0?Te.text.length:0,Fe<0?"before":"after")}function xf(ie,ce,Te,ke){var Fe=hn(ce,ie.doc.direction);if(!Fe)return da(ce,Te,ke);Te.ch>=ce.text.length?(Te.ch=ce.text.length,Te.sticky="before"):Te.ch<=0&&(Te.ch=0,Te.sticky="after");var nt=vt(Fe,Te.ch,Te.sticky),gt=Fe[nt];if(ie.doc.direction=="ltr"&>.level%2==0&&(ke>0?gt.to>Te.ch:gt.from<Te.ch))return da(ce,Te,ke);var Ct=function(Xi,Pr){return Np(ce,Xi instanceof Kt?Xi.ch:Xi,Pr)},bt,Bt=function(Xi){return ie.options.lineWrapping?(bt=bt||Ol(ie,ce),Hs(ie,ce,bt,Xi)):{begin:0,end:ce.text.length}},fn=Bt(Te.sticky=="before"?Ct(Te,-1):Te.ch);if(ie.doc.direction=="rtl"||gt.level==1){var Zt=gt.level==1==ke<0,Tn=Ct(Te,Zt?1:-1);if(Tn!=null&&(Zt?Tn<=gt.to&&Tn<=fn.end:Tn>=gt.from&&Tn>=fn.begin)){var Cn=Zt?"before":"after";return new Kt(Te.line,Tn,Cn)}}var fi=function(Xi,Pr,lr){for(var Ir=function(Fs,La){return La?new Kt(Te.line,Ct(Fs,1),"before"):new Kt(Te.line,Fs,"after")};Xi>=0&&Xi<Fe.length;Xi+=Pr){var lo=Fe[Xi],ar=Pr>0==(lo.level!=1),Bo=ar?lr.begin:Ct(lr.end,-1);if(lo.from<=Bo&&Bo<lo.to||(Bo=ar?lo.from:Ct(lo.to,-1),lr.begin<=Bo&&Bo<lr.end))return Ir(Bo,ar)}},xi=fi(nt+ke,ke,fn);if(xi)return xi;var Ai=ke>0?fn.end:Ct(fn.begin,-1);return Ai!=null&&!(ke>0&&Ai==ce.text.length)&&(xi=fi(ke>0?0:Fe.length-1,ke,Bt(Ai)),xi)?xi:null}var Vh={selectAll:ca,singleSelection:function(ie){return ie.setSelection(ie.getCursor("anchor"),ie.getCursor("head"),xt)},killLine:function(ie){return Fl(ie,function(ce){if(ce.empty()){var Te=cn(ie.doc,ce.head.line).text.length;return ce.head.ch==Te&&ce.head.line<ie.lastLine()?{from:ce.head,to:Kt(ce.head.line+1,0)}:{from:ce.head,to:Kt(ce.head.line,Te)}}else return{from:ce.from(),to:ce.to()}})},deleteLine:function(ie){return Fl(ie,function(ce){return{from:Kt(ce.from().line,0),to:Mn(ie.doc,Kt(ce.to().line+1,0))}})},delLineLeft:function(ie){return Fl(ie,function(ce){return{from:Kt(ce.from().line,0),to:ce.from()}})},delWrappedLineLeft:function(ie){return Fl(ie,function(ce){var Te=ie.charCoords(ce.head,"div").top+5,ke=ie.coordsChar({left:0,top:Te},"div");return{from:ke,to:ce.from()}})},delWrappedLineRight:function(ie){return Fl(ie,function(ce){var Te=ie.charCoords(ce.head,"div").top+5,ke=ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:Te},"div");return{from:ce.from(),to:ke}})},undo:function(ie){return ie.undo()},redo:function(ie){return ie.redo()},undoSelection:function(ie){return ie.undoSelection()},redoSelection:function(ie){return ie.redoSelection()},goDocStart:function(ie){return ie.extendSelection(Kt(ie.firstLine(),0))},goDocEnd:function(ie){return ie.extendSelection(Kt(ie.lastLine()))},goLineStart:function(ie){return ie.extendSelectionsBy(function(ce){return rd(ie,ce.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(ie){return ie.extendSelectionsBy(function(ce){return Dp(ie,ce.head)},{origin:"+move",bias:1})},goLineEnd:function(ie){return ie.extendSelectionsBy(function(ce){return od(ie,ce.head.line)},{origin:"+move",bias:-1})},goLineRight:function(ie){return ie.extendSelectionsBy(function(ce){var Te=ie.cursorCoords(ce.head,"div").top+5;return ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:Te},"div")},zt)},goLineLeft:function(ie){return ie.extendSelectionsBy(function(ce){var Te=ie.cursorCoords(ce.head,"div").top+5;return ie.coordsChar({left:0,top:Te},"div")},zt)},goLineLeftSmart:function(ie){return ie.extendSelectionsBy(function(ce){var Te=ie.cursorCoords(ce.head,"div").top+5,ke=ie.coordsChar({left:0,top:Te},"div");return ke.ch<ie.getLine(ke.line).search(/\S/)?Dp(ie,ce.head):ke},zt)},goLineUp:function(ie){return ie.moveV(-1,"line")},goLineDown:function(ie){return ie.moveV(1,"line")},goPageUp:function(ie){return ie.moveV(-1,"page")},goPageDown:function(ie){return ie.moveV(1,"page")},goCharLeft:function(ie){return ie.moveH(-1,"char")},goCharRight:function(ie){return ie.moveH(1,"char")},goColumnLeft:function(ie){return ie.moveH(-1,"column")},goColumnRight:function(ie){return ie.moveH(1,"column")},goWordLeft:function(ie){return ie.moveH(-1,"word")},goGroupRight:function(ie){return ie.moveH(1,"group")},goGroupLeft:function(ie){return ie.moveH(-1,"group")},goWordRight:function(ie){return ie.moveH(1,"word")},delCharBefore:function(ie){return ie.deleteH(-1,"codepoint")},delCharAfter:function(ie){return ie.deleteH(1,"char")},delWordBefore:function(ie){return ie.deleteH(-1,"word")},delWordAfter:function(ie){return ie.deleteH(1,"word")},delGroupBefore:function(ie){return ie.deleteH(-1,"group")},delGroupAfter:function(ie){return ie.deleteH(1,"group")},indentAuto:function(ie){return ie.indentSelection("smart")},indentMore:function(ie){return ie.indentSelection("add")},indentLess:function(ie){return ie.indentSelection("subtract")},insertTab:function(ie){return ie.replaceSelection(" ")},insertSoftTab:function(ie){for(var ce=[],Te=ie.listSelections(),ke=ie.options.tabSize,Fe=0;Fe<Te.length;Fe++){var nt=Te[Fe].from(),gt=ut(ie.getLine(nt.line),nt.ch,ke);ce.push(Dt(ke-gt%ke))}ie.replaceSelections(ce)},defaultTab:function(ie){ie.somethingSelected()?ie.indentSelection("add"):ie.execCommand("insertTab")},transposeChars:function(ie){return qt(ie,function(){for(var ce=ie.listSelections(),Te=[],ke=0;ke<ce.length;ke++)if(ce[ke].empty()){var Fe=ce[ke].head,nt=cn(ie.doc,Fe.line).text;if(nt){if(Fe.ch==nt.length&&(Fe=new Kt(Fe.line,Fe.ch-1)),Fe.ch>0)Fe=new Kt(Fe.line,Fe.ch+1),ie.replaceRange(nt.charAt(Fe.ch-1)+nt.charAt(Fe.ch-2),Kt(Fe.line,Fe.ch-2),Fe,"+transpose");else if(Fe.line>ie.doc.first){var gt=cn(ie.doc,Fe.line-1).text;gt&&(Fe=new Kt(Fe.line,1),ie.replaceRange(nt.charAt(0)+ie.doc.lineSeparator()+gt.charAt(gt.length-1),Kt(Fe.line-1,gt.length-1),Fe,"+transpose"))}}Te.push(new Or(Fe,Fe))}ie.setSelections(Te)})},newlineAndIndent:function(ie){return qt(ie,function(){for(var ce=ie.listSelections(),Te=ce.length-1;Te>=0;Te--)ie.replaceRange(ie.doc.lineSeparator(),ce[Te].anchor,ce[Te].head,"+input");ce=ie.listSelections();for(var ke=0;ke<ce.length;ke++)ie.indentLine(ce[ke].from().line,null,!0);Yl(ie)})},openLine:function(ie){return ie.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(ie){return ie.toggleOverwrite()}};function rd(ie,ce){var Te=cn(ie.doc,ce),ke=Un(Te);return ke!=Te&&(ce=Lt(ke)),jd(!0,ie,ke,ce,1)}function od(ie,ce){var Te=cn(ie.doc,ce),ke=Qn(Te);return ke!=Te&&(ce=Lt(ke)),jd(!0,ie,Te,ce,-1)}function Dp(ie,ce){var Te=rd(ie,ce.line),ke=cn(ie.doc,Te.line),Fe=hn(ke,ie.doc.direction);if(!Fe||Fe[0].level==0){var nt=Math.max(Te.ch,ke.text.search(/\S/)),gt=ce.line==Te.line&&ce.ch<=nt&&ce.ch;return Kt(Te.line,gt?0:nt,Te.sticky)}return Te}function sd(ie,ce,Te){if(typeof ce=="string"&&(ce=Vh[ce],!ce))return!1;ie.display.input.ensurePolled();var ke=ie.display.shift,Fe=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),Te&&(ie.display.shift=!1),Fe=ce(ie)!=wt}finally{ie.display.shift=ke,ie.state.suppressEdits=!1}return Fe}function Op(ie,ce,Te){for(var ke=0;ke<ie.state.keyMaps.length;ke++){var Fe=pu(ce,ie.state.keyMaps[ke],Te,ie);if(Fe)return Fe}return ie.options.extraKeys&&pu(ce,ie.options.extraKeys,Te,ie)||pu(ce,ie.options.keyMap,Te,ie)}var uh=new rt;function Ec(ie,ce,Te,ke){var Fe=ie.state.keySeq;if(Fe){if(id(ce))return"handled";if(/\'$/.test(ce)?ie.state.keySeq=null:uh.set(50,function(){ie.state.keySeq==Fe&&(ie.state.keySeq=null,ie.display.input.reset())}),wf(ie,Fe+" "+ce,Te,ke))return!0}return wf(ie,ce,Te,ke)}function wf(ie,ce,Te,ke){var Fe=Op(ie,ce,ke);return Fe=="multi"&&(ie.state.keySeq=ce),Fe=="handled"&&nr(ie,"keyHandled",ie,ce,Te),(Fe=="handled"||Fe=="multi")&&(ri(Te),es(ie)),!!Fe}function _f(ie,ce){var Te=im(ce,!0);return Te?ce.shiftKey&&!ie.state.keySeq?Ec(ie,"Shift-"+Te,ce,function(ke){return sd(ie,ke,!0)})||Ec(ie,Te,ce,function(ke){if(typeof ke=="string"?/^go[A-Z]/.test(ke):ke.motion)return sd(ie,ke)}):Ec(ie,Te,ce,function(ke){return sd(ie,ke)}):!1}function bf(ie,ce,Te){return Ec(ie,"'"+Te+"'",ce,function(ke){return sd(ie,ke,!0)})}var Lc=null;function Ip(ie){var ce=this;if(!(ie.target&&ie.target!=ce.display.input.getField())&&(ce.curOp.focus=pt(),!un(ce,ie))){Ce&&xe<11&&ie.keyCode==27&&(ie.returnValue=!1);var Te=ie.keyCode;ce.display.shift=Te==16||ie.shiftKey;var ke=_f(ce,ie);pe&&(Lc=ke?Te:null,!ke&&Te==88&&!Li&&(oe?ie.metaKey:ie.ctrlKey)&&ce.replaceSelection("",null,"cut")),Le&&!oe&&!ke&&Te==46&&ie.shiftKey&&!ie.ctrlKey&&document.execCommand&&document.execCommand("cut"),Te==18&&!/\bCodeMirror-crosshair\b/.test(ce.display.lineDiv.className)&&Rp(ce)}}function Rp(ie){var ce=ie.display.lineDiv;Mt(ce,"CodeMirror-crosshair");function Te(ke){(ke.keyCode==18||!ke.altKey)&&(Ae(ce,"CodeMirror-crosshair"),bn(document,"keyup",Te),bn(document,"mouseover",Te))}Gt(document,"keyup",Te),Gt(document,"mouseover",Te)}function Fp(ie){ie.keyCode==16&&(this.doc.sel.shift=!1),un(this,ie)}function Zu(ie){var ce=this;if(!(ie.target&&ie.target!=ce.display.input.getField())&&!(hs(ce.display,ie)||un(ce,ie)||ie.ctrlKey&&!ie.altKey||oe&&ie.metaKey)){var Te=ie.keyCode,ke=ie.charCode;if(pe&&Te==Lc){Lc=null,ri(ie);return}if(!(pe&&(!ie.which||ie.which<10)&&_f(ce,ie))){var Fe=String.fromCharCode(ke==null?Te:ke);Fe!="\b"&&(bf(ce,ie,Fe)||ce.display.input.onKeyPress(ie))}}}var rm=400,Bp=function(ie,ce,Te){this.time=ie,this.pos=ce,this.button=Te};Bp.prototype.compare=function(ie,ce,Te){return this.time+rm>ie&&vn(ce,this.pos)==0&&Te==this.button};var ad,Mc;function jp(ie,ce){var Te=+new Date;return Mc&&Mc.compare(Te,ie,ce)?(ad=Mc=null,"triple"):ad&&ad.compare(Te,ie,ce)?(Mc=new Bp(Te,ie,ce),ad=null,"double"):(ad=new Bp(Te,ie,ce),Mc=null,"single")}function Vu(ie){var ce=this,Te=ce.display;if(!(un(ce,ie)||Te.activeTouch&&Te.input.supportsTouch())){if(Te.input.ensurePolled(),Te.shift=ie.shiftKey,hs(Te,ie)){be||(Te.scroller.draggable=!1,setTimeout(function(){return Te.scroller.draggable=!0},100));return}if(!Ef(ce,ie)){var ke=va(ce,ie),Fe=Fi(ie),nt=ke?jp(ke,Fe):"single";window.focus(),Fe==1&&ce.state.selectingText&&ce.state.selectingText(ie),!(ke&&zp(ce,Fe,ke,nt,ie))&&(Fe==1?ke?om(ce,ke,nt,ie):Hi(ie)==Te.scroller&&ri(ie):Fe==2?(ke&&Lh(ce.doc,ke),setTimeout(function(){return Te.input.focus()},20)):Fe==3&&(ve?ce.display.input.onContextMenu(ie):cs(ce)))}}}function zp(ie,ce,Te,ke,Fe){var nt="Click";return ke=="double"?nt="Double"+nt:ke=="triple"&&(nt="Triple"+nt),nt=(ce==1?"Left":ce==2?"Middle":"Right")+nt,Ec(ie,Ap(nt,Fe),Fe,function(gt){if(typeof gt=="string"&&(gt=Vh[gt]),!gt)return!1;var Ct=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),Ct=gt(ie,Te)!=wt}finally{ie.state.suppressEdits=!1}return Ct})}function Pf(ie,ce,Te){var ke=ie.getOption("configureMouse"),Fe=ke?ke(ie,ce,Te):{};if(Fe.unit==null){var nt=re?Te.shiftKey&&Te.metaKey:Te.altKey;Fe.unit=nt?"rectangle":ce=="single"?"char":ce=="double"?"word":"line"}return(Fe.extend==null||ie.doc.extend)&&(Fe.extend=ie.doc.extend||Te.shiftKey),Fe.addNew==null&&(Fe.addNew=oe?Te.metaKey:Te.ctrlKey),Fe.moveOnDrag==null&&(Fe.moveOnDrag=!(oe?Te.altKey:Te.ctrlKey)),Fe}function om(ie,ce,Te,ke){Ce?setTimeout(dt(Jo,ie),0):ie.curOp.focus=pt();var Fe=Pf(ie,Te,ke),nt=ie.doc.sel,gt;ie.options.dragDrop&&rr&&!ie.isReadOnly()&&Te=="single"&&(gt=nt.contains(ce))>-1&&(vn((gt=nt.ranges[gt]).from(),ce)<0||ce.xRel>0)&&(vn(gt.to(),ce)>0||ce.xRel<0)?Up(ie,ke,ce,Fe):nv(ie,ke,ce,Fe)}function Up(ie,ce,Te,ke){var Fe=ie.display,nt=!1,gt=Bi(ie,function(Bt){be&&(Fe.scroller.draggable=!1),ie.state.draggingText=!1,bn(Fe.wrapper.ownerDocument,"mouseup",gt),bn(Fe.wrapper.ownerDocument,"mousemove",Ct),bn(Fe.scroller,"dragstart",bt),bn(Fe.scroller,"drop",gt),nt||(ri(Bt),ke.addNew||Lh(ie.doc,Te,null,null,ke.extend),be&&!de||Ce&&xe==9?setTimeout(function(){Fe.wrapper.ownerDocument.body.focus({preventScroll:!0}),Fe.input.focus()},20):Fe.input.focus())}),Ct=function(Bt){nt=nt||Math.abs(ce.clientX-Bt.clientX)+Math.abs(ce.clientY-Bt.clientY)>=10},bt=function(){return nt=!0};be&&(Fe.scroller.draggable=!0),ie.state.draggingText=gt,gt.copy=!ke.moveOnDrag,Fe.scroller.dragDrop&&Fe.scroller.dragDrop(),Gt(Fe.wrapper.ownerDocument,"mouseup",gt),Gt(Fe.wrapper.ownerDocument,"mousemove",Ct),Gt(Fe.scroller,"dragstart",bt),Gt(Fe.scroller,"drop",gt),cs(ie),setTimeout(function(){return Fe.input.focus()},20)}function Hp(ie,ce,Te){if(Te=="char")return new Or(ce,ce);if(Te=="word")return ie.findWordAt(ce);if(Te=="line")return new Or(Kt(ce.line,0),Mn(ie.doc,Kt(ce.line+1,0)));var ke=Te(ie,ce);return new Or(ke.from,ke.to)}function nv(ie,ce,Te,ke){var Fe=ie.display,nt=ie.doc;ri(ce);var gt,Ct,bt=nt.sel,Bt=bt.ranges;if(ke.addNew&&!ke.extend?(Ct=nt.sel.contains(Te),Ct>-1?gt=Bt[Ct]:gt=new Or(Te,Te)):(gt=nt.sel.primary(),Ct=nt.sel.primIndex),ke.unit=="rectangle")ke.addNew||(gt=new Or(Te,Te)),Te=va(ie,ce,!0,!0),Ct=-1;else{var fn=Hp(ie,Te,ke.unit);ke.extend?gt=rh(gt,fn.anchor,fn.head,ke.extend):gt=fn}ke.addNew?Ct==-1?(Ct=Bt.length,sl(nt,Xr(ie,Bt.concat([gt]),Ct),{scroll:!1,origin:"*mouse"})):Bt.length>1&&Bt[Ct].empty()&&ke.unit=="char"&&!ke.extend?(sl(nt,Xr(ie,Bt.slice(0,Ct).concat(Bt.slice(Ct+1)),0),{scroll:!1,origin:"*mouse"}),bt=nt.sel):sh(nt,Ct,gt,Ut):(Ct=0,sl(nt,new Eo([gt],0),Ut),bt=nt.sel);var Zt=Te;function Tn(lr){if(vn(Zt,lr)!=0)if(Zt=lr,ke.unit=="rectangle"){for(var Ir=[],lo=ie.options.tabSize,ar=ut(cn(nt,Te.line).text,Te.ch,lo),Bo=ut(cn(nt,lr.line).text,lr.ch,lo),Fs=Math.min(ar,Bo),La=Math.max(ar,Bo),Js=Math.min(Te.line,lr.line),Ml=Math.min(ie.lastLine(),Math.max(Te.line,lr.line));Js<=Ml;Js++){var al=cn(nt,Js).text,wa=dn(al,Fs,lo);Fs==La?Ir.push(new Or(Kt(Js,wa),Kt(Js,wa))):al.length>wa&&Ir.push(new Or(Kt(Js,wa),Kt(Js,dn(al,La,lo))))}Ir.length||Ir.push(new Or(Te,Te)),sl(nt,Xr(ie,bt.ranges.slice(0,Ct).concat(Ir),Ct),{origin:"*mouse",scroll:!1}),ie.scrollIntoView(lr)}else{var Bl=gt,Ja=Hp(ie,lr,ke.unit),_a=Bl.anchor,os;vn(Ja.anchor,_a)>0?(os=Ja.head,_a=Wn(Bl.from(),Ja.anchor)):(os=Ja.anchor,_a=oi(Bl.to(),Ja.head));var na=bt.ranges.slice(0);na[Ct]=sm(ie,new Or(Mn(nt,_a),os)),sl(nt,Xr(ie,na,Ct),Ut)}}var Cn=Fe.wrapper.getBoundingClientRect(),fi=0;function xi(lr){var Ir=++fi,lo=va(ie,lr,!0,ke.unit=="rectangle");if(lo)if(vn(lo,Zt)!=0){ie.curOp.focus=pt(),Tn(lo);var ar=bo(Fe,nt);(lo.line>=ar.to||lo.line<ar.from)&&setTimeout(Bi(ie,function(){fi==Ir&&xi(lr)}),150)}else{var Bo=lr.clientY<Cn.top?-20:lr.clientY>Cn.bottom?20:0;Bo&&setTimeout(Bi(ie,function(){fi==Ir&&(Fe.scroller.scrollTop+=Bo,xi(lr))}),50)}}function Ai(lr){ie.state.selectingText=!1,fi=1/0,lr&&(ri(lr),Fe.input.focus()),bn(Fe.wrapper.ownerDocument,"mousemove",Xi),bn(Fe.wrapper.ownerDocument,"mouseup",Pr),nt.history.lastSelOrigin=null}var Xi=Bi(ie,function(lr){lr.buttons===0||!Fi(lr)?Ai(lr):xi(lr)}),Pr=Bi(ie,Ai);ie.state.selectingText=Pr,Gt(Fe.wrapper.ownerDocument,"mousemove",Xi),Gt(Fe.wrapper.ownerDocument,"mouseup",Pr)}function sm(ie,ce){var Te=ce.anchor,ke=ce.head,Fe=cn(ie.doc,Te.line);if(vn(Te,ke)==0&&Te.sticky==ke.sticky)return ce;var nt=hn(Fe);if(!nt)return ce;var gt=vt(nt,Te.ch,Te.sticky),Ct=nt[gt];if(Ct.from!=Te.ch&&Ct.to!=Te.ch)return ce;var bt=gt+(Ct.from==Te.ch==(Ct.level!=1)?0:1);if(bt==0||bt==nt.length)return ce;var Bt;if(ke.line!=Te.line)Bt=(ke.line-Te.line)*(ie.doc.direction=="ltr"?1:-1)>0;else{var fn=vt(nt,ke.ch,ke.sticky),Zt=fn-gt||(ke.ch-Te.ch)*(Ct.level==1?-1:1);fn==bt-1||fn==bt?Bt=Zt<0:Bt=Zt>0}var Tn=nt[bt+(Bt?-1:0)],Cn=Bt==(Tn.level==1),fi=Cn?Tn.from:Tn.to,xi=Cn?"after":"before";return Te.ch==fi&&Te.sticky==xi?ce:new Or(new Kt(Te.line,fi,xi),ke)}function Cf(ie,ce,Te,ke){var Fe,nt;if(ce.touches)Fe=ce.touches[0].clientX,nt=ce.touches[0].clientY;else try{Fe=ce.clientX,nt=ce.clientY}catch(Tn){return!1}if(Fe>=Math.floor(ie.display.gutters.getBoundingClientRect().right))return!1;ke&&ri(ce);var gt=ie.display,Ct=gt.lineDiv.getBoundingClientRect();if(nt>Ct.bottom||!mn(ie,Te))return jn(ce);nt-=Ct.top-gt.viewOffset;for(var bt=0;bt<ie.display.gutterSpecs.length;++bt){var Bt=gt.gutters.childNodes[bt];if(Bt&&Bt.getBoundingClientRect().right>=Fe){var fn=Ht(ie.doc,nt),Zt=ie.display.gutterSpecs[bt];return yn(ie,Te,ie,fn,Zt.className,ce),jn(ce)}}}function Ef(ie,ce){return Cf(ie,ce,"gutterClick",!0)}function Lf(ie,ce){hs(ie.display,ce)||am(ie,ce)||un(ie,ce,"contextmenu")||ve||ie.display.input.onContextMenu(ce)}function am(ie,ce){return mn(ie,"gutterContextMenu")?Cf(ie,ce,"gutterContextMenu",!1):!1}function Mf(ie){ie.display.wrapper.className=ie.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+ie.options.theme.replace(/(^|\s)\s*/g," cm-s-"),hu(ie)}var Kh={toString:function(){return"CodeMirror.Init"}},Gp={},zd={};function lm(ie){var ce=ie.optionHandlers;function Te(ke,Fe,nt,gt){ie.defaults[ke]=Fe,nt&&(ce[ke]=gt?function(Ct,bt,Bt){Bt!=Kh&&nt(Ct,bt,Bt)}:nt)}ie.defineOption=Te,ie.Init=Kh,Te("value","",function(ke,Fe){return ke.setValue(Fe)},!0),Te("mode",null,function(ke,Fe){ke.doc.modeOption=Fe,ao(ke)},!0),Te("indentUnit",2,ao,!0),Te("indentWithTabs",!1),Te("smartIndent",!0),Te("tabSize",4,function(ke){Tu(ke),hu(ke),gs(ke)},!0),Te("lineSeparator",null,function(ke,Fe){if(ke.doc.lineSep=Fe,!!Fe){var nt=[],gt=ke.doc.first;ke.doc.iter(function(bt){for(var Bt=0;;){var fn=bt.text.indexOf(Fe,Bt);if(fn==-1)break;Bt=fn+Fe.length,nt.push(Kt(gt,fn))}gt++});for(var Ct=nt.length-1;Ct>=0;Ct--)_c(ke.doc,Fe,nt[Ct],Kt(nt[Ct].line,nt[Ct].ch+Fe.length))}}),Te("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(ke,Fe,nt){ke.state.specialChars=new RegExp(Fe.source+(Fe.test(" ")?"":"| "),"g"),nt!=Kh&&ke.refresh()}),Te("specialCharPlaceholder",Jr,function(ke){return ke.refresh()},!0),Te("electricChars",!0),Te("inputStyle",z?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Te("spellcheck",!1,function(ke,Fe){return ke.getInputField().spellcheck=Fe},!0),Te("autocorrect",!1,function(ke,Fe){return ke.getInputField().autocorrect=Fe},!0),Te("autocapitalize",!1,function(ke,Fe){return ke.getInputField().autocapitalize=Fe},!0),Te("rtlMoveVisually",!ae),Te("wholeLineUpdateBefore",!0),Te("theme","default",function(ke){Mf(ke),ji(ke)},!0),Te("keyMap","default",function(ke,Fe,nt){var gt=Cc(Fe),Ct=nt!=Kh&&Cc(nt);Ct&&Ct.detach&&Ct.detach(ke,gt),gt.attach&>.attach(ke,Ct||null)}),Te("extraKeys",null),Te("configureMouse",null),Te("lineWrapping",!1,um,!0),Te("gutters",[],function(ke,Fe){ke.display.gutterSpecs=zr(Fe,ke.options.lineNumbers),ji(ke)},!0),Te("fixedGutter",!0,function(ke,Fe){ke.display.gutters.style.left=Fe?Cu(ke.display)+"px":"0",ke.refresh()},!0),Te("coverGutterNextToScrollbar",!1,function(ke){return ya(ke)},!0),Te("scrollbarStyle","native",function(ke){cu(ke),ya(ke),ke.display.scrollbars.setScrollTop(ke.doc.scrollTop),ke.display.scrollbars.setScrollLeft(ke.doc.scrollLeft)},!0),Te("lineNumbers",!1,function(ke,Fe){ke.display.gutterSpecs=zr(ke.options.gutters,Fe),ji(ke)},!0),Te("firstLineNumber",1,ji,!0),Te("lineNumberFormatter",function(ke){return ke},ji,!0),Te("showCursorWhenSelecting",!1,ea,!0),Te("resetSelectionOnContextMenu",!0),Te("lineWiseCopyCut",!0),Te("pasteLinesPerSelection",!0),Te("selectionsMayTouch",!1),Te("readOnly",!1,function(ke,Fe){Fe=="nocursor"&&(nh(ke),ke.display.input.blur()),ke.display.input.readOnlyChanged(Fe)}),Te("screenReaderLabel",null,function(ke,Fe){Fe=Fe===""?null:Fe,ke.display.input.screenReaderLabelChanged(Fe)}),Te("disableInput",!1,function(ke,Fe){Fe||ke.display.input.reset()},!0),Te("dragDrop",!0,kf),Te("allowDropFileTypes",null),Te("cursorBlinkRate",530),Te("cursorScrollMargin",0),Te("cursorHeight",1,ea,!0),Te("singleCursorHeightPerLine",!0,ea,!0),Te("workTime",100),Te("workDelay",100),Te("flattenSpans",!0,Tu,!0),Te("addModeClass",!1,Tu,!0),Te("pollInterval",100),Te("undoDepth",200,function(ke,Fe){return ke.doc.history.undoDepth=Fe}),Te("historyEventDelay",1250),Te("viewportMargin",10,function(ke){return ke.refresh()},!0),Te("maxHighlightLength",1e4,Tu,!0),Te("moveInputWithCursor",!0,function(ke,Fe){Fe||ke.display.input.resetPosition()}),Te("tabindex",null,function(ke,Fe){return ke.display.input.getField().tabIndex=Fe||""}),Te("autofocus",null),Te("direction","ltr",function(ke,Fe){return ke.doc.setDirection(Fe)},!0),Te("phrases",null)}function kf(ie,ce,Te){var ke=Te&&Te!=Kh;if(!ce!=!ke){var Fe=ie.display.dragFunctions,nt=ce?Gt:bn;nt(ie.display.scroller,"dragstart",Fe.start),nt(ie.display.scroller,"dragenter",Fe.enter),nt(ie.display.scroller,"dragover",Fe.over),nt(ie.display.scroller,"dragleave",Fe.leave),nt(ie.display.scroller,"drop",Fe.drop)}}function um(ie){ie.options.lineWrapping?(Mt(ie.display.wrapper,"CodeMirror-wrap"),ie.display.sizer.style.minWidth="",ie.display.sizerWidth=null):(Ae(ie.display.wrapper,"CodeMirror-wrap"),Ji(ie)),Rr(ie),gs(ie),hu(ie),setTimeout(function(){return ya(ie)},100)}function ts(ie,ce){var Te=this;if(!(this instanceof ts))return new ts(ie,ce);this.options=ce=ce?Rt(ce):{},Rt(Gp,ce,!1);var ke=ce.value;typeof ke=="string"?ke=new Xa(ke,ce.mode,null,ce.lineSeparator,ce.direction):ce.mode&&(ke.modeOption=ce.mode),this.doc=ke;var Fe=new ts.inputStyles[ce.inputStyle](this),nt=this.display=new $o(ie,ke,Fe,ce);nt.wrapper.CodeMirror=this,Mf(this),ce.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),cu(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 rt,keySeq:null,specialChars:null},ce.autofocus&&!z&&nt.input.focus(),Ce&&xe<11&&setTimeout(function(){return Te.display.input.reset(!0)},20),ld(this),$l(),Ya(this),this.curOp.forceUpdate=!0,Au(this,ke),ce.autofocus&&!z||this.hasFocus()?setTimeout(function(){Te.hasFocus()&&!Te.state.focused&&No(Te)},20):nh(this);for(var gt in zd)zd.hasOwnProperty(gt)&&zd[gt](this,ce[gt],Kh);Co(this),ce.finishInit&&ce.finishInit(this);for(var Ct=0;Ct<kc.length;++Ct)kc[Ct](this);Jl(this),be&&ce.lineWrapping&&getComputedStyle(nt.lineDiv).textRendering=="optimizelegibility"&&(nt.lineDiv.style.textRendering="auto")}ts.defaults=Gp,ts.optionHandlers=zd;function ld(ie){var ce=ie.display;Gt(ce.scroller,"mousedown",Bi(ie,Vu)),Ce&&xe<11?Gt(ce.scroller,"dblclick",Bi(ie,function(bt){if(!un(ie,bt)){var Bt=va(ie,bt);if(!(!Bt||Ef(ie,bt)||hs(ie.display,bt))){ri(bt);var fn=ie.findWordAt(Bt);Lh(ie.doc,fn.anchor,fn.head)}}})):Gt(ce.scroller,"dblclick",function(bt){return un(ie,bt)||ri(bt)}),Gt(ce.scroller,"contextmenu",function(bt){return Lf(ie,bt)}),Gt(ce.input.getField(),"contextmenu",function(bt){ce.scroller.contains(bt.target)||Lf(ie,bt)});var Te,ke={end:0};function Fe(){ce.activeTouch&&(Te=setTimeout(function(){return ce.activeTouch=null},1e3),ke=ce.activeTouch,ke.end=+new Date)}function nt(bt){if(bt.touches.length!=1)return!1;var Bt=bt.touches[0];return Bt.radiusX<=1&&Bt.radiusY<=1}function gt(bt,Bt){if(Bt.left==null)return!0;var fn=Bt.left-bt.left,Zt=Bt.top-bt.top;return fn*fn+Zt*Zt>20*20}Gt(ce.scroller,"touchstart",function(bt){if(!un(ie,bt)&&!nt(bt)&&!Ef(ie,bt)){ce.input.ensurePolled(),clearTimeout(Te);var Bt=+new Date;ce.activeTouch={start:Bt,moved:!1,prev:Bt-ke.end<=300?ke:null},bt.touches.length==1&&(ce.activeTouch.left=bt.touches[0].pageX,ce.activeTouch.top=bt.touches[0].pageY)}}),Gt(ce.scroller,"touchmove",function(){ce.activeTouch&&(ce.activeTouch.moved=!0)}),Gt(ce.scroller,"touchend",function(bt){var Bt=ce.activeTouch;if(Bt&&!hs(ce,bt)&&Bt.left!=null&&!Bt.moved&&new Date-Bt.start<300){var fn=ie.coordsChar(ce.activeTouch,"page"),Zt;!Bt.prev||gt(Bt,Bt.prev)?Zt=new Or(fn,fn):!Bt.prev.prev||gt(Bt,Bt.prev.prev)?Zt=ie.findWordAt(fn):Zt=new Or(Kt(fn.line,0),Mn(ie.doc,Kt(fn.line+1,0))),ie.setSelection(Zt.anchor,Zt.head),ie.focus(),ri(bt)}Fe()}),Gt(ce.scroller,"touchcancel",Fe),Gt(ce.scroller,"scroll",function(){ce.scroller.clientHeight&&(Cl(ie,ce.scroller.scrollTop),Xl(ie,ce.scroller.scrollLeft,!0),yn(ie,"scroll",ie))}),Gt(ce.scroller,"mousewheel",function(bt){return Fo(ie,bt)}),Gt(ce.scroller,"DOMMouseScroll",function(bt){return Fo(ie,bt)}),Gt(ce.wrapper,"scroll",function(){return ce.wrapper.scrollTop=ce.wrapper.scrollLeft=0}),ce.dragFunctions={enter:function(bt){un(ie,bt)||ki(bt)},over:function(bt){un(ie,bt)||(em(ie,bt),ki(bt))},start:function(bt){return $g(ie,bt)},drop:Bi(ie,Ep),leave:function(bt){un(ie,bt)||tm(ie)}};var Ct=ce.input.getField();Gt(Ct,"keyup",function(bt){return Fp.call(ie,bt)}),Gt(Ct,"keydown",Bi(ie,Ip)),Gt(Ct,"keypress",Bi(ie,Zu)),Gt(Ct,"focus",function(bt){return No(ie,bt)}),Gt(Ct,"blur",function(bt){return nh(ie,bt)})}var kc=[];ts.defineInitHook=function(ie){return kc.push(ie)};function Ea(ie,ce,Te,ke){var Fe=ie.doc,nt;Te==null&&(Te="add"),Te=="smart"&&(Fe.mode.indent?nt=Tr(ie,ce).state:Te="prev");var gt=ie.options.tabSize,Ct=cn(Fe,ce),bt=ut(Ct.text,null,gt);Ct.stateAfter&&(Ct.stateAfter=null);var Bt=Ct.text.match(/^\s*/)[0],fn;if(!ke&&!/\S/.test(Ct.text))fn=0,Te="not";else if(Te=="smart"&&(fn=Fe.mode.indent(nt,Ct.text.slice(Bt.length),Ct.text),fn==wt||fn>150)){if(!ke)return;Te="prev"}Te=="prev"?ce>Fe.first?fn=ut(cn(Fe,ce-1).text,null,gt):fn=0:Te=="add"?fn=bt+ie.options.indentUnit:Te=="subtract"?fn=bt-ie.options.indentUnit:typeof Te=="number"&&(fn=bt+Te),fn=Math.max(0,fn);var Zt="",Tn=0;if(ie.options.indentWithTabs)for(var Cn=Math.floor(fn/gt);Cn;--Cn)Tn+=gt,Zt+=" ";if(Tn<fn&&(Zt+=Dt(fn-Tn)),Zt!=Bt)return _c(Fe,Zt,Kt(ce,0),Kt(ce,Bt.length),"+input"),Ct.stateAfter=null,!0;for(var fi=0;fi<Fe.sel.ranges.length;fi++){var xi=Fe.sel.ranges[fi];if(xi.head.line==ce&&xi.head.ch<Bt.length){var Ai=Kt(ce,Bt.length);sh(Fe,fi,new Or(Ai,Ai));break}}}var Ll=null;function Tc(ie){Ll=ie}function Ud(ie,ce,Te,ke,Fe){var nt=ie.doc;ie.display.shift=!1,ke||(ke=nt.sel);var gt=+new Date-200,Ct=Fe=="paste"||ie.state.pasteIncoming>gt,bt=cr(ce),Bt=null;if(Ct&&ke.ranges.length>1)if(Ll&&Ll.text.join(`
|
|
|
`)==ce){if(ke.ranges.length%Ll.text.length==0){Bt=[];for(var fn=0;fn<Ll.text.length;fn++)Bt.push(nt.splitLines(Ll.text[fn]))}}else bt.length==ke.ranges.length&&ie.options.pasteLinesPerSelection&&(Bt=Yt(bt,function(Xi){return[Xi]}));for(var Zt=ie.curOp.updateInput,Tn=ke.ranges.length-1;Tn>=0;Tn--){var Cn=ke.ranges[Tn],fi=Cn.from(),xi=Cn.to();Cn.empty()&&(Te&&Te>0?fi=Kt(fi.line,fi.ch-Te):ie.state.overwrite&&!Ct?xi=Kt(xi.line,Math.min(cn(nt,xi.line).text.length,xi.ch+Qt(bt).length)):Ct&&Ll&&Ll.lineWise&&Ll.text.join(`
|
|
|
`)==bt.join(`
|
|
|
`)&&(fi=xi=Kt(fi.line,0)));var Ai={from:fi,to:xi,text:Bt?Bt[Tn%Bt.length]:bt,origin:Fe||(Ct?"paste":ie.state.cutIncoming>gt?"cut":"+input")};Zh(ie.doc,Ai),nr(ie,"inputRead",ie,Ai)}ce&&!Ct&&Zp(ie,ce),Yl(ie),ie.curOp.updateInput<2&&(ie.curOp.updateInput=Zt),ie.curOp.typing=!0,ie.state.pasteIncoming=ie.state.cutIncoming=-1}function Wp(ie,ce){var Te=ie.clipboardData&&ie.clipboardData.getData("Text");if(Te)return ie.preventDefault(),!ce.isReadOnly()&&!ce.options.disableInput&&qt(ce,function(){return Ud(ce,Te,0,null,"paste")}),!0}function Zp(ie,ce){if(!(!ie.options.electricChars||!ie.options.smartIndent))for(var Te=ie.doc.sel,ke=Te.ranges.length-1;ke>=0;ke--){var Fe=Te.ranges[ke];if(!(Fe.head.ch>100||ke&&Te.ranges[ke-1].head.line==Fe.head.line)){var nt=ie.getModeAt(Fe.head),gt=!1;if(nt.electricChars){for(var Ct=0;Ct<nt.electricChars.length;Ct++)if(ce.indexOf(nt.electricChars.charAt(Ct))>-1){gt=Ea(ie,Fe.head.line,"smart");break}}else nt.electricInput&&nt.electricInput.test(cn(ie.doc,Fe.head.line).text.slice(0,Fe.head.ch))&&(gt=Ea(ie,Fe.head.line,"smart"));gt&&nr(ie,"electricInput",ie,Fe.head.line)}}}function Vp(ie){for(var ce=[],Te=[],ke=0;ke<ie.doc.sel.ranges.length;ke++){var Fe=ie.doc.sel.ranges[ke].head.line,nt={anchor:Kt(Fe,0),head:Kt(Fe+1,0)};Te.push(nt),ce.push(ie.getRange(nt.anchor,nt.head))}return{text:ce,ranges:Te}}function Kp(ie,ce,Te,ke){ie.setAttribute("autocorrect",Te?"":"off"),ie.setAttribute("autocapitalize",ke?"":"off"),ie.setAttribute("spellcheck",!!ce)}function Yp(){var ie=Ze("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),ce=Ze("div",[ie],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return be?ie.style.width="1000px":ie.setAttribute("wrap","off"),ue&&(ie.style.border="1px solid black"),Kp(ie),ce}function Yh(ie){var ce=ie.optionHandlers,Te=ie.helpers={};ie.prototype={constructor:ie,focus:function(){window.focus(),this.display.input.focus()},setOption:function(ke,Fe){var nt=this.options,gt=nt[ke];nt[ke]==Fe&&ke!="mode"||(nt[ke]=Fe,ce.hasOwnProperty(ke)&&Bi(this,ce[ke])(this,Fe,gt),yn(this,"optionChange",this,ke))},getOption:function(ke){return this.options[ke]},getDoc:function(){return this.doc},addKeyMap:function(ke,Fe){this.state.keyMaps[Fe?"push":"unshift"](Cc(ke))},removeKeyMap:function(ke){for(var Fe=this.state.keyMaps,nt=0;nt<Fe.length;++nt)if(Fe[nt]==ke||Fe[nt].name==ke)return Fe.splice(nt,1),!0},addOverlay:_i(function(ke,Fe){var nt=ke.token?ke:ie.getMode(this.options,ke);if(nt.startState)throw new Error("Overlays may not be stateful.");Jt(this.state.overlays,{mode:nt,modeSpec:ke,opaque:Fe&&Fe.opaque,priority:Fe&&Fe.priority||0},function(gt){return gt.priority}),this.state.modeGen++,gs(this)}),removeOverlay:_i(function(ke){for(var Fe=this.state.overlays,nt=0;nt<Fe.length;++nt){var gt=Fe[nt].modeSpec;if(gt==ke||typeof ke=="string"&>.name==ke){Fe.splice(nt,1),this.state.modeGen++,gs(this);return}}}),indentLine:_i(function(ke,Fe,nt){typeof Fe!="string"&&typeof Fe!="number"&&(Fe==null?Fe=this.options.smartIndent?"smart":"prev":Fe=Fe?"add":"subtract"),Pn(this.doc,ke)&&Ea(this,ke,Fe,nt)}),indentSelection:_i(function(ke){for(var Fe=this.doc.sel.ranges,nt=-1,gt=0;gt<Fe.length;gt++){var Ct=Fe[gt];if(Ct.empty())Ct.head.line>nt&&(Ea(this,Ct.head.line,ke,!0),nt=Ct.head.line,gt==this.doc.sel.primIndex&&Yl(this));else{var bt=Ct.from(),Bt=Ct.to(),fn=Math.max(nt,bt.line);nt=Math.min(this.lastLine(),Bt.line-(Bt.ch?0:1))+1;for(var Zt=fn;Zt<nt;++Zt)Ea(this,Zt,ke);var Tn=this.doc.sel.ranges;bt.ch==0&&Fe.length==Tn.length&&Tn[gt].from().ch>0&&sh(this.doc,gt,new Or(bt,Tn[gt].to()),xt)}}}),getTokenAt:function(ke,Fe){return or(this,ke,Fe)},getLineTokens:function(ke,Fe){return or(this,Kt(ke),Fe,!0)},getTokenTypeAt:function(ke){ke=Mn(this.doc,ke);var Fe=Sr(this,cn(this.doc,ke.line)),nt=0,gt=(Fe.length-1)/2,Ct=ke.ch,bt;if(Ct==0)bt=Fe[2];else for(;;){var Bt=nt+gt>>1;if((Bt?Fe[Bt*2-1]:0)>=Ct)gt=Bt;else if(Fe[Bt*2+1]<Ct)nt=Bt+1;else{bt=Fe[Bt*2+2];break}}var fn=bt?bt.indexOf("overlay "):-1;return fn<0?bt:fn==0?null:bt.slice(0,fn-1)},getModeAt:function(ke){var Fe=this.doc.mode;return Fe.innerMode?ie.innerMode(Fe,this.getTokenAt(ke).state).mode:Fe},getHelper:function(ke,Fe){return this.getHelpers(ke,Fe)[0]},getHelpers:function(ke,Fe){var nt=[];if(!Te.hasOwnProperty(Fe))return nt;var gt=Te[Fe],Ct=this.getModeAt(ke);if(typeof Ct[Fe]=="string")gt[Ct[Fe]]&&nt.push(gt[Ct[Fe]]);else if(Ct[Fe])for(var bt=0;bt<Ct[Fe].length;bt++){var Bt=gt[Ct[Fe][bt]];Bt&&nt.push(Bt)}else Ct.helperType&>[Ct.helperType]?nt.push(gt[Ct.helperType]):gt[Ct.name]&&nt.push(gt[Ct.name]);for(var fn=0;fn<gt._global.length;fn++){var Zt=gt._global[fn];Zt.pred(Ct,this)&&ct(nt,Zt.val)==-1&&nt.push(Zt.val)}return nt},getStateAfter:function(ke,Fe){var nt=this.doc;return ke=zn(nt,ke==null?nt.first+nt.size-1:ke),Tr(this,ke+1,Fe).state},cursorCoords:function(ke,Fe){var nt,gt=this.doc.sel.primary();return ke==null?nt=gt.head:typeof ke=="object"?nt=Mn(this.doc,ke):nt=ke?gt.from():gt.to(),Yo(this,nt,Fe||"page")},charCoords:function(ke,Fe){return Ca(this,Mn(this.doc,ke),Fe||"page")},coordsChar:function(ke,Fe){return ke=Il(this,ke,Fe||"page"),Us(this,ke.left,ke.top)},lineAtHeight:function(ke,Fe){return ke=Il(this,{top:ke,left:0},Fe||"page").top,Ht(this.doc,ke+this.display.viewOffset)},heightAtLine:function(ke,Fe,nt){var gt=!1,Ct;if(typeof ke=="number"){var bt=this.doc.first+this.doc.size-1;ke<this.doc.first?ke=this.doc.first:ke>bt&&(ke=bt,gt=!0),Ct=cn(this.doc,ke)}else Ct=ke;return $s(this,Ct,{top:0,left:0},Fe||"page",nt||gt).top+(gt?this.doc.height-Gi(Ct):0)},defaultTextHeight:function(){return sa(this.display)},defaultCharWidth:function(){return rl(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(ke,Fe,nt,gt,Ct){var bt=this.display;ke=Yo(this,Mn(this.doc,ke));var Bt=ke.bottom,fn=ke.left;if(Fe.style.position="absolute",Fe.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Fe),bt.sizer.appendChild(Fe),gt=="over")Bt=ke.top;else if(gt=="above"||gt=="near"){var Zt=Math.max(bt.wrapper.clientHeight,this.doc.height),Tn=Math.max(bt.sizer.clientWidth,bt.lineSpace.clientWidth);(gt=="above"||ke.bottom+Fe.offsetHeight>Zt)&&ke.top>Fe.offsetHeight?Bt=ke.top-Fe.offsetHeight:ke.bottom+Fe.offsetHeight<=Zt&&(Bt=ke.bottom),fn+Fe.offsetWidth>Tn&&(fn=Tn-Fe.offsetWidth)}Fe.style.top=Bt+"px",Fe.style.left=Fe.style.right="",Ct=="right"?(fn=bt.sizer.clientWidth-Fe.offsetWidth,Fe.style.right="0px"):(Ct=="left"?fn=0:Ct=="middle"&&(fn=(bt.sizer.clientWidth-Fe.offsetWidth)/2),Fe.style.left=fn+"px"),nt&&ih(this,{left:fn,top:Bt,right:fn+Fe.offsetWidth,bottom:Bt+Fe.offsetHeight})},triggerOnKeyDown:_i(Ip),triggerOnKeyPress:_i(Zu),triggerOnKeyUp:Fp,triggerOnMouseDown:_i(Vu),execCommand:function(ke){if(Vh.hasOwnProperty(ke))return Vh[ke].call(null,this)},triggerElectric:_i(function(ke){Zp(this,ke)}),findPosH:function(ke,Fe,nt,gt){var Ct=1;Fe<0&&(Ct=-1,Fe=-Fe);for(var bt=Mn(this.doc,ke),Bt=0;Bt<Fe&&(bt=Hd(this.doc,bt,Ct,nt,gt),!bt.hitSide);++Bt);return bt},moveH:_i(function(ke,Fe){var nt=this;this.extendSelectionsBy(function(gt){return nt.display.shift||nt.doc.extend||gt.empty()?Hd(nt.doc,gt.head,ke,Fe,nt.options.rtlMoveVisually):ke<0?gt.from():gt.to()},zt)}),deleteH:_i(function(ke,Fe){var nt=this.doc.sel,gt=this.doc;nt.somethingSelected()?gt.replaceSelection("",null,"+delete"):Fl(this,function(Ct){var bt=Hd(gt,Ct.head,ke,Fe,!1);return ke<0?{from:bt,to:Ct.head}:{from:Ct.head,to:bt}})}),findPosV:function(ke,Fe,nt,gt){var Ct=1,bt=gt;Fe<0&&(Ct=-1,Fe=-Fe);for(var Bt=Mn(this.doc,ke),fn=0;fn<Fe;++fn){var Zt=Yo(this,Bt,"div");if(bt==null?bt=Zt.left:Zt.left=bt,Bt=Xh(this,Zt,Ct,nt),Bt.hitSide)break}return Bt},moveV:_i(function(ke,Fe){var nt=this,gt=this.doc,Ct=[],bt=!this.display.shift&&!gt.extend&>.sel.somethingSelected();if(gt.extendSelectionsBy(function(fn){if(bt)return ke<0?fn.from():fn.to();var Zt=Yo(nt,fn.head,"div");fn.goalColumn!=null&&(Zt.left=fn.goalColumn),Ct.push(Zt.left);var Tn=Xh(nt,Zt,ke,Fe);return Fe=="page"&&fn==gt.sel.primary()&&Ph(nt,Ca(nt,Tn,"div").top-Zt.top),Tn},zt),Ct.length)for(var Bt=0;Bt<gt.sel.ranges.length;Bt++)gt.sel.ranges[Bt].goalColumn=Ct[Bt]}),findWordAt:function(ke){var Fe=this.doc,nt=cn(Fe,ke.line).text,gt=ke.ch,Ct=ke.ch;if(nt){var bt=this.getHelper(ke,"wordChars");(ke.sticky=="before"||Ct==nt.length)&>?--gt:++Ct;for(var Bt=nt.charAt(gt),fn=ht(Bt,bt)?function(Zt){return ht(Zt,bt)}:/\s/.test(Bt)?function(Zt){return/\s/.test(Zt)}:function(Zt){return!/\s/.test(Zt)&&!ht(Zt)};gt>0&&fn(nt.charAt(gt-1));)--gt;for(;Ct<nt.length&&fn(nt.charAt(Ct));)++Ct}return new Or(Kt(ke.line,gt),Kt(ke.line,Ct))},toggleOverwrite:function(ke){ke!=null&&ke==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Mt(this.display.cursorDiv,"CodeMirror-overwrite"):Ae(this.display.cursorDiv,"CodeMirror-overwrite"),yn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==pt()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:_i(function(ke,Fe){Wr(this,ke,Fe)}),getScrollInfo:function(){var ke=this.display.scroller;return{left:ke.scrollLeft,top:ke.scrollTop,height:ke.scrollHeight-is(this)-this.display.barHeight,width:ke.scrollWidth-is(this)-this.display.barWidth,clientHeight:Sa(this),clientWidth:Pa(this)}},scrollIntoView:_i(function(ke,Fe){ke==null?(ke={from:this.doc.sel.primary().head,to:null},Fe==null&&(Fe=this.options.cursorScrollMargin)):typeof ke=="number"?ke={from:Kt(ke,0),to:null}:ke.from==null&&(ke={from:ke,to:null}),ke.to||(ke.to=ke.from),ke.margin=Fe||0,ke.from.line!=null?Ho(this,ke):Ch(this,ke.from,ke.to,ke.margin)}),setSize:_i(function(ke,Fe){var nt=this,gt=function(bt){return typeof bt=="number"||/^\d+$/.test(String(bt))?bt+"px":bt};ke!=null&&(this.display.wrapper.style.width=gt(ke)),Fe!=null&&(this.display.wrapper.style.height=gt(Fe)),this.options.lineWrapping&&uu(this);var Ct=this.display.viewFrom;this.doc.iter(Ct,this.display.viewTo,function(bt){if(bt.widgets){for(var Bt=0;Bt<bt.widgets.length;Bt++)if(bt.widgets[Bt].noHScroll){to(nt,Ct,"widget");break}}++Ct}),this.curOp.forceUpdate=!0,yn(this,"refresh",this)}),operation:function(ke){return qt(this,ke)},startOperation:function(){return Ya(this)},endOperation:function(){return Jl(this)},refresh:_i(function(){var ke=this.display.cachedTextHeight;gs(this),this.curOp.forceUpdate=!0,hu(this),Wr(this,this.doc.scrollLeft,this.doc.scrollTop),rs(this.display),(ke==null||Math.abs(ke-sa(this.display))>.5||this.options.lineWrapping)&&Rr(this),yn(this,"refresh",this)}),swapDoc:_i(function(ke){var Fe=this.doc;return Fe.cm=null,this.state.selectingText&&this.state.selectingText(),Au(this,ke),hu(this),this.display.input.reset(),Wr(this,ke.scrollLeft,ke.scrollTop),this.curOp.forceScroll=!0,nr(this,"swapDoc",this,Fe),Fe}),phrase:function(ke){var Fe=this.options.phrases;return Fe&&Object.prototype.hasOwnProperty.call(Fe,ke)?Fe[ke]:ke},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}},Yn(ie),ie.registerHelper=function(ke,Fe,nt){Te.hasOwnProperty(ke)||(Te[ke]=ie[ke]={_global:[]}),Te[ke][Fe]=nt},ie.registerGlobalHelper=function(ke,Fe,nt,gt){ie.registerHelper(ke,Fe,gt),Te[ke]._global.push({pred:nt,val:gt})}}function Hd(ie,ce,Te,ke,Fe){var nt=ce,gt=Te,Ct=cn(ie,ce.line),bt=Fe&&ie.direction=="rtl"?-Te:Te;function Bt(){var Pr=ce.line+bt;return Pr<ie.first||Pr>=ie.first+ie.size?!1:(ce=new Kt(Pr,ce.ch,ce.sticky),Ct=cn(ie,Pr))}function fn(Pr){var lr;if(ke=="codepoint"){var Ir=Ct.text.charCodeAt(ce.ch+(ke>0?0:-1));isNaN(Ir)?lr=null:lr=new Kt(ce.line,Math.max(0,Math.min(Ct.text.length,ce.ch+Te*(Ir>=55296&&Ir<56320?2:1))),-Te)}else Fe?lr=xf(ie.cm,Ct,ce,Te):lr=da(Ct,ce,Te);if(lr==null)if(!Pr&&Bt())ce=jd(Fe,ie.cm,Ct,ce.line,bt);else return!1;else ce=lr;return!0}if(ke=="char"||ke=="codepoint")fn();else if(ke=="column")fn(!0);else if(ke=="word"||ke=="group")for(var Zt=null,Tn=ke=="group",Cn=ie.cm&&ie.cm.getHelper(ce,"wordChars"),fi=!0;!(Te<0&&!fn(!fi));fi=!1){var xi=Ct.text.charAt(ce.ch)||`
|
|
|
`,Ai=ht(xi,Cn)?"w":Tn&&xi==`
|
|
|
`?"n":!Tn||/\s/.test(xi)?null:"p";if(Tn&&!fi&&!Ai&&(Ai="s"),Zt&&Zt!=Ai){Te<0&&(Te=1,fn(),ce.sticky="after");break}if(Ai&&(Zt=Ai),Te>0&&!fn(!fi))break}var Xi=Dd(ie,ce,nt,gt,!0);return Hn(nt,Xi)&&(Xi.hitSide=!0),Xi}function Xh(ie,ce,Te,ke){var Fe=ie.doc,nt=ce.left,gt;if(ke=="page"){var Ct=Math.min(ie.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),bt=Math.max(Ct-.5*sa(ie.display),3);gt=(Te>0?ce.bottom:ce.top)+Te*bt}else ke=="line"&&(gt=Te>0?ce.bottom+3:ce.top-3);for(var Bt;Bt=Us(ie,nt,gt),!!Bt.outside;){if(Te<0?gt<=0:gt>=Fe.height){Bt.hitSide=!0;break}gt+=Te*5}return Bt}var Ps=function(ie){this.cm=ie,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new rt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ps.prototype.init=function(ie){var ce=this,Te=this,ke=Te.cm,Fe=Te.div=ie.lineDiv;Kp(Fe,ke.options.spellcheck,ke.options.autocorrect,ke.options.autocapitalize);function nt(Ct){for(var bt=Ct.target;bt;bt=bt.parentNode){if(bt==Fe)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(bt.className))break}return!1}Gt(Fe,"paste",function(Ct){!nt(Ct)||un(ke,Ct)||Wp(Ct,ke)||xe<=11&&setTimeout(Bi(ke,function(){return ce.updateFromDOM()}),20)}),Gt(Fe,"compositionstart",function(Ct){ce.composing={data:Ct.data,done:!1}}),Gt(Fe,"compositionupdate",function(Ct){ce.composing||(ce.composing={data:Ct.data,done:!1})}),Gt(Fe,"compositionend",function(Ct){ce.composing&&(Ct.data!=ce.composing.data&&ce.readFromDOMSoon(),ce.composing.done=!0)}),Gt(Fe,"touchstart",function(){return Te.forceCompositionEnd()}),Gt(Fe,"input",function(){ce.composing||ce.readFromDOMSoon()});function gt(Ct){if(!(!nt(Ct)||un(ke,Ct))){if(ke.somethingSelected())Tc({lineWise:!1,text:ke.getSelections()}),Ct.type=="cut"&&ke.replaceSelection("",null,"cut");else if(ke.options.lineWiseCopyCut){var bt=Vp(ke);Tc({lineWise:!0,text:bt.text}),Ct.type=="cut"&&ke.operation(function(){ke.setSelections(bt.ranges,0,xt),ke.replaceSelection("",null,"cut")})}else return;if(Ct.clipboardData){Ct.clipboardData.clearData();var Bt=Ll.text.join(`
|
|
|
`);if(Ct.clipboardData.setData("Text",Bt),Ct.clipboardData.getData("Text")==Bt){Ct.preventDefault();return}}var fn=Yp(),Zt=fn.firstChild;ke.display.lineSpace.insertBefore(fn,ke.display.lineSpace.firstChild),Zt.value=Ll.text.join(`
|
|
|
`);var Tn=document.activeElement;_t(Zt),setTimeout(function(){ke.display.lineSpace.removeChild(fn),Tn.focus(),Tn==Fe&&Te.showPrimarySelection()},50)}}Gt(Fe,"copy",gt),Gt(Fe,"cut",gt)},Ps.prototype.screenReaderLabelChanged=function(ie){ie?this.div.setAttribute("aria-label",ie):this.div.removeAttribute("aria-label")},Ps.prototype.prepareSelection=function(){var ie=Eu(this.cm,!1);return ie.focus=document.activeElement==this.div,ie},Ps.prototype.showSelection=function(ie,ce){!ie||!this.cm.display.view.length||((ie.focus||ce)&&this.showPrimarySelection(),this.showMultipleSelections(ie))},Ps.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ps.prototype.showPrimarySelection=function(){var ie=this.getSelection(),ce=this.cm,Te=ce.doc.sel.primary(),ke=Te.from(),Fe=Te.to();if(ce.display.viewTo==ce.display.viewFrom||ke.line>=ce.display.viewTo||Fe.line<ce.display.viewFrom){ie.removeAllRanges();return}var nt=Gd(ce,ie.anchorNode,ie.anchorOffset),gt=Gd(ce,ie.focusNode,ie.focusOffset);if(!(nt&&!nt.bad&>&&!gt.bad&&vn(Wn(nt,gt),ke)==0&&vn(oi(nt,gt),Fe)==0)){var Ct=ce.display.view,bt=ke.line>=ce.display.viewFrom&&Tf(ce,ke)||{node:Ct[0].measure.map[2],offset:0},Bt=Fe.line<ce.display.viewTo&&Tf(ce,Fe);if(!Bt){var fn=Ct[Ct.length-1].measure,Zt=fn.maps?fn.maps[fn.maps.length-1]:fn.map;Bt={node:Zt[Zt.length-1],offset:Zt[Zt.length-2]-Zt[Zt.length-3]}}if(!bt||!Bt){ie.removeAllRanges();return}var Tn=ie.rangeCount&&ie.getRangeAt(0),Cn;try{Cn=Xe(bt.node,bt.offset,Bt.offset,Bt.node)}catch(fi){}Cn&&(!Le&&ce.state.focused?(ie.collapse(bt.node,bt.offset),Cn.collapsed||(ie.removeAllRanges(),ie.addRange(Cn))):(ie.removeAllRanges(),ie.addRange(Cn)),Tn&&ie.anchorNode==null?ie.addRange(Tn):Le&&this.startGracePeriod()),this.rememberSelection()}},Ps.prototype.startGracePeriod=function(){var ie=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){ie.gracePeriod=!1,ie.selectionChanged()&&ie.cm.operation(function(){return ie.cm.curOp.selectionChanged=!0})},20)},Ps.prototype.showMultipleSelections=function(ie){Oe(this.cm.display.cursorDiv,ie.cursors),Oe(this.cm.display.selectionDiv,ie.selection)},Ps.prototype.rememberSelection=function(){var ie=this.getSelection();this.lastAnchorNode=ie.anchorNode,this.lastAnchorOffset=ie.anchorOffset,this.lastFocusNode=ie.focusNode,this.lastFocusOffset=ie.focusOffset},Ps.prototype.selectionInEditor=function(){var ie=this.getSelection();if(!ie.rangeCount)return!1;var ce=ie.getRangeAt(0).commonAncestorContainer;return mt(this.div,ce)},Ps.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ps.prototype.blur=function(){this.div.blur()},Ps.prototype.getField=function(){return this.div},Ps.prototype.supportsTouch=function(){return!0},Ps.prototype.receivedFocus=function(){var ie=this;this.selectionInEditor()?this.pollSelection():qt(this.cm,function(){return ie.cm.curOp.selectionChanged=!0});function ce(){ie.cm.state.focused&&(ie.pollSelection(),ie.polling.set(ie.cm.options.pollInterval,ce))}this.polling.set(this.cm.options.pollInterval,ce)},Ps.prototype.selectionChanged=function(){var ie=this.getSelection();return ie.anchorNode!=this.lastAnchorNode||ie.anchorOffset!=this.lastAnchorOffset||ie.focusNode!=this.lastFocusNode||ie.focusOffset!=this.lastFocusOffset},Ps.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var ie=this.getSelection(),ce=this.cm;if(ee&&we&&this.cm.display.gutterSpecs.length&&Xp(ie.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var Te=Gd(ce,ie.anchorNode,ie.anchorOffset),ke=Gd(ce,ie.focusNode,ie.focusOffset);Te&&ke&&qt(ce,function(){sl(ce.doc,Uo(Te,ke),xt),(Te.bad||ke.bad)&&(ce.curOp.selectionChanged=!0)})}}},Ps.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var ie=this.cm,ce=ie.display,Te=ie.doc.sel.primary(),ke=Te.from(),Fe=Te.to();if(ke.ch==0&&ke.line>ie.firstLine()&&(ke=Kt(ke.line-1,cn(ie.doc,ke.line-1).length)),Fe.ch==cn(ie.doc,Fe.line).text.length&&Fe.line<ie.lastLine()&&(Fe=Kt(Fe.line+1,0)),ke.line<ce.viewFrom||Fe.line>ce.viewTo-1)return!1;var nt,gt,Ct;ke.line==ce.viewFrom||(nt=Is(ie,ke.line))==0?(gt=Lt(ce.view[0].line),Ct=ce.view[0].node):(gt=Lt(ce.view[nt].line),Ct=ce.view[nt-1].node.nextSibling);var bt=Is(ie,Fe.line),Bt,fn;if(bt==ce.view.length-1?(Bt=ce.viewTo-1,fn=ce.lineDiv.lastChild):(Bt=Lt(ce.view[bt+1].line)-1,fn=ce.view[bt+1].node.previousSibling),!Ct)return!1;for(var Zt=ie.doc.splitLines(hd(ie,Ct,fn,gt,Bt)),Tn=On(ie.doc,Kt(gt,0),Kt(Bt,cn(ie.doc,Bt).text.length));Zt.length>1&&Tn.length>1;)if(Qt(Zt)==Qt(Tn))Zt.pop(),Tn.pop(),Bt--;else if(Zt[0]==Tn[0])Zt.shift(),Tn.shift(),gt++;else break;for(var Cn=0,fi=0,xi=Zt[0],Ai=Tn[0],Xi=Math.min(xi.length,Ai.length);Cn<Xi&&xi.charCodeAt(Cn)==Ai.charCodeAt(Cn);)++Cn;for(var Pr=Qt(Zt),lr=Qt(Tn),Ir=Math.min(Pr.length-(Zt.length==1?Cn:0),lr.length-(Tn.length==1?Cn:0));fi<Ir&&Pr.charCodeAt(Pr.length-fi-1)==lr.charCodeAt(lr.length-fi-1);)++fi;if(Zt.length==1&&Tn.length==1&>==ke.line)for(;Cn&&Cn>ke.ch&&Pr.charCodeAt(Pr.length-fi-1)==lr.charCodeAt(lr.length-fi-1);)Cn--,fi++;Zt[Zt.length-1]=Pr.slice(0,Pr.length-fi).replace(/^\u200b+/,""),Zt[0]=Zt[0].slice(Cn).replace(/\u200b+$/,"");var lo=Kt(gt,Cn),ar=Kt(Bt,Tn.length?Qt(Tn).length-fi:0);if(Zt.length>1||Zt[0]||vn(lo,ar))return _c(ie.doc,Zt,lo,ar,"+input"),!0},Ps.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ps.prototype.reset=function(){this.forceCompositionEnd()},Ps.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ps.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))},Ps.prototype.updateFromDOM=function(){var ie=this;(this.cm.isReadOnly()||!this.pollContent())&&qt(this.cm,function(){return gs(ie.cm)})},Ps.prototype.setUneditable=function(ie){ie.contentEditable="false"},Ps.prototype.onKeyPress=function(ie){ie.charCode==0||this.composing||(ie.preventDefault(),this.cm.isReadOnly()||Bi(this.cm,Ud)(this.cm,String.fromCharCode(ie.charCode==null?ie.keyCode:ie.charCode),0))},Ps.prototype.readOnlyChanged=function(ie){this.div.contentEditable=String(ie!="nocursor")},Ps.prototype.onContextMenu=function(){},Ps.prototype.resetPosition=function(){},Ps.prototype.needsContentAttribute=!0;function Tf(ie,ce){var Te=fl(ie,ce.line);if(!Te||Te.hidden)return null;var ke=cn(ie.doc,ce.line),Fe=_s(Te,ke,ce.line),nt=hn(ke,ie.doc.direction),gt="left";if(nt){var Ct=vt(nt,ce.ch);gt=Ct%2?"right":"left"}var bt=eh(Fe.map,ce.ch,gt);return bt.offset=bt.collapse=="right"?bt.end:bt.start,bt}function Xp(ie){for(var ce=ie;ce;ce=ce.parentNode)if(/CodeMirror-gutter-wrapper/.test(ce.className))return!0;return!1}function ud(ie,ce){return ce&&(ie.bad=!0),ie}function hd(ie,ce,Te,ke,Fe){var nt="",gt=!1,Ct=ie.doc.lineSeparator(),bt=!1;function Bt(Cn){return function(fi){return fi.id==Cn}}function fn(){gt&&(nt+=Ct,bt&&(nt+=Ct),gt=bt=!1)}function Zt(Cn){Cn&&(fn(),nt+=Cn)}function Tn(Cn){if(Cn.nodeType==1){var fi=Cn.getAttribute("cm-text");if(fi){Zt(fi);return}var xi=Cn.getAttribute("cm-marker"),Ai;if(xi){var Xi=ie.findMarks(Kt(ke,0),Kt(Fe+1,0),Bt(+xi));Xi.length&&(Ai=Xi[0].find(0))&&Zt(On(ie.doc,Ai.from,Ai.to).join(Ct));return}if(Cn.getAttribute("contenteditable")=="false")return;var Pr=/^(pre|div|p|li|table|br)$/i.test(Cn.nodeName);if(!/^br$/i.test(Cn.nodeName)&&Cn.textContent.length==0)return;Pr&&fn();for(var lr=0;lr<Cn.childNodes.length;lr++)Tn(Cn.childNodes[lr]);/^(pre|p)$/i.test(Cn.nodeName)&&(bt=!0),Pr&&(gt=!0)}else Cn.nodeType==3&&Zt(Cn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Tn(ce),ce!=Te;)ce=ce.nextSibling,bt=!1;return nt}function Gd(ie,ce,Te){var ke;if(ce==ie.display.lineDiv){if(ke=ie.display.lineDiv.childNodes[Te],!ke)return ud(ie.clipPos(Kt(ie.display.viewTo-1)),!0);ce=null,Te=0}else for(ke=ce;;ke=ke.parentNode){if(!ke||ke==ie.display.lineDiv)return null;if(ke.parentNode&&ke.parentNode==ie.display.lineDiv)break}for(var Fe=0;Fe<ie.display.view.length;Fe++){var nt=ie.display.view[Fe];if(nt.node==ke)return hm(nt,ce,Te)}}function hm(ie,ce,Te){var ke=ie.text.firstChild,Fe=!1;if(!ce||!mt(ke,ce))return ud(Kt(Lt(ie.line),0),!0);if(ce==ke&&(Fe=!0,ce=ke.childNodes[Te],Te=0,!ce)){var nt=ie.rest?Qt(ie.rest):ie.line;return ud(Kt(Lt(nt),nt.text.length),Fe)}var gt=ce.nodeType==3?ce:null,Ct=ce;for(!gt&&ce.childNodes.length==1&&ce.firstChild.nodeType==3&&(gt=ce.firstChild,Te&&(Te=gt.nodeValue.length));Ct.parentNode!=ke;)Ct=Ct.parentNode;var bt=ie.measure,Bt=bt.maps;function fn(Ai,Xi,Pr){for(var lr=-1;lr<(Bt?Bt.length:0);lr++)for(var Ir=lr<0?bt.map:Bt[lr],lo=0;lo<Ir.length;lo+=3){var ar=Ir[lo+2];if(ar==Ai||ar==Xi){var Bo=Lt(lr<0?ie.line:ie.rest[lr]),Fs=Ir[lo]+Pr;return(Pr<0||ar!=Ai)&&(Fs=Ir[lo+(Pr?1:0)]),Kt(Bo,Fs)}}}var Zt=fn(gt,Ct,Te);if(Zt)return ud(Zt,Fe);for(var Tn=Ct.nextSibling,Cn=gt?gt.nodeValue.length-Te:0;Tn;Tn=Tn.nextSibling){if(Zt=fn(Tn,Tn.firstChild,0),Zt)return ud(Kt(Zt.line,Zt.ch-Cn),Fe);Cn+=Tn.textContent.length}for(var fi=Ct.previousSibling,xi=Te;fi;fi=fi.previousSibling){if(Zt=fn(fi,fi.firstChild,-1),Zt)return ud(Kt(Zt.line,Zt.ch+xi),Fe);xi+=fi.textContent.length}}var xa=function(ie){this.cm=ie,this.prevInput="",this.pollingFast=!1,this.polling=new rt,this.hasSelection=!1,this.composing=null};xa.prototype.init=function(ie){var ce=this,Te=this,ke=this.cm;this.createField(ie);var Fe=this.textarea;ie.wrapper.insertBefore(this.wrapper,ie.wrapper.firstChild),ue&&(Fe.style.width="0px"),Gt(Fe,"input",function(){Ce&&xe>=9&&ce.hasSelection&&(ce.hasSelection=null),Te.poll()}),Gt(Fe,"paste",function(gt){un(ke,gt)||Wp(gt,ke)||(ke.state.pasteIncoming=+new Date,Te.fastPoll())});function nt(gt){if(!un(ke,gt)){if(ke.somethingSelected())Tc({lineWise:!1,text:ke.getSelections()});else if(ke.options.lineWiseCopyCut){var Ct=Vp(ke);Tc({lineWise:!0,text:Ct.text}),gt.type=="cut"?ke.setSelections(Ct.ranges,null,xt):(Te.prevInput="",Fe.value=Ct.text.join(`
|
|
|
`),_t(Fe))}else return;gt.type=="cut"&&(ke.state.cutIncoming=+new Date)}}Gt(Fe,"cut",nt),Gt(Fe,"copy",nt),Gt(ie.scroller,"paste",function(gt){if(!(hs(ie,gt)||un(ke,gt))){if(!Fe.dispatchEvent){ke.state.pasteIncoming=+new Date,Te.focus();return}var Ct=new Event("paste");Ct.clipboardData=gt.clipboardData,Fe.dispatchEvent(Ct)}}),Gt(ie.lineSpace,"selectstart",function(gt){hs(ie,gt)||ri(gt)}),Gt(Fe,"compositionstart",function(){var gt=ke.getCursor("from");Te.composing&&Te.composing.range.clear(),Te.composing={start:gt,range:ke.markText(gt,ke.getCursor("to"),{className:"CodeMirror-composing"})}}),Gt(Fe,"compositionend",function(){Te.composing&&(Te.poll(),Te.composing.range.clear(),Te.composing=null)})},xa.prototype.createField=function(ie){this.wrapper=Yp(),this.textarea=this.wrapper.firstChild},xa.prototype.screenReaderLabelChanged=function(ie){ie?this.textarea.setAttribute("aria-label",ie):this.textarea.removeAttribute("aria-label")},xa.prototype.prepareSelection=function(){var ie=this.cm,ce=ie.display,Te=ie.doc,ke=Eu(ie);if(ie.options.moveInputWithCursor){var Fe=Yo(ie,Te.sel.primary().head,"div"),nt=ce.wrapper.getBoundingClientRect(),gt=ce.lineDiv.getBoundingClientRect();ke.teTop=Math.max(0,Math.min(ce.wrapper.clientHeight-10,Fe.top+gt.top-nt.top)),ke.teLeft=Math.max(0,Math.min(ce.wrapper.clientWidth-10,Fe.left+gt.left-nt.left))}return ke},xa.prototype.showSelection=function(ie){var ce=this.cm,Te=ce.display;Oe(Te.cursorDiv,ie.cursors),Oe(Te.selectionDiv,ie.selection),ie.teTop!=null&&(this.wrapper.style.top=ie.teTop+"px",this.wrapper.style.left=ie.teLeft+"px")},xa.prototype.reset=function(ie){if(!(this.contextMenuPending||this.composing)){var ce=this.cm;if(ce.somethingSelected()){this.prevInput="";var Te=ce.getSelection();this.textarea.value=Te,ce.state.focused&&_t(this.textarea),Ce&&xe>=9&&(this.hasSelection=Te)}else ie||(this.prevInput=this.textarea.value="",Ce&&xe>=9&&(this.hasSelection=null))}},xa.prototype.getField=function(){return this.textarea},xa.prototype.supportsTouch=function(){return!1},xa.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!z||pt()!=this.textarea))try{this.textarea.focus()}catch(ie){}},xa.prototype.blur=function(){this.textarea.blur()},xa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},xa.prototype.receivedFocus=function(){this.slowPoll()},xa.prototype.slowPoll=function(){var ie=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){ie.poll(),ie.cm.state.focused&&ie.slowPoll()})},xa.prototype.fastPoll=function(){var ie=!1,ce=this;ce.pollingFast=!0;function Te(){var ke=ce.poll();!ke&&!ie?(ie=!0,ce.polling.set(60,Te)):(ce.pollingFast=!1,ce.slowPoll())}ce.polling.set(20,Te)},xa.prototype.poll=function(){var ie=this,ce=this.cm,Te=this.textarea,ke=this.prevInput;if(this.contextMenuPending||!ce.state.focused||$e(Te)&&!ke&&!this.composing||ce.isReadOnly()||ce.options.disableInput||ce.state.keySeq)return!1;var Fe=Te.value;if(Fe==ke&&!ce.somethingSelected())return!1;if(Ce&&xe>=9&&this.hasSelection===Fe||oe&&/[\uf700-\uf7ff]/.test(Fe))return ce.display.input.reset(),!1;if(ce.doc.sel==ce.display.selForContextMenu){var nt=Fe.charCodeAt(0);if(nt==8203&&!ke&&(ke="\u200B"),nt==8666)return this.reset(),this.cm.execCommand("undo")}for(var gt=0,Ct=Math.min(ke.length,Fe.length);gt<Ct&&ke.charCodeAt(gt)==Fe.charCodeAt(gt);)++gt;return qt(ce,function(){Ud(ce,Fe.slice(gt),ke.length-gt,null,ie.composing?"*compose":null),Fe.length>1e3||Fe.indexOf(`
|
|
|
`)>-1?Te.value=ie.prevInput="":ie.prevInput=Fe,ie.composing&&(ie.composing.range.clear(),ie.composing.range=ce.markText(ie.composing.start,ce.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},xa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},xa.prototype.onKeyPress=function(){Ce&&xe>=9&&(this.hasSelection=null),this.fastPoll()},xa.prototype.onContextMenu=function(ie){var ce=this,Te=ce.cm,ke=Te.display,Fe=ce.textarea;ce.contextMenuPending&&ce.contextMenuPending();var nt=va(Te,ie),gt=ke.scroller.scrollTop;if(!nt||pe)return;var Ct=Te.options.resetSelectionOnContextMenu;Ct&&Te.doc.sel.contains(nt)==-1&&Bi(Te,sl)(Te.doc,Uo(nt),xt);var bt=Fe.style.cssText,Bt=ce.wrapper.style.cssText,fn=ce.wrapper.offsetParent.getBoundingClientRect();ce.wrapper.style.cssText="position: static",Fe.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(ie.clientY-fn.top-5)+"px; left: "+(ie.clientX-fn.left-5)+`px;
|
|
|
z-index: 1000; background: `+(Ce?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Zt;be&&(Zt=window.scrollY),ke.input.focus(),be&&window.scrollTo(null,Zt),ke.input.reset(),Te.somethingSelected()||(Fe.value=ce.prevInput=" "),ce.contextMenuPending=Cn,ke.selForContextMenu=Te.doc.sel,clearTimeout(ke.detectingSelectAll);function Tn(){if(Fe.selectionStart!=null){var xi=Te.somethingSelected(),Ai="\u200B"+(xi?Fe.value:"");Fe.value="\u21DA",Fe.value=Ai,ce.prevInput=xi?"":"\u200B",Fe.selectionStart=1,Fe.selectionEnd=Ai.length,ke.selForContextMenu=Te.doc.sel}}function Cn(){if(ce.contextMenuPending==Cn&&(ce.contextMenuPending=!1,ce.wrapper.style.cssText=Bt,Fe.style.cssText=bt,Ce&&xe<9&&ke.scrollbars.setScrollTop(ke.scroller.scrollTop=gt),Fe.selectionStart!=null)){(!Ce||Ce&&xe<9)&&Tn();var xi=0,Ai=function(){ke.selForContextMenu==Te.doc.sel&&Fe.selectionStart==0&&Fe.selectionEnd>0&&ce.prevInput=="\u200B"?Bi(Te,ca)(Te):xi++<10?ke.detectingSelectAll=setTimeout(Ai,500):(ke.selForContextMenu=null,ke.input.reset())};ke.detectingSelectAll=setTimeout(Ai,200)}}if(Ce&&xe>=9&&Tn(),ve){ki(ie);var fi=function(){bn(window,"mouseup",fi),setTimeout(Cn,20)};Gt(window,"mouseup",fi)}else setTimeout(Cn,50)},xa.prototype.readOnlyChanged=function(ie){ie||this.reset(),this.textarea.disabled=ie=="nocursor",this.textarea.readOnly=!!ie},xa.prototype.setUneditable=function(){},xa.prototype.needsContentAttribute=!1;function cm(ie,ce){if(ce=ce?Rt(ce):{},ce.value=ie.value,!ce.tabindex&&ie.tabIndex&&(ce.tabindex=ie.tabIndex),!ce.placeholder&&ie.placeholder&&(ce.placeholder=ie.placeholder),ce.autofocus==null){var Te=pt();ce.autofocus=Te==ie||ie.getAttribute("autofocus")!=null&&Te==document.body}function ke(){ie.value=Ct.getValue()}var Fe;if(ie.form&&(Gt(ie.form,"submit",ke),!ce.leaveSubmitMethodAlone)){var nt=ie.form;Fe=nt.submit;try{var gt=nt.submit=function(){ke(),nt.submit=Fe,nt.submit(),nt.submit=gt}}catch(bt){}}ce.finishInit=function(bt){bt.save=ke,bt.getTextArea=function(){return ie},bt.toTextArea=function(){bt.toTextArea=isNaN,ke(),ie.parentNode.removeChild(bt.getWrapperElement()),ie.style.display="",ie.form&&(bn(ie.form,"submit",ke),!ce.leaveSubmitMethodAlone&&typeof ie.form.submit=="function"&&(ie.form.submit=Fe))}},ie.style.display="none";var Ct=ts(function(bt){return ie.parentNode.insertBefore(bt,ie.nextSibling)},ce);return Ct}function cd(ie){ie.off=bn,ie.on=Gt,ie.wheelEventPixels=hr,ie.Doc=Xa,ie.splitLines=cr,ie.countColumn=ut,ie.findColumn=dn,ie.isWordChar=tt,ie.Pass=wt,ie.signal=yn,ie.Line=Zr,ie.changeEnd=Gr,ie.scrollbarModel=Wu,ie.Pos=Kt,ie.cmpPos=vn,ie.modes=pr,ie.mimeModes=dr,ie.resolveMode=$t,ie.getMode=Ge,ie.modeExtensions=Je,ie.extendMode=ot,ie.copyState=Et,ie.startState=pn,ie.innerMode=Nt,ie.commands=Vh,ie.keyMap=Rl,ie.keyName=im,ie.isModifierKey=id,ie.lookupKey=pu,ie.normalizeKeyMap=Tp,ie.StringStream=jt,ie.SharedTextMarker=ah,ie.TextMarker=rn,ie.LineWidget=kh,ie.e_preventDefault=ri,ie.e_stopPropagation=bi,ie.e_stop=ki,ie.addClass=Mt,ie.contains=mt,ie.rmClass=Ae,ie.keyNames=lh}lm(ts),Yh(ts);var Th="iter insert remove copy getEditor constructor".split(" ");for(var Wd in Xa.prototype)Xa.prototype.hasOwnProperty(Wd)&&ct(Th,Wd)<0&&(ts.prototype[Wd]=function(ie){return function(){return ie.apply(this.doc,arguments)}}(Xa.prototype[Wd]));return Yn(Xa),ts.inputStyles={textarea:xa,contenteditable:Ps},ts.defineMode=function(ie){!ts.defaults.mode&&ie!="null"&&(ts.defaults.mode=ie),Qi.apply(this,arguments)},ts.defineMIME=So,ts.defineMode("null",function(){return{token:function(ie){return ie.skipToEnd()}}}),ts.defineMIME("text/plain","null"),ts.defineExtension=function(ie,ce){ts.prototype[ie]=ce},ts.defineDocExtension=function(ie,ce){Xa.prototype[ie]=ce},ts.fromTextArea=cm,cd(ts),ts.version="5.58.2",ts})},25419:function(xn,ln,Ie){(function(Le){Le(Ie(89780),Ie(15525),Ie(98101))})(function(Le){"use strict";Le.defineMode("markdown",function(Se,je){var Me=Le.getMode(Se,"text/html"),Ce=Me.name=="null";function xe(ut){if(Le.findModeByName){var rt=Le.findModeByName(ut);rt&&(ut=rt.mime||rt.mimes[0])}var ct=Le.getMode(Se,ut);return ct.name=="null"?null:ct}je.highlightFormatting===void 0&&(je.highlightFormatting=!1),je.maxBlockquoteDepth===void 0&&(je.maxBlockquoteDepth=0),je.taskLists===void 0&&(je.taskLists=!1),je.strikethrough===void 0&&(je.strikethrough=!1),je.emoji===void 0&&(je.emoji=!1),je.fencedCodeBlockHighlighting===void 0&&(je.fencedCodeBlockHighlighting=!0),je.fencedCodeBlockDefaultMode===void 0&&(je.fencedCodeBlockDefaultMode="text/plain"),je.xml===void 0&&(je.xml=!0),je.tokenTypeOverrides===void 0&&(je.tokenTypeOverrides={});var be={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 ye in be)be.hasOwnProperty(ye)&&je.tokenTypeOverrides[ye]&&(be[ye]=je.tokenTypeOverrides[ye]);var we=/^([*\-_])(?:\s*\1){2,}\s*$/,pe=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,de=/^\[(x| )\](?=\s)/i,ge=je.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,fe=/^ {0,3}(?:\={1,}|-{2,})\s*$/,ue=/^[^#!\[\]*_\\<>` "'(~:]+/,ee=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,z=/^\s*\[[^\]]+?\]:.*$/,oe=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,re=" ";function ae(ut,rt,ct){return rt.f=rt.inline=ct,ct(ut,rt)}function le(ut,rt,ct){return rt.f=rt.block=ct,ct(ut,rt)}function me(ut){return!ut||!/\S/.test(ut.string)}function ve(ut){if(ut.linkTitle=!1,ut.linkHref=!1,ut.linkText=!1,ut.em=!1,ut.strong=!1,ut.strikethrough=!1,ut.quote=0,ut.indentedCode=!1,ut.f==Ae){var rt=Ce;if(!rt){var ct=Le.innerMode(Me,ut.htmlState);rt=ct.mode.name=="xml"&&ct.state.tagStart===null&&!ct.state.context&&ct.state.tokenize.isInText}rt&&(ut.f=qe,ut.block=Pe,ut.htmlState=null)}return ut.trailingSpace=0,ut.trailingSpaceNewLine=!1,ut.prevLine=ut.thisLine,ut.thisLine={stream:null},null}function Pe(ut,rt){var ct=ut.column()===rt.indentation,yt=me(rt.prevLine.stream),wt=rt.indentedCode,xt=rt.prevLine.hr,Ut=rt.list!==!1,zt=(rt.listStack[rt.listStack.length-1]||0)+3;rt.indentedCode=!1;var dn=rt.indentation;if(rt.indentationDiff===null&&(rt.indentationDiff=rt.indentation,Ut)){for(rt.list=null;dn<rt.listStack[rt.listStack.length-1];)rt.listStack.pop(),rt.listStack.length?rt.indentation=rt.listStack[rt.listStack.length-1]:rt.list=!1;rt.list!==!1&&(rt.indentationDiff=dn-rt.listStack[rt.listStack.length-1])}var Ft=!yt&&!xt&&!rt.prevLine.header&&(!Ut||!wt)&&!rt.prevLine.fencedCodeEnd,Dt=(rt.list===!1||xt||yt)&&rt.indentation<=zt&&ut.match(we),Qt=null;if(rt.indentationDiff>=4&&(wt||rt.prevLine.fencedCodeEnd||rt.prevLine.header||yt))return ut.skipToEnd(),rt.indentedCode=!0,be.code;if(ut.eatSpace())return null;if(ct&&rt.indentation<=zt&&(Qt=ut.match(ge))&&Qt[1].length<=6)return rt.quote=0,rt.header=Qt[1].length,rt.thisLine.header=!0,je.highlightFormatting&&(rt.formatting="header"),rt.f=rt.inline,Oe(rt);if(rt.indentation<=zt&&ut.eat(">"))return rt.quote=ct?1:rt.quote+1,je.highlightFormatting&&(rt.formatting="quote"),ut.eatSpace(),Oe(rt);if(!Dt&&!rt.setext&&ct&&rt.indentation<=zt&&(Qt=ut.match(pe))){var Yt=Qt[1]?"ol":"ul";return rt.indentation=dn+ut.current().length,rt.list=!0,rt.quote=0,rt.listStack.push(rt.indentation),rt.em=!1,rt.strong=!1,rt.code=!1,rt.strikethrough=!1,je.taskLists&&ut.match(de,!1)&&(rt.taskList=!0),rt.f=rt.inline,je.highlightFormatting&&(rt.formatting=["list","list-"+Yt]),Oe(rt)}else{if(ct&&rt.indentation<=zt&&(Qt=ut.match(ee,!0)))return rt.quote=0,rt.fencedEndRE=new RegExp(Qt[1]+"+ *$"),rt.localMode=je.fencedCodeBlockHighlighting&&xe(Qt[2]||je.fencedCodeBlockDefaultMode),rt.localMode&&(rt.localState=Le.startState(rt.localMode)),rt.f=rt.block=De,je.highlightFormatting&&(rt.formatting="code-block"),rt.code=-1,Oe(rt);if(rt.setext||(!Ft||!Ut)&&!rt.quote&&rt.list===!1&&!rt.code&&!Dt&&!z.test(ut.string)&&(Qt=ut.lookAhead(1))&&(Qt=Qt.match(fe)))return rt.setext?(rt.header=rt.setext,rt.setext=0,ut.skipToEnd(),je.highlightFormatting&&(rt.formatting="header")):(rt.header=Qt[0].charAt(0)=="="?1:2,rt.setext=rt.header),rt.thisLine.header=!0,rt.f=rt.inline,Oe(rt);if(Dt)return ut.skipToEnd(),rt.hr=!0,rt.thisLine.hr=!0,be.hr;if(ut.peek()==="[")return ae(ut,rt,at)}return ae(ut,rt,rt.inline)}function Ae(ut,rt){var ct=Me.token(ut,rt.htmlState);if(!Ce){var yt=Le.innerMode(Me,rt.htmlState);(yt.mode.name=="xml"&&yt.state.tagStart===null&&!yt.state.context&&yt.state.tokenize.isInText||rt.md_inside&&ut.current().indexOf(">")>-1)&&(rt.f=qe,rt.block=Pe,rt.htmlState=null)}return ct}function De(ut,rt){var ct=rt.listStack[rt.listStack.length-1]||0,yt=rt.indentation<ct,wt=ct+3;if(rt.fencedEndRE&&rt.indentation<=wt&&(yt||ut.match(rt.fencedEndRE))){je.highlightFormatting&&(rt.formatting="code-block");var xt;return yt||(xt=Oe(rt)),rt.localMode=rt.localState=null,rt.block=Pe,rt.f=qe,rt.fencedEndRE=null,rt.code=0,rt.thisLine.fencedCodeEnd=!0,yt?le(ut,rt,rt.block):xt}else return rt.localMode?rt.localMode.token(ut,rt.localState):(ut.skipToEnd(),be.code)}function Oe(ut){var rt=[];if(ut.formatting){rt.push(be.formatting),typeof ut.formatting=="string"&&(ut.formatting=[ut.formatting]);for(var ct=0;ct<ut.formatting.length;ct++)rt.push(be.formatting+"-"+ut.formatting[ct]),ut.formatting[ct]==="header"&&rt.push(be.formatting+"-"+ut.formatting[ct]+"-"+ut.header),ut.formatting[ct]==="quote"&&(!je.maxBlockquoteDepth||je.maxBlockquoteDepth>=ut.quote?rt.push(be.formatting+"-"+ut.formatting[ct]+"-"+ut.quote):rt.push("error"))}if(ut.taskOpen)return rt.push("meta"),rt.length?rt.join(" "):null;if(ut.taskClosed)return rt.push("property"),rt.length?rt.join(" "):null;if(ut.linkHref?rt.push(be.linkHref,"url"):(ut.strong&&rt.push(be.strong),ut.em&&rt.push(be.em),ut.strikethrough&&rt.push(be.strikethrough),ut.emoji&&rt.push(be.emoji),ut.linkText&&rt.push(be.linkText),ut.code&&rt.push(be.code),ut.image&&rt.push(be.image),ut.imageAltText&&rt.push(be.imageAltText,"link"),ut.imageMarker&&rt.push(be.imageMarker)),ut.header&&rt.push(be.header,be.header+"-"+ut.header),ut.quote&&(rt.push(be.quote),!je.maxBlockquoteDepth||je.maxBlockquoteDepth>=ut.quote?rt.push(be.quote+"-"+ut.quote):rt.push(be.quote+"-"+je.maxBlockquoteDepth)),ut.list!==!1){var yt=(ut.listStack.length-1)%3;yt?yt===1?rt.push(be.list2):rt.push(be.list3):rt.push(be.list1)}return ut.trailingSpaceNewLine?rt.push("trailing-space-new-line"):ut.trailingSpace&&rt.push("trailing-space-"+(ut.trailingSpace%2?"a":"b")),rt.length?rt.join(" "):null}function Ze(ut,rt){if(ut.match(ue,!0))return Oe(rt)}function qe(ut,rt){var ct=rt.text(ut,rt);if(typeof ct!="undefined")return ct;if(rt.list)return rt.list=null,Oe(rt);if(rt.taskList){var yt=ut.match(de,!0)[1]===" ";return yt?rt.taskOpen=!0:rt.taskClosed=!0,je.highlightFormatting&&(rt.formatting="task"),rt.taskList=!1,Oe(rt)}if(rt.taskOpen=!1,rt.taskClosed=!1,rt.header&&ut.match(/^#+$/,!0))return je.highlightFormatting&&(rt.formatting="header"),Oe(rt);var wt=ut.next();if(rt.linkTitle){rt.linkTitle=!1;var xt=wt;wt==="("&&(xt=")"),xt=(xt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ut="^\\s*(?:[^"+xt+"\\\\]+|\\\\\\\\|\\\\.)"+xt;if(ut.match(new RegExp(Ut),!0))return be.linkHref}if(wt==="`"){var zt=rt.formatting;je.highlightFormatting&&(rt.formatting="code"),ut.eatWhile("`");var dn=ut.current().length;if(rt.code==0&&(!rt.quote||dn==1))return rt.code=dn,Oe(rt);if(dn==rt.code){var Ft=Oe(rt);return rt.code=0,Ft}else return rt.formatting=zt,Oe(rt)}else if(rt.code)return Oe(rt);if(wt==="\\"&&(ut.next(),je.highlightFormatting)){var Dt=Oe(rt),Qt=be.formatting+"-escape";return Dt?Dt+" "+Qt:Qt}if(wt==="!"&&ut.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return rt.imageMarker=!0,rt.image=!0,je.highlightFormatting&&(rt.formatting="image"),Oe(rt);if(wt==="["&&rt.imageMarker&&ut.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return rt.imageMarker=!1,rt.imageAltText=!0,je.highlightFormatting&&(rt.formatting="image"),Oe(rt);if(wt==="]"&&rt.imageAltText){je.highlightFormatting&&(rt.formatting="image");var Dt=Oe(rt);return rt.imageAltText=!1,rt.image=!1,rt.inline=rt.f=mt,Dt}if(wt==="["&&!rt.image)return rt.linkText&&ut.match(/^.*?\]/)||(rt.linkText=!0,je.highlightFormatting&&(rt.formatting="link")),Oe(rt);if(wt==="]"&&rt.linkText){je.highlightFormatting&&(rt.formatting="link");var Dt=Oe(rt);return rt.linkText=!1,rt.inline=rt.f=ut.match(/\(.*?\)| ?\[.*?\]/,!1)?mt:qe,Dt}if(wt==="<"&&ut.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){rt.f=rt.inline=Xe,je.highlightFormatting&&(rt.formatting="link");var Dt=Oe(rt);return Dt?Dt+=" ":Dt="",Dt+be.linkInline}if(wt==="<"&&ut.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){rt.f=rt.inline=Xe,je.highlightFormatting&&(rt.formatting="link");var Dt=Oe(rt);return Dt?Dt+=" ":Dt="",Dt+be.linkEmail}if(je.xml&&wt==="<"&&ut.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Yt=ut.string.indexOf(">",ut.pos);if(Yt!=-1){var Jt=ut.string.substring(ut.start,Yt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Jt)&&(rt.md_inside=!0)}return ut.backUp(1),rt.htmlState=Le.startState(Me),le(ut,rt,Ae)}if(je.xml&&wt==="<"&&ut.match(/^\/\w*?>/))return rt.md_inside=!1,"tag";if(wt==="*"||wt==="_"){for(var lt=1,Ue=ut.pos==1?" ":ut.string.charAt(ut.pos-2);lt<3&&ut.eat(wt);)lt++;var Be=ut.peek()||" ",tt=!/\s/.test(Be)&&(!oe.test(Be)||/\s/.test(Ue)||oe.test(Ue)),ht=!/\s/.test(Ue)&&(!oe.test(Ue)||/\s/.test(Be)||oe.test(Be)),et=null,Ve=null;if(lt%2&&(!rt.em&&tt&&(wt==="*"||!ht||oe.test(Ue))?et=!0:rt.em==wt&&ht&&(wt==="*"||!tt||oe.test(Be))&&(et=!1)),lt>1&&(!rt.strong&&tt&&(wt==="*"||!ht||oe.test(Ue))?Ve=!0:rt.strong==wt&&ht&&(wt==="*"||!tt||oe.test(Be))&&(Ve=!1)),Ve!=null||et!=null){je.highlightFormatting&&(rt.formatting=et==null?"strong":Ve==null?"em":"strong em"),et===!0&&(rt.em=wt),Ve===!0&&(rt.strong=wt);var Ft=Oe(rt);return et===!1&&(rt.em=!1),Ve===!1&&(rt.strong=!1),Ft}}else if(wt===" "&&(ut.eat("*")||ut.eat("_"))){if(ut.peek()===" ")return Oe(rt);ut.backUp(1)}if(je.strikethrough){if(wt==="~"&&ut.eatWhile(wt)){if(rt.strikethrough){je.highlightFormatting&&(rt.formatting="strikethrough");var Ft=Oe(rt);return rt.strikethrough=!1,Ft}else if(ut.match(/^[^\s]/,!1))return rt.strikethrough=!0,je.highlightFormatting&&(rt.formatting="strikethrough"),Oe(rt)}else if(wt===" "&&ut.match(/^~~/,!0)){if(ut.peek()===" ")return Oe(rt);ut.backUp(2)}}if(je.emoji&&wt===":"&&ut.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){rt.emoji=!0,je.highlightFormatting&&(rt.formatting="emoji");var Re=Oe(rt);return rt.emoji=!1,Re}return wt===" "&&(ut.match(/^ +$/,!1)?rt.trailingSpace++:rt.trailingSpace&&(rt.trailingSpaceNewLine=!0)),Oe(rt)}function Xe(ut,rt){var ct=ut.next();if(ct===">"){rt.f=rt.inline=qe,je.highlightFormatting&&(rt.formatting="link");var yt=Oe(rt);return yt?yt+=" ":yt="",yt+be.linkInline}return ut.match(/^[^>]+/,!0),be.linkInline}function mt(ut,rt){if(ut.eatSpace())return null;var ct=ut.next();return ct==="("||ct==="["?(rt.f=rt.inline=Mt(ct==="("?")":"]"),je.highlightFormatting&&(rt.formatting="link-string"),rt.linkHref=!0,Oe(rt)):"error"}var pt={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Mt(ut){return function(rt,ct){var yt=rt.next();if(yt===ut){ct.f=ct.inline=qe,je.highlightFormatting&&(ct.formatting="link-string");var wt=Oe(ct);return ct.linkHref=!1,wt}return rt.match(pt[ut]),ct.linkHref=!0,Oe(ct)}}function at(ut,rt){return ut.match(/^([^\]\\]|\\.)*\]:/,!1)?(rt.f=_t,ut.next(),je.highlightFormatting&&(rt.formatting="link"),rt.linkText=!0,Oe(rt)):ae(ut,rt,qe)}function _t(ut,rt){if(ut.match(/^\]:/,!0)){rt.f=rt.inline=dt,je.highlightFormatting&&(rt.formatting="link");var ct=Oe(rt);return rt.linkText=!1,ct}return ut.match(/^([^\]\\]|\\.)+/,!0),be.linkText}function dt(ut,rt){return ut.eatSpace()?null:(ut.match(/^[^\s]+/,!0),ut.peek()===void 0?rt.linkTitle=!0:ut.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),rt.f=rt.inline=qe,be.linkHref+" url")}var Rt={startState:function(){return{f:Pe,prevLine:{stream:null},thisLine:{stream:null},block:Pe,htmlState:null,indentation:0,inline:qe,text:Ze,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(ut){return{f:ut.f,prevLine:ut.prevLine,thisLine:ut.thisLine,block:ut.block,htmlState:ut.htmlState&&Le.copyState(Me,ut.htmlState),indentation:ut.indentation,localMode:ut.localMode,localState:ut.localMode?Le.copyState(ut.localMode,ut.localState):null,inline:ut.inline,text:ut.text,formatting:!1,linkText:ut.linkText,linkTitle:ut.linkTitle,linkHref:ut.linkHref,code:ut.code,em:ut.em,strong:ut.strong,strikethrough:ut.strikethrough,emoji:ut.emoji,header:ut.header,setext:ut.setext,hr:ut.hr,taskList:ut.taskList,list:ut.list,listStack:ut.listStack.slice(0),quote:ut.quote,indentedCode:ut.indentedCode,trailingSpace:ut.trailingSpace,trailingSpaceNewLine:ut.trailingSpaceNewLine,md_inside:ut.md_inside,fencedEndRE:ut.fencedEndRE}},token:function(ut,rt){if(rt.formatting=!1,ut!=rt.thisLine.stream){if(rt.header=0,rt.hr=!1,ut.match(/^\s*$/,!0))return ve(rt),null;if(rt.prevLine=rt.thisLine,rt.thisLine={stream:ut},rt.taskList=!1,rt.trailingSpace=0,rt.trailingSpaceNewLine=!1,!rt.localState&&(rt.f=rt.block,rt.f!=Ae)){var ct=ut.match(/^\s*/,!0)[0].replace(/\t/g,re).length;if(rt.indentation=ct,rt.indentationDiff=null,ct>0)return null}}return rt.f(ut,rt)},innerMode:function(ut){return ut.block==Ae?{state:ut.htmlState,mode:Me}:ut.localState?{state:ut.localState,mode:ut.localMode}:{state:ut,mode:Rt}},indent:function(ut,rt,ct){return ut.block==Ae&&Me.indent?Me.indent(ut.htmlState,rt,ct):ut.localState&&ut.localMode.indent?ut.localMode.indent(ut.localState,rt,ct):Le.Pass},blankLine:ve,getType:Oe,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Rt},"xml"),Le.defineMIME("text/markdown","markdown"),Le.defineMIME("text/x-markdown","markdown")})},98101:function(xn,ln,Ie){(function(Le){Le(Ie(89780))})(function(Le){"use strict";Le.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 Se=0;Se<Le.modeInfo.length;Se++){var je=Le.modeInfo[Se];je.mimes&&(je.mime=je.mimes[0])}Le.findModeByMIME=function(Me){Me=Me.toLowerCase();for(var Ce=0;Ce<Le.modeInfo.length;Ce++){var xe=Le.modeInfo[Ce];if(xe.mime==Me)return xe;if(xe.mimes){for(var be=0;be<xe.mimes.length;be++)if(xe.mimes[be]==Me)return xe}}if(/\+xml$/.test(Me))return Le.findModeByMIME("application/xml");if(/\+json$/.test(Me))return Le.findModeByMIME("application/json")},Le.findModeByExtension=function(Me){Me=Me.toLowerCase();for(var Ce=0;Ce<Le.modeInfo.length;Ce++){var xe=Le.modeInfo[Ce];if(xe.ext){for(var be=0;be<xe.ext.length;be++)if(xe.ext[be]==Me)return xe}}},Le.findModeByFileName=function(Me){for(var Ce=0;Ce<Le.modeInfo.length;Ce++){var xe=Le.modeInfo[Ce];if(xe.file&&xe.file.test(Me))return xe}var be=Me.lastIndexOf("."),ye=be>-1&&Me.substring(be+1,Me.length);if(ye)return Le.findModeByExtension(ye)},Le.findModeByName=function(Me){Me=Me.toLowerCase();for(var Ce=0;Ce<Le.modeInfo.length;Ce++){var xe=Le.modeInfo[Ce];if(xe.name.toLowerCase()==Me)return xe;if(xe.alias){for(var be=0;be<xe.alias.length;be++)if(xe.alias[be].toLowerCase()==Me)return xe}}}})},67549:function(xn,ln,Ie){(function(Le){Le(Ie(89780))})(function(Le){"use strict";Le.defineMode("stex",function(Se,je){"use strict";function Me(ue,ee){ue.cmdState.push(ee)}function Ce(ue){return ue.cmdState.length>0?ue.cmdState[ue.cmdState.length-1]:null}function xe(ue){var ee=ue.cmdState.pop();ee&&ee.closeBracket()}function be(ue){for(var ee=ue.cmdState,z=ee.length-1;z>=0;z--){var oe=ee[z];if(oe.name!="DEFAULT")return oe}return{styleIdentifier:function(){return null}}}function ye(ue,ee,z){return function(){this.name=ue,this.bracketNo=0,this.style=ee,this.styles=z,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var we={};we.importmodule=ye("importmodule","tag",["string","builtin"]),we.documentclass=ye("documentclass","tag",["","atom"]),we.usepackage=ye("usepackage","tag",["atom"]),we.begin=ye("begin","tag",["atom"]),we.end=ye("end","tag",["atom"]),we.label=ye("label","tag",["atom"]),we.ref=ye("ref","tag",["atom"]),we.eqref=ye("eqref","tag",["atom"]),we.cite=ye("cite","tag",["atom"]),we.bibitem=ye("bibitem","tag",["atom"]),we.Bibitem=ye("Bibitem","tag",["atom"]),we.RBibitem=ye("RBibitem","tag",["atom"]),we.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function pe(ue,ee){ue.f=ee}function de(ue,ee){var z;if(ue.match(/^\\[a-zA-Z@]+/)){var oe=ue.current().slice(1);return z=we.hasOwnProperty(oe)?we[oe]:we.DEFAULT,z=new z,Me(ee,z),pe(ee,fe),z.style}if(ue.match(/^\\[$&%#{}_]/)||ue.match(/^\\[,;!\/\\]/))return"tag";if(ue.match("\\["))return pe(ee,function(ae,le){return ge(ae,le,"\\]")}),"keyword";if(ue.match("\\("))return pe(ee,function(ae,le){return ge(ae,le,"\\)")}),"keyword";if(ue.match("$$"))return pe(ee,function(ae,le){return ge(ae,le,"$$")}),"keyword";if(ue.match("$"))return pe(ee,function(ae,le){return ge(ae,le,"$")}),"keyword";var re=ue.next();if(re=="%")return ue.skipToEnd(),"comment";if(re=="}"||re=="]"){if(z=Ce(ee),z)z.closeBracket(re),pe(ee,fe);else return"error";return"bracket"}else return re=="{"||re=="["?(z=we.DEFAULT,z=new z,Me(ee,z),"bracket"):/\d/.test(re)?(ue.eatWhile(/[\w.%]/),"atom"):(ue.eatWhile(/[\w\-_]/),z=be(ee),z.name=="begin"&&(z.argument=ue.current()),z.styleIdentifier())}function ge(ue,ee,z){if(ue.eatSpace())return null;if(z&&ue.match(z))return pe(ee,de),"keyword";if(ue.match(/^\\[a-zA-Z@]+/))return"tag";if(ue.match(/^[a-zA-Z]+/))return"variable-2";if(ue.match(/^\\[$&%#{}_]/)||ue.match(/^\\[,;!\/]/)||ue.match(/^[\^_&]/))return"tag";if(ue.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(ue.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var oe=ue.next();return oe=="{"||oe=="}"||oe=="["||oe=="]"||oe=="("||oe==")"?"bracket":oe=="%"?(ue.skipToEnd(),"comment"):"error"}function fe(ue,ee){var z=ue.peek(),oe;return z=="{"||z=="["?(oe=Ce(ee),oe.openBracket(z),ue.eat(z),pe(ee,de),"bracket"):/[ \t\r]/.test(z)?(ue.eat(z),null):(pe(ee,de),xe(ee),de(ue,ee))}return{startState:function(){var ue=je.inMathMode?function(ee,z){return ge(ee,z)}:de;return{cmdState:[],f:ue}},copyState:function(ue){return{cmdState:ue.cmdState.slice(),f:ue.f}},token:function(ue,ee){return ee.f(ue,ee)},blankLine:function(ue){ue.f=de,ue.cmdState.length=0},lineComment:"%"}}),Le.defineMIME("text/x-stex","stex"),Le.defineMIME("text/x-latex","stex")})},15525:function(xn,ln,Ie){(function(Le){Le(Ie(89780))})(function(Le){"use strict";var Se={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},je={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Le.defineMode("xml",function(Me,Ce){var xe=Me.indentUnit,be={},ye=Ce.htmlMode?Se:je;for(var we in ye)be[we]=ye[we];for(var we in Ce)be[we]=Ce[we];var pe,de;function ge(Xe,mt){function pt(_t){return mt.tokenize=_t,_t(Xe,mt)}var Mt=Xe.next();if(Mt=="<")return Xe.eat("!")?Xe.eat("[")?Xe.match("CDATA[")?pt(ee("atom","]]>")):null:Xe.match("--")?pt(ee("comment","-->")):Xe.match("DOCTYPE",!0,!0)?(Xe.eatWhile(/[\w\._\-]/),pt(z(1))):null:Xe.eat("?")?(Xe.eatWhile(/[\w\._\-]/),mt.tokenize=ee("meta","?>"),"meta"):(pe=Xe.eat("/")?"closeTag":"openTag",mt.tokenize=fe,"tag bracket");if(Mt=="&"){var at;return Xe.eat("#")?Xe.eat("x")?at=Xe.eatWhile(/[a-fA-F\d]/)&&Xe.eat(";"):at=Xe.eatWhile(/[\d]/)&&Xe.eat(";"):at=Xe.eatWhile(/[\w\.\-:]/)&&Xe.eat(";"),at?"atom":"error"}else return Xe.eatWhile(/[^&<]/),null}ge.isInText=!0;function fe(Xe,mt){var pt=Xe.next();if(pt==">"||pt=="/"&&Xe.eat(">"))return mt.tokenize=ge,pe=pt==">"?"endTag":"selfcloseTag","tag bracket";if(pt=="=")return pe="equals",null;if(pt=="<"){mt.tokenize=ge,mt.state=le,mt.tagName=mt.tagStart=null;var Mt=mt.tokenize(Xe,mt);return Mt?Mt+" tag error":"tag error"}else return/[\'\"]/.test(pt)?(mt.tokenize=ue(pt),mt.stringStartCol=Xe.column(),mt.tokenize(Xe,mt)):(Xe.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ue(Xe){var mt=function(pt,Mt){for(;!pt.eol();)if(pt.next()==Xe){Mt.tokenize=fe;break}return"string"};return mt.isInAttribute=!0,mt}function ee(Xe,mt){return function(pt,Mt){for(;!pt.eol();){if(pt.match(mt)){Mt.tokenize=ge;break}pt.next()}return Xe}}function z(Xe){return function(mt,pt){for(var Mt;(Mt=mt.next())!=null;){if(Mt=="<")return pt.tokenize=z(Xe+1),pt.tokenize(mt,pt);if(Mt==">")if(Xe==1){pt.tokenize=ge;break}else return pt.tokenize=z(Xe-1),pt.tokenize(mt,pt)}return"meta"}}function oe(Xe,mt,pt){this.prev=Xe.context,this.tagName=mt,this.indent=Xe.indented,this.startOfLine=pt,(be.doNotIndent.hasOwnProperty(mt)||Xe.context&&Xe.context.noIndent)&&(this.noIndent=!0)}function re(Xe){Xe.context&&(Xe.context=Xe.context.prev)}function ae(Xe,mt){for(var pt;;){if(!Xe.context||(pt=Xe.context.tagName,!be.contextGrabbers.hasOwnProperty(pt)||!be.contextGrabbers[pt].hasOwnProperty(mt)))return;re(Xe)}}function le(Xe,mt,pt){return Xe=="openTag"?(pt.tagStart=mt.column(),me):Xe=="closeTag"?ve:le}function me(Xe,mt,pt){return Xe=="word"?(pt.tagName=mt.current(),de="tag",De):be.allowMissingTagName&&Xe=="endTag"?(de="tag bracket",De(Xe,mt,pt)):(de="error",me)}function ve(Xe,mt,pt){if(Xe=="word"){var Mt=mt.current();return pt.context&&pt.context.tagName!=Mt&&be.implicitlyClosed.hasOwnProperty(pt.context.tagName)&&re(pt),pt.context&&pt.context.tagName==Mt||be.matchClosing===!1?(de="tag",Pe):(de="tag error",Ae)}else return be.allowMissingTagName&&Xe=="endTag"?(de="tag bracket",Pe(Xe,mt,pt)):(de="error",Ae)}function Pe(Xe,mt,pt){return Xe!="endTag"?(de="error",Pe):(re(pt),le)}function Ae(Xe,mt,pt){return de="error",Pe(Xe,mt,pt)}function De(Xe,mt,pt){if(Xe=="word")return de="attribute",Oe;if(Xe=="endTag"||Xe=="selfcloseTag"){var Mt=pt.tagName,at=pt.tagStart;return pt.tagName=pt.tagStart=null,Xe=="selfcloseTag"||be.autoSelfClosers.hasOwnProperty(Mt)?ae(pt,Mt):(ae(pt,Mt),pt.context=new oe(pt,Mt,at==pt.indented)),le}return de="error",De}function Oe(Xe,mt,pt){return Xe=="equals"?Ze:(be.allowMissing||(de="error"),De(Xe,mt,pt))}function Ze(Xe,mt,pt){return Xe=="string"?qe:Xe=="word"&&be.allowUnquoted?(de="string",De):(de="error",De(Xe,mt,pt))}function qe(Xe,mt,pt){return Xe=="string"?qe:De(Xe,mt,pt)}return{startState:function(Xe){var mt={tokenize:ge,state:le,indented:Xe||0,tagName:null,tagStart:null,context:null};return Xe!=null&&(mt.baseIndent=Xe),mt},token:function(Xe,mt){if(!mt.tagName&&Xe.sol()&&(mt.indented=Xe.indentation()),Xe.eatSpace())return null;pe=null;var pt=mt.tokenize(Xe,mt);return(pt||pe)&&pt!="comment"&&(de=null,mt.state=mt.state(pe||pt,Xe,mt),de&&(pt=de=="error"?pt+" error":de)),pt},indent:function(Xe,mt,pt){var Mt=Xe.context;if(Xe.tokenize.isInAttribute)return Xe.tagStart==Xe.indented?Xe.stringStartCol+1:Xe.indented+xe;if(Mt&&Mt.noIndent)return Le.Pass;if(Xe.tokenize!=fe&&Xe.tokenize!=ge)return pt?pt.match(/^(\s*)/)[0].length:0;if(Xe.tagName)return be.multilineTagIndentPastTag!==!1?Xe.tagStart+Xe.tagName.length+2:Xe.tagStart+xe*(be.multilineTagIndentFactor||1);if(be.alignCDATA&&/<!\[CDATA\[/.test(mt))return 0;var at=mt&&/^<(\/)?([\w_:\.-]*)/.exec(mt);if(at&&at[1])for(;Mt;)if(Mt.tagName==at[2]){Mt=Mt.prev;break}else if(be.implicitlyClosed.hasOwnProperty(Mt.tagName))Mt=Mt.prev;else break;else if(at)for(;Mt;){var _t=be.contextGrabbers[Mt.tagName];if(_t&&_t.hasOwnProperty(at[2]))Mt=Mt.prev;else break}for(;Mt&&Mt.prev&&!Mt.startOfLine;)Mt=Mt.prev;return Mt?Mt.indent+xe:Xe.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:be.htmlMode?"html":"xml",helperType:be.htmlMode?"html":"xml",skipAttribute:function(Xe){Xe.state==Ze&&(Xe.state=De)},xmlCurrentTag:function(Xe){return Xe.tagName?{name:Xe.tagName,close:Xe.type=="closeTag"}:null},xmlCurrentContext:function(Xe){for(var mt=[],pt=Xe.context;pt;pt=pt.prev)pt.tagName&&mt.push(pt.tagName);return mt.reverse()}}}),Le.defineMIME("text/xml","xml"),Le.defineMIME("application/xml","xml"),Le.mimeModes.hasOwnProperty("text/html")||Le.defineMIME("text/html",{name:"xml",htmlMode:!0})})},3867:function(xn,ln,Ie){var Le=Ie(97671);(function(Se,je){xn.exports=je()})(this,function(){"use strict";function Se(ze){var it=typeof ze;return ze!==null&&(it==="object"||it==="function")}function je(ze){return typeof ze=="function"}var Me=void 0;Array.isArray?Me=Array.isArray:Me=function(ze){return Object.prototype.toString.call(ze)==="[object Array]"};var Ce=Me,xe=0,be=void 0,ye=void 0,we=function(it,Ke){ve[xe]=it,ve[xe+1]=Ke,xe+=2,xe===2&&(ye?ye(Pe):De())};function pe(ze){ye=ze}function de(ze){we=ze}var ge=typeof window!="undefined"?window:void 0,fe=ge||{},ue=fe.MutationObserver||fe.WebKitMutationObserver,ee=typeof self=="undefined"&&typeof Le!="undefined"&&{}.toString.call(Le)==="[object process]",z=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function oe(){return function(){return Le.nextTick(Pe)}}function re(){return typeof be!="undefined"?function(){be(Pe)}:me()}function ae(){var ze=0,it=new ue(Pe),Ke=document.createTextNode("");return it.observe(Ke,{characterData:!0}),function(){Ke.data=ze=++ze%2}}function le(){var ze=new MessageChannel;return ze.port1.onmessage=Pe,function(){return ze.port2.postMessage(0)}}function me(){var ze=setTimeout;return function(){return ze(Pe,1)}}var ve=new Array(1e3);function Pe(){for(var ze=0;ze<xe;ze+=2){var it=ve[ze],Ke=ve[ze+1];it(Ke),ve[ze]=void 0,ve[ze+1]=void 0}xe=0}function Ae(){try{var ze=Function("return this")().require("vertx");return be=ze.runOnLoop||ze.runOnContext,re()}catch(it){return me()}}var De=void 0;ee?De=oe():ue?De=ae():z?De=le():ge===void 0?De=Ae():De=me();function Oe(ze,it){var Ke=this,We=new this.constructor(Xe);We[qe]===void 0&&Yt(We);var vt=Ke._state;if(vt){var kt=arguments[vt-1];we(function(){return dn(vt,We,kt,Ke._result)})}else Ut(Ke,We,ze,it);return We}function Ze(ze){var it=this;if(ze&&typeof ze=="object"&&ze.constructor===it)return ze;var Ke=new it(Xe);return ct(Ke,ze),Ke}var qe=Math.random().toString(36).substring(2);function Xe(){}var mt=void 0,pt=1,Mt=2;function at(){return new TypeError("You cannot resolve a promise with itself")}function _t(){return new TypeError("A promises callback cannot return that same promise.")}function dt(ze,it,Ke,We){try{ze.call(it,Ke,We)}catch(vt){return vt}}function Rt(ze,it,Ke){we(function(We){var vt=!1,kt=dt(Ke,it,function(hn){vt||(vt=!0,it!==hn?ct(We,hn):wt(We,hn))},function(hn){vt||(vt=!0,xt(We,hn))},"Settle: "+(We._label||" unknown promise"));!vt&&kt&&(vt=!0,xt(We,kt))},ze)}function ut(ze,it){it._state===pt?wt(ze,it._result):it._state===Mt?xt(ze,it._result):Ut(it,void 0,function(Ke){return ct(ze,Ke)},function(Ke){return xt(ze,Ke)})}function rt(ze,it,Ke){it.constructor===ze.constructor&&Ke===Oe&&it.constructor.resolve===Ze?ut(ze,it):Ke===void 0?wt(ze,it):je(Ke)?Rt(ze,it,Ke):wt(ze,it)}function ct(ze,it){if(ze===it)xt(ze,at());else if(Se(it)){var Ke=void 0;try{Ke=it.then}catch(We){xt(ze,We);return}rt(ze,it,Ke)}else wt(ze,it)}function yt(ze){ze._onerror&&ze._onerror(ze._result),zt(ze)}function wt(ze,it){ze._state===mt&&(ze._result=it,ze._state=pt,ze._subscribers.length!==0&&we(zt,ze))}function xt(ze,it){ze._state===mt&&(ze._state=Mt,ze._result=it,we(yt,ze))}function Ut(ze,it,Ke,We){var vt=ze._subscribers,kt=vt.length;ze._onerror=null,vt[kt]=it,vt[kt+pt]=Ke,vt[kt+Mt]=We,kt===0&&ze._state&&we(zt,ze)}function zt(ze){var it=ze._subscribers,Ke=ze._state;if(it.length!==0){for(var We=void 0,vt=void 0,kt=ze._result,hn=0;hn<it.length;hn+=3)We=it[hn],vt=it[hn+Ke],We?dn(Ke,We,vt,kt):vt(kt);ze._subscribers.length=0}}function dn(ze,it,Ke,We){var vt=je(Ke),kt=void 0,hn=void 0,en=!0;if(vt){try{kt=Ke(We)}catch(Gt){en=!1,hn=Gt}if(it===kt){xt(it,_t());return}}else kt=We;it._state!==mt||(vt&&en?ct(it,kt):en===!1?xt(it,hn):ze===pt?wt(it,kt):ze===Mt&&xt(it,kt))}function Ft(ze,it){try{it(function(We){ct(ze,We)},function(We){xt(ze,We)})}catch(Ke){xt(ze,Ke)}}var Dt=0;function Qt(){return Dt++}function Yt(ze){ze[qe]=Dt++,ze._state=void 0,ze._result=void 0,ze._subscribers=[]}function Jt(){return new Error("Array Methods must be provided an Array")}var lt=function(){function ze(it,Ke){this._instanceConstructor=it,this.promise=new it(Xe),this.promise[qe]||Yt(this.promise),Ce(Ke)?(this.length=Ke.length,this._remaining=Ke.length,this._result=new Array(this.length),this.length===0?wt(this.promise,this._result):(this.length=this.length||0,this._enumerate(Ke),this._remaining===0&&wt(this.promise,this._result))):xt(this.promise,Jt())}return ze.prototype._enumerate=function(Ke){for(var We=0;this._state===mt&&We<Ke.length;We++)this._eachEntry(Ke[We],We)},ze.prototype._eachEntry=function(Ke,We){var vt=this._instanceConstructor,kt=vt.resolve;if(kt===Ze){var hn=void 0,en=void 0,Gt=!1;try{hn=Ke.then}catch(bn){Gt=!0,en=bn}if(hn===Oe&&Ke._state!==mt)this._settledAt(Ke._state,We,Ke._result);else if(typeof hn!="function")this._remaining--,this._result[We]=Ke;else if(vt===Ve){var gn=new vt(Xe);Gt?xt(gn,en):rt(gn,Ke,hn),this._willSettleAt(gn,We)}else this._willSettleAt(new vt(function(bn){return bn(Ke)}),We)}else this._willSettleAt(kt(Ke),We)},ze.prototype._settledAt=function(Ke,We,vt){var kt=this.promise;kt._state===mt&&(this._remaining--,Ke===Mt?xt(kt,vt):this._result[We]=vt),this._remaining===0&&wt(kt,this._result)},ze.prototype._willSettleAt=function(Ke,We){var vt=this;Ut(Ke,void 0,function(kt){return vt._settledAt(pt,We,kt)},function(kt){return vt._settledAt(Mt,We,kt)})},ze}();function Ue(ze){return new lt(this,ze).promise}function Be(ze){var it=this;return Ce(ze)?new it(function(Ke,We){for(var vt=ze.length,kt=0;kt<vt;kt++)it.resolve(ze[kt]).then(Ke,We)}):new it(function(Ke,We){return We(new TypeError("You must pass an array to race."))})}function tt(ze){var it=this,Ke=new it(Xe);return xt(Ke,ze),Ke}function ht(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function et(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var Ve=function(){function ze(it){this[qe]=Qt(),this._result=this._state=void 0,this._subscribers=[],Xe!==it&&(typeof it!="function"&&ht(),this instanceof ze?Ft(this,it):et())}return ze.prototype.catch=function(Ke){return this.then(null,Ke)},ze.prototype.finally=function(Ke){var We=this,vt=We.constructor;return je(Ke)?We.then(function(kt){return vt.resolve(Ke()).then(function(){return kt})},function(kt){return vt.resolve(Ke()).then(function(){throw kt})}):We.then(Ke,Ke)},ze}();Ve.prototype.then=Oe,Ve.all=Ue,Ve.race=Be,Ve.resolve=Ze,Ve.reject=tt,Ve._setScheduler=pe,Ve._setAsap=de,Ve._asap=we;function Re(){var ze=void 0;if(typeof Ie.g!="undefined")ze=Ie.g;else if(typeof self!="undefined")ze=self;else try{ze=Function("return this")()}catch(We){throw new Error("polyfill failed because global object is unavailable in this environment")}var it=ze.Promise;if(it){var Ke=null;try{Ke=Object.prototype.toString.call(it.resolve())}catch(We){}if(Ke==="[object Promise]"&&!it.cast)return}ze.Promise=Ve}return Ve.polyfill=Re,Ve.Promise=Ve,Ve})},86204:function(xn){"use strict";var ln=typeof Reflect=="object"?Reflect:null,Ie=ln&&typeof ln.apply=="function"?ln.apply:function(le,me,ve){return Function.prototype.apply.call(le,me,ve)},Le;ln&&typeof ln.ownKeys=="function"?Le=ln.ownKeys:Object.getOwnPropertySymbols?Le=function(le){return Object.getOwnPropertyNames(le).concat(Object.getOwnPropertySymbols(le))}:Le=function(le){return Object.getOwnPropertyNames(le)};function Se(ae){console&&console.warn&&console.warn(ae)}var je=Number.isNaN||function(le){return le!==le};function Me(){Me.init.call(this)}xn.exports=Me,xn.exports.once=z,Me.EventEmitter=Me,Me.prototype._events=void 0,Me.prototype._eventsCount=0,Me.prototype._maxListeners=void 0;var Ce=10;function xe(ae){if(typeof ae!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof ae)}Object.defineProperty(Me,"defaultMaxListeners",{enumerable:!0,get:function(){return Ce},set:function(ae){if(typeof ae!="number"||ae<0||je(ae))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+ae+".");Ce=ae}}),Me.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Me.prototype.setMaxListeners=function(le){if(typeof le!="number"||le<0||je(le))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+le+".");return this._maxListeners=le,this};function be(ae){return ae._maxListeners===void 0?Me.defaultMaxListeners:ae._maxListeners}Me.prototype.getMaxListeners=function(){return be(this)},Me.prototype.emit=function(le){for(var me=[],ve=1;ve<arguments.length;ve++)me.push(arguments[ve]);var Pe=le==="error",Ae=this._events;if(Ae!==void 0)Pe=Pe&&Ae.error===void 0;else if(!Pe)return!1;if(Pe){var De;if(me.length>0&&(De=me[0]),De instanceof Error)throw De;var Oe=new Error("Unhandled error."+(De?" ("+De.message+")":""));throw Oe.context=De,Oe}var Ze=Ae[le];if(Ze===void 0)return!1;if(typeof Ze=="function")Ie(Ze,this,me);else for(var qe=Ze.length,Xe=fe(Ze,qe),ve=0;ve<qe;++ve)Ie(Xe[ve],this,me);return!0};function ye(ae,le,me,ve){var Pe,Ae,De;if(xe(me),Ae=ae._events,Ae===void 0?(Ae=ae._events=Object.create(null),ae._eventsCount=0):(Ae.newListener!==void 0&&(ae.emit("newListener",le,me.listener?me.listener:me),Ae=ae._events),De=Ae[le]),De===void 0)De=Ae[le]=me,++ae._eventsCount;else if(typeof De=="function"?De=Ae[le]=ve?[me,De]:[De,me]:ve?De.unshift(me):De.push(me),Pe=be(ae),Pe>0&&De.length>Pe&&!De.warned){De.warned=!0;var Oe=new Error("Possible EventEmitter memory leak detected. "+De.length+" "+String(le)+" listeners added. Use emitter.setMaxListeners() to increase limit");Oe.name="MaxListenersExceededWarning",Oe.emitter=ae,Oe.type=le,Oe.count=De.length,Se(Oe)}return ae}Me.prototype.addListener=function(le,me){return ye(this,le,me,!1)},Me.prototype.on=Me.prototype.addListener,Me.prototype.prependListener=function(le,me){return ye(this,le,me,!0)};function we(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function pe(ae,le,me){var ve={fired:!1,wrapFn:void 0,target:ae,type:le,listener:me},Pe=we.bind(ve);return Pe.listener=me,ve.wrapFn=Pe,Pe}Me.prototype.once=function(le,me){return xe(me),this.on(le,pe(this,le,me)),this},Me.prototype.prependOnceListener=function(le,me){return xe(me),this.prependListener(le,pe(this,le,me)),this},Me.prototype.removeListener=function(le,me){var ve,Pe,Ae,De,Oe;if(xe(me),Pe=this._events,Pe===void 0)return this;if(ve=Pe[le],ve===void 0)return this;if(ve===me||ve.listener===me)--this._eventsCount===0?this._events=Object.create(null):(delete Pe[le],Pe.removeListener&&this.emit("removeListener",le,ve.listener||me));else if(typeof ve!="function"){for(Ae=-1,De=ve.length-1;De>=0;De--)if(ve[De]===me||ve[De].listener===me){Oe=ve[De].listener,Ae=De;break}if(Ae<0)return this;Ae===0?ve.shift():ue(ve,Ae),ve.length===1&&(Pe[le]=ve[0]),Pe.removeListener!==void 0&&this.emit("removeListener",le,Oe||me)}return this},Me.prototype.off=Me.prototype.removeListener,Me.prototype.removeAllListeners=function(le){var me,ve,Pe;if(ve=this._events,ve===void 0)return this;if(ve.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):ve[le]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete ve[le]),this;if(arguments.length===0){var Ae=Object.keys(ve),De;for(Pe=0;Pe<Ae.length;++Pe)De=Ae[Pe],De!=="removeListener"&&this.removeAllListeners(De);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(me=ve[le],typeof me=="function")this.removeListener(le,me);else if(me!==void 0)for(Pe=me.length-1;Pe>=0;Pe--)this.removeListener(le,me[Pe]);return this};function de(ae,le,me){var ve=ae._events;if(ve===void 0)return[];var Pe=ve[le];return Pe===void 0?[]:typeof Pe=="function"?me?[Pe.listener||Pe]:[Pe]:me?ee(Pe):fe(Pe,Pe.length)}Me.prototype.listeners=function(le){return de(this,le,!0)},Me.prototype.rawListeners=function(le){return de(this,le,!1)},Me.listenerCount=function(ae,le){return typeof ae.listenerCount=="function"?ae.listenerCount(le):ge.call(ae,le)},Me.prototype.listenerCount=ge;function ge(ae){var le=this._events;if(le!==void 0){var me=le[ae];if(typeof me=="function")return 1;if(me!==void 0)return me.length}return 0}Me.prototype.eventNames=function(){return this._eventsCount>0?Le(this._events):[]};function fe(ae,le){for(var me=new Array(le),ve=0;ve<le;++ve)me[ve]=ae[ve];return me}function ue(ae,le){for(;le+1<ae.length;le++)ae[le]=ae[le+1];ae.pop()}function ee(ae){for(var le=new Array(ae.length),me=0;me<le.length;++me)le[me]=ae[me].listener||ae[me];return le}function z(ae,le){return new Promise(function(me,ve){function Pe(De){ae.removeListener(le,Ae),ve(De)}function Ae(){typeof ae.removeListener=="function"&&ae.removeListener("error",Pe),me([].slice.call(arguments))}re(ae,le,Ae,{once:!0}),le!=="error"&&oe(ae,Pe,{once:!0})})}function oe(ae,le,me){typeof ae.on=="function"&&re(ae,"error",le,me)}function re(ae,le,me,ve){if(typeof ae.on=="function")ve.once?ae.once(le,me):ae.on(le,me);else if(typeof ae.addEventListener=="function")ae.addEventListener(le,function Pe(Ae){ve.once&&ae.removeEventListener(le,Pe),me(Ae)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof ae)}},12378:function(xn,ln,Ie){"use strict";Ie.d(ln,{$u:function(){return we},BD:function(){return lt},E9:function(){return ye},FF:function(){return Cr},FJ:function(){return le},Hn:function(){return ae},KX:function(){return ve},NB:function(){return Ke},S0:function(){return Qt},UL:function(){return pe},Vk:function(){return re},Vm:function(){return vt},YI:function(){return Yt},ZA:function(){return je},Zt:function(){return de},al:function(){return et},bn:function(){return ht},bx:function(){return Ue},g2:function(){return Jt},h1:function(){return Ze},hD:function(){return Yn},l4:function(){return xe},rU:function(){return We},s_:function(){return Be},uz:function(){return it},z6:function(){return ge}}),xn=Ie.hmd(xn),function(){var $e;function Li(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function ti(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Li(a)}}function Oi(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var pr=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},dr;if(typeof Object.setPrototypeOf=="function")dr=Object.setPrototypeOf;else{var Qi;e:{var So={a:!0},$t={};try{$t.__proto__=So,Qi=$t.a;break e}catch(a){}Qi=!1}dr=Qi?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Ge=dr;function Je(a,y){if(a.prototype=pr(y.prototype),a.prototype.constructor=a,Ge)Ge(a,y);else for(var x in y)if(x!="prototype")if(Object.defineProperties){var b=Object.getOwnPropertyDescriptor(y,x);b&&Object.defineProperty(a,x,b)}else a[x]=y[x];a.QA=y.prototype}var ot=typeof Ie.g!="undefined"&&Ie.g!=null?Ie.g:self,Et=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var b=arguments[x];if(b)for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(a[E]=b[E])}return a},Nt=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function pn(a,y){if(y){var x=ot;a=a.split(".");for(var b=0;b<a.length-1;b++){var E=a[b];E in x||(x[E]={}),x=x[E]}a=a[a.length-1],b=x[a],y=y(b),y!=b&&y!=null&&Nt(x,a,{writable:!0,value:y})}}pn("Object.assign",function(a){return a||Et}),pn("Array.prototype.fill",function(a){return a||function(y,x,b){var E=this.length||0;for(0>x&&(x=Math.max(0,E+x)),(b==null||b>E)&&(b=E),b=Number(b),0>b&&(b=Math.max(0,E+b)),x=Number(x||0);x<b;x++)this[x]=y;return this}});var jt=typeof globalThis=="object"&&globalThis||typeof Ie.g=="object"&&Ie.g.global===Ie.g&&Ie.g||typeof self=="object"&&self.self===self&&self||{};jt.requestAnimationFrame===void 0&&(jt.setImmediate===void 0?jt.requestAnimationFrame=function(a){jt.setTimeout(a,0)}:jt.requestAnimationFrame=jt.setImmediate);function cn(){}function On(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&jt.clearTimeout(x),x=pi(function(){x=-1,a.apply(b,E)},y)}}function pi(a,y){return jt.setTimeout(a,y)}function Fn(a){return jt.document.createElement(a)}function Lt(a){throw Error(a)}function Ht(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Lt(a)}function Pn(a,y,x,b){x=x===null?"*":typeof x=="string"?x:typeof x=="function"&&typeof x.className=="string"?x.className:"",b!==void 0&&(x+="."+b),Lt(x+" is not in the range "+y+": "+a)}function Sn(a){jt.console&&jt.console.log(a)}function Kt(a){return typeof a=="object"&&a!==null}function vn(a){return Array.isArray(a)||jt.NodeList&&a instanceof jt.NodeList||jt.HTMLCollection&&a instanceof jt.HTMLCollection}function Hn(a){return Array.prototype.slice.call(a)}function Gn(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Lt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function oi(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Lt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Wn(){var a=Tr.pop();return a===void 0?[]:a}function zn(a){a.length=0,Tr.push(a)}function Mn(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(Kt(a)&&a.constructor)return Mn(a.constructor);return typeof a}function wi(a){var y=a;return Kt(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 mi(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 En(a,y,x){Object.defineProperty(bo.prototype,a,{get:y,set:x})}function ei(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 b=0,E=0;E<a.length;E+=2)x[b++]=y[a.substr(E,2)];for(a=x.join(""),a=a===""?"0":a,y=[],x=0;256>x;x++)y[x]=x;for(x=b=0;256>x;x++)b=(b+y[x]+119)%256,E=y[x],y[x]=y[b],y[b]=E;b=x=0;for(var te="",ne=0;ne<a.length;ne++)x=(x+1)%256,b=(b+y[x])%256,E=y[x],y[x]=y[b],y[b]=E,te+=String.fromCharCode(a.charCodeAt(ne)^y[(y[x]+y[b])%256]);return te.indexOf("GoJS 2.1 evaluation")>-1||te.indexOf("\xA9 1998-2021 Northwoods Software")>-1||te.indexOf("Not for distribution or production use")>-1||te.indexOf("gojs.net")>-1?"":te}var er=jt.navigator!==void 0&&0<jt.navigator.userAgent.indexOf("Trident/7"),Sr=jt.navigator!==void 0&&jt.navigator.platform!==void 0&&jt.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Tr=[];Object.freeze([]),cn.className="Util",cn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",cn.adym="gojs.net",cn.vfo="28e645fdb266",cn.className="Util";function nn(a,y,x){Di(this),this.j=a,this.xa=y,this.o=x}nn.prototype.toString=function(){return"EnumValue."+this.xa};function Mi(a,y){return y==null||y===""?null:a[y]}ot.Object.defineProperties(nn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),nn.className="EnumValue";function tr(){this.ew=[]}tr.prototype.toString=function(){return this.ew.join("")},tr.prototype.add=function(a){a!==""&&this.ew.push(a)},tr.className="StringBuilder";function vi(){}vi.className="PropertyCollection";var or={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){jt.console&&jt.console.log(a)},HA:function(a,y,x,b){a.strokeStyle="red",a.fillStyle="red",a.font="8px sans-serif",a.beginPath(),a.moveTo(-10,0),a.lineTo(10,0),a.moveTo(0,-10),a.lineTo(0,10),a.stroke(),a.setTransform(1,0,0,1,0,0),a.scale(x,x),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.lineWidth=2,a.beginPath(),a.moveTo(b.left,b.top+20),a.lineTo(b.left,b.top),a.lineTo(b.left+20,b.top),a.moveTo(b.right,b.bottom-20),a.lineTo(b.right,b.bottom),a.lineTo(b.right-20,b.bottom),a.stroke(),a.fillText("DB: "+Math.round(b.x)+", "+Math.round(b.y)+", "+Math.round(b.width)+", "+Math.round(b.height),b.left,b.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var b=a[y.x];if(b.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(b.prototype);for(var E={Tj:0};E.Tj<y.Zl.length;E={Tj:E.Tj},E.Tj++){var te=Object.getOwnPropertyDescriptor(b.prototype,y.Zl[E.Tj]);te.get!==void 0&&te.set===void 0&&Object.defineProperty(b.prototype,y.Zl[E.Tj],{set:function(ne,se){return function(){throw Error("Property "+ne.Zl[se.Tj]+" of "+ne.x+" is read-only.")}}(y,E)})}}}y={Zl:y.Zl,x:y.x}}}};function Vi(){}Vi.prototype.reset=function(){},Vi.prototype.next=function(){return!1},Vi.prototype.Ad=function(){return!1},Vi.prototype.first=function(){return null},Vi.prototype.any=function(){return!1},Vi.prototype.all=function(){return!0},Vi.prototype.each=function(){return this},Vi.prototype.map=function(){return this},Vi.prototype.filter=function(){return this},Vi.prototype.de=function(){},Vi.prototype.toString=function(){return"EmptyIterator"},ot.Object.defineProperties(Vi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Vi.prototype.first=Vi.prototype.first,Vi.prototype.hasNext=Vi.prototype.Ad,Vi.prototype.next=Vi.prototype.next,Vi.prototype.reset=Vi.prototype.reset;var yr=null;Vi.className="EmptyIterator",yr=new Vi;function fr(a){this.key=-1,this.value=a}fr.prototype.reset=function(){this.key=-1},fr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},fr.prototype.Ad=function(){return this.next()},fr.prototype.first=function(){return this.key=0,this.value},fr.prototype.any=function(a){return this.key=-1,a(this.value)},fr.prototype.all=function(a){return this.key=-1,a(this.value)},fr.prototype.each=function(a){return this.key=-1,a(this.value),this},fr.prototype.map=function(a){return new fr(a(this.value))},fr.prototype.filter=function(a){return a(this.value)?new fr(this.value):yr},fr.prototype.de=function(){this.value=null},fr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},ot.Object.defineProperties(fr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),fr.prototype.first=fr.prototype.first,fr.prototype.hasNext=fr.prototype.Ad,fr.prototype.next=fr.prototype.next,fr.prototype.reset=fr.prototype.reset,fr.className="SingletonIterator";function _r(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}_r.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},_r.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;a=a.s;var y=a.length,x=++this.Za,b=this.qf;if(b!==null)for(;x<y;){var E=a[x];if(b(E))return this.key=this.Za=x,this.value=E,!0;x++}else{if(x<y)return this.key=x,this.value=a[x],!0;this.de()}return!1},_r.prototype.Ad=function(){return this.next()},_r.prototype.first=function(){var a=this.Bb;this.qa=a.Ja,this.Za=0,a=a.s;var y=a.length,x=this.qf;if(x!==null){for(var b=0;b<y;){var E=a[b];if(x(E))return this.key=this.Za=b,this.value=E;b++}return null}return 0<y?(a=a[0],this.key=0,this.value=a):null},_r.prototype.any=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var te=y[E];if((b===null||b(te))&&a(te))return!0}return!1},_r.prototype.all=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var te=y[E];if((b===null||b(te))&&!a(te))return!1}return!0},_r.prototype.each=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var te=y[E];(b===null||b(te))&&a(te)}return this},_r.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,te=0;te<b;te++){var ne=y[te];(E===null||E(ne))&&x.push(a(ne))}return a=new Ln,a.s=x,a.xb(),a.iterator},_r.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,te=0;te<b;te++){var ne=y[te];(E===null||E(ne))&&a(ne)&&x.push(ne)}return a=new Ln,a.s=x,a.xb(),a.iterator},_r.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},_r.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},ot.Object.defineProperties(_r.prototype,{iterator:{get:function(){return this}},predicate:{get:function(){return this.qf},set:function(a){this.qf=a}},count:{get:function(){var a=this.qf;if(a!==null){for(var y=0,x=this.Bb.s,b=x.length,E=0;E<b;E++)a(x[E])&&y++;return y}return this.Bb.s.length}}}),_r.prototype.first=_r.prototype.first,_r.prototype.hasNext=_r.prototype.Ad,_r.prototype.next=_r.prototype.next,_r.prototype.reset=_r.prototype.reset,_r.className="ListIterator";function Yr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}Yr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},Yr.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;var y=--this.Za;return 0<=y?(this.key=y,this.value=a.s[y],!0):(this.de(),!1)},Yr.prototype.Ad=function(){return this.next()},Yr.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},Yr.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},Yr.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},Yr.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},Yr.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--)x.push(a(y[b]));return a=new Ln,a.s=x,a.xb(),a.iterator},Yr.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--){var E=y[b];a(E)&&x.push(E)}return a=new Ln,a.s=x,a.xb(),a.iterator},Yr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},Yr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},ot.Object.defineProperties(Yr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),Yr.prototype.first=Yr.prototype.first,Yr.prototype.hasNext=Yr.prototype.Ad,Yr.prototype.next=Yr.prototype.next,Yr.prototype.reset=Yr.prototype.reset,Yr.className="ListIteratorBackwards";function Ln(a){Di(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Lt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}$e=Ln.prototype,$e.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},$e.freeze=function(){return this._isFrozen=!0,this},$e.ka=function(){return this._isFrozen=!1,this},$e.toString=function(){return"List()#"+sr(this)},$e.add=function(a){return a===null?this:(this._isFrozen&&Ht(this,a),this.s.push(a),this.xb(),this)},$e.push=function(a){this.add(a)},$e.addAll=function(a){if(a===null)return this;this._isFrozen&&Ht(this);var y=this.s;if(vn(a))for(var x=a.length,b=0;b<x;b++)y.push(a[b]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},$e.clear=function(){this._isFrozen&&Ht(this),this.s.length=0,this.xb()},$e.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},$e.has=function(a){return this.contains(a)},$e.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},$e.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Pn(a,"0 <= i < length",Ln,"elt:i"),y[a]},$e.get=function(a){return this.M(a)},$e.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Pn(a,"0 <= i < length",Ln,"setElt:i"),this._isFrozen&&Ht(this,a),x[a]=y},$e.set=function(a,y){this.cd(a,y)},$e.first=function(){var a=this.s;return a.length===0?null:a[0]},$e.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},$e.pop=function(){this._isFrozen&&Ht(this);var a=this.s;return 0<a.length?a.pop():null},Ln.prototype.any=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(a(y[b]))return!0;return!1},Ln.prototype.all=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(!a(y[b]))return!1;return!0},Ln.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},Ln.prototype.map=function(a){for(var y=new Ln,x=[],b=this.s,E=b.length,te=0;te<E;te++)x.push(a(b[te]));return y.s=x,y.xb(),y},Ln.prototype.filter=function(a){for(var y=new Ln,x=[],b=this.s,E=b.length,te=0;te<E;te++){var ne=b[te];a(ne)&&x.push(ne)}return y.s=x,y.xb(),y},$e=Ln.prototype,$e.Gb=function(a,y){0>a&&Pn(a,">= 0",Ln,"insertAt:i"),this._isFrozen&&Ht(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},$e.remove=function(a){if(a===null)return!1;this._isFrozen&&Ht(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)},$e.delete=function(a){return this.remove(a)},$e.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Pn(a,"0 <= i < length",Ln,"removeAt:i"),this._isFrozen&&Ht(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},$e.removeRange=function(a,y){var x=this.s,b=x.length;if(0>a)a=0;else if(a>=b)return this;if(0>y)return this;if(y>=b&&(y=b-1),a>y)return this;this._isFrozen&&Ht(this);for(var E=a,te=y+1;te<b;)x[E++]=x[te++];return x.length=b-(y-a+1),this.xb(),this},Ln.prototype.copy=function(){var a=new Ln,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},$e=Ln.prototype,$e.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},$e.Iv=function(){for(var a=new kn,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},$e.sort=function(a){return this._isFrozen&&Ht(this),this.s.sort(a),this.xb(),this},$e.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&Ht(this);var te=x-y;if(1>=te)return this;if((0>y||y>=E-1)&&Pn(y,"0 <= from < length",Ln,"sortRange:from"),te===2)return x=b[y],E=b[y+1],0<a(x,E)&&(b[y]=E,b[y+1]=x,this.xb()),this;if(y===0)if(x>=E)b.sort(a);else for(y=b.slice(0,x),y.sort(a),a=0;a<x;a++)b[a]=y[a];else if(x>=E)for(x=b.slice(y),x.sort(a),a=y;a<E;a++)b[a]=x[a-y];else for(E=b.slice(y,x),E.sort(a),a=y;a<x;a++)b[a]=E[a-y];return this.xb(),this},$e.reverse=function(){return this._isFrozen&&Ht(this),this.s.reverse(),this.xb(),this},ot.Object.defineProperties(Ln.prototype,{_dataArray:{get:function(){return this.s}},count:{get:function(){return this.s.length}},size:{get:function(){return this.s.length}},length:{get:function(){return this.s.length}},iterator:{get:function(){if(0>=this.s.length)return yr;var a=this.Sa;return a!==null?(a.reset(),a):new _r(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return yr;var a=this.Hg;return a!==null?(a.reset(),a):new Yr(this)}}}),Ln.prototype.reverse=Ln.prototype.reverse,Ln.prototype.sortRange=Ln.prototype.zi,Ln.prototype.sort=Ln.prototype.sort,Ln.prototype.toSet=Ln.prototype.Iv,Ln.prototype.toArray=Ln.prototype.Fa,Ln.prototype.removeRange=Ln.prototype.removeRange,Ln.prototype.removeAt=Ln.prototype.mb,Ln.prototype.delete=Ln.prototype.delete,Ln.prototype.remove=Ln.prototype.remove,Ln.prototype.insertAt=Ln.prototype.Gb,Ln.prototype.pop=Ln.prototype.pop,Ln.prototype.last=Ln.prototype.jc,Ln.prototype.first=Ln.prototype.first,Ln.prototype.set=Ln.prototype.set,Ln.prototype.setElt=Ln.prototype.cd,Ln.prototype.get=Ln.prototype.get,Ln.prototype.elt=Ln.prototype.M,Ln.prototype.indexOf=Ln.prototype.indexOf,Ln.prototype.has=Ln.prototype.has,Ln.prototype.contains=Ln.prototype.contains,Ln.prototype.clear=Ln.prototype.clear,Ln.prototype.addAll=Ln.prototype.addAll,Ln.prototype.push=Ln.prototype.push,Ln.prototype.add=Ln.prototype.add,Ln.prototype.thaw=Ln.prototype.ka,Ln.prototype.freeze=Ln.prototype.freeze,Ln.className="List";function oo(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}oo.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},oo.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)},oo.prototype.Ad=function(){return this.next()},oo.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},oo.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},oo.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},oo.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},oo.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Ln;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},oo.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new Ln;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},oo.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},oo.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},ot.Object.defineProperties(oo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),oo.prototype.first=oo.prototype.first,oo.prototype.hasNext=oo.prototype.Ad,oo.prototype.next=oo.prototype.next,oo.prototype.reset=oo.prototype.reset,oo.className="SetIterator";function kn(a){Di(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Lt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}$e=kn.prototype,$e.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},$e.freeze=function(){return this._isFrozen=!0,this},$e.ka=function(){return this._isFrozen=!1,this},$e.toString=function(){return"Set()#"+sr(this)},$e.add=function(a){if(a===null)return this;this._isFrozen&&Ht(this,a);var y=a;return Kt(a)&&(y=Lr(a)),this.Tb[y]===void 0&&(this.Sb++,a=new an(a,a),this.Tb[y]=a,y=this.kf,y===null?this.ea=a:(a.ll=y,y.va=a),this.kf=a,this.xb()),this},$e.addAll=function(a){if(a===null)return this;if(this._isFrozen&&Ht(this),vn(a))for(var y=a.length,x=0;x<y;x++)this.add(a[x]);else for(a=a.iterator;a.next();)this.add(a.value);return this},$e.contains=function(a){if(a===null)return!1;var y=a;return Kt(a)&&(y=sr(a),y===void 0)?!1:this.Tb[y]!==void 0},$e.has=function(a){return this.contains(a)},$e.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},$e.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},$e.first=function(){var a=this.ea;return a===null?null:a.value},kn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},kn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},kn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},kn.prototype.map=function(a){for(var y=new kn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},kn.prototype.filter=function(a){for(var y=new kn,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},$e=kn.prototype,$e.remove=function(a){if(a===null)return!1;this._isFrozen&&Ht(this,a);var y=a;if(Kt(a)&&(y=sr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,b=a.ll;return x!==null&&(x.ll=b),b!==null&&(b.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=b),delete this.Tb[y],this.Sb--,this.xb(),!0},$e.delete=function(a){return this.remove(a)},$e.hp=function(a){if(a===null)return this;if(this._isFrozen&&Ht(this),vn(a))for(var y=a.length,x=0;x<y;x++)this.remove(a[x]);else for(a=a.iterator;a.next();)this.remove(a.value);return this},$e.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&Ht(this);var y=new kn;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var b=x.value;y.contains(b)||a.push(b)}return this.hp(a),this},$e.clear=function(){this._isFrozen&&Ht(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},kn.prototype.copy=function(){var a=new kn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},kn.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,b;for(b in y)a[x]=y[b].value,x++;return a},kn.prototype.Hv=function(){var a=new Ln,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Di(a){a.__gohashid=so++}function Lr(a){var y=a.__gohashid;return y===void 0&&(y=so++,a.__gohashid=y),y}function sr(a){return a.__gohashid}ot.Object.defineProperties(kn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return yr;var a=this.Sa;return a!==null?(a.reset(),a):new oo(this)}}}),kn.prototype.toList=kn.prototype.Hv,kn.prototype.toArray=kn.prototype.Fa,kn.prototype.clear=kn.prototype.clear,kn.prototype.retainAll=kn.prototype.pA,kn.prototype.removeAll=kn.prototype.hp,kn.prototype.delete=kn.prototype.delete,kn.prototype.remove=kn.prototype.remove,kn.prototype.first=kn.prototype.first,kn.prototype.containsAny=kn.prototype.Ty,kn.prototype.containsAll=kn.prototype.Sy,kn.prototype.has=kn.prototype.has,kn.prototype.contains=kn.prototype.contains,kn.prototype.addAll=kn.prototype.addAll,kn.prototype.add=kn.prototype.add,kn.prototype.thaw=kn.prototype.ka,kn.prototype.freeze=kn.prototype.freeze;var so=1;kn.className="Set",kn.uniqueHash=Di,kn.hashIdUnique=Lr,kn.hashId=sr;function Er(a){this.ma=a,this.qa=a.Ja,this.sa=null}Er.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},Er.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)},Er.prototype.Ad=function(){return this.next()},Er.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},Er.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},Er.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},Er.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},Er.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Ln;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},Er.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Ln;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},Er.prototype.de=function(){this.value=this.key=null,this.qa=-1},Er.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},ot.Object.defineProperties(Er.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Er.prototype.first=Er.prototype.first,Er.prototype.hasNext=Er.prototype.Ad,Er.prototype.next=Er.prototype.next,Er.prototype.reset=Er.prototype.reset,Er.className="MapKeySetIterator";function mr(a){kn.call(this),Di(this),this._isFrozen=!0,this.ma=a}Je(mr,kn),$e=mr.prototype,$e.freeze=function(){return this},$e.ka=function(){return this},$e.toString=function(){return"MapKeySet("+this.ma.toString()+")"},$e.add=function(){Lt("This Set is read-only: "+this.toString())},$e.contains=function(a){return this.ma.contains(a)},$e.has=function(a){return this.contains(a)},$e.remove=function(){Lt("This Set is read-only: "+this.toString())},$e.delete=function(a){return this.remove(a)},$e.clear=function(){Lt("This Set is read-only: "+this.toString())},$e.first=function(){var a=this.ma.ea;return a!==null?a.key:null},mr.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},mr.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},mr.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},mr.prototype.map=function(a){for(var y=new kn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},mr.prototype.filter=function(a){for(var y=new kn,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},mr.prototype.copy=function(){return new mr(this.ma)},mr.prototype.Iv=function(){var a=new kn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},mr.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,b;for(b in a)y[x]=a[b].key,x++;return y},mr.prototype.Hv=function(){var a=new Ln,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},ot.Object.defineProperties(mr.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?yr:new Er(this.ma)}}}),mr.prototype.toList=mr.prototype.Hv,mr.prototype.toArray=mr.prototype.Fa,mr.prototype.toSet=mr.prototype.Iv,mr.prototype.first=mr.prototype.first,mr.prototype.clear=mr.prototype.clear,mr.prototype.delete=mr.prototype.delete,mr.prototype.remove=mr.prototype.remove,mr.prototype.has=mr.prototype.has,mr.prototype.contains=mr.prototype.contains,mr.prototype.add=mr.prototype.add,mr.prototype.thaw=mr.prototype.ka,mr.prototype.freeze=mr.prototype.freeze,mr.className="MapKeySet";function _o(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}_o.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},_o.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)},_o.prototype.Ad=function(){return this.next()},_o.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},_o.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},_o.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},_o.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},_o.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Ln;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},_o.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Ln;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},_o.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},_o.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},ot.Object.defineProperties(_o.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),_o.prototype.first=_o.prototype.first,_o.prototype.hasNext=_o.prototype.Ad,_o.prototype.next=_o.prototype.next,_o.prototype.reset=_o.prototype.reset,_o.className="MapValueSetIterator";function an(a,y){this.key=a,this.value=y,this.ll=this.va=null}an.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},an.className="KeyValuePair";function Nn(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Nn.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Nn.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)},Nn.prototype.Ad=function(){return this.next()},Nn.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},Nn.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},Nn.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},Nn.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},Nn.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Ln;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Nn.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Ln;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Nn.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Nn.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},ot.Object.defineProperties(Nn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Nn.prototype.first=Nn.prototype.first,Nn.prototype.hasNext=Nn.prototype.Ad,Nn.prototype.next=Nn.prototype.next,Nn.prototype.reset=Nn.prototype.reset,Nn.className="MapIterator";function on(a){Di(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"&&Lt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}$e=on.prototype,$e.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},$e.freeze=function(){return this._isFrozen=!0,this},$e.ka=function(){return this._isFrozen=!1,this},$e.toString=function(){return"Map()#"+sr(this)},$e.add=function(a,y){this._isFrozen&&Ht(this,a);var x=a;Kt(a)&&(x=Lr(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new an(a,y),this.Tb[x]=a,x=this.kf,x===null?this.ea=a:(a.ll=x,x.va=a),this.kf=a,this.xb()):b.value=y,this},$e.set=function(a,y){return this.add(a,y)},$e.addAll=function(a){if(a===null)return this;if(vn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];this.add(b.key,b.value)}else if(a instanceof on)for(a=a.iterator;a.next();)this.add(a.key,a.value);else for(a=a.iterator;a.next();)y=a.value,this.add(y.key,y.value);return this},$e.first=function(){return this.ea},on.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},on.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},on.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},on.prototype.map=function(a){for(var y=new on,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},on.prototype.filter=function(a){for(var y=new on,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},$e=on.prototype,$e.contains=function(a){var y=a;return Kt(a)&&(y=sr(a),y===void 0)?!1:this.Tb[y]!==void 0},$e.has=function(a){return this.contains(a)},$e.I=function(a){var y=a;return Kt(a)&&(y=sr(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},$e.get=function(a){return this.I(a)},$e.remove=function(a){if(a===null)return!1;this._isFrozen&&Ht(this,a);var y=a;if(Kt(a)&&(y=sr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,b=a.ll;return x!==null&&(x.ll=b),b!==null&&(b.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=b),delete this.Tb[y],this.Sb--,this.xb(),!0},$e.delete=function(a){return this.remove(a)},$e.clear=function(){this._isFrozen&&Ht(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.jf!==null&&this.jf.reset(),this.kf=this.ea=null,this.xb()},on.prototype.copy=function(){var a=new on,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},on.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,b;for(b in a){var E=a[b];y[x]=new an(E.key,E.value),x++}return y},on.prototype.Lf=function(){return new mr(this)},ot.Object.defineProperties(on.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return yr;var a=this.Sa;return a!==null?(a.reset(),a):new Nn(this)}},iteratorKeys:{get:function(){return 0>=this.count?yr:new Er(this)}},iteratorValues:{get:function(){if(0>=this.count)return yr;var a=this.jf;return a!==null?(a.reset(),a):new _o(this)}}}),on.prototype.toKeySet=on.prototype.Lf,on.prototype.toArray=on.prototype.Fa,on.prototype.clear=on.prototype.clear,on.prototype.delete=on.prototype.delete,on.prototype.remove=on.prototype.remove,on.prototype.get=on.prototype.get,on.prototype.getValue=on.prototype.I,on.prototype.has=on.prototype.has,on.prototype.contains=on.prototype.contains,on.prototype.first=on.prototype.first,on.prototype.addAll=on.prototype.addAll,on.prototype.set=on.prototype.set,on.prototype.add=on.prototype.add,on.prototype.thaw=on.prototype.ka,on.prototype.freeze=on.prototype.freeze,on.className="Map";function ft(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Lt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Zn,si,Ei,yi,di;ft.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},ft.prototype.h=function(a,y){return this.x=a,this.y=y,this},ft.prototype.sg=function(a,y){return this.x=a,this.y=y,this},ft.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},ft.prototype.copy=function(){var a=new ft;return a.x=this.x,a.y=this.y,a},$e=ft.prototype,$e.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},$e.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},$e.freeze=function(){return this._isFrozen=!0,this},$e.ka=function(){return Object.isFrozen(this)&&Lt("cannot thaw constant: "+this),this._isFrozen=!1,this};function An(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new ft(x,E)}return new ft}function Xn(a){return a.x.toString()+" "+a.y.toString()}$e.toString=function(){return"Point("+this.x+","+this.y+")"},$e.D=function(a){return a instanceof ft?this.x===a.x&&this.y===a.y:!1},$e.hi=function(a,y){return this.x===a&&this.y===y},$e.Xa=function(a){return Vt.B(this.x,a.x)&&Vt.B(this.y,a.y)},$e.add=function(a){return this.x+=a.x,this.y+=a.y,this},$e.re=function(a){return this.x-=a.x,this.y-=a.y,this},$e.offset=function(a,y){return this.x+=a,this.y+=y,this},ft.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 b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));return this.x=a*y-b*x,this.y=b*y+a*x,this},$e=ft.prototype,$e.scale=function(a,y){return this.x*=a,this.y*=y,this},$e.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},$e.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},$e.normalize=function(){var a=this.x,y=this.y,x=Math.sqrt(a*a+y*y);return 0<x&&(this.x=a/x,this.y=y/x),this},$e.ab=function(a){return $n(a.x-this.x,a.y-this.y)},$e.direction=function(a,y){return $n(a-this.x,y-this.y)};function $n(a,y){if(a===0)return 0<y?90:0>y?270:0;if(y===0)return 0<a?0:180;if(isNaN(a)||isNaN(y))return 0;var x=180*Math.atan(Math.abs(y/a))/Math.PI;return 0>a?x=0>y?x+180:180-x:0>y&&(x=360-x),x}$e.Ry=function(a,y){return Vt.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},$e.fA=function(a,y,x,b){return Vt.qh(a,y,x,b,this.x,this.y,this),this},$e.gA=function(a,y){return Vt.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},$e.uA=function(a,y,x,b){return Vt.No(this.x,this.y,a,y,x,b,this),this},$e.vA=function(a,y){return Vt.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},$e.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},$e.yi=function(a,y,x,b,E){return this.x=a+E.x*x+E.offsetX,this.y=y+E.y*b+E.offsetY,this},$e.transform=function(a){return a.Ga(this),this};function Un(a,y){return y.Cd(a),a}function Qn(a,y,x,b,E,te){var ne=E-x,se=te-b,he=ne*ne+se*se;x-=a,b-=y;var _e=-x*ne-b*se;return 0>=_e||_e>=he?(ne=E-a,se=te-y,Math.min(x*x+b*b,ne*ne+se*se)):(a=ne*b-se*x,a*a/he)}function Vn(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function ni(a,y,x,b){return a=x-a,y=b-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(b=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?b=0>y?b+180:180-b:0>y&&(b=360-b),b)}$e.w=function(){return isFinite(this.x)&&isFinite(this.y)},ft.alloc=function(){var a=ci.pop();return a===void 0?new ft:a},ft.allocAt=function(a,y){var x=ci.pop();return x===void 0?new ft(a,y):(x.x=a,x.y=y,x)},ft.free=function(a){ci.push(a)},ft.prototype.isReal=ft.prototype.w,ft.prototype.setSpot=ft.prototype.yi,ft.prototype.setRectSpot=ft.prototype.xi,ft.prototype.snapToGridPoint=ft.prototype.vA,ft.prototype.snapToGrid=ft.prototype.uA,ft.prototype.projectOntoLineSegmentPoint=ft.prototype.gA,ft.prototype.projectOntoLineSegment=ft.prototype.fA,ft.intersectingLineSegments=function(a,y,x,b,E,te,ne,se){return Vt.Rl(a,y,x,b,E,te,ne,se)},ft.prototype.compareWithLineSegmentPoint=ft.prototype.Ry,ft.compareWithLineSegment=function(a,y,x,b,E,te){return Vt.Fl(a,y,x,b,E,te)},ft.prototype.direction=ft.prototype.direction,ft.prototype.directionPoint=ft.prototype.ab,ft.prototype.normalize=ft.prototype.normalize,ft.prototype.distanceSquared=ft.prototype.zd,ft.prototype.distanceSquaredPoint=ft.prototype.Bf,ft.prototype.scale=ft.prototype.scale,ft.prototype.rotate=ft.prototype.rotate,ft.prototype.offset=ft.prototype.offset,ft.prototype.subtract=ft.prototype.re,ft.prototype.add=ft.prototype.add,ft.prototype.equalsApprox=ft.prototype.Xa,ft.prototype.equalTo=ft.prototype.hi,ft.prototype.equals=ft.prototype.D,ft.prototype.set=ft.prototype.set,ft.prototype.setTo=ft.prototype.sg;var ci=[];ft.className="Point",ft.parse=An,ft.stringify=Xn,ft.distanceLineSegmentSquared=Qn,ft.distanceSquared=Vn,ft.direction=ni,ft.Origin=Zn=new ft(0,0).ja(),ft.InfiniteTopLeft=si=new ft(-1/0,-1/0).ja(),ft.InfiniteBottomRight=Ei=new ft(1/0,1/0).ja(),ft.SixPoint=yi=new ft(6,6).ja(),ft.NoPoint=di=new ft(NaN,NaN).ja(),ft.parse=An,ft.stringify=Xn,ft.distanceLineSegmentSquared=Qn,ft.distanceSquared=Vn,ft.direction=ni;function wn(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):Lt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var zi,Gi,Mr,Ji,Zr,jr,$r;wn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},wn.prototype.h=function(a,y){return this.width=a,this.height=y,this},wn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},wn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},wn.prototype.copy=function(){var a=new wn;return a.width=this.width,a.height=this.height,a},$e=wn.prototype,$e.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},$e.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},$e.freeze=function(){return this._isFrozen=!0,this},$e.ka=function(){return Object.isFrozen(this)&&Lt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Vr(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new wn(x,E)}return new wn}function co(a){return a.width.toString()+" "+a.height.toString()}$e.toString=function(){return"Size("+this.width+","+this.height+")"},$e.D=function(a){return a instanceof wn?this.width===a.width&&this.height===a.height:!1},$e.hi=function(a,y){return this.width===a&&this.height===y},$e.Xa=function(a){return Vt.B(this.width,a.width)&&Vt.B(this.height,a.height)},$e.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},$e.w=function(){return isFinite(this.width)&&isFinite(this.height)},wn.alloc=function(){var a=ko.pop();return a===void 0?new wn:a},wn.free=function(a){ko.push(a)},wn.prototype.isReal=wn.prototype.w,wn.prototype.inflate=wn.prototype.Bc,wn.prototype.equalsApprox=wn.prototype.Xa,wn.prototype.equalTo=wn.prototype.hi,wn.prototype.equals=wn.prototype.D,wn.prototype.set=wn.prototype.set,wn.prototype.setTo=wn.prototype.sg;var ko=[];wn.className="Size",wn.parse=Vr,wn.stringify=co,wn.ZeroSize=zi=new wn(0,0).ja(),wn.OneSize=Gi=new wn(1,1).ja(),wn.SixSize=Mr=new wn(6,6).ja(),wn.EightSize=Ji=new wn(8,8).ja(),wn.TenSize=Zr=new wn(10,10).ja(),wn.InfiniteSize=jr=new wn(1/0,1/0).ja(),wn.NoSize=$r=new wn(NaN,NaN).ja(),wn.parse=Vr,wn.stringify=co;function sn(a,y,x,b){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 b=="number"&&(0<=b||isNaN(b))?(this.x=a,this.y=y,this.width=x,this.height=b):a instanceof ft?(x=a.x,a=a.y,y instanceof ft?(b=y.x,y=y.y,this.x=Math.min(x,b),this.y=Math.min(a,y),this.width=Math.abs(x-b),this.height=Math.abs(a-y)):y instanceof wn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Lt("Incorrect second argument supplied to Rect constructor "+y)):Lt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}$e=sn.prototype,$e.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},$e.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function Jr(a,y,x){a.width=y,a.height=x}$e.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},$e.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},$e.dd=function(a){return this.x=a.x,this.y=a.y,this},$e.tA=function(a){return this.width=a.width,this.height=a.height,this},sn.prototype.copy=function(){var a=new sn;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},$e=sn.prototype,$e.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},$e.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},$e.freeze=function(){return this._isFrozen=!0,this},$e.ka=function(){return Object.isFrozen(this)&&Lt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Dr(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;(b=a[y++])&&(E=parseFloat(b));for(var te=0;a[y]==="";)y++;(b=a[y++])&&(te=parseFloat(b));for(var ne=0;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),new sn(x,E,te,ne)}return new sn}function ur(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}$e.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},$e.D=function(a){return a instanceof sn?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},$e.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},$e.Xa=function(a){return Vt.B(this.x,a.x)&&Vt.B(this.y,a.y)&&Vt.B(this.width,a.width)&&Vt.B(this.height,a.height)};function Ui(a,y){return Vt.$(a.x,y.x)&&Vt.$(a.y,y.y)&&Vt.$(a.width,y.width)&&Vt.$(a.height,y.height)}$e.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},$e.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},$e.contains=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+b<=this.y+this.height},$e.offset=function(a,y){return this.x+=a,this.y+=y,this},$e.Bc=function(a,y){return Hr(this,y,a,y,a)},$e.Co=function(a){return Hr(this,a.top,a.right,a.bottom,a.left)},$e.Fv=function(a){return Hr(this,-a.top,-a.right,-a.bottom,-a.left)},$e.Hz=function(a,y,x,b){return Hr(this,a,y,x,b)};function Hr(a,y,x,b,E){var te=a.width;return x+E<=-te?(a.x+=te/2,a.width=0):(a.x-=E,a.width+=x+E),x=a.height,y+b<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+b),a}$e.Ex=function(a){return fo(this,a.x,a.y,a.width,a.height)},$e.Uu=function(a,y,x,b){return fo(this,a,y,x,b)};function fo(a,y,x,b,E){var te=Math.max(a.x,y),ne=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+b),x=Math.min(a.y+a.height,x+E),a.x=te,a.y=ne,a.width=Math.max(0,y-te),a.height=Math.max(0,x-ne),a}$e.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},$e.Vu=function(a,y,x,b){var E=this.width,te=this.x;return E!==1/0&&x!==1/0&&(E+=te,x+=a,isNaN(x)||isNaN(E)||te>x||a>E)?!1:(a=this.height,x=this.y,!(a!==1/0&&b!==1/0&&(a+=x,b+=y,isNaN(b)||isNaN(a)||x>b||y>a)))};function uo(a,y){var x=a.width,b=a.x,E=y.x-10;return b>y.width+10+10+E||E>x+b?!1:(x=a.height,a=a.y,b=y.y-10,!(a>y.height+10+10+b||b>x+a))}$e.Ye=function(a){return br(this,a.x,a.y,0,0)},$e.ed=function(a){return br(this,a.x,a.y,a.width,a.height)},$e.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),br(this,a,y,x,b)};function br(a,y,x,b,E){var te=Math.min(a.x,y),ne=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+b),x=Math.max(a.y+a.height,x+E),a.x=te,a.y=ne,a.width=y-te,a.height=x-ne,a}$e.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 qr(a,y,x,b,E,te,ne,se){return ne===void 0&&(ne=0),se===void 0&&(se=0),a<=E&&E+ne<=a+x&&y<=te&&te+se<=y+b}function Ss(a,y,x,b,E,te,ne,se){return a>ne+E||E>x+a?!1:!(y>se+te||te>b+y)}$e.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},$e.Mz=function(){return this.width===0&&this.height===0},sn.alloc=function(){var a=oa.pop();return a===void 0?new sn:a},sn.allocAt=function(a,y,x,b){var E=oa.pop();return E===void 0?new sn(a,y,x,b):E.h(a,y,x,b)},sn.free=function(a){oa.push(a)},ot.Object.defineProperties(sn.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 ft(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new wn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new ft(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}}}),sn.prototype.isEmpty=sn.prototype.Mz,sn.prototype.isReal=sn.prototype.w,sn.intersectsLineSegment=function(a,y,x,b,E,te,ne,se){return Vt.Fx(a,y,x,b,E,te,ne,se)},sn.prototype.setSpot=sn.prototype.yi,sn.prototype.union=sn.prototype.Kv,sn.prototype.unionRect=sn.prototype.ed,sn.prototype.unionPoint=sn.prototype.Ye,sn.prototype.intersects=sn.prototype.Vu,sn.prototype.intersectsRect=sn.prototype.Yc,sn.prototype.intersect=sn.prototype.Uu,sn.prototype.intersectRect=sn.prototype.Ex,sn.prototype.grow=sn.prototype.Hz,sn.prototype.subtractMargin=sn.prototype.Fv,sn.prototype.addMargin=sn.prototype.Co,sn.prototype.inflate=sn.prototype.Bc,sn.prototype.offset=sn.prototype.offset,sn.prototype.contains=sn.prototype.contains,sn.prototype.containsRect=sn.prototype.Re,sn.prototype.containsPoint=sn.prototype.ca,sn.prototype.equalsApprox=sn.prototype.Xa,sn.prototype.equalTo=sn.prototype.hi,sn.prototype.equals=sn.prototype.D,sn.prototype.setSize=sn.prototype.tA,sn.prototype.setPoint=sn.prototype.dd,sn.prototype.set=sn.prototype.set,sn.prototype.setTo=sn.prototype.sg;var Vs=null,Aa=null,oa=[];sn.className="Rect",sn.parse=Dr,sn.stringify=ur,sn.contains=qr,sn.intersects=Ss,sn.ZeroRect=Vs=new sn(0,0,0,0).ja(),sn.NoRect=Aa=new sn(NaN,NaN,NaN,NaN).ja(),sn.parse=Dr,sn.stringify=ur,sn.contains=qr,sn.intersects=Ss;function nr(a,y,x,b){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):b!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=b):Lt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}nr.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},nr.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},nr.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},nr.prototype.copy=function(){var a=new nr;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},$e=nr.prototype,$e.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},$e.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},$e.freeze=function(){return this._isFrozen=!0,this},$e.ka=function(){return Object.isFrozen(this)&&Lt("cannot thaw constant: "+this),this._isFrozen=!1,this};function ns(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var b=a[y++];if(b&&(x=parseFloat(b)),isNaN(x))return new nr;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new nr(x);for(var te=NaN;a[y]==="";)y++;if((b=a[y++])&&(te=parseFloat(b)),isNaN(te))return new nr(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new nr(x,E):new nr(x,E,te,ne)}return new nr}function ss(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}$e.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},$e.D=function(a){return a instanceof nr?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},$e.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},$e.Xa=function(a){return Vt.B(this.top,a.top)&&Vt.B(this.right,a.right)&&Vt.B(this.bottom,a.bottom)&&Vt.B(this.left,a.left)},$e.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},nr.alloc=function(){var a=Ms.pop();return a===void 0?new nr:a},nr.free=function(a){Ms.push(a)},nr.prototype.isReal=nr.prototype.w,nr.prototype.equalsApprox=nr.prototype.Xa,nr.prototype.equalTo=nr.prototype.hi,nr.prototype.equals=nr.prototype.D,nr.prototype.set=nr.prototype.set,nr.prototype.setTo=nr.prototype.sg;var zs=null,us=null,Ms=[];nr.className="Margin",nr.parse=ns,nr.stringify=ss,nr.ZeroMargin=zs=new nr(0,0,0,0).ja(),nr.TwoMargin=us=new nr(2,2,2,2).ja(),nr.parse=ns,nr.stringify=ss;function ui(a,y,x,b){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),b===void 0&&(b=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=b),this._isFrozen=!1}var qi,xr,Br,Qr,jo,$i,pa,fs,hs,eo,ws,ga,is,Pa,Sa,Na,_s,nl,Hu,fl,Ol,il,Pu,eh,lu,As,Gu,th,uu,hu,ua,ma,Os,$s,Il,Ca;ui.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},ui.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},ui.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},ui.prototype.copy=function(){var a=new ui;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},$e=ui.prototype,$e.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},$e.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},$e.freeze=function(){return this._isFrozen=!0,this},$e.ka=function(){return Object.isFrozen(this)&&Lt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Yo(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function zo(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return qi;if(a==="TopLeft")return xr;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Br;if(a==="TopRight")return Qr;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return jo;if(a==="Center")return $i;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return pa;if(a==="BottomLeft")return fs;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return hs;if(a==="BottomRight")return eo;if(a==="TopSide")return ws;if(a==="LeftSide")return ga;if(a==="RightSide")return is;if(a==="BottomSide")return Pa;if(a==="TopBottomSides")return Sa;if(a==="LeftRightSides")return Na;if(a==="TopLeftSides")return _s;if(a==="TopRightSides")return nl;if(a==="BottomLeftSides")return Hu;if(a==="BottomRightSides")return fl;if(a==="NotTopSide")return Ol;if(a==="NotLeftSide")return il;if(a==="NotRightSide")return Pu;if(a==="NotBottomSide")return eh;if(a==="AllSides")return lu;if(a==="Default")return As;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b!==void 0&&0<b.length&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(E=parseFloat(b));for(var te=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(te=parseFloat(b));for(var ne=0;a[y]==="";)y++;return b=a[y++],b!==void 0&&0<b.length&&(ne=parseFloat(b)),new ui(x,E,te,ne)}return new ui}function xo(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}$e.toString=function(){return this.sb()?this.offsetX===0&&this.offsetY===0?"Spot("+this.x+","+this.y+")":"Spot("+this.x+","+this.y+","+this.offsetX+","+this.offsetY+")":this.D(qi)?"None":this.D(xr)?"TopLeft":this.D(Br)?"Top":this.D(Qr)?"TopRight":this.D(jo)?"Left":this.D($i)?"Center":this.D(pa)?"Right":this.D(fs)?"BottomLeft":this.D(hs)?"Bottom":this.D(eo)?"BottomRight":this.D(ws)?"TopSide":this.D(ga)?"LeftSide":this.D(is)?"RightSide":this.D(Pa)?"BottomSide":this.D(Sa)?"TopBottomSides":this.D(Na)?"LeftRightSides":this.D(_s)?"TopLeftSides":this.D(nl)?"TopRightSides":this.D(Hu)?"BottomLeftSides":this.D(fl)?"BottomRightSides":this.D(Ol)?"NotTopSide":this.D(il)?"NotLeftSide":this.D(Pu)?"NotRightSide":this.D(eh)?"NotBottomSide":this.D(lu)?"AllSides":this.D(As)?"Default":"None"},$e.D=function(a){return a instanceof ui?(this.x===a.x||isNaN(this.x)&&isNaN(a.x))&&(this.y===a.y||isNaN(this.y)&&isNaN(a.y))&&this.offsetX===a.offsetX&&this.offsetY===a.offsetY:!1},$e.gv=function(){return new ui(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},$e.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Gu))a=ga;else if(a.D(th))a=is;else if(a.D(uu))a=ws;else if(a.D(hu))a=Pa;else return!1;return a=a.offsetY,(this.offsetY&a)===a},$e.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},$e.Mc=function(){return isNaN(this.x)||isNaN(this.y)},$e.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},$e.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},$e.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},ui.alloc=function(){var a=Us.pop();return a===void 0?new ui:a},ui.free=function(a){Us.push(a)},ui.prototype.isDefault=ui.prototype.Xb,ui.prototype.isNone=ui.prototype.ys,ui.prototype.isSide=ui.prototype.$c,ui.prototype.isNoSpot=ui.prototype.Mc,ui.prototype.isSpot=ui.prototype.sb,ui.prototype.includesSide=ui.prototype.Hf,ui.prototype.opposite=ui.prototype.gv,ui.prototype.equals=ui.prototype.D,ui.prototype.set=ui.prototype.set,ui.prototype.setTo=ui.prototype.sg;var Us=[];ui.className="Spot",ui.parse=zo,ui.stringify=xo,ui.None=qi=Yo(new ui(0,0,0,0),0).ja(),ui.Default=As=Yo(new ui(0,0,-1,0),-1).ja(),ui.TopLeft=xr=new ui(0,0,0,0).ja(),ui.TopCenter=Br=new ui(.5,0,0,0).ja(),ui.TopRight=Qr=new ui(1,0,0,0).ja(),ui.LeftCenter=jo=new ui(0,.5,0,0).ja(),ui.Center=$i=new ui(.5,.5,0,0).ja(),ui.RightCenter=pa=new ui(1,.5,0,0).ja(),ui.BottomLeft=fs=new ui(0,1,0,0).ja(),ui.BottomCenter=hs=new ui(.5,1,0,0).ja(),ui.BottomRight=eo=new ui(1,1,0,0).ja(),ui.MiddleTop=ua=Br,ui.MiddleLeft=ma=jo,ui.MiddleRight=Os=pa,ui.MiddleBottom=$s=hs,ui.Top=uu=Br,ui.Left=Gu=jo,ui.Right=th=pa,ui.Bottom=hu=hs,ui.TopSide=ws=Yo(new ui(0,0,1,1),1).ja(),ui.LeftSide=ga=Yo(new ui(0,0,1,2),1).ja(),ui.RightSide=is=Yo(new ui(0,0,1,4),1).ja(),ui.BottomSide=Pa=Yo(new ui(0,0,1,8),1).ja(),ui.TopBottomSides=Sa=Yo(new ui(0,0,1,9),1).ja(),ui.LeftRightSides=Na=Yo(new ui(0,0,1,6),1).ja(),ui.TopLeftSides=_s=Yo(new ui(0,0,1,3),1).ja(),ui.TopRightSides=nl=Yo(new ui(0,0,1,5),1).ja(),ui.BottomLeftSides=Hu=Yo(new ui(0,0,1,10),1).ja(),ui.BottomRightSides=fl=Yo(new ui(0,0,1,12),1).ja(),ui.NotTopSide=Ol=Yo(new ui(0,0,1,14),1).ja(),ui.NotLeftSide=il=Yo(new ui(0,0,1,13),1).ja(),ui.NotRightSide=Pu=Yo(new ui(0,0,1,11),1).ja(),ui.NotBottomSide=eh=Yo(new ui(0,0,1,7),1).ja(),ui.AllSides=lu=Yo(new ui(0,0,1,15),1).ja(),Il=new ui(.156,.156).ja(),Ca=new ui(.844,.844).ja(),ui.parse=zo,ui.stringify=xo;function Ii(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Ii.prototype.set=function(a){return this.m11=a.m11,this.m12=a.m12,this.m21=a.m21,this.m22=a.m22,this.dx=a.dx,this.dy=a.dy,this},Ii.prototype.setTransform=function(a,y,x,b,E,te){return this.m11=a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=te,this},Ii.prototype.copy=function(){var a=new Ii;return a.m11=this.m11,a.m12=this.m12,a.m21=this.m21,a.m22=this.m22,a.dx=this.dx,a.dy=this.dy,a},Ii.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Ii.prototype.D=function(a){return this.m11===a.m11&&this.m12===a.m12&&this.m21===a.m21&&this.m22===a.m22&&this.dx===a.dx&&this.dy===a.dy},Ii.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Ii.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Ii.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,b=this.m11*a.m21+this.m21*a.m22,E=this.m12*a.m21+this.m22*a.m22;return this.dx=this.m11*a.dx+this.m21*a.dy+this.dx,this.dy=this.m12*a.dx+this.m22*a.dy+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},Ii.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,b=-a.m12*y,E=-a.m21*y,te=a.m11*y,ne=y*(a.m21*a.dy-a.m22*a.dx);return a=y*(a.m12*a.dx-a.m11*a.dy),y=this.m11*x+this.m21*b,x=this.m12*x+this.m22*b,b=this.m11*E+this.m21*te,E=this.m12*E+this.m22*te,this.dx=this.m11*ne+this.m21*a+this.dx,this.dy=this.m12*ne+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},Ii.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,b=this.m11*a,E=a*(this.m21*this.dy-this.m22*this.dx),te=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=te,this},Ii.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.m12*a+this.m22*b,te=this.m11*-b+this.m21*a,ne=this.m12*-b+this.m22*a;return this.m11=this.m11*a+this.m21*b,this.m12=E,this.m21=te,this.m22=ne,this.translate(-y,-x),this},$e=Ii.prototype,$e.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},$e.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},$e.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)},$e.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,b=a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},$e.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,b=1.2*a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},$e.pp=function(a){var y=a.x,x=a.y,b=y+a.width,E=x+a.height,te=this.m11,ne=this.m12,se=this.m21,he=this.m22,_e=this.dx,Ee=this.dy,Ne=y*te+x*se+_e,He=y*ne+x*he+Ee,Ye=b*te+x*se+_e,Qe=b*ne+x*he+Ee;return x=y*te+E*se+_e,y=y*ne+E*he+Ee,te=b*te+E*se+_e,b=b*ne+E*he+Ee,E=Math.min(Ne,Ye),Ne=Math.max(Ne,Ye),Ye=Math.min(He,Qe),He=Math.max(He,Qe),E=Math.min(E,x),Ne=Math.max(Ne,x),Ye=Math.min(Ye,y),He=Math.max(He,y),E=Math.min(E,te),Ne=Math.max(Ne,te),Ye=Math.min(Ye,b),He=Math.max(He,b),a.h(E,Ye,Ne-E,He-Ye),a},Ii.alloc=function(){var a=Hs.pop();return a===void 0?new Ii:a},Ii.free=function(a){Hs.push(a)},Ii.prototype.transformRect=Ii.prototype.pp,Ii.prototype.transformPoint=Ii.prototype.Ga,Ii.prototype.scale=Ii.prototype.scale,Ii.prototype.translate=Ii.prototype.translate,Ii.prototype.rotate=Ii.prototype.rotate,Ii.prototype.invert=Ii.prototype.Vj,Ii.prototype.multiplyInverted=Ii.prototype.bv,Ii.prototype.multiply=Ii.prototype.multiply,Ii.prototype.reset=Ii.prototype.reset,Ii.prototype.isIdentity=Ii.prototype.ws,Ii.prototype.equals=Ii.prototype.D,Ii.prototype.setTransform=Ii.prototype.setTransform,Ii.prototype.set=Ii.prototype.set;var Hs=[];Ii.className="Transform",Ii.xF="54a702f3e53909c447824c6706603faf4c";var Vt={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Vt.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Vt.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&&-.5<a},$:function(a,y){return a-=y,5e-8>a&&-5e-8<a},Yb:function(a,y,x,b,E,te,ne){if(0>=E&&(E=1e-6),a<x)var se=a,he=x;else se=x,he=a;if(y<b)var _e=y,Ee=b;else _e=b,Ee=y;if(a===x)return _e<=ne&&ne<=Ee&&a-E<=te&&te<=a+E;if(y===b)return se<=te&&te<=he&&y-E<=ne&&ne<=y+E;if(he+=E,se-=E,se<=te&&te<=he&&(Ee+=E,_e-=E,_e<=ne&&ne<=Ee))if(he-se>Ee-_e)if(a-x>E||x-a>E){if(te=(b-y)/(x-a)*(te-a)+y,te-E<=ne&&ne<=te+E)return!0}else return!0;else if(y-b>E||b-y>E){if(ne=(x-a)/(b-y)*(ne-y)+a,ne-E<=te&&te<=ne+E)return!0}else return!0;return!1},cs:function(a,y,x,b,E,te,ne,se,he,_e,Ee,Ne){if(Vt.Yb(a,y,ne,se,Ne,x,b)&&Vt.Yb(a,y,ne,se,Ne,E,te))return Vt.Yb(a,y,ne,se,Ne,_e,Ee);var He=(a+x)/2,Ye=(y+b)/2,Qe=(x+E)/2,st=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(He+Qe)/2,x=(Ye+st)/2,Qe=(Qe+E)/2,st=(st+te)/2;var Pt=(b+Qe)/2,St=(x+st)/2;return Vt.cs(a,y,He,Ye,b,x,Pt,St,he,_e,Ee,Ne)||Vt.cs(Pt,St,Qe,st,E,te,ne,se,he,_e,Ee,Ne)},ax:function(a,y,x,b,E,te,ne,se,he){var _e=(x+E)/2,Ee=(b+te)/2;return he.h((((a+x)/2+_e)/2+(_e+(E+ne)/2)/2)/2,(((y+b)/2+Ee)/2+(Ee+(te+se)/2)/2)/2),he},My:function(a,y,x,b,E,te,ne,se){var he=(x+E)/2,_e=(b+te)/2;return ni(((a+x)/2+he)/2,((y+b)/2+_e)/2,(he+(E+ne)/2)/2,(_e+(te+se)/2)/2)},Dl:function(a,y,x,b,E,te,ne,se,he,_e){if(Vt.Yb(a,y,ne,se,he,x,b)&&Vt.Yb(a,y,ne,se,he,E,te))br(_e,a,y,0,0),br(_e,ne,se,0,0);else{var Ee=(a+x)/2,Ne=(y+b)/2,He=(x+E)/2,Ye=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Ee+He)/2,x=(Ne+Ye)/2,He=(He+E)/2,Ye=(Ye+te)/2;var Qe=(b+He)/2,st=(x+Ye)/2;Vt.Dl(a,y,Ee,Ne,b,x,Qe,st,he,_e),Vt.Dl(Qe,st,He,Ye,E,te,ne,se,he,_e)}return _e},Qe:function(a,y,x,b,E,te,ne,se,he,_e){if(Vt.Yb(a,y,ne,se,he,x,b)&&Vt.Yb(a,y,ne,se,he,E,te))_e.length===0&&(_e.push(a),_e.push(y)),_e.push(ne),_e.push(se);else{var Ee=(a+x)/2,Ne=(y+b)/2,He=(x+E)/2,Ye=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Ee+He)/2,x=(Ne+Ye)/2,He=(He+E)/2,Ye=(Ye+te)/2;var Qe=(b+He)/2,st=(x+Ye)/2;Vt.Qe(a,y,Ee,Ne,b,x,Qe,st,he,_e),Vt.Qe(Qe,st,He,Ye,E,te,ne,se,he,_e)}return _e},jv:function(a,y,x,b,E,te,ne,se,he,_e){if(Vt.Yb(a,y,E,te,_e,x,b))return Vt.Yb(a,y,E,te,_e,se,he);var Ee=(a+x)/2,Ne=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var He=(Ee+x)/2,Ye=(Ne+b)/2;return Vt.jv(a,y,Ee,Ne,He,Ye,ne,se,he,_e)||Vt.jv(He,Ye,x,b,E,te,ne,se,he,_e)},OA:function(a,y,x,b,E,te,ne){return ne.h(((a+x)/2+(x+E)/2)/2,((y+b)/2+(b+te)/2)/2),ne},iv:function(a,y,x,b,E,te,ne,se){if(Vt.Yb(a,y,E,te,ne,x,b))br(se,a,y,0,0),br(se,E,te,0,0);else{var he=(a+x)/2,_e=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Ee=(he+x)/2,Ne=(_e+b)/2;Vt.iv(a,y,he,_e,Ee,Ne,ne,se),Vt.iv(Ee,Ne,x,b,E,te,ne,se)}return se},ep:function(a,y,x,b,E,te,ne,se){if(Vt.Yb(a,y,E,te,ne,x,b))se.length===0&&(se.push(a),se.push(y)),se.push(E),se.push(te);else{var he=(a+x)/2,_e=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Ee=(he+x)/2,Ne=(_e+b)/2;Vt.ep(a,y,he,_e,Ee,Ne,ne,se),Vt.ep(Ee,Ne,x,b,E,te,ne,se)}return se},Eo:function(a,y,x,b,E,te,ne,se,he,_e,Ee,Ne,He,Ye){if(Vt.Yb(a,y,ne,se,He,x,b)&&Vt.Yb(a,y,ne,se,He,E,te))return!Vt.Rl(a,y,ne,se,he,_e,Ee,Ne)||(He=(a-ne)*(_e-Ne)-(y-se)*(he-Ee),He===0)?!1:(Ye.h(((a*se-y*ne)*(he-Ee)-(a-ne)*(he*Ne-_e*Ee))/He,((a*se-y*ne)*(_e-Ne)-(y-se)*(he*Ne-_e*Ee))/He),!0);var Qe=(a+x)/2,st=(y+b)/2,Pt=(x+E)/2,St=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Qe+Pt)/2,x=(st+St)/2,Pt=(Pt+E)/2,St=(St+te)/2;var Tt=(b+Pt)/2,At=(x+St)/2,It=1/0,Wt=!1,tn=0,Kn=0;return Vt.Eo(a,y,Qe,st,b,x,Tt,At,he,_e,Ee,Ne,He,Ye)&&(a=(Ye.x-he)*(Ye.x-he)+(Ye.y-_e)*(Ye.y-_e),a<It&&(It=a,Wt=!0,tn=Ye.x,Kn=Ye.y)),Vt.Eo(Tt,At,Pt,St,E,te,ne,se,he,_e,Ee,Ne,He,Ye)&&(Ye.x-he)*(Ye.x-he)+(Ye.y-_e)*(Ye.y-_e)<It&&(Wt=!0,tn=Ye.x,Kn=Ye.y),Wt&&(Ye.x=tn,Ye.y=Kn),Wt},Fo:function(a,y,x,b,E,te,ne,se,he,_e,Ee,Ne,He){var Ye=0;if(Vt.Yb(a,y,ne,se,He,x,b)&&Vt.Yb(a,y,ne,se,He,E,te)){if(He=(a-ne)*(_e-Ne)-(y-se)*(he-Ee),He===0)return Ye;var Qe=((a*se-y*ne)*(he-Ee)-(a-ne)*(he*Ne-_e*Ee))/He,st=((a*se-y*ne)*(_e-Ne)-(y-se)*(he*Ne-_e*Ee))/He;if(Qe>=Ee)return Ye;if((he>Ee?he-Ee:Ee-he)<(_e>Ne?_e-Ne:Ne-_e)){if(y<se?(he=y,a=se):(he=se,a=y),st<he||st>a)return Ye}else if(a<ne?(he=a,a=ne):he=ne,Qe<he||Qe>a)return Ye;0<He?Ye++:0>He&&Ye--}else{Qe=(a+x)/2,st=(y+b)/2;var Pt=(x+E)/2,St=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Qe+Pt)/2,x=(st+St)/2,Pt=(Pt+E)/2,St=(St+te)/2;var Tt=(b+Pt)/2,At=(x+St)/2;Ye+=Vt.Fo(a,y,Qe,st,b,x,Tt,At,he,_e,Ee,Ne,He),Ye+=Vt.Fo(Tt,At,Pt,St,E,te,ne,se,he,_e,Ee,Ne,He)}return Ye},qh:function(a,y,x,b,E,te,ne){return Vt.$(a,x)?(y<b?(x=y,y=b):x=b,te<x?(ne.h(a,x),!1):te>y?(ne.h(a,y),!1):(ne.h(a,te),!0)):Vt.$(y,b)?(a<x?(b=a,a=x):b=x,E<b?(ne.h(b,y),!1):E>a?(ne.h(a,y),!1):(ne.h(E,y),!0)):(E=((a-E)*(a-x)+(y-te)*(y-b))/((x-a)*(x-a)+(b-y)*(b-y)),-5e-6>E?(ne.h(a,y),!1):1.000005<E?(ne.h(x,b),!1):(ne.h(a+E*(x-a),y+E*(b-y)),!0))},Ve:function(a,y,x,b,E,te,ne,se,he){return Vt.B(a,x)&&Vt.B(y,b)?(he.h(a,y),!1):Vt.$(E,ne)?Vt.$(a,x)?(Vt.qh(a,y,x,b,E,te,he),!1):Vt.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,he):(se=(se-te)/(ne-E),Vt.$(a,x)?(x=se*(a-E)+te,y<b?(E=y,y=b):E=b,x<E?(he.h(a,E),!1):x>y?(he.h(a,y),!1):(he.h(a,x),!0)):(ne=(b-y)/(x-a),Vt.$(se,ne)?(Vt.qh(a,y,x,b,E,te,he),!1):(E=(ne*a-se*E+te-y)/(ne-se),Vt.$(ne,0)?(a<x?(b=a,a=x):b=x,E<b?(he.h(b,y),!1):E>a?(he.h(a,y),!1):(he.h(E,y),!0)):Vt.qh(a,y,x,b,E,ne*(E-a)+y,he))))},MA:function(a,y,x,b,E){return Vt.Ve(x.x,x.y,b.x,b.y,a.x,a.y,y.x,y.y,E)},KA:function(a,y,x,b,E,te,ne,se,he,_e){function Ee(Pt,St){var Tt=(Pt-a)*(Pt-a)+(St-y)*(St-y);Tt<Ne&&(Ne=Tt,he.h(Pt,St))}var Ne=1/0;Ee(he.x,he.y);var He=0,Ye=0,Qe=0,st=0;if(E<ne?(He=E,Ye=ne):(He=ne,Ye=E),te<se?(Qe=E,st=ne):(Qe=ne,st=E),He=(Ye-He)/2+_e,_e=(st-Qe)/2+_e,E=(E+ne)/2,te=(te+se)/2,He===0||_e===0)return he;if(.5>(x>a?x-a:a-x)){if(He=1-(x-E)*(x-E)/(He*He),0>He)return he;He=Math.sqrt(He),b=-_e*He+te,Ee(x,_e*He+te),Ee(x,b)}else{if(x=(b-y)/(x-a),b=1/(He*He)+x*x/(_e*_e),se=2*x*(y-x*a)/(_e*_e)-2*x*te/(_e*_e)-2*E/(He*He),He=se*se-4*b*(2*x*a*te/(_e*_e)-2*y*te/(_e*_e)+te*te/(_e*_e)+E*E/(He*He)-1+(y-x*a)*(y-x*a)/(_e*_e)),0>He)return he;He=Math.sqrt(He),_e=(-se+He)/(2*b),Ee(_e,x*_e-x*a+y),He=(-se-He)/(2*b),Ee(He,x*He-x*a+y)}return he},Ff:function(a,y,x,b,E,te,ne,se,he){var _e=1e21,Ee=a,Ne=y;if(Vt.Ve(a,y,a,b,E,te,ne,se,he)){var He=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te);He<_e&&(_e=He,Ee=he.x,Ne=he.y)}return Vt.Ve(x,y,x,b,E,te,ne,se,he)&&(He=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),He<_e&&(_e=He,Ee=he.x,Ne=he.y)),Vt.Ve(a,y,x,y,E,te,ne,se,he)&&(y=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),y<_e&&(_e=y,Ee=he.x,Ne=he.y)),Vt.Ve(a,b,x,b,E,te,ne,se,he)&&(a=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),a<_e&&(_e=a,Ee=he.x,Ne=he.y)),he.h(Ee,Ne),1e21>_e},us:function(a,y,x){return Vt.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,b,E,te,ne,se){var he=a+x,_e=y+b;return E===ne?(te<se?(ne=te,te=se):ne=se,a<=E&&E<=he&&ne<=_e&&te>=y):te===se?(E<ne?(se=E,E=ne):se=ne,y<=te&&te<=_e&&se<=he&&E>=a):!!(qr(a,y,x,b,E,te)||qr(a,y,x,b,ne,se)||Vt.Rl(a,y,he,y,E,te,ne,se)||Vt.Rl(he,y,he,_e,E,te,ne,se)||Vt.Rl(he,_e,a,_e,E,te,ne,se)||Vt.Rl(a,_e,a,y,E,te,ne,se))},Rl:function(a,y,x,b,E,te,ne,se){return a===x&&y===b&&E===ne&&te===se?a===E&&y===te:0>=Vt.Fl(a,y,x,b,E,te)*Vt.Fl(a,y,x,b,ne,se)&&0>=Vt.Fl(E,te,ne,se,a,y)*Vt.Fl(E,te,ne,se,x,b)},Fl:function(a,y,x,b,E,te){return x-=a,b-=y,a=E-a,y=te-y,te=a*b-y*x,te===0&&(te=a*x+y*b,0<te&&(te=(a-x)*x+(y-b)*b,0>te&&(te=0))),te},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,b,E,te){var ne=Math.PI;te||(b*=ne/180,E*=ne/180);var se=b>E?-1:1;te=[];var he=ne/2,_e=b;if(b=Math.min(2*ne,Math.abs(E-b)),1e-5>b)return he=_e+se*Math.min(b,he),se=a+x*Math.cos(_e),_e=y+x*Math.sin(_e),a+=x*Math.cos(he),y+=x*Math.sin(he),x=(se+a)/2,he=(_e+y)/2,te.push([se,_e,x,he,x,he,a,y]),te;for(;1e-5<b;)E=_e+se*Math.min(b,he),te.push(Vt.Vy(x,_e,E,a,y)),b-=Math.abs(E-_e),_e=E;return te},Vy:function(a,y,x,b,E){var te=(x-y)/2,ne=a*Math.cos(te),se=a*Math.sin(te),he=-se,_e=ne*ne+he*he,Ee=_e+ne*ne+he*se;return _e=4/3*(Math.sqrt(2*_e*Ee)-Ee)/(ne*se-he*ne),se=ne-_e*he,ne=he+_e*ne,he=-ne,_e=te+y,te=Math.cos(_e),_e=Math.sin(_e),[b+a*Math.cos(y),E+a*Math.sin(y),b+se*te-ne*_e,E+se*_e+ne*te,b+se*te-he*_e,E+se*_e+he*te,b+a*Math.cos(x),E+a*Math.sin(x)]},No:function(a,y,x,b,E,te,ne){x=Math.floor((a-x)/E)*E+x,b=Math.floor((y-b)/te)*te+b;var se=x;return x+E-a<E/2&&(se=x+E),a=b,b+te-y<te/2&&(a=b+te),ne.h(se,a),ne},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var b;do y=x%a,x=b=a,a=y;while(0<y);return b},$y:function(a,y,x,b){var E=0>x,te=0>b;if(a<y)var ne=1,se=0;else ne=0,se=1;var he=ne===0?a:y,_e=ne===0?x:b;return(ne===0?E:te)&&(_e=-_e),ne=se,x=ne===0?x:b,(ne===0?E:te)&&(x=-x),Vt.az(he,ne===0?a:y,_e,x,0,0)},az:function(a,y,x,b,E,te){if(0<b)if(0<x){E=a*a,te=y*y,a*=x;var ne=y*b,se=-te+ne,he=-te+Math.sqrt(a*a+ne*ne);y=se;for(var _e=0;9999999999>_e&&(y=.5*(se+he),!(y===se||y===he));++_e){var Ee=a/(y+E),Ne=ne/(y+te);if(Ee=Ee*Ee+Ne*Ne-1,0<Ee)se=y;else if(0>Ee)he=y;else break}x=E*x/(y+E)-x,b=te*b/(y+te)-b,x=Math.sqrt(x*x+b*b)}else x=Math.abs(b-y);else b=a*a-y*y,te=a*x,te<b?(b=te/b,te=y*Math.sqrt(Math.abs(1-b*b)),x=a*b-x,x=Math.sqrt(x*x+te*te)):x=Math.abs(x-a);return x},Ze:new vi,um:new vi,Mf:new vi,Nf:0,vm:100};Vt.za=Vt.AA;function In(a){Di(this),this.l=2,a===void 0&&(a=In.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===In.o?this.ee=new Ln:(In.V===null&&(In.V=new Ln().freeze()),this.ee=In.V),this.aq=this.ee.Ja,this.Ip=new sn().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=xr,this.gg=eo,this.Rk=this.Sk=NaN,this.Uf=Tn}In.prototype.copy=function(){var a=new In;if(a.l=this.l&-2,a.na=this.na,a.od=this.od,a.pd=this.pd,a.Dc=this.Dc,a.Ec=this.Ec,this.na===In.o){for(var y=this.ee.s,x=a.ee,b=0;b<y.length;b++)x.add(y[b].copy());a.ee=x}else a.ee=this.ee;return a.aq=this.aq,a.Ip.assign(this.Ip),a.tk=this.tk,a.ym=this.ym,a.zm=this.zm,a.fg=this.fg.J(),a.gg=this.gg.J(),a.Sk=this.Sk,a.Rk=this.Rk,a.Uf=this.Uf,a},In.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},In.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==In.o)return this;var a=this.figures;a.freeze(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].freeze();return this},In.prototype.ka=function(){if(Object.isFrozen(this)&&Lt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==In.o)return this;var a=this.figures;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},In.prototype.Xa=function(a){if(!(a instanceof In))return!1;if(this.type!==a.type)return this.type===In.j&&a.type===In.o?pl(this,a):a.type===In.j&&this.type===In.o?pl(a,this):!1;if(this.type===In.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0}return Vt.B(this.startX,a.startX)&&Vt.B(this.startY,a.startY)&&Vt.B(this.endX,a.endX)&&Vt.B(this.endY,a.endY)};function pl(a,y){return a.type!==In.j||y.type!==In.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&Vt.B(a.startX,y.startX)&&Vt.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===to&&Vt.B(a.endX,y.endX)&&Vt.B(a.endY,y.endY))))}In.ia=function(a){return a.toString()},In.prototype.qb=function(a){a.classType===In&&(this.type=a)},In.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case In.j:return 0>a?"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 In.u:var y=new sn(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 In.F:if(y=new sn(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 In.o:y="",x=this.figures.s;for(var b=x.length,E=0;E<b;E++){var te=x[E];0<E&&(y+=" x "),te.isFilled&&(y+="F "),y+=te.toString(a)}return y;default:return this.type.toString()}},In.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",b=0;b<y;b++){var E=a[b];x=E.match(/[Ff]/)!==null?b===0?x+E:x+("X"+(E[0]===" "?"":" ")+E):x+((b===0?"":"X ")+"F"+(E[0]===" "?"":" ")+E)}return x},In.parse=function(a,y){function x(){return st>=It-1?!0:_e[st+1].match(Wt)!==null}function b(){return st++,_e[st]}function E(Zi){var Ri=parseFloat(b()),Ur=parseFloat(b());Pt===Pt.toLowerCase()&&(Ri=At.x+Ri,Ur=At.y+Ur),Zi.h(Ri,Ur)}function te(){return E(At),At}function ne(){return E(Tt),Tt}function se(){var Zi=St.toLowerCase();return Zi!=="c"&&Zi!=="s"&&Zi!=="q"&&Zi!=="t"?At:new ft(2*At.x-Tt.x,2*At.y-Tt.y)}y===void 0&&(y=!1);var he=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(he,"$1 $2"),a=a.replace(he,"$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 _e=a.split(" ");for(a=0;a<_e.length;a++){var Ee=_e[a];if(Ee.match(/(\.[0-9]*)(\.)/gm)!==null){he=Wn();for(var Ne="",He=!1,Ye=0;Ye<Ee.length;Ye++){var Qe=Ee[Ye];Qe!=="."||He?Qe==="."?(he.push(Ne),Ne="."):Ne+=Qe:(He=!0,Ne+=Qe)}for(he.push(Ne),_e.splice(a,1),Ee=0;Ee<he.length;Ee++)_e.splice(a+Ee,0,he[Ee]);a+=he.length-1,zn(he)}}var st=-1,Pt="",St="";he=new ft(0,0);var Tt=new ft(0,0),At=new ft(0,0),It=_e.length;a=A1(null),He=Ne=Ee=!1,Ye=!0,Qe=null;for(var Wt=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(st>=It-1);)if(St=Pt,Pt=b(),Pt!=="")switch(Pt.toUpperCase()){case"X":Ye=!0,Ne=Ee=!1;break;case"M":for(Qe=te(),a.mc===null||Ye===!0?(Wf(a,Qe.x,Qe.y,Ee,!Ne,He),Ye=!1):a.moveTo(Qe.x,Qe.y),he.assign(At);!x();)Qe=te(),a.lineTo(Qe.x,Qe.y);break;case"L":for(;!x();)Qe=te(),a.lineTo(Qe.x,Qe.y);break;case"H":for(;!x();)At=new ft((Pt===Pt.toLowerCase()?At.x:0)+parseFloat(b()),At.y),a.lineTo(At.x,At.y);break;case"V":for(;!x();)At=new ft(At.x,(Pt===Pt.toLowerCase()?At.y:0)+parseFloat(b())),a.lineTo(At.x,At.y);break;case"C":for(;!x();){Qe=new ft,E(Qe);var tn=ne(),Kn=te();$h(a,Qe.x,Qe.y,tn.x,tn.y,Kn.x,Kn.y)}break;case"S":for(;!x();)Qe=se(),tn=ne(),Kn=te(),$h(a,Qe.x,Qe.y,tn.x,tn.y,Kn.x,Kn.y);break;case"Q":for(;!x();)Qe=ne(),tn=te(),Um(a,Qe.x,Qe.y,tn.x,tn.y);break;case"T":for(;!x();)Tt=Qe=se(),tn=te(),Um(a,Qe.x,Qe.y,tn.x,tn.y);break;case"B":for(;!x();){Qe=parseFloat(b()),tn=parseFloat(b()),Kn=parseFloat(b());var hi=parseFloat(b()),ii=parseFloat(b()),Rn=ii,_n=!1;x()||(Rn=parseFloat(b()),x()||(_n=parseFloat(b())!==0)),Pt===Pt.toLowerCase()&&(Kn+=At.x,hi+=At.y),a.arcTo(Qe,tn,Kn,hi,ii,Rn,_n)}break;case"A":for(;!x();)Qe=Math.abs(parseFloat(b())),tn=Math.abs(parseFloat(b())),Kn=parseFloat(b()),ii=hi=!1,_n=Rn=0,Rn=b(),Rn.length===1?(hi=!!parseFloat(Rn),ii=!!parseFloat(b()),Rn=parseFloat(b())):Rn.length===2?(hi=!!parseFloat(Rn[0]),ii=!!parseFloat(Rn[1]),Rn=parseFloat(b())):(hi=!!parseFloat(Rn[0]),ii=!!parseFloat(Rn[1]),Rn=parseFloat(Rn.slice(2))),_n=parseFloat(b()),Pt===Pt.toLowerCase()&&(Rn=At.x+Rn,_n=At.y+_n),At.h(Rn,_n),bx(a,Qe,tn,Kn,hi,ii,Rn,_n);break;case"Z":_x(a),At.assign(he);break;case"F":for(Qe="",tn=1;_e[st+tn];)if(_e[st+tn]==="0")He=!0,tn++;else if(_e[st+tn].match(/[Uu]/)!==null)tn++;else if(_e[st+tn].match(Wt)===null)tn++;else{Qe=_e[st+tn];break}Qe.match(/[Mm]/)?Ee=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Qe="",tn=1;_e[st+tn];)if(_e[st+tn].match(/[Ff]/)!==null)tn++;else if(_e[st+tn].match(Wt)===null)tn++;else{Qe=_e[st+tn];break}Qe.match(/[Mm]/)?Ne=!0:a.mc.isShadowed=!1}if(he=a.os,Hm=a,y)for(y=he.figures.iterator;y.next();)y.value.isFilled=!0;return he},In.Ha=function(a,y){for(var x=a.length,b=ft.alloc(),E=0;E<x;E++){var te=a[E];b.x=te[0],b.y=te[1],y.Ga(b),te[0]=b.x,te[1]=b.y,b.x=te[2],b.y=te[3],y.Ga(b),te[2]=b.x,te[3]=b.y,b.x=te[4],b.y=te[5],y.Ga(b),te[4]=b.x,te[5]=b.y,b.x=te[6],b.y=te[7],y.Ga(b),te[6]=b.x,te[7]=b.y}ft.free(b)},In.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===In.o){if(this.aq!==this.figures.Ja)return!0;for(var a=this.figures.s,y=a.length,x=0;x<y;x++)if(a[x].Zu())return!0}return!1},In.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===In.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var b=a[x];b._isInvalidBounds=!1;var E=b.segments;b.sr=E.Ja,b=E.s,E=b.length;for(var te=0;te<E;te++){var ne=b[te];ne._isInvalidBounds=!1,ne.ae=null}}}a=this.Ip,a.ka(),isNaN(this.Sk)||isNaN(this.Rk)?a.h(0,0,0,0):a.h(0,0,this.Sk,this.Rk),Kl(this,a,!1),br(a,0,0,0,0),a.freeze()},In.prototype.ix=function(){var a=new sn;return Kl(this,a,!0),a};function Kl(a,y,x){switch(a.type){case In.j:case In.u:case In.F:x?y.h(a.od,a.pd,0,0):br(y,a.od,a.pd,0,0),br(y,a.Dc,a.Ec,0,0);break;case In.o:var b=a.figures;a=b.s,b=b.length;for(var E=0;E<b;E++){var te=a[E];x&&E===0?y.h(te.startX,te.startY,0,0):br(y,te.startX,te.startY,0,0);for(var ne=te.segments.s,se=ne.length,he=te.startX,_e=te.startY,Ee=0;Ee<se;Ee++){var Ne=ne[Ee];switch(Ne.type){case to:case gs:he=Ne.endX,_e=Ne.endY,br(y,he,_e,0,0);break;case bs:Vt.Dl(he,_e,Ne.point1X,Ne.point1Y,Ne.point2X,Ne.point2Y,Ne.endX,Ne.endY,.5,y),he=Ne.endX,_e=Ne.endY;break;case Da:Vt.iv(he,_e,Ne.point1X,Ne.point1Y,Ne.endX,Ne.endY,.5,y),he=Ne.endX,_e=Ne.endY;break;case Xo:case Ka:var He=Ne.type===Xo?va(Ne,te):Is(Ne,te,he,_e),Ye=He.length;if(Ye===0){he=Ne.type===Xo?Ne.centerX:Ne.endX,_e=Ne.type===Xo?Ne.centerY:Ne.endY,br(y,he,_e,0,0);break}Ne=null;for(var Qe=0;Qe<Ye;Qe++)Ne=He[Qe],Vt.Dl(Ne[0],Ne[1],Ne[2],Ne[3],Ne[4],Ne[5],Ne[6],Ne[7],.5,y);Ne!==null&&(he=Ne[6],_e=Ne[7]);break;default:Lt("Unknown Segment type: "+Ne.type)}}}break;default:Lt("Unknown Geometry type: "+a.type)}}In.prototype.normalize=function(){this._isFrozen&&Ht(this);var a=this.ix();return this.offset(-a.x,-a.y),new ft(-a.x,-a.y)},In.prototype.offset=function(a,y){return this._isFrozen&&Ht(this),this.transform(1,0,0,1,a,y),this},In.prototype.scale=function(a,y){return this._isFrozen&&Ht(this),this.transform(a,0,0,y,0,0),this},In.prototype.rotate=function(a,y,x){this._isFrozen&&Ht(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=Ii.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),Ii.free(b),this},$e=In.prototype,$e.transform=function(a,y,x,b,E,te){switch(this.type){case In.j:case In.u:case In.F:var ne=this.od,se=this.pd;this.od=ne*a+se*x+E,this.pd=ne*y+se*b+te,ne=this.Dc,se=this.Ec,this.Dc=ne*a+se*x+E,this.Ec=ne*y+se*b+te;break;case In.o:for(var he=this.figures.s,_e=he.length,Ee=0;Ee<_e;Ee++){var Ne=he[Ee];ne=Ne.startX,se=Ne.startY,Ne.startX=ne*a+se*x+E,Ne.startY=ne*y+se*b+te,Ne=Ne.segments.s;for(var He=Ne.length,Ye=0;Ye<He;Ye++){var Qe=Ne[Ye];switch(Qe.type){case to:case gs:ne=Qe.endX,se=Qe.endY,Qe.endX=ne*a+se*x+E,Qe.endY=ne*y+se*b+te;break;case bs:ne=Qe.point1X,se=Qe.point1Y,Qe.point1X=ne*a+se*x+E,Qe.point1Y=ne*y+se*b+te,ne=Qe.point2X,se=Qe.point2Y,Qe.point2X=ne*a+se*x+E,Qe.point2Y=ne*y+se*b+te,ne=Qe.endX,se=Qe.endY,Qe.endX=ne*a+se*x+E,Qe.endY=ne*y+se*b+te;break;case Da:ne=Qe.point1X,se=Qe.point1Y,Qe.point1X=ne*a+se*x+E,Qe.point1Y=ne*y+se*b+te,ne=Qe.endX,se=Qe.endY,Qe.endX=ne*a+se*x+E,Qe.endY=ne*y+se*b+te;break;case Xo:ne=Qe.centerX,se=Qe.centerY,Qe.centerX=ne*a+se*x+E,Qe.centerY=ne*y+se*b+te,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Qe.startAngle+=ne),0>a&&(Qe.startAngle=180-Qe.startAngle,Qe.sweepAngle=-Qe.sweepAngle),0>b&&(Qe.startAngle=-Qe.startAngle,Qe.sweepAngle=-Qe.sweepAngle),Qe.radiusX*=Math.sqrt(a*a+x*x),Qe.radiusY!==void 0&&(Qe.radiusY*=Math.sqrt(y*y+b*b));break;case Ka:if(ne=Qe.endX,se=Qe.endY,Qe.endX=ne*a+se*x+E,Qe.endY=ne*y+se*b+te,Qe.radiusX===0||Qe.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Qe.xAxisRotation+=ne),0>a&&(Qe.xAxisRotation=180-Qe.xAxisRotation,Qe.isClockwiseArc=!Qe.isClockwiseArc),0>b&&(Qe.xAxisRotation=-Qe.xAxisRotation,Qe.isClockwiseArc=!Qe.isClockwiseArc),Qe.radiusX*=Math.sqrt(a*a+x*x),Qe.radiusY*=Math.sqrt(y*y+b*b);break;default:Lt("Unknown Segment type: "+Qe.type)}}}}return this._isInvalidBounds=!0,this},$e.ca=function(a,y){y===void 0&&(y=0);var x=this.od,b=this.pd,E=this.Dc,te=this.Ec;switch(this.type){case In.j:return Vt.Yb(x,b,E,te,y,a.x,a.y);case In.u:var ne=sn.allocAt(Math.min(x,E)-y,Math.min(b,te)-y,Math.abs(E-x)+2*y,Math.abs(te-b)+2*y);return a=ne.ca(a),sn.free(ne),a;case In.F:ne=Math.min(x,E)-y;var se=Math.min(b,te)-y;return x=(Math.abs(E-x)+2*y)/2,y=(Math.abs(te-b)+2*y)/2,0>=x||0>=y?!1:(ne=a.x-(ne+x),se=a.y-(se+y),1>=ne*ne/(x*x)+se*se/(y*y));case In.o:return Ns(this,a,y,!0,!1);default:return!1}};function Ns(a,y,x,b,E){var te=y.x;y=y.y;for(var ne=a.bounds.x-20,se=0,he,_e,Ee,Ne,He=a.figures.s,Ye=He.length,Qe=0;Qe<Ye;Qe++){var st=He[Qe],Pt=!st.isEvenOdd;if(st.isFilled){if(b&&st.ca(te,y,x))return!0;var St=st.segments;he=st.startX,_e=st.startY;for(var Tt=he,At=_e,It=St.s,Wt=0;Wt<=St.length;Wt++){var tn=void 0;if(Wt!==St.length){tn=It[Wt];var Kn=tn.type;a=tn.endX,Ne=tn.endY}else Kn=to,a=Tt,Ne=At;switch(Kn){case gs:if(Tt=sa(te,y,ne,y,he,_e,Tt,At),isNaN(Tt))return!0;se+=Tt,Tt=a,At=Ne;break;case to:if(he=sa(te,y,ne,y,he,_e,a,Ne),isNaN(he))return!0;se+=he;break;case bs:Ee=Vt.Fo(he,_e,tn.point1X,tn.point1Y,tn.point2X,tn.point2Y,a,Ne,ne,y,te,y,.5),se+=Ee;break;case Da:Ee=Vt.Fo(he,_e,(he+2*tn.point1X)/3,(_e+2*tn.point1Y)/3,(2*tn.point1X+a)/3,(2*tn.point1Y+Ne)/3,a,Ne,ne,y,te,y,.5),se+=Ee;break;case Xo:case Ka:Kn=tn.type===Xo?va(tn,st):Is(tn,st,he,_e);var hi=Kn.length;if(hi===0){if(he=sa(te,y,ne,y,he,_e,tn.type===Xo?tn.centerX:tn.endX,tn.type===Xo?tn.centerY:tn.endY),isNaN(he))return!0;se+=he;break}tn=null;for(var ii=0;ii<hi;ii++){if(tn=Kn[ii],ii===0){if(Ee=sa(te,y,ne,y,he,_e,tn[0],tn[1]),isNaN(Ee))return!0;se+=Ee}Ee=Vt.Fo(tn[0],tn[1],tn[2],tn[3],tn[4],tn[5],tn[6],tn[7],ne,y,te,y,.5),se+=Ee}tn!==null&&(a=tn[6],Ne=tn[7]);break;default:Lt("Unknown Segment type: "+tn.type)}he=a,_e=Ne}if(Pt){if(se!==0)return!0}else if(se%2!==0)return!0;se=0}else if(st.ca(te,y,E?x:x+2))return!0}return!1}function sa(a,y,x,b,E,te,ne,se){if(Vt.Yb(E,te,ne,se,.05,a,y))return NaN;var he=(a-x)*(te-se);if(he===0)return 0;var _e=((a*b-y*x)*(E-ne)-(a-x)*(E*se-te*ne))/he;if(y=(a*b-y*x)*(te-se)/he,_e>=a)return 0;if((E>ne?E-ne:ne-E)<(te>se?te-se:se-te)){if(te<se){if(y<te||y>se)return 0}else if(y<se||y>te)return 0}else if(E<ne){if(_e<E||_e>ne)return 0}else if(_e<ne||_e>E)return 0;return 0<he?1:-1}function rl(a,y,x,b){a=a.figures.s;for(var E=a.length,te=0;te<E;te++)if(a[te].ca(y,x,b))return!0;return!1}$e.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new ft),this.type===In.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,b=this.flattenedLengths,E=x.length,te=this.flattenedTotalLength*a,ne=0,se=0;se<E;se++){var he=b[se],_e=he.length;for(a=0;a<_e;a++){var Ee=he[a];if(ne+Ee>=te)return b=te-ne,b=Ee===0?0:b/Ee,x=x[se],se=x[2*a],E=x[2*a+1],y.h(se+(x[2*a+2]-se)*b,E+(x[2*a+3]-E)*b),y;ne+=Ee}}return y},$e.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===In.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,b=y.length,E=this.flattenedTotalLength*a,te=0,ne=0;ne<b;ne++){var se=x[ne],he=se.length;for(a=0;a<he;a++){var _e=se[a];if(te+_e>=E)return E=y[ne],y=E[2*a],x=E[2*a+1],b=E[2*a+2],a=E[2*a+3],1>Math.abs(b-y)&&1>Math.abs(a-x)?0:1>Math.abs(b-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=b-y?0:180:180*Math.atan2(a-x,b-y)/Math.PI;te+=_e}}return NaN},$e.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===In.j)return y[0]=this.startX+a*(this.endX-this.startX),y[1]=this.startY+a*(this.endY-this.startY),y[2]=180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI,y;for(var x=this.flattenedSegments,b=this.flattenedLengths,E=x.length,te=this.flattenedTotalLength*a,ne=0,se=0;se<E;se++){var he=b[se],_e=he.length;for(a=0;a<_e;a++){var Ee=he[a];if(ne+Ee>=te)return b=te-ne,b=Ee===0?0:b/Ee,Ee=x[se],x=Ee[2*a],se=Ee[2*a+1],E=Ee[2*a+2],a=Ee[2*a+3],y[0]=x+(E-x)*b,y[1]=se+(a-se)*b,y[2]=1>Math.abs(E-x)&&1>Math.abs(a-se)?0:1>Math.abs(E-x)?0<=a-se?90:270:1>Math.abs(a-se)?0<=E-x?0:180:180*Math.atan2(a-se,E-x)/Math.PI,y;ne+=Ee}}return y},$e.xx=function(a){if(this.type===In.j){var y=this.startX,x=this.startY,b=this.endX,E=this.endY;if(y!==b||x!==E){var te=a.x;if(a=a.y,y===b){if(x<E){var ne=x;b=E}else ne=E,b=x;return a<=ne?ne===x?0:1:a>=b?b===x?0:1:Math.abs(a-x)/(b-ne)}if(x===E)return y<b?ne=y:(ne=b,b=y),te<=ne?ne===y?0:1:te>=b?b===y?0:1:Math.abs(te-y)/(b-ne);ne=(b-y)*(b-y)+(E-x)*(E-x);var se=ft.alloc();return Vt.qh(y,x,b,E,te,a,se),a=se.x,te=se.y,ft.free(se),Math.sqrt(((a-y)*(a-y)+(te-x)*(te-x))/ne)}}else if(this.type===In.u){ne=this.startX,se=this.startY;var he=this.endX;if(E=this.endY,ne!==he||se!==E){y=he-ne,x=E-se,te=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,ne),he),a=Math.min(Math.max(a,se),E),ne=Math.abs(b-ne),he=Math.abs(b-he),se=Math.abs(a-se),E=Math.abs(a-E);var _e=Math.min(ne,he,se,E);if(_e===se)return b/te;if(_e===he)return(y+a)/te;if(_e===E)return(2*y+x-b)/te;if(_e===ne)return(2*y+2*x-a)/te}}else{y=this.flattenedSegments,x=this.flattenedLengths,te=this.flattenedTotalLength,b=ft.alloc(),E=1/0,se=ne=0,he=y.length;for(var Ee=_e=0,Ne=0;Ne<he;Ne++)for(var He=y[Ne],Ye=x[Ne],Qe=He.length,st=0;st<Qe;st+=2){var Pt=He[st],St=He[st+1];if(st!==0){Vt.qh(_e,Ee,Pt,St,a.x,a.y,b);var Tt=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);Tt<E&&(E=Tt,ne=se,ne+=Math.sqrt((b.x-_e)*(b.x-_e)+(b.y-Ee)*(b.y-Ee))),se+=Ye[(st-2)/2]}_e=Pt,Ee=St}return ft.free(b),a=ne/te,0>a?0:1<a?1:a}return 0};function bl(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===In.j)b.push(a.startX),b.push(a.startY),b.push(a.endX),b.push(a.endY),y.push(b),E.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(E);else if(a.type===In.u)b.push(a.startX),b.push(a.startY),b.push(a.endX),b.push(a.startY),b.push(a.endX),b.push(a.endY),b.push(a.startX),b.push(a.endY),b.push(a.startX),b.push(a.startY),y.push(b),E.push(Math.abs(a.startX-a.endX)),E.push(Math.abs(a.startY-a.endY)),E.push(Math.abs(a.startX-a.endX)),E.push(Math.abs(a.startY-a.endY)),x.push(E);else if(a.type===In.F){var te=new ps;te.startX=a.endX,te.startY=(a.startY+a.endY)/2;var ne=new Rr(Xo);if(ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(a.startX+a.endX)/2,ne.centerY=(a.startY+a.endY)/2,ne.radiusX=Math.abs(a.startX-a.endX)/2,ne.radiusY=Math.abs(a.startY-a.endY)/2,te.add(ne),a=va(ne,te),E=a.length,E===0)b.push(ne.centerX),b.push(ne.centerY);else{ne=te.startX,te=te.startY;for(var se=0;se<E;se++){var he=a[se];Vt.Qe(ne,te,he[2],he[3],he[4],he[5],he[6],he[7],.5,b),ne=he[6],te=he[7]}}y.push(b),x.push(Cu(b))}else for(a=a.figures.iterator;a.next();){E=a.value,b=[],b.push(E.startX),b.push(E.startY),ne=E.startX,te=E.startY,se=ne,he=te;for(var _e=E.segments.s,Ee=_e.length,Ne=0;Ne<Ee;Ne++){var He=_e[Ne];switch(He.type){case gs:4<=b.length&&(y.push(b),x.push(Cu(b))),b=[],b.push(He.endX),b.push(He.endY),ne=He.endX,te=He.endY,se=ne,he=te;break;case to:b.push(He.endX),b.push(He.endY),ne=He.endX,te=He.endY;break;case bs:Vt.Qe(ne,te,He.point1X,He.point1Y,He.point2X,He.point2Y,He.endX,He.endY,.5,b),ne=He.endX,te=He.endY;break;case Da:Vt.ep(ne,te,He.point1X,He.point1Y,He.endX,He.endY,.5,b),ne=He.endX,te=He.endY;break;case Xo:var Ye=va(He,E),Qe=Ye.length;if(Qe===0){b.push(He.centerX),b.push(He.centerY),ne=He.centerX,te=He.centerY;break}for(var st=0;st<Qe;st++){var Pt=Ye[st];Vt.Qe(ne,te,Pt[2],Pt[3],Pt[4],Pt[5],Pt[6],Pt[7],.5,b),ne=Pt[6],te=Pt[7]}break;case Ka:if(Ye=Is(He,E,ne,te),Qe=Ye.length,st=He.endX,Pt=He.endY,Qe===0){b.push(st),b.push(Pt),ne=st,te=Pt;break}for(st=0;st<Qe;st++)Pt=Ye[st],Vt.Qe(ne,te,Pt[2],Pt[3],Pt[4],Pt[5],Pt[6],Pt[7],.5,b),ne=Pt[6],te=Pt[7];break;default:Lt("Segment not of valid type: "+He.type)}He.isClosed&&(b.push(se),b.push(he))}4<=b.length&&(y.push(b),x.push(Cu(b)))}}}function Cu(a){for(var y=[],x=0,b=0,E=a.length,te=0;te<E;te+=2){var ne=a[te],se=a[te+1];te!==0&&y.push(Math.sqrt(Vn(x,b,ne,se))),x=ne,b=se}return y}$e.add=function(a){return this.ee.add(a),this},$e.pm=function(a,y,x,b,E,te,ne,se){return this._isFrozen&&Ht(this),this.fg=new ui(a,y,E,te).freeze(),this.gg=new ui(x,b,ne,se).freeze(),this},ot.Object.defineProperties(In.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}},flattenedSegments:{get:function(){return bl(this),this.tk}},flattenedLengths:{get:function(){return bl(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===In.j){a=Math.abs(this.endX-this.startX);var y=Math.abs(this.endY-this.startY);a=Math.sqrt(a*a+y*y)}else if(this.type===In.u)a=2*Math.abs(this.endX-this.startX)+2*Math.abs(this.endY-this.startY);else{y=this.flattenedLengths;for(var x=y.length,b=a=0;b<x;b++)for(var E=y[b],te=E.length,ne=0;ne<te;ne++)a+=E[ne]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&Ht(this,a),this.na=a,a===In.o?this.ee=new Ln:(In.V===null&&(In.V=new Ln().freeze()),this.ee=In.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&Ht(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&Ht(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&Ht(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&Ht(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&Ht(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&Ht(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&Ht(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&Ht(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),In.prototype.setSpots=In.prototype.pm,In.prototype.add=In.prototype.add,In.prototype.getFractionForPoint=In.prototype.xx,In.prototype.getPointAndAngleAlongPath=In.prototype.Qu,In.prototype.getAngleAlongPath=In.prototype.wx,In.prototype.getPointAlongPath=In.prototype.Pu,In.prototype.containsPoint=In.prototype.ca,In.prototype.transform=In.prototype.transform,In.prototype.rotate=In.prototype.rotate,In.prototype.scale=In.prototype.scale,In.prototype.offset=In.prototype.offset,In.prototype.normalize=In.prototype.normalize,In.prototype.computeBoundsWithoutOrigin=In.prototype.ix,In.prototype.equalsApprox=In.prototype.Xa,In.className="Geometry",In.j=new nn(In,"Line",0),In.u=new nn(In,"Rectangle",1),In.F=new nn(In,"Ellipse",2),In.o=new nn(In,"Path",3),In.V=null,In.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",In.className="Geometry",In.stringify=In.ia,In.fillPath=In.nb,In.parse=In.parse,In.Line=In.j,In.Rectangle=In.u,In.Ellipse=In.F,In.Path=In.o;function ps(a,y,x,b,E){Di(this),x===void 0&&(x=!0),b===void 0&&(b=!0),E===void 0&&(E=!1),this.l=2|(x?4:0)|(b?8:0)|(E?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new Ln,this.sr=this.pl.Ja,this.fw=null}ps.prototype.copy=function(){var a=new ps;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,b=a.pl,E=0;E<x;E++){var te=y[E].copy();b.add(te)}return a.sr=this.sr,a.fw=this.fw,a},$e=ps.prototype,$e.Xa=function(a){if(!(a instanceof ps&&Vt.B(this.startX,a.startX)&&Vt.B(this.startY,a.startY)))return!1;var y=this.segments.s;a=a.segments.s;var x=y.length;if(x!==a.length)return!1;for(var b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0},$e.toString=function(a){a===void 0&&(a=-1);for(var y=0>a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a),x=this.segments.s,b=x.length,E=0;E<b;E++)y+=" "+x[E].toString(a);return y},$e.freeze=function(){this._isFrozen=!0;var a=this.segments;a.freeze();var y=a.s;a=a.length;for(var x=0;x<a;x++)y[x].freeze();return this},$e.ka=function(){this._isFrozen=!1;var a=this.segments;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},$e.Zu=function(){if(this._isInvalidBounds)return!0;var a=this.segments;if(this.sr!==a.Ja)return!0;a=a.s;for(var y=a.length,x=0;x<y;x++)if(a[x]._isInvalidBounds)return!0;return!1},$e.add=function(a){return this.pl.add(a),this},$e.ca=function(a,y,x){for(var b=this.startX,E=this.startY,te=b,ne=E,se=this.segments.s,he=se.length,_e=0;_e<he;_e++){var Ee=se[_e];switch(Ee.type){case gs:te=Ee.endX,ne=Ee.endY,b=Ee.endX,E=Ee.endY;break;case to:if(Vt.Yb(b,E,Ee.endX,Ee.endY,x,a,y))return!0;b=Ee.endX,E=Ee.endY;break;case bs:if(Vt.cs(b,E,Ee.point1X,Ee.point1Y,Ee.point2X,Ee.point2Y,Ee.endX,Ee.endY,.5,a,y,x))return!0;b=Ee.endX,E=Ee.endY;break;case Da:if(Vt.jv(b,E,Ee.point1X,Ee.point1Y,Ee.endX,Ee.endY,.5,a,y,x))return!0;b=Ee.endX,E=Ee.endY;break;case Xo:case Ka:var Ne=Ee.type===Xo?va(Ee,this):Is(Ee,this,b,E),He=Ne.length,Ye=Ee.type===Xo?Ee.centerX:Ee.endX,Qe=Ee.type===Xo?Ee.centerY:Ee.endY;if(He===0){if(Vt.Yb(b,E,Ye,Qe,x,a,y))return!0;b=Ye,E=Qe;break}for(Ye=null,Qe=0;Qe<He;Qe++)if(Ye=Ne[Qe],Qe===0&&Vt.Yb(b,E,Ye[0],Ye[1],x,a,y)||Vt.cs(Ye[0],Ye[1],Ye[2],Ye[3],Ye[4],Ye[5],Ye[6],Ye[7],.5,a,y,x))return!0;Ye!==null&&(b=Ye[6],E=Ye[7]);break;default:Lt("Unknown Segment type: "+Ee.type)}if(Ee.isClosed&&(b!==te||E!==ne)&&Vt.Yb(b,E,te,ne,x,a,y))return!0}return!1},ot.Object.defineProperties(ps.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}},isFilled:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&Ht(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&Ht(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Ht(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&Ht(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&Ht(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&Ht(this,a),this.pl=a,this._isInvalidBounds=!0}}}),ps.prototype.add=ps.prototype.add,ps.prototype.equalsApprox=ps.prototype.Xa,ps.className="PathFigure";function Rr(a,y,x,b,E,te,ne,se){Di(this),a===void 0&&(a=to),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,b===void 0&&(b=0),E===void 0&&(E=0),te===void 0&&(te=0),ne===void 0&&(ne=0),a===Ka?(a=te%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(b,0),this.Pg=Math.max(E,0),typeof ne=="boolean"?ne&&(this.isLargeArc=!0):typeof ne=="number"&&ne&&(this.isLargeArc=!0),se&&(this.isClockwiseArc=!0)):(this.Ne=b,this.Vh=E,a===Xo&&(te=Math.max(te,0)),this.Wh=te,typeof ne=="number"?(a===Xo&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}Rr.prototype.copy=function(){var a=new Rr;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},$e=Rr.prototype,$e.Xa=function(a){if(!(a instanceof Rr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case gs:case to:return Vt.B(this.endX,a.endX)&&Vt.B(this.endY,a.endY);case bs:return Vt.B(this.endX,a.endX)&&Vt.B(this.endY,a.endY)&&Vt.B(this.point1X,a.point1X)&&Vt.B(this.point1Y,a.point1Y)&&Vt.B(this.point2X,a.point2X)&&Vt.B(this.point2Y,a.point2Y);case Da:return Vt.B(this.endX,a.endX)&&Vt.B(this.endY,a.endY)&&Vt.B(this.point1X,a.point1X)&&Vt.B(this.point1Y,a.point1Y);case Xo:return Vt.B(this.startAngle,a.startAngle)&&Vt.B(this.sweepAngle,a.sweepAngle)&&Vt.B(this.centerX,a.centerX)&&Vt.B(this.centerY,a.centerY)&&Vt.B(this.radiusX,a.radiusX)&&Vt.B(this.radiusY,a.radiusY);case Ka:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Vt.B(this.xAxisRotation,a.xAxisRotation)&&Vt.B(this.endX,a.endX)&&Vt.B(this.endY,a.endY)&&Vt.B(this.radiusX,a.radiusX)&&Vt.B(this.radiusY,a.radiusY);default:return!1}},$e.qb=function(a){a.classType===Rr&&(this.type=a)},$e.toString=function(a){switch(a===void 0&&(a=-1),this.type){case gs:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case to:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case bs: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 Da: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 Xo: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 Ka: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":"")},$e.freeze=function(){return this._isFrozen=!0,this},$e.ka=function(){return this._isFrozen=!1,this},$e.close=function(){return this.isClosed=!0,this};function va(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,b=a.radiusY;if(b===void 0&&(b=x),x===0||b===0)return a.ae=[],a.ae;y=a.Ne;var E=a.Vh,te=Vt.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var ne=Ii.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),In.Ha(te,ne),Ii.free(ne)}for(x=te.length,b=0;b<x;b++)ne=te[b],ne[0]+=y,ne[1]+=E,ne[2]+=y,ne[3]+=E,ne[4]+=y,ne[5]+=E,ne[6]+=y,ne[7]+=E;return a.ae=te,a.ae}function Is(a,y,x,b){function E(st,Pt,St,Tt){return(st*Tt<Pt*St?-1:1)*Math.acos((st*St+Pt*Tt)/(Math.sqrt(st*st+Pt*Pt)*Math.sqrt(St*St+Tt*Tt)))}if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;if(a.radiusX===0||a.radiusY===0)return a.ae=[],a.ae;y=a.Wh;var te=a.Pg;y===0&&(y=1e-4),te===0&&(te=1e-4);var ne=Math.PI/180*a.Ne,se=a.isLargeArc,he=a.isClockwiseArc,_e=a.Dc,Ee=a.Ec,Ne=Math.cos(ne),He=Math.sin(ne),Ye=Ne*(x-_e)/2+He*(b-Ee)/2;ne=-He*(x-_e)/2+Ne*(b-Ee)/2;var Qe=Ye*Ye/(y*y)+ne*ne/(te*te);return 1<Qe&&(y*=Math.sqrt(Qe),te*=Math.sqrt(Qe)),Qe=(se===he?-1:1)*Math.sqrt((y*y*te*te-y*y*ne*ne-te*te*Ye*Ye)/(y*y*ne*ne+te*te*Ye*Ye)),isNaN(Qe)&&(Qe=0),se=Qe*y*ne/te,Qe=Qe*-te*Ye/y,isNaN(se)&&(se=0),isNaN(Qe)&&(Qe=0),x=(x+_e)/2+Ne*se-He*Qe,b=(b+Ee)/2+He*se+Ne*Qe,Ee=E(1,0,(Ye-se)/y,(ne-Qe)/te),Ne=(Ye-se)/y,_e=(ne-Qe)/te,Ye=(-Ye-se)/y,se=(-ne-Qe)/te,ne=E(Ne,_e,Ye,se),Ye=(Ne*Ye+_e*se)/(Math.sqrt(Ne*Ne+_e*_e)*Math.sqrt(Ye*Ye+se*se)),-1>=Ye?ne=Math.PI:1<=Ye&&(ne=0),!he&&0<ne&&(ne-=2*Math.PI),he&&0>ne&&(ne+=2*Math.PI),he=y>te?1:y/te,Ye=y>te?te/y:1,y=Vt.jx(0,0,y>te?y:te,Ee,Ee+ne,!0),te=Ii.alloc(),te.reset(),te.translate(x,b),te.rotate(a.Ne,0,0),te.scale(he,Ye),In.Ha(y,te),Ii.free(te),a.ae=y,a.ae}ot.Object.defineProperties(Rr.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&&Ht(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Ht(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Ht(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Ht(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Ht(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&Ht(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&Ht(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Ht(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Ht(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Pn(a,">= zero",Rr,"radiusX"),this._isFrozen&&Ht(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Pn(a,">= zero",Rr,"radiusY"),this._isFrozen&&Ht(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Ht(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&&Ht(this,a),360<a&&(a=360),-360>a&&(a=-360),this.Ec=a,this._isInvalidBounds=!0}},isClockwiseArc:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&Ht(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&&Ht(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&&Ht(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Rr.prototype.equalsApprox=Rr.prototype.Xa;var gs=new nn(Rr,"Move",0),to=new nn(Rr,"Line",1),bs=new nn(Rr,"Bezier",2),Da=new nn(Rr,"QuadraticBezier",3),Xo=new nn(Rr,"Arc",4),Ka=new nn(Rr,"SvgArc",4);Rr.className="PathSegment",Rr.Move=gs,Rr.Line=to,Rr.Bezier=bs,Rr.QuadraticBezier=Da,Rr.Arc=Xo,Rr.SvgArc=Ka;function ea(){this.H=null,this.xu=new ft(0,0).freeze(),this.mt=new ft(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}ea.prototype.copy=function(){var a=new ea;return this.clone(a)},ea.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},ea.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},ea.prototype.So=function(a,y){var x=this.diagram;return x===null||Ap(x,a,y),y},ea.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Ap(x,a,y),y.assign(x.Ps(y))),y},ot.Object.defineProperties(ea.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}}}),ea.prototype.getMultiTouchDocumentPoint=ea.prototype.Bz,ea.prototype.getMultiTouchViewPoint=ea.prototype.So,ea.className="InputEvent";function Eu(){this.H=null,this.xa="",this.ar=this.Lr=null}Eu.prototype.copy=function(){var a=new Eu;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Eu.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},ot.Object.defineProperties(Eu.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}}}),Eu.className="DiagramEvent";function Io(){this.Fm=Ro,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Io.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Io.prototype.copy=function(){var a=new Io;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=Kt(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=Kt(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=Kt(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=Kt(y)&&typeof y.J=="function"?y.J():y,a},Io.prototype.qb=function(a){a.classType===Io&&(this.change=a)},Io.prototype.toString=function(){var a="";return a=this.change===ha?a+"* ":this.change===Ro?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===ha?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=wi(this.object)),this.oldValue!==null&&(a+=" old: "+wi(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+wi(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Io.prototype.I=function(a){return a?this.oldValue:this.newValue},Io.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Io.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Io.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Io.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Io.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},ot.Object.defineProperties(Io.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===ha&&(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}}}),Io.prototype.redo=Io.prototype.redo,Io.prototype.canRedo=Io.prototype.canRedo,Io.prototype.undo=Io.prototype.undo,Io.prototype.canUndo=Io.prototype.canUndo,Io.prototype.getParam=Io.prototype.Dz,Io.prototype.getValue=Io.prototype.I,Io.prototype.clear=Io.prototype.clear;var ha=new nn(Io,"Transaction",-1),Ro=new nn(Io,"Property",0),es=new nn(Io,"Insert",1),Jo=new nn(Io,"Remove",2);Io.className="ChangedEvent",Io.Transaction=ha,Io.Property=Ro,Io.Insert=es,Io.Remove=Jo;function cs(){this.o=new Ln().freeze(),this.xa="",this.j=!1}cs.prototype.toString=function(a){var y="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(a!==void 0&&0<a){a=this.changes.count;for(var x=0;x<a;x++){var b=this.changes.M(x);b!==null&&(y+=`
|
|
|
`+b.toString())}}return y},cs.prototype.clear=function(){var a=this.changes;a.ka();for(var y=a.count-1;0<=y;y--){var x=a.M(y);x!==null&&x.clear()}a.clear(),a.freeze()},cs.prototype.canUndo=function(){return this.isComplete},cs.prototype.undo=function(){if(this.canUndo())for(var a=this.changes.count-1;0<=a;a--){var y=this.changes.M(a);y!==null&&y.undo()}},cs.prototype.canRedo=function(){return this.isComplete},cs.prototype.redo=function(){if(this.canRedo())for(var a=this.changes.count,y=0;y<a;y++){var x=this.changes.M(y);x!==null&&x.redo()}},cs.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new on,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===Ro&&b.object){var E=y.get(b.object);E||(E=new on,y.set(b.object,E));var te=E.get(b.propertyName);te===null?E.set(b.propertyName,-1):(0<te&&a.cd(te,null),E.set(b.propertyName,x))}}for(x=y=0;x<a.count;x++)b=a.M(x),b!==null&&(x>y&&a.cd(y,b),y++);for(;a.length>y;)a.pop();a.freeze()}},ot.Object.defineProperties(cs.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}}}),cs.prototype.optimize=cs.prototype.ak,cs.prototype.redo=cs.prototype.redo,cs.prototype.canRedo=cs.prototype.canRedo,cs.prototype.undo=cs.prototype.undo,cs.prototype.canUndo=cs.prototype.canUndo,cs.prototype.clear=cs.prototype.clear,cs.className="Transaction";function No(){this.Pt=new kn,this.Jd=!1,this.u=new Ln().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Ln().freeze(),this.hl=new Ln,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}No.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,b=0;b<x;b++)0<b&&(y+=" "),y+=this.nestedTransactionNames.M(b);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,b=0;b<x;b++)y+=`
|
|
|
`+this.history.M(b).toString(a-1);return y},No.prototype.clear=function(){var a=this.history;a.ka();for(var y=a.count-1;0<=y;y--){var x=a.M(y);x!==null&&x.clear()}a.clear(),this.Ce=-1,a.freeze(),this.Fe=!1,this.Np=null,this.bi=0,this.Ie.ka(),this.Ie.clear(),this.Ie.freeze(),this.hl.clear(),this.Dt=this.rq=this.Gt=this.Ft=!1},No.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},$e=No.prototype,$e.Xw=function(a){this.Pt.add(a)},$e.Rx=function(a){this.Pt.remove(a)},$e.Ea=function(a){if(a===void 0&&(a=""),a===null&&(a=""),this.isUndoingRedoing)return!1;this.tt===!0&&(this.tt=!1,this.bi++,this.isInternalTransaction||this.Ob("StartingFirstTransaction",a,this.currentTransaction),0<this.bi&&this.bi--),this.isEnabled&&(this.Ie.ka(),this.Ie.add(a),this.Ie.freeze(),this.currentTransaction===null?this.hl.add(0):this.hl.add(this.currentTransaction.changes.count)),this.bi++;var y=this.transactionLevel===1;return y&&(this.isInternalTransaction||this.Ob("StartedTransaction",a,this.currentTransaction)),y},$e.eb=function(a){return a===void 0&&(a=""),nh(this,!0,a)},$e.Kf=function(){return nh(this,!1,"")};function nh(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Sn("Ending transaction without having started a transaction: "+x);var b=a.transactionLevel===1,E=a.currentTransaction;b&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,E));var te=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var ne=a.Ie.count;0<ne&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(ne-1),a.Ie.freeze()),ne=a.hl.count,0<ne&&(te=a.hl.M(ne-1),a.hl.mb(ne-1))}if(b){if(y)a.rq=!1,E===null&&x!==""&&(E=a.currentTransaction),a.isEnabled&&E!==null&&(E.isComplete||(E.isComplete=!0,E.name=x),a.lx(),y=a.history,y.ka(),b=a.maxHistoryLength,0<=b&&(b===0?y.clear():y.count>=b&&(te=y.M(0),te!==null&&te.clear(),y.mb(0),a.Ce--)),b===0||y.count!==0&&y.get(y.count-1)===E||(y.add(E),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,E);else{a.Fe=!0;try{a.isEnabled&&E!==null&&(E.isComplete=!0,E.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,E),a.Fe=!1}E!==null&&E.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&E!==null){for(a=te,x=E.changes,E=x.count-1;E>=a;E--)y=x.M(E),y!==null&&y.undo(),x.ka(),x.mb(E);x.freeze()}return!1}$e.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()}},No.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},No.prototype.undo=function(){if(this.canUndo()){var a=this.transactionToUndo;try{this.Fe=!0,this.Ob("StartingUndo","Undo",a),this.Ce--,a.undo()}catch(y){Sn("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},No.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},No.prototype.redo=function(){if(this.canRedo()){var a=this.transactionToRedo;try{this.Fe=!0,this.Ob("StartingRedo","Redo",a),this.Ce++,a.redo()}catch(y){Sn("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},No.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new Io;for(b.change=ha,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},No.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new cs);var x=a.copy();y=y.changes,y.ka(),y.add(x),y.freeze(),this.checksTransactionLevel&&0>=this.transactionLevel&&!this.tt&&(a=a.diagram,a!==null&&a.pi===!1||Sn("Change not within a transaction: "+x.toString()))}},No.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},ot.Object.defineProperties(No.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.historyIndex<this.history.count-1?this.history.M(this.historyIndex+1):null}},isUndoingRedoing:{get:function(){return this.Fe}},history:{get:function(){return this.u}},maxHistoryLength:{get:function(){return this.o},set:function(a){this.o=a}},historyIndex:{get:function(){return this.Ce}},currentTransaction:{get:function(){return this.Np}},transactionLevel:{get:function(){return this.bi}},isInTransaction:{get:function(){return 0<this.bi}},checksTransactionLevel:{get:function(){return this.j},set:function(a){this.j=a}},nestedTransactionNames:{get:function(){return this.Ie}},isPendingClear:{get:function(){return this.Ft},set:function(a){this.Ft=a}},isPendingUnmodified:{get:function(){return this.Gt},set:function(a){this.Gt=a}},isInternalTransaction:{get:function(){return this.Dt},set:function(a){this.Dt=a}},isJustDiscarded:{get:function(){return this.rq}}}),No.prototype.handleChanged=No.prototype.Tu,No.prototype.redo=No.prototype.redo,No.prototype.undo=No.prototype.undo,No.prototype.canUndo=No.prototype.canUndo,No.prototype.discardHistoryAfterIndex=No.prototype.lx,No.prototype.rollbackTransaction=No.prototype.Kf,No.prototype.commitTransaction=No.prototype.eb,No.prototype.startTransaction=No.prototype.Ea,No.prototype.removeModel=No.prototype.Rx,No.prototype.addModel=No.prototype.Xw,No.prototype.clear=No.prototype.clear,No.className="UndoManager";function Ar(){Di(this),this.H=ah,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new ea,this.Zr=-1}Ar.prototype.toString=function(){return this.name!==""?this.name+" Tool":Mn(this.constructor)},Ar.prototype.updateAdornments=function(){},Ar.prototype.canStart=function(){return this.isEnabled},Ar.prototype.doStart=function(){},Ar.prototype.doActivate=function(){this.isActive=!0},Ar.prototype.doDeactivate=function(){this.isActive=!1},Ar.prototype.doStop=function(){},Ar.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Ar.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Ar.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Ar.prototype.doMouseMove=function(){},Ar.prototype.doMouseUp=function(){this.stopTool()},Ar.prototype.doMouseWheel=function(){},Ar.prototype.canStartMultiTouch=function(){return!0},Ar.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,ft.allocAt(NaN,NaN)),b=y.So(1,ft.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var E=b.x-x.x,te=b.y-x.y;a.Jw=Math.sqrt(E*E+te*te),y.bubbles=!1}ft.free(x),ft.free(b)},Ar.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,ft.allocAt(NaN,NaN)),b=y.So(1,ft.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var E=b.x-x.x,te=b.y-x.y;te=Math.sqrt(E*E+te*te)/a.Jw,E=new ft((Math.min(b.x,x.x)+Math.max(b.x,x.x))/2,(Math.min(b.y,x.y)+Math.max(b.y,x.y))/2),te*=a.Bw;var ne=a.commandHandler;if(te!==a.scale&&ne.canResetZoom(te)){var se=a.zoomPoint;a.zoomPoint=E,ne.resetZoom(te),a.zoomPoint=se}y.bubbles=!1}ft.free(x),ft.free(b)},Ar.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Ar.prototype.doKeyUp=function(){},Ar.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Ar.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Ar.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Sr?y.meta:y.control){for(a.R("ChangingSelection",a.selection),y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&(y.isSelected=!y.isSelected),a.R("ChangedSelection",a.selection)}else if(y.shift){if(!x.isSelected){for(a.R("ChangingSelection",a.selection),y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&(y.isSelected=!0),a.R("ChangedSelection",a.selection)}}else if(!x.isSelected){for(y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&a.select(y)}}else!y.left||(Sr?y.meta:y.control)||y.shift||a.clearSelection()}},Ar.prototype.standardMouseClick=function(a,y){a===void 0&&(a=null),y===void 0&&(y=function(E){return!E.layer.isTemporary});var x=this.diagram,b=x.lastInput;return a=x.ic(b.documentPoint,a,y),b.targetObject=a,vc(a,b,x),b.handled};function vc(a,y,x){if(y.handled=!1,a===null||a.If()){var b=0;y.left?b=y.clickCount===1?1:y.clickCount===2?2:1:y.right&&y.clickCount===1&&(b=3);var E="ObjectSingleClicked";if(a!==null){switch(b){case 1:E="ObjectSingleClicked";break;case 2:E="ObjectDoubleClicked";break;case 3:E="ObjectContextClicked"}b!==0&&x.R(E,a)}else{switch(b){case 1:E="BackgroundSingleClicked";break;case 2:E="BackgroundDoubleClicked";break;case 3:E="BackgroundContextClicked"}b!==0&&x.R(E)}if(a!==null)for(;a!==null;){switch(x=null,b){case 1:x=a.click;break;case 2:x=a.doubleClick?a.doubleClick:a.click;break;case 3:x=a.contextClick}if(x!==null&&(x(y,a),y.handled))break;a=a.panel}else{switch(a=null,b){case 1:a=x.click;break;case 2:a=x.doubleClick?x.doubleClick:x.click;break;case 3:a=x.contextClick}a!==null&&a(y)}}}Ar.prototype.standardMouseOver=function(){var a=this.diagram,y=a.lastInput;if(a.animationManager.zb!==!0){var x=a.skipsUndoManager;a.skipsUndoManager=!0;var b=a.viewportBounds.ca(y.documentPoint)?a.ic(y.documentPoint,null,null):null;!y.event||y.event.type!=="pointercancel"&&y.event.type!=="pointerout"||(b=null),y.targetObject=b;var E=!1;if(b!==a.Ck){var te=a.Ck,ne=te;for(a.Ck=b,this.doCurrentObjectChanged(te,b),y.handled=!1;te!==null;){var se=te.mouseLeave;if(se!==null&&(b===te||b!==null&&b.rg(te)||(se(y,te,b),E=!0,y.handled)))break;te=te.panel}for(te=ne,y.handled=!1;b!==null&&(ne=b.mouseEnter,!(ne!==null&&(te===b||te!==null&&te.rg(b)||(ne(y,b,te),E=!0,y.handled))));)b=b.panel;b=a.Ck}if(b!==null){for(te=b,ne="";te!==null&&(ne=te.cursor,ne==="");)te=te.panel;for(a.currentCursor=ne,y.handled=!1,te=b;te!==null&&(b=te.mouseOver,!(b!==null&&(b(y,te),E=!0,y.handled)));)te=te.panel}else this.doUpdateCursor(null),b=a.mouseOver,b!==null&&(b(y),E=!0);E&&a.$b(),a.skipsUndoManager=x}},Ar.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Ar.prototype.doCurrentObjectChanged=function(){},Ar.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var b=a.commandHandler,E=a.toolManager.mouseWheelBehavior;if(b!==null&&(E===ih&&!y.shift||E===Lu&&y.control))(0<x?b.canIncreaseZoom():b.canDecreaseZoom())&&(E=a.zoomPoint,a.zoomPoint=y.viewPoint,0<x?b.increaseZoom():b.decreaseZoom(),a.zoomPoint=E),y.bubbles=!1;else if(E===ih&&y.shift||E===Lu&&!y.control){b=a.position.copy();var te=y.event;E=te.deltaMode;var ne=te.deltaX;te=te.deltaY;var se="pixel";if(ne===0&&te===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(se,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(se,0<x?"left":"right",Math.abs(x)));else{switch(E){case 0:se="pixel";break;case 1:se="line";break;case 2:se="page"}ne!==0&&a.allowHorizontalScroll&&(ne*=a.scrollHorizontalLineChange/16,a.scroll(se,0<ne?"right":"left",Math.abs(ne))),te!==0&&a.allowVerticalScroll&&(te*=a.scrollVerticalLineChange/16,a.scroll(se,0<te?"down":"up",Math.abs(te)))}this.doWheelChange(a,b,y)}}},Ar.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Ar.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=pi(function(){x.doWaitAfter(b)},a)},Ar.prototype.cancelWaitAfter=function(){this.Zr!==-1&&jt.clearTimeout(this.Zr),this.Zr=-1},Ar.prototype.doWaitAfter=function(){},Ar.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof Fr);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},Ar.prototype.isBeyondDragSize=function(a,y){var x=this.diagram;a===void 0&&(a=x.firstInput.viewPoint),y===void 0&&(y=x.lastInput.viewPoint);var b=x.toolManager.dragSize,E=b.width;return b=b.height,x.firstInput.isTouchEvent&&(E+=6,b+=6),Math.abs(y.x-a.x)>E||Math.abs(y.y-a.y)>b},ot.Object.defineProperties(Ar.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof rn&&(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}}}),Ar.prototype.startTransaction=Ar.prototype.Ea,Ar.className="Tool";function bo(){Ar.call(this),this.name="ToolManager",this.hb=new Ln,this.ob=new Ln,this.Hb=new Ln,this.F=this.V=850,this.o=new wn(2,2).ja(),this.Ha=5e3,this.ia=Lu,this.u=Ph,this.Mp=this.j=null,this.zj=-1}Je(bo,Ar),bo.prototype.initializeStandardTools=function(){},bo.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Fr&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},bo.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===Yl&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===Wr){y.bubbles=!0;return}if(this.gestureBehavior===Yl)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,b=0;b<x;b++){var E=this.mouseDownTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===Lu?this.mouseWheelBehavior=ih:this.mouseWheelBehavior===ih&&(this.mouseWheelBehavior=Lu)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},bo.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===Wr){y.bubbles=!0;return}if(this.gestureBehavior===Yl)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,b=0;b<x;b++){var E=this.mouseMoveTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseMove());return}}Gh(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Gh(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}bo.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Fr&&(y===a||y.rg(a))||this.hideToolTip()},bo.prototype.doWaitAfter=function(a){var y=this.diagram;y.ta!==null&&(this.doMouseHover(),this.isActive||this.doToolTip(),a.isTouchEvent&&!y.lastInput.handled&&(a=a.copy(),a.button=2,a.buttons=2,y.lastInput=a,y.qu=!0,y.doMouseUp()))},bo.prototype.doMouseHover=function(){var a=this.diagram,y=a.lastInput;y.targetObject===null&&(y.targetObject=a.ic(y.documentPoint,null,null));var x=y.targetObject;if(x!==null)for(y.handled=!1;x!==null&&(a=this.isActive?x.mouseHold:x.mouseHover,!(a!==null&&(a(y,x),y.handled)));)x=x.panel;else x=this.isActive?a.mouseHold:a.mouseHover,x!==null&&x(y)},bo.prototype.doToolTip=function(){var a=this.diagram,y=a.lastInput;if(y.targetObject===null&&(y.targetObject=a.ic(y.documentPoint,null,null)),y=y.targetObject,y!==null){if(a=this.currentToolTip,!(a instanceof Fr)||y!==a&&!y.rg(a)){for(;y!==null;){if(a=y.toolTip,a!==null){this.showToolTip(a,y);return}y=y.panel}this.hideToolTip()}}else y=a.toolTip,y!==null?this.showToolTip(y,null):this.hideToolTip()},bo.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Fr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category="ToolTip",a.placeholder!==null&&(a.placeholder.scale=x.scale);var b=a.diagram;b!==null&&b!==x&&b.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionToolTip(a,y)}else a instanceof Ks&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(jt.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=pi(function(){E.hideToolTip()},a)}},bo.prototype.positionToolTip=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),b=a.measuredBounds,E=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=b.width),x.x+b.width>E.right&&(x.x-=b.width+5/y.scale),x.x<E.x&&(x.x=E.x),x.y=x.y+20/y.scale+b.height>E.bottom?x.y-(b.height+5/y.scale):x.y+20/y.scale,x.y<E.y&&(x.y=E.y),a.position=x}},bo.prototype.hideToolTip=function(){this.zj!==-1&&(jt.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Fr?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Ks&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},bo.prototype.doMouseUp=function(){this.cancelWaitAfter();var a=this.diagram;if(this.isActive)for(var y=this.mouseUpTools.length,x=0;x<y;x++){var b=this.mouseUpTools.M(x);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseUp());return}}a.doFocus(),this.doDeactivate()},bo.prototype.doMouseWheel=function(){this.standardMouseWheel()},bo.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},bo.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},bo.prototype.findTool=function(a){for(var y=this.mouseDownTools.length,x=0;x<y;x++){var b=this.mouseDownTools.M(x);if(b.name===a)return b}for(y=this.mouseMoveTools.length,x=0;x<y;x++)if(b=this.mouseMoveTools.M(x),b.name===a)return b;for(y=this.mouseUpTools.length,x=0;x<y;x++)if(b=this.mouseUpTools.M(x),b.name===a)return b;return null},bo.prototype.replaceTool=function(a,y){y!==null&&(y.diagram=this.diagram);for(var x=this.mouseDownTools.length,b=0;b<x;b++){var E=this.mouseDownTools.M(b);if(E.name===a)return y!==null?this.mouseDownTools.cd(b,y):this.mouseDownTools.mb(b),E}for(x=this.mouseMoveTools.length,b=0;b<x;b++)if(E=this.mouseMoveTools.M(b),E.name===a)return y!==null?this.mouseMoveTools.cd(b,y):this.mouseMoveTools.mb(b),E;for(x=this.mouseUpTools.length,b=0;b<x;b++)if(E=this.mouseUpTools.M(b),E.name===a)return y!==null?this.mouseUpTools.cd(b,y):this.mouseUpTools.mb(b),E;return null},bo.prototype.gb=function(a,y,x){y!==null&&(y.name=a,y.diagram=this.diagram),this.findTool(a)?this.replaceTool(a,y):y!==null&&x.add(y)},ot.Object.defineProperties(bo.prototype,{mouseWheelBehavior:{get:function(){return this.ia},set:function(a){this.ia=a}},gestureBehavior:{get:function(){return this.u},set:function(a){this.u=a}},currentToolTip:{get:function(){return this.j},set:function(a){this.j=a,this.Mp=a!==null&&a instanceof Fr?a.adornedPart:null}},mouseDownTools:{get:function(){return this.hb}},mouseMoveTools:{get:function(){return this.ob}},mouseUpTools:{get:function(){return this.Hb}},hoverDelay:{get:function(){return this.V},set:function(a){this.V=a}},holdDelay:{get:function(){return this.F},set:function(a){this.F=a}},dragSize:{get:function(){return this.o},set:function(a){this.o=a.J()}},toolTipDuration:{get:function(){return this.Ha},set:function(a){this.Ha=a}}}),bo.prototype.replaceStandardTool=bo.prototype.gb;var Lu=new nn(bo,"WheelScroll",0),ih=new nn(bo,"WheelZoom",1),Wh=new nn(bo,"WheelNone",2),Ph=new nn(bo,"GestureZoom",3),Yl=new nn(bo,"GestureCancel",4),Wr=new nn(bo,"GestureNone",5);bo.className="ToolManager",bo.WheelScroll=Lu,bo.WheelZoom=ih,bo.WheelNone=Wh,bo.GestureZoom=Ph,bo.GestureCancel=Yl,bo.GestureNone=Wr;function Ho(){Ar.call(this),this.name="Dragging",this.u=this.Sw=this.ob=!0,this.o=this.Ha=this.V=this.Oe=null,this.Ym=this.Hb=!1,this.tl=new ft(NaN,NaN),this.Fr=new ft,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new kn().freeze(),this.ia=new ce,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var Pl;Je(Ho,Ar),Ho.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly&&!a.allowDragOut||!a.allowMove&&!a.allowCopy&&!a.allowDragOut||!a.allowSelect)return!1;var y=a.lastInput;return!y.left||a.currentTool!==this&&(!this.isBeyondDragSize()||y.isTouchEvent&&y.timestamp-a.firstInput.timestamp<this.Ik)?!1:this.findDraggablePart()!==null},Ho.prototype.findDraggablePart=function(){var a=this.diagram;if(a=a.Ol(a.firstInput.documentPoint,!1),a===null)return null;for(;a!==null&&!a.canSelect();)a=a.containingGroup;return a!==null&&(a.canMove()||a.canCopy())?a:null},Ho.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.Ol(a.firstInput.documentPoint,!1);if(y!==null){for(;y!==null&&!y.canSelect();)y=y.containingGroup;this.currentPart=y,this.currentPart===null||this.currentPart.isSelected||(a.R("ChangingSelection",a.selection),y=a.lastInput,(Sr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},Ho.prototype.doActivate=function(){var a=this.diagram;this.Bn=null,this.currentPart===null&&this.standardMouseSelect();var y=this.currentPart;y!==null&&(y.canMove()||y.canCopy())&&(a.Fu(!0),Ot=null,this.isActive=!0,this.tl.set(a.position),Ch(this,a.selection),this.Cg.length=0,a.animationManager.Cc(),this.draggedParts=this.computeEffectiveCollection(a.selection,this.dragOptions),this.Sw=this.diagram.layout.isRealtime,this.diagram.layout.isRealtime=!1,a.Ns=!0,a.Gf("temporaryPixelRatio")===!0&&30<a.$w&&Xa(a),bf(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,Ot=this,Xt=this.diagram,this.doSimulatedDragOut()))};function Ch(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Bn?(a.draggedLink=y.first(),a.draggedLink.canRelinkFrom()&&a.draggedLink.canRelinkTo()&&a.draggedLink.Ej(),a.Oe=x.toolManager.findTool("Relinking"),a.Oe===null&&(a.Oe=new wr,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}Ho.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},Ho.prototype.Pd=function(a){return a===void 0?new Th(Zn):this.isGridSnapEnabled?new Th(new ft(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new Th(a.copy())},Ho.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Cl(this),Lc(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<Pl.count){for(var y=Pl,x=y.length,b=0;b<x;b++){var E=y.M(b);Nr(E),po(E),Cl(E),E.diagram.ug()}y.clear()}Nr(this),this.tl.h(NaN,NaN),Xt!==null&&(Xt.currentCursor=""),Ot=Xt=null,po(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),Rd(a,!0)},Ho.prototype.stopTransaction=function(){var a=this.diagram,y=Ar.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Cl(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,Wu(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function Eh(){var a=Ot;po(a),ya(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}Ho.prototype.doCancel=function(){po(this),ya(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},Ho.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},Ho.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function Xl(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var b=x.undoManager;for(b.isEnabled&&b.isInTransaction?b.currentTransaction!==null&&0<b.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):ya(a),x.skipsUndoManager=!y,x.partManager.addsToTemporaryLayer=!y,a.startPoint=x.firstInput.documentPoint,y=a.copiesEffectiveCollection?a.draggedParts.Lf():x.selection,y=x.Kj(y,x,!0),x=new on,b=a.draggedParts.iterator;b.next();){var E=b.key;if(E.Zc()&&E.canCopy()){var te=y.I(E);te!==null&&(te.location=E.location,te.Va(),x.add(te,a.Pd(te.location)))}}for(y=y.iterator;y.next();)b=y.value,b instanceof Bn&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,Ch(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,nc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function po(a){var y=a.diagram;if(a.copiedParts!==null){if(y.Is(a.copiedParts.Lf(),!1),a.copiedParts=null,a.draggedParts!==null)for(var x=a.draggedParts.iterator;x.next();)x.key instanceof Bn&&(x.value.point=new ft(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function Nr(a){if(a.draggedLink!==null){if(a.dragsLink&&a.Oe!==null){var y=a.Oe;y.diagram.remove(y.temporaryFromNode),y.diagram.remove(y.temporaryToNode),a.Oe.originalLink=null}a.draggedLink=null,a.Oe=null}}function Do(a,y,x){var b=a.diagram,E=a.startPoint,te=ft.alloc();te.assign(b.lastInput.documentPoint),a.moveParts(y,te.re(E),x),ft.free(te),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(Xa(b),b.hk())}Ho.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&Ec(b,a,y,this.dragOptions,x)};function ya(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var b=x.key;b.Zc()&&(b.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(b=x.key,b instanceof Bn&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),nc(b,-E.x,-E.y)}y.bd()}}function ls(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),Ya(a,!1));var b=a.findDragOverObject(y),E=x.lastInput;E.targetObject=b,a.doUpdateCursor(b);var te=x.skipsUndoManager,ne=!1;try{if(x.skipsUndoManager=!0,ne=Wu(a,E,b),!a.isActive&&Ot===null)return;var se=b!==null?b.part:null;if(se===null||x.handlesDragDropForTopLevelParts&&se.isTopLevel&&!(se instanceof Ki)){var he=x.mouseDragOver;he!==null&&(he(E),ne=!0)}if(!a.isActive&&Ot===null||(a.doDragOver(y,b),!a.isActive&&Ot===null))return}finally{x.skipsUndoManager=te,ne&&x.bd()}a.Bn=b,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(E.viewPoint)}Ho.prototype.findDragOverObject=function(a){var y=this;return lh(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof Fr||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},Ho.prototype.doUpdateCursor=function(a){var y=this.diagram;(a===null||this.Bn!==a)&&(!this.diagram.currentTool.isActive||this.mayCopy()?y.currentCursor=this.copyCursor:this.mayMove()?y.currentCursor=this.moveCursor:this.mayDragOut()&&(y.currentCursor=this.nodropCursor))};function Wu(a,y,x){var b=!1,E=a.Cg.length,te=0<E?a.Cg[0]:null;if(x===te)return!1;y.handled=!1;for(var ne=0;ne<E;ne++){var se=a.Cg[ne],he=se.mouseDragLeave;if(he!==null&&(he(y,se,x),b=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&Ot===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=cu(E);for(E=a.Cg.length,x=0;x<E&&(ne=a.Cg[x],se=ne.mouseDragEnter,se===null||(se(y,ne,te),b=!0,!y.handled));x++);return b}function cu(a){var y=a.panel;return y!==null?y:a instanceof Ci&&!(a instanceof Ki)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Mu(a,y,x){var b=a.Oe;if(b===null)return null;var E=a.diagram.og(y,b.portGravity,function(_e){return b.findValidLinkablePort(_e,x)});a=ft.alloc();var te=1/0,ne=null;for(E=E.iterator;E.next();){var se=E.value;if(se.part!==null){var he=se.ga($i,a);he=y.Bf(he),he<te&&(ne=se,te=he)}}return ft.free(a),ne}function Ya(a,y){var x=a.draggedLink;if(x!==null&&!(2>x.pointsCount)){var b=a.diagram;if(!b.isReadOnly){var E=a.Oe;if(E!==null){var te=null,ne=null;x.fromNode===null&&(te=Mu(a,x.i(0),!1),te!==null&&(ne=te.part));var se=null,he=null;x.toNode===null&&(se=Mu(a,x.i(x.pointsCount-1),!0),se!==null&&(he=se.part)),E.isValidLink(ne,te,he,se)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=ne,te!==null&&(x.fromPortId=te.portId),x.toNode=he,se!==null&&(x.toPortId=se.portId),x.fromPort!==b.Mx&&b.R("LinkRelinked",x,b.Mx),x.toPort!==b.Nx&&b.R("LinkRelinked",x,b.Nx)):Go(E,ne,te,he,se):Go(E,null,null,null,null)}}}}Ho.prototype.doDragOver=function(){};function Jl(a,y){var x=a.diagram;a.dragsLink&&Ya(a,!0),Cl(a);var b=a.findDragOverObject(y),E=x.lastInput;if(E.targetObject=b,b!==null){E.handled=!1;for(var te=b;te!==null;){var ne=te.mouseDrop;if(ne!==null&&(ne(E,te),E.handled))break;vp(a,E,te),te=cu(te)}}else te=x.mouseDrop,te!==null&&te(E);if(a.isActive||Ot!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)te=E.key,te instanceof qn&&te.linksConnected.each(function(se){se.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||Ot!==null){for(a=sn.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof qn&&yp(x,b,a);sn.free(a)}}}function vp(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Ki||(x=a.mouseDrop,x!==null&&x(y))}function yp(a,y,x){var b=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(b=!0),a=a.Nu(x,function(E){return E.part},function(E){return E instanceof Bn},!0,function(E){return E instanceof Bn},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}Ho.prototype.doDropOnto=function(){},Ho.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()?(Xl(this,!1),bf(a,this.copiedParts),Do(this,this.copiedParts,!1),Lc(a,this.copiedParts)):this.mayMove()?(po(this),Do(this,this.draggedParts,!0)):this.mayDragOut()?(Xl(this,!1),Do(this,this.copiedParts,!1)):po(this),ls(this,a.lastInput.documentPoint))}},Ho.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?(po(this),Xl(this,!0),bf(a,this.copiedParts),Do(this,this.copiedParts,!1),Lc(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0}))):(y=!0,po(this),this.mayMove()&&(Do(this,this.draggedParts,!0),ls(this,a.lastInput.documentPoint))),this.Ym=!0,Jl(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&Sp(this),a.Ya(),Lc(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},Ho.prototype.simulatedMouseMove=function(a,y,x){if(Ot===null)return!1;var b=Ot.diagram;x instanceof rn||(x=null);var E=Xt;return x!==E&&(E!==null&&E!==b&&(E.ug(),Ot.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),Xt=x,x!==null&&x!==b&&(Eh(),E=x.toolManager.findTool("Dragging"),E!==null&&(Pl.contains(E)||Pl.add(E),E.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===b||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(b=x.toolManager.findTool("Dragging"),b!==null&&(a!==null&&(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!1,b.doSimulatedDragOver()),!0)},Ho.prototype.simulatedMouseUp=function(a,y,x){if(Ot===null)return!1;var b=Xt,E=Ot.diagram;if(x===null)return Ot.doCancel(),!0;if(x!==b){var te=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&te!==null)return b.ug(),Ot.isDragOutStarted=!1,te.doSimulatedDragLeave(),!1;Xt=x,b=x.toolManager.findTool("Dragging"),b!==null&&(Eh(),Pl.contains(b)||Pl.add(b),b.doSimulatedDragEnter())}return x!==this.diagram?(a!==null?(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)):y===null&&(y=new ft),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!0,a=x.toolManager.findTool("Dragging"),a!==null&&a.doSimulatedDrop(),a=Ot,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function Sp(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof qn&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}Ho.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Sr?!a.lastInput.alt:!a.lastInput.control))return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},Ho.prototype.mayDragOut=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(!a.allowDragOut||!a.allowCopy||a.allowMove)return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},Ho.prototype.mayMove=function(){var a=this.diagram;if(a.isReadOnly||!a.allowMove)return!1;for(a=a.selection.iterator;a.next();)if(a.value.canMove())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canMove())},Ho.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},Ho.prototype.Az=function(){return Ot},Ho.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=Ot;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},Ho.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Fl(a),a.animationManager.Cc(),a=Ot,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},Ho.prototype.doSimulatedDragLeave=function(){var a=Ot;a!==null&&a.doSimulatedDragOut(),this.doCancel()},Ho.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Ot;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;gf(this,y.draggedParts.Lf(),!1,a.firstInput),Do(this,this.copiedParts,!1),ls(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},Ho.prototype.doSimulatedDrop=function(){var a=this.diagram,y=Ot;if(y!==null){var x=y.diagram;if(y.Ym=!0,po(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),gf(this,y.draggedParts.Lf(),!0,a.lastInput),Do(this,this.copiedParts,!1);var b=new kn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),Jl(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",b,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function gf(a,y,x,b){if(a.copiedParts===null){var E=a.diagram;if(!E.isReadOnly&&!E.isModelReadOnly){E.skipsUndoManager=!x,E.partManager.addsToTemporaryLayer=!x,a.startPoint=b.documentPoint,x=E.Kj(y,E,!0);var te=sn.alloc();E=b=1/0;for(var ne=-1/0,se=-1/0,he=y.iterator;he.next();){var _e=he.value;if(_e.isVisible()){var Ee=_e.location;_e=Ee.x,Ee=Ee.y,isNaN(_e)||isNaN(Ee)||(_e<b&&(b=_e),Ee<E&&(E=Ee),_e>ne&&(ne=_e),Ee>se&&(se=Ee))}}for(b===1/0?te.h(0,0,0,0):te.h(b,E,ne-b,se-E),b=te.x+te.width/2,E=te.y+te.height/2,sn.free(te),te=a.Fr,ne=new on,se=ft.alloc(),he=y.iterator;he.next();)_e=he.value,_e instanceof Bn&&_e.canCopy()&&(Ee=x.I(_e),Ee!==null&&(Ee.points=_e.points,nc(Ee,te.x-b,te.y-E),Ee.suspendsRouting=!0,ne.add(Ee,a.Pd())));for(y=y.iterator;y.next();)_e=y.value,_e.Zc()&&_e.canCopy()&&(he=x.I(_e),he!==null&&(_e=_e.location,se.h(te.x-(b-_e.x),te.y-(E-_e.y)),he.location=se,he.Va(),ne.add(he,a.Pd(se))));ft.free(se),a.copiedParts=ne,Ch(a,ne.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,nc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}Ho.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},Ho.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new ft},ot.Object.defineProperties(Ho.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}}}),Ho.prototype.getDraggingSource=Ho.prototype.Az;var Ot=null,Xt=null;Ho.className="DraggingTool",Pl=new Ln,En("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),bo.prototype.doCancel=function(){Ot!==null&&Ot.doCancel(),Ar.prototype.doCancel.call(this)};function qt(){Ar.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Bn,y=new ir;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new ir,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new qn,y=new ir,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Gi,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new qn,y=new ir,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Gi,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 on,this.Of=this.gj=this.Pf=null}Je(qt,Ar),qt.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},qt.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var te=y.Df(),ne=wn.alloc();ne.width=y.naturalBounds.width*te,ne.height=y.naturalBounds.height*te,b.desiredSize=ne,wn.free(ne),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=$i,te=ft.alloc(),x.location=y.ga($i,te),ft.free(te),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},qt.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Gi,y.fromSpot=qi,y.toSpot=qi),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},qt.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},qt.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof qn){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)}},qt.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof qn))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof qn)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},qt.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,b=this.portGravity;0>=b&&(b=.1);var E=this,te=y.og(x,b,function(Ne){return E.findValidLinkablePort(Ne,a)},null,!0);for(b=1/0,y=null,te=te.iterator;te.next();){var ne=te.value,se=ne.part;if(se instanceof qn){var he=ne.ga($i,ft.alloc()),_e=x.x-he.x,Ee=x.y-he.y;ft.free(he),he=_e*_e+Ee*Ee,he<b&&(_e=this.validPortsCache.I(ne),_e!==null?_e&&(y=ne,b=he):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,se,ne)||!a&&this.isValidLink(se,ne,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(ne,!0),y=ne,b=he):this.validPortsCache.add(ne,!1))}}return y!==null&&(x=y.part,x instanceof qn&&(x.layer===null||x.layer.allowLink))?y:null},qt.prototype.isValidFrom=function(a,y){if(a===null||y===null)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(a.layer!==null&&!a.layer.allowLink||y.fromLinkable!==!0))return!1;var x=y.fromMaxLinks;if(1/0>x){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},qt.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},qt.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},qt.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof qn))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof qn))return!1;for(y=y.portId,y===null&&(y=""),y=b.Sd(y);y.next();)if(b=y.value,b.fromNode===x&&b.fromPortId===a)return!0;return!1},qt.prototype.isValidLink=function(a,y,x,b){if(!this.isValidFrom(a,y)||!this.isValidTo(x,b)||!(y===null||b===null||(y.fromLinkableSelfNode&&b.toLinkableSelfNode||!this.isInSameNode(y,b))&&(y.fromLinkableDuplicates&&b.toLinkableDuplicates||!this.isLinked(y,b)))||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 E=a.linkValidation;if(E!==null&&!E(a,y,x,b,this.originalLink))return!1}return x!==null&&(E=x.linkValidation,E!==null&&!E(a,y,x,b,this.originalLink))?!1:(E=this.linkValidation,E!==null?E(a,y,x,b,this.originalLink):!0)},qt.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 b=new kn;return b.add(a),Bi(this,x,y,b)};function Bi(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),Bi(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),Bi(a,y.labeledLink,x,b))))}qt.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var b=this.diagram.validCycle;if(b!==Ud){if(b===Kp){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=y.linksConnected;b.next();){var E=b.value;if(E!==x&&E.isTreeLink&&E.toNode===y)return!1}return!_i(this,a,y,x,!0)}if(b===Yp){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=a.linksConnected;b.next();)if(E=b.value,E!==x&&E.isTreeLink&&E.fromNode===a)return!1;return!_i(this,a,y,x,!0)}if(b===Wp)return a===y?a=!0:(b=new kn,b.add(y),a=li(this,b,a,y,x)),!a;if(b===Zp)return!_i(this,a,y,x,!1);if(b===Vp)return a===y?a=!0:(b=new kn,b.add(y),a=Si(this,b,a,y,x)),!a}return!0};function _i(a,y,x,b,E){if(y===x)return!0;if(y===null||x===null)return!1;for(var te=y.linksConnected;te.next();){var ne=te.value;if(ne!==b&&(!E||ne.isTreeLink)&&ne.toNode===y&&(ne=ne.fromNode,ne!==y&&_i(a,ne,x,b,E)))return!0}return!1}function li(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var te=x.linksConnected;te.next();){var ne=te.value;if(ne!==E&&ne.toNode===x&&(ne=ne.fromNode,ne!==x&&li(a,y,ne,b,E)))return!0}return!1}function Si(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var te=x.linksConnected;te.next();){var ne=te.value;if(ne!==E){var se=ne.fromNode;if(ne=ne.toNode,se=se===x?ne:se,se!==x&&Si(a,y,se,b,E))return!0}}return!1}ot.Object.defineProperties(qt.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}}}),qt.className="LinkingBaseTool";function ai(){qt.call(this),this.name="Linking",this.V={},this.F=null,this.K=Pi,this.Xd=null}Je(ai,qt),ai.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},ai.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 qn)))return null;var x=this.direction;if(x===Pi||x===Yi){var b=this.findValidLinkablePort(y,!1);if(b!==null||this.startObject===a&&(b=a.port,this.findValidLinkablePort(b,!1)))return this.isForwards=!0,b}return(x===Pi||x===Po)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},ai.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 qn&&(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 qn&&(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)},ai.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()},ai.prototype.doStop=function(){qt.prototype.doStop.call(this),this.startObject=null},ai.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,b=null,E=null,te=null;try{var ne=this.targetPort=this.findTargetPort(this.isForwards);if(ne!==null){var se=ne.part;se instanceof qn&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),b=se,E=ne):(y=se,x=ne,this.originalToNode!==null&&(b=this.originalToNode,E=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(b=this.originalToNode,E=this.originalToPort);y!==null||b!==null?(te=this.insertLink(y,x,b,E),te!==null?(ne===null&&(this.isForwards?te.defaultToPoint=a.lastInput.documentPoint:te.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),te.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",te)):this.doNoLink(y,x,b,E)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),te&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},ai.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Bn)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)},ai.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},ai.prototype.doNoLink=function(){},ot.Object.defineProperties(ai.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 Pi=new nn(ai,"Either",0),Yi=new nn(ai,"ForwardsOnly",0),Po=new nn(ai,"BackwardsOnly",0);ai.className="LinkingTool",ai.Either=Pi,ai.ForwardsOnly=Yi,ai.BackwardsOnly=Po;function wr(){qt.call(this),this.name="Relinking";var a=new ir;a.figure="Diamond",a.desiredSize=Ji,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new ir,a.figure="Diamond",a.desiredSize=Ji,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new sn}Je(wr,qt),wr.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Bn){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var b=a.selectionObject;b!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(b,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(b=a.selectionObject,b!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(b,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},wr.prototype.makeAdornment=function(a,y){var x=new Fr;return x.type=Dn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},wr.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},wr.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 Fr&&x.adornedPart instanceof Bn))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&&0<this.originalLink.pointsCount&&(this.originalLink.fromNode===null&&(this.temporaryFromPort!==null&&(this.temporaryFromPort.desiredSize=zi),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=zi),this.temporaryToNode!==null&&(this.temporaryToNode.location=this.originalLink.i(this.originalLink.pointsCount-1)))),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0),a.add(this.temporaryFromNode),a.add(this.temporaryToNode),this.temporaryLink!==null&&(this.temporaryFromNode!==null&&(this.temporaryLink.fromNode=this.temporaryFromNode),this.temporaryToNode!==null&&(this.temporaryLink.toNode=this.temporaryToNode),this.copyLinkProperties(this.originalLink,this.temporaryLink),this.temporaryLink.bb(),a.add(this.temporaryLink)),this.isActive=!0},wr.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Kf||x===ic)&&(x=za),y.curve=x,y.curviness=a.curviness,y.isTreeLink=a.isTreeLink,y.points=a.points,y.routing=a.routing,y.smoothness=a.smoothness,y.fromSpot=a.fromSpot,y.fromEndSegmentLength=a.fromEndSegmentLength,y.fromShortLength=a.fromShortLength,y.toSpot=a.toSpot,y.toEndSegmentLength=a.toEndSegmentLength,y.toShortLength=a.toShortLength}},wr.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()},wr.prototype.doStop=function(){qt.prototype.doStop.call(this),this.handle=null},wr.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,b=this.originalToNode,E=this.originalToPort,te=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var ne=this.targetPort.part;ne instanceof qn&&(this.isForwards?(b=ne,E=this.targetPort):(y=ne,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?E=b=null:x=y=null:te=null;te!==null?(this.reconnectLink(te,this.isForwards?b:y,this.isForwards?E:x,this.isForwards),this.targetPort===null&&(this.isForwards?te.defaultToPoint=a.lastInput.documentPoint:te.defaultFromPoint=a.lastInput.documentPoint,te.bb()),this.transactionResult=this.name,a.R("LinkRelinked",te,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},wr.prototype.reconnectLink=function(a,y,x,b){return x=x!==null&&x.portId!==null?x.portId:"",b?(a.toNode=y,a.toPortId=x):(a.fromNode=y,a.fromPortId=x),!0},wr.prototype.doNoRelink=function(){};function Go(a,y,x,b,E){y!==null?(a.copyPortProperties(y,x,a.temporaryFromNode,a.temporaryFromPort,!1),a.diagram.add(a.temporaryFromNode)):a.diagram.remove(a.temporaryFromNode),b!==null?(a.copyPortProperties(b,E,a.temporaryToNode,a.temporaryToPort,!0),a.diagram.add(a.temporaryToNode)):a.diagram.remove(a.temporaryToNode)}ot.Object.defineProperties(wr.prototype,{fromHandleArchetype:{get:function(){return this.V},set:function(a){this.V=a}},toHandleArchetype:{get:function(){return this.Xd},set:function(a){this.Xd=a}},handle:{get:function(){return this.F},set:function(a){if(a!==null&&!(a.part instanceof Fr))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),wr.className="RelinkingTool",En("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),En("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function Wi(){Ar.call(this),this.name="LinkReshaping";var a=new ir;a.figure="Rectangle",a.desiredSize=Mr,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new ir,a.figure="Diamond",a.desiredSize=Ji,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new ft,this.Yq=new Ln}Je(Wi,Ar),Wi.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:Kr},Wi.prototype.om=function(a,y){a.reshapingBehavior=y},Wi.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Bn){var y=null;if(a.isSelected&&!this.diagram.isReadOnly){var x=a.path;x!==null&&a.canReshape()&&a.actualBounds.w()&&a.isVisible()&&x.actualBounds.w()&&x.Ed()&&(y=a.Pj(this.name),y===null||y.Aw!==a.pointsCount||y.Uw!==a.resegmentable)&&(y=this.makeAdornment(x),y!==null&&(y.Aw=a.pointsCount,y.Uw=a.resegmentable,a.bh(this.name,y)))}y===null&&a.Jf(this.name)}},Wi.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new Fr,E.type=Dn.Link,x=y.firstPickIndex;var te=y.lastPickIndex,ne=b?1:0;if(y.resegmentable&&y.computeCurve()!==Al)for(var se=x+ne;se<te-ne;se++){var he=this.makeResegmentHandle(a,se);he!==null&&(he.segmentIndex=se,he.segmentFraction=.5,he.fromMaxLinks=999,E.add(he))}for(ne=x+1;ne<te;ne++)if(se=this.makeHandle(a,ne),se!==null){if(se.segmentIndex=ne,ne!==x)if(ne===x+1&&b){he=y.i(x);var _e=y.i(x+1);Vt.B(he.x,_e.x)&&Vt.B(he.y,_e.y)&&(_e=y.i(x-1)),Vt.B(he.x,_e.x)?(this.om(se,ho),se.cursor="n-resize"):Vt.B(he.y,_e.y)&&(this.om(se,rs),se.cursor="w-resize")}else ne===te-1&&b?(he=y.i(te-1),_e=y.i(te),Vt.B(he.x,_e.x)&&Vt.B(he.y,_e.y)&&(he=y.i(te+1)),Vt.B(he.x,_e.x)?(this.om(se,ho),se.cursor="n-resize"):Vt.B(he.y,_e.y)&&(this.om(se,rs),se.cursor="w-resize")):ne!==te&&(this.om(se,Vo),se.cursor="move");E.add(se)}E.adornedObject=a}return E},Wi.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},Wi.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},Wi.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowReshape&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},Wi.prototype.doActivate=function(){var a=this.diagram;if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle!==null){var y=this.handle.part.adornedPart;if(y instanceof Bn){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),b=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,b),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,b),y.points=x,y.Wb(),y.updateAdornments(),this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name),this.handle===null){this.doDeactivate();return}}this.Fw=y.i(this.handle.segmentIndex),this.Yq=y.points.copy(),this.isActive=!0}}},Wi.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},Wi.prototype.stopTransaction=function(){var a=this.diagram,y=Ar.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Wi.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},Wi.prototype.getResegmentingPoint=function(){return this.handle.ga($i)},Wi.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},Wi.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.computeReshape(a.lastInput.documentPoint);if(this.reshape(y),y=this.adornedLink,y!==null&&y.resegmentable){var x=this.handle.segmentIndex,b=y.i(x-1),E=y.i(x),te=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var ne=y.i(x-2);if(Math.abs(b.x-E.x)<this.resegmentingDistance&&Math.abs(b.y-E.y)<this.resegmentingDistance&&(To(this,ne,b,E,te,!0)||To(this,ne,b,E,te,!1))){var se=y.points.copy();To(this,ne,b,E,te,!0)?(se.cd(x-2,new ft(ne.x,(te.y+ne.y)/2)),se.cd(x+1,new ft(te.x,(te.y+ne.y)/2))):(se.cd(x-2,new ft((te.x+ne.x)/2,ne.y)),se.cd(x+1,new ft((te.x+ne.x)/2,te.y))),se.mb(x),se.mb(x-1),y.points=se,y.Wb()}else ne=y.i(x+2),Math.abs(E.x-te.x)<this.resegmentingDistance&&Math.abs(E.y-te.y)<this.resegmentingDistance&&(To(this,b,E,te,ne,!0)||To(this,b,E,te,ne,!1))&&(se=y.points.copy(),To(this,b,E,te,ne,!0)?(se.cd(x-1,new ft(b.x,(b.y+ne.y)/2)),se.cd(x+2,new ft(ne.x,(b.y+ne.y)/2))):(se.cd(x-1,new ft((b.x+ne.x)/2,b.y)),se.cd(x+2,new ft((b.x+ne.x)/2,ne.y))),se.mb(x+1),se.mb(x),y.points=se,y.Wb())}}else ne=ft.alloc(),Vt.qh(b.x,b.y,te.x,te.y,E.x,E.y,ne)&&ne.Bf(E)<this.resegmentingDistance*this.resegmentingDistance&&(b=y.points.copy(),b.mb(x),y.points=b,y.Wb()),ft.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function To(a,y,x,b,E,te){return te?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-b.y)<a.resegmentingDistance&&Math.abs(b.y-E.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-b.x)<a.resegmentingDistance&&Math.abs(b.x-E.x)<a.resegmentingDistance}Wi.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,b=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,b===ho?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===rs&&(y.L(x,a.x,y.i(x-1).y),y.L(x+1,a.x,y.i(x+2).y));else if(x===y.lastPickIndex-1)x=y.lastPickIndex-1,b===ho?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===rs&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{b=x;var E=y.i(b),te=y.i(b-1),ne=y.i(b+1);Vt.B(te.x,E.x)&&Vt.B(E.y,ne.y)?(Vt.B(te.x,y.i(b-2).x)&&!Vt.B(te.y,y.i(b-2).y)?(y.m(b,a.x,te.y),x++,b++):y.L(b-1,a.x,te.y),Vt.B(ne.y,y.i(b+2).y)&&!Vt.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)):Vt.B(te.y,E.y)&&Vt.B(E.x,ne.x)?(Vt.B(te.y,y.i(b-2).y)&&!Vt.B(te.x,y.i(b-2).x)?(y.m(b,te.x,a.y),x++,b++):y.L(b-1,te.x,a.y),Vt.B(ne.x,y.i(b+2).x)&&!Vt.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):Vt.B(te.x,E.x)&&Vt.B(E.x,ne.x)?(Vt.B(te.x,y.i(b-2).x)&&!Vt.B(te.y,y.i(b-2).y)?(y.m(b,a.x,te.y),x++,b++):y.L(b-1,a.x,te.y),Vt.B(ne.x,y.i(b+2).x)&&!Vt.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):Vt.B(te.y,E.y)&&Vt.B(E.y,ne.y)&&(Vt.B(te.y,y.i(b-2).y)&&!Vt.B(te.x,y.i(b-2).x)?(y.m(b,te.x,a.y),x++,b++):y.L(b-1,te.x,a.y),Vt.B(ne.y,y.i(b+2).y)&&!Vt.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),b=y.fromNode,E=y.fromPort,b!==null&&(te=b.findVisibleNode(),te!==null&&te!==b&&(b=te,E=b.port)),x===1&&y.computeSpot(!0,E).Mc()&&(te=E.ga($i,ft.alloc()),b=y.getLinkPointFromPoint(b,E,te,a,!0,ft.alloc()),y.L(0,b.x,b.y),ft.free(te),ft.free(b)),b=y.toNode,E=y.toPort,b!==null&&(te=b.findVisibleNode(),te!==null&&te!==b&&(b=te,E=b.port)),x===y.pointsCount-2&&y.computeSpot(!1,E).Mc()&&(x=E.ga($i,ft.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,ft.alloc()),y.L(y.pointsCount-1,a.x,a.y),ft.free(x),ft.free(a));y.zf()},Wi.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case Vo:return a;case ho:return new ft(y.i(x).x,a.y);case rs:return new ft(a.x,y.i(x).y);default:case Kr:return y.i(x)}},ot.Object.defineProperties(Wi.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},midHandleArchetype:{get:function(){return this.u},set:function(a){this.u=a}},handle:{get:function(){return this.j},set:function(a){if(a!==null&&!(a.part instanceof Fr))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedLink:{get:function(){return this.Ts}},resegmentingDistance:{get:function(){return this.F},set:function(a){this.F=a}},originalPoint:{get:function(){return this.Fw}},originalPoints:{get:function(){return this.Yq}}}),Wi.prototype.setReshapingBehavior=Wi.prototype.om,Wi.prototype.getReshapingBehavior=Wi.prototype.Ru;var Kr=new nn(Wi,"None",0),rs=new nn(Wi,"Horizontal",1),ho=new nn(Wi,"Vertical",2),Vo=new nn(Wi,"All",3);Wi.className="LinkReshapingTool",Wi.None=Kr,Wi.Horizontal=rs,Wi.Vertical=ho,Wi.All=Vo,En("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Co(){Ar.call(this),this.name="Resizing",this.o=new wn(1,1).freeze(),this.j=new wn(9999,9999).freeze(),this.yg=new wn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new ir;a.alignmentFocus=$i,a.figure="Rectangle",a.desiredSize=Mr,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new ft,this.Dw=new wn,this.Tn=new ft,this.rt=new wn(0,0),this.qt=new wn(1/0,1/0),this.pt=new wn(1,1)}Je(Co,Ar),Co.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Bn)){if(a.isSelected&&!this.diagram.isReadOnly){var y=a.resizeObject,x=a.Pj(this.name);if(y!==null&&a.canResize()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed()&&((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null)){y=y.li(),Dc(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},Co.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Fr,y.type=Dn.Spot,y.locationSpot=$i;var x=new ja;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,xr)),y.add(this.makeHandle(a,Qr)),y.add(this.makeHandle(a,eo)),y.add(this.makeHandle(a,fs)),y.add(this.makeHandle(a,ua)),y.add(this.makeHandle(a,Os)),y.add(this.makeHandle(a,$s)),y.add(this.makeHandle(a,ma))}else if(nu(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Co.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},Co.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))e:{var x=a.alignment;if(x.Mc()&&(x=$i),0>=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 Dn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},Co.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},Co.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))},Co.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Co.prototype.stopTransaction=function(){var a=this.diagram,y=Ar.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Co.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Co.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,ft.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),a.bd(),ft.free(E)}},Co.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,ft.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),ft.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Co.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 Ki){var b=new Ln;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new ce;E.dragsMembers=!1}y.moveParts(b,this.oppositePoint.copy().re(x),!0,E)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},Co.prototype.computeResize=function(a,y,x,b,E,te){y.Mc()&&(y=$i);var ne=this.adornedObject.naturalBounds,se=ne.x,he=ne.y,_e=ne.x+ne.width,Ee=ne.y+ne.height,Ne=1;if(!te){Ne=ne.width;var He=ne.height;0>=Ne&&(Ne=1),0>=He&&(He=1),Ne=He/Ne}return He=ft.alloc(),Vt.No(a.x,a.y,se,he,E.width,E.height,He),a=ne.copy(),0>=y.x?0>=y.y?(a.x=Math.max(He.x,_e-b.width),a.x=Math.min(a.x,_e-x.width),a.width=Math.max(_e-a.x,x.width),a.y=Math.max(He.y,Ee-b.height),a.y=Math.min(a.y,Ee-x.height),a.height=Math.max(Ee-a.y,x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Ne*a.width,b.height),x.height),a.width=a.height/Ne):(a.width=Math.max(Math.min(a.height/Ne,b.width),x.width),a.height=Ne*a.width),a.x=_e-a.width,a.y=Ee-a.height)):1<=y.y?(a.x=Math.max(He.x,_e-b.width),a.x=Math.min(a.x,_e-x.width),a.width=Math.max(_e-a.x,x.width),a.height=Math.max(Math.min(He.y-he,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Ne*a.width,b.height),x.height),a.width=a.height/Ne):(a.width=Math.max(Math.min(a.height/Ne,b.width),x.width),a.height=Ne*a.width),a.x=_e-a.width)):(a.x=Math.max(He.x,_e-b.width),a.x=Math.min(a.x,_e-x.width),a.width=_e-a.x,te||(a.height=Math.max(Math.min(Ne*a.width,b.height),x.height),a.width=a.height/Ne,a.y=he+.5*(Ee-he-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(He.x-se,b.width),x.width),a.y=Math.max(He.y,Ee-b.height),a.y=Math.min(a.y,Ee-x.height),a.height=Math.max(Ee-a.y,x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Ne*a.width,b.height),x.height),a.width=a.height/Ne):(a.width=Math.max(Math.min(a.height/Ne,b.width),x.width),a.height=Ne*a.width),a.y=Ee-a.height)):1<=y.y?(a.width=Math.max(Math.min(He.x-se,b.width),x.width),a.height=Math.max(Math.min(He.y-he,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Ne*a.width,b.height),x.height),a.width=a.height/Ne):(a.width=Math.max(Math.min(a.height/Ne,b.width),x.width),a.height=Ne*a.width))):(a.width=Math.max(Math.min(He.x-se,b.width),x.width),te||(a.height=Math.max(Math.min(Ne*a.width,b.height),x.height),a.width=a.height/Ne,a.y=he+.5*(Ee-he-a.height))):0>=y.y?(a.y=Math.max(He.y,Ee-b.height),a.y=Math.min(a.y,Ee-x.height),a.height=Ee-a.y,te||(a.width=Math.max(Math.min(a.height/Ne,b.width),x.width),a.height=Ne*a.width,a.x=se+.5*(_e-se-a.width))):1<=y.y&&(a.height=Math.max(Math.min(He.y-he,b.height),x.height),te||(a.width=Math.max(Math.min(a.height/Ne,b.width),x.width),a.height=Ne*a.width,a.x=se+.5*(_e-se-a.width))),ft.free(He),a},Co.prototype.computeReshape=function(){var a=Cn;return this.adornedObject instanceof ir&&(a=Cv(this.adornedObject)),!(a===fi||this.diagram.lastInput.shift)},Co.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},Co.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),y=this.maxSize;return!isNaN(y.width)&&y.width<a.width&&(a.width=y.width),!isNaN(y.height)&&y.height<a.height&&(a.height=y.height),a},Co.prototype.computeCellSize=function(){var a=new wn(NaN,NaN),y=this.adornedObject.part;return y!==null&&(y=y.resizeCellSize,!isNaN(y.width)&&0<y.width&&(a.width=y.width),!isNaN(y.height)&&0<y.height&&(a.height=y.height)),y=this.cellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height),y=this.diagram,(isNaN(a.width)||isNaN(a.height))&&y&&(y=y.grid,y!==null&&y.visible&&this.isGridSnapEnabled&&(y=y.gridCellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height))),(isNaN(a.width)||a.width===0||a.width===1/0)&&(a.width=1),(isNaN(a.height)||a.height===0||a.height===1/0)&&(a.height=1),a},ot.Object.defineProperties(Co.prototype,{handleArchetype:{get:function(){return this.F},set:function(a){this.F=a}},handle:{get:function(){return this.u},set:function(a){if(a!==null&&!(a.part instanceof Fr))throw Error("new handle is not in an Adornment: "+a);this.u=a}},adornedObject:{get:function(){return this.ue},set:function(a){if(a!==null&&a.part instanceof Fr)throw Error("new handle must not be in an Adornment: "+a);this.ue=a}},minSize:{get:function(){return this.o},set:function(a){if(!this.o.D(a)){var y=a.width;isNaN(y)&&(y=0),a=a.height,isNaN(a)&&(a=0),this.o.h(y,a)}}},maxSize:{get:function(){return this.j},set:function(a){if(!this.j.D(a)){var y=a.width;isNaN(y)&&(y=1/0),a=a.height,isNaN(a)&&(a=1/0),this.j.h(y,a)}}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||this.yg.assign(a)}},isGridSnapEnabled:{get:function(){return this.V},set:function(a){this.V=a}},dragsMembers:{get:function(){return this.ia},set:function(a){this.ia=a}},oppositePoint:{get:function(){return this.Xq},set:function(a){this.Xq.D(a)||this.Xq.assign(a)}},originalDesiredSize:{get:function(){return this.Dw}},originalLocation:{get:function(){return this.Tn}}}),Co.className="ResizingTool",En("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function zr(){Ar.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new ft,this.ue=null;var a=new ir;a.figure="Ellipse",a.desiredSize=Ji,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new ft(NaN,NaN),this.u=0,this.F=50}Je(zr,Ar),zr.prototype.updateAdornments=function(a){if(a!==null){if(a.ph()){var y=a.rotateObject;if(y===a||y===a.path||y.isPanelMain)return}if(a.isSelected&&!this.diagram.isReadOnly&&(y=a.rotateObject,y!==null&&a.canRotate()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed())){var x=a.Pj(this.name);if((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null){x.angle=y.li(),x.placeholder===null&&(x.location=this.computeAdornmentLocation(y)),a.bh(this.name,x);return}}a.Jf(this.name)}},zr.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Fr,y.type=Dn.Position,y.locationSpot=$i;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(nu(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},zr.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowRotate&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},zr.prototype.doActivate=function(){var a=this.diagram;if(this.adornedObject===null){if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle===null)return;this.adornedObject=this.handle.part.adornedObject}this.adornedObject!==null&&(a.isMouseCaptured=!0,a.delaysLayout=!0,this.Ea(this.name),this.Cw=this.adornedObject.angle,this.kr=this.computeRotationPoint(this.adornedObject),this.Tn=this.adornedObject.part.location.copy(),this.isActive=!0)},zr.prototype.computeRotationPoint=function(a){var y=a.part,x=y.locationObject;return y.rotationSpot.sb()?a.ga(y.rotationSpot):a===y||a===x?x.ga(y.locationSpot):a.ga($i)},zr.prototype.computeAdornmentLocation=function(a){var y=this.rotationPoint;y.w()||(y=this.computeRotationPoint(a)),y=a.qs(y);var x=this.handleAngle;0>x?x+=360:360<=x&&(x-=360),x=Math.round(45*Math.round(x/45));var b=this.handleDistance;return x===0?y.x=a.naturalBounds.width+b:x===45?(y.x=a.naturalBounds.width+b,y.y=a.naturalBounds.height+b):x===90?y.y=a.naturalBounds.height+b:x===135?(y.x=-b,y.y=a.naturalBounds.height+b):x===180?y.x=-b:x===225?(y.x=-b,y.y=-b):x===270?y.y=-b:x===315&&(y.x=a.naturalBounds.width+b,y.y=-b),a.ga(y)},zr.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new ft(NaN,NaN),this.isActive=a.isMouseCaptured=!1},zr.prototype.stopTransaction=function(){var a=this.diagram,y=Ar.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},zr.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},zr.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},zr.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()},zr.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,b=y.rotateObject;(x===b||x.rg(b))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},zr.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&&0<y&&0<x&&(a%y<x?a=Math.floor(a/y)*y:a%y>y-x&&(a=(Math.floor(a/y)+1)*y)),360<=a?a-=360:0>a&&(a+=360),a},ot.Object.defineProperties(zr.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 Fr))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 Fr)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}}}),zr.className="RotatingTool",En("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Ko(){Ar.call(this),this.name="ClickSelecting"}Je(Ko,Ar),Ko.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},Ko.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},Ko.className="ClickSelectingTool";function ji(){Ar.call(this),this.name="Action",this.pk=null}Je(ji,Ar),ji.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},ji.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()},ji.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))}},ji.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()},ji.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())},ji.prototype.doStop=function(){this.pk=null},ji.className="ActionTool";function $o(){Ar.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new ft(0,0)}Je($o,Ar),$o.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)},$o.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},$o.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var b=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof Ci)x.Zc()&&(nu(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);Kt(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var te=ft.allocAt(a.x,a.y);this.isGridSnapEnabled&&_f(this.diagram,b,a,te),b.location=te,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),ft.free(te)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},ot.Object.defineProperties($o.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}}}),$o.className="ClickCreatingTool";function mo(){Ar.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Ci;a.layerName="Tool",a.selectable=!1;var y=new ir;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Je(mo,Ar),mo.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.timestamp<this.delay||a.Ol(y.documentPoint,!0)!==null))},mo.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},mo.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},mo.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive&&this.box!==null){var y=this.computeBoxBounds(),x=this.box.fb("SHAPE");x===null&&(x=this.box.Pb());var b=wn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),wn.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},mo.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;a.remove(this.box);try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),this.selectInRect(this.computeBoxBounds()),a.R("ChangedSelection",a.selection)}finally{a.currentCursor=""}}this.stopTool()},mo.prototype.computeBoxBounds=function(){var a=this.diagram;return new sn(a.firstInput.documentPoint,a.lastInput.documentPoint)},mo.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),Sr?x.meta:x.control)if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected&&(y.isSelected=!1);else for(a=a.iterator;a.next();)y=a.value,y.isSelected=!y.isSelected;else if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0);else{for(x=new Ln,y=y.selection.iterator;y.next();){var b=y.value;a.contains(b)||x.add(b)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},ot.Object.defineProperties(mo.prototype,{delay:{get:function(){return this.Ik},set:function(a){this.Ik=a}},isPartialInclusion:{get:function(){return this.o},set:function(a){this.o=a}},box:{get:function(){return this.j},set:function(a){this.j=a}}}),mo.className="DragSelectingTool";function Oo(){Ar.call(this),this.name="Panning",this.Xt=new ft,this.xy=new ft,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(jt.document,"scroll",a.Kw,!1),a.stopTool()}}Je(Oo,Ar),Oo.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!(!a.allowHorizontalScroll&&!a.allowVerticalScroll||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize())},Oo.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(jt.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Oo.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Oo.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Oo.prototype.doMouseMove=function(){this.move()},Oo.prototype.doMouseUp=function(){this.move(),this.stopTool()},Oo.prototype.move=function(){var a=this.diagram;if(this.isActive&&a)if(this.xg)a.lastInput.bubbles=!0;else{var y=a.position,x=a.firstInput.documentPoint,b=a.lastInput.documentPoint,E=y.x+x.x-b.x;x=y.y+x.y-b.y,a.allowHorizontalScroll||(E=y.x),a.allowVerticalScroll||(x=y.y),a.position=this.xy.h(E,x)}},ot.Object.defineProperties(Oo.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Oo.className="PanningTool",En("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),En("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),En("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),En("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),En("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Ks(){this.F=this.u=this.j=this.o=null}ot.Object.defineProperties(Ks.prototype,{mainElement:{get:function(){return this.u},set:function(a){this.u=a}},show:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},hide:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}},valueFunction:{get:function(){return this.F},set:function(a){this.F=a}}}),Ks.className="HTMLInfo";function hr(a,y,x){this.text=a,this.hx=y,this.visible=x}hr.className="ContextMenuButtonInfo";function Fo(){Ar.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new ft,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Je(Fo,Ar);function Eo(a){var y=new Ks;y.show=function(E,te,ne){ne.showDefaultContextMenu()},y.hide=function(E,te){te.hideDefaultContextMenu()},Oa=y,a.tu=function(){a.stopTool()},y=Fn("div");var x=Fn("div");y.style.cssText="top: 0px;z-index:10002;position: fixed;display: none;text-align: center;left: 25%;width: 50%;background-color: #F5F5F5;padding: 16px;border: 16px solid #444;border-radius: 10px;margin-top: 10px",x.style.cssText="z-index:10001;position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background-color: black;opacity: 0.8;";var b=Fn("style");jt.document.getElementsByTagName("head")[0].appendChild(b),b.sheet.insertRule(".goCXul { list-style: none; }",0),b.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0),b.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0),b=a.diagram,b!==null&&(b.addEventListener(y,"contextmenu",Or,!1),b.addEventListener(y,"selectstart",Or,!1),b.addEventListener(x,"contextmenu",Or,!1)),y.className="goCXforeground",x.className="goCXbackground",jt.document.body&&(jt.document.body.appendChild(y),jt.document.body.appendChild(x)),ku=y,ol=x,Ys=!0}function Or(a){return a.preventDefault(),!1}Fo.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return this.isBeyondDragSize()||!a.lastInput.right||1<a.lastInput.clickCount?!1:!!(a.lastInput.isTouchEvent&&this.defaultTouchContextMenu!==null||this.findObjectWithContextMenu()!==null)},Fo.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Fo.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Fo.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof rn||(a instanceof Zt?b=a:b=y.ic(x.documentPoint,null,function(E){return!E.layer.isTemporary})),b!==null){for(a=b;a!==null;){if(a.contextMenu!==null)return a;a=a.panel}if(y.lastInput.isTouchEvent&&this.defaultTouchContextMenu)return b.part}else if(y.contextMenu!==null)return y;return null},Fo.prototype.doActivate=function(){},Fo.prototype.doMouseDown=function(){if(Ar.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Fr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Xr(this)},Fo.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Fr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Xr(this)};function Xr(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof Ks||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(Uo(a,!0),a.isActive||a.stopTool())}Fo.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function Uo(a,y,x){if(x===void 0&&(x=null),!a.Et&&(a.Et=!0,y&&a.standardMouseSelect(),y=a.standardMouseClick(),a.Et=!1,!y)){if(a.isActive=!0,y=Oa,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof Zt?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Fr&&!a.currentContextMenu.visible&&a.stopTool()}}Fo.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Fo.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof Fr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category=this.name,a.placeholder!==null&&(a.placeholder.scale=x.scale);var b=a.diagram;b!==null&&b!==x&&b.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionContextMenu(a,y)}else a instanceof Ks&&a.show(y,x,this);this.currentContextMenu=a},Fo.prototype.positionContextMenu=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),b=a.measuredBounds,E=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=b.width),x.x+b.width>E.right&&(x.x-=b.width+5/y.scale),x.x<E.x&&(x.x=E.x),x.y+b.height>E.bottom&&(x.y-=b.height+5/y.scale),x.y<E.y&&(x.y=E.y),a.position=x}},Fo.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof Fr?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Ks&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function Gr(a){var y=new Ln;return y.add(new hr("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new hr("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new hr("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new hr("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new hr("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new hr("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new hr("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new hr("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new hr("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new hr("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new hr("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new hr("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new hr("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Fo.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=Gr(this)),ku.innerHTML="",ol.addEventListener("pointerdown",this.tu,!1);var y=this,x=Fn("ul");x.className="goCXul",ku.appendChild(x),x.innerHTML="";for(var b=this.jt.iterator;b.next();){var E=b.value,te=E.visible;if(typeof E.hx=="function"&&(typeof te!="function"||te(a))){te=Fn("li"),te.className="goCXli";var ne=Fn("a");ne.className="goCXa",ne.href="#",ne.ky=E.hx,ne.addEventListener("pointerdown",function(se){return this.ky(a),y.stopTool(),se.preventDefault(),!1},!1),ne.textContent=E.text,te.appendChild(ne),x.appendChild(te)}}ku.style.display="block",ol.style.display="block"},Fo.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Oa){ku.style.display="none",ol.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(ol,"pointerdown",this.tu,!1),this.currentContextMenu=null}},ot.Object.defineProperties(Fo.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof Fr?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Ys===!1&&Oa===null&&ts&&Eo(this),Oa},set:function(a){a===null&&(Ys=!0),Oa=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var Oa=null,Ys=!1,ol=null,ku=null;Fo.className="ContextMenuTool",En("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function ao(){Ar.call(this),this.name="TextEditing",this.Zh=new Lo,this.ia=null,this.V=gl,this.vj=null,this.qa=ql,this.u=1,this.F=!0,this.o=null,this.j=new Ks,this.kt=null,Tu(this,this.j)}Je(ao,Ar);function Tu(a,y){if(ts){var x=Fn("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var b=a.Lx(this.value);this.style.width=20+b.measuredBounds.width*this.wA+"px",this.rows=b.lineCount}},!1),x.addEventListener("keydown",function(b){if(!b.isComposing&&a.textBlock!==null){var E=b.key;E==="Enter"?(a.textBlock.isMultiline===!1&&b.preventDefault(),a.acceptText(Ia)):E==="Tab"?(a.acceptText(Au),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==ql){var b=a.kt;a.qa===yc&&(a.qa=Sc),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==ql){var b=a.kt;typeof b.focus=="function"&&b.focus(),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(b,E,te){if(b instanceof Lo&&te instanceof ao)if(te.state===yo)x.style.border="3px solid red",x.focus();else{var ne=b.ga($i),se=E.position,he=E.scale,_e=b.Df()*he;_e<te.minimumEditorScale&&(_e=te.minimumEditorScale);var Ee=b.naturalBounds.width*_e+6,Ne=b.naturalBounds.height*_e+2,He=(ne.x-se.x)*he;ne=(ne.y-se.y)*he,se=b.verticalAlignment,he=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*_e,Ne=se.y*Ne-se.y*he+se.offsetY-(.5*Ne-.5*he)-he/2,x.value=b.text,E.div.style.font=b.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*_e+"%",x.style.lineHeight="normal",x.style.width=Ee+"px",x.style.left=(He-Ee/2|0)-1+"px",x.style.top=(ne+Ne|0)-1+"px",x.style.textAlign=b.textAlign,x.style.margin="0",x.style.padding="1px",x.style.border="0",x.style.outline="none",x.style.whiteSpace="pre-wrap",x.style.overflow="hidden",x.rows=b.lineCount,x.wA=_e,x.className="goTXarea",E.div.appendChild(x),x.focus(),te.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(b){b.div.removeChild(x)}}}ao.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||aa&&aa!==this&&(aa.acceptText(Rs),aa&&aa!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Lo&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===gl&&!y.isSelected||this.starting===ta&&2>a.lastInput.clickCount)):!1},ao.prototype.doStart=function(){aa=this,this.textBlock!==null&&this.doActivate()},ao.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 Lo&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=yc;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new sn(this.textBlock.ga(xr),this.textBlock.ga(eo));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},ao.prototype.doCancel=function(){this.stopTool()},ao.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},ao.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Rs)},ao.prototype.acceptText=function(a){switch(a){case Rs:this.qa===Ds?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===yc||this.qa===yo||this.qa===Sc)&&(this.qa=Td,vo(this));break;case qo:case Ia:case Au:(Ia!==a||this.textBlock.isMultiline!==!0)&&(this.qa===yc||this.qa===yo||this.qa===Sc)&&(this.qa=Td,vo(this))}};function vo(a){var y=a.textBlock,x=a.diagram,b=a.currentTextEditor;if(y!==null&&b!==null){var E=y.text,te="";b.valueFunction!==null&&(te=b.valueFunction()),a.isValidText(y,E,te)?(a.Ea(a.name),a.qa=Ds,a.transactionResult=a.name,y.text=te,a.doSuccess(E,te),x!==null&&x.R("TextEdited",y,E),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=yo,a.doError(E,te))}}ao.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)},ao.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},ao.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=ql,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},ao.prototype.doStop=function(){aa=null},ao.prototype.isValidText=function(a,y,x){var b=this.textValidation;return b!==null&&!b(a,y,x)?!1:(b=a.textValidation,!!(b===null||b(a,y,x)))},ao.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},ot.Object.defineProperties(ao.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)}}}),ao.prototype.measureTemporaryTextBlock=ao.prototype.Lx;var qo=new nn(ao,"LostFocus",0),Rs=new nn(ao,"MouseDown",1),Au=new nn(ao,"Tab",2),Ia=new nn(ao,"Enter",3),$c=new nn(ao,"SingleClick",0),gl=new nn(ao,"SingleClickSelected",1),ta=new nn(ao,"DoubleClick",2),ql=new nn(ao,"StateNone",0),yc=new nn(ao,"StateActive",1),Sc=new nn(ao,"StateEditing",2),Td=new nn(ao,"StateValidating",3),yo=new nn(ao,"StateInvalid",4),Ds=new nn(ao,"StateValidated",5),aa=null;ao.className="TextEditingTool",ao.LostFocus=qo,ao.MouseDown=Rs,ao.Tab=Au,ao.Enter=Ia,ao.SingleClick=$c,ao.SingleClickSelected=gl,ao.DoubleClick=ta,ao.StateNone=ql,ao.StateActive=yc,ao.StateEditing=Sc,ao.StateValidating=Td,ao.StateInvalid=yo,ao.StateValidated=Ds,En("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Gs(a){Nd||(xp(),Nd=!0),this.H=ah,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=Mh,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new kn,this.ce=new ca,this.ce.Yd=this,this.Ei=new kn,this.pu=new kn,this.Sr=new kn,this.pr=new kn,a&&Object.assign(this,a)}Gs.prototype.Xe=function(a){this.H=a},Gs.prototype.canStart=function(){return!0};function xs(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),da(a.H),a.zb=!0)}function Ql(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===Mh?(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===wp&&y.vc.clear(),a.Qw=!!(a.Pk===Dd&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),b&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),Od(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==Ea&&b!==null&&(delete b.start.scale,delete b.end.scale),jt.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Xa(x),Ep(x),a.zb=!1,y.start(),y.bc&&(sh(a),x.Ya(),_p(y,0),Fl(x,!0),du(a),x.R("AnimationStarting",a)))}))}}function El(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function rh(a,y,x,b){a.isTicking||El(a)||y instanceof Bn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}$e=Gs.prototype,$e.fv=function(a){return this.ce.fv(a)},$e.Xu=function(a){return this.ce.Xu(a)};function Lh(a,y){function x(){if(0<E.Sr.count&&(b.addAll(E.Sr),E.Sr.clear(),E.bc=!0),E.bc!==!1&&b.count!==0){E.pu.addAll(b);for(var te=E.pu.iterator;te.next();){var ne=te.value;if(ne.bc!==!1){e:if(0<ne.yl.count)var se=!0;else{for(se=ne.vc.iterator;se.next();){var he=se.key;if(he instanceof Zt&&he.diagram!==null||he instanceof rn){se=!0;break e}}se=!1}se?Id(ne,!1):ne.Xk=!0}}E.pu.clear(),E.bc!==!1&&(sh(E),Fl(E.H),du(E)),jt.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),jt.requestAnimationFrame(function(){x()}))}function oh(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function sh(a){if(!a.vq){var y=a.H;a.Ow=y.skipsUndoManager,a.cw=y.skipsModelSourceBindings,y.skipsUndoManager=!0,y.skipsModelSourceBindings=!0,a.vq=!0}}function du(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}$e.Cc=function(a){var y=this.ce;if(this.zb===!0&&(this.Ok=this.zb=!1,this.Zd.clear(),0<y.vc.count&&this.H.$b()),this.bc){if(y.Ml(!0),y.vc.clear(),Od(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),Od(y,this.H)},$e.Ml=function(a){a===this.defaultAnimation&&this.defaultAnimation.vc.clear(),this.Ei.remove(a),this.Ei.count===0&&(this.bc=!1,this.H.$b()),a===this.defaultAnimation&&(this.defaultAnimation.vc.clear(),this.H.R("AnimationFinished",this))},$e.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),sl(this,a))},$e.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),Zh(this.ce,y,"position",y.position,y.position),sl(this,a))};function mf(a,y,x){!a.zb||y.D(x)||El(a)||(a.H.pi||(y=x.copy()),Zh(a.ce,a.H,"position",y,x))}function vf(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function sl(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function xc(a,y,x,b,E){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var te=a[0],ne=a[1],se=a[2];a=a[3];var he=y[0],_e=y[1],Ee=y[2];return y=y[3],se===0||se===100?(te=he,ne=_e):(Ee===0||Ee===100)&&(he=te,_e=ne),180<Math.abs(he-te)&&(he>te?te+=360:he+=360),te=E(x,te,he-te,b)%360,ne=E(x,ne,_e-ne,b),se=E(x,se,Ee-se,b),x=E(x,a,y-a,b),"hsla("+te+", "+ne+"%, "+se+"%, "+x+")"}function xp(){function a(x,b,E,te,ne,se){x.position=new ft(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}var y=new on;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,b,E,te,ne,se){ne<se?x.mm(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se),!1):x.position=new ft(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}),y.add("location",function(x,b,E,te,ne,se){ne<se?x.mm(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se),!0):x.location=new ft(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}),y.add("position:placeholder",function(x,b,E,te,ne,se){ne<se?x.mm(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se),!1):x.position=new ft(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}),y.add("position:nodeCollapse",function(x,b,E,te,ne,se){var he=x.actualBounds,_e=E.actualBounds;E=_e.x+_e.width/2-he.width/2,he=_e.y+_e.height/2-he.height/2,ne<se?x.mm(te(ne,b.x,E-b.x,se),te(ne,b.y,he-b.y,se),!1):x.position=new ft(te(ne,b.x,E-b.x,se),te(ne,b.y,he-b.y,se))}),y.add("desiredSize",function(x,b,E,te,ne,se){x.desiredSize=new sn(te(ne,b.width,E.width-b.width,se),te(ne,b.height,E.height-b.height,se))}),y.add("width",function(x,b,E,te,ne,se){x.width=te(ne,b,E-b,se)}),y.add("height",function(x,b,E,te,ne,se){x.height=te(ne,b,E-b,se)}),y.add("fill",function(x,b,E,te,ne,se){x.fill=xc(b,E,ne,se,te)}),y.add("stroke",function(x,b,E,te,ne,se){x.stroke=xc(b,E,ne,se,te)}),y.add("strokeWidth",function(x,b,E,te,ne,se){x.strokeWidth=te(ne,b,E-b,se)}),y.add("strokeDashOffset",function(x,b,E,te,ne,se){x.strokeDashOffset=te(ne,b,E-b,se)}),y.add("background",function(x,b,E,te,ne,se){x.background=xc(b,E,ne,se,te)}),y.add("areaBackground",function(x,b,E,te,ne,se){x.areaBackground=xc(b,E,ne,se,te)}),y.add("opacity",function(x,b,E,te,ne,se){x.opacity=te(ne,b,E-b,se)}),y.add("scale",function(x,b,E,te,ne,se){x.scale=te(ne,b,E-b,se)}),y.add("angle",function(x,b,E,te,ne,se){x.angle=te(ne,b,E-b,se)}),Ad=y}ot.Object.defineProperties(Gs.prototype,{animationReasons:{get:function(){return this.Zd}},isEnabled:{get:function(){return this.Jd},set:function(a){(this.Jd=a)&&this.Ei.each(function(y){y.isAnimating||y.runCount!==1/0||y.start()})}},duration:{get:function(){return this.Dg},set:function(a){1>a&&Pn(a,">= 1",Gs,"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}}}),Gs.prototype.stopAnimation=Gs.prototype.Cc;var Ad=null,Nd=!1,Mh=new nn(Gs,"Default",1),Dd=new nn(Gs,"AnimateLocations",2),wp=new nn(Gs,"None",3);Gs.className="AnimationManager",Gs.defineAnimationEffect=function(a,y){Nd||(xp(),Nd=!0),Ad.add(a,y)},Gs.Default=Mh,Gs.AnimateLocations=Dd,Gs.None=wp;function ca(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=ed,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Zn,this.vc=new on,this.Tt=new on,this.yl=new kn,this.Ut=new kn,this.dw=Yh,a&&Object.assign(this,a)}ca.prototype.suspend=function(){this.Xk=!0},ca.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,Id(this,!0),sh(this.Yd),Fl(this.H),du(this.Yd),this.H.redraw()};function Od(a,y){if(a.Tt.clear(),a.Wk=!1,a.au=0,a.Gd=NaN,0<a.yl.count&&a.yl.clear(),0<a.Ut.count&&a.Ut.clear(),y!==null)for(a=y.links;a.next();)a.value.Tg=null}$e=ca.prototype,$e.start=function(){if(this.vc.count===0||this.bc)return this;for(var a=this.H,y=this.vc.iterator;y.next();){var x=y.key;a===null&&(x instanceof rn?a=x:x instanceof Zt&&(a=x.diagram))}if(a!==null)this.H=a,this.Yd=a.animationManager;else return this;return y=this.Yd,y.isEnabled===!1?this:(this.Gd=isNaN(this.Dg)?y.duration:this.Dg,this.Lp=this.ot,y.Ok&&y.Pk===Mh&&this===y.defaultAnimation&&(this.Lp=Kg,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=Hd),sh(y),this.yl.each(function(b){b.data=null,a.add(b)}),du(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Lh(y,this),this)},$e.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},$e.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof rn?this.H=a:a instanceof Zt&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Ci){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return Zh(this,a,y,x,b,E),this};function Zh(a,y,x,b,E,te){var ne=a.vc;if(y instanceof rn&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(Nh(b),av(),b=[Tl.j,Tl.u,Tl.o,Tl.F],Nh(E),av(),E=[Tl.j,Tl.u,Tl.o,Tl.F]),ne.contains(y)){var se=ne.I(y),he=se.start,_e=se.end;he[x]===void 0&&(he[x]=wc(b)),_e[x]=wc(E)}else he={},_e={},he[x]=wc(b),_e[x]=wc(E),se=he.position,y instanceof Zt&&se instanceof ft&&!se.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&se.assign(_e.position),se=new _c(he,_e,te),ne.add(y,se);ne=he[x],ne instanceof ft&&!ne.w()&&ne.assign(a.o),te&&x.indexOf("position:")===0&&y instanceof Ci?se.Ku.location=wc(y.location):te&&(se.Ku[x]=wc(b))}function wc(a){return a instanceof ft||a instanceof wn?a.copy():a}$e.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},$e.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function Id(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var b=+new Date,E=b>a.cn?a.Gd:b-a.Qd;y&&(E=a.gw,E<a.Gd?(a.Qd=+new Date-E,a.cn=a.Qd+a.Gd):E=a.Gd),sh(x),_p(a,E),Fl(a.H,!0),du(x),b>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function _p(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var te=b.key;if(!(te instanceof Zt&&te.diagram===null)){var ne=b.value,se=E?ne.end:ne.start;ne=E?ne.start:ne.end;var he=Ad,_e;for(_e in ne)_e==="position"&&(ne["position:placeholder"]||ne["position:nodeCollapse"])||he.get(_e)===null||he.get(_e)(te,se[_e],ne[_e],a.Lp,y,x,a)}}}$e.stop=function(){return this.bc?(this.Ml(!0),this):this},$e.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,sh(x);for(var b=this.vc,E=this.yl.iterator;E.next();)y.remove(E.value);for(E=this.Ut.iterator;E.next();)E.value.v();E=this.ho,b=b.iterator;for(var te=Ad;b.next();){var ne=b.key,se=b.value,he=E?se.end:se.start,_e=E?se.start:se.end,Ee=se.Ku,Ne;for(Ne in _e)if(te.get(Ne)!==null){var He=Ne;!se.Hu||He!=="position:nodeCollapse"&&He!=="position:placeholder"||(He="position"),te.get(He)(ne,he[Ne],Ee[Ne]!==void 0?Ee[Ne]:se.Hu?he[Ne]:_e[Ne],this.Lp,this.Gd,this.Gd,this)}se.Hu&&Ee.location!==void 0&&ne instanceof Ci&&(ne.location=Ee.location),se.nv&&ne instanceof Ci&&ne.Zb(!1)}if(y.As.clear(),Rd(y,!1),y.Ya(),y.N(),Fl(y,!0),x.defaultAnimation===this){for(Ne=x.pr.iterator;Ne.next();)E=Ne.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}Fl(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),du(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),Od(this,null),x.Ml(this),y.$b())}},$e.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof Ki&&(b=y.placeholder),b!==null?(x=b.ga(xr),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new ft(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof Ki)for(a=a.memberParts;a.next();)b=a.value,b instanceof qn&&this.Cj(b,y)},$e.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Ki&&(x=y.placeholder),x!==null){var b=x.ga(xr);x=x.padding,b.x+=x.left,b.y+=x.top,this.add(a,"position:placeholder",a.position,b,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),b=this.vc,b.contains(a)&&(b.I(a).nv=!0),a instanceof Ki)for(a=a.memberParts;a.next();)b=a.value,b instanceof qn&&this.Aj(b,y)}},$e.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},ot.Object.defineProperties(ca.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Pn(a,">= 1",ca,"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){0<a?this.cu=a:Lt("Animation.runCount value must be a positive integer.")}},finished:{get:function(){return this.dn},set:function(a){this.dn!==a&&(this.dn=a)}},easing:{get:function(){return this.ot},set:function(a){this.ot=a}},isViewportUnconstrained:{get:function(){return this.j},set:function(a){this.j=a}},isAnimating:{get:function(){return this.bc}}}),ca.prototype.getTemporaryState=ca.prototype.Ez,ca.prototype.stop=ca.prototype.stop,ca.prototype.add=ca.prototype.add,ca.prototype.addTemporaryPart=ca.prototype.Iy;function ed(a,y,x,b){return a/=b/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Kg(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}ca.className="Animation",ca.EaseLinear=function(a,y,x,b){return x*a/b+y},ca.EaseInOutQuad=ed,ca.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},ca.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},ca.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},ca.EaseOutExpo=Kg;function _c(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}_c.className="AnimationState";function fu(a,y,x){this.xd=null,this.rf=a,this.so=x||bp,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=bc))}fu.prototype.copy=function(){var a=new fu(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 Yg(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))}ot.Object.defineProperties(fu.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 bp=new nn(fu,"Default",1),bc=new nn(fu,"Immediate",2),td=new nn(fu,"Bundled",3);fu.className="AnimationTrigger",fu.Default=bp,fu.Immediate=bc,fu.Bundled=td;function Xs(a){Di(this),this.H=null,this.Pa=new Ln,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)}$e=Xs.prototype,$e.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,_a(x)}a.clear(),this.Zq.length=0},$e.Xe=function(a){this.H=a},$e.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,b=0,E=0,te=0,ne=0,se=this.Pa.iterator;se.next();){var he=se.value;he instanceof Ki?E++:he instanceof qn?b++:he instanceof Bn?te++:he instanceof Fr?ne++:x++}if(se="",0<x&&(se+=x+" Parts "),0<b&&(se+=b+" Nodes "),0<E&&(se+=E+" Groups "),0<te&&(se+=te+" Links "),0<ne&&(se+=ne+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,se+=`
|
|
|
`+x.toString(),b=x.data,b!==null&&sr(b)&&(se+=" #"+sr(b)),x instanceof qn?se+=" "+wi(b):x instanceof Bn&&(se+=" "+wi(x.fromNode)+" "+wi(x.toNode));return y+" "+this.Pa.count+": "+se},$e.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var E=ft.alloc(),te=this.Pa.s,ne=te.length;ne--;){var se=te[ne];if((b!==!0||Dc(se)!==!1)&&se.isVisible()&&(E.assign(a),Un(E,se.oe),se=se.ic(E,y,x),se!==null&&(y!==null&&(se=y(se)),se!==null&&(x===null||x(se)))))return ft.free(E),se}return ft.free(E),null},$e.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof Ln||b instanceof kn||(b=new kn),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var te=ft.alloc(),ne=this.Pa.s,se=ne.length;se--;){var he=ne[se];if((E!==!0||Dc(he)!==!1)&&he.isVisible()){te.assign(a),Un(te,he.oe);var _e=he;he.ji(te,y,x,b)&&(y!==null&&(_e=y(_e)),_e===null||x!==null&&!x(_e)||b.add(_e))}}return ft.free(te),b},$e.Cf=function(a,y,x,b,E){if(y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof Ln||E instanceof kn||(E=new kn),this.Uh===!1)return E;var te=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(te=!0);for(var ne=this.Pa.s,se=ne.length;se--;){var he=ne[se];if((te!==!0||Dc(he)!==!1)&&he.isVisible()){var _e=he;he.Cf(a,y,x,b,E)&&(y!==null&&(_e=y(_e)),_e===null||x!==null&&!x(_e)||E.add(_e))}}return E},$e.Nu=function(a,y,x,b,E,te,ne){if(this.Uh===!1)return E;for(var se=this.Pa.s,he=se.length;he--;){var _e=se[he];if((ne!==!0||Dc(_e)!==!1)&&te(_e)&&_e.isVisible()){var Ee=_e;_e.Cf(a,y,x,b,E)&&(y!==null&&(Ee=y(Ee)),Ee===null||x!==null&&!x(Ee)||E.add(Ee))}}return E},$e.og=function(a,y,x,b,E,te){if(x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof Ln||E instanceof kn)&&(te=E),E=!0),te instanceof Ln||te instanceof kn||(te=new kn),this.Uh===!1)return te;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var se=ft.alloc(),he=ft.alloc(),_e=this.Pa.s,Ee=_e.length;Ee--;){var Ne=_e[Ee];if((ne!==!0||Dc(Ne)!==!1)&&Ne.isVisible()){se.assign(a),Un(se,Ne.oe),he.h(a.x+y,a.y),Un(he,Ne.oe);var He=Ne;Ne.og(se,he,x,b,E,te)&&(x!==null&&(He=x(He)),He===null||b!==null&&!b(He)||te.add(He))}}return ft.free(se),ft.free(he),te},$e.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=Wn();for(var E=Wn(),te=0;te<b;te++){var ne=x[te];if(ne.vw=te,ne instanceof Bn){if(ne.fd===!1)continue}else if(ne instanceof Fr&&ne.adornedPart!==null)continue;var se=ne.actualBounds;ne.isVisible()&&uo(se,y)?(ne.Fd(!0),a.push(ne)):(ne.Fd(!1),ne.adornments!==null&&0<ne.adornments.count&&E.push(ne))}for(y=0;y<a.length;y++)for(x=a[y],Rv(x),x=x.adornments;x.next();)b=x.value,b.measure(1/0,1/0),b.arrange(),b.Fd(!0);for(y=0;y<E.length;y++)Rv(E[y]);zn(a),zn(E)}}};function kh(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}$e.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var b=x.length;if(b!==0){if(a.isTemporary)for(var E=0;E<b;E++)x[E].Gj();E=kh(this,a);var te=this.Zq;te.length=0;for(var ne=y.scale,se=sn.alloc(),he=0;he<b;he++)this.Oj(a,x[he],y,te,ne,se,!0);if(sn.free(se),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function Xg(a,y,x,b,E){if(a.visible&&a.pb!==0&&(E||!a.isTemporary)){E=a.Pa.s;var te=E.length;if(te!==0){var ne=kh(a,y),se=a.Zq;se.length=0;for(var he=x.scale,_e=sn.alloc(),Ee=0;Ee<te;Ee++){var Ne=E[Ee];b.contains(Ne)&&a.Oj(y,Ne,x,se,he,_e,!1)}sn.free(_e),y.globalAlpha=ne}}}$e.Oj=function(a,y,x,b,E,te,ne){if(ne&&!Dc(y))a.Hs(y);else{if(b!==null&&y instanceof Bn&&(y.isOrthogonal&&b.push(y),y.fd===!1)){a.Hs(y);return}for(ne=!1,b=y.containingGroup;b!==null;)ne?b.tb!==null&&te.Ex(b.tb):b.tb!==null&&(ne=!0,te.assign(b.tb)),b=b.containingGroup;var se=y.actualBounds;if(b=!1,ne&&y.isVisible()){if(!te.Yc(se)){a.Hs(y);return}b=!te.Re(se)}b&&(a.save(),a instanceof ml?a.bk=te.copy():(a.beginPath(),a.rect(te.x,te.y,te.width,te.height),a.clip())),se.width*E>x.Oq||se.height*E>x.Oq?y.gc(a,x):(E=y.actualBounds,te=y.naturalBounds,E.width===0||E.height===0||isNaN(E.x)||isNaN(E.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(os(y,a,y.areaBackground,!0,!0,te,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(os(y,a,"rgba(0,0,0,0.3)",!0,!1,te,E),a.fillRect(E.x,E.y,E.width,E.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),os(y,a,y.background,!0,!1,te,E),a.fillRect(0,0,te.width/2,te.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)))))),b&&(a.restore(),a.Vc(!0))}},$e.g=function(a,y,x,b,E){var te=this.diagram;te!==null&&te.cb(Ro,a,this,y,x,b,E)},$e.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&_a(y),a>=b.count)a=b.count;else if(b.M(a)===y)return-1;return b.Gb(a,y),y.Vo(x),b=this.diagram,b!==null&&(x?b.N():b.oi(y)),yf(this,a,y),a},$e.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var b=this.Pa;if(0>a||a>=b.length){if(a=b.indexOf(y),0>a)return-1}else if(b.M(a)!==y&&(a=b.indexOf(y),0>a))return-1;return y.Wo(x),b.mb(a),b=this.diagram,b!==null&&(x?b.N():b.pc(y)),y.Ig=null,_a(y),a};function yf(a,y,x){if(y=Jg(a,y,x),x instanceof Ki&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var b=-1,E=a.Pa.s,te=E.length,ne=0;ne<te;ne++){var se=E[ne];if(se===x&&(y=ne,0<=b)||0>b&&se.containingGroup===x&&(b=ne,0<=y))break}!(0>b)&&b<y&&(E=a.Pa,E.mb(y),E.Gb(b,x))}y=x.containingGroup,y!==null&&yf(a,-1,y)}x.svg!==null&&x.svg.remove()}function Jg(a,y,x){var b=x.zOrder;if(isNaN(b))return y;a=a.Pa;var E=a.count;if(1>=E)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var te=y-1,ne=NaN;0<=te&&(ne=a.M(te).zOrder,!!isNaN(ne));)te--;for(var se=y+1,he=NaN;se<E&&(he=a.M(se).zOrder,!!isNaN(he));)se++;if(!isNaN(ne)&&ne>b)for(;;){if(te===-1||ne<=b){if(te++,te===y)break;return a.mb(y),a.Gb(te,x),te}for(ne=NaN;0<=--te&&(ne=a.M(te).zOrder,isNaN(ne)););}else if(!isNaN(he)&&he<b)for(;;){if(se===E||he>=b){if(se--,se===y)break;return a.mb(y),a.Gb(se,x),se}for(he=NaN;++se<E&&(he=a.M(se).zOrder,isNaN(he)););}return y}ot.Object.defineProperties(Xs.prototype,{parts:{get:function(){return this.Pa.iterator}},partsBackwards:{get:function(){return this.Pa.iteratorBackwards}},diagram:{get:function(){return this.H}},name:{get:function(){return this.xa},set:function(a){var y=this.xa;if(y!==a){var x=this.diagram;if(x!==null)for(y===""&&Lt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Lt("Layer.name is already present in this diagram: "+a);for(this.xa=a,this.g("name",y,a),a=this.Pa.iterator;a.next();)a.value.layerName=this.xa}}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&Pn(a,"0 <= value <= 1",Xs,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,a!==null&&a.N())}},isTemporary:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&((this.o=a)&&(this.isInDocumentBounds=!1),this.g("isTemporary",y,a))}},visible:{get:function(){return this.u},set:function(a){var y=this.u;if(y!==a){for(this.u=a,this.g("visible",y,a),y=this.Pa.iterator;y.next();)y.value.Zb(a);a=this.diagram,a!==null&&a.N()}}},pickable:{get:function(){return this.Uh},set:function(a){var y=this.Uh;y!==a&&(this.Uh=a,this.g("pickable",y,a))}},isInDocumentBounds:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a,this.diagram!==null&&this.diagram.Ya())}},allowCopy:{get:function(){return this.Fi},set:function(a){var y=this.Fi;y!==a&&(this.Fi=a,this.g("allowCopy",y,a))}},allowDelete:{get:function(){return this.Gi},set:function(a){var y=this.Gi;y!==a&&(this.Gi=a,this.g("allowDelete",y,a))}},allowTextEdit:{get:function(){return this.Pi},set:function(a){var y=this.Pi;y!==a&&(this.Pi=a,this.g("allowTextEdit",y,a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var y=this.Hi;y!==a&&(this.Hi=a,this.g("allowGroup",y,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var y=this.Qi;y!==a&&(this.Qi=a,this.g("allowUngroup",y,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var y=this.Ii;y!==a&&(this.Ii=a,this.g("allowLink",y,a))}},allowRelink:{get:function(){return this.Ki},set:function(a){var y=this.Ki;y!==a&&(this.Ki=a,this.g("allowRelink",y,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var y=this.Ji;y!==a&&(this.Ji=a,this.g("allowMove",y,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var y=this.Li;y!==a&&(this.Li=a,this.g("allowReshape",y,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var y=this.Mi;y!==a&&(this.Mi=a,this.g("allowResize",y,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var y=this.Ni;y!==a&&(this.Ni=a,this.g("allowRotate",y,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var y=this.Oi;y!==a&&(this.Oi=a,this.g("allowSelect",y,a))}}}),Xs.prototype.findObjectsNear=Xs.prototype.og,Xs.prototype.findObjectsIn=Xs.prototype.Cf,Xs.prototype.findObjectsAt=Xs.prototype.ji,Xs.prototype.findObjectAt=Xs.prototype.ic,Xs.className="Layer";function rn(a,y){if(hm||(xa(),hm=!0),Di(this),ah=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,ts){var x=this,b=function(){x.removeEventListener(jt.document,"DOMContentLoaded",b,!1),x.setRTL()};jt.document.body!==null?this.setRTL():x.addEventListener(jt.document,"DOMContentLoaded",b,!1)}this.ol=null,kf.add("Model",io);var E=this;return this.Hb=function(te){var ne=E.partManager;if(te.model===ne.diagram.model&&ne.diagram.aa){ne.diagram.aa=!1;try{var se=te.change;te.modelChange===""&&se===Ro&&ne.updateDataBindings(te.object,te.propertyName)}finally{ne.diagram.aa=!0}}},this.Oc=function(te){E.partManager.doModelChanged(te)},this.hu=this.ku=null,qg(this),this.model=cy(),this.Wg=!0,$g(this),this.layout=new Zo,this.Wg=!1,this.ck=this.ek=this.fk=this.dk=this.ui=this.aA=this.$j=this.Ov=null,this.hk=function(){},this.preventDefault=null,this.rn=!1,this.Yf=new cm,a!==void 0&&(typeof a=="string"||jt.Element&&a instanceof Element?Cp(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Pc,ah;function qg(a){a.Yd=new Gs,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new Ln,a.pj=new on,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new ft(NaN,NaN).freeze(),a.du=new ft(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new ft(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new Ii,a.zu=new ft(NaN,NaN).freeze(),a.ut=new sn(NaN,NaN,NaN,NaN).freeze(),a.rj=new nr(0,0,0,0).freeze(),a.sj=Yh,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Ea,a.zk=As,a.Fg=Ea,a.pq=As,a.yt=xr,a.Bt=xr,a.Fc=!0,a.pn=!1,a.De=new kn,a.Eh=new on,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new nr(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new ea,a.bq.diagram=a,a.Qg=new ea,a.Qg.diagram=a,a.cj=new ea,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,nv(a),a.ai=new kn,a.Ht=!0,a.uu=Xh,a.pw=!1,a.wu=Ud,a.it="auto",a.Op="auto",a.zh=null,a.Fh=null,a.Bh=null,a.Qh=null,a.Oh=null,a.Nh=null,a.Qt=null,a.Lh=null,a.xt=!1,a.Mh=null,a.Ph=null,a.$h=null,a.Ch=null,a.Rt=!1,a.Yt={},a.oj=[null,null],a.Wg=!1,a.Iw=!1,a.ou=!1,a.lt=!1,a.rw=!0,a.ld=!1,a.$i=!1,a.Tw=!0,a.Ce=-2,a.Og=new on,a.Xn=new Ln,a.Gg=!1,a.Jd=!0,a.Us=!0,a.Fi=!0,a.Gi=!0,a.Vs=!1,a.Ws=!0,a.Pi=!0,a.Hi=!0,a.Qi=!0,a.Ys=!0,a.Ii=!0,a.Ki=!0,a.Ji=!0,a.Li=!0,a.Mi=!0,a.Ni=!0,a.Oi=!0,a.Zs=!0,a.at=!0,a.qw=!1,a.Vk=!1,a.mn=!0,a.nn=!0,a.Xs=!0,a.$s=!0,a.iu=16,a.mu=16,a.qr=!1,a.gu=!1,a.lu=0,a.ju=0,a.yb=new nr(5).freeze(),a.Hw=new kn().freeze(),a.Nt=999999999,a.nw=new kn().freeze(),a.Zi=!0,a.Ee=!0,a.vd=!0,a.Be=!1,a.gf=!1,a.xh=!0,a.hf=!1,a.sy=new kn,a.ow=new kn,a.Xh=null,a.aw=new wn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new ft,bounds:new sn,Py:new wn,bA:new wn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new sn(NaN,NaN,NaN,NaN).freeze(),a.wo=new wn(NaN,NaN).freeze(),a.Sp=new sn(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new on;var y=new qn,x=new Lo;x.bind(new ms("text","",wi)),y.add(x),a.ny=y,a.Lg.add("",y),y=new qn,x=new Lo,x.stroke="brown",x.bind(new ms("text","",wi)),y.add(x),a.Lg.add("Comment",y),y=new qn,y.selectable=!1,y.avoidable=!1,x=new ir,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new wn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new on,y=new Ki,y.selectionObjectName="GROUPPANEL",y.type=Dn.Vertical,x=new Lo,x.font="bold 12pt sans-serif",x.bind(new ms("text","",wi)),y.add(x),x=new Dn(Dn.Auto),x.name="GROUPPANEL";var b=new ir;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new ja,b.padding=new nr(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new on,y=new Bn,x=new ir,x.isPanelMain=!0,y.add(x),x=new ir,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Bn,x=new ir,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Fr,y.type=Dn.Auto,x=new ir,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new ja,x.margin=new nr(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Fr,y.type=Dn.Link,x=new ir,x.isPanelMain=!0,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),a.Kt=y,a.fe=null,a.mq=!1,a.Ck=null,a.partManager=new io,a.toolManager=new bo,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new ce,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=Qg(),a.eq=null,a.fq=di,a.Pw=!1,a.Mb=1,a.Yh=null,a.Oq=1,a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0,a.yq=1,a.tw=0,a.uw=new ft,a.zy=500,a.wp=new ft,a.wq=!1}rn.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),ld=null,kc="",Pp(this,!1),this.Xn.clear(),Hf(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function Pp(a,y){a.animationManager.Cc(!0),a.Hw=new kn().freeze(),a.nw=new kn().freeze();var x=a.skipsUndoManager,b=a.cc!==null&&a.cc!==void 0;b&&(a.skipsUndoManager=!0);var E=null;a.fe!==null&&(E=a.fe.part,E!==null&&a.remove(E));var te=[],ne=a.Wa.length;if(y){for(y=0;y<ne;y++)for(var se=a.Wa.s[y].parts;se.next();){var he=se.value;he!==E&&he.data===null&&te.push(he)}for(y=0;y<te.length;y++)a.remove(te[y])}for(y=0;y<ne;y++)a.Wa.s[y].clear();return a.partManager.clear(),a.De.clear(),a.Eh.clear(),a.ai.clear(),a.Ck=null,a.Xn.clear(),Hf(),a.Og.clear(),Tr=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),te}function Qg(){return null}rn.prototype.reset=function(){this.clear(),this.vb=!0,qg(this),Vu(this),this.Wg=!0,$g(this),this.layout=new Zo,this.Wg=!1,this.model=cy(),this.model.undoManager=new No,this.vb=this.rn=!1,this.N()},rn.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=jt.document.body);var y=Fn("div");y.dir="rtl",y.style.cssText="font-size: 14px; width: 1px; height: 1px; position: absolute; top: -1000px; overflow: scroll;",y.textContent="A",a.appendChild(y);var x="reverse";0<y.scrollLeft?x="default":(y.scrollLeft=1,y.scrollLeft===0&&(x="negative")),a.removeChild(y),this.bu=x},rn.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=jt.document.body);var y=0;if(ts){var x=um;y=Pc,x===null&&(x=um=Fn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Pc=Fn("div"),y.style.position="absolute",y.style.visibility="hidden",y.style.width="200px",y.style.height="150px",y.style.boxSizing="content-box",y.appendChild(x)),y.style.overflow="hidden",a.appendChild(y);var b=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,b===x&&(x=y.clientWidth),a.removeChild(y),y=b-x,y!==0||Sr||(y=11)}this.Db=y,this.Gw=!0},rn.prototype.qb=function(a){a.classType===rn&&(this.autoScale=a)},rn.prototype.toString=function(a){a===void 0&&(a=0);var y="";if(this.div&&this.div.id&&(y=this.div.id),y='Diagram "'+y+'"',0>=a)return y;for(var x=this.Wa.iterator;x.next();)y+=`
|
|
|
`+x.value.toString(a-1);return y};function Cp(a,y){if(ts){if(y!=null||Lt("Diagram setup requires an argument DIV."),a.Ka!==null&&Lt("Diagram has already completed setup."),typeof y=="string"?a.Ka=jt.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Lt("No DIV or DIV id supplied: "+y),a.Ka===null&&Lt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Lt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&jt.ResizeObserver){var x=On(function(){a.$b()},250);a.ol=new jt.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}jt.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var b="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=b,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=jt.go;var E=new tu(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",jt.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),E.style.zIndex="2",E.style.userSelect="none",E.style.MozUserSelect="none",E.style.touchAction="none",E.style.letterSpacing="normal !important",E.style.wordSpacing="normal !important"),a.ta=E,a.ib=E.context,b=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),Dp(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new tu(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,ts){E=Fn("div");var te=Fn("div");E.style.position="absolute",E.style.overflow="auto",E.style.width=a.Aa+"px",E.style.height=a.ya+"px",E.style.zIndex="1",te.style.position="absolute",te.style.width="1px",te.style.height="1px",a.Ka.appendChild(E),E.appendChild(te),E.onscroll=tm,E.addEventListener("pointerdown",nm),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=te}a.hk=On(function(){a.Yh=null,a.N()},300),a.Ov=On(function(){Ep(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var se=Rl(a,ne,!0);se.bubbles=!0;var he=0,_e=0;se.delta=0,ne.deltaX!==void 0?(ne.deltaX!==0&&(he=0<ne.deltaX?1:-1),ne.deltaY!==0&&(_e=0<ne.deltaY?1:-1),se.delta=Math.abs(ne.deltaX)>Math.abs(ne.deltaY)?-he:-_e):ne.wheelDeltaX!==void 0?(ne.wheelDeltaX!==0&&(he=0<ne.wheelDeltaX?-1:1),ne.wheelDeltaY!==0&&(_e=0<ne.wheelDeltaY?-1:1),se.delta=Math.abs(ne.wheelDeltaX)>Math.abs(ne.wheelDeltaY)?-he:-_e):ne.wheelDelta!==void 0&&ne.wheelDelta!==0&&(se.delta=0<ne.wheelDelta?1:-1),a.doMouseWheel(),pu(se,ne)}},a.aA=function(ne){a.isEnabled&&(a.Vk=!1,Rl(a,ne,!0),ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())},a.ui=function(ne){if(a.isEnabled){a.Vk=!0;var se=a.Yt;se[ne.pointerId]===void 0&&(se[ne.pointerId]=ne),se=a.oj;var he=!1;if(se[0]===null||se[0].pointerId!==ne.pointerId&&se[0].pointerType===ne.pointerType)if(se[1]!==null&&se[1].pointerId===ne.pointerId)se[1]=ne,he=!0;else if(se[0]===null)se[0]=ne;else if(se[1]===null)se[1]=ne,he=!0;else{ne.preventDefault();return}else se[0]=ne;(se=ne.pointerType==="touch"||ne.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var _e=he;he=Tp(a,ne,!0,!1,!0,_e),id(a,ne,he),he.targetDiagram=kp(ne,ne.target),he.targetObject=null,_e||he.clone(a.bq),_e=a.uw,se=se?25:10,ne.timeStamp-a.tw<a.zy&&!(Math.abs(_e.x-ne.screenX)>se||Math.abs(_e.y-ne.screenY)>se)?a.yq++:a.yq=1,he.clickCount=a.yq,a.tw=ne.timeStamp,a.uw.sg(ne.screenX,ne.screenY),a.doMouseDown(),ne.button===1?ne.preventDefault():pu(he,ne)}},a.dk=function(ne){if(a.isEnabled){a.Vk=!0;var se=a.oj;if(se[0]===null||se[0].pointerId!==ne.pointerId&&se[0].pointerType===ne.pointerType){if(se[1]!==null&&se[1].pointerId===ne.pointerId){se[1]=ne;return}if(se[0]===null)se[0]=ne;else return}else se[0]=ne;if(se[0].pointerId===ne.pointerId){se=Tp(a,ne,!1,!1,!1,se[1]!==null);var he=jt.document.elementFromPoint(ne.clientX,ne.clientY)||null;he!==null&&he.shadowRoot!==void 0&&he.shadowRoot!==null&&(he=he.shadowRoot.elementFromPoint(ne.clientX,ne.clientY));var _e=a,Ee=ne;he&&he.H&&(Ee=ne,_e=he.H),se.targetDiagram=_e,id(a,Ee,se),se.targetObject=null,a.doMouseMove(),pu(se,ne)}}},a.fk=function(ne){if(a.isEnabled){a.Vk=!0;var se=ne.pointerType==="touch"||ne.pointerType==="pen",he=a.Yt;if(se&&a.qu)delete he[ne.pointerId],ne.preventDefault();else if(he=a.oj,he[0]===null||he[0].pointerId!==ne.pointerId&&he[0].pointerType===ne.pointerType)he[1]!==null&&he[1].pointerId===ne.pointerId&&(he[1]=null);else{he[0]=null,he=Tp(a,ne,!1,!0,!0,!1);var _e=jt.document.elementFromPoint(ne.clientX,ne.clientY)||null;_e!==null&&_e.shadowRoot!==void 0&&_e.shadowRoot!==null&&(_e=_e.shadowRoot.elementFromPoint(ne.clientX,ne.clientY)),_e!==null&&_e.H instanceof rn&&_e.H!==a&&id(_e.H,ne,he),_e===null&&(_e=ne.target),id(a,ne,he),he.clickCount=a.yq,he.targetDiagram=kp(ne,_e),he.targetObject=null,a.doMouseUp(),pu(he,ne),se&&(a.wq=!1)}}},a.ek=function(ne){if(a.isEnabled){a.Vk=!1;var se=a.Yt;se[ne.pointerId]&&delete se[ne.pointerId],se=a.oj,se[0]!==null&&se[0].pointerId===ne.pointerId&&(se[0]=null),se[1]!==null&&se[1].pointerId===ne.pointerId&&(se[1]=null),ne.pointerType!=="touch"&&ne.pointerType!=="pen"&&(ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())}},a.ck=function(ne){var se=a.oj;se[0]!==null&&se[0].pointerId===ne.pointerId?(se[0]=null,a.wq=!1):se[1]!==null&&se[1].pointerId===ne.pointerId&&(se[1]=null)},a.Vp=b.Z["d"+Wd[1]+Wd[2]+"wI"+hd.slice(1,5)]["b"+Dx.slice(1,y)](b.Z,Gd,y,y),b.Vc(!0),tv(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}rn.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},rn.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function tv(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(jt,"resize",a.Ov,!1)}function Xa(a){30<a.Sq&&(a.Yh=1)}function Rd(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),or&&or.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}rn.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:jt.devicePixelRatio||1},rn.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},rn.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},rn.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},rn.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},rn.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},rn.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},rn.prototype.doFocus=function(){this.focus()},rn.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=jt.scrollX||jt.pageXOffset,y=jt.scrollY||jt.pageYOffset;this.ta.focus(),jt.scrollTo(a,y)}},rn.prototype.Oy=function(){this.H.R("GainedFocus")},rn.prototype.Ny=function(){this.H.R("LostFocus")};function Ep(a){if(a.ta!==null){var y=a.Ka;if(y!==null&&y.clientWidth!==0&&y.clientHeight!==0){a.Gw||a.setScrollWidth();var x=a.gf?a.Db:0,b=a.Be?a.Db:0,E=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==E&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+b)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===Ea&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function $g(a){var y=new Xs;y.name="Background",a.Al(y),y=new Xs,y.name="",a.Al(y),y=new Xs,y.name="Foreground",a.Al(y),y=new Xs,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new Xs,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new Xs,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function em(a){var y=new Dn(Dn.Grid);y.name="GRID";var x=new ir;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new ir,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new ir,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new ir,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new ir,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new ir,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Ci,x.add(y),x.layerName="Grid",x.zOrder=0,x.isInDocumentBounds=!1,x.isAnimated=!1,x.pickable=!1,x.locationObjectName="GRID",a.add(x),a.partManager.parts.remove(x),y.visible=!1,y}function tm(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):sd(this.H)}function nm(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):sd(this.H)}rn.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var b=this.documentBounds,E=this.viewportBounds,te=this.rj,ne=b.x-te.left,se=b.y-te.top,he=b.width+te.left+te.right,_e=b.height+te.top+te.bottom,Ee=b.right+te.right;te=b.bottom+te.bottom;var Ne=E.x;b=E.y;var He=E.width,Ye=E.height,Qe=E.right,st=E.bottom;E=this.scale;var Pt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Pt=Pt+a.scrollWidth-a.clientWidth;break;case"reverse":Pt=a.scrollWidth-Pt-a.clientWidth}var St=Pt;He<he||Ye<_e?(Pt=ft.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==St&&(Pt.x=St/E+ne,this.ju=St),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Pt.y=a.scrollTop/E+se,this.lu=a.scrollTop),this.position=Pt,ft.free(Pt),this.Ee=this.qr=!1):(Pt=ft.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<Ne&&(this.position=Pt.h(St+ne,this.position.y)),Ee>Qe&&(this.position=Pt.h(-(y.scrollWidth-this.Aa)+St-this.Aa/E+Ee,this.position.y))),a.vy&&this.allowVerticalScroll&&(se<b&&(this.position=Pt.h(this.position.x,a.scrollTop+se)),te>st&&(this.position=Pt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+te))),ft.free(Pt),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,Ee=b.right,Qe=E.right,te=b.bottom,st=E.bottom,ne=b.x,Ne=E.x,se=b.y,b=E.y,He>=he&&ne>=Ne&&Ee<=Qe&&(x.style.width="1px"),Ye>=_e&&se>=b&&te<=st&&(x.style.height="1px"))}},rn.prototype.computeBounds=function(a){return a===void 0&&(a=new sn),da(this),Lp(this,a)};function Lp(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,b=a.Wa.s,E=b.length,te=0;te<E;te++){var ne=b[te];if(ne.visible&&ne.isInDocumentBounds){ne=ne.Pa.s;for(var se=ne.length,he=0;he<se;he++){var _e=ne[he];_e.isInDocumentBounds&&_e.isVisible()&&(_e=_e.actualBounds,_e.w()&&(x?(x=!1,y.assign(_e)):y.ed(_e)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}rn.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(vn(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof Bn||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds))}else for(a=a.iterator;a.next();)b=a.value,!y&&b instanceof Bn||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new sn(NaN,NaN,0,0):x};function $l(a,y){if((y||a.hf)&&!a.vb&&a.ta!==null&&a.documentBounds.w()){if(a.vb=!0,y){var x=a.initialPosition;if(x.w()){a.vb=!1,a.position=x;return}x=ft.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=sn.allocAt(0,0,b.width,b.height);var E=ft.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,sn.free(b),ft.free(E),ft.free(x)}x=a.yh,y&&a.Fg!==Ea&&(x=a.Fg);var te=x!==Ea?nd(a,x):a.scale;x=a.pa.x,b=a.pa.y,E=a.Aa/te;var ne=a.ya/te,se=a.zk,he=a.pq;y&&!se.sb()&&(he.sb()||he.Xb())&&(se=he.Xb()?$i:he),Mp(a,a.documentBounds,E,ne,se,y),y=a.scale,a.scale=te,a.vb=!1,te=a.viewportBounds,Vt.B(te.x,x)&&Vt.B(te.y,b)&&Vt.B(te.width,E)&&Vt.B(te.height,ne)||a.onViewportBoundsChanged(new sn(x,b,E,ne),te,y,!1)}}function nd(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var b=a.documentBounds;if(!b.w())return x;var E=b.width;b=b.height;var te=a.Aa+(a.gf?a.Db:0),ne=a.ya+(a.Be?a.Db:0),se=te/E,he=ne/b;return y===Ll?(y=Math.min(he,se),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===Tc?(y=he>se?(ne-a.Db)/b:(te-a.Db)/E,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}rn.prototype.zoomToFit=function(){var a=this.sj;this.sj=Yh,this.scale=nd(this,Ll),a!==Yh&&($l(this,!1),Mp(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},$e=rn.prototype,$e.BA=function(a,y){y===void 0&&(y=Ll);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===Ll||y===Tc)if(isNaN(x))E=this.viewportBounds.height*this.scale/b;else if(isNaN(b))E=this.viewportBounds.width*this.scale/x;else{E=this.Aa;var te=this.ya;E=y===Tc?te/b>E/x?(te-(this.Be?this.Db:0))/b:(E-(this.gf?this.Db:0))/x:Math.min(te/b,E/x)}this.scale=E,this.position=new ft(a.x,a.y)}},$e.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new ft(x.x+(a.x*x.width+a.offsetX)-(y.x*b.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*b.height-y.offsetY))},$e.zz=function(a){if(a instanceof Zt){this.eq=a;var y=ft.alloc();this.fq=this.op(a.ga(xr,y)),ft.free(y)}else this.eq=null,this.fq=di};function Mp(a,y,x,b,E,te){var ne=ft.allocAt(a.pa.x,a.pa.y),se=ne.x,he=ne.y;if(a.eq!==null){var _e=ft.alloc();_e=a.eq.ga(xr,_e),se=_e.x-a.fq.x/a.scale,he=_e.y-a.fq.y/a.scale,E=qi,ft.free(_e)}(te||a.scrollMode===Yh)&&(E.sb()&&(x>y.width&&(se=y.x+(E.x*y.width+E.offsetX)-(E.x*x-E.offsetX)),b>y.height&&(he=y.y+(E.y*y.height+E.offsetY)-(E.y*b-E.offsetY))),E=a.rj,te=x-y.width,x<y.width+E.left+E.right?(se=Math.min(se+x/2,y.right+Math.max(te,E.right)-x/2),se=Math.max(se,y.left-Math.max(te,E.left)+x/2),se-=x/2):se>y.left?se=y.left:se<y.right-x&&(se=y.right-x),x=b-y.height,b<y.height+E.top+E.bottom?(he=Math.min(he+b/2,y.bottom+Math.max(x,E.bottom)-b/2),he=Math.max(he,y.top-Math.max(x,E.top)+b/2),he-=b/2):he>y.top?he=y.top:he<y.bottom-b&&(he=y.bottom-b)),ne.x=isFinite(se)?se:-a.yb.left,ne.y=isFinite(he)?he:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,ne),ne.x=y.x,ne.y=y.y),mf(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),Vu(a),ft.free(ne)}$e.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=lh(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Ci)return a}else if(a=lh(this,a,function(x){return x.part}),a instanceof Ci)return a;return null},$e.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),da(this);for(var b=this.Wa.iteratorBackwards;b.next();){var E=b.value;if(E.visible&&(E=E.ic(a,y,x),E!==null))return E}return null};function lh(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),da(a),a=a.Wa.iteratorBackwards;a.next();){var E=a.value;if(E.visible&&!E.isTemporary&&(E=E.ic(y,x,b),E!==null))return E}return null}$e.lz=function(a,y,x){return y===void 0&&(y=!0),Fd(this,a,function(b){return b.part},y?function(b){return b instanceof Ci&&b.canSelect()}:null,x)};function Fd(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof Ln||E instanceof kn||(E=new kn),da(a),a=a.Wa.iteratorBackwards;a.next();){var te=a.value;te.visible&&!te.isTemporary&&te.ji(y,x,b,E)}return E}$e.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof Ln||b instanceof kn||(b=new kn),da(this);for(var E=this.Wa.iteratorBackwards;E.next();){var te=E.value;te.visible&&te.ji(a,y,x,b)}return b},$e.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),Sf(this,a,function(E){return E instanceof Ci&&(!x||E.canSelect())},y,b)},$e.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof Ln||E instanceof kn||(E=new kn),da(this);for(var te=this.Wa.iteratorBackwards;te.next();){var ne=te.value;ne.visible&&ne.Cf(a,y,x,b,E)}return E},$e.Nu=function(a,y,x,b,E,te){var ne=new kn;da(this);for(var se=this.Wa.iteratorBackwards;se.next();){var he=se.value;he.visible&&he.Nu(a,y,x,b,ne,E,te)}return ne};function Sf(a,y,x,b,E){var te=null;for(te===void 0&&(te=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof Ln||E instanceof kn||(E=new kn),da(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,te,x,b,E)}return E}$e.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),Bd(this,a,y,function(te){return te instanceof Ci&&(!b||te.canSelect())},x,E)},$e.og=function(a,y,x,b,E,te){x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof Ln||E instanceof kn)&&(te=E),E=!0),te instanceof Ln||te instanceof kn||(te=new kn),da(this);for(var ne=this.Wa.iteratorBackwards;ne.next();){var se=ne.value;se.visible&&se.og(a,y,x,b,E,te)}return te};function Bd(a,y,x,b,E,te){var ne=null;for(ne===void 0&&(ne=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof Ln||E instanceof kn)&&(te=E),E=!0),te instanceof Ln||te instanceof kn||(te=new kn),da(a),a=a.Wa.iteratorBackwards;a.next();){var se=a.value;se.visible&&!se.isTemporary&&se.og(y,x,ne,b,E,te)}return te}rn.prototype.acceptEvent=function(a){return Rl(this,a,a instanceof MouseEvent)};function Rl(a,y,x){var b=a.Qg;return a.Qg=a.cj,a.cj=b,b.diagram=a,b.event=y,x?id(a,y,b):(b.viewPoint=a.Qg.viewPoint,b.documentPoint=a.Qg.documentPoint),a=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),b.modifiers=a,b.button=y.button,y.buttons!==void 0&&(b.buttons=y.buttons),Sr&&y.button===0&&y.ctrlKey&&(b.button=2),b.down=!1,b.up=!1,b.clickCount=1,b.delta=0,b.handled=!1,b.bubbles=!1,b.timestamp=y.timeStamp,b.isMultiTouch=!1,b.targetDiagram=kp(y,y.target),b.targetObject=null,b}function kp(a,y){return y===null?null:(y=y.H)?y:((y=a.path)||typeof a.composedPath!="function"||(y=a.composedPath()),y&&y[0]&&y[0].H?y[0].H:null)}function Tp(a,y,x,b,E,te){var ne=a.Qg;return a.Qg=a.cj,a.cj=ne,ne.diagram=a,ne.clickCount=1,a=ne.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),ne.modifiers=a,ne.event=y,ne.timestamp=y.timeStamp,ne.button=y.button,ne.buttons=y.buttons,Sr&&y.button===0&&y.ctrlKey&&(ne.button=2),ne.down=x,ne.up=b,ne.handled=!1,ne.bubbles=E,ne.isMultiTouch=te,ne}function pu(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}rn.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Rl(y,a,!1);switch(x.key=String.fromCharCode(a.which),x.down=!0,a.which){case 8:x.key="Backspace";break;case 33:x.key="PageUp";break;case 34:x.key="PageDown";break;case 35:x.key="End";break;case 36:x.key="Home";break;case 37:x.key="Left";break;case 38:x.key="Up";break;case 39:x.key="Right";break;case 40:x.key="Down";break;case 45:x.key="Insert";break;case 46:x.key="Del";break;case 48:x.key="0";break;case 187:case 61:case 107:x.key="Add";break;case 189:case 173:case 109:x.key="Subtract";break;case 27:x.key="Esc"}return y.doKeyDown(),pu(x,a)},rn.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Rl(y,a,!1);switch(x.key=String.fromCharCode(a.which),x.up=!0,a.which){case 8:x.key="Backspace";break;case 33:x.key="PageUp";break;case 34:x.key="PageDown";break;case 35:x.key="End";break;case 36:x.key="Home";break;case 37:x.key="Left";break;case 38:x.key="Up";break;case 39:x.key="Right";break;case 40:x.key="Down";break;case 45:x.key="Insert";break;case 46:x.key="Del"}return y.doKeyUp(),pu(x,a)},rn.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Rl(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),pu(x,a)},rn.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Rl(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),pu(x,a)},rn.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new ft(0,0);var x=y.getBoundingClientRect();return y=a.clientX-this.Aa/x.width*x.left,a=a.clientY-this.ya/x.height*x.top,this.Ab!==null?Un(new ft(y,a),this.Ab):new ft(y,a)};function id(a,y,x){var b=a.ta,E=a.Aa,te=a.ya,ne=0,se=0;b!==null&&(b=b.getBoundingClientRect(),ne=y.clientX-E/b.width*b.left,se=y.clientY-te/b.height*b.top),x.viewPoint.h(ne,se),a.Ab!==null?(y=ft.allocAt(ne,se),a.Ab.Cd(y),x.documentPoint.assign(y),ft.free(y)):x.documentPoint.h(ne,se)}function Ap(a,y,x){if(a.oj[0]!==null){y=a.oj[y];var b=a.ta;b!==null&&(b=b.getBoundingClientRect(),x.h(y.clientX-a.Aa/b.width*b.left,y.clientY-a.ya/b.height*b.top))}}rn.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function im(a){a.ld||da(a),a.Va()}rn.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},$e=rn.prototype,$e.Pz=function(){return this.kg},$e.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Fl(this),this.hf=!1,this.du=new ft(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&pi(function(){b.ld=!1,xs(y,"Model"),a(b)},1)},$e.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;jt.requestAnimationFrame(function(){y.kg&&y.bd()})}},$e.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Fl(this))};function Cc(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||sd(a)||(y&&da(a),x&&$l(a,!1))}function Fl(a,y){if(!a.ld&&(a.kg=!1,a.Ka!==null||a.wo.w())){a.ld=!0;var x=a.animationManager,b=a.Xn;if(!x.isAnimating&&b.length!==0){for(var E=b.s,te=E.length,ne=0;ne<te;ne++){var se=E[ne];Cs(se,!1),se.v()}b.clear()}b=a.ow,0<b.count&&(b.each(function(he){he.Nv()}),b.clear()),E=b=!1,x.defaultAnimation.isAnimating&&(E=!0,b=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||Ep(a),Cc(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Zu(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),da(a),te=!1,(!a.hf||a.xh)&&(a.hf?Up(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Up(a,!1)),te=!0),a.Jk=!1,da(a),a.ou||im(a),Cc(a,!0,!1),ne=!1,te?(x=sn.alloc(),x.assign(a.viewportBounds),a.hf||(ne=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Np(a)),a.R("LayoutCompleted"),Cc(a,!0,!1),sn.free(x)):x.Ok&&x.Qw&&(a.Fg!==Ea?a.scale=nd(a,a.Fg):a.yh!==Ea?a.scale=nd(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),$l(a,!0)),te&&ne&&a.eb("Initial Layout"),da(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function Np(a){if(a.Fg!==Ea)a.scale=nd(a,a.Fg);else if(a.yh!==Ea)a.scale=nd(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}$l(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Zu(a)}function da(a){if(a.De.count!==0&&(a.ld||!a.animationManager.isTicking)){for(var y=0;23>y;y++){var x=a.De.iterator;if(x===null||a.De.count===0)break;a.De=new kn,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof Ki&&b.U&65536&&(b.U=b.U^65536)})}}$e.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof Ki||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Ki&&x.isVisible()&&jd(this,x);for(a.reset();a.next();)x=a.value,x instanceof Bn&&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 Fr&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function jd(a,y){for(var x=Wn(),b=Wn(),E=y.memberParts;E.next();){var te=E.value;te.isVisible()&&(te instanceof Ki?(kl(te)||Fa(te)||Nc(te))&&jd(a,te):te instanceof Bn?te.fromNode===y||te.toNode===y?b.push(te):x.push(te):(te.measure(1/0,1/0),te.arrange()))}for(a=x.length,E=0;E<a;E++)te=x[E],te.measure(1/0,1/0),te.arrange();for(zn(x),y.measure(1/0,1/0),y.arrange(),a=b.length,y=0;y<a;y++)x=b[y],x.measure(1/0,1/0),x.arrange();zn(b)}$e.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},$e.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Lt("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){od(this);var x=this.Aa,b=this.ya;if(a.Gv.resize(x,b,x,b),x=this.Wa.s,b=x.length,this.Fd(x,b,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var E=this.Ca,te=Math.round(y.x*E)/E,ne=Math.round(y.y*E)/E,se=this.Ab;for(se.reset(),E!==1&&se.scale(E),y.x===0&&y.y===0||se.translate(-te,-ne),a.ti=null,Xy(a,se.m11,se.m12,se.m21,se.m22,se.dx,se.dy),this.pb!==1&&(a.globalAlpha=this.pb),Vh(this,a),y=this.Mb,this.ta.context.setTransform(y,0,0,y,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya),y=0;y<b;y++)x[y].gc(a,this);a=!1,this.Yf?cd(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(Ii.prototype.Cd=Ii.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(te=this.animationManager,!te.zb&&(!te.isAnimating||te.isTicking)&&(x=new Date,od(this),this.Ka.style.opacity!=="0")){if(b=a!==this.ib,y=this.Wa.s,E=y.length,this.Fd(y,E,this,this.viewportBounds),b)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!te.isAnimating)break e;te=this.Ab,te.reset(),ne=this.Mb,se=this.pa;var he=this.Ca,_e=Math.round(se.x*he)/he,Ee=Math.round(se.y*he)/he;for(he!==1&&te.scale(he),se.x===0&&se.y===0||te.translate(-_e,-Ee),a.setTransform(ne,0,0,ne,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),Vh(this,a),se=0;se<E;se++)a.setTransform(ne,0,0,ne,0,0),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),a.yc(),y[se].gc(a,this);if(y=!1,this.Yf?cd(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(Ii.prototype.Cd=Ii.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=or&&or.nx,x=this.zw,b||this.Yh===null){for(x[this.Tq]=y,this.Tq=(this.Tq+1)%x.length,E=y=0;E<x.length;E++)y+=x[E];this.Sq=y/x.length}if(this.pb!==1&&(a.globalAlpha=1),b)for(a.setTransform(1,0,0,1,0,0),b=0;b<x.length;b++)a.fillText(x[b].toString(),20,150+ +(20*b))}}};function xf(a,y,x,b,E,te,ne,se,he,_e){if(a.Ka!==null){a.ta===null&&Lt("No canvas specified"),ne===void 0&&(ne=null),se===void 0&&(se=null),he===void 0&&(he=!1),_e===void 0&&(_e=!1),od(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var Ee=a.Ca;a.Ca=E;var Ne=a.Wa.s,He=Ne.length;try{var Ye=new sn(te.x,te.y,b.width/E,b.height/E),Qe=Ye.copy();Qe.Co(x),Zu(a,Qe),da(a),a.Fd(Ne,He,a,Ye),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,b.width,b.height),se!==null&&se!==""&&(y.fillStyle=se,y.ox(0,0,b.width,b.height));var st=a.Mb;y.scale(st,st);var Pt=Ii.alloc();Pt.reset(),Pt.translate(x.left,x.top),Pt.scale(E),te.x===0&&te.y===0||Pt.translate(-te.x,-te.y),y.setTransform(Pt.m11,Pt.m12,Pt.m21,Pt.m22,Pt.dx,Pt.dy),y.yc(),y instanceof ml&&Xy(y,Pt.m11,Pt.m12,Pt.m21,Pt.m22,Pt.dx,Pt.dy),Ii.free(Pt),Vh(a,y),y.globalAlpha=a.pb;var St=a.Qj("Grid");if(ne){var Tt=new kn,At=ne.iterator;for(At.reset();At.next();){var It=At.value;It instanceof Ci&&(_e||It.layer!==St)&&(It.Gj(),Tt.add(It))}for(_e=0;_e<He;_e++)Xg(Ne[_e],y,a,Tt,he);Tt.each(function(tn){return tn.Gj()})}else for(Tt=0;Tt<He;Tt++){var Wt=Ne[Tt];Wt===St?_e&&Wt.gc(y,a,!0):Wt.gc(y,a,he)}a.$i=!1,a.Yf&&cd(a.Yf,a)&&a.Vp()}finally{a.Ca=Ee,a.ib.Vc(!0),a.vd=!0,a.Fd(Ne,He,a,a.viewportBounds),Zu(a),a.ib instanceof ml&&(a.ib.Nj.PA(),a.redraw())}}}$e.Gf=function(a){return this.Rg[a]},$e.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},$e.Tx=function(){this.Rg=new vi,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Sr||er),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function Vh(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}$e.Ql=function(a){return this.on[a]},$e.sA=function(a,y){this.on[a]=y},$e.Sx=function(){this.on=new vi,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},$e.set=function(a){return Object.assign(this,a),this},$e.Du=function(a){return this.nm(a)},$e.nm=function(a){return rd(this,a),this};function rd(a,y){var x=a instanceof Dn,b=a instanceof rn,E;for(E in y){E===""&&Lt("Setting properties requires non-empty property names");var te=a,ne=E;if(x||b){var se=E.indexOf(".");if(0<se){var he=E.substring(0,se);x?te=a.fb(he):(te=a[he],te==null&&(te=a.toolManager[he])),Kt(te)?ne=E.substr(se+1):Lt("Unable to find object named: "+he+" in "+a.toString()+" when trying to set property: "+E)}}if(ne[0]!=="_"&&!mi(te,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&mi(a.toolManager,ne))te=a.toolManager;else if(b&&sm(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof gi&&ne==="Changed"){a.Pe(y[ne]);continue}else Lt('Trying to set undefined property "'+ne+'" on object: '+te.toString());te[ne]=y[E],ne[0]==="_"&&te instanceof Zt&&te.Vw(ne)}}$e.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new on,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},$e.N=function(a){if(a===void 0)this.Fc=!0,this.$b();else{var y=this.viewportBounds;a.w()&&y.Yc(a)&&(this.Fc=!0,this.$b())}this.R("InvalidateDraw")},rn.prototype.invalidateViewport=function(a,y){if(this.Fc!==!0)if(this.Fc=!0,this.nl==="svg")this.bd();else{var x=this.Gf("temporaryPixelRatio")===!0;if(this.Gf("viewportOptimizations")===!0&&this.scrollMode!==Hd&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var b=this.scale,E=Math.max(a.y,y.y),te=Math.min(a.y+a.height,y.y+y.height);if(0<Math.max(0,Math.min(a.x+a.width,y.x+y.width)-Math.max(a.x,y.x))*b&&0<Math.max(0,te-E)*b){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(b=sn.alloc(),zp(this,this.computeBounds(b)),sn.free(b)),b=this.ta,b===null||b instanceof Ku)))){var ne=this.Mb;E=this.Aa*ne;var se=this.ya*ne,he=this.scale*ne;te=Math.round(Math.round(y.x*he)-Math.round(a.x*he)),y=Math.round(Math.round(y.y*he)-Math.round(a.y*he)),he=this.jw,a=this.oy,he.width!==E&&(he.width=E),he.height!==se&&(he.height=se),a.clearRect(0,0,E,se),he=190*ne;var _e=70*ne,Ee=Math.max(te,0),Ne=Math.max(y,0),He=Math.floor(E-Ee),Ye=Math.floor(se-Ne);a.drawImage(b.Oa,Ee,Ne,He,Ye,0,0,He,Ye),cd(this.Yf,this)&&a.clearRect(0,0,he,_e),b=Wn(),a=Wn(),Ye=Math.abs(te),He=Math.abs(y);var Qe=Ee===0?0:E-Ye;Ee=ft.allocAt(Qe,0),Ye=ft.allocAt(Ye+Qe,se),a.push(new sn(Math.min(Ee.x,Ye.x),Math.min(Ee.y,Ye.y),Math.abs(Ee.x-Ye.x),Math.abs(Ee.y-Ye.y)));var st=this.Ab;if(st.reset(),st.scale(ne,ne),this.Ca!==1&&st.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&st.translate(-ne.x,-ne.y),Un(Ee,st),Un(Ye,st),b.push(new sn(Math.min(Ee.x,Ye.x),Math.min(Ee.y,Ye.y),Math.abs(Ee.x-Ye.x),Math.abs(Ee.y-Ye.y))),Qe=Ne===0?0:se-He,Ee.h(0,Qe),Ye.h(E,He+Qe),a.push(new sn(Math.min(Ee.x,Ye.x),Math.min(Ee.y,Ye.y),Math.abs(Ee.x-Ye.x),Math.abs(Ee.y-Ye.y))),Un(Ee,st),Un(Ye,st),b.push(new sn(Math.min(Ee.x,Ye.x),Math.min(Ee.y,Ye.y),Math.abs(Ee.x-Ye.x),Math.abs(Ee.y-Ye.y))),cd(this.Yf,this)&&(E=0<te?0:-te,se=0<y?0:-y,Ee.h(E,se),Ye.h(he+E,_e+se),a.push(new sn(Math.min(Ee.x,Ye.x),Math.min(Ee.y,Ye.y),Math.abs(Ee.x-Ye.x),Math.abs(Ee.y-Ye.y))),Un(Ee,st),Un(Ye,st),b.push(new sn(Math.min(Ee.x,Ye.x),Math.min(Ee.y,Ye.y),Math.abs(Ee.x-Ye.x),Math.abs(Ee.y-Ye.y)))),ft.free(Ee),ft.free(Ye),Cc(this,!1,!0),this.Ka===null&&Lt("No div specified"),this.ta===null&&Lt("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(od(this),se=this.Mb,E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,this.Aa*se,this.ya*se),E.drawImage(this.jw.Oa,0<te?0:Math.round(-te),0<y?0:Math.round(-y)),te=this.pa,ne=this.Ca,he=Math.round(te.x*ne)/ne,_e=Math.round(te.y*ne)/ne,y=this.Ab,y.reset(),ne!==1&&y.scale(ne),te.x===0&&te.y===0||y.translate(-he,-_e),E.save(),E.beginPath(),te=a.length,ne=0;ne<te;ne++)he=a[ne],he.width!==0&&he.height!==0&&E.rect(Math.floor(he.x),Math.floor(he.y),Math.ceil(he.width),Math.ceil(he.height));for(E.clip(),E.setTransform(se,0,0,se,0,0),E.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),E.yc(),y=this.Wa.s,te=y.length,this.Fd(y,te,this,this.viewportBounds),Vh(this,E),E.globalAlpha=this.pb,se=0;se<te;se++)if(ne=y[se],he=b,ne.visible&&ne.pb!==0){_e=kh(ne,E),Ne=ne.Zq,Ne.length=0,Ee=this.scale,He=sn.alloc(),Ye=ne.Pa.s,st=Ye.length,Qe=he.length;for(var Pt=0;Pt<st;Pt++){var St=Ye[Pt],Tt=yd(St,St.actualBounds);e:{for(var At=2/Ee,It=4/Ee,Wt=0;Wt<Qe;Wt++){var tn=he[Wt];if(tn.width!==0&&tn.height!==0&&Tt.Vu(tn.x-At,tn.y-At,tn.width+It,tn.height+It)){Tt=!0;break e}}Tt=!1}Tt&&ne.Oj(E,St,this,Ne,Ee,He,!0)}sn.free(He),E.globalAlpha=_e}E.restore(),E.Vc(!0),this.Yf&&cd(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}zn(b),zn(a),this.ld=!1}}else this.bd();x&&(Xa(this),this.bd(),Rd(this,!0))}else x?(Xa(this),this.bd(),Rd(this,!0)):this.bd()}};function od(a){a.pn!==!1&&(a.pn=!1,Dp(a,a.Aa,a.ya))}function Dp(a,y,x){Vu(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function sd(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,b=a.ya,E=a.Ka,te=!1,ne=a.gf?a.Db:0,se=a.Be?a.Db:0,he=E.clientWidth||x+ne,_e=E.clientHeight||b+se,Ee=a.viewportBounds;E=Ee.x;var Ne=Ee.y,He=Ee.width,Ye=Ee.height;if((he!==x+ne||_e!==b+se)&&(a.gf=!1,a.Be=!1,se=ne=0,a.Aa=he,a.ya=_e,te=a.pn=!0,Vu(a)),!a.hf||!a.viewportBounds.w())return!0;var Qe=a.ku,st=a.hu;if(a.Ee=!1,!(te||a.gf||a.Be||a.mn||a.nn))return!0;var Pt=a.documentBounds,St=0,Tt=0,At=0,It=0,Wt=Ee.width,tn=Ee.height,Kn=a.rj;a.contentAlignment.sb()?(Pt.width>Wt&&(St=Kn.left,Tt=Kn.right),Pt.height>tn&&(At=Kn.top,It=Kn.bottom)):(St=Kn.left,Tt=Kn.right,At=Kn.top,It=Kn.bottom);var hi=Pt.width+St+Tt,ii=Pt.height+At+It;Kn=a.scale;var Rn=hi>he/Kn,_n=ii>_e/Kn;if(!(te||a.gf||a.Be||Rn||_n))return!0;St=Pt.x-St,he=Ee.x,Tt=Pt.right+Tt,_e=Ee.right+ne,At=Pt.y-At;var Zi=Ee.y;Pt=Pt.bottom+It,Ee=Ee.bottom+se;var Ri="1px";if(It="1px",a.scrollMode===Yh&&(Rn||_n)&&(Rn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Rn=1,St+1<he&&(Rn=Math.max((he-St)*Kn+a.Aa,Rn)),Tt>_e+1&&(Rn=Math.max((Tt-_e)*Kn+a.Aa,Rn)),Wt+ne+1<hi&&(Rn=Math.max((hi-Wt)*Kn+a.Aa,Rn)),Ri=Rn.toString()+"px"),_n&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Rn=1,At+1<Zi&&(Rn=Math.max((Zi-At)*Kn+a.ya,Rn)),Pt>Ee+1&&(Rn=Math.max((Pt-Ee)*Kn+a.ya,Rn)),tn+se+1<ii&&(Rn=Math.max((ii-tn)*Kn+a.ya,Rn)),It=Rn.toString()+"px")),Rn=Ri!=="1px",_n=It!=="1px",Rn&&_n||!Rn&&!_n||(_n&&(_e-=a.Db),Rn&&(Ee-=a.Db),hi<Wt+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,St+1<he&&(ne=Math.max((he-St)*Kn+a.Aa,ne)),Tt>_e+1&&(ne=Math.max((Tt-_e)*Kn+a.Aa,ne)),Wt+1<hi&&(ne=Math.max((hi-Wt)*Kn+a.Aa,ne)),Ri=ne.toString()+"px"),Rn=Ri!=="1px",ne=a.ya,Rn!==a.Be&&(ne=Rn?a.ya-a.Db:a.ya+a.Db),ii<tn+se||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(se=1,At+1<Zi&&(se=Math.max((Zi-At)*Kn+ne,se)),Pt>Ee+1&&(se=Math.max((Pt-Ee)*Kn+ne,se)),tn+1<ii&&(se=Math.max((ii-tn)*Kn+ne,se)),It=se.toString()+"px"),_n=It!=="1px"),a.qr&&Rn===a.Be&&_n===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(Rn!==a.Be&&(Ri==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),te=!0),a.Be=Rn,st.style.width=Ri,_n!==a.gf&&(It==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),te=!0,a.tn&&(se=ft.alloc(),_n?(y.style.left=a.Db+"px",a.position=se.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=se.h(a.pa.x-a.Db/a.scale,a.pa.y)),ft.free(se))),te&&Vu(a),a.gf=_n,st.style.height=It,a.gu=!0,te&&(a.pn=!0),y=Qe.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Wt+1<hi?y=(a.position.x-St)*Kn:St+1<he?y=Qe.scrollWidth-Qe.clientWidth:Tt>_e+1&&(y=a.position.x*Kn)),a.tn)switch(a.bu){case"negative":y=-(Qe.scrollWidth-y-Qe.clientWidth);break;case"reverse":y=Qe.scrollWidth-y-Qe.clientWidth}return Qe.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(tn+1<ii?Qe.scrollTop=(a.position.y-At)*Kn:At+1<Zi?Qe.scrollTop=Qe.scrollHeight-Qe.clientHeight:Pt>Ee+1&&(Qe.scrollTop=a.position.y*Kn)),he=a.Aa,_e=a.ya,Qe.style.width=he+(a.gf?a.Db:0)+"px",Qe.style.height=_e+(a.Be?a.Db:0)+"px",x!==he||b!==_e||a.animationManager.zb?(x=sn.allocAt(E,Ne,He,Ye),a.onViewportBoundsChanged(x,a.viewportBounds,Kn,te),sn.free(x),!1):!0}$e=rn.prototype,$e.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Lt("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&&Lt('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(es,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},$e.oi=function(a){this.partManager.oi(a);var y=this;gd(a,function(x){ad(y,x)}),(a instanceof Fr||a instanceof Ki&&a.placeholder!==null)&&a.v(),a.data!==null&&gd(a,function(x){ly(y.partManager,x)}),Fa(a)!==!0&&Nc(a)!==!0||this.De.add(a),B1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N(yd(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(yd(a,a.actualBounds)),this.$b()},$e.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&gd(a,function(x){uy(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N(yd(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(yd(a,a.actualBounds)),this.$b()},$e.remove=function(a){Op(this,a,!0)};function Op(a,y,x){var b=y.layer;b!==null&&b.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=b.pc(-1,y,!1),0<=x&&a.cb(Jo,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}$e.Is=function(a,y){if(y===void 0&&(y=!1),vn(a))for(var x=a.length,b=0;b<x;b++){var E=a[b];y&&!E.canDelete()||this.remove(E)}else for(x=new kn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},$e.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},rn.prototype.moveParts=function(a,y,x,b){if(x===void 0&&(x=!1),b===void 0&&(b=wf(this)),this.toolManager!==null){var E=new on;if(a!==null)if(vn(a))for(var te=0;te<a.length;te++)uh(this,E,a[te],x,b);else for(a=a.iterator;a.next();)uh(this,E,a.value,x,b);else{for(a=this.parts;a.next();)uh(this,E,a.value,x,b);for(a=this.nodes;a.next();)uh(this,E,a.value,x,b);for(a=this.links;a.next();)uh(this,E,a.value,x,b)}Ec(this,E,y,b,x)}};function uh(a,y,x,b,E,te){if(!y.contains(x)&&(te===void 0&&(te=!1),!b||te||x.canMove()||x.canCopy()))if(E===void 0&&(E=wf(a)),x instanceof qn){if(y.add(x,a.Pd(E,x,x.location)),x instanceof Ki&&(x.placeholder!==null||E.dragsMembers))for(te=x.memberParts;te.next();)uh(a,y,te.value,b,E,E.groupsAlwaysMove);for(te=x.linksConnected;te.next();){var ne=te.value;if(!y.contains(ne)){var se=ne.fromNode,he=ne.toNode;se!==null&&y.contains(se)&&he!==null&&y.contains(he)&&uh(a,y,ne,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)uh(a,y,x.value,b,E)}else if(x instanceof Bn)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)uh(a,y,x.value,b,E);else x instanceof Fr||y.add(x,a.Pd(E,x,x.location))}function Ec(a,y,x,b,E){if(y!==null&&y.count!==0){var te=ft.alloc(),ne=ft.alloc();ne.assign(x),isNaN(ne.x)&&(ne.x=0),isNaN(ne.y)&&(ne.y=0),(x=a.Mr)||bf(a,y);for(var se=Wn(),he=Wn(),_e=y.iterator,Ee=ft.alloc();_e.next();){var Ne=_e.key,He=_e.value;if(Ne.Zc()){var Ye=Ip(a,Ne,y);Ye!==null?se.push(new ie(Ne,He,Ye)):(!E||Ne.canMove())&&(Ye=He.point,te.assign(Ye),a.computeMove(Ne,te.add(ne),b,Ee),Ne.location=Ee,He.shifted===void 0&&(He.shifted=new ft),He.shifted.assign(Ee.re(Ye)))}else _e.key instanceof Bn&&he.push(_e.sa)}for(ft.free(Ee),E=se.length,_e=0;_e<E;_e++)Ne=se[_e],te.assign(Ne.info.point),Ne.Su.shifted===void 0&&(Ne.Su.shifted=new ft),Ne.node.location=te.add(Ne.Su.shifted);for(E=ft.alloc(),_e=ft.alloc(),Ne=he.length,He=0;He<Ne;He++){var Qe=he[He];if(Ye=Qe.key,Ye instanceof Bn)if(Ye.suspendsRouting){Ye.Tg=null,Ee=Ye.fromNode;var st=Ye.toNode;if(a.draggedLink!==null&&b.dragsLink)if(st=Qe.value.point,Ye.dragComputation===null)y.add(Ye,a.Pd(b,Ye,ne)),nc(Ye,ne.x-st.x,ne.y-st.y);else{Qe=ft.allocAt(0,0),(Ee=Ye.i(0))&&Ee.w()&&Qe.assign(Ee);var Pt=Ee=ft.alloc().assign(Qe).add(ne);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(Pt=ft.alloc(),_f(a,Ye,Ee,Pt,b)),Ee.assign(Ye.dragComputation(Ye,Ee,Pt)).re(Qe),y.add(Ye,a.Pd(b,Ye,Ee)),nc(Ye,Ee.x-st.x,Ee.y-st.y),ft.free(Qe),ft.free(Ee),Pt!==Ee&&ft.free(Pt)}else Ee!==null&&(E.assign(Ee.location),Pt=y.I(Ee),Pt!==null&&E.re(Pt.point)),st!==null&&(_e.assign(st.location),Pt=y.I(st),Pt!==null&&_e.re(Pt.point)),Ee!==null&&st!==null?E.Xa(_e)?(Ee=Qe.value.point,st=te,st.assign(E),st.re(Ee),y.add(Ye,a.Pd(b,Ye,E)),nc(Ye,st.x,st.y)):(Ye.suspendsRouting=!1,Ye.bb()):(Qe=Qe.value.point,Ee=Ee!==null?E:st!==null?_e:ne,y.add(Ye,a.Pd(b,Ye,Ee)),nc(Ye,Ee.x-Qe.x,Ee.y-Qe.y))}else(Ye.fromNode===null||Ye.toNode===null)&&(Ee=Qe.value.point,y.add(Ye,a.Pd(b,Ye,ne)),nc(Ye,ne.x-Ee.x,ne.y-Ee.y))}ft.free(te),ft.free(ne),ft.free(E),ft.free(_e),zn(se),zn(he),x||(da(a),Lc(a,y))}}rn.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new ft),b.assign(y),a===null)return b;var E=y,te=x.isGridSnapEnabled;te&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=ft.alloc(),_f(this,a,y,E,x)),x=a.dragComputation!==null?a.dragComputation(a,y,E):E;var ne=a.minLocation,se=ne.x;isNaN(se)&&(se=te?Math.round(1e3*a.location.x)/1e3:a.location.x),ne=ne.y,isNaN(ne)&&(ne=te?Math.round(1e3*a.location.y)/1e3:a.location.y);var he=a.maxLocation,_e=he.x;return isNaN(_e)&&(_e=te?Math.round(1e3*a.location.x)/1e3:a.location.x),he=he.y,isNaN(he)&&(he=te?Math.round(1e3*a.location.y)/1e3:a.location.y),b.h(Math.max(se,Math.min(x.x,_e)),Math.max(ne,Math.min(x.y,he))),E!==y&&ft.free(E),b};function wf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function _f(a,y,x,b,E){if(E===void 0&&(E=wf(a)),b.assign(x),y!==null){var te=a.grid;y=E.gridSnapCellSize,a=y.width,y=y.height;var ne=E.gridSnapOrigin,se=ne.x;if(ne=ne.y,E=E.gridSnapCellSpot,te!==null){var he=te.gridCellSize;isNaN(a)&&(a=he.width),isNaN(y)&&(y=he.height),te=te.gridOrigin,isNaN(se)&&(se=te.x),isNaN(ne)&&(ne=te.y)}te=ft.allocAt(0,0),te.yi(0,0,a,y,E),Vt.No(x.x,x.y,se+te.x,ne+te.y,a,y,b),ft.free(te)}}function bf(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Bn&&(y.suspendsRouting=!0)}function Lc(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Bn&&(x.suspendsRouting=!1,Yv(x)&&x.bb())}a.Mr=!1}}function Ip(a,y,x){return y=y.containingGroup,y!==null&&(a=Ip(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}$e=rn.prototype,$e.Pd=function(a,y,x){if(x===void 0)return new Th(Zn);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new Th(new ft(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new Th(x.copy())};function Rp(a,y,x){if(y.diagram!==null&&y.diagram!==a&&Lt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Lt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Lt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Lt("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var b=0;b<x;b++)a.M(b).name===y&&Lt("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}$e.Al=function(a){Rp(this,a,null),a.Xe(this);var y=this.Wa,x=y.count-1;if(!a.isTemporary)for(;0<=x&&y.M(x).isTemporary;)x--;return y.Gb(x+1,a),this.cc!==null&&this.cb(es,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},$e.Ww=function(a,y){Rp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(Jo,"layers",this,a,null,b,null));var E=x.count,te;for(te=0;te<E;te++)if(x.M(te)===y){x.Gb(te,a);break}return this.cc!==null&&this.cb(es,"layers",this,null,a,null,te),this.N(),0>b&&this.Ya(),this},$e.Cy=function(a,y){Rp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(Jo,"layers",this,a,null,b,null));var E=x.count,te;for(te=0;te<E;te++)if(x.M(te)===y){x.Gb(te+1,a);break}return this.cc!==null&&this.cb(es,"layers",this,null,a,null,te+1),this.N(),0>b&&this.Ya(),this},$e.kA=function(a){if(a.diagram!==this&&Lt("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 b=y.value,E=b.layerName;E!==a.name?b.layerName=E:b.layerName=""}this.cc!==null&&this.cb(Jo,"layers",this,a,null,x,null),this.N(),this.Ya()}}},$e.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},$e.Yw=function(a){return this.pf===null&&(this.pf=new Ln),this.pf.add(a),this.model.Pe(a),this},$e.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},$e.Pe=function(a){return this.zg===null&&(this.zg=new Ln),this.zg.add(a),this},$e.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},$e.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==ha&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},$e.cb=function(a,y,x,b,E,te,ne){te===void 0&&(te=null),ne===void 0&&(ne=null);var se=new Io;se.diagram=this,se.change=a,se.propertyName=y,se.object=x,se.oldValue=b,se.oldParam=te,se.newValue=E,se.newParam=ne,this.ds(se)},$e.g=function(a,y,x,b,E){this.cb(Ro,a,this,y,x,b,E)},rn.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var b=a.change;if(b===Ro){var E=a.object;if(Wo(E,a.propertyName,a.I(y)),E instanceof Zt){var te=E.part;te!==null&&te.Wb()}this.isModified=!0}else if(b===es){var ne=a.object,se=a.newParam,he=a.newValue;if(ne instanceof Dn)if(typeof se=="number"&&he instanceof Zt){y?ne.pc(se):ne.Gb(se,he);var _e=ne.part;_e!==null&&_e.Wb()}else typeof se=="number"&&he instanceof Es&&(he.isRow?c1(ne,se,y?void 0:he):d1(ne,se,y?void 0:he));else if(ne instanceof Xs){var Ee=a.oldParam===!0;typeof se=="number"&&he instanceof Ci&&(y?(he.isSelected=!1,he.isHighlighted=!1,he.Wb(),ne.pc(Ee?se:-1,he,Ee)):ne.oi(se,he,Ee))}else ne instanceof rn?typeof se=="number"&&he instanceof Xs&&(y?this.Wa.mb(se):(he.Xe(this),this.Wa.Gb(se,he))):Lt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===Jo){var Ne=a.object,He=a.oldParam,Ye=a.oldValue;if(Ne instanceof Dn)typeof He=="number"&&Ye instanceof Zt?y?Ne.Gb(He,Ye):Ne.pc(He):typeof He=="number"&&Ye instanceof Es&&(Ye.isRow?c1(Ne,He,y?Ye:void 0):d1(Ne,He,y?Ye:void 0));else if(Ne instanceof Xs){var Qe=a.newParam===!0;typeof He=="number"&&Ye instanceof Ci&&(y?0>Ne.Pa.indexOf(Ye)&&Ne.oi(He,Ye,Qe):(Ye.isSelected=!1,Ye.isHighlighted=!1,Ye.Wb(),Ne.pc(Qe?He:-1,Ye,Qe)))}else Ne instanceof rn?typeof He=="number"&&Ye instanceof Xs&&(y?(Ye.Xe(this),this.Wa.Gb(He,Ye)):this.Wa.mb(He)):Lt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==ha&&Lt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},rn.prototype.Ea=function(a){return this.undoManager.Ea(a)},rn.prototype.eb=function(a){return this.undoManager.eb(a)},rn.prototype.Kf=function(){return this.undoManager.Kf()},rn.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},rn.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},rn.prototype.rp=function(){this.partManager.rp()};function Fp(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,Vu(a),a.N(),a.Ee=!0,b.zb&&(El(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Vu(a);else{a.vb=!0;var E=a.viewportBounds.copy(),te=a.Aa,ne=a.ya,se=a.zoomPoint.x,he=a.zoomPoint.y,_e=a.contentAlignment;isNaN(se)&&(_e.$c()?_e.Hf(ga)?se=0:_e.Hf(is)&&(se=te-1):se=_e.sb()?_e.x*(te-1):te/2),isNaN(he)&&(_e.$c()?_e.Hf(ws)?he=0:_e.Hf(Pa)&&(he=ne-1):he=_e.sb()?_e.y*(ne-1):ne/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),x<a.minScale&&(x=a.minScale),x>a.maxScale&&(x=a.maxScale),te=ft.allocAt(a.pa.x+se/y-se/x,a.pa.y+he/y-he/x),a.position=te,ft.free(te),a.Ca=x,Vu(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),$l(a,!1),b.zb&&(El(b)||b.ce.add(b.H,"scale",y,a.Ca))}}rn.prototype.onViewportBoundsChanged=function(a,y,x,b){if(!a.D(y)){b===void 0&&(b=!1),b||(this.Ee=!0),this.vd=!0;var E=this.layout;E===null||!E.isViewportSized||this.autoScale!==Ea||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof bo&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Gh(E,this)),this.vb||this.invalidateViewport(a,y),Zu(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=b,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(te){te.isAvoiding&&te.actualBounds.Yc(y)&&te.bb()})}};function Zu(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=wn.alloc(),E=1,te=1,ne=x.O.s,se=ne.length,he=0;he<se;he++){var _e=ne[he],Ee=Math.abs(_e.interval);2>Ee||(mv(_e.figure)?te=te*Ee/Vt.vx(te,Ee):E=E*Ee/Vt.vx(E,Ee))}if(ne=x.gridCellSize,b.h(te*ne.width,E*ne.height),y!==void 0)E=y.width,te=y.height,a=y.x,ne=y.y;else{if(y=sn.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){sn.free(y);return}E=y.width,te=y.height,a=y.x,ne=y.y,sn.free(y)}x.width=E+2*b.width,x.height=te+2*b.height,y=ft.alloc(),Vt.No(a,ne,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),wn.free(b),x.part.location=y,ft.free(y)}}rn.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(),b=x.length,E=0;E<b;E++)x[E].isSelected=!1;y.ka(),y.clear(),y.freeze(),a||this.R("ChangedSelection",y)}},rn.prototype.select=function(a){a!==null&&a.diagram===this&&(!a.isSelected||1<this.selection.count)&&(this.R("ChangingSelection",this.selection),this.clearSelection(!0),a.isSelected=!0,this.R("ChangedSelection",this.selection))},rn.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),vn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof Ci||Lt("Diagram.selectCollection given something that is not a Part: "+b),b.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof Ci||Lt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},rn.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,b=0;b<x;b++)y[b].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},$e=rn.prototype,$e.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},$e.Jz=function(a){a=new kn().addAll(a);for(var y=this.highlighteds.copy().hp(a).iterator;y.next();)y.value.isHighlighted=!1;for(a=a.iterator;a.next();)y=a.value,y instanceof Ci||Lt("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},$e.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,te=ft.alloc();if(a==="pixel")E=x;else if(a==="line")E=x*(b?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=b?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(E=x*Math.max(a-(b?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){E=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=te.h(x.x,E.y):y==="left"?this.position=te.h(E.x,x.y):y==="down"?this.position=te.h(x.x,E.bottom-x.height):y==="right"&&(this.position=te.h(E.right-x.width,x.y)),ft.free(te);return}Lt("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}E/=this.scale,x=this.position,y==="up"?this.position=te.h(x.x,x.y-E):y==="down"?this.position=te.h(x.x,x.y+E):y==="left"?this.position=te.h(x.x-E,x.y):y==="right"?this.position=te.h(x.x+E,x.y):Lt("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),ft.free(te)},$e.tv=function(a){var y=this.viewportBounds;y.Re(a)||(a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a)},$e.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},$e.op=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),a.copy().transform(this.Ab)},$e.zA=function(a){var y=this.Ab,x=a.x,b=a.y,E=x+a.width,te=b+a.height,ne=y.m11,se=y.m12,he=y.m21,_e=y.m22,Ee=y.dx,Ne=y.dy,He=x*ne+b*he+Ee;y=x*se+b*_e+Ne;var Ye=E*ne+b*he+Ee;return a=E*se+b*_e+Ne,b=x*ne+te*he+Ee,x=x*se+te*_e+Ne,ne=E*ne+te*he+Ee,E=E*se+te*_e+Ne,te=Math.min(He,Ye),He=Math.max(He,Ye),Ye=Math.min(y,a),y=Math.max(y,a),te=Math.min(te,b),He=Math.max(He,b),Ye=Math.min(Ye,x),y=Math.max(y,x),te=Math.min(te,ne),He=Math.max(He,ne),Ye=Math.min(Ye,E),y=Math.max(y,E),new sn(te,Ye,He-te,y-Ye)},$e.Ps=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),Un(a.copy(),this.Ab)};function rm(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Bp(a){return a=kf.get(a),a!==null?new a:new io}rn.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===ha&&b[0]==="S")if(b==="StartingFirstTransaction"){var E=this;a=this.toolManager,a.mouseDownTools.each(function(he){return he.diagram=E}),a.mouseMoveTools.each(function(he){return he.diagram=E}),a.mouseUpTools.each(function(he){return he.diagram=E}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else b==="StartingUndo"||b==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):b==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===ha){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),da(this));var te=this.animationManager;b==="RolledBackTransaction"&&te.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||Ql(te),b==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),b!=="CommittedTransaction"&&b!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var ne=a.isTransactionFinished;if(ne&&(rm(this),this.As.clear(),oh(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var se=this;pi(function(){se.currentTool.standardMouseOver(),se.Rt=!1},10)}}}finally{this.aa=!0}}}};function ad(a,y){y=y.O.s;for(var x=y.length,b=0;b<x;b++)Mc(a,y[b])}function Mc(a,y){if(y instanceof $a){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof kn&&x.Bg.add(a);var b=y.Eg;if(b!==null&&b.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",b=a.Og.I(x),b===null)b=[],b.push(y),a.Og.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}}function jp(a,y){if(y instanceof $a){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var b=x.getAttribute("src")||"",E=a.Og.I(b);if(E!==null){for(var te=0;te<E.length;te++)if(E[te]===y){E.splice(te,1),E.length===0&&(a.Og.remove(b),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof kn&&x.Bg.remove(a),Hf(b));break}}}}}rn.prototype.Wd=function(){this.partManager.Wd()},rn.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},rn.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},rn.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},rn.prototype.Vb=function(a){return this.partManager.Vb(a)},rn.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},$e=rn.prototype,$e.Lc=function(a){return this.partManager.Lc(a)},$e.ii=function(a){return this.partManager.ii(a)},$e.Kc=function(a){return this.partManager.Kc(a)},$e.ms=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ms.apply(this.partManager,y instanceof Array?y:Oi(ti(y)))},$e.ls=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ls.apply(this.partManager,y instanceof Array?y:Oi(ti(y)))};function Vu(a){var y=a.pa,x=a.Ca;a.Rw.h(y.x,y.y,Math.max(a.Aa,0)/x,Math.max(a.ya,0)/x),a.vd=!0}function zp(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),$l(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}$e.Va=function(){if(this.Zi){var a=sn.alloc();zp(this,this.computeBounds(a)),sn.free(a)}},$e.rz=function(){for(var a=new kn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&a.add(x)}for(y=this.links;y.next();)x=y.value,x.isTopLevel&&a.add(x);return a.iterator},$e.qz=function(){return this.ai.iterator},$e.Uz=function(a){da(this),a&&Pf(this,!0),this.ld?Up(this,!1):(this.Jk=!0,Fl(this))};function Pf(a,y){for(var x=a.ai.iterator;x.next();)om(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function om(a,y,x){if(y!==null){for(var b=y.gl.iterator;b.next();)om(a,b.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function Up(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var b=a.undoManager.transactionLevel,E=a.layout,te=a.animationManager;try{b===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=b&&!te.defaultAnimation.isAnimating&&!te.zb&&(y||xs(te,"Layout")),a.xh=!1;for(var ne=a.ai.iterator;ne.next();)Hp(a,ne.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),da(a),E.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,b===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||b!==0&&b!==1||Ql(te),a.aa=x}}}function Hp(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)Hp(a,E.value,x,b);E=y.layout,E===null||E.isValidLayout||(!x||E.isRealtime||b===0?(y.rh=!y.location.w(),E.doLayout(y),y.C(32),jd(a,y),E.isValidLayout=!0):a.xh=!0)}}$e.yz=function(){for(var a=new Ln,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function nv(a){function y(E){var te=E.toLowerCase(),ne=new Ln;x.add(E,ne),x.add(te,ne),b.add(E,E),b.add(te,E)}var x=new on,b=new on;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=b}function sm(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function Cf(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;Lt("Unknown DiagramEvent name: "+y)}$e.Bj=function(a,y){return a=Cf(this,a),a!==null&&a.add(y),this},$e.am=function(a,y){a=Cf(this,a),a!==null&&a.remove(y)},$e.R=function(a,y,x){var b=Cf(this,a),E=new Eu;if(E.diagram=this,a=sm(this,a),a!==null&&(E.name=a),y!==void 0&&(E.subject=y),x!==void 0&&(E.parameter=x),y=b.length,y===1)b.M(0)(E);else if(y!==0)for(b=b.Fa(),x=0;x<y;x++)(0,b[x])(E)};function Ef(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}$e.Yj=function(a,y){return Lf(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},rn.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?Lp(this,a):a.assign(this.documentBounds)};function Lf(a,y,x,b){var E=a.Xh;if(E===null&&(a.Xh=E=new vg(a.avoidanceCellSize)),E.vs||E.group!==x||E.Yx!==b){if(E.Hx=Math.max(E.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),E.Ix=Math.max(E.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=am(a,x)),x===null){y=sn.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),E.initialize(y);for(var te=a.nodes;te.next();){var ne=te.value,se=ne.layer;se!==null&&se.visible&&!se.isTemporary&&Mf(a,ne,b,y)}sn.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=sn.alloc(),te=x.memberParts;te.next();)ne=te.value,ne instanceof qn&&Mf(a,ne,b,y);sn.free(y)}E.group=x,E.Yx=b,E.vs=!1}else y&&oS(E);return E}function am(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?am(a,y.containingGroup):null}function Mf(a,y,x,b){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(b),a=a.Xh;var E=y.x,te=y.y;if(Yf(a,E,te))for(x=(te-a.Od)/a.sc|0,b=Math.min((E+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((te+y.height-a.Od)/a.sc|0,a.ei),E=(E-a.Nd)/a.rc|0;E<=b;E++)if(te=a.ac[E],te.fill)te.fill(rc,x,y+1);else for(var ne=x;ne<=y;ne++)te[ne]=rc}else if(y instanceof Ki)for(y=y.memberParts;y.next();)E=y.value,E instanceof qn&&Mf(a,E,x,b)}}function Kh(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}rn.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():Gp(this)};function Gp(a){a.vk===-1&&(a.vk=pi(function(){if(a.vk!==-1&&(a.ug(),a.lastInput.event!==null)){var y=a.computeAutoScrollPosition(a.wp);y.Xa(a.position)||(a.position=y,a.lastInput.documentPoint=a.Ps(a.wp),a.doMouseMove(),a.Zi=!0,y=sn.alloc(),a.computeBounds(y),y.ed(a.documentBounds),zp(a,y),sn.free(y),a.Fc=!0,a.bd(),Gp(a))}},a.vp))}rn.prototype.ug=function(){this.vk!==-1&&(jt.clearTimeout(this.vk),this.vk=-1)},rn.prototype.computeAutoScrollPosition=function(a){var y=this.position,x=this.xp;if(0>=x.top&&0>=x.left&&0>=x.right&&0>=x.bottom)return y;var b=this.viewportBounds,E=this.scale;b=sn.allocAt(0,0,b.width*E,b.height*E);var te=ft.allocAt(0,0);if(a.x>=b.x&&a.x<b.x+x.left&&this.allowHorizontalScroll){var ne=Math.max(this.scrollHorizontalLineChange,1);ne|=0,te.x-=ne,a.x<b.x+x.left/2&&(te.x-=ne),a.x<b.x+x.left/4&&(te.x-=4*ne)}else a.x<=b.x+b.width&&a.x>b.x+b.width-x.right&&this.allowHorizontalScroll&&(ne=Math.max(this.scrollHorizontalLineChange,1),ne|=0,te.x+=ne,a.x>b.x+b.width-x.right/2&&(te.x+=ne),a.x>b.x+b.width-x.right/4&&(te.x+=4*ne));return a.y>=b.y&&a.y<b.y+x.top&&this.allowVerticalScroll?(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,te.y-=ne,a.y<b.y+x.top/2&&(te.y-=ne),a.y<b.y+x.top/4&&(te.y-=4*ne)):a.y<=b.y+b.height&&a.y>b.y+b.height-x.bottom&&this.allowVerticalScroll&&(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,te.y+=ne,a.y>b.y+b.height-x.bottom/2&&(te.y+=ne),a.y>b.y+b.height-x.bottom/4&&(te.y+=4*ne)),te.Xa(Zn)||(y=new ft(y.x+te.x/E,y.y+te.y/E)),sn.free(b),ft.free(te),y},$e=rn.prototype,$e.Cs=function(){return null},$e.av=function(){return null},$e.bs=function(a,y){this.pj.add(a,y)},$e.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof Ki&&(y.$p=null)})};function zd(a,y,x){function b(){var Ee=+new Date;for(te=!0,ne.reset();ne.next();)if(!ne.value[0].al){te=!1;break}te||Ee-_e>he?y(x,E,se):jt.requestAnimationFrame(b)}for(var E=x.callback,te=!0,ne=a.Og.iterator;ne.next();)if(!ne.value[0].al){te=!1;break}if(typeof E!="function"||te)return y(x,E,a);var se=a,he=x.callbackTimeout||300,_e=+new Date;return jt.requestAnimationFrame(function(){b()}),null}$e.Wz=function(a){return ts?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},$e.Jx=function(a){return a===void 0&&(a={}),zd(this,this.Xz,a)},$e.Xz=function(a,y,x){var b=lm(x,a,"canvas",null);if(b===null)return null;x=b.Z.canvas;var E=null;if(x!==null)switch(E=a.returnType,E===void 0?E="string":E=E.toLowerCase(),E){case hd+"data":E=b.getImageData(0,0,x.width,x.height);break;case hd:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&Lt('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:E=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(E),null):E};function lm(a,y,x,b){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&Lt("properties argument must be an Object.");var E=y.size||null,te=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(te="NaN");var ne=y.maxSize;y.maxSize===void 0&&(ne=x==="SVG"?new wn(1/0,1/0):new wn(2e3,2e3));var se=y.position||null,he=y.parts||null,_e=y.padding===void 0?1:y.padding,Ee=y.background||null,Ne=y.omitTemporary;Ne===void 0&&(Ne=!0);var He=y.document||document,Ye=y.elementFinished||null,Qe=y.showTemporary;Qe===void 0&&(Qe=!Ne),y=y.showGrid,y===void 0&&(y=Qe),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof _e=="number"?_e=new nr(_e):_e instanceof nr||Lt("MakeImage padding must be a Margin or a number."),_e.left=Math.max(_e.left,0),_e.right=Math.max(_e.right,0),_e.top=Math.max(_e.top,0),_e.bottom=Math.max(_e.bottom,0),a.ib.Vc(!0),Ne=new tu(null,He,void 0,!0);var st=Ne.context;if(!(E||te||he||se))return Ne.width=a.Aa+Math.ceil(_e.left+_e.right),Ne.height=a.ya+Math.ceil(_e.top+_e.bottom),x==="SVG"?b===null?null:(b.resize(Ne.width,Ne.height,Ne.width,Ne.height),b.ownerDocument=He,b.hs=Ye,xf(a,b.context,_e,new wn(Ne.width,Ne.height),a.Ca,a.pa,he,Ee,Qe,y),b.context):(a.Xm=!1,xf(a,st,_e,new wn(Ne.width,Ne.height),a.Ca,a.pa,he,Ee,Qe,y),a.Xm=!0,Ne.context);var Pt=a.Pp,St=a.documentBounds.copy();if(St.Fv(a.yb),Qe)for(var Tt=a.Wa.s,At=Tt.length,It=0;It<At;It++){var Wt=Tt[It];if(Wt.visible&&Wt.isTemporary){Wt=Wt.Pa.s;for(var tn=Wt.length,Kn=0;Kn<tn;Kn++){var hi=Wt[Kn];hi.isInDocumentBounds&&hi.isVisible()&&(hi=hi.actualBounds,hi.w()&&St.ed(hi))}}}if(Tt=new ft(St.x,St.y),he!==null){for(At=new sn(0,0,0,0),It=!0,Wt=he.iterator,Wt.reset();Wt.next();)tn=Wt.value,tn instanceof Ci&&(Kn=tn.layer,Kn!==null&&!Kn.visible||Kn!==null&&!Qe&&Kn.isTemporary||!tn.isVisible()||(tn=tn.actualBounds,tn.w()&&(It?(It=!1,At.assign(tn)):At.ed(tn))));St.width=At.width,St.height=At.height,Tt.x=At.x,Tt.y=At.y}return se!==null&&se.w()&&(Tt=se,te||(te=Pt)),At=se=0,_e!==null&&(se=_e.left+_e.right,At=_e.top+_e.bottom),It=Wt=0,E!==null&&(Wt=E.width,It=E.height,isFinite(Wt)&&(Wt=Math.max(0,Wt-se)),isFinite(It)&&(It=Math.max(0,It-At))),E!==null&&te!==null?(te==="NaN"&&(te=Pt),E.w()?(E=Wt,St=It):isNaN(It)?(E=Wt,St=St.height*te):(E=St.width*te,St=It)):E!==null?E.w()?(te=Math.min(Wt/St.width,It/St.height),E=Wt,St=It):isNaN(It)?(te=Wt/St.width,E=Wt,St=St.height*te):(te=It/St.height,E=St.width*te,St=It):te!==null?te==="NaN"&&ne.w()?(te=Math.min((ne.width-se)/St.width,(ne.height-At)/St.height),te>Pt?(te=Pt,E=St.width,St=St.height):(E=ne.width,St=ne.height)):(E=St.width*te,St=St.height*te):(te=Pt,E=St.width,St=St.height),_e!==null?(E+=se,St+=At):_e=new nr(0),ne!==null&&(Pt=ne.width,ne=ne.height,isNaN(Pt)&&(Pt=2e3),isNaN(ne)&&(ne=2e3),isFinite(Pt)&&(E=Math.min(E,Pt)),isFinite(ne)&&(St=Math.min(St,ne))),Ne.width=Math.ceil(E),Ne.height=Math.ceil(St),x==="SVG"?b===null?null:(b.resize(Ne.width,Ne.height,Ne.width,Ne.height),b.ownerDocument=He,b.hs=Ye,xf(a,b.context,_e,new wn(Math.ceil(E),Math.ceil(St)),te,Tt,he,Ee,Qe,y),b.context):(a.Xm=!1,xf(a,st,_e,new wn(Math.ceil(E),Math.ceil(St)),te,Tt,he,Ee,Qe,y),a.Xm=!0,Ne.context)}ot.Object.defineProperties(rn.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof Fe||(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 Ku(this,jt.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 Ku(this,jt.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(jt,"resize",this.Ov,!1),this.removeEventListener(jt,"wheel",this.$j,!0),ah===this&&(ah=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Cp(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||1<a)&&Pn(a,"0 <= value <= 1",rn,"opacity"),this.pb=a,this.g("opacity",y,a),this.N())}},validCycle:{get:function(){return this.wu},set:function(a){var y=this.wu;y!==a&&(this.wu=a,this.g("validCycle",y,a))}},layers:{get:function(){return this.Wa.iterator}},isModelReadOnly:{get:function(){var a=this.cc;return a===null?!1:a.isReadOnly},set:function(a){var y=this.cc;y!==null&&(y.isReadOnly=a)}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},isEnabled:{get:function(){return this.Jd},set:function(a){var y=this.Jd;y!==a&&(this.Jd=a,this.g("isEnabled",y,a))}},allowClipboard:{get:function(){return this.Us},set:function(a){var y=this.Us;y!==a&&(this.Us=a,this.g("allowClipboard",y,a))}},allowCopy:{get:function(){return this.Fi},set:function(a){var y=this.Fi;y!==a&&(this.Fi=a,this.g("allowCopy",y,a))}},allowDelete:{get:function(){return this.Gi},set:function(a){var y=this.Gi;y!==a&&(this.Gi=a,this.g("allowDelete",y,a))}},allowDragOut:{get:function(){return this.Vs},set:function(a){var y=this.Vs;y!==a&&(this.Vs=a,this.g("allowDragOut",y,a))}},allowDrop:{get:function(){return this.Ws},set:function(a){var y=this.Ws;y!==a&&(this.Ws=a,this.g("allowDrop",y,a))}},allowTextEdit:{get:function(){return this.Pi},set:function(a){var y=this.Pi;y!==a&&(this.Pi=a,this.g("allowTextEdit",y,a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var y=this.Hi;y!==a&&(this.Hi=a,this.g("allowGroup",y,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var y=this.Qi;y!==a&&(this.Qi=a,this.g("allowUngroup",y,a))}},allowInsert:{get:function(){return this.Ys},set:function(a){var y=this.Ys;y!==a&&(this.Ys=a,this.g("allowInsert",y,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var y=this.Ii;y!==a&&(this.Ii=a,this.g("allowLink",y,a))}},allowRelink:{get:function(){return this.Ki},set:function(a){var y=this.Ki;y!==a&&(this.Ki=a,this.g("allowRelink",y,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var y=this.Ji;y!==a&&(this.Ji=a,this.g("allowMove",y,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var y=this.Li;y!==a&&(this.Li=a,this.g("allowReshape",y,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var y=this.Mi;y!==a&&(this.Mi=a,this.g("allowResize",y,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var y=this.Ni;y!==a&&(this.Ni=a,this.g("allowRotate",y,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var y=this.Oi;y!==a&&(this.Oi=a,this.g("allowSelect",y,a))}},allowUndo:{get:function(){return this.Zs},set:function(a){var y=this.Zs;y!==a&&(this.Zs=a,this.g("allowUndo",y,a))}},allowZoom:{get:function(){return this.at},set:function(a){var y=this.at;y!==a&&(this.at=a,this.g("allowZoom",y,a))}},hasVerticalScrollbar:{get:function(){return this.nn},set:function(a){var y=this.nn;y!==a&&(this.nn=a,this.Ee=!0,this.N(),this.g("hasVerticalScrollbar",y,a),$l(this,!1))}},hasHorizontalScrollbar:{get:function(){return this.mn},set:function(a){var y=this.mn;y!==a&&(this.mn=a,this.Ee=!0,this.N(),this.g("hasHorizontalScrollbar",y,a),$l(this,!1))}},allowHorizontalScroll:{get:function(){return this.Xs},set:function(a){var y=this.Xs;y!==a&&(this.Xs=a,this.g("allowHorizontalScroll",y,a),$l(this,!1))}},allowVerticalScroll:{get:function(){return this.$s},set:function(a){var y=this.$s;y!==a&&(this.$s=a,this.g("allowVerticalScroll",y,a),$l(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Pn(a,">= 0",rn,"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&&Pn(a,">= 0",rn,"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 b=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===b&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===b&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===b&&(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<a)){this.R("ChangingSelection",this.selection),y=this.selection.Fa();for(var x=0;x<a;x++)y[x].isSelected=!1;this.R("ChangedSelection",this.selection)}}else Pn(a,">= 0",rn,"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||rm(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&&Lt("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=Pp(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,xs(this.animationManager,"Model"),y&&(this.pf!==null&&this.pf.each(function(te){return y.ik(te)}),y.ik(this.Oc)),this.cc=a,this.partManager=Bp(this.cc.type);for(var E=0;E<x.length;E++)this.add(x[E]);a.Pe(this.Hb),this.partManager.addAllModeledParts(),a.ik(this.Hb),a.Pe(this.Oc),this.pf!==null&&this.pf.each(function(te){return a.Pe(te)}),this.vb=b,this.Ya(),this.vb||this.N(),y&&a.undoManager.copyProperties(y.undoManager)}}},aa:{get:function(){return this.rw},set:function(a){this.rw=a}},As:{get:function(){return this.sy}},skipsModelSourceBindings:{get:function(){return this.Iw},set:function(a){this.Iw=a}},Ns:{get:function(){return this.ou},set:function(a){this.ou=a}},nodeTemplate:{get:function(){return this.Lg.I("")},set:function(a){var y=this.Lg.I("");y!==a&&(this.Lg.add("",a),this.g("nodeTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},nodeTemplateMap:{get:function(){return this.Lg},set:function(a){var y=this.Lg;y!==a&&(this.Lg=a,this.g("nodeTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplate:{get:function(){return this.Yi.I("")},set:function(a){var y=this.Yi.I("");y!==a&&(this.Yi.add("",a),this.g("groupTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplateMap:{get:function(){return this.Yi},set:function(a){var y=this.Yi;y!==a&&(this.Yi=a,this.g("groupTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplate:{get:function(){return this.Kh.I("")},set:function(a){var y=this.Kh.I("");y!==a&&(this.Kh.add("",a),this.g("linkTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplateMap:{get:function(){return this.Kh},set:function(a){var y=this.Kh;y!==a&&(this.Kh=a,this.g("linkTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},isMouseCaptured:{get:function(){return this.qw},set:function(a){var y=this.ta;y!==null&&(y=y.Oa,y instanceof SVGElement||(a?(this.lastInput.bubbles=!1,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.addEventListener(jt,"pointermove",this.dk,!0),this.addEventListener(jt,"pointerdown",this.ui,!0),this.addEventListener(jt,"pointerup",this.fk,!0),this.addEventListener(jt,"pointerout",this.ek,!0),this.addEventListener(jt,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(jt,"wheel",this.$j,!0),this.addEventListener(jt,"selectstart",this.preventDefault,!1)):(this.removeEventListener(jt,"pointermove",this.dk,!0),this.removeEventListener(jt,"pointerdown",this.ui,!0),this.removeEventListener(jt,"pointerup",this.fk,!0),this.removeEventListener(jt,"pointerout",this.ek,!0),this.removeEventListener(jt,"pointercancel",this.ck,!0),this.addEventListener(y,"pointermove",this.dk,!1),this.addEventListener(y,"pointerdown",this.ui,!1),this.addEventListener(y,"pointerup",this.fk,!1),this.addEventListener(y,"pointerout",this.ek,!1),this.addEventListener(y,"pointercancel",this.ck,!1),this.removeEventListener(jt,"wheel",this.$j,!0),this.removeEventListener(jt,"selectstart",this.preventDefault,!1),this.addEventListener(y,"wheel",this.$j,!1)),this.qw=a))}},position:{get:function(){return this.pa},set:function(a){var y=ft.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),mf(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?Vu(this):(this.vb=!0,a=this.scale,Mp(this,this.Sp,this.Aa/a,this.ya/a,this.zk,!1),this.vb=!1),this.vb||this.onViewportBoundsChanged(x,this.viewportBounds,this.Ca,!1)}ft.free(y)}},initialPosition:{get:function(){return this.zt},set:function(a){this.zt.D(a)||(this.zt=a.J())}},initialScale:{get:function(){return this.At},set:function(a){this.At!==a&&(this.At=a)}},grid:{get:function(){return this.fe===null&&(this.fe=em(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=em(this)),a.type!==Dn.Grid&&Lt("Diagram.grid must be a Panel of type Panel.Grid");var x=y.panel;x!==null&&x.remove(y),this.fe=a,a.name="GRID",x!==null&&x.add(a),Zu(this),this.N(),this.g("grid",y,a)}}},viewportBounds:{get:function(){return this.Rw}},viewSize:{get:function(){return this.wo},set:function(a){var y=this.viewSize;y.D(a)||(this.wo=a=a.J(),this.ya=this.Aa=0,a.w()?(this.Aa=a.width,this.ya=a.height):this.Ka!==null&&(this.Aa=this.Ka.clientWidth||1,this.ya=this.Ka.clientHeight||1),Vu(this),this.Ya(),this.g("viewSize",y,a),this.redraw())}},fixedBounds:{get:function(){return this.ut},set:function(a){var y=this.ut;y.D(a)||(a.width!==-1/0&&a.height!==1/0&&a.height!==-1/0||Lt("fixedBounds width/height must not be Infinity"),this.ut=a=a.J(),this.Ya(),this.g("fixedBounds",y,a))}},scrollMargin:{get:function(){return this.rj},set:function(a){typeof a=="number"&&(a=new nr(a));var y=this.rj;y.D(a)||(this.rj=a=a.J(),this.g("scrollMargin",y,a),this.hk())}},scrollMode:{get:function(){return this.sj},set:function(a){var y=this.sj;y!==a&&(this.sj=a,a===Yh&&$l(this,!1),this.g("scrollMode",y,a),this.Ee=!0,this.N())}},scrollsPageOnFocus:{get:function(){return this.nu},set:function(a){var y=this.nu;y!==a&&(this.nu=a,this.g("scrollsPageOnFocus",y,a))}},positionComputation:{get:function(){return this.Zt},set:function(a){var y=this.Zt;y!==a&&(this.Zt=a,$l(this,!1),this.g("positionComputation",y,a))}},scaleComputation:{get:function(){return this.fu},set:function(a){var y=this.fu;y!==a&&(this.fu=a,Fp(this,this.scale,this.scale),this.g("scaleComputation",y,a))}},documentBounds:{get:function(){return this.Sp}},isVirtualized:{get:function(){return this.It},set:function(a){var y=this.It;y!==a&&(this.It=a,this.g("isVirtualized",y,a))}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&Fp(this,y,a)}},defaultScale:{get:function(){return this.Pp},set:function(a){this.Pp=a}},autoScale:{get:function(){return this.yh},set:function(a){var y=this.yh;y!==a&&(this.yh=a,this.g("autoScale",y,a),a!==Ea&&$l(this,!1))}},initialAutoScale:{get:function(){return this.Fg},set:function(a){var y=this.Fg;y!==a&&(this.Fg=a,this.g("initialAutoScale",y,a))}},initialViewportSpot:{get:function(){return this.Bt},set:function(a){var y=this.Bt;y!==a&&(a.sb()||Lt("initialViewportSpot must be a specific Spot: "+a),this.Bt=a,this.g("initialViewportSpot",y,a))}},initialDocumentSpot:{get:function(){return this.yt},set:function(a){var y=this.yt;y!==a&&(a.sb()||Lt("initialViewportSpot must be a specific Spot: "+a),this.yt=a,this.g("initialDocumentSpot",y,a))}},minScale:{get:function(){return this.Ot},set:function(a){var y=this.Ot;y!==a&&(0<a?(this.Ot=a,this.g("minScale",y,a),a>this.scale&&(this.scale=a)):Pn(a,"> 0",rn,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(a){var y=this.Mt;y!==a&&(0<a?(this.Mt=a,this.g("maxScale",y,a),a<this.scale&&(this.scale=a)):Pn(a,"> 0",rn,"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),$l(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 nr(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&&Lt("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();)ag(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==Xh&&a!==Ps&&a!==Tf&&Lt("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 wn(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 nr(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),ot.Object.defineProperties(rn,{licenseKey:{get:function(){return Xp.jc()},set:function(a){Xp.add(a.replace(/\s/g,""))}},version:{get:function(){return ud}}}),rn.prototype.makeImageData=rn.prototype.Jx,rn.prototype.makeImage=rn.prototype.Wz,rn.prototype.cacheGroupExternalLinks=rn.prototype.Fu,rn.prototype.addRenderer=rn.prototype.bs,rn.prototype.makeSVG=rn.prototype.av,rn.prototype.makeSvg=rn.prototype.Cs,rn.prototype.stopAutoScroll=rn.prototype.ug,rn.prototype.doAutoScroll=rn.prototype.gs,rn.prototype.isUnoccupied=rn.prototype.Yj,rn.prototype.raiseDiagramEvent=rn.prototype.R,rn.prototype.removeDiagramListener=rn.prototype.am,rn.prototype.addDiagramListener=rn.prototype.Bj,rn.prototype.findTreeRoots=rn.prototype.yz,rn.prototype.layoutDiagram=rn.prototype.Uz,rn.prototype.findTopLevelGroups=rn.prototype.qz,rn.prototype.findTopLevelNodesAndLinks=rn.prototype.rz,rn.prototype.ensureBounds=rn.prototype.Va,rn.prototype.findLinksByExample=rn.prototype.ls,rn.prototype.findNodesByExample=rn.prototype.ms,rn.prototype.findLinkForData=rn.prototype.Kc,rn.prototype.findNodeForData=rn.prototype.ii,rn.prototype.findPartForData=rn.prototype.Lc,rn.prototype.findLinkForKey=rn.prototype.findLinkForKey,rn.prototype.findNodeForKey=rn.prototype.Vb,rn.prototype.findPartForKey=rn.prototype.findPartForKey,rn.prototype.rebuildParts=rn.prototype.Wd,rn.prototype.transformViewToDoc=rn.prototype.Ps,rn.prototype.transformRectDocToView=rn.prototype.zA,rn.prototype.transformDocToView=rn.prototype.op,rn.prototype.centerRect=rn.prototype.es,rn.prototype.scrollToRect=rn.prototype.tv,rn.prototype.scroll=rn.prototype.scroll,rn.prototype.highlightCollection=rn.prototype.Jz,rn.prototype.highlight=rn.prototype.Iz,rn.prototype.selectCollection=rn.prototype.rA,rn.prototype.select=rn.prototype.select,rn.prototype.updateAllRelationshipsFromData=rn.prototype.rp,rn.prototype.updateAllTargetBindings=rn.prototype.updateAllTargetBindings,rn.prototype.commit=rn.prototype.commit,rn.prototype.rollbackTransaction=rn.prototype.Kf,rn.prototype.commitTransaction=rn.prototype.eb,rn.prototype.startTransaction=rn.prototype.Ea,rn.prototype.raiseChanged=rn.prototype.g,rn.prototype.raiseChangedEvent=rn.prototype.cb,rn.prototype.removeChangedListener=rn.prototype.ik,rn.prototype.addChangedListener=rn.prototype.Pe,rn.prototype.removeModelChangedListener=rn.prototype.mA,rn.prototype.addModelChangedListener=rn.prototype.Yw,rn.prototype.findLayer=rn.prototype.Qj,rn.prototype.removeLayer=rn.prototype.kA,rn.prototype.addLayerAfter=rn.prototype.Cy,rn.prototype.addLayerBefore=rn.prototype.Ww,rn.prototype.addLayer=rn.prototype.Al,rn.prototype.moveParts=rn.prototype.moveParts,rn.prototype.copyParts=rn.prototype.Kj,rn.prototype.removeParts=rn.prototype.Is,rn.prototype.remove=rn.prototype.remove,rn.prototype.add=rn.prototype.add,rn.prototype.clearDelayedGeometries=rn.prototype.bx,rn.prototype.setProperties=rn.prototype.nm,rn.prototype.attach=rn.prototype.Du,rn.prototype.set=rn.prototype.set,rn.prototype.resetInputOptions=rn.prototype.Sx,rn.prototype.setInputOption=rn.prototype.sA,rn.prototype.getInputOption=rn.prototype.Ql,rn.prototype.resetRenderingHints=rn.prototype.Tx,rn.prototype.setRenderingHint=rn.prototype.Xx,rn.prototype.getRenderingHint=rn.prototype.Gf,rn.prototype.maybeUpdate=rn.prototype.bd,rn.prototype.requestUpdate=rn.prototype.$b,rn.prototype.delayInitialization=rn.prototype.Xy,rn.prototype.isUpdateRequested=rn.prototype.Pz,rn.prototype.invalidateDocumentBounds=rn.prototype.Ya,rn.prototype.findObjectsNear=rn.prototype.og,rn.prototype.findPartsNear=rn.prototype.mz,rn.prototype.findObjectsIn=rn.prototype.Cf,rn.prototype.findPartsIn=rn.prototype.ux,rn.prototype.findObjectsAt=rn.prototype.ji,rn.prototype.findPartsAt=rn.prototype.lz,rn.prototype.findObjectAt=rn.prototype.ic,rn.prototype.findPartAt=rn.prototype.Ol,rn.prototype.focusObject=rn.prototype.zz,rn.prototype.alignDocument=rn.prototype.Jy,rn.prototype.zoomToRect=rn.prototype.BA,rn.prototype.zoomToFit=rn.prototype.zoomToFit,rn.prototype.diagramScroll=rn.prototype.kx,rn.prototype.focus=rn.prototype.focus;var kf=new on,um=null,ts=jt.document!==void 0,ld=null,kc="",Ea=new nn(rn,"None",0),Ll=new nn(rn,"Uniform",1),Tc=new nn(rn,"UniformToFill",2),Ud=new nn(rn,"CycleAll",10),Wp=new nn(rn,"CycleNotDirected",11),Zp=new nn(rn,"CycleNotDirectedFast",12),Vp=new nn(rn,"CycleNotUndirected",13),Kp=new nn(rn,"CycleDestinationTree",14),Yp=new nn(rn,"CycleSourceTree",15),Yh=new nn(rn,"DocumentScroll",1),Hd=new nn(rn,"InfiniteScroll",2),Xh=new nn(rn,"TreeParentCollapsed",21),Ps=new nn(rn,"AllParentsCollapsed",22),Tf=new nn(rn,"AnyParentsCollapsed",23),Xp=new Ln,ud="2.3.10",hd="image",Gd=null,hm=!1;function xa(){if(ts){var a=jt.document.createElement("canvas"),y=a.getContext("2d"),x=ei("7ca11abfd022028846");y[x]=ei("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",cn.Dx+"4ae6247590da4bb21c324ba3a84e385776",Ii.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Vt.za],E=1;5>E;E++)y[ei("7ca11abfd7330390")](ei(b[E-1]),10,15*E);for(y[x]=ei("39f046ebb36e4b"),x=1;5>x;x++)y[ei("7ca11abfd7330390")](ei(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(Ii.prototype.Cd=Ii.prototype.Eu),Gd=a}}rn.className="Diagram",rn.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=jt.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof rn?y.H:null},rn.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},rn.useDOM=function(a){ts=a?jt.document!==void 0:!1},rn.isUsingDOM=function(){return ts},rn.None=Ea,rn.Uniform=Ll,rn.UniformToFill=Tc,rn.CycleAll=Ud,rn.CycleNotDirected=Wp,rn.CycleNotDirectedFast=Zp,rn.CycleNotUndirected=Vp,rn.CycleDestinationTree=Kp,rn.CycleSourceTree=Yp,rn.DocumentScroll=Yh,rn.InfiniteScroll=Hd,rn.TreeParentCollapsed=Xh,rn.AllParentsCollapsed=Ps,rn.AnyParentsCollapsed=Tf;function cm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function cd(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=jt[ei("76a715b2f73f148a")][ei("72ba13b5")]||"";if(a.Rc=!0,ts){var b=rn[ei("76a115b6ed251eaf4692")];if(b)for(var E=Xp.iterator;E.next()&&(b=E.value,b=ei(b).split(ei("39e9")),!(6>b.length));){var te=ei(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=ei(cn[ei("6cae19")]).split(".");if(te[0]>ne[0]||te[0]===ne[0]&&te[1]>=ne[1]){var se=jt[ei("74a900bae4370f8b51")][ei("6fbb13a1c2311e8a57")].toLowerCase();if(ne=se[ei("73a612b6fb191d")](ei("3aad1ab6e022098b4dc4")),te=ei(b[2]),-1<ne&&(se=se[ei("73a612b6fb191d")](te.toLowerCase()+"/"),a.Rc=!(-1<se&&se<ne),!a.Rc))break;for(ne=x[ei("76ad18b4f73e")],se=x[ei("73a612b6fb191d")](ei("35e7"))+2;se<ne;se++)y+=x[se];if(ne=y[ei("73a612b6fb191d")](te),0>ne&&te!==ei("7da71ca0ad381e90")&&(ne=y[ei("73a612b6fb191d")](ei("76a715b2ef3e149757"))),0>ne&&(ne=y[ei("73a612b6fb191d")](ei("76a715b2ef3e149757"))),0>ne&&(ne=y[ei("73a612b6fb191d")](ei("2bfa41fdb3784bca12"))),0>ne&&(ne=x[ei("73a612b6fb191d")](ei("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[ei("73a612b6fb191d")](ei("35"))||y[ei("73a612b6fb191d")](ei("35"))===-1),!a.Rc||x[ei("73a612b6fb191d")](ei("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[ei("73a612b6fb191d")](te)),!a.Rc)||(ne=jt[ei("76a715b2f73f148a")][ei("69ad17a1e03e")],se=ne[ei("73a612b6fb191d")](ei("7fb002b6ed25128b4da25b2e")),-1<se&&(a.Rc=!(ne[ei("73a612b6fb191d")](te)>se),!a.Rc)))break;if(te[0]==="#"){ne=jt.document.createElement("div");for(var he=b[0].replace(/[A-Za-z]/g,"");4>he.length;)he+="9";if(se=he,he=he.substr(he.length-4),b="",b+=["gsh","gsf"][parseInt(he.substr(0,1),10)%2],b+=["Header","Background","Display","Feedback"][parseInt(he.substr(0,1),10)%4],ne[ei("79a417a0f0181a8946")]=b,jt.document[ei("78a712aa")]){jt.document[ei("78a712aa")][ei("7bb806b6ed32388c4a875b")](ne),he=jt.getComputedStyle(ne).getPropertyValue(ei("78a704b7e62456904c9b12701b6532a8"));var _e=jt.getComputedStyle(ne).getPropertyValue(ei("75b817b0ea2202"));if(jt.document[ei("78a712aa")][ei("68ad1bbcf533388c4a875b")](ne),he){if(ne=jt[ei("77a902b0eb1b1e804a8a")],_e==="0."+parseInt(se,10)%100||he.indexOf(parseInt(te[1]+te[2],16))!==-1&&he.indexOf(parseInt(te[3]+te[4],16))!==-1){a.Rc=!1;break}else if(ne&&ne(ei("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,te=0;te<document.styleSheets.length;te++){ne=document.styleSheets[te].rules||document.styleSheets[te].cssRules;for(var Ee in ne)if(b===ne[Ee].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(Ee=x[ei("76ad18b4f73e")],E=x[ei("73a612b6fb191d")](ei("35e7"))+2;E<Ee;E++)y+=x[E];x=y[ei("73a612b6fb191d")](ei("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[ei("73a612b6fb191d")](ei("35")))}}}return 0<a.Rc&&a!==a.wy}cm.className="DiagramHelper";function Th(a){this.j=a===void 0?new ft:a,this.o=new ft}ot.Object.defineProperties(Th.prototype,{point:{get:function(){return this.j},set:function(a){this.j=a}},shifted:{get:function(){return this.o},set:function(a){this.o=a}}});var Wd="DraggingInfo";Th.className="DraggingInfo";function ie(a,y,x){this.node=a,this.info=y,this.Su=x}ie.className="DraggingNodeInfoPair";function ce(){this.reset()}ce.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new wn(NaN,NaN).freeze(),this.gridSnapCellSpot=xr,this.gridSnapOrigin=new ft(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ce.className="DraggingOptions";function Te(a,y){if(typeof a=="string"||jt.Element&&a instanceof Element)var x=rn.call(this,a)||this;else x=rn.call(this)||this,y=a;return ke(x),y&&x.nm(y),x}Je(Te,rn);function ke(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Br,a.layout=new ia}Te.prototype.reset=function(){rn.prototype.reset.call(this),ke(this)},Te.className="Palette";function Fe(a,y){if(typeof a=="string"||jt.Element&&a instanceof Element)var x=rn.call(this,a)||this;else x=rn.call(this)||this,y=a;var b=x;x.animationManager.isEnabled=!1,x.vb=!0,x.V=null,x.mn=!1,x.nn=!1,x.F=!0,x.u=!0,x.ia=0,x.o=!1,x.ql=null,x.Xx("drawShadows",!1),a=new Ci;var E=new ir;return E.stroke="magenta",E.strokeWidth=2,E.fill="transparent",E.name="BOXSHAPE",a.selectable=!0,a.selectionAdorned=!1,a.selectionObjectName="BOXSHAPE",a.locationObjectName="BOXSHAPE",a.resizeObjectName="BOXSHAPE",a.cursor="move",a.add(E),x.j=a,x.allowCopy=!1,x.allowDelete=!1,x.allowSelect=!0,x.autoScrollRegion=new nr(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Ct,x.toolManager.mouseMoveTools),x.click=function(){var te=b.observed;if(te!==null){var ne=te.viewportBounds,se=b.lastInput.documentPoint;te.position=new ft(se.x-ne.width/2,se.y-ne.height/2)}},x.Pf=function(){b.Ya(),gt(b)},x.Xd=function(){b.observed!==null&&(b.Ya(),b.N())},x.Ha=function(){1>b.updateDelay?b.N():b.o||(b.o=!0,setTimeout(function(){return b.redraw()},b.updateDelay))},x.Of=function(){b.observed!==null&>(b)},x.autoScale=Ll,x.vb=!1,y&&Object.assign(x,y),x}Je(Fe,rn),Fe.prototype.computePixelRatio=function(){return 1},Fe.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(od(this),this.ql===null){var x=new tu(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),nt(this)}finally{this.ta=a,this.ib=y}}}rn.prototype.redraw.call(this)},Fe.prototype.gc=function(){if(this.Ka===null&&Lt("No div specified"),this.ta===null&&Lt("No canvas specified"),!(this.ta instanceof Ku)&&(Rv(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){od(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?nt(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,b=0;b<x;b++)y[b].gc(a,this);this.Fc=this.vd=!1}}};function nt(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,b=a.drawsGrid&&x,E=y.grid;b&&E!==null&&E.visible&&!isNaN(E.width)&&!isNaN(E.height)&&(E=sn.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Zu(y,E),sn.free(E),da(y));var te=a.Ab;te.reset(),a.scale!==1&&te.scale(a.scale),a.position.x===0&&a.position.y===0||te.translate(-a.position.x,-a.position.y),E=a.ib,E.scale(a.Mb,a.Mb),E.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),E.yc(),y=y.Wa.s,te=y.length;for(var ne=0;ne<te;ne++){var se=y[ne],he=a;if(se.visible&&se.opacity!==0){var _e=se.diagram.grid.part;if(!x&&se.isTemporary)b&&_e.layer===se&&(se=kh(se,E),_e.gc(E,he),E.globalAlpha=se);else{for(var Ee=kh(se,E),Ne=he.scale,He=sn.alloc(),Ye=se.Pa.s,Qe=Ye.length,st=0;st<Qe;st++){var Pt=Ye[st];(b||Pt!==_e)&&se.Oj(E,Pt,he,null,Ne,He,!1)}sn.free(He),E.globalAlpha=Ee}}}}}function gt(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var b=y.selectionObject,E=wn.alloc();E.h(x.width,x.height),b.desiredSize=E,wn.free(E),a=2/a.scale,b instanceof ir&&(b.strokeWidth=a),y.location=new ft(x.x-a/2,x.y-a/2),y.isSelected=!0}}}Fe.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Vs;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},Fe.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},Fe.prototype.onViewportBoundsChanged=function(a,y,x,b){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),gt(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.Oz=b,this.R("ViewportBoundsChanged",this.fc,a))},ot.Object.defineProperties(Fe.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Fe&&Lt("Overview.observed Diagram may not be an Overview itself: "+a),y!==a){if(y!==null&&(this.remove(this.box),y.am("ViewportBoundsChanged",this.Pf),y.am("DocumentBoundsChanged",this.Xd),y.am("InvalidateDraw",this.Ha),y.am("AnimationFinished",this.Of)),this.V=a,a!==null&&(a.Bj("ViewportBoundsChanged",this.Pf),a.Bj("DocumentBoundsChanged",this.Xd),a.Bj("InvalidateDraw",this.Ha),a.Bj("AnimationFinished",this.Of),this.add(this.box)),this.Ya(),a===null){this.ql=null;var x=this.ta,b=this.ib;x&&b&&(b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,x.width,x.height))}else this.Ha(null),gt(this),this.N();this.g("observed",y,a)}}},box:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.remove(y),this.add(this.j),gt(this),this.g("box",y,a))}},drawsTemporaryLayers:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a,this.redraw())}},drawsGrid:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,this.redraw())}},updateDelay:{get:function(){return this.ia},set:function(a){0>a&&(a=0),this.ia!==a&&(this.ia=a)}}}),Fe.className="Overview";function Ct(){Ho.call(this),this.j=null}Je(Ct,Ho),Ct.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.timestamp<this.delay)?!1:(this.findDraggablePart()===null&&(x=y.viewportBounds,this.j=new ft(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new ft(a.x-this.j.x,a.y-this.j.y)),!0)},Ct.prototype.doActivate=function(){this.j=null,Ho.prototype.doActivate.call(this)},Ct.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Ct.prototype.moveParts=function(){var a=this.diagram,y=a.observed;if(y!==null){var x=a.box;if(x!==null){if(this.j===null){var b=a.firstInput.documentPoint;x=x.location,this.j=new ft(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new ft(a.x-this.j.x,a.y-this.j.y)}}},Ct.className="OverviewDraggingTool";function bt(){Di(this),this.H=ah,this.Ha=this.u=this.o=!0,this.F=this.V=this.nb=this.ia=!1,this.ij=this.j=null,this.Hb=1.05,this.Jt=NaN,this.sw=null,this.Au=NaN,this.yu=Vs,this.hb=!0,this.cg=null,this.ob=200}bt.prototype.toString=function(){return"CommandHandler"},bt.prototype.Xe=function(a){this.H=a},bt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=Sr?y.meta:y.control,b=y.shift,E=y.alt,te=y.key;!x||te!=="C"&&te!=="Insert"?x&&te==="X"||b&&te==="Del"?this.canCutSelection()&&this.cutSelection():x&&te==="V"||b&&te==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&te==="Y"||E&&b&&te==="Backspace"?this.canRedo()&&this.redo():x&&te==="Z"||E&&te==="Backspace"?this.canUndo()&&this.undo():te==="Del"||te==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&te==="A"?this.canSelectAll()&&this.selectAll():te==="Esc"?this.canStopCommand()&&this.stopCommand():te==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):te==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):te==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):te==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):te==="PageUp"?b&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):te==="PageDown"?b&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):te==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):te==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):te===" "?this.canScrollToPart()&&this.scrollToPart():te==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():te==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&te==="0"?this.canResetZoom()&&this.resetZoom():b&&te==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!b&&te==="G"?this.canGroupSelection()&&this.groupSelection():x&&b&&te==="G"?this.canUngroupSelection()&&this.ungroupSelection():te==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():te==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},bt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},bt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof bo&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},bt.prototype.canStopCommand=function(){return!0},bt.prototype.selectAll=function(){var a=this.diagram;a.N();try{a.currentCursor="wait",a.R("ChangingSelection",a.selection);for(var y=a.parts;y.next();)y.value.isSelected=!0;for(var x=a.nodes;x.next();)x.value.isSelected=!0;for(var b=a.links;b.next();)b.value.isSelected=!0}finally{a.R("ChangedSelection",a.selection),a.currentCursor=""}},bt.prototype.canSelectAll=function(){return this.diagram.allowSelect},bt.prototype.deleteSelection=function(){var a=this.diagram;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Delete"),a.R("SelectionDeleting",a.selection);for(var y=new kn,x=a.selection.iterator;x.next();)Oc(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(b){return b.canDelete()});a.Is(y,!0),a.R("SelectionDeleted",y)}finally{a.eb("Delete"),a.R("ChangedSelection",a.selection),a.currentCursor=""}},bt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},bt.prototype.copySelection=function(){var a=this.diagram,y=new kn;for(a=a.selection.iterator;a.next();)Oc(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},bt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},bt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},bt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},bt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)ld=null,kc="";else{x=y.model;var b=!1,E=!1,te=null;try{x.Tl()&&(b=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(E=x.Ij,x.Ij=this.copiesGroupKey),te=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=b),x.Wj()&&(x.Ij=E),x=new Ln,x.addAll(te),ld=x,kc=y.model.dataFormat}}y.R("ClipboardChanged",x)},bt.prototype.pasteFromClipboard=function(){var a=new kn,y=ld;if(y===null)return a;var x=this.diagram;if(kc!==x.model.dataFormat)return a;var b=x.model,E=!1,te=!1,ne=null;try{b.Tl()&&(E=b.Jj,b.Jj=this.copiesParentKey),b.Wj()&&(te=b.Ij,b.Ij=this.copiesGroupKey),ne=x.Kj(y,x,!1)}finally{for(b.Tl()&&(b.Jj=E),b.Wj()&&(b.Ij=te),y=ne.iterator;y.next();)x=y.value,b=y.key,x.location.w()||(b.location.w()?x.location=b.location:!x.position.w()&&b.position.w()&&(x.position=b.position)),a.add(x)}return a},bt.prototype.pasteSelection=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Paste");var x=this.pasteFromClipboard();0<x.count&&y.clearSelection(!0);for(var b=x.iterator;b.next();)b.value.isSelected=!0;if(a!==null){var E=y.computePartsBounds(y.selection);if(E.w()){var te=this.computeEffectiveCollection(y.selection,y.Wm);Ec(y,te,new ft(a.x-E.centerX,a.y-E.centerY),y.Wm,!1)}}y.R("ClipboardPasted",x)}finally{y.eb("Paste"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},bt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||ld===null||ld.count===0||kc!==a.model.dataFormat)},bt.prototype.undo=function(){this.diagram.undoManager.undo()},bt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},bt.prototype.redo=function(){this.diagram.undoManager.redo()},bt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},bt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===Ea&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},bt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==Ea?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},bt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===Ea&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},bt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==Ea?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},bt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},bt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},bt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;xs(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&b===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=Vs):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),Ql(y)},bt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},bt.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(he){this.cg=null}a===null&&(0<y.highlighteds.count?this.cg=y.highlighteds.iterator:0<y.selection.count&&(this.cg=y.selection.iterator),this.cg!==null&&this.cg.next()&&(a=this.cg.value))}if(a!==null){var x=y.animationManager;xs(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=Bt(this,a,[a]);if(E.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var te=function(){y.Ea();for(var he=E.pop();0<E.length&&he instanceof qn&&he.isTreeExpanded&&(!(he instanceof Ki)||he.isSubGraphExpanded);)he=E.pop();0<E.length?(he instanceof Ci&&y.tv(he.actualBounds),he instanceof qn&&!he.isTreeExpanded&&(he.isTreeExpanded=!0),he instanceof Ki&&!he.isSubGraphExpanded&&(he.isSubGraphExpanded=!0)):(he instanceof Ci&&y.es(he.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){pi(te,(x.isEnabled?x.duration:0)+b)};y.Bj("LayoutCompleted",ne),te()}}else{var se=y.position.copy();y.es(a.actualBounds),se.Xa(y.position)&&x.Cc()}}};function Bt(a,y,x){if(y.isVisible())return x;if(y instanceof Fr)Bt(a,y.adornedPart,x);else if(y instanceof Bn){var b=y.fromNode;b!==null&&Bt(a,b,x),y=y.toNode,y!==null&&Bt(a,y,x)}else y instanceof qn&&(b=y.labeledLink,b!==null&&Bt(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),Bt(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Bt(a,y,x));return x}bt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Ci)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},bt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),xs(y.animationManager,"Collapse Tree");var x=new Ln;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof qn&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},bt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof qn&&a.isTreeExpanded))return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof qn&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},bt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),xs(y.animationManager,"Expand Tree");var x=new Ln;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof qn&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},bt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof qn)||a.isTreeExpanded)return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof qn&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},bt.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var b=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var E=new Ln,te=a.selection.iterator;te.next();){var ne=te.value;ne.Zc()&&ne.canGroup()&&E.add(ne)}for(var se=new Ln,he=E.iterator;he.next();){var _e=he.value;te=!1;for(var Ee=E.iterator;Ee.next();)if(_e.Td(Ee.value)){te=!0;break}te||se.add(_e)}if(0<se.count){var Ne=se.first().containingGroup;if(Ne!==null)for(;Ne!==null;){E=!1;for(var He=se.iterator;He.next();)if(!He.value.Td(Ne)){E=!0;break}if(E)Ne=Ne.containingGroup;else break}if(x instanceof Ki)nu(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Ye=y.copyNodeData(x);Kt(Ye)&&(y.xf(Ye),b=a.ii(Ye))}if(b!==null){Ne!==null&&this.isValidMember(Ne,b)&&(b.containingGroup=Ne);for(var Qe=se.iterator;Qe.next();){var st=Qe.value;this.isValidMember(b,st)&&(st.containingGroup=b)}a.clearSelection(!0),b.isSelected=!0}}a.R("SelectionGrouped",b)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},bt.prototype.canGroupSelection=function(){var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowGroup||!a.model.Xj()||this.archetypeGroupData===null)return!1;for(a=a.selection.iterator;a.next();){var y=a.value;if(y.Zc()&&y.canGroup())return!0}return!1};function fn(a){var y=Wn();for(a=a.iterator;a.next();){var x=a.value;x instanceof Bn||y.push(x)}a=new kn,x=y.length;for(var b=0;b<x;b++){for(var E=y[b],te=!0,ne=0;ne<x;ne++)if(E.Td(y[ne])){te=!1;break}te&&a.add(E)}return zn(y),a}bt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Bn)return!1;if(a!==null){if(a===y||a.Td(y))return!1;var x=a.memberValidation;if(x!==null&&!x(a,y)||a.data===null&&y.data!==null||a.data!==null&&y.data===null)return!1}return x=this.memberValidation,x!==null?x(a,y):!0},bt.prototype.ungroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.model;if(x.Xj())try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Ungroup");var b=new Ln;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var te=E.value;te instanceof Ki&&te.canUngroup()&&b.add(te)}var ne=new Ln;if(0<b.count){y.clearSelection(!0);for(var se=b.iterator;se.next();){var he=se.value;he.expandSubGraph();var _e=he.containingGroup,Ee=_e!==null&&_e.data!==null?x.wa(_e.data):void 0;ne.addAll(he.memberParts);for(var Ne=ne.iterator;Ne.next();){var He=Ne.value;if(He.isSelected=!0,!(He instanceof Bn)){var Ye=He.data;Ye!==null?x.mp(Ye,Ee):He.containingGroup=_e}}y.remove(he)}}y.R("SelectionUngrouped",b,ne)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},bt.prototype.canUngroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowDelete||!y.allowUngroup||!y.model.Xj())return!1;if(a!==null){if(!(a instanceof Ki))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Ki&&y.canUngroup())return!0;return!1},bt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=fn(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},bt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),xs(y.animationManager,"Collapse SubGraph");var x=new Ln;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof Ki&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},bt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof Ki&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Ki&&y.isSubGraphExpanded)return!0;return!1},bt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),xs(y.animationManager,"Expand SubGraph");var x=new Ln;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof Ki&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},bt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof Ki&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Ki&&!y.isSubGraphExpanded)return!0;return!1},bt.prototype.editTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.toolManager.findTool("TextEditing");if(x!==null){if(a===null){a=null;for(var b=y.selection.iterator;b.next();){var E=b.value;if(E.canEdit()){a=E;break}}if(a===null)return;a=a.Nl(function(te){return te instanceof Lo&&te.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},bt.prototype.canEditTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowTextEdit||y.toolManager.findTool("TextEditing")===null)return!1;if(a!==null){if(!(a instanceof Lo))return!1;if(a=a.part,a!==null&&a.canEdit())return!0}else for(y=y.selection.iterator;y.next();)if(a=y.value,a.canEdit()&&(a=a.Nl(function(x){return x instanceof Lo&&x.editable}),a!==null))return!0;return!1},bt.prototype.showContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");if(x!==null&&(a===void 0&&(a=0<y.selection.count?y.selection.first():y),a=x.findObjectWithContextMenu(a),a!==null)){var b=y.lastInput,E=null;a instanceof Zt?E=a.ga($i):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new ft(E.x+E.width/2,E.y+E.height/2)),E!==null&&(b.viewPoint=y.op(E),b.documentPoint=E,b.left=!1,b.right=!0,b.up=!0),y.currentTool=x,Uo(x,!1,a)}},bt.prototype.canShowContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");return x===null?!1:(a===void 0&&(a=0<y.selection.count?y.selection.first():y),x.findObjectWithContextMenu(a)!==null)},bt.prototype.computeEffectiveCollection=function(a,y){var x=this.diagram,b=x.toolManager.findTool("Dragging"),E=x.currentTool===b;if(y===void 0&&(y=E?b.dragOptions:x.Wm),b=new on,a===null)return b;for(var te=a.iterator;te.next();)uh(x,b,te.value,E,y);if(x.draggedLink!==null&&y.dragsLink)return b;for(te=a.iterator;te.next();)a=te.value,a instanceof Bn&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},ot.Object.defineProperties(bt.prototype,{diagram:{get:function(){return this.H}},copiesClipboardData:{get:function(){return this.o},set:function(a){this.o=a}},copiesConnectedLinks:{get:function(){return this.u},set:function(a){this.u=a}},deletesConnectedLinks:{get:function(){return this.Ha},set:function(a){this.Ha=a}},copiesTree:{get:function(){return this.ia},set:function(a){this.ia=a}},deletesTree:{get:function(){return this.nb},set:function(a){this.nb=a}},copiesParentKey:{get:function(){return this.V},set:function(a){this.V=a}},copiesGroupKey:{get:function(){return this.F},set:function(a){this.F=a}},archetypeGroupData:{get:function(){return this.j},set:function(a){this.j=a}},memberValidation:{get:function(){return this.ij},set:function(a){this.ij=a}},defaultScale:{get:function(){return this.diagram.defaultScale},set:function(a){this.diagram.defaultScale=a}},zoomFactor:{get:function(){return this.Hb},set:function(a){1<a||Lt("zoomFactor must be larger than 1.0, not: "+a),this.Hb=a}},isZoomToFitRestoreEnabled:{get:function(){return this.hb},set:function(a){this.hb=a}},scrollToPartPause:{get:function(){return this.ob},set:function(a){this.ob=a}}}),bt.className="CommandHandler",Qg=function(){return new bt};function Zt(){Di(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new ft(NaN,NaN).freeze(),this.jd=$r,this.Ab=new Ii,this.wh=new Ii,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=zs,this.uc=new sn(NaN,NaN,NaN,NaN).freeze(),this.Ib=new sn(NaN,NaN,NaN,NaN).freeze(),this.dc=new sn(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=As,this.Ag=this.io=0,this.V=this.tb=this.Dh=this.A=this.Ua=null,this.Uc=!1,this.jo=this.Ng=null}var Tn,Cn,fi,xi,Ai,Xi,Pr,lr,Ir,lo;Zt.prototype.cloneProtected=function(a){a.l=this.l|6144,a.pb=this.pb,a.bn=this.bn,a.Ma=this.Ma,a.pa.assign(this.pa),a.jd=this.jd.J(),this.Lb!==null?a.Lb=this.Lb.copy():a.Lb=null,a.Ca=this.Ca,a.Kb=this.Kb,a.Kg=this.Kg.J(),a.uc.assign(this.uc),a.Ib.assign(this.Ib),a.dc.assign(this.dc),a.Yn=this.Yn,this.ba!==null&&(a.ba=this.ba.copy()),a.Jb=this.Jb.J(),a.sk=this.sk.J(),a.io=this.io,a.Ag=this.Ag,this.Ua!==null&&(a.Ua=this.Ua.copy()),this.A!==null&&(a.A=this.A.nc?this.A:this.A.copy()),this.Dh!==null&&(a.Dh=Hn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},Zt.prototype.Vw=function(a){var y=this.Dh;if(vn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},Zt.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Zt.prototype.clone=function(){var a=new this.constructor;if(this.cloneProtected(a),this.Dh!==null)for(var y=0;y<this.Dh.length;y++){var x=this.Dh[y];a[x]=this[x]}return a},Zt.prototype.copy=function(){return this.clone()},$e=Zt.prototype,$e.qb=function(a){a.classType===Bn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Lt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Zt&&(this.stretch=a)},$e.toString=function(){return Mn(this.constructor)+"#"+sr(this)},$e.th=function(){this.A!==null&&(this.A.nc=!0)};function ar(a){a.A===null?a.A=new Vd:a.A.nc&&(a.A=a.A.copy())}$e.Xc=function(){if(this.ba===null){var a=new Jp;a.Xi=qi,a.yj=qi,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},$e.cb=function(a,y,x,b,E,te,ne){var se=this.part;if(se!==null&&(se.gk(a,y,x,b,E,te,ne),x===this&&a===Ro&&la(this)&&Bo(this,se,y),te=this.diagram,this.animationTriggers===null||te===null||!te.pi||te.undoManager.isUndoingRedoing||te.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&te.animationManager.isEnabled&&!te.animationManager.isTicking&&(this.jo===null&&(this.jo=new on),ne=te.undoManager.transactionLevel===0,a.startCondition===bc?ne=!0:a.startCondition===td&&(ne=!1),ne?(te=new ca,Yg(a,te),ne=this.jo.get(a),ne!==null&&ne.stop(),this.jo.add(a,te),te.vu=this,te.Nw=a,te.add(this,y,b,E),te.start()):(xs(te.animationManager,"Trigger"),te.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof Dn&&x===se&&(se.l&16777216)!==0&&se.data!==null))for(x=this.O.s,b=x.length,E=0;E<b;E++)se=x[E],se instanceof Dn&&gd(se,function(he){he.data!==null&&he.l&16777216&&he.La(y)})};function Bo(a,y,x){var b=a.ih();if(b!==null)for(var E=a.localBindings.iterator;E.next();){var te=E.value,ne=null;if(te.sourceName!==null){if(ne=LS(te,b,a),ne===null)continue;te.sp(a,ne,x,null)}else if(te.isToModel){var se=y.diagram;se===null||se.skipsModelSourceBindings||te.sp(a,se.model.modelData,x,b)}else{if(se=b.data,se===null)continue;var he=y.diagram;he===null||he.skipsModelSourceBindings||te.sp(a,se,x,b)}ne===a&&(se=b.ks(te.Ai),se!==null&&te.Mv(se,ne,x))}}$e.ks=function(a){return this.bindingId===a?this:null},$e.g=function(a,y,x){this.cb(Ro,a,this,y,x)},$e.Ge=function(a,y,x,b){var E=this.uc;if(E.h(a,y,x,b),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new Ii);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),te.pp(E)}};function Fs(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}$e.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?Qn(a.x,a.y,0,0,0,b.height)<=y||Qn(a.x,a.y,0,b.height,b.width,b.height)<=y||Qn(a.x,a.y,b.width,b.height,b.width,0)<=y||Qn(a.x,a.y,b.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,b.height)<=y&&a.zd(b.width,0)<=y&&a.zd(b.width,b.height)<=y},$e.se=function(){return!0},$e.ca=function(a){var y=ft.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return ft.free(y),!1;var b=this.diagram;if(b!==null&&b.wq){var E=b.Ql("extraTouchThreshold"),te=b.Ql("extraTouchArea"),ne=te/2,se=this.naturalBounds;b=this.Df()*b.scale;var he=1/b;if(se.width*b<E&&se.height*b<E)return a=qr(x.x-ne*he,x.y-ne*he,x.width+te*he,x.height+te*he,y.x,y.y),ft.free(y),a}return E=!1,(this instanceof Fr||this instanceof ir?qr(x.x-5,x.y-5,x.width+10,x.height+10,y.x,y.y):x.ca(y))&&(this.tb&&!this.tb.ca(y)?E=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?E=!0:E=this.gh(a)),ft.free(y),E},$e.gh=function(a){var y=this.naturalBounds;return qr(0,0,y.width,y.height,a.x,a.y)},$e.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=sn.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=ft.allocAt(a.x,a.y);return y.ca(x.Cd(E))&&(E.h(a.x,a.bottom),y.ca(x.Cd(E))&&(E.h(a.right,a.bottom),y.ca(x.Cd(E))&&(E.h(a.right,a.y),y.ca(x.Cd(E))&&(b=!0)))),ft.free(E),sn.free(y),b},$e.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=ft.allocAt(0,0);return a.ca(y.Ga(E))&&(E.h(0,x.height),a.ca(y.Ga(E))&&(E.h(x.width,x.height),a.ca(y.Ga(E))&&(E.h(x.width,0),a.ca(y.Ga(E))&&(b=!0)))),ft.free(E),b},$e.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=ft.allocAt(0,0),E=ft.allocAt(0,x.height),te=ft.allocAt(x.width,x.height),ne=ft.allocAt(x.width,0),se=!1;if(a.ca(y.Ga(b))||a.ca(y.Ga(E))||a.ca(y.Ga(te))||a.ca(y.Ga(ne)))se=!0;else{x=sn.allocAt(0,0,x.width,x.height);var he=ft.allocAt(a.x,a.y);x.ca(y.Cd(he))?se=!0:(he.h(a.x,a.bottom),x.ca(y.Cd(he))?se=!0:(he.h(a.right,a.bottom),x.ca(y.Cd(he))?se=!0:(he.h(a.right,a.y),x.ca(y.Cd(he))&&(se=!0)))),ft.free(he),sn.free(x),!se&&(Vt.us(a,b,E)||Vt.us(a,E,te)||Vt.us(a,te,ne)||Vt.us(a,ne,b))&&(se=!0)}return ft.free(b),ft.free(E),ft.free(te),ft.free(ne),se},$e.ga=function(a,y){if(y===void 0&&(y=new ft),a instanceof ui){var x=this.naturalBounds;y.h(a.x*x.width+a.offsetX,a.y*x.height+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},$e.mi=function(a){a===void 0&&(a=new sn);var y=this.naturalBounds,x=this.oe,b=ft.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),br(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),br(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),br(a,b.x,b.y,0,0),ft.free(b),a},$e.li=function(){var a=this.oe;return a.m11===1&&a.m12===0?a=0:(a=180*Math.atan2(a.m12,a.m11)/Math.PI,0>a&&(a+=360)),a},$e.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},$e.qs=function(a,y){return y===void 0&&(y=new ft),y.assign(a),this.oe.Cd(y),y},$e.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},$e.Sj=function(a,y,x,b,E){var te=this.transform,ne=1/(te.m11*te.m22-te.m12*te.m21),se=te.m22*ne,he=-te.m12*ne,_e=-te.m21*ne,Ee=te.m11*ne,Ne=ne*(te.m21*te.dy-te.m22*te.dx),He=ne*(te.m12*te.dx-te.m11*te.dy);return this.areaBackground!==null?(te=this.actualBounds,Vt.Ff(te.left,te.top,te.right,te.bottom,a,y,x,b,E)):(ne=a*se+y*_e+Ne,a=a*he+y*Ee+He,y=x*se+b*_e+Ne,x=x*he+b*Ee+He,E.h(0,0),b=this.naturalBounds,x=Vt.Ff(0,0,b.width,b.height,ne,a,y,x,E),E.transform(te),x)},Zt.prototype.measure=function(a,y,x,b){if(kl(this)!==!1){var E=this.Kg,te=E.right+E.left;E=E.top+E.bottom,a=Math.max(a-te,0),y=Math.max(y-E,0),x=Math.max((x||0)-te,0),b=Math.max((b||0)-E,0),te=this.angle,E=this.desiredSize;var ne=this.kq();te===90||te===270?(a=isFinite(E.height)?E.height+ne:a,y=isFinite(E.width)?E.width+ne:y):(a=isFinite(E.width)?E.width+ne:a,y=isFinite(E.height)?E.height+ne:y),E=x||0,ne=b||0;var se=this instanceof Dn;switch(qa(this,!0)){case Cn:ne=E=0,se&&(y=a=1/0);break;case Tn:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(ne=y);break;case xi:isFinite(a)&&a>x&&(E=a),ne=0,se&&(y=1/0);break;case Ai:isFinite(y)&&y>b&&(ne=y),E=0,se&&(a=1/0)}se=this.maxSize;var he=this.minSize;E>se.width&&he.width<se.width&&(E=se.width),ne>se.height&&he.height<se.height&&(ne=se.height),x=Math.max(E,he.width),b=Math.max(ne,he.height),se.width<x&&(x=Math.min(he.width,x)),se.height<b&&(b=Math.min(he.height,b)),a=Math.min(se.width,a),y=Math.min(se.height,y),a=Math.max(x,a),y=Math.max(b,y),(te===90||te===270)&&(te=a,a=y,y=te,te=x,x=b,b=te),this.uc.ka(),this.Wl(a,y,x,b),this.uc.freeze(),this.uc.w()||Lt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Cs(this,!1)}},Zt.prototype.Wl=function(){},Zt.prototype.Dd=function(){return!1},Zt.prototype.arrange=function(a,y,x,b,E){this.Uk();var te=sn.alloc();te.assign(this.Ib),this.Ib.ka(),Fa(this)===!1?this.Ib.h(a,y,x,b):this.eh(a,y,x,b),this.Ib.freeze(),E===void 0?this.tb=null:this.tb=E,x=!1,E!==void 0?x=!0:(E=this.panel,E!==null&&Qh(E)&&(E=E.panel),E!==null&&(E=E.dc,b=this.measuredBounds,this.areaBackground!==null&&(b=this.Ib),x=y+b.height,b=a+b.width,x=!(0<=a+.05&&b<=E.width+.05&&0<=y+.05&&x<=E.height+.05),this instanceof Lo&&(a=this.naturalBounds,this.Lq>a.height||this.Cb>a.width))&&(x=!0)),this.l=x?this.l|256:this.l&-257,this.Ib.w()||Lt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(te,this.Ib),hh(this,!1),sn.free(te)},$e=Zt.prototype,$e.eh=function(){};function La(a,y,x,b,E){if(a.Ib.h(y,x,b,E),!a.desiredSize.w()){var te=a.uc;x=a.Kg,y=x.right+x.left;var ne=x.top+x.bottom;switch(x=te.width+y,te=te.height+ne,b+=y,E+=ne,y=qa(a,!0),x===b&&te===E&&(y=Cn),y){case Cn:(x>b||te>E)&&(Cs(a,!0),a.measure(x>b?b:x,te>E?E:te,0,0));break;case Tn:Cs(a,!0),a.measure(b,E,0,0);break;case xi:Cs(a,!0),a.measure(b,te,0,0);break;case Ai:Cs(a,!0),a.measure(x,E,0,0)}}}$e.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||jv(x,!0),this.N(),Ui(a,y)||(x.oh(),this.Pn(x)))},$e.Pn=function(a){this.portId!==null&&(jv(a,!0),a instanceof qn&&W1(a,this))},$e.gc=function(a,y){if(!Bl(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var b=1;x!==1&&(b=a.globalAlpha,a.globalAlpha=b*x);var E="";this.filter!==""&&(E=a.filter,a.filter=this.filter);var te=this instanceof Dn&&Qh(this),ne=this.Ib;if(te){var se=this.Ib,he=this.dc,_e=this.areaBackground,Ee=this.Ma;_e===null&&Ee===null||a.yc(),_e!==null&&(os(this,a,_e,!0,!0,he,se),_e instanceof no&&_e.type===Ul?(a.beginPath(),a.rect(se.x,se.y,se.width,se.height),a.ng(_e)):a.fillRect(se.x,se.y,se.width,se.height)),Ee!==null&&(os(this,a,Ee,!0,!1,he,se),Ee instanceof no&&Ee.type===Ul?(a.beginPath(),a.rect(se.x,se.y,se.width,se.height),a.ng(Ee)):a.fillRect(se.x,se.y,se.width,se.height)),this.hh(a,y)}if(!te&&(te||ne.width!==0&&ne.height!==0&&!isNaN(ne.x)&&!isNaN(ne.y))){te=this.transform,se=this.panel,this.l&4096&&na(this),_e=this.part,he=!1;var Ne=0;_e&&y.Gf("drawShadows")&&(he=_e.isShadowed)&&(Ee=_e.shadowOffset,Ne=Math.max(Ee.y,Ee.x)*y.scale*y.Mb),Ee=this.Dd();var He;if(!(He=y.$i||!Ee)){var Ye=this.naturalBounds;He=this.wh;var Qe=He.m11,st=He.m21,Pt=He.dx,St=He.m12,Tt=He.m22,At=He.dy,It,Wt=It=0;He=It*Qe+Wt*st+Pt;var tn=It*St+Wt*Tt+At;It=Ye.width+Ne,Wt=0;var Kn=It*Qe+Wt*st+Pt;It=It*St+Wt*Tt+At,Wt=Math.min(He,Kn);var hi=Math.min(tn,It),ii=Math.max(He+0,Kn)-Wt,Rn=Math.max(tn+0,It)-hi;He=Wt,tn=hi,It=Ye.width+Ne,Wt=Ye.height+Ne,Kn=It*Qe+Wt*st+Pt,It=It*St+Wt*Tt+At,Wt=Math.min(He,Kn),hi=Math.min(tn,It),ii=Math.max(He+ii,Kn)-Wt,Rn=Math.max(tn+Rn,It)-hi,He=Wt,tn=hi,It=0,Wt=Ye.height+Ne,Kn=It*Qe+Wt*st+Pt,It=It*St+Wt*Tt+At,Wt=Math.min(He,Kn),hi=Math.min(tn,It),ii=Math.max(He+ii,Kn)-Wt,Rn=Math.max(tn+Rn,It)-hi,He=Wt,tn=hi,Ne=y.viewportBounds,Ye=Ne.x,Qe=Ne.y,He=!(He>Ne.width+Ye||Ye>ii+He||tn>Ne.height+Qe||Qe>Rn+tn)}if(He){if(He=(this.l&256)!==0,a.clipInsteadOfFill&&(He=!1),this instanceof Lo&&(a.font=this.font),He){if(tn=se.se()?se.naturalBounds:se.actualBounds,ii=Math.max(ne.x,tn.x),Rn=Math.max(ne.y,tn.y),Ne=Math.min(ne.right,tn.right)-ii,Ye=Math.min(ne.bottom,tn.bottom)-Rn,Qe=this.tb,Qe!==null&&(ii=Qe.x,Rn=Qe.y,Ne=Qe.width,Ye=Qe.height),ii>ne.width+ne.x||ne.x>tn.width+tn.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(ii,Rn,Ne,Ye),a.clip()}if(Ee){if(!_e.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}he&&(tn=_e.shadowOffset,a.Ev(tn.x*y.scale*this.scale*y.Mb,tn.y*y.scale*this.scale*y.Mb,_e.shadowBlur),Ah(a),a.shadowColor=_e.shadowColor)}he&&this.shadowVisible===!0?Ah(a):he&&this.shadowVisible===!1&&ch(a),_e=this.naturalBounds,this.areaBackground!==null&&(a.yc(),Ml(this,a,_e,ne)),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),he&&Js(this,se)&&this.shadowVisible===null&&ch(a),this.Ma!==null&&(a.yc(),al(this,a,_e,ne)),he&&(this.Ma!==null||this.areaBackground!==null||Js(this,se))?(gu(this,!0),this.shadowVisible===null&&ch(a)):gu(this,!1),this.hh(a,y),he&&this.l&512&&Ah(a),Ee&&he&&ch(a),He&&(a.restore(),a.Vc(this instanceof Dn)),te.ws()||(y=1/(te.m11*te.m22-te.m12*te.m21),a.transform(te.m22*y,-te.m12*y,-te.m21*y,te.m11*y,y*(te.m21*te.dy-te.m22*te.dx),y*(te.m12*te.dx-te.m11*te.dy)))}}x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E)}}};function Js(a,y){return y===null?!1:(Qh(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Dn.Auto||y.type===Dn.Spot)&&y.Pb()!==a)}$e.Dv=function(){};function Ml(a,y,x,b){os(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof no&&a.areaBackground.type===Ul?(y.beginPath(),y.rect(b.x,b.y,b.width,b.height),y.ng(a.areaBackground)):y.fillRect(b.x,b.y,b.width,b.height)}function al(a,y,x,b){var E=a.kq(),te=x.x,ne=x.y,se=x.width+E,he=x.height+E;os(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof no&&a.Ma.type===Ul?(y.beginPath(),y.rect(te-E/2,ne-E/2,se,he),y.ng(a.Ma)):y.fillRect(te-E/2,ne-E/2,se,he)}function wa(a,y,x){for(var b=y.O.s,E=b.length,te=-1,ne=0;ne<E;ne++)if(b[ne]===a){te=ne;break}if(a=te,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===Dn.Table?(y=y.svg.getElementsByClassName("gojs-ts"),y=y.length!==0?y[0]:null,y!==null&&y.after(x)):y.svg.prepend(x);else{for(;a!==0&&!y.M(a-1).Ed();)a--;a===0?y.svg.prepend(x):(a=y.M(a-1).svg,a!==null?a.after(x):y.svg.appendChild(x))}}function Bl(a,y,x){if(!(y instanceof ml))return!1;if(!a.visible||a.opacity===0||a.Dd()&&!a.isVisible())return a.svg!==null&&a.svg.parentNode!==null&&a.svg.remove(),!0;var b=a.panel,E=a.nk(y);if(a.kk(y,x,E))return a.svg.parentElement!==null?(a.Dd()&&(y.ti=a.svg),!0):(a.Dd()?(y.ti!==null?y.ti.after(a.svg):y.Nj.prepend(a.svg),y.ti=a.svg):b&&wa(a,b,a.svg),!0);if(a.Dd()&&a.isShadowed){var te=a.shadowOffset;y.Ev(te.x*x.scale*a.scale*x.Mb,te.y*x.scale*a.scale*x.Mb,a.shadowBlur),Ah(y),y.shadowColor=a.shadowColor}a instanceof Lo&&(y.font=a.font),y.yd=null;var ne=a.transform;te=a instanceof Dn;var se=a instanceof Dn?Qh(a):!1;a.l&4096&&na(a);var he=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,te&&se?(qp(y,1,0,0,1,0,0),a.svg=y.ad):te?(qp(y,ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy),a.svg=y.ad):qp(y,1,0,0,1,0,0)),E=a.naturalBounds,a.areaBackground!==null){var _e=ne.copy().Vj();y.rb.ha=[_e.m11,_e.m12,_e.m21,_e.m22,_e.dx,_e.dy],Ml(a,y,E,he),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return te||(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),a.background!==null&&(te?(se&&(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),al(a,y,E,he),se&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],al(a,y,E,he)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),ne=y.yd,E=a.part,se=!1,E&&x.Gf("drawShadows")&&(se=E.isShadowed),y.clipInsteadOfFill&&(se=!1),a.Dd()&&se&&Ah(y),se&&a.shadowVisible===!0?Ah(y):se&&a.shadowVisible===!1&&ch(y),E=a.panel,se&&Js(a,E)&&a.shadowVisible===null&&ch(y),y.Il&&(_e=x.computePixelRatio(),_e="drop-shadow("+y.shadowOffsetX/_e+"px "+y.shadowOffsetY/_e+"px "+y.shadowBlur/_e/2+"px "+y.shadowColor+")",a.background!==null&&ne.Ma.setAttributeNS(null,"filter",_e),a.areaBackground!==null&&ne.gd.setAttributeNS(null,"filter",_e)),se&&(a.Ma!==null||a.areaBackground!==null||Js(a,E))?(gu(a,!0),a.shadowVisible===null&&ch(y)):gu(a,!1),E=se,a.hh(y,x),te&&y.nh.pop(),y.o&&y.nh.pop(),ne=y.Gv.hs,se=te?a.svg:y.yd,_e=a.svg,!te&&_e!==null&&se!==_e&&_e.parentNode===a.panel.svg?(a.svg.replaceWith(se),a.svg=se,se!==null&&a.$o(y,b,he,se),Ja(y,_e),!0):(a.svg=se,ne!==null&&se===null&&(fm(y),y.nh.pop()),se===null||(a.$o(y,b,he,se),y.Il&&(x=x.computePixelRatio(),a.Dv(se,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),E&&a.l&512&&Ah(y),a.Dd()&&ch(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&se.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&se.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(se):y.Nj.prepend(se),y.ti=se):b!==null&&wa(a,b,se),ne!==null&&ne(a,se)),!0)}$e.$o=function(a,y,x,b){var E=(this.l&256)!==0;if(a.clipInsteadOfFill&&(E=!1),E){var te=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,te.x),E=Math.max(x.y,te.y);var ne=Math.min(x.right,te.right)-y;x=Math.min(x.bottom,te.bottom)-E,te=this.tb,te!==null&&(y=te.x,E=te.y,ne=te.width,x=te.height),te=b.getAttribute("clip-path");var se=null;te!==null&&(se=a.svg.getElementById(te.split("#")[1].slice(0,-1))),se===null?(te="CLIP"+so++,se=a.Ud("clipPath",{id:te}),y=a.Ud("rect",{x:y,y:E,width:ne,height:x}),this instanceof Dn&&(E=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")),se.appendChild(y),a.svg.appendChild(se),b.setAttributeNS(null,"clip-path","url(#"+te+")")):(a=se.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",E.toString()),a.setAttribute("width",ne.toString()),a.setAttribute("height",x.toString()))}else b.removeAttributeNS(null,"clip-path"),Ja(a,b)};function Ja(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function _a(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=ti(y);for(var b=y.next();!b.done;b=y.next())b=x.getElementById(b.value.split("#")[1].slice(0,-1)),b!==null&&b.remove()}a.svg.remove()}}$e.hh=function(){},$e.lv=function(){this.Uc=!0},$e.kk=function(a,y,x){if(this.Uc)return this.lv(),this.Uc=!1;if(y=this.svg,y===null)return!1;if(!this.visible)return y.remove(),!1;if(y.nodeName!=="g"&&x||y.nodeName==="g"&&!x)return!1;var b=this.transform,E=this instanceof Dn?Qh(this):!1;if(!(this instanceof Dn&&E))if(this instanceof $a){var te=this.bt;a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy],te!==null&&Jy(a,te[0],te[1],te[2],te[3],te[4],te[5],te[6],te[7]),x?y.lastElementChild.setAttributeNS(null,"transform",qy(a)):y.setAttributeNS(null,"transform",qy(a))}else if(!x||this instanceof Dn)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof ir){te=y.getElementsByTagName("path");for(var ne=0;ne<te.length;ne++)te[ne].setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");return te=this.Dd()?this.opacity*a.globalAlpha:this.opacity,te===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",te.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(te=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(ne=b.copy().Vj(),a.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],Ml(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(ne=y.gd.getAttribute("filter"),ne!==null&&a.ad.setAttribute("filter",ne),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),te&&pm(a,te)),(this.background!==null||y.Ma!==void 0)&&(te=y.Ma,this.background===null?(pm(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((E||x&&!(this instanceof Dn))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),al(this,a,this.naturalBounds,this.actualBounds),y.Ma?(pm(a,y.Ma),x=y.Ma.getAttribute("filter"),x!==null&&a.ad.setAttribute("filter",x),y.Ma.replaceWith(a.ad)):y.prepend(a.ad),y.Ma=a.ad),te&&pm(a,te)),this.$o(a,this.panel,this.actualBounds,y),!0},$e.nk=function(a){if(this.background!==null||this.areaBackground!==null)return!0;var y=(this.l&256)!==0;return a.clipInsteadOfFill&&(y=!1),!!y};function os(a,y,x,b,E,te,ne){if(x!==null){var se=1,he=1;if(typeof x=="string")b?y.fillStyle=x:y.strokeStyle=x;else if(x.type===qh)b?y.fillStyle=x.color:y.strokeStyle=x.color;else{var _e=a.kq();if(se=te.width,he=te.height,E?(se=ne.width,he=ne.height):b||(se+=_e,he+=_e),(te=y instanceof pd)&&x.xe&&(x.type===Ff||x.yk===se&&x.ft===he))var Ee=x.xe;else{var Ne=0,He=0,Ye=0,Qe=0,st=0,Pt=0;if(Pt=st=0,E?(st=ne.x,Pt=ne.y):b||(st-=_e/2,Pt-=_e/2),Ne=x.start.x*se+x.start.offsetX,He=x.start.y*he+x.start.offsetY,Ye=x.end.x*se+x.end.offsetX,Qe=x.end.y*he+x.end.offsetY,Ne+=st,Ye+=st,He+=Pt,Qe+=Pt,x.type===Dh)Ee=y.createLinearGradient(Ne,He,Ye,Qe);else if(x.type===Ul)Pt=isNaN(x.endRadius)?Math.max(se,he)/2:x.endRadius,isNaN(x.startRadius)?(st=0,Pt=Math.max(se,he)/2):st=x.startRadius,Ee=y.createRadialGradient(Ne,He,st,Ye,Qe,Pt);else if(x.type===Ff)try{Ee=y.createPattern(x.pattern,"repeat")}catch(Tt){Ee=null}if(x.type!==Ff&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)Ee.addColorStop(E.key,E.value);if(te&&(x.xe=Ee,Ee!==null&&(x.yk=se,x.ft=he),Ee===null&&x.type===Ff&&x.yk!==-1)){x.yk=-1;var St=a.diagram;St!==null&&x.yk===-1&&pi(function(){St.redraw()},600)}}b?y.fillStyle=Ee:y.strokeStyle=Ee}}}$e.rg=function(a){if(a instanceof Dn)e:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break e}y=y.panel}a=!1}else a=!1;return a},$e.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},$e.If=function(){for(var a=this instanceof Dn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function na(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){eu(a,!1);return}if(y.translate(a.Ib.x-a.uc.x,a.Ib.y-a.uc.y),a.scale!==1||a.angle!==0){var x=a.naturalBounds;a.no(y,x.x,x.y,x.width,x.height)}eu(a,!1),jl(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,jl(a,!1)):y.oe!==null&&(x=a.wh,x.reset(),y.se()?x.multiply(y.wh):y.panel!==null&&x.multiply(y.panel.wh),x.multiply(a.Ab),a.Kk=a.scale*y.Kk,jl(a,!1)))}$e.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=ft.alloc();te.yi(y,x,b,E,$i),a.rotate(this.Kb,te.x,te.y),ft.free(te)}},$e.v=function(a){if(!kl(this)){a===void 0&&(a=!1),Cs(this,!0),hh(this,!0);var y=this.panel;y===null||a||y.v()}},$e.Uj=function(){kl(this)||(Cs(this,!0),hh(this,!0))};function Ra(a){if(!Fa(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof qn&&a.Bd(),y.$b())),hh(a,!0)}}$e.Uk=function(){!(this.l&2048)&&(eu(this,!0),jl(this,!0))},$e.Wu=function(){jl(this,!0)},$e.N=function(){var a=this.part;a!==null&&a.N()};function qa(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===Dn.Table?Nu(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===Dn.Auto&&b.Pb()===a?Qs(a,Tn,y):x===Xi?b!==null?b.type===Dn.Spot&&b.Pb()===a?Qs(a,Tn,y):(x=b.defaultStretch,x===Xi?Qs(a,Cn,y):Qs(a,x,y)):Qs(a,Cn,y):Qs(a,x,y)}function Nu(a,y,x,b){var E=a.stretch;if(E!==Xi)return Qs(a,E,b);var te=E=null;switch(y.stretch){case Ai:te=!0;break;case Tn:te=!0}switch(x.stretch){case xi:E=!0;break;case Tn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===xi||y===Tn),te===null&&(te=y===Ai||y===Tn),E===!0&&te===!0?Qs(a,Tn,b):E===!0?Qs(a,xi,b):te===!0?Qs(a,Ai,b):Qs(a,Cn,b)}function Qs(a,y,x){if(x)return y;if(y===Cn||(x=a.desiredSize,x.w()))return Cn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===xi)return Cn;if(y===Tn)return Ai}else{if(y===Ai)return Cn;if(y===Tn)return xi}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Ai)return Cn;if(y===Tn)return xi}else{if(y===xi)return Cn;if(y===Tn)return Ai}return y}function gu(a,y){a.l=y?a.l|512:a.l&-513}function la(a){return(a.l&1024)!==0}function Zd(a,y){a.l=y?a.l|1024:a.l&-1025}function eu(a,y){a.l=y?a.l|2048:a.l&-2049}function jl(a,y){a.l=y?a.l|4096:a.l&-4097}function kl(a){return(a.l&8192)!==0}function Cs(a,y){a.l=y?a.l|8192:a.l&-8193}function Fa(a){return(a.l&16384)!==0}function hh(a,y){a.l=y?a.l|16384:a.l&-16385}$e.Gj=function(){this.svg=null},$e.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},$e.Av=function(){},$e.zv=function(a){return this.pa=a,Ra(this),!0},$e.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},$e.kq=function(){return 0};function dd(a){var y=a.part;if(y instanceof qn&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||W1(y,a)}}function Yy(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof Dn?a instanceof qn?a.Bd():a.qm(a,function(x){dd(x)}):dd(a))}$e.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new ms(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&f1(a)&&Lt("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new Ln),this.localBindings.add(E),this},$e.set=function(a){return Object.assign(this,a),this},$e.Du=function(a){return iv(this,a),this},$e.apply=function(a){return a(this),this},$e.nm=function(a){return rd(this,a),this},$e.pz=function(){return this.ih()},$e.ih=function(){for(var a=this instanceof Dn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},$e.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new on),this.animationTriggers.add(a.propertyName,a),this};function zl(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var b=null,E=null;if(typeof a=="function")E=a;else if(typeof a=="string"){var te=Af.I(a);typeof te=="function"?(x=Hn(arguments),b=te(x),Kt(b)||Lt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=jt.go[a]}if(b===null&&(E!=null&&E.constructor||Lt("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),b=new E),E=1,b instanceof rn&&1<x.length){te=b;var ne=x[1];(typeof ne=="string"||ne instanceof HTMLDivElement)&&(Cp(te,ne),E++)}for(;E<x.length;E++)te=x[E],te===void 0?Lt("Undefined value at argument "+E+" for object being constructed by GraphObject.make: "+b):iv(b,te);return b}function iv(a,y){if(typeof y=="string")if(a instanceof Lo)a.text=y;else if(a instanceof ir)a.figure=y;else if(a instanceof $a)a.source=y;else if(a instanceof Dn)y=mu.I(y),y!==null&&(a.type=y);else if(a instanceof no){var x=Mi(no,y);x!==null?a.type=x:Lt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof In?(y=Mi(In,y),y!==null&&(a.type=y)):a instanceof Rr&&(y=Mi(Rr,y),y!==null&&(a.type=y));else if(y instanceof Zt)a instanceof Dn||Lt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Es){var b;y.isRow&&typeof a.getRowDefinition=="function"?b=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(b=a.getColumnDefinition(y.index)),b instanceof Es?Tm(b,y):Lt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof nn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof ks)a.type=y;else if(y instanceof ms)a instanceof Zt||a instanceof Es?a.bind(y):Lt("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof fu)a instanceof Zt?a.Jv(y):Lt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof ps)a instanceof In&&a.type===In.o?a.figures.add(y):Lt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Rr)a instanceof ps?a.segments.add(y):Lt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof Zo)a instanceof rn||a instanceof Ki?a.layout=y:Lt("A Layout can only be assigned to a Diagram or a Group, not to: "+a);else if(Array.isArray(y))for(x=0;x<y.length;x++)iv(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof no){x=new vi;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);rd(a,x)}else if(a instanceof Es){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&Lt("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+E),a.isRow=!0,a.index=E):y.column!==void 0&&(E=y.column,(E==null||E===1/0||isNaN(E)||0>E)&&Lt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new vi;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);rd(a,E)}else rd(a,y);else Lt('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function Jh(a,y){Af.add(a,y)}function dm(a,y,x){x===void 0&&(x=null);var b=a[1];if(typeof x=="function"?x(b):typeof b=="string")return a.splice(1,1),b;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}ot.Object.defineProperties(Zt.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new Vd),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 Vd),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 Vd),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(ar(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&&(ar(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:za},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new Ac),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===za&&(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 Ac),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:1<a&&(a=1);var y=this.segmentFraction;y!==a&&(this.Ua===null&&(this.Ua=new Ac),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Zn},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new Ac),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:Xi},set:function(a){var y=this.stretch;y!==a&&(ar(this),this.A.hg=a,this.v(),this.g("stretch",y,a))}},name:{get:function(){return this.A!==null?this.A.xa:""},set:function(a){var y=this.name;y!==a&&(ar(this),this.A.xa=a,this.part!==null&&(this.part.Rh=null),this.g("name",y,a))}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&Pn(a,"0 <= value <= 1",Zt,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(yd(y,y.actualBounds)))}},filter:{get:function(){return this.bn},set:function(a){var y=this.bn;y!==a&&(this.bn=a,this.Uc=!0,this.g("filter",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(yd(y,y.actualBounds)))}},visible:{get:function(){return(this.l&1)!==0},set:function(a){var y=(this.l&1)!==0;y!==a&&(this.l^=1,this.g("visible",y,a),y=this.panel,y!==null?y.v():this.Dd()&&this.Zb(a),this.N(),Yy(this))}},pickable:{get:function(){return(this.l&2)!==0},set:function(a){var y=(this.l&2)!==0;y!==a&&(this.l^=2,this.g("pickable",y,a))}},fromLinkableDuplicates:{get:function(){return(this.l&4)!==0},set:function(a){var y=(this.l&4)!==0;y!==a&&(this.l^=4,this.g("fromLinkableDuplicates",y,a))}},fromLinkableSelfNode:{get:function(){return(this.l&8)!==0},set:function(a){var y=(this.l&8)!==0;y!==a&&(this.l^=8,this.g("fromLinkableSelfNode",y,a))}},toLinkableDuplicates:{get:function(){return(this.l&16)!==0},set:function(a){var y=(this.l&16)!==0;y!==a&&(this.l^=16,this.g("toLinkableDuplicates",y,a))}},toLinkableSelfNode:{get:function(){return(this.l&32)!==0},set:function(a){var y=(this.l&32)!==0;y!==a&&(this.l^=32,this.g("toLinkableSelfNode",y,a))}},isPanelMain:{get:function(){return(this.l&64)!==0},set:function(a){var y=(this.l&64)!==0;y!==a&&(this.l^=64,this.v(),this.g("isPanelMain",y,a))}},isActionable:{get:function(){return(this.l&128)!==0},set:function(a){var y=(this.l&128)!==0;y!==a&&(this.l^=128,this.g("isActionable",y,a))}},areaBackground:{get:function(){return this.A!==null?this.A.gd:null},set:function(a){var y=this.areaBackground;y!==a&&(a!==null&&Yd(a,"GraphObject.areaBackground"),a instanceof no&&a.freeze(),ar(this),this.A.gd=a,this.N(),this.g("areaBackground",y,a))}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&Yd(a,"GraphObject.background"),a instanceof no&&a.freeze(),this.Ma=a,this.N(),this.g("background",y,a))}},part:{get:function(){if(this.Dd())return this;if(this.Ng!==null)return this.Ng;var a;for(a=this.panel;a;){if(a instanceof Ci)return this.Ng=a;a=a.panel}return null}},svg:{get:function(){return this.V},set:function(a){this.V=a}},panel:{get:function(){return this.Me}},layer:{get:function(){var a=this.part;return a!==null?a.layer:null}},diagram:{get:function(){var a=this.part;return a!==null?a.diagram:null}},position:{get:function(){return this.pa},set:function(a){var y=a.x,x=a.y,b=this.pa,E=b.x;b=b.y,(E===y||isNaN(E)&&isNaN(y))&&(b===x||isNaN(b)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,E,b)&&this.g("position",new ft(E,b),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&Lt("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,Yy(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,b=this.jd,E=b.width,te=b.height;(E===y||isNaN(E)&&isNaN(y))&&(te===x||isNaN(te)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof ir&&this.qc(),this.g("desiredSize",b,a),la(this)&&(a=this.part,a!==null&&(Bo(this,a,"width"),Bo(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 wn(a,this.jd.height).freeze(),this.v(),this instanceof ir&&this.qc(),this.g("desiredSize",y,a),la(this)&&(a=this.part,a!==null&&Bo(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 wn(this.jd.width,a).freeze(),this.v(),this instanceof ir&&this.qc(),this.g("desiredSize",y,a),la(this)&&(a=this.part,a!==null&&Bo(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:zi},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(),ar(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:jr},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(),ar(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 nr(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&&na(this),this.Ab}},oe:{get:function(){return this.l&4096&&na(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(ar(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:Cn},set:function(a){this.reshapingBehavior!==a&&(ar(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()&&Lt("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),Ra(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&&Pn(a,">= 0",Zt,"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&&Pn(a,">= 1",Zt,"columnSpan"),ar(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&&Pn(a,">= 0",Zt,"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&&Pn(a,">= 1",Zt,"rowSpan"),ar(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&&(ar(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 qn||Lt("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Gv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,K1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:qi},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),dd(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Pn(a,">= 0",Zt,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),dd(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),dd(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&&Pn(a,">= 0",Zt,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:qi},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),dd(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Pn(a,">= 0",Zt,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),dd(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),dd(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&&Pn(a,">= 0",Zt,"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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Zt.prototype.trigger=Zt.prototype.Jv,Zt.prototype.findBindingPanel=Zt.prototype.ih,Zt.prototype.findTemplateBinder=Zt.prototype.pz,Zt.prototype.setProperties=Zt.prototype.nm,Zt.prototype.apply=Zt.prototype.apply,Zt.prototype.attach=Zt.prototype.Du,Zt.prototype.set=Zt.prototype.set,Zt.prototype.isEnabledObject=Zt.prototype.If,Zt.prototype.isVisibleObject=Zt.prototype.Ed,Zt.prototype.isContainedBy=Zt.prototype.rg,Zt.prototype.getNearestIntersectionPoint=Zt.prototype.rs,Zt.prototype.getLocalPoint=Zt.prototype.qs,Zt.prototype.getDocumentScale=Zt.prototype.Df,Zt.prototype.getDocumentAngle=Zt.prototype.li,Zt.prototype.getDocumentBounds=Zt.prototype.mi,Zt.prototype.getDocumentPoint=Zt.prototype.ga,Zt.prototype.intersectsRect=Zt.prototype.Yc,Zt.prototype.containedInRect=Zt.prototype.fh,Zt.prototype.containsRect=Zt.prototype.Re,Zt.prototype.containsPoint=Zt.prototype.ca,Zt.prototype.raiseChanged=Zt.prototype.g,Zt.prototype.raiseChangedEvent=Zt.prototype.cb,Zt.prototype.addCopyProperty=Zt.prototype.Vw;var Af=null;Zt.className="GraphObject",Af=new on,Jh("Button",function(){function a(x,b){return x.diagram.ic(x.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E},function(E){return E===b})!==null}var y=zl(Dn,Dn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof Dn){var E=x.fb("ButtonBorder");E!==null&&(E.fill=b?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},zl(ir,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new ui(0,0,2.76142374915397,2.761423749153969),spot2:new ui(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,b){if(b.If()&&b instanceof Dn&&(x=b.fb("ButtonBorder"),x instanceof ir)){var E=b._buttonFillOver;b._buttonFillNormal=x.fill,x.fill=E,E=b._buttonStrokeOver,b._buttonStrokeNormal=x.stroke,x.stroke=E}},y.mouseLeave=function(x,b){b.If()&&b instanceof Dn&&(x=b.fb("ButtonBorder"),x instanceof ir&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof Dn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof ir){x=x.diagram;var te=x.skipsUndoManager;x.skipsUndoManager=!0;var ne=b._buttonFillPressed;b._buttonFillOver=E.fill,E.fill=ne,ne=b._buttonStrokePressed,b._buttonStrokeOver=E.stroke,E.stroke=ne,x.skipsUndoManager=te}}},y.actionUp=function(x,b){if(b.If()&&b instanceof Dn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof ir){var te=x.diagram,ne=te.skipsUndoManager;te.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),te.skipsUndoManager=ne}}},y.actionCancel=function(x,b){if(b.If()&&b instanceof Dn&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof ir){var te=x.diagram,ne=te.skipsUndoManager;te.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),te.skipsUndoManager=ne}}},y.actionMove=function(x,b){if(b.If()&&b instanceof Dn&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof ir))){var te=E.skipsUndoManager;E.skipsUndoManager=!0;var ne=b._buttonFillPressed;x.fill!==ne&&(x.fill=ne),ne=b._buttonStrokePressed,x.stroke!==ne&&(x.stroke=ne),E.skipsUndoManager=te}}},y}),Jh("TreeExpanderButton",function(){var a=zl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},zl(ir,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ji},new ms("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new ms("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Fr&&(x=x.adornedPart),x instanceof qn){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isTreeExpanded){if(!b.canCollapseTree(x))return}else if(!b.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?b.collapseTree(x):b.expandTree(x)}}},a}),Jh("SubGraphExpanderButton",function(){var a=zl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},zl(ir,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ji},new ms("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 Fr&&(x=x.adornedPart),x instanceof Ki){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isSubGraphExpanded){if(!b.canCollapseSubGraph(x))return}else if(!b.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?b.collapseSubGraph(x):b.expandSubGraph(x)}}},a}),Jh("ToolTip",function(){return zl(Fr,Dn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new ft(0,3),shadowBlur:5},zl(ir,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new ui(0,0,4,6),spot2:new ui(1,1,-4,-4)}))}),Jh("ContextMenu",function(){return zl(Fr,Dn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new ft(0,3),shadowBlur:5},new ms("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Jh("ContextMenuButton",function(){var a=zl("Button");a.stretch=xi;var y=a.fb("ButtonBorder");return y instanceof ir&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new ui(0,0,2,3),y.spot2=new ui(1,1,-2,-2)),a}),Jh("PanelExpanderButton",function(a){var y=dm(a,"COLLAPSIBLE"),x=zl("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},zl(ir,{name:"ButtonIcon",strokeWidth:2},new ms("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof ir&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(b,E){var te=E.diagram;if(te!==null&&!te.isReadOnly){var ne=E.ih();ne===null&&(ne=E.part),ne!==null&&(E=ne.fb(y),E!==null&&(b.handled=!0,te.Ea("Collapse/Expand Panel"),E.visible=!E.visible,te.eb("Collapse/Expand Panel")))}},x}),Jh("CheckBoxButton",function(a){var y=dm(a);return a=zl("Button",{desiredSize:new wn(14,14)},zl(ir,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Tn,geometryStretch:fi,visible:!1},y!==""?new ms("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof Dn){var E=x.diagram;if(!(E===null||E.isReadOnly||y!==""&&E.model.isReadOnly)){x.handled=!0;var te=b.fb("ButtonIcon");E.Ea("checkbox"),te.visible=!te.visible,typeof b._doClick=="function"&&b._doClick(x,b),E.eb("checkbox")}}},a}),Jh("CheckBox",function(a){a=dm(a),a=zl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new nr(0,1,0,0)});var y=zl(Dn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new nr(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}),Zt.None=Cn=new nn(Zt,"None",0),Zt.Default=Xi=new nn(Zt,"Default",0),Zt.Vertical=Ai=new nn(Zt,"Vertical",4),Zt.Horizontal=xi=new nn(Zt,"Horizontal",5),Zt.Fill=Tn=new nn(Zt,"Fill",3),Zt.Uniform=fi=new nn(Zt,"Uniform",1),Zt.UniformToFill=Pr=new nn(Zt,"UniformToFill",2),Zt.FlipVertical=lr=new nn(Zt,"FlipVertical",1),Zt.FlipHorizontal=Ir=new nn(Zt,"FlipHorizontal",2),Zt.FlipBoth=lo=new nn(Zt,"FlipBoth",3),Zt.make=zl,Zt.getBuilders=function(){var a=new on,y;for(y in Af)if(y!==y.toLowerCase()){var x=Af.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},Zt.defineBuilder=Jh,Zt.build=function(a,y,x){for(var b=[],E=2;E<arguments.length;++E)b[E-2]=arguments[E];if(E=Af.I(a),typeof E=="function"&&(b=E([a].concat(b)),b instanceof Zt))return y&&b.set(y),b;Lt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Zt.takeBuilderArgument=dm;function Vd(){this.nc=!1,this.xa="",this.zp=-1,this.nb=this.wm=this.te=null,this.j="",this.hb=this.Di=this.Hb=this.Ch=this.$h=this.F=this.Ha=this.ia=this.V=this.Lh=this.Xd=this.Of=this.Nh=this.Oh=this.Qh=this.Ph=this.Mh=this.Bh=this.Fh=this.zh=null,this.u=zi,this.o=jr,this.hg=Xi,this.ob=this.Bi=1,this.Pf=Cn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}Vd.prototype.copy=function(){var a=new Vd;return a.xa=this.xa,a.zp=this.zp,a.te=this.te,a.nb=this.nb,a.j=this.j,a.zh=this.zh,a.Fh=this.Fh,a.Bh=this.Bh,a.Mh=this.Mh,a.Ph=this.Ph,a.Qh=this.Qh,a.Oh=this.Oh,a.Nh=this.Nh,a.Of=this.Of,a.Xd=this.Xd,a.Lh=this.Lh,a.V=this.V,a.ia=this.ia,a.Ha=this.Ha,a.F=this.F,a.$h=this.$h,a.Ch=this.Ch,a.Hb=this.Hb,a.Di=this.Di,a.hb=this.hb,a.u=this.u.J(),a.o=this.o.J(),a.hg=this.hg,a.Bi=this.Bi,a.ob=this.ob,a.Pf=this.Pf,a.gd=this.gd,a.Ci=this.Ci,a.Pc=this.Pc,a.Oc=this.Oc,a};function Ac(){this.u=-1/0,this.o=0,this.F=Zn,this.rr=za,this.j=this.V="None"}Ac.prototype.copy=function(){var a=new Ac;return a.u=this.u,a.o=this.o,a.F=this.F.J(),a.rr=this.rr,a.V=this.V,a.j=this.j,a},Ac.className="LinkElementSettings";function Jp(){this.yj=this.Xi=As,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}Jp.prototype.copy=function(){var a=new Jp;return a.Xi=this.Xi.J(),a.yj=this.yj.J(),a.Vi=this.Vi,a.wj=this.wj,a.Wi=this.Wi,a.xj=this.xj,a.hq=this.hq,a.Tr=this.Tr,a.iq=this.iq,a.Ur=this.Ur,a},Jp.className="LinkSettings";function fd(){this.ha=[1,0,0,1,0,0]}fd.prototype.copy=function(){var a=new fd;return a.ha[0]=this.ha[0],a.ha[1]=this.ha[1],a.ha[2]=this.ha[2],a.ha[3]=this.ha[3],a.ha[4]=this.ha[4],a.ha[5]=this.ha[5],a},fd.prototype.translate=function(a,y){this.ha[4]+=this.ha[0]*a+this.ha[2]*y,this.ha[5]+=this.ha[1]*a+this.ha[3]*y},fd.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},fd.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.ha[1]*a+this.ha[3]*b,te=this.ha[0]*-b+this.ha[2]*a,ne=this.ha[1]*-b+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*b,this.ha[1]=E,this.ha[2]=te,this.ha[3]=ne,this.translate(-y,-x)}},fd.className="STransform";function Kd(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Kd.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Kd.className="SGradient";function Ku(a,y,x){this.ownerDocument=a=y===void 0?jt.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 ml(this,x)}Ku.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",b+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+b),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",b+"px"),!0):!1},Ku.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),Kt(y))for(var b in y)a.setAttributeNS(b==="href"?"http://www.w3.org/1999/xlink":"",b,y[b]);return x!==void 0&&(a.textContent=x),a},Ku.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Ku.prototype.focus=function(){this.Oa.focus()},Ku.prototype.mx=function(){this.ownerDocument=null},ot.Object.defineProperties(Ku.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}}}),Ku.className="SVGSurface";function ml(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 fd,this.j=fm(this),this.Nj=fm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=so++,b=this.Ud("clipPath",{id:"mainClip"+x});b.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=b,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(b),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function Xy(a,y,x,b,E,te,ne){a.Nj===void 0?qp(a,y,x,b,E,te,ne):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+te+", "+ne+")")}$e=ml.prototype,$e.arc=function(a,y,x,b,E,te,ne,se){var he=2*Math.PI,_e=he-1e-6,Ee=x*Math.cos(b),Ne=x*Math.sin(b),He=a+Ee,Ye=y+Ne,Qe=te?0:1;b=te?b-E:E-b,(1e-6<Math.abs(ne-He)||1e-6<Math.abs(se-Ye))&&this.path.push(["L",He,+Ye]),0>b&&(b=b%he+he),b>_e?(this.path.push(["A",x,x,0,1,Qe,a-Ee,y-Ne]),this.path.push(["A",x,x,0,1,Qe,He,Ye])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),Qe,a+x*Math.cos(E),y+x*Math.sin(E)])},$e.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},$e.Se=function(a){this.addPath(this.path,this.rb,a||0)},$e.bezierCurveTo=function(a,y,x,b,E,te){this.path.push(["C",a,y,x,b,E,te])},$e.clearRect=function(){},$e.clip=function(){this.Yl.clipPath=!0},$e.closePath=function(){this.path.push(["z"])},$e.createLinearGradient=function(a,y,x,b){var E=new Kd("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},$e.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 b="PATTERN"+so++,E={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:b,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(hd,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},$e.createRadialGradient=function(a,y,x,b,E,te){var ne=new Kd("radial");return ne.x1=a,ne.y1=y,ne.r1=x,ne.x2=b,ne.y2=E,ne.r2=te,ne};function Jy(a,y,x,b,E,te,ne,se,he){b=se/b,E=he/E,te===0&&ne===0||a.rb.translate(te,ne),b===1&&E===1||a.rb.scale(b,E),y===0&&x===0||a.rb.translate(-y,-x)}$e.drawImage=function(a,y,x,b,E,te,ne,se,he){var _e="";a instanceof HTMLCanvasElement&&(_e=a.toDataURL()),a instanceof HTMLImageElement&&(_e=a.getAttribute("src"));var Ee=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(te=y,ne=x,se=b=Ee,he=E=a),b=b||0,E=E||0,se=se||0,he=he||0,Jy(this,y,x,b,E,te||0,ne||0,se,he),te={x:0,y:0,width:Ee||b,height:a||E,href:_e},Vt.$(b,se)&&Vt.$(E,he)?_e.toLowerCase().indexOf(".svg")===-1&&_e.toLowerCase().indexOf("data:image/svg")===-1&&(te.preserveAspectRatio="xMidYMid slice"):te.preserveAspectRatio="none",(y!==0||x!==0||b!==Ee||E!==a)&&(b+=y,E+=x,te["clip-path"]="path('M "+y+","+x+" L "+b+" "+x+" L "+b+" "+E+" L "+y+" "+E+" z')"),Nf(this,hd,te,this.rb),this.addElement(hd,te)},$e.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),rv(this,this.Yl)},$e.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},$e.fillRect=function(a,y,x,b){a=[a,y,x,b],a={x:a[0],y:a[1],width:a[2],height:a[3]},Nf(this,"fill",a,this.rb),this.addElement("rect",a)},$e.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},Nf(this,"fill",a,this.rb),rv(this,a),this.svg.prepend(this.Ud("rect",a))},$e.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},Nf(this,"fill",y,this.rb),this.addElement("text",y,a[0])},$e.lineTo=function(a,y){this.path.push(["L",a,y])},$e.moveTo=function(a,y){this.path.push(["M",a,y])},$e.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},$e.rect=function(a,y,x,b){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+b],["L",a,y+b],["z"])},$e.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},$e.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;y<this.path.length;y++)a.push(this.path[y]);this.stack.push(a),this.stack.push(this.rb.copy())},$e.setTransform=function(a,y,x,b,E,te){a===1&&y===0&&x===0&&b===1&&E===0&&te===0||qp(this,a,y,x,b,E,te)};function qy(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}$e.scale=function(a,y){this.rb.scale(a,y)},$e.translate=function(a,y){this.rb.translate(a,y)},$e.transform=function(){},$e.yc=function(){},$e.stroke=function(){$y(this,this.Yl)},$e.jk=function(){this.clipInsteadOfFill||this.stroke()},$e.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},$e.addElement=function(a,y,x){return a=this.Ud(a,y,x),this.yd!==null?this.yd.appendChild(a):this.yd=a,this.ad=a};function Nf(a,y,x,b){y==="fill"?rv(a,x):y==="stroke"&&$y(a,x),b!==null&&(a=b.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function rv(a,y){a.fillStyle instanceof Kd?y.fill=ov(a,a.fillStyle,!0):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.fill="rgb("+a[1]+","+a[2]+","+a[3]+")",y["fill-opacity"]=a[4]):y.fill=a.fillStyle}function Qy(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Kd?y.setAttributeNS(null,"fill",ov(a,a.fillStyle,!0)):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.setAttributeNS(null,x,"rgb("+a[1]+","+a[2]+","+a[3]+")"),y.setAttributeNS(null,x+"-opacity",a[4])):y.setAttributeNS(null,x,a.fillStyle)}function $y(a,y){if(a.strokeStyle instanceof Kd)y.stroke=ov(a,a.strokeStyle,!1);else if(/^rgba\(/.test(a.strokeStyle)){var x=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.strokeStyle);y.stroke="rgb("+x[1]+","+x[2]+","+x[3]+")",y["stroke-opacity"]=x[4]}else y.stroke=a.strokeStyle;y["stroke-width"]=a.lineWidth,y["stroke-linecap"]=a.lineCap,y["stroke-linejoin"]=a.lineJoin,y["stroke-miterlimit"]=a.miterLimit,a.Ct&&(y["stroke-dasharray"]=a.Yg.toString(),y["stroke-dashoffset"]=a.uj)}function ov(a,y,x){var b="";if(b=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,b!==null&&b.indexOf("GRAD")!==-1?(b=b.split("#")[1].slice(0,-1),x=a.svg.getElementById(b),x!==null&&x.remove()):b="GRAD"+so++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:b,gradientUnits:"userSpaceOnUse"});else if(y.type==="radial")x=a.Ud("radialGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,r1:y.r1,r2:y.r2,id:b});else throw Error("invalid gradient");var E=y.gx;y=E.length;for(var te=[],ne=0;ne<y;ne++){var se=E[ne],he=se.color;se={offset:se.offset,"stop-color":he},/^rgba\(/.test(he)&&(he=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(he),se["stop-color"]="rgb("+he[1]+","+he[2]+","+he[3]+")",se["stop-opacity"]=he[4]),te.push(se)}for(te.sort(function(_e,Ee){return _e.offset>Ee.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",te[E]));return a.svg.appendChild(x),"url(#"+b+")"}$e.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var te=Hn(a[E]),ne=[te.shift()];if(ne[0]==="A")ne.push(te.shift()+","+te.shift(),te.shift(),te.shift()+","+te.shift(),te.shift()+","+te.shift());else for(;te.length;)ne.push(te.shift()+","+te.shift());b.push(ne.join(" "))}if(b=b.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+b+'")');else if(a.d=b,Nf(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var se in a)se!=="transform"&&y.setAttributeNS(null,se,a[se]);else{se=y.getElementsByTagName("path");for(var he in a)he!=="transform"&&se[x].setAttributeNS(null,he,a[he])}else this.addElement("path",a)};function qp(a,y,x,b,E,te,ne){var se=new fd;se.ha=[y,x,b,E,te,ne],y={},Nf(a,"g",y,se),se=a.addElement("g",y),a.nh.push(se)}function fm(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}$e.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function ch(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Ah(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}$e.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},$e.fs=function(){this.Ct=!1},$e.Vc=function(){},$e.Wx=function(){},ml.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},ml.prototype.getImageData=function(){return null},ml.prototype.measureText=function(){return null};function pm(a,y){y=y.getAttribute("fill"),y!==null&&(y=y.split("#"),y.length!==1&&(y=a.svg.getElementById(y[1].slice(0,-1)),y!==null&&a.svg.innerHTML.match(new RegExp(y.id,"g")).length===1&&y.remove()))}ml.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},ml.className="SVGContext",rn.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Ku(this,jt.document));var y=new Ku(this,jt.document,!0);a===void 0&&(a=new vi);var x=this;return zd(this,function(b,E){return b=lm(x,b,"SVG",y),b=b!==null?b.svg:null,typeof E=="function"?(E(b),null):b},a)},rn.prototype.makeSvg=rn.prototype.Cs,rn.prototype.av=function(a){return this.Cs(a)},rn.prototype.makeSVG=rn.prototype.av;function tu(a,y,x,b){this.ownerDocument=y=y===void 0?jt.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new pd(y,x,b),y.H=a}tu.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",!0):!1},tu.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},tu.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},tu.prototype.focus=function(){this.Oa.focus()},tu.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},ot.Object.defineProperties(tu.prototype,{width:{get:function(){return this.Oa.width},set:function(a){this.Oa.width=a}},height:{get:function(){return this.Oa.height},set:function(a){this.Oa.height=a}},style:{get:function(){return this.Oa.style}}}),tu.className="CanvasSurface";function pd(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&Lt("Browser does not support HTML Canvas Element"),this.ct=this.et=this.dt="",this.Hm=!1,this.Vg=this.Br=this.Ar=0,this.Il=!1,this.El=new Ii,this.isTemporary=!!x}$e=pd.prototype,$e.Wx=function(a){this.Z.imageSmoothingEnabled=a},$e.arc=function(a,y,x,b,E,te){this.Z.arc(a,y,x,b,E,te)},$e.beginPath=function(){this.Z.beginPath()},$e.Se=function(){},$e.bezierCurveTo=function(a,y,x,b,E,te){this.Z.bezierCurveTo(a,y,x,b,E,te)},$e.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},$e.clip=function(){this.Z.clip()},$e.closePath=function(){this.Z.closePath()},$e.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},$e.createPattern=function(a,y){return this.Z.createPattern(a,y)},$e.createRadialGradient=function(a,y,x,b,E,te){return this.Z.createRadialGradient(a,y,x,b,E,te)},$e.drawImage=function(a,y,x,b,E,te,ne,se,he){b===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,b,E,te,ne,se,he)},$e.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},$e.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},$e.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},$e.fillText=function(a,y,x){this.Z.fillText(a,y,x)},$e.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},$e.lineTo=function(a,y){this.Z.lineTo(a,y)},$e.measureText=function(a){return this.Z.measureText(a)},$e.moveTo=function(a,y){this.Z.moveTo(a,y)},$e.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},$e.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},$e.restore=function(){this.Z.restore()},$e.save=function(){this.yc(),this.Z.save()},pd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},$e=pd.prototype,$e.setTransform=function(a,y,x,b,E,te){this.El.setTransform(a,y,x,b,E,te)},$e.scale=function(a,y){this.El.scale(a,y)},$e.translate=function(a,y){this.El.translate(a,y)},$e.stroke=function(){this.Z.stroke()},$e.transform=function(a,y,x,b,E,te){if(a!==1||y!==0||x!==0||b!==1||E!==0||te!==0){var ne=this.El,se=ne.m11*a+ne.m21*y;a=ne.m12*a+ne.m22*y,y=ne.m11*x+ne.m21*b,x=ne.m12*x+ne.m22*b,ne.dx=ne.m11*E+ne.m21*te+ne.dx,ne.dy=ne.m12*E+ne.m22*te+ne.dy,ne.m11=se,ne.m12=a,ne.m21=y,ne.m22=x}},$e.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},$e.ng=function(a,y){if(a instanceof no&&a.type===Ul){var x=a.yk;a=a.ft,a>x?(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)},$e.jk=function(){this.Hm||this.stroke()},$e.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},$e.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},$e.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},$e.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},$e.Hs=function(){},ot.Object.defineProperties(pd.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 vx=Object.freeze([]);pd.className="CanvasSurfaceContext";function Qp(){this.F=this.o=this.u=this.j=0}Qp.className="ColorNumbers";function no(a,y){Rf||(cv(),Rf=!0),Di(this),this._isFrozen=!1,a===void 0?(this.na=qh,this.xk="black"):typeof a=="string"?(this.na=qh,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===Dh?(this.Qd=Br,this.Lk=hs):this.Lk=a===Ul?this.Qd=$i:this.Qd=qi,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}no.prototype.copy=function(){var a=new no;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},$e=no.prototype,$e.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},$e.ka=function(){return Object.isFrozen(this)&&Lt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},$e.qb=function(a){a.classType===no&&(this.type=a)},$e.toString=function(){var a="Brush(";if(this.type===qh)a+=this.color;else if(a=this.type===Dh?a+"Linear ":this.type===Ul?a+"Radial ":this.type===Ff?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+")"},$e.addColorStop=function(a,y){return this._isFrozen&&Ht(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Pn(a,"0 <= loc <= 1",no,"addColorStop:loc"),this.we===null&&(this.we=new on),this.we.add(a,y),this.na===qh&&(this.type=Dh),this.xe=null,this},$e.Vz=function(a,y){if(this._isFrozen&&Ht(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Bf:y,this.type===qh)Nh(this.color),this.color=Of(a,y);else if((this.type===Dh||this.type===Ul)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Nh(x.value),this.addColorStop(x.key,Of(a,y));return this};function e1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Bf:x,Nh(a),Of(y,x)}$e.Wy=function(a,y){if(this._isFrozen&&Ht(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Bf:y,this.type===qh)Nh(this.color),this.color=Of(-a,y);else if((this.type===Dh||this.type===Ul)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Nh(x.value),this.addColorStop(x.key,Of(-a,y));return this};function t1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Bf:x,Nh(a),Of(-y,x)}function sv(a,y,x){Nh(a),a=Ao.j;var b=Ao.u,E=Ao.o,te=Ao.F;return Nh(y),x===void 0&&(x=.5),"rgba("+Math.round((Ao.j-a)*x+a)+", "+Math.round((Ao.u-b)*x+b)+", "+Math.round((Ao.o-E)*x+E)+", "+Math.round((Ao.F-te)*x+te)+")"}$e.Gx=function(){if(this.type===qh)return Df(this.color);if((this.type===Dh||this.type===Ul)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Ul)return Df(a.first().value);if(a.get(.5)!==null)return Df(a.get(.5));if(a.count===2)return a=a.Fa(),Df(sv(a[0].value,a[1].value));for(var y=a.iterator,x=-1,b=-1,E=1,te=1;y.next();){var ne=y.key,se=Math.abs(.5-y.key);E>te&&se<E?(x=ne,E=se):te>=E&&se<te&&(b=ne,te=se)}return x>b&&(te=x,x=b,b=te,te=E),E=b-x,Df(sv(a.get(x),a.get(b),1-te/E))}return!1};function Df(a){return a?a instanceof no?a.Gx():(Nh(a),128>(299*Ao.j+587*Ao.u+114*Ao.o)/1e3):!1}function Of(a,y){switch(y){case Bf:y=100*lv(Ao.j);var x=100*lv(Ao.u),b=100*lv(Ao.o);return Ba.j=.4124564*y+.3575761*x+.1804375*b,Ba.u=.2126729*y+.7151522*x+.072175*b,Ba.o=.0193339*y+.119192*x+.9503041*b,Ba.F=Ao.F,y=hv(Ba.j/If[0]),x=hv(Ba.u/If[1]),b=hv(Ba.o/If[2]),dh.j=116*x-16,dh.u=500*(y-x),dh.o=200*(x-b),dh.F=Ba.F,dh.j=Math.min(100,Math.max(0,dh.j+100*a)),a=(dh.j+16)/116,y=a-dh.o/200,Ba.j=If[0]*n1(dh.u/500+a),Ba.u=If[1]*(dh.j>gm*dv?Math.pow(a,3):dh.j/gm),Ba.o=If[2]*n1(y),Ba.F=dh.F,a=-.969266*Ba.j+1.8760108*Ba.u+.041556*Ba.o,y=.0556434*Ba.j+-.2040259*Ba.u+1.0572252*Ba.o,Ao.j=255*uv((3.2404542*Ba.j+-1.5371385*Ba.u+-.4985314*Ba.o)/100),Ao.u=255*uv(a/100),Ao.o=255*uv(y/100),Ao.F=Ba.F,Ao.j=Math.round(Ao.j),255<Ao.j?Ao.j=255:0>Ao.j&&(Ao.j=0),Ao.u=Math.round(Ao.u),255<Ao.u?Ao.u=255:0>Ao.u&&(Ao.u=0),Ao.o=Math.round(Ao.o),255<Ao.o?Ao.o=255:0>Ao.o&&(Ao.o=0),"rgba("+Ao.j+", "+Ao.u+", "+Ao.o+", "+Ao.F+")";case i1:return av(),Tl.o=Math.min(100,Math.max(0,Tl.o+100*a)),"hsla("+Tl.j+", "+Tl.u+"%, "+Tl.o+"%, "+Tl.F+")";default:Lt("Unknown color space: "+y)}}function Nh(a){Rf||(cv(),Rf=!0);var y=fv;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,Ao.j=a[0],Ao.u=a[1],Ao.o=a[2],Ao.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Ao.j=0,Ao.u=0,Ao.o=0,Ao.F=1)}}function av(){var a=Ao.j/255,y=Ao.u/255,x=Ao.o/255,b=Math.max(a,y,x),E=Math.min(a,y,x),te=b-E;if(E=(b+E)/2,te===0)var ne=a=0;else{switch(b){case a:ne=(y-x)/te%6;break;case y:ne=(x-a)/te+2;break;case x:ne=(a-y)/te+4}ne*=60,0>ne&&(ne+=360),a=te/(1-Math.abs(2*E-1))}Tl.j=Math.round(ne),Tl.u=Math.round(100*a),Tl.o=Math.round(100*E),Tl.F=Ao.F}function lv(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function uv(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function hv(a){return a>dv?Math.pow(a,1/3):(gm*a+16)/116}function n1(a){var y=a*a*a;return y>dv?y:(116*a-16)/gm}function Yd(a,y){typeof a!="string"&&(a instanceof no||Lt("Value for "+y+" must be a color string or a Brush, not "+a))}function cv(){fv=ts?new tu(null,void 0,{willReadFrequently:!0}).context:null}ot.Object.defineProperties(no.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&Ht(this,a),this.na=a,this.start.Mc()&&(a===Dh?this.start=Br:a===Ul&&(this.start=$i)),this.end.Mc()&&(a===Dh?this.end=hs:a===Ul&&(this.end=$i)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&Ht(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&Ht(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&Ht(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&Ht(this,a),0>a&&Pn(a,">= zero",no,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Ht(this,a),0>a&&Pn(a,">= zero",no,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&Ht(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&Ht(this,a),this.cr=a,this.xe=null}}}),no.prototype.isDark=no.prototype.Gx,no.prototype.darkenBy=no.prototype.Wy,no.prototype.lightenBy=no.prototype.Vz,no.prototype.addColorStop=no.prototype.addColorStop;var dv=216/24389,gm=24389/27,If=[95.047,100,108.883],fv=null,Ao=new Qp,Tl=new Qp,Ba=new Qp,dh=new Qp,Rf=!1;no.className="Brush";var qh;no.Solid=qh=new nn(no,"Solid",0);var Dh;no.Linear=Dh=new nn(no,"Linear",1);var Ul;no.Radial=Ul=new nn(no,"Radial",2);var Ff;no.Pattern=Ff=new nn(no,"Pattern",4);var Bf;no.Lab=Bf=new nn(no,"Lab",5);var i1;no.HSL=i1=new nn(no,"HSL",6),no.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 b=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>b.length&&(b="0"+b),2>a.length&&(a="0"+a),"#"+y+b+a},no.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;Rf||(cv(),Rf=!0);var y=fv;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)},no.lighten=function(a){return e1(a)},no.lightenBy=e1,no.darken=function(a){return t1(a)},no.darkenBy=t1,no.mix=sv,no.isDark=Df;function ks(){this.xa="Base"}ks.prototype.measure=function(){},ks.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},ks.prototype.arrange=function(){},ks.prototype.Ly=function(a,y,x,b,E,te){a.arrange(y,x,b,E,te)},ks.prototype.iA=function(a){a.Uj()},ks.prototype.gc=function(){},ot.Object.defineProperties(ks.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Dn}}}),ks.prototype.remeasureObject=ks.prototype.iA,ks.prototype.arrangeElement=ks.prototype.Ly,ks.prototype.measureElement=ks.prototype.Yz,ks.className="PanelLayout";function mm(){this.xa="Base"}Je(mm,ks),mm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length;a=Oh(a);for(var he=0;he<se;he++){var _e=b[he];if(_e.visible||_e===a){var Ee=_e.margin,Ne=Ee.right+Ee.left;Ee=Ee.top+Ee.bottom,_e.measure(y,x,te,ne);var He=_e.measuredBounds;Ne=Math.max(He.width+Ne,0),Ee=Math.max(He.height+Ee,0),He=_e.position.x;var Ye=_e.position.y;isFinite(He)||(He=0),isFinite(Ye)||(Ye=0),_e instanceof ir&&_e.isGeometryPositioned&&(_e=_e.strokeWidth/2,He-=_e,Ye-=_e),br(E,He,Ye,Ne,Ee)}}},mm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding;for(a=x.x-E.left,x=x.y-E.top,E=0;E<b;E++){var te=y[E],ne=te.measuredBounds,se=te.margin,he=te.position.x,_e=te.position.y;if(he=isNaN(he)?-a:he-a,_e=isNaN(_e)?-x:_e-x,te instanceof ir&&te.isGeometryPositioned){var Ee=te.strokeWidth/2;he-=Ee,_e-=Ee}te.visible&&te.arrange(he+se.left,_e+se.top,ne.width,ne.height)}};function vm(){this.xa="Base"}Je(vm,ks),vm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length;y=Wn(),te=Oh(a);for(var he=0;he<se;he++){var _e=b[he];if(_e.visible||_e===te){var Ee=qa(_e,!1);if(Ee!==Cn&&Ee!==xi)y.push(_e);else{_e.measure(1/0,x,0,ne),Ee=_e.margin,_e=_e.measuredBounds;var Ne=Math.max(_e.height+Ee.top+Ee.bottom,0);E.width+=Math.max(_e.width+Ee.right+Ee.left,0),E.height=Math.max(E.height,Ne)}}}for(b=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):E.height!==0&&(x=Math.min(E.height,a.maxSize.height)),a=0;a<b;a++)he=y[a],(he.visible||he===te)&&(Ee=he.margin,se=Ee.right+Ee.left,Ee=Ee.top+Ee.bottom,he.measure(1/0,x,0,ne),he=he.measuredBounds,Ee=Math.max(he.height+Ee,0),E.width+=Math.max(he.width+se,0),E.height=Math.max(E.height,Ee));zn(y)},vm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,te=E.top,ne=a.isOpposite,se=ne?x.width:E.left,he=0;he<b;he++){var _e=te,Ee=y[he];if(Ee.visible){var Ne=Ee.measuredBounds,He=Ee.margin,Ye=He.top+He.bottom,Qe=te+E.bottom,st=Ne.height,Pt=qa(Ee,!1);(isNaN(Ee.desiredSize.height)&&Pt===Tn||Pt===Ai)&&(st=Math.max(x.height-Ye-Qe,0)),Ye=st+Ye+Qe,Qe=Ee.alignment,Qe.Xb()&&(Qe=a.defaultAlignment),Qe.sb()||(Qe=$i),ne&&(se-=Ne.width+He.left+He.right),Ee.arrange(se+Qe.offsetX+He.left,_e+Qe.offsetY+He.top+(x.height*Qe.y-Ye*Qe.y),Ne.width,st),ne||(se+=Ne.width+He.left+He.right)}}};function ym(){this.xa="Base"}Je(ym,ks),ym.prototype.measure=function(a,y,x,b,E,te){var ne=b.length;x=Wn();for(var se=Oh(a),he=0;he<ne;he++){var _e=b[he];if(_e.visible||_e===se){var Ee=qa(_e,!1);if(Ee!==Cn&&Ee!==Ai)x.push(_e);else{var Ne=_e.margin;Ee=Ne.right+Ne.left,Ne=Ne.top+Ne.bottom,_e.measure(y,1/0,te,0),_e=_e.measuredBounds,Jr(E,Math.max(E.width,Math.max(_e.width+Ee,0)),E.height+Math.max(_e.height+Ne,0))}}}if(b=x.length,b!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):E.width!==0&&(y=Math.min(E.width,a.maxSize.width)),a=0;a<b;a++)he=x[a],(he.visible||he===se)&&(_e=he.margin,ne=_e.right+_e.left,_e=_e.top+_e.bottom,he.measure(y,1/0,te,0),he=he.measuredBounds,_e=Math.max(he.height+_e,0),E.width=Math.max(E.width,Math.max(he.width+ne,0)),E.height+=_e);zn(x)}},ym.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,te=E.left,ne=a.isOpposite,se=ne?x.height:E.top,he=0;he<b;he++){var _e=te,Ee=y[he];if(Ee.visible){var Ne=Ee.measuredBounds,He=Ee.margin,Ye=He.left+He.right,Qe=te+E.right,st=Ne.width,Pt=qa(Ee,!1);(isNaN(Ee.desiredSize.width)&&Pt===Tn||Pt===xi)&&(st=Math.max(x.width-Ye-Qe,0)),Ye=st+Ye+Qe,Qe=Ee.alignment,Qe.Xb()&&(Qe=a.defaultAlignment),Qe.sb()||(Qe=$i),ne&&(se-=Ne.height+He.bottom+He.top),Ee.arrange(_e+Qe.offsetX+He.left+(x.width*Qe.x-Ye*Qe.x),se+Qe.offsetY+He.top,st,Ne.height),ne||(se+=Ne.height+He.bottom+He.top)}}};function Sm(){this.xa="Base"}Je(Sm,ks),Sm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length,he=a.Pb(),_e=he.margin,Ee=_e.right+_e.left,Ne=_e.top+_e.bottom;he.measure(y,x,te,ne);var He=he.measuredBounds;te=He.width,ne=He.height;var Ye=Math.max(te+Ee,0),Qe=Math.max(ne+Ne,0),st=a.isClipping,Pt=sn.allocAt(-_e.left,-_e.top,Ye,Qe),St=sn.allocAt(0,0,te,ne);pv(he,St,!0),te=St.width,ne=St.height;for(var Tt=!0,At=Oh(a),It=0;It<se;It++){var Wt=b[It];He=y;var tn=x;if(Wt!==he&&(Wt.visible||Wt===At)){_e=Wt.margin;var Kn=_e.left,hi=_e.top;switch(Ye=_e.right+_e.left,Qe=_e.top+_e.bottom,_e=qa(Wt,!1),_e){case Tn:He=te,tn=ne,hi=Kn=Qe=Ye=0;break;case xi:He=te,Kn=Ye=0;break;case Ai:tn=ne,hi=Qe=0}Wt.measure(He,tn,0,0),He=Wt.measuredBounds,Ye=Math.max(He.width+Ye,0),Qe=Math.max(He.height+Qe,0),_e=Wt.alignment,_e.Xb()&&(_e=a.defaultAlignment),_e.sb()||(_e=$i);var ii=Wt.alignmentFocus;if(ii.Xb()&&(ii=$i),tn=null,Wt instanceof Dn&&Wt.$e!==""&&(tn=Wt.fb(Wt.$e),tn===Wt&&(tn=null)),Kn=St.x-Kn,hi=St.y-hi,tn!==null){for(Wt.arrange(0,0,He.width,He.height),He=tn.actualBounds,He=ft.allocAt(He.x+(ii.x*He.width-ii.offsetX),He.y+(ii.y*He.height-ii.offsetY)),tn=tn.panel;tn!==Wt;)tn.transform.Ga(He),tn=tn.panel;Kn+=_e.x*te+_e.offsetX-He.x,hi+=_e.y*ne+_e.offsetY-He.y,ft.free(He)}else Kn+=_e.x*te+_e.offsetX-(ii.x*He.width+ii.offsetX),hi+=_e.y*ne+_e.offsetY-(ii.y*He.height+ii.offsetY);Tt?(Tt=!1,E.h(Kn,hi,Ye,Qe)):br(E,Kn,hi,Ye,Qe)}}switch(Tt?E.assign(Pt):st?E.Uu(St.x,St.y,St.width,St.height):br(E,Pt.x,Pt.y,Pt.width,Pt.height),sn.free(Pt),sn.free(St),_e=he.stretch,_e===Xi&&(_e=qa(he,!1)),_e){case Cn:return;case Tn:if(!isFinite(y)&&!isFinite(x))return;break;case xi:if(!isFinite(y))return;break;case Ai:if(!isFinite(x))return}for(He=he.measuredBounds,te=He.width,ne=He.height,Ye=Math.max(te+Ee,0),Qe=Math.max(ne+Ne,0),_e=he.margin,St=sn.allocAt(-_e.left,-_e.top,Ye,Qe),pv(he,St,!0),te=St.width,ne=St.height,y=0;y<se;y++)x=b[y],x===he||!x.visible&&x!==At||(_e=x.margin,Ye=_e.right+_e.left,Qe=_e.top+_e.bottom,He=x.measuredBounds,Ye=Math.max(He.width+Ye,0),Qe=Math.max(He.height+Qe,0),Ee=x.alignment,Ee.Xb()&&(Ee=a.defaultAlignment),Ee.sb()||(Ee=$i),x=x.alignmentFocus,x.Xb()&&(x=$i),Tt?(Tt=!1,E.h(Ee.x*te+Ee.offsetX-(x.x*He.width+x.offsetX)-_e.left,Ee.y*ne+Ee.offsetY-(x.y*He.height+x.offsetY)-_e.top,Ye,Qe)):br(E,Ee.x*te+Ee.offsetX-(x.x*He.width+x.offsetX)-_e.left,Ee.y*ne+Ee.offsetY-(x.y*He.height+x.offsetY)-_e.top,Ye,Qe));Tt?E.assign(Pt):st?E.Uu(St.x,St.y,St.width,St.height):br(E,Pt.x,Pt.y,Pt.width,Pt.height),sn.free(St)},Sm.prototype.arrange=function(a,y,x){var b=y.length,E=a.Pb(),te=E.measuredBounds,ne=te.width,se=te.height,he=a.padding;te=he.left,he=he.top;var _e=te-x.x,Ee=he-x.y;for(E.arrange(_e,Ee,ne,se),ne=sn.allocAt(0,0,ne,se),pv(E,ne,!1),se=0;se<b;se++){var Ne=y[se];if(Ne!==E){_e=Ne.measuredBounds;var He=_e.width,Ye=_e.height;Ee=Ne.alignment,Ee.Xb()&&(Ee=a.defaultAlignment),Ee.sb()||(Ee=$i);var Qe=Ne.alignmentFocus;if(Qe.Xb()&&(Qe=$i),_e=null,Ne instanceof Dn&&Ne.$e!==""&&(_e=Ne.fb(Ne.$e),_e===Ne&&(_e=null)),_e!==null){var st=_e.actualBounds;for(Qe=ft.allocAt(st.x+(Qe.x*st.width-Qe.offsetX),st.y+(Qe.y*st.height-Qe.offsetY)),_e=_e.panel;_e!==Ne;)_e.transform.Ga(Qe),_e=_e.panel;_e=Ee.x*ne.width+Ee.offsetX-Qe.x,Ee=Ee.y*ne.height+Ee.offsetY-Qe.y,ft.free(Qe)}else _e=Ee.x*ne.width+Ee.offsetX-(Qe.x*He+Qe.offsetX),Ee=Ee.y*ne.height+Ee.offsetY-(Qe.y*Ye+Qe.offsetY);_e+=ne.x-x.x,Ee+=ne.y-x.y,Ne.visible&&Ne.arrange(te+_e,he+Ee,He,Ye)}}sn.free(ne)};function pv(a,y,x){var b=null;if(a instanceof Dn&&a.$e!==""&&(b=a.fb(a.$e),b===a&&(b=null)),b!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(b.actualBounds),b=b.panel;b!==a;)b.transform.pp(y),b=b.panel}function xm(){this.xa="Base"}Je(xm,ks),xm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length,he=a.Pb(),_e=he.margin,Ee=y,Ne=x,He=_e.right+_e.left,Ye=_e.top+_e.bottom;he.measure(y,x,te,ne),_e=he.measuredBounds;var Qe=0,st=null;he instanceof ir&&(st=he,Qe=st.strokeWidth*st.scale);var Pt=Math.max(_e.width+He,0);_e=Math.max(_e.height+Ye,0);var St=yv(he),Tt=St.x*Pt+St.offsetX;St=St.y*_e+St.offsetY;var At=Sv(he),It=At.x*Pt+At.offsetX;for(At=At.y*_e+At.offsetY,isFinite(y)&&(Ee=Math.max(Math.abs(Tt-It)-Qe,0)),isFinite(x)&&(Ne=Math.max(Math.abs(St-At)-Qe,0)),Qe=wn.alloc(),Qe.h(0,0),a=Oh(a),At=0;At<se;At++)St=b[At],St===he||!St.visible&&St!==a||(_e=St.margin,Pt=_e.right+_e.left,Tt=_e.top+_e.bottom,St.measure(Ee,Ne,0,0),_e=St.measuredBounds,Pt=Math.max(_e.width+Pt,0),_e=Math.max(_e.height+Tt,0),Qe.h(Math.max(Pt,Qe.width),Math.max(_e,Qe.height)));if(se===1)E.width=Pt,E.height=_e,wn.free(Qe);else{switch(St=yv(he),At=Sv(he),se=b=0,At.x!==St.x&&At.y!==St.y&&(b=Qe.width/Math.abs(At.x-St.x),se=Qe.height/Math.abs(At.y-St.y)),wn.free(Qe),Qe=0,st!==null&&(Qe=st.strokeWidth*st.scale,Cv(st)===fi&&(b=se=Math.max(b,se))),b+=Math.abs(St.offsetX)+Math.abs(At.offsetX)+Qe,se+=Math.abs(St.offsetY)+Math.abs(At.offsetY)+Qe,st=he.stretch,st===Xi&&(st=qa(he,!1)),st){case Cn:ne=te=0;break;case Tn:isFinite(y)&&(b=y),isFinite(x)&&(se=x);break;case xi:isFinite(y)&&(b=y),ne=0;break;case Ai:te=0,isFinite(x)&&(se=x)}he.Uj(),he.measure(b,se,te,ne),E.width=he.measuredBounds.width+He,E.height=he.measuredBounds.height+Ye}},xm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,te=sn.alloc();te.h(0,0,1,1);var ne=b.margin,se=ne.left;ne=ne.top;var he=a.padding,_e=he.left;he=he.top,b.arrange(_e+se,he+ne,E.width,E.height);var Ee=yv(b),Ne=Sv(b),He=Ee.y*E.height+Ee.offsetY,Ye=Ne.x*E.width+Ne.offsetX;for(Ne=Ne.y*E.height+Ne.offsetY,te.x=Ee.x*E.width+Ee.offsetX,te.y=He,br(te,Ye,Ne,0,0),te.x+=se+_e,te.y+=ne+he,E=0;E<x;E++)se=y[E],se!==b&&(_e=se.measuredBounds,ne=se.margin,he=Math.max(_e.width+ne.right+ne.left,0),Ee=Math.max(_e.height+ne.top+ne.bottom,0),He=se.alignment,He.Xb()&&(He=a.defaultAlignment),He.sb()||(He=$i),he=te.width*He.x+He.offsetX-he*He.x+ne.left+te.x,ne=te.height*He.y+He.offsetY-Ee*He.y+ne.top+te.y,se.visible&&(qr(te.x,te.y,te.width,te.height,he,ne,_e.width,_e.height)?se.arrange(he,ne,_e.width,_e.height):se.arrange(he,ne,_e.width,_e.height,new sn(te.x,te.y,te.width,te.height))));sn.free(te)};function wm(){this.xa="Base",this.name="Table"}Je(wm,ks),wm.prototype.measure=function(a,y,x,b,E){for(var te=b.length,ne=Wn(),se=Wn(),he=0;he<te;he++){var _e=b[he],Ee=_e instanceof Dn?_e:null;if(Ee!==null&&Qh(Ee)&&_e.visible){se.push(Ee);for(var Ne=Ee.O.s,He=Ne.length,Ye=0;Ye<He;Ye++){var Qe=Ne[Ye];Ee.type===Dn.TableRow?Qe.row=_e.row:Ee.type===Dn.TableColumn&&(Qe.column=_e.column),ne.push(Qe)}}else ne.push(_e)}te=ne.length,te===0&&(a.Fb(0),a.Eb(0));for(var st=[],Pt=0;Pt<te;Pt++){var St=ne[Pt];St.visible&&(Cs(St,!0),hh(St,!0),st[St.row]||(st[St.row]=[]),st[St.row][St.column]||(st[St.row][St.column]=[]),st[St.row][St.column].push(St))}zn(ne);var Tt=Wn(),At=Wn(),It=Wn(),Wt={count:0},tn={count:0},Kn=y,hi=x,ii=a.rowDefs,Rn=a.colDefs,_n=null;te=ii.length;for(var Zi=0;Zi<te;Zi++)_n=ii[Zi],_n!==void 0&&(_n.actual=0);te=Rn.length;for(var Ri=0;Ri<te;Ri++)_n=Rn[Ri],_n!==void 0&&(_n.actual=0);for(var Ur=st.length,wo=0,Bs=0;Bs<Ur;Bs++)st[Bs]&&(wo=Math.max(wo,st[Bs].length));var Zs=Math.min(a.topIndex,Ur-1),Ma=Math.min(a.leftIndex,wo-1),js=0;Ur=st.length;for(var lc=Oh(a),vs=0;vs<Ur;vs++)if(st[vs]){wo=st[vs].length;var Fu=a.Fb(vs);Fu.actual=0;for(var ka=Fu.oc=0;ka<wo;ka++)if(st[vs][ka]){var uc=a.Eb(ka);Tt[ka]===void 0&&(uc.actual=0,uc.oc=0,Tt[ka]=!0);for(var Dl=st[vs][ka],ou=Dl.length,Sl=0;Sl<ou;Sl++){var ul=Dl[Sl];if(ul.visible||ul===lc){var Zc=1<ul.rowSpan||1<ul.columnSpan;Zc&&(vs<Zs||ka<Ma||At.push(ul));var Bu=ul.margin,ap=Bu.right+Bu.left,xl=Bu.top+Bu.bottom,Ta=Nu(ul,Fu,uc,!1),jg=ul.desiredSize,af=!isNaN(jg.height),Ju=!isNaN(jg.width)&⁡if(Zc||Ta===Cn||Ju||vs<Zs||ka<Ma||(Wt[ka]!==void 0||Ta!==Tn&&Ta!==xi||(Wt[ka]=-1,Wt.count++),tn[vs]!==void 0||Ta!==Tn&&Ta!==Ai||(tn[vs]=-1,tn.count++),It.push(ul)),ul.measure(1/0,1/0,0,0),!(vs<Zs||ka<Ma)){var hl=ul.measuredBounds,bd=Math.max(hl.width+ap,0),wl=Math.max(hl.height+xl,0);if(ul.rowSpan===1&&(Ta===Cn||Ta===xi)){_n=a.Fb(vs);var Vc=_n.Wc();js=Math.max(wl-_n.actual,0),js+Vc>hi&&(js=Math.max(hi-Vc,0));var W0=_n.oa===0;_n.oc=_n.oc+js,_n.actual=_n.oa+js,hi=Math.max(hi-(js+(W0?Vc:0)),0)}if(ul.columnSpan===1&&(Ta===Cn||Ta===Ai)){_n=a.Eb(ka);var zg=_n.Wc();js=Math.max(bd-_n.actual,0),js+zg>Kn&&(js=Math.max(Kn-zg,0));var Uy=_n.oa===0;_n.oc=_n.oc+js,_n.actual=_n.oa+js,Kn=Math.max(Kn-(js+(Uy?zg:0)),0)}Zc&&ul.Uj()}}}}}zn(Tt);var wh=0,Fh=0;te=a.columnCount;for(var lf=0;lf<te;lf++){var Kc=Rn[lf];Kc!==void 0&&(wh+=isNaN(Kc.Hc)?Kc.oc:Kc.Hc,Kc.oc!==0&&(wh+=Kc.Wc()))}te=a.rowCount;for(var lp=0;lp<te;lp++){var Yc=ii[lp];Yc!==void 0&&(Fh+=isNaN(Yc.Hc)?Yc.oc:Yc.Hc,Yc.oc!==0&&(Fh+=Yc.Wc()))}Kn=Math.max(y-wh,0);var _h=hi=Math.max(x-Fh,0),hc=Kn;te=It.length;for(var cl=0;cl<te;cl++){var qu=It[cl],Z0=a.Fb(qu.row),Bh=a.Eb(qu.column),up=qu.measuredBounds,ju=qu.margin,Pd=ju.right+ju.left,Qu=ju.top+ju.bottom;Wt[qu.column]=Bh.oc===0&&Wt[qu.column]!==void 0?Math.max(up.width+Pd,Wt[qu.column]):null,tn[qu.row]=Z0.oc===0&&tn[qu.row]!==void 0?Math.max(up.height+Qu,tn[qu.row]):null}var uf=0,hp=0,_u;for(_u in tn)_u!=="count"&&(uf+=tn[_u]);for(_u in Wt)_u!=="count"&&(hp+=Wt[_u]);for(var ra=wn.alloc(),Ug=0;Ug<te;Ug++){var Za=It[Ug];if(Za.visible||Za===lc){var ys=a.Fb(Za.row),Va=a.Eb(Za.column),jh=0;isFinite(Va.width)?jh=Va.width:(isFinite(Kn)&&Wt[Za.column]!==null?hp===0?jh=Va.actual+Kn:jh=Wt[Za.column]/hp*hc:Wt[Za.column]!==null?jh=Kn:jh=Va.actual||Kn,jh=Math.max(0,jh-Va.Wc()));var cc=0;switch(isFinite(ys.height)?cc=ys.height:(isFinite(hi)&&tn[Za.row]!==null?uf===0?cc=ys.actual+hi:cc=tn[Za.row]/uf*_h:tn[Za.row]!==null?cc=hi:cc=ys.actual||hi,cc=Math.max(0,cc-ys.Wc())),ra.h(Math.max(Va.minimum,Math.min(jh,Va.maximum)),Math.max(ys.minimum,Math.min(cc,ys.maximum))),Ta=Nu(Za,ys,Va,!1),Ta){case xi:ra.height=Math.max(ra.height,ys.actual+hi);break;case Ai:ra.width=Math.max(ra.width,Va.actual+Kn)}var Cd=Za.margin,Hy=Cd.right+Cd.left,V0=Cd.top+Cd.bottom;Za.Uj(),Za.measure(ra.width,ra.height,Va.minimum,ys.minimum);var cp=Za.measuredBounds,Ed=Math.max(cp.width+Hy,0),hf=Math.max(cp.height+V0,0);isFinite(Kn)&&(Ed=Math.min(Ed,ra.width)),isFinite(hi)&&(hf=Math.min(hf,ra.height));var dl=0;dl=ys.actual,ys.actual=Math.max(ys.actual,hf),ys.oc=Math.max(ys.oc,hf),js=ys.actual-dl,hi=Math.max(hi-js,0),tn[Za.row]===null&&(_h=Math.max(_h-js,0)),dl=Va.actual,Va.actual=Math.max(Va.actual,Ed),Va.oc=Math.max(Va.oc,Ed),js=Va.actual-dl,Kn=Math.max(Kn-js,0),Wt[Za.column]===null&&(hc=Math.max(hc-js,0))}}zn(It);var zh=wn.alloc(),zu=Wn(),Vl=Wn();if(te=At.length,te!==0){for(var Xc=0;Xc<Ur;Xc++)if(st[Xc]){wo=st[Xc].length;var dp=a.Fb(Xc);zu[Xc]=dp.actual;for(var Jc=0;Jc<wo;Jc++)if(st[Xc][Jc]){var K0=a.Eb(Jc);Vl[Jc]=K0.actual}}}for(var fp=0;fp<te;fp++){var as=At[fp];if(as.visible||as===lc){var bu=a.Fb(as.row),su=a.Eb(as.column);switch(ra.h(Math.max(su.minimum,Math.min(y,su.maximum)),Math.max(bu.minimum,Math.min(x,bu.maximum))),Ta=Nu(as,bu,su,!1),Ta){case Tn:Vl[su.index]!==0&&(ra.width=Math.min(ra.width,Vl[su.index])),zu[bu.index]!==0&&(ra.height=Math.min(ra.height,zu[bu.index]));break;case xi:Vl[su.index]!==0&&(ra.width=Math.min(ra.width,Vl[su.index]));break;case Ai:zu[bu.index]!==0&&(ra.height=Math.min(ra.height,zu[bu.index]))}isFinite(su.width)&&(ra.width=su.width),isFinite(bu.height)&&(ra.height=bu.height),zh.h(0,0);for(var Y0=su.minimum,_l=bu.minimum,dc=1;dc<as.rowSpan&&!(as.row+dc>=a.rowCount);dc++)_n=a.Fb(as.row+dc),js=0,js=Ta===Tn||Ta===Ai?Math.max(_n.minimum,zu[as.row+dc]===0?_n.maximum:Math.min(zu[as.row+dc],_n.maximum)):Math.max(_n.minimum,isNaN(_n.Hc)?_n.maximum:Math.min(_n.Hc,_n.maximum)),zh.height+=js,_l+=_n.minimum;for(var au=1;au<as.columnSpan&&!(as.column+au>=a.columnCount);au++)_n=a.Eb(as.column+au),js=0,js=Ta===Tn||Ta===xi?Math.max(_n.minimum,Vl[as.column+au]===0?_n.maximum:Math.min(Vl[as.column+au],_n.maximum)):Math.max(_n.minimum,isNaN(_n.Hc)?_n.maximum:Math.min(_n.Hc,_n.maximum)),zh.width+=js,Y0+=_n.minimum;ra.width+=zh.width,ra.height+=zh.height;var pp=as.margin,qc=pp.right+pp.left,Hg=pp.top+pp.bottom;as.measure(ra.width,ra.height,Y0,_l);for(var gp=as.measuredBounds,$u=Math.max(gp.width+qc,0),Ld=Math.max(gp.height+Hg,0),Qc=0,mp=0;mp<as.rowSpan&&!(as.row+mp>=a.rowCount);mp++)_n=a.Fb(as.row+mp),Qc+=_n.total||0;if(Qc<Ld){var fc=Ld-Qc,bh=Ld-Qc;if(as.spanAllocation!==null)for(var pc=as.spanAllocation,Uh=0;Uh<as.rowSpan&&!(0>=fc)&&!(as.row+Uh>=a.rowCount);Uh++){_n=a.Fb(as.row+Uh);var gc=_n.oa||0,Md=pc(as,_n,bh);_n.actual=Math.min(_n.maximum,gc+Md),_n.oa!==gc&&(fc-=_n.oa-gc)}for(;0<fc;){var Uu=_n.oa||0;if(isNaN(_n.height)&&_n.maximum>Uu&&(_n.actual=Math.min(_n.maximum,Uu+fc),_n.oa!==Uu&&(fc-=_n.oa-Uu)),_n.index===0)break;_n=a.Fb(_n.index-1)}}for(var cf=0,mc=0;mc<as.columnSpan&&!(as.column+mc>=a.columnCount);mc++)_n=a.Eb(as.column+mc),cf+=_n.total||0;if(cf<$u){var df=$u-cf,Gy=$u-cf;if(as.spanAllocation!==null)for(var Hh=as.spanAllocation,kd=0;kd<as.columnSpan&&!(0>=df)&&!(as.column+kd>=a.columnCount);kd++){_n=a.Eb(as.column+kd);var Gg=_n.oa||0,Wy=Hh(as,_n,Gy);_n.actual=Math.min(_n.maximum,Gg+Wy),_n.oa!==Gg&&(df-=_n.oa-Gg)}for(;0<df;){var X0=_n.oa||0;if(isNaN(_n.width)&&_n.maximum>X0&&(_n.actual=Math.min(_n.maximum,X0+df),_n.oa!==X0&&(df-=_n.oa-X0)),_n.index===0)break;_n=a.Eb(_n.index-1)}}}}zn(At),wn.free(zh),wn.free(ra),zu!==void 0&&zn(zu),Vl!==void 0&&zn(Vl);var ff=0,pf=0,J0=a.desiredSize,gx=a.maxSize;Ta=qa(a,!0);var Wg=Fh=wh=0,Zg=0;te=a.columnCount;for(var q0=0;q0<te;q0++)Rn[q0]!==void 0&&(_n=a.Eb(q0),isFinite(_n.width)?(Wg+=_n.width,Wg+=_n.Wc()):Am(_n)===ng?(Wg+=_n.oa,Wg+=_n.Wc()):_n.oa!==0&&(wh+=_n.oa,wh+=_n.Wc()));isFinite(J0.width)?ff=Math.min(J0.width,gx.width):ff=Ta!==Cn&&isFinite(y)?y:wh,ff=Math.max(ff,a.minSize.width),ff=Math.max(ff-Wg,0);for(var Qx=wh===0?1:Math.max(ff/wh,1),Q0=0;Q0<te;Q0++)Rn[Q0]!==void 0&&(_n=a.Eb(Q0),isFinite(_n.width)||Am(_n)===ng||(_n.actual=_n.oa*Qx),_n.position=E.width,_n.oa!==0&&(E.width+=_n.oa,E.width+=_n.Wc()));te=a.rowCount;for(var $0=0;$0<te;$0++)ii[$0]!==void 0&&(_n=a.Fb($0),isFinite(_n.height)?(Zg+=_n.height,Zg+=_n.Wc()):Am(_n)===ng?(Zg+=_n.oa,Zg+=_n.Wc()):_n.oa!==0&&(Fh+=_n.oa,Fh+=_n.Wc()));isFinite(J0.height)?pf=Math.min(J0.height,gx.height):pf=Ta!==Cn&&isFinite(x)?x:Fh,pf=Math.max(pf,a.minSize.height),pf=Math.max(pf-Zg,0);for(var $x=Fh===0?1:Math.max(pf/Fh,1),ev=0;ev<te;ev++)ii[ev]!==void 0&&(_n=a.Fb(ev),isFinite(_n.height)||Am(_n)===ng||(_n.actual=_n.oa*$x),_n.position=E.height,_n.oa!==0&&(E.height+=_n.oa,E.height+=_n.Wc()));te=se.length;for(var Zy=0;Zy<te;Zy++){var Vg=se[Zy],Vy=0,Ky=0;Vg.type===Dn.TableRow?(Vy=E.width,_n=a.Fb(Vg.row),Ky=_n.actual):(_n=a.Eb(Vg.column),Vy=_n.actual,Ky=E.height),Vg.measuredBounds.h(0,0,Vy,Ky),Cs(Vg,!1)}zn(se),a.inRowsCols=st},wm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding,te=E.left;E=E.top;var ne=a.inRowsCols;if(ne!==null){for(var se,he,_e=ne.length,Ee=0,Ne=0;Ne<_e;Ne++)ne[Ne]&&(Ee=Math.max(Ee,ne[Ne].length));he=a.rowDefs,se=a.colDefs;var He=Ne=0,Ye=Math.min(a.topIndex,_e-1);if(0<he.length){for(;Ye!==_e&&(he[Ye]===void 0||he[Ye].oa===0);)Ye++;Ye=Math.max(Math.min(Ye,_e-1),0),Ne=-he[Ye].position}var Qe=Math.min(a.leftIndex,Ee-1);if(0<se.length){for(;Qe!==Ee&&(se[Qe]===void 0||se[Qe].oa===0);)Qe++;Qe=Math.max(Math.min(Qe,Ee-1),0),He=-se[Qe].position}for(var st=0,Pt=0;st!==_e&&he[st]===void 0;)st++;for(;Pt!==_e&&se[Pt]===void 0;)Pt++;Ee=a.part,a.Fb(st),a.Eb(Pt);for(var St=0;St<y.length;St++){var Tt=y[St];if(Tt instanceof Dn&&Tt.visible&&Qh(Tt)){if(Tt.type===Dn.TableRow){se=a.Fb(Tt.row);var At=a.Eb(Pt)}else se=a.Fb(st),At=a.Eb(Tt.column);he=se.position+Ne+E,se.oa!==0&&(he+=se.Io(Math.max(st,Ye))),se=At.position+He+te,At.oa!==0&&(se+=At.Io(Math.max(Pt,Qe))),At=Tt.measuredBounds,Tt.Uk(),Tt.actualBounds.ka();var It=Tt.actualBounds,Wt=sn.allocAt(It.x,It.y,It.width,It.height);It.x=Tt.type===Dn.TableRow?te:se,It.y=Tt.type===Dn.TableColumn?E:he,It.width=At.width,It.height=At.height,Tt.actualBounds.freeze(),hh(Tt,!1),Ui(Wt,It)||Ee===null||(Ee.oh(),Tt.Pn(Ee)),sn.free(Wt)}}for(St=wn.alloc(),Tt=0;Tt<_e;Tt++)if(ne[Tt]){for(Ee=ne[Tt].length,At=a.Fb(Tt),he=At.position+Ne+E,At.oa!==0&&(he+=At.Io(Math.max(st,Ye))),It=0;It<Ee;It++)if(ne[Tt][It]){Wt=a.Eb(It),se=Wt.position+He+te,Wt.oa!==0&&(se+=Wt.Io(Math.max(Pt,Qe)));for(var tn=ne[Tt][It],Kn=tn.length,hi=0;hi<Kn;hi++){var ii=tn[hi],Rn=ii.measuredBounds;St.h(0,0);for(var _n=1;_n<ii.rowSpan&&!(Tt+_n>=a.rowCount);_n++){var Zi=a.Fb(Tt+_n);Zi.oa!==0&&(St.height+=Zi.total)}for(_n=1;_n<ii.columnSpan&&!(It+_n>=a.columnCount);_n++)Zi=a.Eb(It+_n),Zi.oa!==0&&(St.width+=Zi.total);var Ri=Wt.oa+St.width,Ur=At.oa+St.height;_n=se,Zi=he;var wo=Ri,Bs=Ur,Zs=se,Ma=he,js=Ri,lc=Ur;se+Ri>x.width&&(js=Math.max(x.width-se,0)),he+Ur>x.height&&(lc=Math.max(x.height-he,0));var vs=ii.alignment;if(vs.Xb()){vs=a.defaultAlignment,vs.sb()||(vs=$i);var Fu=vs.x,ka=vs.y,uc=vs.offsetX;vs=vs.offsetY;var Dl=Wt.alignment,ou=At.alignment;Dl.sb()&&(Fu=Dl.x,uc=Dl.offsetX),ou.sb()&&(ka=ou.y,vs=ou.offsetY)}else Fu=vs.x,ka=vs.y,uc=vs.offsetX,vs=vs.offsetY;(isNaN(Fu)||isNaN(ka))&&(ka=Fu=.5,vs=uc=0),Dl=Rn.width,ou=Rn.height;var Sl=ii.margin,ul=Sl.left+Sl.right,Zc=Sl.top+Sl.bottom,Bu=Nu(ii,At,Wt,!1);!isNaN(ii.desiredSize.width)||Bu!==Tn&&Bu!==xi||(Dl=Math.max(Ri-ul,0)),!isNaN(ii.desiredSize.height)||Bu!==Tn&&Bu!==Ai||(ou=Math.max(Ur-Zc,0)),Ri=ii.maxSize,Ur=ii.minSize,Dl=Math.min(Ri.width,Dl),ou=Math.min(Ri.height,ou),Dl=Math.max(Ur.width,Dl),ou=Math.max(Ur.height,ou),Ri=ou+Zc,_n+=wo*Fu-(Dl+ul)*Fu+uc+Sl.left,Zi+=Bs*ka-Ri*ka+vs+Sl.top,ii.visible&&(qr(Zs,Ma,js,lc,_n,Zi,Rn.width,Rn.height)?ii.arrange(_n,Zi,Dl,ou):ii.arrange(_n,Zi,Dl,ou,new sn(Zs,Ma,js,lc)))}}}for(wn.free(St),a=0;a<b;a++)x=y[a],te=x instanceof Dn?x:null,te!==null&&Qh(te)&&(te=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,te.width,te.height),x.naturalBounds.freeze())}};function _m(){this.xa="Base"}Je(_m,ks),_m.prototype.measure=function(){},_m.prototype.arrange=function(){};function bm(){this.xa="Base"}Je(bm,ks),bm.prototype.measure=function(){},bm.prototype.arrange=function(){};function Pm(){this.xa="Base"}Je(Pm,ks),Pm.prototype.measure=function(a,y,x,b,E,te,ne){1<b.length&&Lt("Viewbox Panel cannot contain more than one GraphObject."),b=b[0],b.Ca=1,b.Uj(),b.measure(1/0,1/0,te,ne);var se=b.measuredBounds,he=b.margin,_e=he.right+he.left;if(he=he.top+he.bottom,isFinite(y)||isFinite(x)){var Ee=b.scale,Ne=se.width;se=se.height;var He=Math.max(y-_e,0),Ye=Math.max(x-he,0),Qe=1;a.viewboxStretch===fi?Ne!==0&&se!==0&&(Qe=Math.min(He/Ne,Ye/se)):Ne!==0&&se!==0&&(Qe=Math.max(He/Ne,Ye/se)),Qe===0&&(Qe=1e-4),b.Ca*=Qe,Ee!==b.scale&&(Cs(b,!0),b.measure(1/0,1/0,te,ne))}se=b.measuredBounds,E.width=isFinite(y)?y:Math.max(se.width+_e,0),E.height=isFinite(x)?x:Math.max(se.height+he,0)},Pm.prototype.arrange=function(a,y,x){y=y[0];var b=y.measuredBounds,E=y.margin,te=Math.max(b.width+(E.right+E.left),0);E=Math.max(b.height+(E.top+E.bottom),0);var ne=y.alignment;ne.Xb()&&(ne=a.defaultAlignment),ne.sb()||(ne=$i),y.arrange(x.width*ne.x-te*ne.x+ne.offsetX,x.height*ne.y-E*ne.y+ne.offsetY,b.width,b.height)};function $p(){this.xa="Base"}Je($p,ks),$p.prototype.measure=function(){},$p.prototype.arrange=function(){},$p.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var b=a.gridCellSize,E=b.width;b=b.height;var te=a.naturalBounds,ne=a.actualBounds,se=te.width,he=te.height,_e=Math.ceil(se/E),Ee=Math.ceil(he/b),Ne=a.gridOrigin,He=Ne.x;Ne=Ne.y,y.save(),y.beginPath(),y.rect(0,0,se,he),y.clip(),y.Se();for(var Ye=[],Qe=a.O.s,st=Qe.length,Pt=0;Pt<st;Pt++){var St=Qe[Pt],Tt=[];if(Ye.push(Tt),St.visible){var At=St.interval;if(!(0>At)){St=mv(St.figure);for(var It=0;It<st;It++)if(It!==Pt){var Wt=Qe[It];Wt.visible&&mv(Wt.figure)===St&&(Wt=Wt.interval,Wt>At&&Tt.push(Wt))}}}}for(Qe=a.O.s,st=Qe.length,Pt=0;Pt<st;Pt++){var tn=Qe[Pt];if(tn.visible&&(Tt=tn.interval||1,St=Math.abs(Tt),!(2>E*St*x))){if(At=tn.segmentIndex,(!isFinite(At)||isNaN(At))&&(At=0),0>At&&(At=St-Math.min(-At,St)),At=Math.round(At%St),St=tn.opacity,It=1,St!==1){if(St===0)continue;It=y.globalAlpha,y.globalAlpha=It*St}Wt=Ye[Pt];var Kn=!1,hi=tn.strokeDashArray;if(hi!==null&&(Kn=!0,y.js(hi,tn.strokeDashOffset)),tn.figure==="LineV"&&tn.stroke!==null&&0<tn.strokeWidth){for(y.lineWidth=tn.strokeWidth,os(a,y,tn.stroke,!1,!1,te,ne),y.beginPath(),hi=tn=Math.floor((He-E)/E);hi<=tn+_e;hi++){var ii=hi*E+He;0<=ii&&ii<=se&&Cm(hi,Tt,At,Wt)&&(y.moveTo(ii,0),y.lineTo(ii,he))}y.stroke(),y.Se()}else if(tn.figure==="LineH"&&tn.stroke!==null&&0<tn.strokeWidth){for(y.lineWidth=tn.strokeWidth,os(a,y,tn.stroke,!1,!1,te,ne),y.beginPath(),hi=tn=Math.floor((Ne-b)/b);hi<=tn+Ee;hi++)ii=hi*b+Ne,0<=ii&&ii<=he&&Cm(hi,Tt,At,Wt)&&(y.moveTo(0,ii),y.lineTo(se,ii));y.stroke(),y.Se()}else if(tn.figure==="BarV"&&tn.fill!==null)for(os(a,y,tn.fill,!0,!1,te,ne),tn=tn.width,isNaN(tn)&&(tn=E),ii=hi=Math.floor((He-E)/E);ii<=hi+_e;ii++){var Rn=ii*E+He;0<=Rn+tn&&Rn<=se&&Cm(ii,Tt,At,Wt)&&y.fillRect(Rn,0,tn,he)}else if(tn.figure==="BarH"&&tn.fill!==null)for(os(a,y,tn.fill,!0,!1,te,ne),tn=tn.height,isNaN(tn)&&(tn=b),ii=hi=Math.floor((Ne-b)/b);ii<=hi+Ee;ii++)Rn=ii*b+Ne,0<=Rn+tn&&Rn<=he&&Cm(ii,Tt,At,Wt)&&y.fillRect(0,Rn,se,tn);Kn&&y.fs(),St!==1&&(y.globalAlpha=It)}}y.restore(),y.Vc(!1)};function Cm(a,y,x,b){if(0>y)return a%y===x;if(a%y!==x)return!1;y=b.length;for(var E=0;E<y;E++)if(a%b[E]===x)return!1;return!0}function Em(){this.xa="Base"}Je(Em,ks),Em.prototype.measure=function(a,y,x,b,E){var te=b.length;if(a instanceof Fr||a instanceof Bn){var ne=null,se=null;if(a instanceof Bn&&(ne=a),a instanceof Fr&&(se=a,ne=se.adornedPart,a.j===null&&(a.j=[])),ne instanceof Bn){var he=ne;if(te===0)Jr(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var _e=a instanceof Fr?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var Ee=he.points,Ne=ne.pointsCount;se!==null?se.Ul(!1):ne!==null&&ne.Ul(!1),se=y.width;var He=y.height,Ye=a.j;if(Ye.length=0,_e!==null){r1(a,se,He,_e);var Qe=_e.measuredBounds;x.ed(Qe),Ye.push(Qe)}Qe=Ii.alloc();for(var st=ft.alloc(),Pt=ft.alloc(),St=0;St<te;St++){var Tt=b[St];if(Tt!==_e)if(Tt.isPanelMain&&Tt instanceof ir){r1(a,se,He,Tt);var At=Tt.measuredBounds;x.ed(At),Ye.push(At)}else if(2>Ne)Tt.measure(1/0,1/0,0,0),At=Tt.measuredBounds,x.ed(At),Ye.push(At);else{var It=Tt.segmentIndex,Wt=Tt.segmentFraction,tn=Tt.alignmentFocus;tn.Mc()&&(tn=$i);var Kn=Tt.segmentOrientation,hi=Tt.segmentOffset;if(isNaN(It)){var ii=he.ua;At=Wn(),ii.Qu(Wt,At);var Rn=ft.allocAt(At[0],At[1]);if(Rn.add(he.i(0)),ii.type===In.j?Rn.offset(-ii.startX,-ii.startY):(ii=ii.figures.first(),ii!==null&&Rn.offset(-ii.startX,-ii.startY)),ii=At[2],Kn!==za){var _n=he.computeAngle(Tt,Kn,ii);Tt.Kb=_n}_n=Rn.x-y.x;var Zi=Rn.y-y.y;ft.free(Rn),zn(At)}else if(It<-Ne||It>=Ne)At=ft.alloc(),he.vg(),he.computeMidPoint(At),ii=he.midAngle,Kn!==za&&(_n=he.computeAngle(Tt,Kn,ii),Tt.Kb=_n),_n=At.x-y.x,Zi=At.y-y.y,ft.free(At);else{if(_n=0,0<=It?(Zi=Ee.M(It),At=It<Ne-1?Ee.M(It+1):Zi):(_n=Ne+It,Zi=Ee.M(_n),At=0<_n?Ee.M(_n-1):Zi),Zi.Xa(At)){0<=It?(ii=0<It?Ee.M(It-1):Zi,_n=It<Ne-2?Ee.M(It+2):At):(ii=_n<Ne-1?Ee.M(_n+1):Zi,_n=1<_n?Ee.M(_n-2):At),Rn=ii.Bf(Zi);var Ri=At.Bf(_n);ii=Rn>Ri+10?0<=It?ii.ab(Zi):Zi.ab(ii):Ri>Rn+10?0<=It?At.ab(_n):_n.ab(At):0<=It?ii.ab(_n):_n.ab(ii)}else ii=0<=It?Zi.ab(At):At.ab(Zi);Kn!==za&&(_n=he.computeAngle(Tt,Kn,ii),Tt.Kb=_n),_n=Zi.x+(At.x-Zi.x)*Wt-y.x,Zi=Zi.y+(At.y-Zi.y)*Wt-y.y}Tt.measure(1/0,1/0,0,0),At=Tt.measuredBounds,Rn=Tt.naturalBounds;var Ur=0;Tt instanceof ir&&(Ur=Tt.strokeWidth),Ri=Rn.width+Ur;var wo=Rn.height+Ur;Qe.reset(),Qe.translate(-At.x,-At.y),Qe.scale(Tt.scale,Tt.scale),Qe.rotate(Kn===za?Tt.angle:ii,Ri/2,wo/2),Kn!==dg&&Kn!==pg||Qe.rotate(90,Ri/2,wo/2),Kn!==fg&&Kn!==gg||Qe.rotate(-90,Ri/2,wo/2),Kn===n0&&(45<ii&&135>ii||225<ii&&315>ii)&&Qe.rotate(-ii,Ri/2,wo/2),Rn=new sn(0,0,Ri,wo),st.xi(Rn,tn),Qe.Ga(st),tn=-st.x+Ur/2*Tt.scale,Tt=-st.y+Ur/2*Tt.scale,Pt.assign(hi),Ur=isNaN(hi.x);var Bs=isNaN(hi.y);if(Ur||Bs){Ri=Ri/2+3,wo=wo/2+3;var Zs=45<=ii&&135>=ii,Ma=225<=ii&&315>=ii;Kn===za&&(Zs||Ma)?(Pt.x=Bs?Ri:hi.y,Pt.y=Ur?wo:hi.x,Zs?0<=It||isNaN(It)&&.5>Wt||!Ur||(Pt.y=-wo):Ma&&((0<=It||isNaN(It)&&.5>Wt)&&Ur&&(Pt.y=-wo),Bs&&(Pt.x=-Ri))):(Ur&&(Pt.x=0<=It||isNaN(It)&&.5>Wt?Ri:-Ri),Bs&&(Pt.y=-wo),Pt.rotate(ii))}else Pt.rotate(ii);_n+=Pt.x,Zi+=Pt.y,Rn.set(At),Rn.h(_n+tn,Zi+Tt,At.width,At.height),Ye.push(Rn),x.ed(Rn)}}if(ne!==null)for(b=ne.labelNodes;b.next();)b.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),Jr(E,x.width||0,x.height||0),Ii.free(Qe),ft.free(st),ft.free(Pt)}}}},Em.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Fr||a instanceof Bn){var b=a,E=null;a instanceof Fr&&(E=a,b=E.adornedPart);var te=a instanceof Fr?null:b.path,ne=a.j;if(ne.length!==0){var se=0;if(te!==null&&se<ne.length){var he=ne[se];se++,te.arrange(he.x-a.jg.x,he.y-a.jg.y,he.width,he.height)}for(he=0;he<x;he++){var _e=y[he];if(_e!==te&&se<ne.length){var Ee=ne[se];se++,_e.arrange(Ee.x-a.jg.x,Ee.y-a.jg.y,Ee.width,Ee.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof Bn)for(te=a.labelNodes;te.next();){var Ne=a;ne=te.value,se=ne.segmentIndex,he=ne.segmentFraction;var He=ne.alignmentFocus;if(_e=ne.segmentOrientation,Ee=ne.segmentOffset,isNaN(se)){var Ye=Ne.ua,Qe=Wn();Ye.Qu(he,Qe);var st=ft.allocAt(Qe[0],Qe[1]);st.add(Ne.i(0)),Ye.type===In.j||(Ye=Ye.figures.first()),st.offset(-Ye.startX,-Ye.startY),Ye=Qe[2],_e!==za&&(Ne=Ne.computeAngle(ne,_e,Ye),ne.angle=Ne),Ne=st.x;var Pt=st.y;ft.free(st),zn(Qe)}else if(se<-x||se>=x)Qe=ft.alloc(),Ye=Ne,Pt=Qe,Ye.vg(),Ye.computeMidPoint(Pt),Ye=Ne.midAngle,_e!==za&&(Ne=Ne.computeAngle(ne,_e,Ye),ne.angle=Ne),Ne=Qe.x,Pt=Qe.y,ft.free(Qe);else{if(st=0,0<=se?(Qe=y.s[se],Pt=se<x-1?y.s[se+1]:Qe):(st=x+se,Qe=y.s[st],Pt=0<st?y.s[st-1]:Qe),Qe.Xa(Pt)){0<=se?(Ye=0<se?y.s[se-1]:Qe,st=se<x-2?y.s[se+2]:Pt):(Ye=st<x-1?y.s[st+1]:Qe,st=1<st?y.s[st-2]:Pt);var St=Ye.Bf(Qe),Tt=Pt.Bf(st);Ye=St>Tt+10?0<=se?Ye.ab(Qe):Qe.ab(Ye):Tt>St+10?0<=se?Pt.ab(st):st.ab(Pt):0<=se?Ye.ab(st):st.ab(Ye)}else Ye=0<=se?Qe.ab(Pt):Pt.ab(Qe);_e!==za&&(Ne=Ne.computeAngle(ne,_e,Ye),ne.angle=Ne),Ne=Qe.x+(Pt.x-Qe.x)*he,Pt=Qe.y+(Pt.y-Qe.y)*he}if(He.ys())ne.location=new ft(Ne,Pt);else{He.Mc()&&(He=$i),Qe=Ii.alloc(),Qe.reset(),Qe.scale(ne.scale,ne.scale),Qe.rotate(ne.angle,0,0);var At=ne.naturalBounds;st=sn.allocAt(0,0,At.width,At.height),St=ft.alloc(),St.xi(st,He),Qe.Ga(St),He=-St.x,Tt=-St.y;var It=At.width,Wt=At.height;At=ft.alloc(),At.assign(Ee);var tn=isNaN(Ee.x),Kn=isNaN(Ee.y);if(tn||Kn){It=It/2+3,Wt=Wt/2+3;var hi=45<=Ye&&135>=Ye,ii=225<=Ye&&315>=Ye;_e===za&&(hi||ii)?(At.x=Kn?It:Ee.y,At.y=tn?Wt:Ee.x,hi?0<=se||isNaN(se)&&.5>he||!tn||(At.y=-Wt):ii&&((0<=se||isNaN(se)&&.5>he)&&tn&&(At.y=-Wt),Kn&&(At.x=-It))):(tn&&(At.x=0<=se||isNaN(se)&&.5>he?It:-It),Kn&&(At.y=-Wt),At.rotate(Ye))}else At.rotate(Ye);Ne+=At.x,Pt+=At.y,Qe.pp(st),He+=st.x,Tt+=st.y,se=ft.allocAt(Ne+He,Pt+Tt),ne.move(se),ft.free(se),ft.free(At),ft.free(St),sn.free(st),Ii.free(Qe)}}E!==null?E.Ul(!1):b.Ul(!1),b=D1(a),a.location.h(a.position.x+b.x,a.position.y+b.y),ft.free(b)}};function r1(a,y,x,b){if(kl(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof Fr&&a.type===Dn.Link&&a.adornedObject instanceof ir&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof Bn&&a.ua!==null?(a=a.geometry.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):a instanceof Fr&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):b.Ge(-(E/2),-(E/2),y+E,x+E),E=b.desiredSize,E.w()||b.ua===null?b.dc.h(0,0,E.width,E.height):b.dc.assign(b.ua.bounds),Cs(b,!1)}}function eg(){this.xa="Base"}Je(eg,ks),eg.prototype.measure=function(a,y,x,b,E,te,ne){var se=a.Pb();a.graduatedBounds=[];var he=se.margin,_e=he.right+he.left,Ee=he.top+he.bottom;se.measure(y,x,te,ne);var Ne=se.measuredBounds,He=new sn(-he.left,-he.top,Math.max(Ne.width+_e,0),Math.max(Ne.height+Ee,0));a.graduatedBounds.push(He),E.assign(He);for(var Ye=se.geometry,Qe=se.strokeWidth,st=Ye.flattenedSegments,Pt=Ye.flattenedLengths,St=Ye.flattenedTotalLength,Tt=st.length,At=0,It=0,Wt=Wn(),tn=0;tn<Tt;tn++){var Kn=st[tn],hi=[];It=At=0;for(var ii=Kn.length,Rn=0;Rn<ii;Rn+=2){var _n=Kn[Rn],Zi=Kn[Rn+1];if(Rn!==0){var Ri=180*Math.atan2(Zi-It,_n-At)/Math.PI;0>Ri&&(Ri+=360),hi.push(Ri)}At=_n,It=Zi}Wt.push(hi)}if(a.graduatedIntervals===null){for(var Ur=[],wo=a.O.s,Bs=wo.length,Zs=0;Zs<Bs;Zs++){var Ma=wo[Zs],js=[];if(Ur.push(js),Ma.visible){var lc=Ma.interval;if(!(0>lc)){for(var vs=0;vs<Bs;vs++)if(vs!==Zs){var Fu=wo[vs];if(Fu.visible&&Ma.constructor===Fu.constructor){var ka=Fu.interval;ka>lc&&js.push(ka)}}}}}a.graduatedIntervals=Ur}var uc=a.graduatedIntervals,Dl=a.O.s,ou=Dl.length,Sl=0,ul=0,Zc=St;a.graduatedMarks=[];for(var Bu,ap=0;ap<ou;ap++){var xl=Dl[ap];if(Bu=[],xl.visible&&xl!==se){var Ta=Math.abs(xl.interval),jg=a.graduatedTickUnit;if(!(2>jg*Ta*St/a.graduatedRange&&xl.graduatedSkip===null)){var af=Pt[0][0],Ju=0,hl=0;ul=St*xl.graduatedStart-1e-4,Zc=St*xl.graduatedEnd+1e-4;var bd=jg*Ta,wl=a.graduatedTickBase;if(wl<a.graduatedMin){var Vc=(a.graduatedMin-wl)/bd;Vc=Vc%1===0?Vc:Math.floor(Vc+1),wl+=Vc*bd}else wl>a.graduatedMin+bd&&(wl-=Math.floor((wl-a.graduatedMin)/bd)*bd);for(var W0=uc[ap],zg=wl,Uy=1e-6*a.graduatedMax,wh=1;wl<=a.graduatedMax+Uy;wh++){e:{for(var Fh=W0.length,lf=0;lf<Fh;lf++){var Kc=(wl-a.graduatedTickBase)%(W0[lf]*a.graduatedTickUnit),lp=1e-6*a.graduatedTickUnit;if(Kc<lp&&Kc>-lp){var Yc=!1;break e}}Yc=!0}if(Yc&&(wl>a.graduatedMax&&(wl=a.graduatedMax),xl.graduatedSkip===null||xl instanceof Lo&&!xl.graduatedSkip(wl,xl)||xl instanceof ir&&!xl.graduatedSkip(wl,xl))&&(Sl=(wl-a.graduatedMin)*St/a.graduatedRange,Sl>St&&(Sl=St),ul<=Sl&&Sl<=Zc)){for(var _h=Wt[Ju][hl],hc=Pt[Ju][hl];Ju<Pt.length;){for(;Sl>af&&hl<Pt[Ju].length-1;)hl++,_h=Wt[Ju][hl],hc=Pt[Ju][hl],af+=hc;if(Sl<=af)break;Ju++,hl=0,_h=Wt[Ju][hl],hc=Pt[Ju][hl],af+=hc}var cl=st[Ju],qu=cl[2*hl],Z0=cl[2*hl+1],Bh=(Sl-(af-hc))/hc,up=new ft(qu+(cl[2*hl+2]-qu)*Bh+Qe/2-Ye.bounds.x,Z0+(cl[2*hl+3]-Z0)*Bh+Qe/2-Ye.bounds.y);up.scale(se.scale,se.scale);e:{var ju=_h,Pd=Wt[Ju];if(!(.5005>Bh&&.4995<Bh)){var Qu=ju;if(.5>Bh?0<hl?Qu=Pd[hl-1]:Vt.$(cl[0],cl[cl.length-2])&&Vt.$(cl[1],cl[cl.length-1])&&(Qu=Pd[Pd.length-1]):.5<Bh&&(hl+1<Pd.length?Qu=Pd[hl+1]:Vt.$(cl[0],cl[cl.length-2])&&Vt.$(cl[1],cl[cl.length-1])&&(Qu=Pd[0])),ju!==Qu){var uf=Math.abs(ju-Qu);if(180<uf&&(ju<Qu?ju+=360:Qu+=360,uf=Math.abs(ju-Qu)),5e-4>Bh||.9995<Bh){_h=(ju+Qu)/2%360;break e}if(10>uf){var hp=1-Math.abs(.5-Bh);_h=(ju*hp+Qu*(1-hp))%360;break e}}}_h=ju}if(xl instanceof Lo){var _u="";xl.graduatedFunction!==null?(_u=xl.graduatedFunction(wl,xl),_u=_u!=null?_u.toString():""):_u=(+wl.toFixed(2)).toString(),_u!==""&&Bu.push({$l:up,angle:_h,text:_u})}else Bu.push({$l:up,angle:_h})}wl=zg+wh*bd}}}a.graduatedMarks.push(Bu)}zn(Wt);var ra=a.graduatedMarks;if(ra!==null)for(var Ug=b.length,Za=0;Za<Ug;Za++){var ys=b[Za],Va=ra[Za];if(ys.visible&&ys!==se&&Va.length!==0){if(ys instanceof ir){var jh=a,cc=E,Cd=ys.alignmentFocus;Cd.Mc()&&(Cd=Br);var Hy=ys.angle;ys.Kb=0,ys.measure(1/0,1/0,0,0),ys.Kb=Hy;var V0=ys.measuredBounds,cp=V0.width,Ed=V0.height,hf=sn.allocAt(0,0,cp,Ed),dl=ft.alloc();dl.xi(hf,Cd),sn.free(hf);for(var zh=-dl.x,zu=-dl.y,Vl=new sn,Xc=Va.length,dp=0;dp<Xc;dp++)for(var Jc=Va[dp],K0=Jc.$l.x,fp=Jc.$l.y,as=Jc.angle,bu=0;4>bu;bu++){switch(bu){case 0:dl.h(zh,zu);break;case 1:dl.h(zh+cp,zu);break;case 2:dl.h(zh,zu+Ed);break;case 3:dl.h(zh+cp,zu+Ed)}dl.rotate(as+ys.angle),dl.offset(K0,fp),dp===0&&bu===0?Vl.h(dl.x,dl.y,0,0):Vl.Ye(dl),dl.offset(-K0,-fp),dl.rotate(-as-ys.angle)}ft.free(dl),jh.graduatedBounds!==null&&jh.graduatedBounds.push(Vl),br(cc,Vl.x,Vl.y,Vl.width,Vl.height)}else if(ys instanceof Lo){var su=a,Y0=E;su.temporaryTextBlock===null&&(su.temporaryTextBlock=new Lo);var _l=su.temporaryTextBlock;S1(_l,ys);var dc=ys.alignmentFocus;dc.Mc()&&(dc=Br);for(var au=ys.segmentOrientation,pp=ys.segmentOffset,qc=new sn,Hg=0,gp=0,$u=0,Ld=0,Qc=0,mp=Va.length,fc=0;fc<mp;fc++){var bh=Va[fc];Hg=bh.$l.x,gp=bh.$l.y,$u=bh.angle,Qc=Ld=ys.angle,au!==za&&(Qc=au===cg||au===t0?$u+ys.angle:$u,Ld=Bn.computeAngle(au,Qc)),_l.Kb=Ld,_l.text=bh.text||"",_l.measure(1/0,1/0,0,0);var pc=_l.measuredBounds,Uh=_l.naturalBounds,gc=Uh.width,Md=Uh.height,Uu=Ii.alloc();Uu.reset(),Uu.translate(-pc.x,-pc.y),Uu.scale(_l.scale,_l.scale),Uu.rotate(Qc,gc/2,Md/2),au!==dg&&au!==pg||Uu.rotate(90,gc/2,Md/2),au!==fg&&au!==gg||Uu.rotate(-90,gc/2,Md/2),au===n0&&(45<$u&&135>$u||225<$u&&315>$u)&&Uu.rotate(-$u,gc/2,Md/2);var cf=sn.allocAt(0,0,gc,Md),mc=ft.alloc();mc.xi(cf,dc),Uu.Ga(mc);var df=-mc.x,Gy=-mc.y,Hh=ft.alloc();Hh.assign(pp),isNaN(Hh.x)&&(Hh.x=gc/2+3),isNaN(Hh.y)&&(Hh.y=-(Md/2+3)),Hh.rotate($u),Hg+=Hh.x+df,gp+=Hh.y+Gy;var kd=new sn(Hg,gp,pc.width,pc.height),Gg=new sn(pc.x,pc.y,pc.width,pc.height),Wy=new sn(Uh.x,Uh.y,Uh.width,Uh.height);bh.Sz=Ld,bh.lineCount=_l.lineCount,bh.lines=[_l.Cb,_l.Ih,_l.df,_l.Le,_l.Qc,_l.Qb,_l.ze],bh.actualBounds=kd,bh.measuredBounds=Gg,bh.naturalBounds=Wy,fc===0?qc.assign(kd):qc.ed(kd),ft.free(Hh),ft.free(mc),sn.free(cf),Ii.free(Uu)}su.graduatedBounds!==null&&su.graduatedBounds.push(qc),br(Y0,qc.x,qc.y,qc.width,qc.height)}Cs(ys,!1)}}},eg.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var b=a.Pb(),E=a.graduatedMarks;if(E!==null){var te=a.graduatedBounds,ne=0,se=te[ne];ne++,b!==null&&b.arrange(se.x-x.x,se.y-x.y,se.width,se.height);for(var he=y.length,_e=0;_e<he;_e++){var Ee=y[_e];se=E[_e],Ee.visible&&Ee!==b&&se.length!==0&&(se=te[ne],ne++,Ee.arrange(se.x-x.x,se.y-x.y,se.width,se.height))}a.graduatedBounds=null}}},eg.prototype.gc=function(a,y,x){var b=x.$i;x.$i=!0;var E=a.naturalBounds,te=E.width,ne=E.height;E=y instanceof ml,y.save(),y.beginPath(),y.rect(-1,-1,te+1,ne+1),y.clip(),y.Se(),te=a.Pb(),te.gc(y,x),ne=a.Df()*x.scale,0>=ne&&(ne=1);for(var se=te.actualBounds,he=a.O.s,_e=a.graduatedMarks,Ee=he.length,Ne=0;Ne<Ee;Ne++){var He=he[Ne],Ye=_e[Ne],Qe=Ye.length;if(He.visible&&He!==te&&Ye.length!==0){if(He instanceof ir){if(!(2>a.graduatedTickUnit*He.interval*te.geometry.flattenedTotalLength/a.graduatedRange*ne&&He.graduatedSkip===null)){var st=He.measuredBounds,Pt=He.strokeWidth*He.scale,St=He.alignmentFocus;St.Mc()&&(St=Br);for(var Tt=0;Tt<Qe;Tt++){var At=Ye[Tt].$l,It=Ye[Tt].angle,Wt=St,tn=He.Ab;tn.reset(),tn.translate(At.x+se.x,At.y+se.y),tn.rotate(It+He.angle,0,0),tn.translate(-st.width*Wt.x+Wt.offsetX+Pt/2,-st.height*Wt.y+Wt.offsetY+Pt/2),tn.scale(He.scale,He.scale),eu(He,!1),He.wh.set(He.Ab),He.Kk=He.scale,jl(He,!1),He.gc(y,x),E&&(a.svg.appendChild(He.svg),He.svg=null),He.Ab.reset()}}}else if(He instanceof Lo)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Lo),st=a.temporaryTextBlock,S1(st,He),Pt=0;Pt<Qe;Pt++)St=Ye[Pt],St.actualBounds&&St.measuredBounds&&St.naturalBounds&&(st.ec=St.text||"",st.Kb=St.Sz||0,st.Gc=St.lineCount||0,Tt=St.lines,Tt!==void 0&&(st.Cb=Tt[0],st.Ih=Tt[1],st.df=Tt[2],st.Le=Tt[3],st.Qc=Tt[4],st.Qb=Tt[5],st.ze=Tt[6]),St.naturalBounds&&(st.dc=St.naturalBounds),St.actualBounds&&(Tt=St.actualBounds,st.arrange(Tt.x,Tt.y,Tt.width,Tt.height)),Tt=St.actualBounds,st.arrange(Tt.x,Tt.y,Tt.width,Tt.height),At=St.measuredBounds,St=St.naturalBounds,It=st.Ab,It.reset(),It.translate(Tt.x+se.x,Tt.y+se.y),It.translate(-At.x,-At.y),st.no(It,St.x,St.y,St.width,St.height),eu(st,!1),st.wh.set(st.Ab),st.Kk=st.scale,jl(st,!1),st.Ng=He.part,st.Me=He.panel,st.gc(y,x),st.Me=null,st.Ng=null,E&&(a.svg.appendChild(st.svg),st.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function Dn(a,y){if(Zt.call(this),this.na=null,a===void 0)this.na=Dn.Position;else if(typeof a=="string"){var x=mu.I(a);x!==null&&(this.na=x)}else a instanceof ks?this.na=a:a&&(this.na=Dn.Position,y=a);this.na===null&&Lt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Dn.Grid?1048576:0),this.O=new Ln,this.yb=zs,this.Tm=As,this.Uf=Xi,this.$g=null,this.$e="",this.jg=new sn(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=fi,this.jn=Zr,this.kn=Zn,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Je(Dn,Zt),Dn.prototype.cloneProtected=function(a){Zt.prototype.cloneProtected.call(this,a),a.na=this.na,a.yb=this.yb.J(),a.Tm=this.Tm.J(),a.Uf=this.Uf,a.$e=this.$e,a.jg.assign(this.jg),this.T!==null&&(a.T=this.T.copy(a)),a.xo=this.xo,a.jn=this.jn.J(),a.kn=this.kn.J(),this.ra!==null&&(a.ra=this.ra.copy()),a.ub=this.ub,a.zn=this.zn,a.Hh=this.Hh},Dn.prototype.Af=function(a){Zt.prototype.Af.call(this,a),a.O=this.O;for(var y=a.O.s,x=y.length,b=0;b<x;b++)y[b].Me=a;a.$g=null},Dn.prototype.copy=function(){var a=Zt.prototype.copy.call(this);if(a!==null){for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b].copy();E.wi(a),E.Ng=null;var te=a.O,ne=te.count;if(te.Gb(ne,E),te=a.part,te!==null){te.Rh=null,E.portId!==null&&te instanceof qn&&(te.Te=!0);var se=a.diagram;se!==null&&se.undoManager.isUndoingRedoing||te.cb(es,"elements",a,null,E,null,ne)}}return a}return null},$e=Dn.prototype,$e.toString=function(){return"Panel("+this.type.name+")#"+sr(this)},$e.Pn=function(a){Zt.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},$e.hh=function(a,y){if(this.na===Dn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Dn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Dn.Table)if(a.yc(),a instanceof ml){var x=a.yd;a.yd=fm(a,"gojs-ts"),gv(this,a),a.nh.pop(),a.yd=x}else gv(this,a);(x=this.isClipping&&this.na===Dn.Spot)&&a.save();for(var b=this.Pb(),E=this.O.s,te=E.length,ne=0;ne<te;ne++){var se=E[ne];x&&se===b&&(a.clipInsteadOfFill=!0),se.gc(a,y),x&&se===b&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function gv(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,b=0<a.columnCount?a.colDefs:null;x!==null&&Lm(a,y,!0,x,!0),b!==null&&Lm(a,y,!1,b,!0),x!==null&&o1(a,y,!0,x),b!==null&&o1(a,y,!1,b),x!==null&&Lm(a,y,!0,x,!1),b!==null&&Lm(a,y,!1,b,!1)}function o1(a,y,x,b){for(var E=b.length,te=a.actualBounds,ne=a.naturalBounds,se=!0,he=0;he<E;he++){var _e=b[he];if(_e!==void 0&&_e.actual!==0)if(se)se=!1;else{if(x){if(_e.position>ne.height)continue}else if(_e.position>ne.width)continue;var Ee=_e.separatorStrokeWidth;isNaN(Ee)&&(Ee=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Ne=_e.separatorStroke;if(Ne===null&&(Ne=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),Ee!==0&&Ne!==null){os(a,y,Ne,!1,!1,ne,te),Ne=!1;var He=_e.separatorDashArray;He===null&&(He=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),He!==null&&(Ne=!0,y.js(He,0)),y.beginPath(),He=_e.position+Ee,x?He>ne.height&&(Ee-=He-ne.height):He>ne.width&&(Ee-=He-ne.width),_e=_e.position+Ee/2,y.lineWidth=Ee,Ee=a.yb,x?(_e+=Ee.top,He=ne.width-Ee.right,y.moveTo(Ee.left,_e),y.lineTo(He,_e)):(_e+=Ee.left,He=ne.height-Ee.bottom,y.moveTo(_e,Ee.top),y.lineTo(_e,He)),y.stroke(),y.Se(),Ne&&y.fs()}}}}function Lm(a,y,x,b,E){for(var te=b.length,ne=a.actualBounds,se=a.naturalBounds,he=s1(a,!0),_e=s1(a,!1),Ee=0;Ee<te;Ee++){var Ne=b[Ee];if(Ne!==void 0&&Ne.background!==null&&Ne.coversSeparators!==E&&Ne.actual!==0){var He=x?ne.height:ne.width;if(!(Ne.position>He)){var Ye=Ne.Wc(),Qe=Ne.separatorStrokeWidth;isNaN(Qe)&&(Qe=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var st=Ne.separatorStroke;st===null&&(st=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(st===null||Ne.index===(x?he:_e))&&(Qe=0),Ye-=Qe,Qe=Ne.position+Qe,Ye+=Ne.actual,Qe+Ye>He&&(Ye=He-Qe),0>=Ye||(He=a.yb,os(a,y,Ne.background,!0,!1,se,ne),x?y.fillRect(He.left,Qe+He.top,ne.width-(He.left+He.right),Ye):y.fillRect(Qe+He.left,He.top,Ye,ne.height-(He.top+He.bottom)))}}}}function s1(a,y){for(var x=y?a.rowCount:a.columnCount,b=0;b<x;b++){var E=y?a.rowDefs[b]:a.colDefs[b];if(E!==void 0)return E.index}return 0}function mv(a){return a==="LineV"||a==="BarV"}$e.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},$e.kk=function(a,y,x){if(!Zt.prototype.kk.call(this,a,y,x))return!1;if(this.type===Dn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,gv(this,a),a.yd=null;else if(this.na===Dn.Grid||this.na===Dn.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var b=x.length,E=0;E<b;E++)x[E].gc(a,y);return!0},$e.nk=function(){return!0},$e.$o=function(a,y,x,b){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var E=0,te=0,ne=0;ne<y.length;ne++)if(y[ne].Ed()){var se=y[ne].actualBounds;E=ne===0?se.x:Math.min(se.x,E),te=ne===0?se.y:Math.min(se.y,te)}b.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-E)+","+(a.y-x.y-te)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else Zt.prototype.$o.call(this,a,y,x,b)},$e.Sj=function(a,y,x,b,E){var te=this.se(),ne=this.transform,se=1/(ne.m11*ne.m22-ne.m12*ne.m21),he=ne.m22*se,_e=-ne.m12*se,Ee=-ne.m21*se,Ne=ne.m11*se,He=se*(ne.m21*ne.dy-ne.m22*ne.dx),Ye=se*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,Vt.Ff(ne.left,ne.top,ne.right,ne.bottom,a,y,x,b,E);if(this.background!==null)return te=a*he+y*Ee+He,se=a*_e+y*Ne+Ye,a=x*he+b*Ee+He,he=x*_e+b*Ne+Ye,E.h(0,0),x=this.naturalBounds,te=Vt.Ff(0,0,x.width,x.height,te,se,a,he,E),E.transform(ne),te;te||(he=1,Ee=_e=0,Ne=1,Ye=He=0),se=a*he+y*Ee+He,a=a*_e+y*Ne+Ye,he=x*he+b*Ee+He,x=x*_e+b*Ne+Ye,E.h(he,x),b=(he-se)*(he-se)+(x-a)*(x-a),_e=!1,Ne=this.O.s,Ye=Ne.length,Ee=ft.alloc(),He=null,y=1/0;var Qe=null,st=this.isClipping&&this.na===Dn.Spot;st&&(Qe=ft.alloc(),He=this.Pb(),(_e=He.Sj(se,a,he,x,Qe))&&(y=(se-Qe.x)*(se-Qe.x)+(a-Qe.y)*(a-Qe.y)));for(var Pt=0;Pt<Ye;Pt++){var St=Ne[Pt];St.visible&&St!==He&&St.Sj(se,a,he,x,Ee)&&(_e=!0,St=(se-Ee.x)*(se-Ee.x)+(a-Ee.y)*(a-Ee.y),St<b&&(b=St,E.set(Ee)))}return st&&(y>b&&E.set(Qe),ft.free(Qe)),ft.free(Ee),te&&E.transform(ne),_e},$e.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Zt.prototype.Gj.call(this)},$e.v=function(a){if(!kl(this)){Zt.prototype.v.call(this,a),a=null,(this.na===Dn.Auto||this.na===Dn.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];if((E===a||E.isPanelMain)&&E.v(!0),!E.desiredSize.w()){var te=qa(E,!1);(E instanceof ja||E instanceof Dn||E instanceof Lo||te!==Cn)&&E.v(!0)}}}},$e.Uj=function(){if(!kl(this)){Cs(this,!0),hh(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},$e.Uk=function(){if(!(this.l&2048)){eu(this,!0),jl(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},$e.Wu=function(){jl(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},$e.Wl=function(a,y,x,b){var E=this.jg;E.h(0,0,0,0);var te=this.desiredSize,ne=this.minSize;x===void 0&&(x=ne.width,b=ne.height),x=Math.max(x,ne.width),b=Math.max(b,ne.height);var se=this.maxSize;isNaN(te.width)||(a=Math.min(te.width,se.width)),isNaN(te.height)||(y=Math.min(te.height,se.height)),a=Math.max(x,a),y=Math.max(b,y);var he=this.yb;a=Math.max(a-he.left-he.right,0),y=Math.max(y-he.top-he.bottom,0);var _e=this.O.s;_e.length!==0&&this.na.measure(this,a,y,_e,E,x,b),a=E.width+he.left+he.right,he=E.height+he.top+he.bottom,isFinite(te.width)&&(a=te.width),isFinite(te.height)&&(he=te.height),a=Math.min(se.width,a),he=Math.min(se.height,he),a=Math.max(ne.width,a),he=Math.max(ne.height,he),a=Math.max(x,a),he=Math.max(b,he),Jr(E,a,he),Jr(this.naturalBounds,a,he),this.Ge(0,0,a,he)},$e.Pb=function(){if(this.$g===null){var a=this.O.s,y=a.length;if(y===0)return null;for(var x=0;x<y;x++){var b=a[x];if(b.isPanelMain===!0)return this.$g=b}this.$g=a[0]}return this.$g};function Oh(a){return a.part!==null?a.part.locationObject:null}$e.eh=function(a,y,x,b){var E=this.O.s;if(this.actualBounds.h(a,y,x,b),E.length!==0){if(!this.desiredSize.w()){a=qa(this,!0);var te=this.measuredBounds;y=te.width,te=te.height;var ne=this.Kg,se=ne.left+ne.right;switch(ne=ne.top+ne.bottom,y===x&&te===b&&(a=Cn),a){case Cn:(y>x||te>b)&&(this.v(),this.measure(y>x?x:y,te>b?b:te,0,0));break;case Tn:this.v(!0),this.measure(x+se,b+ne,0,0);break;case xi:this.v(!0),this.measure(x+se,te+ne,0,0);break;case Ai:this.v(!0),this.measure(y+se,b+ne,0,0)}}this.na.arrange(this,E,this.jg)}},$e.gh=function(a){var y=this.naturalBounds,x=Oh(this);if(qr(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=ft.allocAt(0,0);b--;){var te=y[b];if((te.visible||te===x)&&(Un(E.set(a),te.transform),te.ca(E)))return ft.free(E),!0}return ft.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},$e.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b].ks(a);if(E!==null)return E}return null},$e.qm=function(a,y){if(y(this,a),a instanceof Dn){a=a.O.s;for(var x=a.length,b=0;b<x;b++)this.qm(a[b],y)}};function gd(a,y){a1(a,a,y)}function a1(a,y,x){x(y),y=y.O.s;for(var b=y.length,E=0;E<b;E++){var te=y[E];te instanceof Dn&&a1(a,te,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof Dn){y=y.O.s;for(var b=y.length,E=0;E<b;E++)l1(a,y[E],x)}}$e.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof Dn){y=y.O.s;for(var b=y.length,E=0;E<b;E++){var te=u1(a,y[E],x);if(te!==null)return te}}return null}$e.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=tg(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof Dn){var te=E.fb(a);if(te!==null)return te}if(E.name===a)return E}return null};function h1(a){a=a.O.s;for(var y=a.length,x=0,b=0;b<y;b++){var E=a[b];E instanceof Dn?x=Math.max(x,h1(E)):E instanceof ir&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}$e.se=function(){return!(this.type===Dn.TableRow||this.type===Dn.TableColumn)};function Qh(a){return a.type===Dn.TableRow||a.type===Dn.TableColumn}$e.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Fa(this)))return null;var b=this.naturalBounds,E=1/this.Df(),te=this.se(),ne=te?a:Un(ft.allocAt(a.x,a.y),this.transform),se=this.diagram,he=10,_e=5;if(se!==null&&(he=se.Ql("extraTouchArea"),_e=he/2),qr(-(_e*E),-(_e*E),b.width+he*E,b.height+he*E,ne.x,ne.y)){if(!this.isAtomic){E=this.O.s;var Ee=E.length;if(se=ft.alloc(),_e=(he=this.isClipping&&this.na===Dn.Spot)?this.Pb():null,he&&(_e.se()?Un(se.set(a),_e.transform):se.set(a),!_e.ca(se)))return ft.free(se),te||ft.free(ne),null;for(var Ne=Oh(this);Ee--;){var He=E[Ee];if((He.visible||He===Ne)&&(He.se()?Un(se.set(a),He.transform):se.set(a),!he||He!==_e)){var Ye=null;if(He instanceof Dn?Ye=He.ic(se,y,x):He.pickable===!0&&He.ca(se)&&(Ye=He),Ye!==null&&(y!==null&&(Ye=y(Ye)),Ye!==null&&(x===null||x(Ye))))return ft.free(se),te||ft.free(ne),Ye}}ft.free(se)}return this.background===null&&this.areaBackground===null?(te||ft.free(ne),null):(a=qr(0,0,b.width,b.height,ne.x,ne.y)?this:null,te||ft.free(ne),a)}return te||ft.free(ne),null},$e.ji=function(a,y,x,b){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var E=this.naturalBounds,te=this.se(),ne=te?a:Un(ft.allocAt(a.x,a.y),this.transform);if(E=qr(0,0,E.width,E.height,ne.x,ne.y),Qh(this)||E){if(!this.isAtomic){for(var se=this.O.s,he=se.length,_e=ft.alloc(),Ee=Oh(this);he--;){var Ne=se[he];if(Ne.visible||Ne===Ee){Ne.se()?Un(_e.set(a),Ne.transform):_e.set(a);var He=Ne;Ne=Ne instanceof Dn?Ne:null,(Ne!==null?Ne.ji(_e,y,x,b):He.ca(_e))&&He.pickable!==!1&&(y!==null&&(He=y(He)),He===null||x!==null&&!x(He)||b.add(He))}}ft.free(_e)}return te||ft.free(ne),E&&(this.background!==null||this.areaBackground!==null)}return te||ft.free(ne),!1},$e.Cf=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=te;if(te===void 0&&(ne=Ii.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&Ii.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var se=Oh(this),he=this.O.s,_e=he.length;_e--;){var Ee=he[_e];if(Ee.visible||Ee===se){var Ne=Ee.actualBounds,He=this.naturalBounds;Ne.x>He.width||Ne.y>He.height||0>Ne.x+Ne.width||0>Ne.y+Ne.height||(Ne=Ee,Ee=Ee instanceof Dn?Ee:null,He=Ii.alloc(),He.set(ne),(Ee!==null?Ee.Cf(a,y,x,b,E,He):Fs(Ne,a,b,He))&&(y!==null&&(Ne=y(Ne)),Ne===null||x!==null&&!x(Ne)||E.add(Ne)),Ii.free(He))}}return te===void 0&&Ii.free(ne),b}return te===void 0&&Ii.free(ne),!1};function vv(a,y,x,b){for(var E=a.O.s,te=E.length;te--;){var ne=E[te];if(ne.visible){var se=ne.actualBounds,he=a.naturalBounds;se.x>he.width||se.y>he.height||0>se.x+se.width||0>se.y+se.height||(ne instanceof Dn&&vv(ne,y,x,b),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||b.add(ne))}}}$e.og=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;x===void 0&&(x=null),b===void 0&&(b=null);var ne=this.naturalBounds,se=this.se(),he=se?a:Un(ft.allocAt(a.x,a.y),this.transform),_e=se?y:Un(ft.allocAt(y.x,y.y),this.transform),Ee=he.Bf(_e),Ne=0<he.x&&he.x<ne.width&&0<he.y&&he.y<ne.height||Qn(he.x,he.y,0,0,0,ne.height)<=Ee||Qn(he.x,he.y,0,ne.height,ne.width,ne.height)<=Ee||Qn(he.x,he.y,ne.width,ne.height,ne.width,0)<=Ee||Qn(he.x,he.y,ne.width,0,0,0)<=Ee;if(ne=he.zd(0,0)<=Ee&&he.zd(0,ne.height)<=Ee&&he.zd(ne.width,0)<=Ee&&he.zd(ne.width,ne.height)<=Ee,se||(ft.free(he),ft.free(_e)),Ne){if(!this.isAtomic){he=ft.alloc(),_e=ft.alloc(),Ee=Oh(this);for(var He=this.O.s,Ye=He.length;Ye--;){var Qe=He[Ye];if(Qe.visible||Qe===Ee){var st=Qe.actualBounds,Pt=this.naturalBounds;(!se||!(st.x>Pt.width||st.y>Pt.height||0>st.x+st.width||0>st.y+st.height))&&(Qe.se()?(st=Qe.transform,Un(he.set(a),st),Un(_e.set(y),st)):(he.set(a),_e.set(y)),st=Qe,Qe=Qe instanceof Dn?Qe:null,(Qe!==null?Qe.og(he,_e,x,b,E,te):st.tx(he,_e,E))&&(x!==null&&(st=x(st)),st===null||b!==null&&!b(st)||te.add(st)))}}ft.free(he),ft.free(_e)}return E?Ne:ne}return!1};function yv(a){var y=null;return a instanceof ir&&(y=a.spot1,y===As&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=xr),y}function Sv(a){var y=null;return a instanceof ir&&(y=a.spot2,y===As&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=eo),y}$e.add=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];for(x=0;x<y.length;x++)this.Gb(this.O.count,y[x]);return this},$e.M=function(a){return this.O.M(a)},$e.Gb=function(a,y){y instanceof Ci&&Lt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Lt("Cannot make a Panel contain itself: "+this.toString()),Lt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Lt("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+y.toString()+", already contained by "+x.toString()+", cannot be shared by this Panel: "+this.toString()),this.na!==Dn.Grid||y instanceof ir||Lt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Dn.Graduated||y instanceof ir||y instanceof Lo||Lt("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+y),y.wi(this),y.Ng=null,this.itemArray!==null){var b=y.data;b!==null&&typeof b=="object"&&(this.ge===null&&(this.ge=new on),this.ge.add(b,y))}var E=this.O;if(b=-1,x===this){for(var te=-1,ne=this.O.s,se=ne.length,he=0;he<se;he++)if(ne[he]===y){te=he;break}if(te!==-1){if(te===a||te+1>=E.count&&a>=E.count)return;E.mb(te),b=te}else Lt("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>E.count)&&(a=E.count),E.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),kl(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Dn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||km(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof qn&&(x.Te=!0),x.Te&&x instanceof qn&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(Jo,"elements",this,y,null,b,null),x.cb(es,"elements",this,null,y,null,a)))};function xv(a,y){a.l=y?a.l|16777216:a.l&-16777217}$e.remove=function(a){for(var y=this.O.s,x=y.length,b=-1,E=0;E<x;E++)if(y[E]===a){b=E;break}b!==-1&&this.pc(b,!0)},$e.mb=function(a){0<=a&&this.pc(a,!0)},$e.pc=function(a,y){var x=this.O,b=x.M(a);if(b.Ng=null,b.wi(null),this.ge!==null){var E=b.data;typeof E=="object"&&this.ge.remove(E)}x.mb(a),Cs(this,!1),this.v(),this.$g===b&&(this.$g=null),this.graduatedIntervals=null;var te=this.part;te!==null&&(te.Rh=null,te.ag=NaN,te.Wb(),te instanceof qn&&(b instanceof Dn?b.qm(b,function(ne,se){Gv(te,se,y)}):Gv(te,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||te.cb(Jo,"elements",this,b,null,a,null))},$e.Fb=function(a){0>a&&Pn(a,">= 0",Dn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Es;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(es,"rowdefs",this,null,x,null,a)}return y[a]},$e.oA=function(a){if(0>a&&Pn(a,">= 0",Dn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(Jo,"rowdefs",this,x,null,a,null),this.v()}}};function c1(a,y,x){var b=a.rowDefs;if(!(0>y)){if(b[y]=x instanceof Es?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}$e.Eb=function(a){0>a&&Pn(a,">= 0",Dn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Es;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(es,"coldefs",this,null,x,null,a)}return y[a]},$e.jA=function(a){if(0>a&&Pn(a,">= 0",Dn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(Jo,"coldefs",this,x,null,a,null),this.v()}}};function d1(a,y,x){var b=a.colDefs;if(!(0>y)){if(b[y]=x instanceof Es?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}$e.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},$e.Hy=function(a,y){return(a=this.Fb(a))&&Tm(a,new Es(y)),this},$e.By=function(a,y){return(a=this.Eb(a))&&Tm(a,new Es(y)),this},$e.nz=function(a){if(0>a||this.type!==Dn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,b=x.length,E=this.topIndex;E<b;E++){var te=x[E];if(te!==void 0&&(y+=te.total,a<y))break}return E},$e.fz=function(a){if(0>a||this.type!==Dn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,b=x.length,E=this.leftIndex;E<b;E++){var te=x[E];if(te!==void 0&&(y+=te.total,a<y))break}return E},$e.Fz=function(a,y){if(y===void 0&&(y=new ft(NaN,NaN)),this.type!==Dn.Graduated)return y.h(NaN,NaN),y;a=Math.min(Math.max(a,this.graduatedMin),this.graduatedMax);var x=this.Pb();return x.geometry.Pu((a-this.graduatedMin)/this.graduatedRange,y),x.transform.Ga(y)},$e.Gz=function(a){if(this.type!==Dn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function f1(a){return a=a.allBindings,a!==null&&a._isFrozen}function nu(a){var y=a.allBindings;if(y===null)a.data!==null&&Lt("Template cannot have .data be non-null: "+a),a.allBindings=y=new Ln;else if(y._isFrozen)return;var x=new Ln;xv(a,!1),a.qm(a,function(_e,Ee){Ee.th();var Ne=Ee.localBindings;if(Ne!==null)for(Zd(Ee,!1),Ne=Ne.iterator;Ne.next();){var He=Ne.value;He.mode===bg&&Zd(Ee,!0);var Ye=He.sourceName;Ye!==null&&(Ye==="/"&&xv(_e,!0),Ye=LS(He,_e,Ee),Ye!==null&&(x.add(Ye),Ye.srcBindings===null&&(Ye.srcBindings=new Ln),Ye.srcBindings.add(He))),y.add(He)}if(Ee instanceof Dn&&Ee.type===Dn.Table){if(0<Ee.rowCount){for(_e=Ee.rowDefs,Ne=_e.length,He=0;He<Ne;He++)if(Ye=_e[He],Ye!==void 0&&Ye.be!==null)for(var Qe=Ye.be.iterator;Qe.next();){var st=Qe.value;st.xd=Ye,st.to=2,st.wl=Ye.index,y.add(st)}}if(0<Ee.columnCount){for(Ee=Ee.colDefs,_e=Ee.length,Ne=0;Ne<_e;Ne++)if(He=Ee[Ne],He!==void 0&&He.be!==null)for(Ye=He.be.iterator;Ye.next();)Qe=Ye.value,Qe.xd=He,Qe.to=1,Qe.wl=He.index,y.add(Qe)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){Zd(E,!0);for(var te=E.srcBindings.iterator;te.next();){var ne=te.value;E.localBindings===null&&(E.localBindings=new Ln),E.localBindings.add(ne)}}E.srcBindings=null}for(b=y.iterator;b.next();)if(E=b.value,te=E.xd,te!==null){E.xd=null;var se=E.targetProperty,he=se.indexOf(".");0<he&&te instanceof Dn&&(ne=se.substring(0,he),se=se.substr(he+1),he=te.fb(ne),he!==null?(te=he,E.targetProperty=se):Sn('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),te instanceof Es?(ne=sr(te.panel),E.Ai=ne===void 0?-1:ne,te.panel.bindingId=E.Ai):te instanceof Zt?(ne=sr(te),E.Ai=ne===void 0?-1:ne,te.bindingId=E.Ai):Lt("Unknown type of binding target: "+te)}y.freeze(),a instanceof Ci&&a.Zc()&&a.Va()}$e.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof Dn&&(x.allBindings=null,x.ub=null);var b=x.localBindings;b!==null&&(x.localBindings=null,b.each(function(E){x.bind(E.copy())})),b=x.animationTriggers,b!==null&&(x.animationTriggers=null,b.each(function(E){x.Jv(E.value.copy())}))}),a&&nu(y),y},$e.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,b=x.sourceProperty;if((a===""||b===""||b===a)&&(b=x.targetProperty,x.converter!==null||b!=="")){b=this.data;var E=x.sourceName;if(E!==null){if(E==="")b=this;else if(E==="/")b=this;else if(E===".")b=this;else if(E==="..")b=this;else if(b=this.fb(E),b===null)continue}else if(x.isToModel)if(b=this.diagram,b!==null)b=b.model.modelData;else continue;var te=this,ne=x.Ai;if(ne!==-1){if(te=this.ks(ne),te===null)continue}else x.xd!==null&&(te=x.xd);if(E==="/"?b=te.part:E==="."?b=te:E===".."&&(b=te.panel),E=x.to,E!==0){if(!(te instanceof Dn))continue;E===1?te=te.Eb(x.wl):E===2&&(te=te.Fb(x.wl))}te!==void 0&&x.Mv(te,b)}}},$e.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function Sx(a,y){a=a.O.s;for(var x=a.length,b=y.length,E=0,te=null;E<x&&(te=a[E],!(te instanceof Dn&&te.data!==null));)E++,te=a[E];if(x-E!==b)return!0;if(te===null)return 0<b;for(var ne=0;E<x&&ne<b;){if(te=a[E],!(te instanceof Dn)||te.data!==y[ne])return!0;E++,ne++}return!1}function tg(a){if(a.type===Dn.Spot||a.type===Dn.Auto)return Math.min(a.O.length,1);if(a.type===Dn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof ir&&b.isPanelMain))break}return x}return a.type===Dn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Dn&&Qh(a))?1:0}$e.mv=function(){for(var a=tg(this);this.O.length>a;)this.pc(this.O.length-1,!1);p1(this,this.itemArray)};function p1(a,y){var x=tg(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 b=0;b<x;b++)Mm(a,y[b],b,!0)}else{b=x;for(var E=0;E<y.length;E++,b++){var te=y[E],ne=b<a.O.length?a.O.M(b):null;if(ne instanceof Dn){if(ne.data!==te){var se=_v(a,ne.data),he=_v(a,te),_e=he!==se;_e||(se=bv(a,se),_e=bv(a,he)!==se),_e?(a.pc(b,!1),Mm(a,te,E,!1)):ne.data=te}}else Mm(a,te,E,!1)}for(;b<a.O.length;)a.pc(b,!1);a.$g=null,wv(a,x,0),kl(a)||a.v(),a.graduatedIntervals=null,a.If()||km(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof qn&&(y.Te=!0),y.Te&&y instanceof qn&&(y.wc=null))}}function Mm(a,y,x,b){if(!(y==null||0>x)){var E=_v(a,y);if(E=bv(a,E),E!==null){if(nu(E),E=E.copy(),E.l&16777216){var te=a.ih();te!==null&&xv(te,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new on),a.ge.add(y,E)),te=x+tg(a),a.Gb(te,E),b&&(E.ub=y,wv(a,te,x),E.ub=null),E.data=y}}}function wv(a,y,x){for(a=a.O;y<a.length;){var b=a.M(y);if(b instanceof Dn){var E=y,te=x;b.type===Dn.TableRow?b.row=E:b.type===Dn.TableColumn&&(b.column=E),b.itemIndex=te}y++,x++}}function _v(a,y){if(y===null)return"";if(a=a.itemCategoryProperty,typeof a=="function")a=a(y);else if(typeof a=="string"&&typeof y=="object"){if(a==="")return"";a=ds(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Lt("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function bv(a,y){var x=a.itemTemplateMap,b=null;return x!==null&&(b=x.I(y)),b===null&&(x!==null&&(b=x.I("")),b===null&&(g1||(g1=!0,Sn('No item template Panel found for category "'+y+'" on '+a),Sn(" Using default item template."),a=new Dn,y=new Lo,y.bind(new ms("text","",wi)),a.add(y),m1=a),b=m1)),b}function km(a,y,x){var b=y.enabledChanged;if(b!==null&&b(y,x),y instanceof Dn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var te=y[E];x&&te instanceof Dn&&!te.isEnabled||km(a,te,x)}}}function Yu(a,y){y.name=a,mu.add(a,y)}ot.Object.defineProperties(Dn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Dn.Grid,this.v(),this.g("type",y,a))}},elements:{get:function(){return this.O.iterator}},naturalBounds:{get:function(){return this.dc}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"?(0>a&&Pn(a,">= 0",Dn,"padding"),a=new nr(a)):(0>a.left&&Pn(a.left,">= 0",Dn,"padding:value.left"),0>a.right&&Pn(a.right,">= 0",Dn,"padding:value.right"),0>a.top&&Pn(a.top,">= 0",Dn,"padding:value.top"),0>a.bottom&&Pn(a.bottom,">= 0",Dn,"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:zs},set:function(a){typeof a=="number"&&(a=new nr(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new Hl),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 no)&&(a instanceof no&&a.freeze(),this.T===null&&(this.T=new Hl),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 Hl),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,b=0,E=0;E<x;E++){var te=a[E];typeof te=="number"&&0<=te&&isFinite(te)||Lt("defaultRowSeparatorDashArray value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Hl),this.T.V=a,this.N(),this.g("defaultRowSeparatorDashArray",y,a)}}},defaultColumnSeparatorStroke:{get:function(){return this.T!==null?this.T.u:null},set:function(a){var y=this.defaultColumnSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof no)&&(a instanceof no&&a.freeze(),this.T===null&&(this.T=new Hl),this.T.u=a,this.N(),this.g("defaultColumnSeparatorStroke",y,a))}},defaultColumnSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.F:1},set:function(a){var y=this.defaultColumnSeparatorStrokeWidth;y!==a&&isFinite(a)&&0<=a&&(this.T===null&&(this.T=new Hl),this.T.F=a,this.v(),this.g("defaultColumnSeparatorStrokeWidth",y,a))}},defaultColumnSeparatorDashArray:{get:function(){return this.T!==null?this.T.o:null},set:function(a){var y=this.defaultColumnSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var te=a[E];typeof te=="number"&&0<=te&&isFinite(te)||Lt("defaultColumnSeparatorDashArray value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Hl),this.T.o=a,this.N(),this.g("defaultColumnSeparatorDashArray",y,a)}}},inRowsCols:{get:function(){return this.T!==null?this.T.nb:null},set:function(a){this.T===null&&(this.T=new Hl),this.T.nb=a}},viewboxStretch:{get:function(){return this.xo},set:function(a){var y=this.xo;y!==a&&(this.xo=a,this.v(),this.g("viewboxStretch",y,a))}},gridCellSize:{get:function(){return this.jn},set:function(a){var y=this.jn;if(!y.D(a)){a.w()&&a.width!==0&&a.height!==0||Lt("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Zu(x),this.N(),this.g("gridCellSize",y,a)}}},gridOrigin:{get:function(){return this.kn},set:function(a){var y=this.kn;if(!y.D(a)){a.w()||Lt("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Zu(x),this.N(),this.g("gridOrigin",y,a)}}},graduatedMin:{get:function(){return this.ra!==null?this.ra.lq:0},set:function(a){var y=this.graduatedMin;y!==a&&(this.ra===null&&(this.ra=new Ih),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),la(this)&&(a=this.part,a!==null&&Bo(this,a,"graduatedRange")))}},graduatedMax:{get:function(){return this.ra!==null?this.ra.F:100},set:function(a){var y=this.graduatedMax;y!==a&&(this.ra===null&&(this.ra=new Ih),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),la(this)&&(a=this.part,a!==null&&Bo(this,a,"graduatedRange")))}},graduatedRange:{get:function(){return this.graduatedMax-this.graduatedMin}},graduatedTickUnit:{get:function(){return this.ra!==null?this.ra.ia:10},set:function(a){var y=this.graduatedTickUnit;y!==a&&0<a&&(this.ra===null&&(this.ra=new Ih),this.ra.ia=a,this.v(),this.g("graduatedTickUnit",y,a))}},graduatedTickBase:{get:function(){return this.ra!==null?this.ra.V:0},set:function(a){var y=this.graduatedTickBase;y!==a&&(this.ra===null&&(this.ra=new Ih),this.ra.V=a,this.v(),this.g("graduatedTickBase",y,a))}},graduatedMarks:{get:function(){return this.ra!==null?this.ra.u:null},set:function(a){this.ra!==null?this.ra.u=a:a!==null&&(this.ra=new Ih,this.ra.u=a)}},graduatedBounds:{get:function(){return this.ra!==null?this.ra.j:null},set:function(a){this.ra!==null?this.ra.j=a:a!==null&&(this.ra=new Ih,this.ra.j=a)}},graduatedIntervals:{get:function(){return this.ra!==null?this.ra.o:null},set:function(a){this.ra!==null?this.ra.o=a:a!==null&&(this.ra=new Ih,this.ra.o=a)}},temporaryTextBlock:{get:function(){return this.ra!==null?this.ra.Zh:null},set:function(a){this.ra!==null?this.ra.Zh=a:a!==null&&(this.ra=new Ih,this.ra.Zh=a)}},panelLayoutState:{get:function(){return this.F},set:function(a){this.F=a}},Te:{get:function(){return(this.l&8388608)!==0},set:function(a){(this.l&8388608)!==0!==a&&(this.l^=8388608)}},rowDefs:{get:function(){return this.T===null&&(this.T=new Hl),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new Hl),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:Nm},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new Hl),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:Nm},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new Hl),this.T.j=a,this.v(),this.g("columnSizing",y,a))}},topIndex:{get:function(){return this.T!==null?this.T.Hb:0},set:function(a){var y=this.topIndex;y!==a&&((!isFinite(a)||0>a)&&Lt("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Hl),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)&&Lt("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Hl),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 Ci&&!(this instanceof Fr);nu(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof Bn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Ci&&(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),b!==null&&b.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 Vd),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&Sx(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&uy(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&ly(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||p1(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 on}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Ci||a.isPanelMain)&&Lt("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(););ar(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&&(ar(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 Ki&&(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&&km(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))}}}),ot.Object.defineProperties(Dn,{Position:{get:function(){return mu.I("Position")}},Horizontal:{get:function(){return mu.I("Horizontal")}},Vertical:{get:function(){return mu.I("Vertical")}},Spot:{get:function(){return mu.I("Spot")}},Auto:{get:function(){return mu.I("Auto")}},Table:{get:function(){return mu.I("Table")}},Viewbox:{get:function(){return mu.I("Viewbox")}},TableRow:{get:function(){return mu.I("TableRow")}},TableColumn:{get:function(){return mu.I("TableColumn")}},Link:{get:function(){return mu.I("Link")}},Grid:{get:function(){return mu.I("Grid")}},Graduated:{get:function(){return mu.I("Graduated")}}}),Dn.prototype.rebuildItemElements=Dn.prototype.mv,Dn.prototype.findItemPanelForData=Dn.prototype.sx,Dn.prototype.updateTargetBindings=Dn.prototype.La,Dn.prototype.copyTemplate=Dn.prototype.Uy,Dn.prototype.graduatedValueForPoint=Dn.prototype.Gz,Dn.prototype.graduatedPointForValue=Dn.prototype.Fz,Dn.prototype.findColumnForLocalX=Dn.prototype.fz,Dn.prototype.findRowForLocalY=Dn.prototype.nz,Dn.prototype.addColumnDefinition=Dn.prototype.By,Dn.prototype.addRowDefinition=Dn.prototype.Hy,Dn.prototype.addRowColumnDefinition=Dn.prototype.Gy,Dn.prototype.removeColumnDefinition=Dn.prototype.jA,Dn.prototype.getColumnDefinition=Dn.prototype.Eb,Dn.prototype.removeRowDefinition=Dn.prototype.oA,Dn.prototype.getRowDefinition=Dn.prototype.Fb,Dn.prototype.removeAt=Dn.prototype.mb,Dn.prototype.remove=Dn.prototype.remove,Dn.prototype.insertAt=Dn.prototype.Gb,Dn.prototype.elt=Dn.prototype.M,Dn.prototype.add=Dn.prototype.add,Dn.prototype.findObject=Dn.prototype.fb,Dn.prototype.findInVisualTree=Dn.prototype.Nl,Dn.prototype.walkVisualTreeFrom=Dn.prototype.qm,Dn.prototype.findMainElement=Dn.prototype.Pb;var g1=!1,m1=null,mu=new on;Dn.className="Panel",Dn.definePanelLayout=Yu,Yu("Position",new mm),Yu("Vertical",new ym),Yu("Auto",new xm),Yu("Link",new Em);function Ih(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Ih.prototype.copy=function(){var a=new Ih;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},Ih.className="GradPanelSettings";function Hl(){this.Pc=[],this.Oc=[],this.j=this.ob=Nm,this.hb=this.Hb=0,this.Qp=zs,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}Hl.prototype.copy=function(a){for(var y=new Hl,x=this.Pc,b=x.length,E=y.Pc,te=0;te<b;te++)if(x[te]!==void 0){var ne=x[te].copy();ne.wi(a),E[te]=ne}for(x=this.Oc,b=x.length,E=y.Oc,te=0;te<b;te++)x[te]!==void 0&&(ne=x[te].copy(),ne.wi(a),E[te]=ne);return y.ob=this.ob,y.j=this.j,y.Hb=this.Hb,y.hb=this.hb,y.Qp=this.Qp.J(),y.Ha=this.Ha,y.ia=this.ia,y.V=this.V,y.F=this.F,y.u=this.u,y.o=this.o,y.nb=this.nb,y},Hl.className="TablePanelSettings";function Es(a){Di(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=As,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Pv,this.hg=Xi,this.lo=this.dg=null,this.mo=NaN,this.Ma=this.tj=null,this.Pm=!1,a&&(Object.assign(this,a),a.column!==void 0?(this.isRow=!1,this.index=a.column):a.row!==void 0&&(this.isRow=!0,this.index=a.row))}Es.prototype.copy=function(){var a=new Es;return a.uq=this.uq,a.Za=this.Za,a.Hc=this.Hc,a.jj=this.jj,a.hj=this.hj,a.Jb=this.Jb,a.oa=this.oa,a.oc=this.oc,a.pa=this.pa,a.hg=this.hg,a.oo=this.oo,this.dg===null?a.dg=null:a.dg=this.dg.J(),a.lo=this.lo,a.mo=this.mo,a.tj=null,this.tj!==null&&(a.separatorDashArray=Hn(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Tm(a,y){y.isRow?a.height=y.height:a.width=y.width,a.minimum=y.minimum,a.maximum=y.maximum,a.alignment=y.alignment,a.stretch=y.stretch,a.sizing=y.sizing,a.dg=y.separatorPadding===null?null:y.separatorPadding.J(),a.separatorStroke=y.separatorStroke,a.separatorStrokeWidth=y.separatorStrokeWidth,a.tj=null,y.separatorDashArray&&(a.tj=Hn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}$e=Es.prototype,$e.qb=function(a){a.classType===Es&&(this.sizing=a)},$e.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+sr(this)},$e.wi=function(a){this.Me=a},$e.Io=function(a){var y=0,x=this.Me;if(this.index!==a&&(a=this.separatorStroke,a===null&&x!==null&&(a=this.isRow?x.defaultRowSeparatorStroke:x.defaultColumnSeparatorStroke),a!==null&&(y=this.separatorStrokeWidth,isNaN(y)&&(x!==null?y=this.isRow?x.defaultRowSeparatorStrokeWidth:x.defaultColumnSeparatorStrokeWidth:y=0))),a=this.dg,a===null)if(x!==null)a=x.defaultSeparatorPadding;else return y;return y+(this.isRow?a.top:a.left)},$e.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===Dn.Table)for(var E=b?y.rowDefs.length:y.colDefs.length,te=0;te<E;te++){var ne=b?y.rowDefs[te]:y.colDefs[te];if(ne!==void 0&&ne.oa!==0){x=ne.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=b?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=b?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),b=this.dg,b===null)if(y!==null)b=y.defaultSeparatorPadding;else return a;return a+(this.isRow?b.top+b.bottom:b.left+b.right)},$e.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(Ro,a,this,y,x,void 0,void 0),this.be!==null&&(y=b.diagram,y!==null&&!y.skipsModelSourceBindings&&(b=b.ih(),b!==null&&(y=b.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,b)};function Am(a){if(a.sizing===Pv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}$e.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new ms(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&f1(y)&&Lt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new Ln),this.be.add(E),this},ot.Object.defineProperties(Es.prototype,{panel:{get:function(){return this.Me}},isRow:{get:function(){return this.uq},set:function(a){this.uq=a}},index:{get:function(){return this.Za},set:function(a){this.Za=a}},height:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&Pn(a,">= 0",Es,"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&&Pn(a,">= 0",Es,"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))&&Pn(a,">= 0",Es,"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&&Pn(a,">= 0",Es,"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 nr(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&&Yd(a,"RowColumnDefinition.separatorStroke"),a instanceof no&&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,b=0,E=0;E<x;E++){var te=a[E];typeof te=="number"&&0<=te&&isFinite(te)||Lt("separatorDashArray value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.tj=a,this.panel!==null&&this.panel.N(),this.Ob("separatorDashArray",y,a)}}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&Yd(a,"RowColumnDefinition.background"),a instanceof no&&a.freeze(),this.Ma=a,this.panel!==null&&this.panel.N(),this.Ob("background",y,a))}},coversSeparators:{get:function(){return this.Pm},set:function(a){var y=this.Pm;y!==a&&(this.Pm=a,this.panel!==null&&this.panel.N(),this.Ob("coversSeparators",y,a))}},sizing:{get:function(){return this.oo},set:function(a){var y=this.oo;y!==a&&(this.oo=a,this.panel!==null&&this.panel.v(),this.Ob("sizing",y,a))}},actual:{get:function(){return this.oa},set:function(a){this.oa=isNaN(this.Hc)?Math.max(Math.min(this.hj,a),this.jj):Math.max(Math.min(this.hj,this.Hc),this.jj)}},measured:{get:function(){return this.oc},set:function(a){this.oc=a}},total:{get:function(){return this.oa+this.Wc()}},position:{get:function(){return this.pa},set:function(a){this.pa=a}}}),Es.prototype.computeEffectiveSpacing=Es.prototype.Wc,Es.prototype.computeEffectiveSpacingTop=Es.prototype.Io;var Pv=new nn(Es,"Default",0),ng=new nn(Es,"None",1),Nm=new nn(Es,"ProportionalExtra",2);Es.className="RowColumnDefinition",Es.Default=Pv,Es.None=ng,Es.ProportionalExtra=Nm;function ir(a,y){Zt.call(this),this.Rd=this.ua=null,this.an="None",this.xc=this.Ui="black",this.ig=1,this.Na=this.Yg=null,this.Vn=this.Un=NaN,this.fa=null,typeof a=="string"?this.figure=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}Je(ir,Zt),ir.prototype.cloneProtected=function(a){Zt.prototype.cloneProtected.call(this,a),a.ua=this.ua,a.Rd=this.Rd,a.an=this.an,a.Ui=this.Ui,a.xc=this.xc,a.ig=this.ig,this.Yg!==null&&(a.Yg=Hn(this.Yg)),this.Na!==null&&(a.Na=this.Na.nc?this.Na:this.Na.copy()),a.Un=this.Un,a.Vn=this.Vn,this.fa!==null&&(a.fa=this.fa.copy())};function md(a){a.Na===null?a.Na=new Lv:a.Na.nc&&(a.Na=a.Na.copy())}$e=ir.prototype,$e.th=function(){Zt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},$e.qb=function(a){a===Cn||a===fi||a===Pr||a===Xi?this.geometryStretch=a:Zt.prototype.qb.call(this,a)},$e.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+sr(this)};function jf(a,y,x,b){var E=x.length;if(!(4>E)){var te=b.measuredBounds,ne=Math.max(1,te.width);te=te.height;for(var se=x[0],he=x[1],_e,Ee,Ne,He,Ye,Qe,st=0,Pt=Wn(),St=2;St<E;St+=2)_e=x[St],Ee=x[St+1],Ne=_e-se,se=Ee-he,Ne===0&&(Ne=.001),He=se/Ne,Ye=Math.atan2(se,Ne),Qe=Math.sqrt(Ne*Ne+se*se),Pt.push([Ne,Ye,He,Qe]),st+=Qe,se=_e,he=Ee;se=x[0],he=x[1],Ne=b.measuredBounds.width,b instanceof ir&&(Ne-=b.strokeWidth),1>Ne&&(Ne=1),E=x=Ne,_e=ne/2,Ee=_e!==0,St=0,Qe=Pt[St],Ne=Qe[0],Ye=Qe[1],He=Qe[2],Qe=Qe[3];for(var Tt=0;.1<=st;){if(Tt===0&&(Ee?(E=x,E-=_e,st-=_e,Ee=!1):E=x,E===0&&(E=1)),E>st){zn(Pt);return}E>Qe?(Tt=E-Qe,E=Qe):Tt=0;var At=Math.sqrt(E*E/(1+He*He));if(0>Ne&&(At=-At),se+=At,he+=He*At,a.translate(se,he),a.rotate(Ye),a.translate(-(ne/2),-(te/2)),Tt===0&&b.hh(a,y),a.translate(ne/2,te/2),a.rotate(-Ye),a.translate(-se,-he),st-=E,Qe-=E,Tt!==0){if(St++,St===Pt.length){zn(Pt);return}Qe=Pt[St],Ne=Qe[0],Ye=Qe[1],He=Qe[2],Qe=Qe[3],E=Tt}}zn(Pt)}}$e.hh=function(a,y){var x=this.xc,b=this.Ui;if(x!==null||b!==null){var E=this.ua;if(E!==null){a.yc();var te=this.actualBounds,ne=this.naturalBounds;b!==null&&os(this,a,b,!0,!1,ne,te);var se=this.part,he=this.ig;if(x===null||he!==0||se===null||!this.isPanelMain&&se.Pb()!==this||(he=se.type===Dn.Link&&se instanceof Fr&&se.category==="Selection"&&se.adornedObject instanceof ir&&se.adornedPart.Pb()===se.adornedObject?se.adornedObject.strokeWidth:0),he===0&&(x=null),x!==null&&he!==0&&(os(this,a,x,!1,!1,ne,te),a.lineWidth=he,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),te=!1,se&&y.Gf("drawShadows")&&(te=se.isShadowed),a.Il===!1&&(te=!1),se=!0,x===null||b!==null&&b!=="transparent"||(se=!1),ne=!1,he=this.strokeDashArray,he!==null&&(ne=!0,a.js(he,this.strokeDashOffset)),E.type===In.j)a.beginPath(),a.moveTo(E.startX,E.startY),a.lineTo(E.endX,E.endY),x!==null&&a.jk(),a.Se();else if(E.type===In.u){var _e=E.startX;he=E.startY;var Ee=E.endX,Ne=E.endY;E=Math.min(_e,Ee);var He=Math.min(he,Ne);_e=Math.abs(Ee-_e),he=Math.abs(Ne-he),a.beginPath(),a.rect(E,He,_e,he),b!==null&&a.ng(b),x!==null&&(se&&te&&ch(a),a.jk(),se&&te&&Ah(a)),a.Se()}else if(E.type===In.F)_e=E.startX,he=E.startY,Ee=E.endX,Ne=E.endY,E=Math.abs(Ee-_e)/2,He=Math.abs(Ne-he)/2,_e=Math.min(_e,Ee)+E,he=Math.min(he,Ne)+He,a.beginPath(),a.moveTo(_e,he-He),a.bezierCurveTo(_e+Vt.wg*E,he-He,_e+E,he-Vt.wg*He,_e+E,he),a.bezierCurveTo(_e+E,he+Vt.wg*He,_e+Vt.wg*E,he+He,_e,he+He),a.bezierCurveTo(_e-Vt.wg*E,he+He,_e-E,he+Vt.wg*He,_e-E,he),a.bezierCurveTo(_e-E,he-Vt.wg*He,_e-Vt.wg*E,he-He,_e,he-He),a.closePath(),b!==null&&a.ng(b),x!==null&&(se&&te&&ch(a),a.jk(),se&&te&&Ah(a)),a.Se();else if(E.type===In.o)for(E=E.figures,he=E.length,He=0;He<he;He++){_e=E.s[He],a.beginPath(),a.moveTo(_e.startX,_e.startY),Ee=_e.segments.s,Ne=Ee.length;for(var Ye=null,Qe=0;Qe<Ne;Qe++){var st=Ee[Qe];switch(st.type){case gs:a.moveTo(st.endX,st.endY);break;case to:a.lineTo(st.endX,st.endY);break;case bs:a.bezierCurveTo(st.point1X,st.point1Y,st.point2X,st.point2Y,st.endX,st.endY);break;case Da:a.quadraticCurveTo(st.point1X,st.point1Y,st.endX,st.endY);break;case Xo:if(st.radiusX===st.radiusY){var Pt=Math.PI/180;a.arc(st.point1X,st.point1Y,st.radiusX,st.startAngle*Pt,(st.startAngle+st.sweepAngle)*Pt,0>st.sweepAngle,Ye!==null?Ye.endX:_e.startX,Ye!==null?Ye.endY:_e.startY)}else if(Ye=va(st,_e),Pt=Ye.length,Pt===0)a.lineTo(st.centerX,st.centerY);else for(var St=0;St<Pt;St++){var Tt=Ye[St];St===0&&a.lineTo(Tt[0],Tt[1]),a.bezierCurveTo(Tt[2],Tt[3],Tt[4],Tt[5],Tt[6],Tt[7])}break;case Ka:if(St=Pt=0,Ye!==null&&Ye.type===Xo){if(Ye=va(Ye,_e),Tt=Ye.length,Tt===0){a.lineTo(st.endX,st.endY);break}Ye=Ye[Tt-1]||null,Ye!==null&&(Pt=Ye[6],St=Ye[7])}else Pt=Ye!==null?Ye.endX:_e.startX,St=Ye!==null?Ye.endY:_e.startY;if(Ye=Is(st,_e,Pt,St),Pt=Ye.length,Pt===0){a.lineTo(st.endX,st.endY);break}for(St=0;St<Pt;St++)Tt=Ye[St],a.bezierCurveTo(Tt[2],Tt[3],Tt[4],Tt[5],Tt[6],Tt[7]);break;default:Lt("Segment not of valid type: "+st.type)}st.isClosed&&a.closePath(),Ye=st}Ee=_e.isFilled,te?_e.isShadowed?(Ee===!0&&b!=="transparent"&&b!==null&&a.ng(b,_e.isEvenOdd),x!==null&&(Ee&&se&&ch(a),a.jk(),Ee&&se&&Ah(a))):(ch(a),Ee&&b!=="transparent"&&b!==null&&a.ng(b,_e.isEvenOdd),x!==null&&a.jk(),Ah(a)):(Ee&&b!==null&&a.ng(b,_e.isEvenOdd),x!==null&&a.jk()),a.Se(He)}if(ne&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),b=x.measuredBounds,x.arrange(0,0,b.width,b.height),te=this.geometry,a.save(),a.beginPath(),b=Wn(),te.type===In.j)b.push(te.startX),b.push(te.startY),b.push(te.endX),b.push(te.endY),jf(a,y,b,x);else if(te.type===In.o)for(te=te.figures.iterator;te.next();){for(se=te.value,b.length=0,b.push(se.startX),b.push(se.startY),ne=se.startX,E=se.startY,he=ne,He=E,_e=se.segments.s,Ee=_e.length,Ne=0;Ne<Ee;Ne++){switch(Qe=_e[Ne],Qe.type){case gs:jf(a,y,b,x),b.length=0,b.push(Qe.endX),b.push(Qe.endY),ne=Qe.endX,E=Qe.endY,he=ne,He=E;break;case to:b.push(Qe.endX),b.push(Qe.endY),ne=Qe.endX,E=Qe.endY;break;case bs:Vt.Qe(ne,E,Qe.point1X,Qe.point1Y,Qe.point2X,Qe.point2Y,Qe.endX,Qe.endY,.5,b),ne=Qe.endX,E=Qe.endY;break;case Da:Vt.ep(ne,E,Qe.point1X,Qe.point1Y,Qe.endX,Qe.endY,.5,b),ne=Qe.endX,E=Qe.endY;break;case Xo:if(st=va(Qe,se),Ye=st.length,Ye===0){b.push(Qe.centerX),b.push(Qe.centerY),ne=Qe.centerX,E=Qe.centerY;break}for(Pt=0;Pt<Ye;Pt++)St=st[Pt],Vt.Qe(ne,E,St[2],St[3],St[4],St[5],St[6],St[7],.5,b),ne=St[6],E=St[7];break;case Ka:if(st=Is(Qe,se,ne,E),Ye=st.length,Ye===0){b.push(Qe.endX),b.push(Qe.endY),ne=Qe.endX,E=Qe.endY;break}for(Pt=0;Pt<Ye;Pt++)St=st[Pt],Vt.Qe(ne,E,St[2],St[3],St[4],St[5],St[6],St[7],.5,b),ne=St[6],E=St[7];break;default:Lt("Segment not of valid type: "+Qe.type)}Qe.isClosed&&(b.push(he),b.push(He),jf(a,y,b,x))}jf(a,y,b,x)}else if(te.type===In.u)b.push(te.startX),b.push(te.startY),b.push(te.endX),b.push(te.startY),b.push(te.endX),b.push(te.endY),b.push(te.startX),b.push(te.endY),b.push(te.startX),b.push(te.startY),jf(a,y,b,x);else if(te.type===In.F){if(E=new ps,E.startX=te.endX,E.startY=(te.startY+te.endY)/2,ne=new Rr(Xo),ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(te.startX+te.endX)/2,ne.centerY=(te.startY+te.endY)/2,ne.radiusX=Math.abs(te.startX-te.endX)/2,ne.radiusY=Math.abs(te.startY-te.endY)/2,E.add(ne),te=va(ne,E),se=te.length,se===0)b.push(ne.centerX),b.push(ne.centerY);else for(ne=E.startX,E=E.startY,he=0;he<se;he++)He=te[he],Vt.Qe(ne,E,He[2],He[3],He[4],He[5],He[6],He[7],.5,b),ne=He[6],E=He[7];jf(a,y,b,x)}zn(b),a.restore(),a.Vc(!1)}}}},$e.kk=function(a,y,x){return!Zt.prototype.kk.call(this,a,y,x)||this.xc===null&&this.Ui===null||this.ua===null||this.pathPattern!==null||this.geometry.figures.length!==this.svg.getElementsByTagName("path").length?!1:(a.Hl=this.svg,this.hh(a,y),a.Hl=null,!0)},$e.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:Zt.prototype.nk.call(this,a)},$e.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("path");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},$e.ga=function(a,y){if(y===void 0&&(y=new ft),a instanceof ui){a.Mc()&&Lt("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var x=this.naturalBounds,b=this.strokeWidth;y.h(a.x*(x.width+b)-b/2+x.x+a.offsetX,a.y*(x.height+b)-b/2+x.y+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},$e.mi=function(a){a===void 0&&(a=new sn);var y=this.naturalBounds,x=this.oe;y=sn.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=ft.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),br(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),br(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),br(a,b.x,b.y,0,0),sn.free(y),ft.free(b),a},$e.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var b=x.bounds,E=this.strokeWidth/2;x.type!==In.j||y||(E+=2);var te=sn.alloc();if(te.assign(b),te.Bc(E+2,E+2),!te.ca(a))return sn.free(te),!1;if(b=E+1e-4,x.type===In.j)return this.stroke===null||(b=(x.endX-x.startX)*(a.x-x.startX)+(x.endY-x.startY)*(a.y-x.startY),0>(x.startX-x.endX)*(a.x-x.endX)+(x.startY-x.endY)*(a.y-x.endY)||0>b)?!1:(sn.free(te),Vt.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===In.u){y=x.startX;var ne=x.startY,se=x.endX;if(x=x.endY,te.x=Math.min(y,se),te.y=Math.min(ne,x),te.width=Math.abs(se-y),te.height=Math.abs(x-ne),this.fill===null){if(te.Bc(-b,-b),te.ca(a))return sn.free(te),!1;te.Bc(b,b)}return this.stroke!==null&&te.Bc(E,E),a=te.ca(a),sn.free(te),a}if(x.type===In.F){ne=x.startX,E=x.startY,se=x.endX;var he=x.endY;if(x=Math.min(ne,se),y=Math.min(E,he),ne=Math.abs(se-ne)/2,E=Math.abs(he-E)/2,x=a.x-(x+ne),y=a.y-(y+E),this.fill===null){if(ne-=b,E-=b,0>=ne||0>=E||1>=x*x/(ne*ne)+y*y/(E*E))return sn.free(te),!1;ne+=b,E+=b}return this.stroke!==null&&(ne+=b,E+=b),sn.free(te),0>=ne||0>=E?!1:1>=x*x/(ne*ne)+y*y/(E*E)}if(x.type===In.o)return sn.free(te),this.fill===null?rl(x,a.x,a.y,E):Ns(x,a,E,1<this.strokeWidth,y);Lt("Unknown Geometry type: "+x.type)},$e.Wl=function(a,y,x,b){var E=this.desiredSize,te=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var ne=this.geometry.bounds;else{var se=this.figure,he=Ev[se];if(he===void 0){var _e=Vt.Ze[se];typeof _e=="string"&&(_e=Vt.Ze[_e]),typeof _e=="function"?(he=_e(null,100,100),Ev[se]=he):Lt("Unsupported Figure: "+se)}ne=he.bounds}se=ne.width,he=ne.height,_e=ne.width;var Ee=ne.height;switch(qa(this,!0)){case Cn:b=x=0;break;case Tn:_e=Math.max(a-te,0),Ee=Math.max(y-te,0);break;case xi:_e=Math.max(a-te,0),b=0;break;case Ai:x=0,Ee=Math.max(y-te,0)}isFinite(E.width)&&(_e=E.width),isFinite(E.height)&&(Ee=E.height);var Ne=this.maxSize,He=this.minSize;switch(x=Math.max(x-te,He.width),b=Math.max(b-te,He.height),_e=Math.min(Ne.width,_e),Ee=Math.min(Ne.height,Ee),_e=isFinite(_e)?Math.max(x,_e):Math.max(se,x),Ee=isFinite(Ee)?Math.max(b,Ee):Math.max(he,b),x=Cv(this),x){case Cn:break;case Tn:se=_e,he=Ee;break;case fi:x=Math.min(_e/se,Ee/he),isFinite(x)||(x=1),se*=x,he*=x;break;default:Lt(x+" is not a valid geometryStretch.")}this.Rd!==null?(se===0&&(se=.001),he===0&&(he=.001),x=this.Rd!==null?this.Rd:this.ua,ne=x.bounds,b=se/ne.width,ne=he/ne.height,isFinite(b)||(b=1),isFinite(ne)||(ne=1),this.ua=b===1&&ne===1?x:x.copy().scale(b,ne)):this.ua!==null&&Vt.$(this.ua.Sk,a-te)&&Vt.$(this.ua.Rk,y-te)||(this.ua=ir.makeGeometry(this,se,he)),ne=this.ua.bounds,a===1/0||y===1/0?this.Ge(ne.x-te/2,ne.y-te/2,a===0&&se===0?0:ne.width+te,y===0&&he===0?0:ne.height+te):this.Ge(-(te/2),-(te/2),_e+te,Ee+te),E.w()?(_e=E.width,Ee=E.height,_e=Math.min(Ne.width,_e),Ee=Math.min(Ne.height,Ee),_e=Math.max(He.width,_e),Ee=Math.max(He.height,Ee),this.dc.h(0,0,_e,Ee)):this.dc.assign(ne)};function Cv(a){var y=a.geometryStretch;return a.Rd!==null?y===Xi?Tn:y:y===Xi?Ev[a.figure].defaultStretch:y}$e.eh=function(a,y,x,b){La(this,a,y,x,b)},$e.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},$e.Sj=function(a,y,x,b,E){var te=this.transform,ne=1/(te.m11*te.m22-te.m12*te.m21),se=te.m22*ne,he=-te.m12*ne,_e=-te.m21*ne,Ee=te.m11*ne,Ne=ne*(te.m21*te.dy-te.m22*te.dx),He=ne*(te.m12*te.dx-te.m11*te.dy);te=a*se+y*_e+Ne,ne=a*he+y*Ee+He,se=x*se+b*_e+Ne,he=x*he+b*Ee+He,Ne=this.ig/2,_e=this.ua,_e===null&&(this.measure(1/0,1/0),_e=this.ua);var Ye=_e.bounds;if(Ee=!1,_e.type===In.j)if(1.5>=this.strokeWidth)Ee=Vt.Ve(_e.startX,_e.startY,_e.endX,_e.endY,te,ne,se,he,E);else{if(_e.startX===_e.endX?(b=Ne,Ee=0):(y=(_e.endY-_e.startY)/(_e.endX-_e.startX),Ee=Ne/Math.sqrt(1+y*y),b=Ee*y),y=Wn(),a=new ft,Vt.Ve(_e.startX+b,_e.startY+Ee,_e.endX+b,_e.endY+Ee,te,ne,se,he,a)&&y.push(a),a=new ft,Vt.Ve(_e.startX-b,_e.startY-Ee,_e.endX-b,_e.endY-Ee,te,ne,se,he,a)&&y.push(a),a=new ft,Vt.Ve(_e.startX+b,_e.startY+Ee,_e.startX-b,_e.startY-Ee,te,ne,se,he,a)&&y.push(a),a=new ft,Vt.Ve(_e.endX+b,_e.endY+Ee,_e.endX-b,_e.endY-Ee,te,ne,se,he,a)&&y.push(a),se=y.length,se===0)return zn(y),!1;for(Ee=!0,he=1/0,b=0;b<se;b++)a=y[b],x=(a.x-te)*(a.x-te)+(a.y-ne)*(a.y-ne),x<he&&(he=x,E.x=a.x,E.y=a.y);zn(y)}else if(_e.type===In.u)Ee=Vt.Ff(Ye.x-Ne,Ye.y-Ne,Ye.x+Ye.width+Ne,Ye.y+Ye.height+Ne,te,ne,se,he,E);else if(_e.type===In.F){y=sn.allocAt(Ye.x,Ye.y,Ye.width,Ye.height).Bc(Ne,Ne);e:if(y.width===0)Ee=Vt.Ve(y.x,y.y,y.x,y.y+y.height,te,ne,se,he,E);else if(y.height===0)Ee=Vt.Ve(y.x,y.y,y.x+y.width,y.y,te,ne,se,he,E);else{if(a=y.width/2,_e=y.height/2,b=y.x+a,Ee=y.y+_e,x=9999,te!==se&&(x=(ne-he)/(te-se)),9999>Math.abs(x)){if(he=ne-Ee-x*(te-b),0>a*a*x*x+_e*_e-he*he){E.x=NaN,E.y=NaN,Ee=!1;break e}Ne=Math.sqrt(a*a*x*x+_e*_e-he*he),se=(-(a*a*x*he)+a*_e*Ne)/(_e*_e+a*a*x*x)+b,a=(-(a*a*x*he)-a*_e*Ne)/(_e*_e+a*a*x*x)+b,_e=x*(se-b)+he+Ee,he=x*(a-b)+he+Ee,Math.abs((te-se)*(te-se))+Math.abs((ne-_e)*(ne-_e))<Math.abs((te-a)*(te-a))+Math.abs((ne-he)*(ne-he))?(E.x=se,E.y=_e):(E.x=a,E.y=he)}else{if(se=_e*_e,he=te-b,se-=se/(a*a)*he*he,0>se){E.x=NaN,E.y=NaN,Ee=!1;break e}he=Math.sqrt(se),se=Ee+he,he=Ee-he,Math.abs(se-ne)<Math.abs(he-ne)?(E.x=te,E.y=se):(E.x=te,E.y=he)}Ee=!0}sn.free(y)}else if(_e.type===In.o){He=ft.alloc();var Qe=se-te,st=he-ne,Pt=Qe*Qe+st*st,St=te,Tt=ne;if(0<Pt&&Ye.contains(St,Tt)&&(He.x=St,He.y=Tt,this.ca(He)))for(Qe!==0&&.5>Math.abs(Qe)?(st*=.5/Qe,Qe=.5):st!==0&&.5>Math.abs(st)&&(Qe*=.5/st,st=.5),St-=Qe,Tt-=st;Ye.contains(St,Tt);)St-=Qe,Tt-=st;for(E.x=se,E.y=he,st=0;st<_e.figures.count;st++){var At=_e.figures.s[st],It=At.isFilled?St:te,Wt=At.isFilled?Tt:ne,tn=At.segments;Ye=At.startX,Qe=At.startY;for(var Kn=Ye,hi=Qe,ii=0;ii<tn.count;ii++){var Rn=tn.s[ii],_n=Rn.type,Zi=Rn.endX,Ri=Rn.endY,Ur=!1;switch(_n){case gs:Kn=Zi,hi=Ri;break;case to:Ur=Om(Ye,Qe,Zi,Ri,It,Wt,se,he,He);break;case bs:Ur=Vt.Eo(Ye,Qe,Rn.point1X,Rn.point1Y,Rn.point2X,Rn.point2Y,Zi,Ri,It,Wt,se,he,.6,He);break;case Da:Ur=Vt.Eo(Ye,Qe,Ye+2/3*(Rn.point1X-Ye),Qe+2/3*(Rn.point1Y-Qe),Zi+2/3*(Rn.point1X-Zi),Ri+2/3*(Rn.point1Y-Ri),Zi,Ri,It,Wt,se,he,.6,He);break;case Xo:case Ka:_n=Rn.type===Xo?va(Rn,At):Is(Rn,At,Ye,Qe);var wo=_n.length;if(wo===0){Ur=Om(Ye,Qe,Rn.type===Xo?Rn.centerX:Rn.endX,Rn.type===Xo?Rn.centerY:Rn.endY,It,Wt,se,he,He);break}for(Ri=null,Zi=0;Zi<wo;Zi++){if(Ri=_n[Zi],Zi===0&&Om(Ye,Qe,Ri[0],Ri[1],It,Wt,se,he,He)){var Bs=Dm(It,Wt,He,Pt,E);Bs<Pt&&(Pt=Bs,Ee=!0)}Vt.Eo(Ri[0],Ri[1],Ri[2],Ri[3],Ri[4],Ri[5],Ri[6],Ri[7],It,Wt,se,he,.6,He)&&(Bs=Dm(It,Wt,He,Pt,E),Bs<Pt&&(Pt=Bs,Ee=!0))}Zi=Ri[6],Ri=Ri[7];break;default:Lt("Unknown Segment type: "+_n)}Ye=Zi,Qe=Ri,Ur&&(Ur=Dm(It,Wt,He,Pt,E),Ur<Pt&&(Pt=Ur,Ee=!0)),Rn.isClosed&&(Zi=Kn,Ri=hi,Om(Ye,Qe,Zi,Ri,It,Wt,se,he,He)&&(Rn=Dm(It,Wt,He,Pt,E),Rn<Pt&&(Pt=Rn,Ee=!0)))}}te=x-a,ne=b-y,se=Math.sqrt(te*te+ne*ne),se!==0&&(te/=se,ne/=se),E.x-=te*Ne,E.y-=ne*Ne,ft.free(He)}else Lt("Unknown Geometry type: "+_e.type);return Ee?(this.transform.Ga(E),!0):!1};function Dm(a,y,x,b,E){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<b?(E.x=x.x,E.y=x.y,y):b}function Om(a,y,x,b,E,te,ne,se,he){if(Vt.$(a,x)&&Vt.$(y,b)||Vt.$(E,ne)&&Vt.$(te,se))return!1;var _e=!1,Ee=(E-ne)*(y-b)-(te-se)*(a-x);return Ee===0?!1:(he.x=((E*se-te*ne)*(a-x)-(E-ne)*(a*b-y*x))/Ee,he.y=((E*se-te*ne)*(y-b)-(te-se)*(a*b-y*x))/Ee,(a>x?a-x:x-a)<(y>b?y-b:b-y)?(a=y<b?y:b,y=y<b?b:y,(he.y>a||Vt.$(he.y,a))&&(he.y<y||Vt.$(he.y,y))&&(_e=!0)):(y=a<x?a:x,a=a<x?x:a,(he.x>y||Vt.$(he.x,y))&&(he.x<a||Vt.$(he.x,a))&&(_e=!0)),_e)}$e.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.ua;x===null&&(this.measure(1/0,1/0),x=this.ua),x=x.bounds;var b=this.strokeWidth/2,E=!1,te=ft.alloc();return te.h(x.x-b,x.y-b),a.ca(y.Ga(te))&&(te.h(x.x-b,x.bottom+b),a.ca(y.Ga(te))&&(te.h(x.right+b,x.bottom+b),a.ca(y.Ga(te))&&(te.h(x.right+b,x.y-b),a.ca(y.Ga(te))&&(E=!0)))),ft.free(te),E},$e.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=Ii.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,te=a.top;a=a.bottom;var ne=ft.alloc();if(ne.h(b,te),x.Ga(ne),this.gh(ne,!0)||(ne.h(E,te),x.Ga(ne),this.gh(ne,!0))||(ne.h(b,a),x.Ga(ne),this.gh(ne,!0))||(ne.h(E,a),x.Ga(ne),this.gh(ne,!0)))return ft.free(ne),!0;var se=ft.alloc(),he=ft.alloc();return x.set(y),x.bv(this.transform),x.Vj(),se.x=E,se.y=te,se.transform(x),ne.x=b,ne.y=te,ne.transform(x),y=!1,vd(this,ne,se,he)?y=!0:(ne.x=E,ne.y=a,ne.transform(x),vd(this,ne,se,he)?y=!0:(se.x=b,se.y=a,se.transform(x),vd(this,ne,se,he)?y=!0:(ne.x=b,ne.y=te,ne.transform(x),vd(this,ne,se,he)&&(y=!0)))),ft.free(ne),Ii.free(x),ft.free(se),ft.free(he),y};function vd(a,y,x,b){if(!a.rs(y,x,b))return!1;a=y.x,y=y.y;var E=x.x,te=x.y;return x=b.x,b=b.y,a===E?(y<te?(a=y,y=te):a=te,b>=a&&b<=y):(a<E?(b=a,a=E):b=E,x>=b&&x<=a)}$e.tx=function(a,y,x){function b(Pt,St){for(var Tt=Pt.length,At=0;At<Tt;At+=2)if(St.zd(Pt[At],Pt[At+1])>E)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var E=a.Bf(y),te=E;if(1.5<this.strokeWidth&&(E=this.strokeWidth/2+Math.sqrt(E),E*=E),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var ne=y.bounds,se=ne.x,he=ne.y,_e=ne.x+ne.width;if(ne=ne.y+ne.height,Vn(a.x,a.y,se,he)<=E&&Vn(a.x,a.y,_e,he)<=E&&Vn(a.x,a.y,se,ne)<=E&&Vn(a.x,a.y,_e,ne)<=E)return!0}if(se=y.startX,he=y.startY,_e=y.endX,ne=y.endY,y.type===In.j){if(x=(se-_e)*(a.x-_e)+(he-ne)*(a.y-ne),Qn(a.x,a.y,se,he,_e,ne)<=(0<=(_e-se)*(a.x-se)+(ne-he)*(a.y-he)&&0<=x?E:te))return!0}else{if(y.type===In.u)return y=!1,x&&(y=Qn(a.x,a.y,se,he,se,ne)<=E||Qn(a.x,a.y,se,he,_e,he)<=E||Qn(a.x,a.y,_e,he,_e,ne)<=E||Qn(a.x,a.y,se,ne,_e,ne)<=E),y;if(y.type===In.F){y=a.x-(se+_e)/2,te=a.y-(he+ne)/2;var Ee=Math.abs(_e-se)/2,Ne=Math.abs(ne-he)/2;if(Ee===0||Ne===0)return Qn(a.x,a.y,se,he,_e,ne)<=E;if(x){if(a=Vt.$y(Ee,Ne,y,te),a*a<=E)return!0}else return!(Vn(y,te,-Ee,0)>=E||Vn(y,te,0,-Ne)>=E||Vn(y,te,0,Ne)>=E||Vn(y,te,Ee,0)>=E)}else if(y.type===In.o){if(_e=y.bounds,te=_e.x,se=_e.y,he=_e.x+_e.width,_e=_e.y+_e.height,a.x>he&&a.x<te&&a.y>_e&&a.y<se&&Qn(a.x,a.y,te,se,te,_e)>E&&Qn(a.x,a.y,te,se,he,se)>E&&Qn(a.x,a.y,he,_e,te,_e)>E&&Qn(a.x,a.y,he,_e,he,se)>E)return!1;if(te=Math.sqrt(E),x){if(this.fill===null?rl(y,a.x,a.y,te):Ns(y,a,te,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(te=x.s[y],ne=te.startX,Ee=te.startY,a.zd(ne,Ee)>E)return!1;for(se=te.segments.s,he=se.length,_e=0;_e<he;_e++)switch(Ne=se[_e],Ne.type){case gs:case to:if(ne=Ne.endX,Ee=Ne.endY,a.zd(ne,Ee)>E)return!1;break;case bs:var He=Wn();if(Vt.Qe(ne,Ee,Ne.point1X,Ne.point1Y,Ne.point2X,Ne.point2Y,Ne.endX,Ne.endY,.8,He),ne=b(He,a),zn(He),ne||(ne=Ne.endX,Ee=Ne.endY,a.zd(ne,Ee)>E))return!1;break;case Da:if(He=Wn(),Vt.ep(ne,Ee,Ne.point1X,Ne.point1Y,Ne.endX,Ne.endY,.8,He),ne=b(He,a),zn(He),ne||(ne=Ne.endX,Ee=Ne.endY,a.zd(ne,Ee)>E))return!1;break;case Xo:case Ka:He=Ne.type===Xo?va(Ne,te):Is(Ne,te,ne,Ee);var Ye=He.length;if(Ye===0){if(ne=Ne.type===Xo?Ne.centerX:Ne.endX,Ee=Ne.type===Xo?Ne.centerY:Ne.endY,a.zd(ne,Ee)>E)return!1;break}Ne=null;for(var Qe=Wn(),st=0;st<Ye;st++)if(Ne=He[st],Qe.length=0,Vt.Qe(Ne[0],Ne[1],Ne[2],Ne[3],Ne[4],Ne[5],Ne[6],Ne[7],.8,Qe),b(Qe,a))return zn(Qe),!1;zn(Qe),Ne!==null&&(ne=Ne[6],Ee=Ne[7]);break;default:Lt("Unknown Segment type: "+Ne.type)}}return!0}}}return!1},$e.qc=function(){this.ua=null},$e.kq=function(){return this.ig};function v1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=cg,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=Os):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new ui(1-Os.x,Os.y)))}ir.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=fh[a.toArrow];else a.fromArrow!=="None"?b=fh[a.fromArrow]:(b=Vt.Ze[a.figure],typeof b=="string"&&(b=Vt.Ze[b]),b===void 0&&Lt("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=Vt.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function y1(a){var y=fh[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=fh[x],y===void 0){var b=null,E;for(E in Vt.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=In.parse(Vt.um[b],!1),fh[b]=a,x!==b&&(fh[x]=b),b}}return typeof y=="string"?y:y instanceof In?a:null}ot.Object.defineProperties(ir.prototype,{geometry:{get:function(){return this.ua!==null?this.ua:this.Rd},set:function(a){var y=this.ua,x=this.Rd;if(y!==a){a!==null?this.Rd=this.ua=a.freeze():this.Rd=this.ua=null;var b=this.part;b!==null&&(b.ag=NaN),this.v(),this.g("geometry",y||x,a),la(this)&&(a=this.part,a!==null&&Bo(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=In.parse(a);var y=a.normalize();this.geometry=a,this.position=a=ft.allocAt(-y.x,-y.y),ft.free(a)}},isGeometryPositioned:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.v(),this.g("isGeometryPositioned",y,a))}},fill:{get:function(){return this.Ui},set:function(a){var y=this.Ui;y!==a&&(a!==null&&Yd(a,"Shape.fill"),a instanceof no&&a.freeze(),this.Ui=a,this.N(),this.g("fill",y,a))}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&Yd(a,"Shape.stroke"),a instanceof no&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},strokeWidth:{get:function(){return this.ig},set:function(a){var y=this.ig;if(y!==a)if(0<=a){this.ig=a,this.v();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeWidth",y,a)}else Pn(a,"value >= 0",ir,"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"?Pn(a,'"butt", "round", or "square"',ir,"strokeCap"):(md(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"?Pn(a,'"miter", "bevel", or "round"',ir,"strokeJoin"):(md(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){md(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,b=0,E=0;E<x;E++){var te=a[E];0<=te&&isFinite(te)||Lt("strokeDashArray:value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.Yg=a,this.N(),this.g("strokeDashArray",y,a)}}},strokeDashOffset:{get:function(){return this.Na!==null?this.Na.uj:0},set:function(a){var y=this.strokeDashOffset;y!==a&&0<=a&&(md(this),this.Na.uj=a,this.N(),this.g("strokeDashOffset",y,a))}},figure:{get:function(){return this.an},set:function(a){var y=this.an;if(y!==a){var x=Vt.Ze[a];typeof x=="function"?x=a:(x=Vt.Ze[a.toLowerCase()])||Lt("Unknown Shape.figure: "+a),y!==x&&(a=this.part,a!==null&&(a.ag=NaN),this.an=x,this.Rd=null,this.qc(),this.v(),this.g("figure",y,x))}}},toArrow:{get:function(){return this.Ua!==null?this.Ua.V:"None"},set:function(a){var y=this.toArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=y1(a);x===null?Lt("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Ac),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),v1(this),this.g("toArrow",y,x))}}},fromArrow:{get:function(){return this.Ua!==null?this.Ua.j:"None"},set:function(a){var y=this.fromArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=y1(a);x===null?Lt("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Ac),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),v1(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:As},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),md(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:As},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),md(this),this.Na.gg=a,this.v(),this.g("spot2",y,a))}},parameter1:{get:function(){return this.Un},set:function(a){var y=this.Un;y!==a&&(this.Un=a,this.qc(),this.v(),this.g("parameter1",y,a))}},parameter2:{get:function(){return this.Vn},set:function(a){var y=this.Vn;y!==a&&(this.Vn=a,this.qc(),this.v(),this.g("parameter2",y,a))}},naturalBounds:{get:function(){return this.dc}},pathPattern:{get:function(){return this.Na!==null?this.Na.br:null},set:function(a){var y=this.pathPattern;y!==a&&(md(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:Xi},set:function(a){var y=this.geometryStretch;y!==a&&(md(this),this.Na.jq=a,this.v(),this.g("geometryStretch",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 ph),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Zu(x),this.v(),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:1<a&&(a=1),this.fa===null&&(this.fa=new ph),this.fa.u=a,this.v(),this.g("graduatedStart",y,a))}},graduatedEnd:{get:function(){return this.fa!==null?this.fa.j:1},set:function(a){var y=this.graduatedEnd;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new ph),this.fa.j=a,this.v(),this.g("graduatedEnd",y,a))}},graduatedSkip:{get:function(){return this.fa!==null?this.fa.o:null},set:function(a){var y=this.graduatedSkip;y!==a&&(this.fa===null&&(this.fa=new ph),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),ir.prototype.intersectsRect=ir.prototype.Yc,ir.prototype.containedInRect=ir.prototype.fh,ir.prototype.getNearestIntersectionPoint=ir.prototype.rs,ir.prototype.getDocumentBounds=ir.prototype.mi,ir.prototype.getDocumentPoint=ir.prototype.ga;var fh=new vi,Ev=new vi;ir.className="Shape",ir.getFigureGenerators=function(){var a=new on,y;for(y in Vt.Ze)y!==y.toLowerCase()&&a.add(y,Vt.Ze[y]);return a.freeze(),a},ir.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=Vt.Ze;b[a]=y,b[x]=a},ir.getArrowheadGeometries=function(){var a=new on;for(b in Vt.um)if(fh[b]===void 0){var y=In.parse(Vt.um[b],!1);fh[b]=y,y=b.toLowerCase(),y!==b&&(fh[y]=b)}for(var x in fh)if(x!==x.toLowerCase()){var b=fh[x];b instanceof In&&a.add(x,b)}return a.freeze(),a},ir.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=In.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Lt("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=fh;b[a]=x,b[y]=a};function Lv(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=Xi,this.gg=this.fg=As}Lv.prototype.copy=function(){var a=new Lv;return a.Hr=this.Hr,a.Ir=this.Ir,a.Jr=this.Jr,a.uj=this.uj,a.br=this.br,a.jq=this.jq,a.fg=this.fg.J(),a.gg=this.gg.J(),a};function Lo(a,y){return Zt.call(this),jm||(Qa=ts?new tu(null).context:null,jm=!0),this.l|=2097152,this.ec="",this.xc="black",this.Ae="13px sans-serif",this.Lq=this.Cb=this.Gc=0,this.da=this.fa=this.Gm=null,this.Ih=0,this.df=null,this.Le=0,this.ze=this.Qb=this.Qc=null,typeof a=="string"?this.text=a:a&&Object.assign(this,a),y&&Object.assign(this,y),this}Je(Lo,Zt),Lo.prototype.cloneProtected=function(a){Zt.prototype.cloneProtected.call(this,a),a.ec=this.ec,a.xc=this.xc,a.Ae=this.Ae,a.Gc=this.Gc,a.Cb=this.Cb,a.Lq=this.Lq,a.Gm=this.Gm,this.fa!==null&&(a.fa=this.fa.copy()),this.da!==null&&(a.da=this.da.nc?this.da:this.da.copy()),a.Ih=this.Ih,a.df=this.df,a.Le=this.Le,a.Qc=this.Qc,a.Qb=this.Qb,a.ze=this.ze};function Xu(a){a.da===null?a.da=new Ov:a.da.nc&&(a.da=a.da.copy())}$e=Lo.prototype,$e.th=function(){Zt.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function S1(a,y){a.l=y.l|6144,a.pb=y.opacity,a.Ma=y.background,a.areaBackground=y.areaBackground,a.jd=y.desiredSize.J(),a.minSize=y.minSize.J(),a.maxSize=y.maxSize.J(),y.Lb!==null?a.Lb=y.Lb.copy():a.Lb=null,a.Ca=y.scale,a.Kb=y.angle,a.stretch=y.stretch,a.Kg=y.margin.J(),a.Jb=y.alignment.J(),a.sk=y.alignmentFocus.J(),a.segmentFraction=y.segmentFraction,a.segmentOffset=y.segmentOffset.J(),a.segmentOrientation=y.segmentOrientation,y.tb!==null&&(a.tb=y.tb.copy()),a.shadowVisible=y.shadowVisible,a.ec=y.ec,a.xc=y.xc,a.Ae=y.Ae,a.fa!==null&&(a.fa=y.fa.copy()),y.da!==null&&(a.da=y.da.nc?y.da:y.da.copy()),a.Ih=y.Ih}$e.qb=function(a){a.classType===Lo?this.wrap=a:Zt.prototype.qb.call(this,a)},$e.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},$e.v=function(){Zt.prototype.v.call(this)},$e.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,b=this.actualBounds,E=x.width,te=x.height,ne=rg(this),se=a.textAlign=this.textAlign,he=y.tn;se==="start"?se=he?"right":"left":se==="end"&&(se=he?"left":"right"),he=this.isUnderline;var _e=this.isStrikethrough;os(this,a,this.xc,!0,!1,x,b),(he||_e)&&os(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var Ee=this.oe,Ne=Ee.dx-(ne*Ee.m21+Ee.dx);Ee=Ee.dy-(ne*Ee.m22+Ee.dy);var He=y.scale;switch(8>(Ne*Ne+Ee*Ee)*He*He&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof ml&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,Ne=this.spacingBelow,this.flip){case Ir:a.translate(E,0),a.scale(-1,1);break;case lr:a.translate(0,te),a.scale(1,-1);break;case lo:a.translate(E,te),a.scale(-1,-1)}if(a.yc(),Ee=this.Gc,He=(y+ne+Ne)*Ee,te>He&&(b=this.verticalAlignment,b=b.y*te-b.y*He+b.offsetY),Ee===1&&this.ze!==null)Ne=this.Cb,Ne>E&&(Ne=E),this.Oj(this.ze,a,0,b+y,E,ne,Ne,x,se,he,_e);else if(this.Qc!==null&&this.Qb!==null)for(He=0;He<Ee;He++){var Ye=this.Qc[He];Ye>E&&(Ye=E),b+=y,this.Oj(this.Qb[He],a,0,b,E,ne,Ye,x,se,he,_e),b+=ne+Ne}switch(this.flip){case Ir:a.scale(-1,1),a.translate(-E,0);break;case lr:a.scale(1,-1),a.translate(0,-te);break;case lo:a.scale(-1,-1),a.translate(-E,-te)}}},$e.Oj=function(a,y,x,b,E,te,ne,se,he,_e,Ee){var Ne=0;if(se)he==="left"?Ne=0:he==="right"?Ne=E-ne:he==="center"&&(Ne=(E-ne)/2),y.fillRect(x+Ne,b+.25*te,ne,1);else{if(he==="left"?Ne=0:he==="right"?Ne=E:he==="center"&&(Ne=E/2),E=Im!==null?Im(this,te):.75*te,y.fillText(a,x+Ne,b+E),a=te/20|0,a===0&&(a=1),he==="right"?Ne-=ne:he==="center"&&(Ne-=ne/2),_e){se=Rm!==null?Rm(this,te):.8*te,he=x+Ne,_e=b+se,E=x+Ne+ne,se=b+se;var He=a;y.beginPath(),y.lineWidth=He,y.moveTo(he,_e),y.lineTo(E,se),y.stroke(),y.Se(),y instanceof ml&&y.ad.classList.add("gojs-td")}Ee&&(Ee=b+te-te/2.2|0,a%2!==0&&(Ee+=.5),b=x+Ne,te=Ee,x=x+Ne+ne,ne=Ee,Ne=a,y.beginPath(),y.lineWidth=Ne,y.moveTo(b,te),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof ml&&y.ad.classList.add("gojs-td"))}},$e.kk=function(a,y,x){if(!Zt.prototype.kk.call(this,a,y,x))return!1;if(os(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<y.length;x++)Qy(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,Qy(a,y,!0);return!0},$e.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Zt.prototype.nk.call(this,a)},$e.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("text");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},$e.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var te=this.Ae;Qa!==null&&E1!==te&&(E1=Qa.font=te),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var ne;if(isNaN(this.desiredSize.width)){if(te=this.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),te.length===0)te=8;else if(this.isMultiline){for(var se=ne=0,he=!1;!he;){var _e=te.indexOf(`
|
|
|
`,se);_e===-1&&(_e=te.length,he=!0),se=te.substr(se,_e-se),this.formatting===og&&(se=se.trim()),ne=Math.max(ne,vu(se)),se=_e+1}te=ne}else ne=te.indexOf(`
|
|
|
`,0),0<=ne&&(te=te.substr(0,ne)),te=vu(te);te=Math.min(te,a/this.scale)}else te=this.desiredSize.width;if(this.panel!==null&&(te=Math.min(te,this.panel.maxSize.width)),ne=w1(this,te),isNaN(this.desiredSize.height)?ne=Math.min(ne,y/this.scale):ne=this.desiredSize.height,he=ne,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Fm&&(y=this.Ae,y=this.overflow===Fm?x1(y):0,_e=this.spacingAbove+this.spacingBelow,_e=Math.max(0,rg(this)+_e),he=Math.min(this.maxLines-1,Math.max(Math.floor(he/_e+.01)-1,0)),!(he+1>=this.Qb.length))){for(this.l|=16777216,_e=this.Qb[he],y=Math.max(1,a-y);vu(_e)>y&&1<_e.length;)_e=_e.substr(0,_e.length-1);_e+=sg,y=vu(_e),this.Qb[he]=_e,this.Qb=this.Qb.slice(0,he+1),this.Qc[he]=y,this.Qc=this.Qc.slice(0,he+1),this.Le=this.Qb.length,this.Cb=Math.max(this.Cb,y),this.Gc=this.Le,this.Gc===1&&(this.ze=this.Qb[0])}(this.wrap===_1||isNaN(this.desiredSize.width))&&(te=isNaN(a)?this.Cb:Math.min(a,this.Cb)),te=Math.max(x,te),ne=Math.max(b,ne),Jr(this.dc,te,ne),this.Ge(0,0,te,ne),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},$e.eh=function(a,y,x,b){La(this,a,y,x,b)};function ig(a,y,x){a.ze===null?(a.ze=y,a.Cb=x):((a.Qb===null||a.Qc===null)&&(a.Qb=[],a.Qc=[],a.Qb.push(a.ze),a.Qc.push(a.Cb)),a.Qb.push(y),a.Qc.push(x),a.Qb.length>a.maxLines&&(a.l|=16777216))}function Mv(a,y,x,b){var E=a.formatting===og;E&&(y=y.trim());var te=0,ne=a.Ae,se=a.spacingAbove+a.spacingBelow;se=Math.max(0,rg(a)+se);var he=a.overflow===Fm?x1(ne):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,se);else if(ne=y,a.wrap===kv){a.Le=1;var _e=vu(y);if(he===0||_e<=x)a.Cb=Math.max(a.Cb,_e),ig(a,y,a.Cb),b!==null&&b.h(_e,se);else{for(te=zf(a,ne),ne=ne.substr(te.length),y=zf(a,ne),_e=vu(te+y);0<y.length&&_e<=x;)te+=y,ne=ne.substr(y.length),y=zf(a,ne),_e=te+y,E&&(_e=_e.trim()),_e=vu(_e);for(E&&(y=y.trim()),te+=y,x=Math.max(1,x-he);vu(te)>x&&1<te.length;)te=te.substr(0,te.length-1);a.l|=16777216,te+=sg;var Ee=vu(te);a.Cb=Ee,ig(a,te,Ee),b!==null&&b.h(Ee,se)}}else{for(he=0,ne.length===0&&(he=1,ig(a,ne,0));0<ne.length;){for(y=zf(a,ne),ne=ne.substr(y.length);vu(y)>x;){var Ne=1;for(_e=vu(y.substr(0,Ne)),Ee=0;_e<=x;)Ne++,Ee=_e,_e=vu(y.substr(0,Ne));if(Ne===1){var He=_e;te=Math.max(te,_e)}else He=Ee,te=Math.max(te,Ee);if(Ne--,1>Ne&&(Ne=1),ig(a,y.substr(0,Ne),He),he++,y=y.substr(Ne),a.Gc+he>a.maxLines)break}for(Ee=zf(a,ne),_e=vu(y+Ee);0<Ee.length&&_e<=x;)y+=Ee,ne=ne.substr(Ee.length),Ee=zf(a,ne),_e=y+Ee,E&&(_e=_e.trim()),_e=vu(_e);if(E&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),Ee.length===0?(Ne=_e,te=Math.max(te,_e)):(Ne=Ee=vu(y),te=Math.max(te,Ee)),ig(a,y,Ne),he++,a.Gc+he>a.maxLines))break}a.Le=Math.min(a.maxLines,he),a.Cb=Math.max(a.Cb,te),b!==null&&b.h(a.Cb,se*a.Le)}}function zf(a,y){if(a.wrap===b1)return y.substr(0,1);for(var x=y.length,b=0,E=xx;b<x&&!E.test(y.charAt(b));)b++;for(a.formatting===P1&&(x=Math.min(x,b+1));b<x&&E.test(y.charAt(b));)b++;return b>=y.length?y:y.substr(0,b)}function vu(a){return Qa===null?8*a.length:Qa.measureText(a).width}function rg(a){if(a.df!==null)return a.df;var y=a.Ae;if(Qa===null){var x=16;return a.df=x}return Nv[y]!==void 0&&5e3>C1?x=Nv[y]:(x=1.3*Qa.measureText("M").width,Nv[y]=x,C1++),a.df=x}function x1(a){if(Qa===null)return 6;if(Bm[a]!==void 0&&5e3>Dv)var y=Bm[a];else y=Qa.measureText(sg).width,Bm[a]=y,Dv++;return y}function w1(a,y){var x=a.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),b=a.spacingAbove+a.spacingBelow;if(b=Math.max(0,rg(a)+b),x.length===0)return a.Cb=0,a.Gc=1,b;if(!a.isMultiline){var E=x.indexOf(`
|
|
|
`,0);0<=E&&(x=x.substr(0,E))}E=0;for(var te=a.Gc=0,ne,se=!1;!se;){if(ne=x.indexOf(`
|
|
|
`,te),ne===-1&&(ne=x.length,se=!0),te<=ne){if(te=x.substr(te,ne-te),a.wrap!==kv){a.Le=0;var he=wn.alloc();Mv(a,te,y,he),E+=he.height,wn.free(he),a.Gc+=a.Le}else Mv(a,te,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(se=!0)}te=ne+1}return a.Lq=E}ot.Object.defineProperties(Lo.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"||(Xu(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:Cn},set:function(a){var y=this.flip;y!==a&&(Xu(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:uu},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Xu(this),this.da.Yr=a,Ra(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=wn.alloc();Mv(this,this.ec,999999,a);var y=a.width;wn.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Jr(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:Tv},set:function(a){var y=this.wrap;y!==a&&(Xu(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Av},set:function(a){var y=this.overflow;y!==a&&(Xu(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&&Yd(a,"TextBlock.stroke"),a instanceof no&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return rg(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&&(Xu(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&&(Xu(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 ph),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:1<a&&(a=1),this.fa===null&&(this.fa=new ph),this.fa.u=a,this.v(),this.g("graduatedStart",y,a))}},graduatedEnd:{get:function(){return this.fa!==null?this.fa.j:1},set:function(a){var y=this.graduatedEnd;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new ph),this.fa.j=a,this.v(),this.g("graduatedEnd",y,a))}},graduatedFunction:{get:function(){return this.fa!==null?this.fa.F:null},set:function(a){var y=this.graduatedFunction;y!==a&&(this.fa===null&&(this.fa=new ph),this.fa.F=a,this.v(),this.g("graduatedFunction",y,a))}},graduatedSkip:{get:function(){return this.fa!==null?this.fa.o:null},set:function(a){var y=this.graduatedSkip;y!==a&&(this.fa===null&&(this.fa=new ph),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}},textValidation:{get:function(){return this.da!==null?this.da.vj:null},set:function(a){var y=this.textValidation;y!==a&&(Xu(this),this.da.vj=a,this.g("textValidation",y,a))}},textEdited:{get:function(){return this.da!==null?this.da.Pr:null},set:function(a){var y=this.textEdited;y!==a&&(Xu(this),this.da.Pr=a,this.g("textEdited",y,a))}},spacingAbove:{get:function(){return this.da!==null?this.da.Dr:0},set:function(a){var y=this.spacingAbove;y!==a&&(Xu(this),this.da.Dr=a,this.v(),this.g("spacingAbove",y,a))}},spacingBelow:{get:function(){return this.da!==null?this.da.Er:0},set:function(a){var y=this.spacingBelow;y!==a&&(Xu(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:og},set:function(a){var y=this.formatting;y!==a&&(Xu(this),this.da.gq=a,this.v(),this.g("formatting",y,a))}},maxLines:{get:function(){return this.da!==null?this.da.Jq:1/0},set:function(a){var y=this.maxLines;y!==a&&(a=Math.floor(a),0>=a&&Pn(a,"> 0",Lo,"maxLines"),Xu(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 Im=null,Rm=null,kv=new nn(Lo,"None",0),_1=new nn(Lo,"WrapFit",1),Tv=new nn(Lo,"WrapDesiredSize",2),b1=new nn(Lo,"WrapBreakAll",3),Av=new nn(Lo,"OverflowClip",0),Fm=new nn(Lo,"OverflowEllipsis",1),og=new nn(Lo,"FormatTrim",0),P1=new nn(Lo,"FormatNone",0),xx=/[ \u200b\u00ad]/,Nv=new vi,C1=0,Bm=new vi,Dv=0,sg="...",E1="",Qa=null,jm=!1;Lo.className="TextBlock";function Ov(){this.nc=!1,this.Hd=null,this.Xf=Cn,this.gq=og,this.Jq=1/0,this.$q=Av,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=uu,this.$r=Tv}Ov.prototype.copy=function(){var a=new Ov;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},Lo.getEllipsis=function(){return sg},Lo.setEllipsis=function(a){sg=a,Bm=new vi,Dv=0},Lo.getBaseline=function(){return Im},Lo.setBaseline=function(a){Im=a},Lo.getUnderline=function(){return Rm},Lo.setUnderline=function(a){Rm=a},Lo.isValidFont=function(a){if(jm||(Qa=ts?new tu(null).context:null,jm=!0),Qa===null)return!0;var y=Qa.font;if(a===y||a==="10px sans-serif")return!0;Qa.font="10px sans-serif",Qa.font=a;var x=Qa.font;if(x!=="10px sans-serif")return Qa.font=y,!0;Qa.font="19px serif";var b=Qa.font;return Qa.font=a,x=Qa.font,Qa.font=y,x!==b},Lo.FormatNone=P1,Lo.FormatTrim=og,Lo.None=kv,Lo.OverflowClip=Av,Lo.OverflowEllipsis=Fm,Lo.WrapBreakAll=b1,Lo.WrapDesiredSize=Tv,Lo.WrapFit=_1;function ph(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}ph.prototype.copy=function(){var a=new ph;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},ph.className="GradElementSettings";function $a(a,y){Zt.call(this),this.Eg=null,this.qo="",this.Xg=Aa,this.Nk=Tn,this.Zg=this.Hd=null,this.Mk=$i,this.Xf=Cn,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 Uf;Je($a,Zt),$a.prototype.cloneProtected=function(a){Zt.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},$a.prototype.qb=function(a){a===Cn||a===fi||a===Pr?this.imageStretch=a:Zt.prototype.qb.call(this,a)},$a.prototype.toString=function(){return"Picture("+this.source+")#"+sr(this)};function Hf(a){a===void 0&&(a=""),a!==""?Uf[a]&&(delete Uf[a],zm--):(Uf=new vi,zm=0)}function L1(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value;E.N();var te=y.getAttribute("src")||"",ne=E.Og.I(te);if(ne!==null)for(var se=ne.length,he=0;he<se;he++)te=ne[he],E.Xn.add(te),te.Uc=!0,E.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),te.Zg!==null&&te.Zg(te,x))}y.Bg.clear()}a.desiredSize.w()||(Cs(a,!1),a.v())},y.Yp=function(x){y.ln=x;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value,te=y.getAttribute("src")||"",ne=E.Og.I(te);if(ne!==null){E=ne.length,te=Wn();for(var se=0;se<E;se++)te.push(ne[se]);if(y.hn)for(se=0;se<E;se++)ne=te[se],ne.Hd!==null&&ne.Hd(ne,x);zn(te)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}$a.prototype.hA=function(){if(this.source!==""){Hf(this.source);var a=this.source;this.source="",this.source=a}},$a.prototype.redraw=function(){this.N(),this.Uc=!0},$a.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var b=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(b===null||b==="")||x.ln instanceof Event&&a instanceof pd)){var E=a instanceof ml;b=this.naturalBounds;var te=0,ne=0,se=this.qn,he=se?+x.width:x.naturalWidth;if(se=se?+x.height:x.naturalHeight,he===void 0&&x.videoWidth&&(he=x.videoWidth),se===void 0&&x.videoHeight&&(se=x.videoHeight),he=he||b.width,se=se||b.height,he!==0&&se!==0){var _e=he,Ee=se;this.sourceRect.w()&&(te=this.Xg.x,ne=this.Xg.y,he=this.Xg.width,se=this.Xg.height);var Ne=he,He=se,Ye=this.Nk,Qe=this.Mk;switch(Ye){case Cn:if(this.sourceRect.w())break;Ne>=b.width&&(te=te+Qe.offsetX+(Ne*Qe.x-b.width*Qe.x)),He>=b.height&&(ne=ne+Qe.offsetY+(He*Qe.y-b.height*Qe.y)),he=Math.min(b.width,Ne),se=Math.min(b.height,He);break;case Tn:Ne=b.width,He=b.height;break;case fi:case Pr:Ye===fi?(Ye=Math.min(b.height/He,b.width/Ne),Ne*=Ye,He*=Ye):Ye===Pr&&(Ye=Math.max(b.height/He,b.width/Ne),Ne*=Ye,He*=Ye,Ne>=b.width&&(te=(te+Qe.offsetX+(Ne*Qe.x-b.width*Qe.x)/Ne)*he),He>=b.height&&(ne=(ne+Qe.offsetY+(He*Qe.y-b.height*Qe.y)/He)*se),he*=1/(Ne/b.width),se*=1/(He/b.height),Ne=b.width,He=b.height)}Ye=this.Df()*y.scale;var st=Ne*Ye*He*Ye,Pt=he*se/st,St=x.__goCache;Ye=null;var Tt=wx;if(!E){if(x.sq&&St!==void 0&&4<st&&Pt>Tt*Tt)for(St.gi===null&&(k1(St,4,_e,Ee,x),k1(St,16,_e,Ee,x)),E=St.gi,_e=E.length,Ee=0;Ee<_e&&E[Ee].ratio*E[Ee].ratio<Pt;Ee++)Ye=E[Ee];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new tu(null).context;try{E.drawImage(this.Eg,0,0)}catch(At){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(At){this.vl=!0}}if(this.vl)return}}switch(E=Ne<b.width?Qe.offsetX+(b.width*Qe.x-Ne*Qe.x):0,Qe=He<b.height?Qe.offsetY+(b.height*Qe.y-He*Qe.y):0,this.flip){case Ir:a.translate(Math.min(b.width,Ne),0),a.scale(-1,1);break;case lr:a.translate(0,Math.min(b.height,He)),a.scale(1,-1);break;case lo:a.translate(Math.min(b.width,Ne),Math.min(b.height,He)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&St!==void 0&&Ye!==null&&Ye.ratio!==1){a.save(),y=Ye.ratio;try{a.drawImage(Ye.source,te/y,ne/y,Math.min(Ye.source.width,he/y),Math.min(Ye.source.height,se/y),E,Qe,Math.min(b.width,Ne),Math.min(b.height,He)),a instanceof ml&&(this.bt=[te/y,ne/y,Math.min(Ye.source.width,he/y),Math.min(Ye.source.height,se/y),E,Qe,Math.min(b.width,Ne),Math.min(b.height,He)])}catch(At){this.en=!1}a.restore()}else try{a.drawImage(x,te,ne,he,se,E,Qe,Math.min(b.width,Ne),Math.min(b.height,He)),a instanceof ml&&(this.bt=[te,ne,he,se,E,Qe,Math.min(b.width,Ne),Math.min(b.height,He)])}catch(At){this.en=!1}switch(this.flip){case Ir:a.scale(-1,1),a.translate(-Math.min(b.width,Ne),0);break;case lr:a.scale(1,-1),a.translate(0,-Math.min(b.height,He));break;case lo:a.scale(-1,-1),a.translate(-Math.min(b.width,Ne),-Math.min(b.height,He))}}}}},$a.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,te=qa(this,!0),ne=this.Eg,se=this.qn,he=0,_e=0;(se||!this.al&&ne&&ne.complete)&&(this.al=!0),ne===null?(isFinite(E.width)||(a=0),isFinite(E.height)||(y=0)):(he=se?+ne.width:ne.naturalWidth,_e=se?+ne.height:ne.naturalHeight),isFinite(E.width)||te===Tn||te===xi?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:ne!==null&&(a=he)),x=0):ne!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:he),isFinite(E.height)||te===Tn||te===Ai?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:ne!==null&&(y=_e)),b=0):ne!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:_e),isFinite(E.width)&&(a=E.width),isFinite(E.height)&&(y=E.height),E=this.maxSize,te=this.minSize,x=Math.max(x||0,te.width),b=Math.max(b||0,te.height),a=Math.min(E.width,a),y=Math.min(E.height,y),a=Math.max(x,a),y=Math.max(b,y),ne===null||ne.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),Jr(this.dc,a,y),this.Ge(0,0,a,y)},$a.prototype.eh=function(a,y,x,b){La(this,a,y,x,b)},ot.Object.defineProperties($a.prototype,{element:{get:function(){return this.Eg},set:function(a){var y=this.Eg;if(this.Uc=!0,y!==a){this.qn=a instanceof HTMLCanvasElement;var x=a instanceof HTMLImageElement;a===null||x||a instanceof HTMLVideoElement||this.qn||Lt("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var b=this.diagram;b!==null&&jp(b,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new kn),b!==null&&x&&Mc(b,this),a!==null&&(this.qn||a.complete===!0?(a.hn&&(a.ln instanceof Event&&this.Hd!==null?this.Hd(this,a.ln):a.sq===!0&&!a.ln&&this.Zg!==null&&a.eu&&this.Zg(this,a.eu)),a.sq=!0,this.desiredSize.w()||(Cs(this,!1),this.v())):x&&L1(this,a)),this.g("element",y,a),this.N()}}},source:{get:function(){return this.qo},set:function(a){var y=this.qo;if(y!==a){this.Uc=!0,this.qo=a;var x=Uf;if(ts){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<zm&&(Hf(),x=Uf),b=Fn("img"),b.hn=!0,L1(this,b);var E=this.rl;E!==null&&(b.crossOrigin=E(this)),b.src=a,x[a]=b,zm++}this.element=b,b!==null&&b.__goCache===void 0&&(b.__goCache=new M1),this.v(),this.N()}this.g("source",y,a)}}},sourceCrossOrigin:{get:function(){return this.rl},set:function(a){if(this.rl!==a&&(this.rl=a,this.element!==null)){var y=this.element.getAttribute("src");a===null&&typeof y=="string"?this.element.crossOrigin=null:a!==null&&(this.element.crossOrigin=a(this)),this.element.src=y}}},sourceRect:{get:function(){return this.Xg},set:function(a){var y=this.Xg;y.D(a)||(this.Xg=a=a.J(),this.N(),this.g("sourceRect",y,a))}},imageStretch:{get:function(){return this.Nk},set:function(a){var y=this.Nk;y!==a&&(this.Nk=a,this.N(),this.g("imageStretch",y,a))}},flip:{get:function(){return this.Xf},set:function(a){var y=this.Xf;y!==a&&(this.Xf=a,this.N(),this.g("flip",y,a))}},imageAlignment:{get:function(){return this.Mk},set:function(a){var y=this.Mk;y.D(a)||(this.Mk=a=a.J(),this.N(),this.g("imageAlignment",y,a))}},errorFunction:{get:function(){return this.Hd},set:function(a){var y=this.Hd;y!==a&&(this.Hd=a,this.g("errorFunction",y,a))}},successFunction:{get:function(){return this.Zg},set:function(a){var y=this.Zg;y!==a&&(this.Zg=a,this.g("successFunction",y,a))}},naturalBounds:{get:function(){return this.dc}}}),$a.prototype.redraw=$a.prototype.redraw,$a.prototype.reloadSource=$a.prototype.hA;var zm=0,wx=4;$a.className="Picture",Uf=new vi,$a.clearCache=Hf;function M1(){this.gi=null}function k1(a,y,x,b,E){a.gi===null&&(a.gi=[]);var te=new tu(null),ne=te.context,se=1/y;te.width=x/y,te.height=b/y,te.width!==0&&te.height!==0&&(y=new T1(te.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],E=x.source,x=x.ratio),ne.setTransform(se*x,0,0,se*x,0,0),ne.yc(),ne.drawImage(E,0,0),a.gi.push(y))}M1.className="PictureCacheArray";function T1(a,y){this.source=a,this.ratio=y}T1.className="PictureCacheInstance";function Gf(){this.os=new In,this.mc=null}Gf.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new In,this.mc=null};function Wf(a,y,x,b,E,te){a.mc=new ps,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=b,a.mc.isEvenOdd=te||!1,a.os.figures.add(a.mc),E!==void 0&&(a.mc.isShadowed=E)}function _x(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}Gf.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new Rr(gs);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},Gf.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new Rr(to);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function $h(a,y,x,b,E,te,ne){var se;se===void 0&&(se=!1);var he=new Rr(bs);he.point1X=y,he.point1Y=x,he.point2X=b,he.point2Y=E,he.endX=te,he.endY=ne,se&&he.close(),a.mc.segments.add(he)}function Um(a,y,x,b,E){var te;te===void 0&&(te=!1);var ne=new Rr(Da);ne.point1X=y,ne.point1Y=x,ne.endX=b,ne.endY=E,te&&ne.close(),a.mc.segments.add(ne)}Gf.prototype.arcTo=function(a,y,x,b,E,te,ne){te===void 0&&(te=0),ne===void 0&&(ne=!1);var se=new Rr(Xo);se.startAngle=a,se.sweepAngle=y,se.centerX=x,se.centerY=b,se.radiusX=E,se.radiusY=te!==0?te:E,ne&&se.close(),this.mc.segments.add(se)};function bx(a,y,x,b,E,te,ne,se){var he;he===void 0&&(he=!1),y=new Rr(Ka,ne,se,y,x,b,E,te),he&&y.close(),a.mc.segments.add(y)}function A1(a){var y=Hm;return y!==null?(Hm=null,y.reset(a),y):(y=new Gf,y.reset(a),y)}var Hm=null;Gf.className="StreamGeometryContext";function ba(a,y){var x=a.toLowerCase(),b=Vt.Ze;b[a]=y,b[x]=a}ba("Rectangle",function(a,y,x){a="r"+y+","+x;var b=Vt.Mf[a];return b!==void 0||(b=new In(In.u),b.endX=y,b.endY=x,Vt.Nf<Vt.vm&&(Vt.Mf[a]=b,Vt.Nf++)),b}),ba("Square",function(a,y,x){a="s"+y+","+x;var b=Vt.Mf[a];return b!==void 0||(b=new In(In.u),b.endX=y,b.endY=x,b.defaultStretch=fi,Vt.Nf<Vt.vm&&(Vt.Mf[a]=b,Vt.Nf++)),b}),ba("RoundedRectangle",function(a,y,x){a=a?a.parameter1:NaN,(isNaN(a)||0>a)&&(a=5),a=Math.min(a,y/3),a=Math.min(a,x/3);var b="rr"+y+","+x+","+a,E=Vt.Mf[b];if(E!==void 0)return E;var te=a*Vt.wg;return E=new In().add(new ps(a,0,!0).add(new Rr(to,y-a,0)).add(new Rr(bs,y,a,y-te,0,y,te)).add(new Rr(to,y,x-a)).add(new Rr(bs,y-a,x,y,x-te,y-te,x)).add(new Rr(to,a,x)).add(new Rr(bs,0,x-a,te,x,0,x-te)).add(new Rr(to,0,a)).add(new Rr(bs,a,0,0,te,te,0).close())),1<te&&(E.spot1=new ui(0,0,te,te),E.spot2=new ui(1,1,-te,-te)),Vt.Nf<Vt.vm&&(Vt.Mf[b]=E,Vt.Nf++),E}),ba("Border","RoundedRectangle"),ba("Ellipse",function(a,y,x){a="e"+y+","+x;var b=Vt.Mf[a];return b!==void 0||(b=new In(In.F),b.endX=y,b.endY=x,b.spot1=Il,b.spot2=Ca,Vt.Nf<Vt.vm&&(Vt.Mf[a]=b,Vt.Nf++)),b}),ba("Circle",function(a,y,x){a="c"+y+","+x;var b=Vt.Mf[a];return b!==void 0||(b=new In(In.F),b.endX=y,b.endY=x,b.spot1=Il,b.spot2=Ca,b.defaultStretch=fi,Vt.Nf<Vt.vm&&(Vt.Mf[a]=b,Vt.Nf++)),b}),ba("TriangleRight",function(a,y,x){return new In().add(new ps(0,0).add(new Rr(to,y,.5*x)).add(new Rr(to,0,x).close())).pm(0,.25,.5,.75)}),ba("TriangleDown",function(a,y,x){return new In().add(new ps(0,0).add(new Rr(to,y,0)).add(new Rr(to,.5*y,x).close())).pm(.25,0,.75,.5)}),ba("TriangleLeft",function(a,y,x){return new In().add(new ps(y,x).add(new Rr(to,0,.5*x)).add(new Rr(to,y,0).close())).pm(.5,.25,1,.75)}),ba("TriangleUp",function(a,y,x){return new In().add(new ps(y,x).add(new Rr(to,0,x)).add(new Rr(to,.5*y,0).close())).pm(.25,.5,.75,1)}),ba("Triangle","TriangleUp"),ba("Diamond",function(a,y,x){return new In().add(new ps(.5*y,0).add(new Rr(to,0,.5*x)).add(new Rr(to,.5*y,x)).add(new Rr(to,y,.5*x).close())).pm(.25,.25,.75,.75)}),ba("LineH",function(a,y,x){return a=new In(In.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),ba("LineV",function(a,y,x){return a=new In(In.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),ba("None","Rectangle"),ba("BarH","Rectangle"),ba("BarV","Rectangle"),ba("MinusLine","LineH"),ba("PlusLine",function(a,y,x){return new In().add(new ps(0,x/2,!1).add(new Rr(to,y,x/2)).add(new Rr(gs,y/2,0)).add(new Rr(to,y/2,x)))}),ba("XLine",function(a,y,x){return new In().add(new ps(0,x,!1).add(new Rr(to,y,0)).add(new Rr(gs,0,0)).add(new Rr(to,y,x)))}),ba("LineRight",function(a,y,x){return new In().add(new ps(.25*y,0,!1).add(new Rr(to,.75*y,.5*x)).add(new Rr(to,.25*y,x)))}),ba("LineDown",function(a,y,x){return new In().add(new ps(0,.25*x,!1).add(new Rr(to,.5*y,.75*x)).add(new Rr(to,y,.25*x)))}),ba("LineLeft",function(a,y,x){return new In().add(new ps(.75*y,0,!1).add(new Rr(to,.25*y,.5*x)).add(new Rr(to,.75*y,x)))}),ba("LineUp",function(a,y,x){return new In().add(new ps(0,.75*x,!1).add(new Rr(to,.5*y,.25*x)).add(new Rr(to,y,.75*x)))}),Vt.um={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8",BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4",BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8",TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3",Circle:"F1 m 8,4 b 0 360 -4 0 4 z",Block:"F1 m 0,0 l 0,8 8,0 0,-8 z",StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",X:"m 0,0 l 8,8 m 0,-8 l -8,8",TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z",DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z",TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z",OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8",OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"};function Iv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=$r,this.ir=null,this.jr="",this.lr=As,this.Gq="",this.Hq=xr,this.Pq=si,this.Kq=Ei,this.Up=null,this.Cq=127,this.zr=yi,this.yr="gray",this.Vg=4}Iv.prototype.copy=function(){var a=new Iv;return a.zq=this.zq,a.Kp=this.Kp,a.tr=this.tr,a.vr=this.vr,a.ur=this.ur,a.oq=this.oq,a.fr=this.fr,a.hr=this.hr,a.gr=this.gr.J(),a.ir=this.ir,a.jr=this.jr,a.lr=this.lr.J(),a.Gq=this.Gq,a.Hq=this.Hq.J(),a.Pq=this.Pq.J(),a.Kq=this.Kq.J(),a.Up=this.Up,a.Cq=this.Cq,a.zr=this.zr.J(),a.yr=this.yr,a.Vg=this.Vg,a};function Ci(a,y){a===void 0||a instanceof ks||typeof a=="string"?Dn.call(this,a):(Dn.call(this),a&&(y=a)),this.G=2408959,this.Tf="",this.P=null,this.Jg="",this.Qf=this.Ug=null,this.ec="",this.Ah=this.Ig=null,this.ke=new ft(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new sn,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Je(Ci,Dn),Ci.prototype.cloneProtected=function(a){Dn.prototype.cloneProtected.call(this,a),a.G=this.G&-4097|49152,a.Tf=this.Tf,this.P!==null&&(a.P=this.P.nc?this.P:this.P.copy()),a.Jg=this.Jg,a.Qf=null,a.ec=this.ec,a.ke.assign(this.ke),a.Ao=this.Ao},$e=Ci.prototype,$e.Af=function(a){Dn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},$e.toString=function(){var a=Mn(this.constructor)+"#"+sr(this);return this.data!==null&&(a+="("+wi(this.data)+")"),a};function el(a){a.P===null?a.P=new Iv:a.P.nc&&(a.P=a.P.copy())}$e.th=function(){Dn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},$e.gk=function(a,y,x,b,E,te,ne){var se=this.diagram;se!==null&&(a===es&&y==="elements"?E instanceof Dn?gd(E,function(he){ly(se.partManager,he),ad(se,he)}):Mc(se,E):a===Jo&&y==="elements"&&(E instanceof Dn?gd(E,function(he){uy(se.partManager,he,se)}):jp(se,E)),se.cb(a,y,x,b,E,te,ne))},$e.La=function(a){if(Dn.prototype.La.call(this,a),this.data!==null){for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];E instanceof Dn&&gd(E,function(te){te.data!==null&&te.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Ci.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Ci.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Ci.prototype.bh=function(a,y){if(y!==null){var x=null,b=this.Qf;if(b!==null&&(x=b.I(a)),x!==y){if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}b===null&&(this.Qf=b=new on),y.Tf!==a&&(y.category=a),b.add(a,y),a=this.diagram,a!==null&&(a.add(y),a=y.adornedObject,a!==null&&(a=a.ih(),a!==null&&(y.data=a.data)))}}},Ci.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},Ci.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Wn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);zn(y)}},Ci.prototype.updateAdornments=function(){var a=this.diagram;if(a!==null){for(var y=this.adornments;y.next();){var x=y.value;x.v(),x.placeholder&&x.placeholder.v()}e:{if(this.isSelected&&this.selectionAdorned&&(y=this.selectionObject,y!==null&&this.actualBounds.w()&&this.isVisible()&&y.Ed()&&y.actualBounds.w())){if(x=this.Pj("Selection"),x===null){if(x=this.selectionAdornmentTemplate,x===null&&(x=this.ph()?a.linkSelectionAdornmentTemplate:this instanceof Ki?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Fr))break e;nu(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Dn.Link),x.adornedObject=y)}if(x!==null){x.type===Dn.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Px(this,a),y=this.adornments;y.next();)y.value.La()}},Ci.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Rv(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function Px(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function Gm(a){if(Nc(a)===!1){Bv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function N1(a){if(a.G|=2097152,Nc(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||I1(a,y,x),x=a.Ib;var b=sn.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),sn.free(b),Bv(a,!1)}}Ci.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new Ii);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),this.Lb=te,te.ws()||te.pp(E)},Ci.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=$i;this.locationSpot.sb()&&(te=this.locationSpot);var ne=ft.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,ne.yi(x.x,x.y,x.width,x.height,te),y.Lb!==null&&y.Lb.Ga(ne),ne.offset(-y.measuredBounds.x,-y.measuredBounds.y),te=y.panel;te!==null&&te!==this;)te.Lb!==null&&te.Lb.Ga(ne),ne.offset(-te.measuredBounds.x,-te.measuredBounds.y),te=te.panel;else ne.yi(y,x,b,E,te);a.rotate(this.Kb,ne.x,ne.y),ft.free(ne)}},Ci.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Ci.prototype.moveTo=function(a,y,x){a=ft.allocAt(a,y),this.move(a,x),ft.free(a)},Ci.prototype.isVisible=function(){if(!this.visible)return!1;var a=this.layer;if(a!==null){if(!a.visible)return!1;if(a=a.diagram,a!==null&&a.animationManager.fv(this))return!0}return a=this.containingGroup,!!(a===null||a.isSubGraphExpanded&&a.isVisible())},Ci.prototype.Zb=function(a){var y=this.diagram;a?(this.C(4),this.Wb(),y!==null&&y.De.add(this)):(this.C(8),this.Ej()),this.oh(),y!==null&&(y.Ya(),y.N())},Ci.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new on),y.I(a)!==null)return y.I(a);var x=Dn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function ec(a,y,x,b){b===void 0&&(b=new ft),x=x.Mc()?$i:x;var E=y.naturalBounds;if(b.h(E.width*x.x+x.offsetX,E.height*x.y+x.offsetY),y===null||y===a)return b;for(y.transform.Ga(b),y=y.panel;y!==null&&y!==a;)y.transform.Ga(b),y=y.panel;return a.Lb!==null&&a.Lb.Ga(b),b.offset(-a.uc.x,-a.uc.y),b}Ci.prototype.mi=function(a){return a===void 0&&(a=new sn),a.assign(this.actualBounds)},Ci.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function D1(a){var y=ft.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof ir?x.strokeWidth:0;if(y.yi(0,0,b.width+E,b.height+E,a.locationSpot),x!==a)for(y.offset(-E/2,-E/2),x.transform.Ga(y),x=x.panel;x!==null&&x!==a;)x.transform.Ga(y),x=x.panel;return a.Lb!==null&&a.Lb.Ga(y),y.offset(-a.uc.x,-a.uc.y),y}function yd(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=h1(a));var b=a.ag,E=2*b;if(!a.isShadowed)return x.h(y.x-1-b,y.y-1-b,y.width+2+E,y.height+2+E),x;b=y.x,E=y.y;var te=y.width;y=y.height;var ne=a.shadowBlur;return a=a.shadowOffset,te+=ne,y+=ne,b-=ne/2,E-=ne/2,0<a.x?te+=a.x:(b+=a.x,te-=a.x),0<a.y?y+=a.y:(E+=a.y,y-=a.y),x.h(b-1,E-1,te+2,y+2),x}Ci.prototype.arrange=function(){if(Fa(this)===!1)N1(this);else{hh(this,!1);var a=this.Ib,y=sn.alloc();y.assign(a);var x=Dc(this);this.eh(0,0,this.uc.width,this.uc.height);var b=this.position;I1(this,b,this.location),a.ka(),a.x=b.x,a.y=b.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||Vt.B(y.width,a.width)&&Vt.B(y.height,a.height)||0<=this.vw&&this.C(16),sn.free(y),Bv(this,!1)}},$e=Ci.prototype,$e.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=sn.alloc();E.assign(x.documentBounds),E.Fv(x.padding),a.x>E.x&&a.y>E.y&&a.right<E.right&&a.bottom<E.bottom&&y.x>E.x&&y.y>E.y&&y.right<E.right&&y.bottom<E.bottom&&(b=!0),sn.free(E)}!(this.G&65536)&&a.D(y)||B1(this,b,x),x.N(),!a.w()&&!y.w()||Ui(a,y)||(this instanceof qn&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},$e.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var b=this.diagram;return b!==null&&O1(this,b,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||b!==null&&!b.animationManager.isTicking&&b.undoManager.isUndoingRedoing||(b=this.ke,this.ke=new ft(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),Nc(this)===!1&&Fa(this)===!1&&(Gm(this),N1(this)),!0};function O1(a,y,x,b,E){y===null||a instanceof Fr||(y=y.animationManager,y.zb&&rh(y,a,new ft(b,E),x))}$e.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;Nc(this)||Fa(this)?E.h(NaN,NaN):E.h(E.x+a-b.x,E.y+y-b.y),b.h(a,y)}else{if(E.x===a&&E.y===y)return;b.h(b.x+a-E.x,b.y+y-E.y),E.h(a,y)}Gm(this)},$e.Av=function(){this.G&=-2097153,Gm(this)};function I1(a,y,x){var b=D1(a),E=a.diagram,te=x.w(),ne=y.w();te&&ne?a.G&2097152?R1(a,y,x,E,b):F1(a,y,x,E,b):te?R1(a,y,x,E,b):ne&&F1(a,y,x,E,b),a.G|=2097152,ft.free(b),a.Uk()}function R1(a,y,x,b,E){var te=y.x,ne=y.y;y.h(x.x-E.x,x.y-E.y),b!==null&&(x=b.animationManager,(b=x.defaultAnimation.isAnimating)||!x.zb||a instanceof Fr||rh(x,a,new ft(te,ne),y),b||y.x===te&&y.y===ne||a.g("position",new ft(te,ne),y.copy()))}function F1(a,y,x,b,E){var te=x.copy();x.h(y.x+E.x,y.y+E.y),x.D(te)||b===null||a.g("location",te,x.copy())}function B1(a,y,x){jv(a,!1),a instanceof qn&&Kh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?Dc(a)?(uo(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}$e.si=function(){return!0},$e.Zc=function(){return!0},$e.ph=function(){return!1},$e.Dd=function(){return!0};function Fv(a,y,x,b){y.constructor===a.constructor||U1||(U1=!0,Sn('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),Sn(" Old class: "+Mn(a.constructor)+", new class: "+Mn(y.constructor)+", part: "+a.toString())),a.Ej();var E=a.data;x=a.layerName;var te=a.isSelected,ne=a.isHighlighted,se=!0,he=!0,_e=!1;a instanceof qn&&(se=a.isTreeLeaf,he=a.isTreeExpanded,_e=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=b,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,b=!0,y!==null&&(b=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=E,a.G=te?a.G|4096:a.G&-4097,a.G=ne?a.G|524288:a.G&-524289,a instanceof qn&&(a.U=se?a.U|4:a.U&-5,a.U=he?a.U|1:a.U&-2,a.U=_e?a.U|2:a.U&-3),E!==null&&a.La(),E=a.layerName,E!==x&&(a.Jg=x,a.layerName=E),y!==null&&(y.skipsUndoManager=b),a.Zc()&&a.C(64)}Ci.prototype.canCopy=function(){if(!this.copyable)return!1;var a=this.layer;return a===null?!0:a.allowCopy?(a=a.diagram,a===null?!0:!!a.allowCopy):!1},Ci.prototype.canDelete=function(){if(!this.deletable)return!1;var a=this.layer;return a===null?!0:a.allowDelete?(a=a.diagram,a===null?!0:!!a.allowDelete):!1},Ci.prototype.canEdit=function(){if(!this.textEditable)return!1;var a=this.layer;return a===null?!0:a.allowTextEdit?(a=a.diagram,a===null?!0:!!a.allowTextEdit):!1},Ci.prototype.canGroup=function(){if(!this.groupable)return!1;var a=this.layer;return a===null?!0:a.allowGroup?(a=a.diagram,a===null?!0:!!a.allowGroup):!1},Ci.prototype.canMove=function(){if(!this.movable)return!1;var a=this.layer;return a===null?!0:a.allowMove?(a=a.diagram,a===null?!0:!!a.allowMove):!1},Ci.prototype.canReshape=function(){if(!this.reshapable)return!1;var a=this.layer;return a===null?!0:a.allowReshape?(a=a.diagram,a===null?!0:!!a.allowReshape):!1},Ci.prototype.canResize=function(){if(!this.resizable)return!1;var a=this.layer;return a===null?!0:a.allowResize?(a=a.diagram,a===null?!0:!!a.allowResize):!1},Ci.prototype.canRotate=function(){if(!this.rotatable)return!1;var a=this.layer;return a===null?!0:a.allowRotate?(a=a.diagram,a===null?!0:!!a.allowRotate):!1},Ci.prototype.canSelect=function(){if(!this.selectable)return!1;var a=this.layer;return a===null?!0:a.allowSelect?(a=a.diagram,a===null?!0:!!a.allowSelect):!1};function Nc(a){return(a.G&32768)!==0}function Bv(a,y){a.G=y?a.G|32768:a.G&-32769}function jv(a,y){a.G=y?a.G|65536:a.G&-65537}function Dc(a){return(a.G&131072)!==0}$e=Ci.prototype,$e.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function Wm(a,y){a.G=y?a.G|1048576:a.G&-1048577}$e.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},$e.N=function(){var a=this.diagram;a!==null&&!Fa(this)&&!Nc(this)&&this.isVisible()&&this.Ib.w()&&a.N(yd(this,this.Ib))},$e.v=function(){Dn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof qn&&this.labeledLink!==null&&Ra(this.labeledLink),a.$b(!0))},$e.Vo=function(a){a||(a=this.Ah,a!==null&&Zv(a,this))},$e.Wo=function(a){a||(a=this.Ah,a!==null&&Vv(a,this))},$e.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},$e.oz=function(){return zv(this,this)};function zv(a,y){var x=y.containingGroup;return x!==null?1+zv(a,x):y instanceof qn&&(y=y.labeledLink,y!==null)?zv(a,y):0}$e.sz=function(){return j1(this,this)};function j1(a,y){var x=y.containingGroup;return x!==null||y instanceof qn&&(x=y.labeledLink,x!==null)?j1(a,x):y}$e.Td=function(a){return a instanceof Ki?Uv(this,this,a):!1};function Uv(a,y,x){if(y===x||x===null)return!1;var b=y.containingGroup;return b===null||b!==x&&!Uv(a,b,x)?y instanceof qn&&(y=y.labeledLink,y!==null)?Uv(a,y,x):!1:!0}$e.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof Ki&&Wm(y,!0),y instanceof qn){var x=y.labeledLink;x!==null&&(y=x)}y=y.containingGroup}for(x=null,y=a;y!==null;){if(y.G&1048576){x=y;break}y instanceof qn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof Ki&&Wm(y,!1),y instanceof qn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Ci.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof qn&&this.isLinkLabel)},Ci.prototype.C=function(a){if(a===void 0&&(a=16777215),this.isLayoutPositioned&&a&this.layoutConditions){var y=this.layer;y!==null&&y.isTemporary||this instanceof qn&&this.isLinkLabel?y=!1:(y=this.diagram,y=!(y!==null&&y.undoManager.isUndoingRedoing))}else y=!1;if(y)if(y=this.Ah,y!==null){var x=y.layout;x!==null?x.C():y.C(a)}else a=this.diagram,a!==null&&(a=a.layout,a!==null&&a.C())};function z1(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function Oc(a,y,x,b,E,te){if(te===void 0&&(te=null),!(a.contains(y)||te!==null&&!te(y)||y instanceof Fr)){if(a.add(y),y instanceof qn){if(x&&y instanceof Ki)for(var ne=y.memberParts;ne.next();)Oc(a,ne.value,x,b,E,te);if(E!==!1)for(ne=y.linksConnected;ne.next();){var se=ne.value;if(!a.contains(se)){var he=se.fromNode,_e=se.toNode;he=he===null||a.contains(he),_e=_e===null||a.contains(_e),(E?he&&_e:he||_e)&&Oc(a,se,x,b,E,te)}}if(1<b)for(y=y.Ou();y.next();)Oc(a,y.value,x,b-1,E,te)}else if(y instanceof Bn)for(y=y.labelNodes;y.next();)Oc(a,y.value,x,b,E,te)}}ot.Object.defineProperties(Ci.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?yr:this.Qf.iteratorValues}},layer:{get:function(){return this.Ig}},diagram:{get:function(){var a=this.Ig;return a==null?null:a.diagram}},layerName:{get:function(){return this.Jg},set:function(a){var y=this.Jg;if(y!==a){var x=this.diagram;if((x===null||x.Qj(a)!==null&&!x.partManager.addsToTemporaryLayer)&&(this.Jg=a,x!==null&&x.Ya(),this.g("layerName",y,a),y=this.layer,y!==null&&y.name!==a&&(x=y.diagram,x!==null&&(a=x.Qj(a),a!==null&&a!==y)))){var b=y.pc(-1,this,!0);if(0<=b&&x.cb(Jo,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(es,"parts",a,null,this,!0,b),b=this.layerChanged,b!==null){var E=x.aa;x.aa=!0,b(this,y,a),x.aa=E}}}}},layerChanged:{get:function(){return this.P!==null?this.P.zq:null},set:function(a){var y=this.layerChanged;y!==a&&(el(this),this.P.zq=a,this.g("layerChanged",y,a))}},zOrder:{get:function(){return this.Ao},set:function(a){var y=this.Ao;if(y!==a){this.Ao=a;var x=this.layer;x!==null&&yf(x,-1,this),this.g("zOrder",y,a),a=this.diagram,a!==null&&a.N()}}},locationObject:{get:function(){if(this.nf===null){var a=this.locationObjectName;a!==""?(a=this.fb(a),a!==null?this.nf=a:this.nf=this):this instanceof Fr?this.type!==Dn.Link&&this.placeholder!==null?this.nf=this.placeholder:this.nf=this:this.nf=this}return this.nf.visible?this.nf:this}},minLocation:{get:function(){return this.P!==null?this.P.Pq:si},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),el(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:Ei},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),el(this),this.P.Kq=a,this.g("maxLocation",y,a))}},locationObjectName:{get:function(){return this.P!==null?this.P.Gq:""},set:function(a){var y=this.locationObjectName;y!==a&&(el(this),this.P.Gq=a,this.nf=null,this.v(),this.g("locationObjectName",y,a))}},locationSpot:{get:function(){return this.P!==null?this.P.Hq:xr},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),el(this),this.P.Hq=a,this.v(),this.g("locationSpot",y,a))}},location:{get:function(){return this.ke},set:function(a){var y=a.x,x=a.y,b=this.ke;if(!(b.x===y||isNaN(b.x)&&isNaN(y))||!(b.y===x||isNaN(b.y)&&isNaN(x))){if(a=a.copy(),y=a,this.ph())y=!1;else{if(this.ke=y,this.G|=2097152,Fa(this)===!1&&(Gm(this),x=this.pa,x.w())){var E=this.diagram;if(E===null||E.animationManager.isTicking||!E.undoManager.isUndoingRedoing){var te=x.copy();x.h(x.x+(y.x-b.x),x.y+(y.y-b.y)),O1(this,E,x,te.x,te.y),this.g("position",te,x.copy())}}y=!0}y&&this.g("location",b,a.copy())}}},category:{get:function(){return this.Tf},set:function(a){var y=this.Tf;if(y!==a){this.svg!==null&&(this.svg.remove(),this.Uc=!0);var x=this.diagram,b=this.data,E=null;if(x!==null&&b!==null&&!(this instanceof Fr)){var te=x.model.undoManager;te.isEnabled&&!te.isUndoingRedoing&&(E=this.clone(),E.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||b===null||this instanceof Fr?this instanceof Fr&&(E=this.adornedPart,E!==null&&(a=E.Qf,a!==null&&a.remove(y),E.bh(this.category,this))):(te=x.model,te.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(b,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(nu(x),x=x.copy(),x!==null&&Fv(this,x,y,a))):(te!==null&&te.jm(b,a),x=dS(x.partManager,b,a),x!==null&&(nu(x),x=x.copy(),x===null||x instanceof Bn||(b=this.location.copy(),Fv(this,x,y,a),this.location.w()||(this.location=b)))),E!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",E,y))))}}},self:{get:function(){return this},set:function(a){Fv(this,a,this.category,a.category)}},copyable:{get:function(){return(this.G&1)!==0},set:function(a){var y=(this.G&1)!==0;y!==a&&(this.G^=1,this.g("copyable",y,a))}},deletable:{get:function(){return(this.G&2)!==0},set:function(a){var y=(this.G&2)!==0;y!==a&&(this.G^=2,this.g("deletable",y,a))}},textEditable:{get:function(){return(this.G&4)!==0},set:function(a){var y=(this.G&4)!==0;y!==a&&(this.G^=4,this.g("textEditable",y,a),this.Wb())}},groupable:{get:function(){return(this.G&8)!==0},set:function(a){var y=(this.G&8)!==0;y!==a&&(this.G^=8,this.g("groupable",y,a))}},movable:{get:function(){return(this.G&16)!==0},set:function(a){var y=(this.G&16)!==0;y!==a&&(this.G^=16,this.g("movable",y,a))}},selectionAdorned:{get:function(){return(this.G&32)!==0},set:function(a){var y=(this.G&32)!==0;y!==a&&(this.G^=32,this.g("selectionAdorned",y,a),this.Wb())}},isInDocumentBounds:{get:function(){return(this.G&64)!==0},set:function(a){var y=(this.G&64)!==0;if(y!==a){this.G^=64;var x=this.diagram;x!==null&&x.Ya(),this.g("isInDocumentBounds",y,a)}}},isLayoutPositioned:{get:function(){return(this.G&128)!==0},set:function(a){var y=(this.G&128)!==0;y!==a&&(this.G^=128,this.g("isLayoutPositioned",y,a),this.C(a?4:8))}},selectable:{get:function(){return(this.G&256)!==0},set:function(a){var y=(this.G&256)!==0;y!==a&&(this.G^=256,this.g("selectable",y,a),this.Wb())}},reshapable:{get:function(){return(this.G&512)!==0},set:function(a){var y=(this.G&512)!==0;y!==a&&(this.G^=512,this.g("reshapable",y,a),this.Wb())}},resizable:{get:function(){return(this.G&1024)!==0},set:function(a){var y=(this.G&1024)!==0;y!==a&&(this.G^=1024,this.g("resizable",y,a),this.Wb())}},rotatable:{get:function(){return(this.G&2048)!==0},set:function(a){var y=(this.G&2048)!==0;y!==a&&(this.G^=2048,this.g("rotatable",y,a),this.Wb())}},isSelected:{get:function(){return(this.G&4096)!==0},set:function(a){var y=(this.G&4096)!==0;if(y!==a){var x=this.diagram;if(!a||this.canSelect()&&!(x!==null&&x.selection.count>=x.maxSelectionCount)){this.G^=4096;var b=!1;if(x!==null){b=x.skipsUndoManager,x.skipsUndoManager=!0;var E=x.selection;E.ka(),a?E.add(this):E.remove(this),E.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=b)}}}},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&&(el(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&&(el(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&&(el(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 Bn?(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&&(el(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&&(el(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&&(el(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:$r},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),el(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&&(el(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&&(el(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:As},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),el(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&&Lt("Cannot make a Group a member of itself: "+this.toString()),Lt("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?Vv(y,this):this instanceof Ki&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Zv(a,this):this instanceof Ki&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var b=this.data,E=x.model;if(b!==null&&E.Xj()){var te=E.wa(a!==null?a.data:null);E.mp(b,te)}}if(b=this.containingGroupChanged,b!==null&&(E=!0,x!==null&&(E=x.aa,x.aa=!0),b(this,y,a),x!==null&&(x.aa=E)),this instanceof Ki){for(x=new kn,Oc(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof qn)for(b=b.linksConnected;b.next();)Zf(b.value)}if(this instanceof qn){for(x=this.linksConnected;x.next();)Zf(x.value);x=this.labeledLink,x!==null&&Zf(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&yf(y,-1,a))}}else Lt("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&&(el(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof qn&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(el(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&&(el(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:yi},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),el(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&&(el(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&&(el(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Ci.prototype.invalidateLayout=Ci.prototype.C,Ci.prototype.findCommonContainingGroup=Ci.prototype.px,Ci.prototype.isMemberOf=Ci.prototype.Td,Ci.prototype.findTopLevelPart=Ci.prototype.sz,Ci.prototype.findSubGraphLevel=Ci.prototype.oz,Ci.prototype.ensureBounds=Ci.prototype.Va,Ci.prototype.getDocumentBounds=Ci.prototype.mi,Ci.prototype.findObject=Ci.prototype.fb,Ci.prototype.moveTo=Ci.prototype.moveTo,Ci.prototype.invalidateAdornments=Ci.prototype.Wb,Ci.prototype.clearAdornments=Ci.prototype.Ej,Ci.prototype.removeAdornment=Ci.prototype.Jf,Ci.prototype.addAdornment=Ci.prototype.bh,Ci.prototype.findAdornment=Ci.prototype.Pj,Ci.prototype.updateTargetBindings=Ci.prototype.La;var U1=!1;Ci.className="Part",Ci.LayoutNone=0,Ci.LayoutAdded=1,Ci.LayoutRemoved=2,Ci.LayoutShown=4,Ci.LayoutHidden=8,Ci.LayoutNodeSized=16,Ci.LayoutGroupLayout=32,Ci.LayoutNodeReplaced=64,Ci.LayoutStandard=127,Ci.LayoutAll=16777215;function Fr(a,y){a===void 0||a instanceof ks||typeof a=="string"?Ci.call(this,a):(Ci.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)}Je(Fr,Ci),Fr.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Fr.prototype.updateRelationshipsFromData=function(){},Fr.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Bn&&y instanceof ir){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var b=0;b<y;b++){var E=x[b];E.isPanelMain&&E instanceof ir&&(E.ua=a)}}},Fr.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Fa(a))},Fr.prototype.Zc=function(){return!1},Fr.prototype.gk=function(a,y,x,b,E,te,ne){if(a===es&&y==="elements"){if(E instanceof ja)this.$a===null&&(this.$a=E);else if(E instanceof Dn){var se=E.Nl(function(he){return he instanceof ja});se instanceof ja&&this.$a===null&&(this.$a=se)}}else a===Jo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Dn&&this.$a.rg(b)&&(this.$a=null));Ci.prototype.gk.call(this,a,y,x,b,E,te,ne)},Fr.prototype.updateAdornments=function(){},Fr.prototype.Lj=function(){},ot.Object.defineProperties(Fr.prototype,{placeholder:{get:function(){return this.$a}},adornedObject:{get:function(){return this.ue},set:function(a){var y=this.adornedPart,x=null;a!==null&&(x=a.part),y===null||a!==null&&y===x||y.Jf(this.category),this.ue=a,x!==null&&x.bh(this.category,this)}},adornedPart:{get:function(){var a=this.ue;return a!==null?a.part:null}},containingGroup:{get:function(){return null}}}),Fr.className="Adornment";function Hv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=us,this.er=Km,this.Kr=this.ij=this.Nq=this.Mq=null}Hv.prototype.copy=function(){var a=new Hv;return a.Dq=this.Dq,a.Eq=this.Eq,a.gj=this.gj,a.Vr=this.Vr,a.yp=this.yp.J(),a.er=this.er,a.Mq=this.Mq,a.Nq=this.Nq,a.ij=this.ij,a.Kr=this.Kr,a};function qn(a,y){a===void 0||a instanceof ks||typeof a=="string"?Ci.call(this,a):(Ci.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new Ln,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Je(qn,Ci),qn.prototype.cloneProtected=function(a){Ci.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},$e=qn.prototype,$e.Af=function(a){Ci.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function tc(a){a.Ba===null?a.Ba=new Hv:a.Ba.nc&&(a.Ba=a.Ba.copy())}$e.th=function(){Ci.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function H1(a,y){y!==null&&(a.af===null&&(a.af=new kn),a.af.add(y))}function G1(a,y,x,b){if(y===null||a.af===null)return null;for(var E=a.af.iterator;E.next();){var te=E.value;if(te.Ds===a&&te.cv===y&&te.Ox===x&&te.Px===b||te.Ds===y&&te.cv===a&&te.Ox===b&&te.Px===x)return te}return null}$e.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=G1(this,a,y,x),a!==null&&a.Sl()},$e.gk=function(a,y,x,b,E,te,ne){a===es&&y==="elements"?this.wc=null:a===Jo&&y==="elements"&&(this.wc=null),Ci.prototype.gk.call(this,a,y,x,b,E,te,ne)},$e.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(vl(x.fromPort),vl(x.toPort),x.bb())}};function W1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(vl(x.fromPort),vl(x.toPort),x.bb())}}function vl(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||vl(y.port)}}$e.si=function(){return!0},qn.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},qn.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},qn.prototype.isVisible=function(){if(!Ci.prototype.isVisible.call(this))return!1;var a=!0,y=Xh,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===Xh){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Ps){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===Tf&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(b){return!b.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},qn.prototype.Zb=function(a){Ci.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var b=x.To(this);b===null||b.Td(this.containingGroup)||x.bb()}x.Zb(a)}},qn.prototype.qx=function(){var a=new kn,y=new kn;return Z1(this,this,a,y),y.iterator};function Z1(a,y,x,b){if(y!==null&&!x.has(y)){x.add(y);var E=!0,te=a.diagram;te!==null&&(E=te.isTreePathToChildren),y.linksConnected.each(function(ne){ne.isTreeLink?(E?ne.fromNode===y:ne.toNode===y)&&Z1(a,E?ne.toNode:ne.fromNode,x,b):b.add(ne)})}}qn.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new _r(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},$e=qn.prototype,$e.Mo=function(a){a===void 0&&(a=null);var y=new _r(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},$e.Sd=function(a){a===void 0&&(a=null);var y=new _r(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},$e.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode===this?(a===null||E.fromPortId===a)&&(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new kn,y.add(x),y.add(E)):x=E):E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new kn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new fr(x):yr},$e.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode!==this||a!==null&&E.fromPortId!==a||(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new kn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new fr(x):yr},$e.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new kn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new fr(x):yr},$e.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new _r(this.jb),E=this;return b.predicate=function(te){return!((te.fromNode!==E||te.toNode!==a||y!==null&&te.fromPortId!==y||x!==null&&te.toPortId!==x)&&(te.fromNode!==a||te.toNode!==E||x!==null&&te.fromPortId!==x||y!==null&&te.toPortId!==y))},b},$e.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new _r(this.jb),E=this;return b.predicate=function(te){return!(te.fromNode!==E||te.toNode!==a||y!==null&&te.fromPortId!==y||x!==null&&te.toPortId!==x)},b};function Zm(a,y,x){vl(x);var b=a.jb.contains(y);if(b||a.jb.add(y),!b||y.fromNode===y.toNode){var E=a.linkConnected;if(E!==null){var te=!0,ne=a.diagram;ne!==null&&(te=ne.aa,ne.aa=!0),E(a,y,x),ne!==null&&(ne.aa=te)}}!b&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(b=!0,a=a.diagram,a!==null&&(b=a.isTreePathToChildren),E=b?y:x,te=b?x:y,E.ci||(E.ci=te),!te.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(b?x===te&&(te.isTreeLeaf=!1):y===te&&(te.isTreeLeaf=!1))))}function Vm(a,y,x){vl(x);var b=a.jb.remove(y),E=null;if(b||y.toNode===y.fromNode){var te=a.linkDisconnected;if(E=a.diagram,te!==null){var ne=!0;E!==null&&(ne=E.aa,E.aa=!0),te(a,y,x),E!==null&&(E.aa=ne)}}b&&y.isTreeLink&&(x=!0,E!==null&&(x=E.isTreePathToChildren),a=x?y.toNode:y.fromNode,y=x?y.fromNode:y.toNode,a!==null&&(a.ci=!1),y===null||y.isTreeLeaf||(y.jb.count===0?(y.ci=null,E!==null&&E.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):ag(y)))}function ag(a){if(a.ci=!1,a.jb.count!==0){var y=!0,x=a.diagram;if(x===null||!x.undoManager.isUndoingRedoing){for(x!==null&&(y=x.isTreePathToChildren),x=a.jb.iterator;x.next();){var b=x.value;if(b.isTreeLink){if(y){if(b.fromNode===a){a.isTreeLeaf=!1;return}}else if(b.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}qn.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},$e=qn.prototype,$e.Vo=function(a){Ci.prototype.Vo.call(this,a),a||(ag(this),a=this.Yk,a!==null&&eS(a,this))},$e.Wo=function(a){Ci.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},$e.Lj=function(){if(0<this.jb.count){var a=this.diagram;if(a!==null)for(var y=a.commandHandler!==null?a.commandHandler.deletesConnectedLinks:!0,x=this.jb.copy().iterator;x.next();){var b=x.value;y?a.remove(b):(b.fromNode===this&&(b.fromNode=null),b.toNode===this&&(b.toNode=null))}}this.labeledLink=null,Ci.prototype.Lj.call(this)},$e.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;V1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function V1(a){a.wc===null?a.wc=new on:a.wc.clear(),a.qm(a,function(y,x){K1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function K1(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function Gv(a,y,x){var b=y.portId;if(b!==null&&(a.wc!==null&&a.wc.remove(b),y=a.diagram,y!==null&&x)){for(x=null,a=a.findLinksConnected(b);a.next();)b=a.value,x===null&&(x=Wn()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);zn(x)}}}$e.Nz=function(a){if(a===null||a===this)return!1;var y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this,y)for(;x!==a;){y=null;for(var b=x.jb.iterator;b.next();){var E=b.value;if(E.isTreeLink&&(y=E.fromNode,y!==x&&y!==this))break}if(y===this||y===null||y===x)return!1;x=y}else for(;x!==a;){for(y=null,b=x.jb.iterator;b.next()&&(E=b.value,!E.isTreeLink||(y=E.toNode,y===x||y===this)););if(y===this||y===null||y===x)return!1;x=y}return!0},$e.xz=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this,a)for(;;){a=null;for(var x=y.jb.iterator;x.next();){var b=x.value;if(b.isTreeLink&&(a=b.fromNode,a!==y&&a!==this))break}if(a===this)return this;if(a===null||a===y)return y;y=a}else for(;;){for(a=null,x=y.jb.iterator;x.next()&&(b=x.value,!b.isTreeLink||(a=b.toNode,a===y||a===this)););if(a===this)return this;if(a===null||a===y)return y;y=a}},$e.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)Wm(y,!0),y=y.pg();var x=null;for(y=a;y!==null;){if(y.G&1048576){x=y;break}y=y.pg()}for(y=this;y!==null;)Wm(y,!1),y=y.pg();return x},$e.kh=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this.jb.iterator,a){for(;y.next();)if(a=y.value,a.isTreeLink&&a.fromNode!==this)return a}else for(;y.next();)if(a=y.value,a.isTreeLink&&a.toNode!==this)return a;return null},$e.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof qn)return a;a=this.diagram,a=a!==null?a.isTreePathToChildren:!0;for(var y=this.jb.iterator;y.next();){var x=y.value;if(x.isTreeLink&&(x=a?x.fromNode:x.toNode,x!==this))return this.ci=x}return this.ci=null},$e.vz=function(){function a(x,b){b.add(x);var E=x.kh();E!==null&&(b.add(E),x=x.pg(),x!==null&&a(x,b))}var y=new kn;return a(this,y),y},$e.uz=function(){return Y1(this,this)};function Y1(a,y){return y=y.pg(),y===null?0:1+Y1(a,y)}$e.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new _r(this.jb);var x=this;return y.predicate=a?function(b){return!!(b.isTreeLink&&b.fromNode===x)}:function(b){return!!(b.isTreeLink&&b.toNode===x)},y},$e.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,b=this.jb.iterator;if(a)for(;b.next();)a=b.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Ln,y.add(x),y.add(a)):x=a);else for(;b.next();)a=b.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Ln,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new fr(x):yr},$e.wz=function(a){a===void 0&&(a=1/0);var y=new kn;return Oc(y,this,!1,a,!0),y},qn.prototype.collapseTree=function(a){a===void 0&&(a=1),1>a&&(a=1);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new kn;x.add(this),X1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Xh),y.Ue=!1}};function X1(a,y,x,b,E,te,ne){if(1<b)for(var se=x?a.Mo():a.Sd();se.next();){var he=se.value;he.isTreeLink&&(he=he.To(a),he===null||he===a||y.contains(he)||(y.add(he),X1(he,y,x,b-1,E,te,ne)))}else J1(a,y,x,E,te,ne)}function J1(a,y,x,b,E,te){for(var ne=E===a?!0:a.isTreeExpanded,se=x?a.Mo():a.Sd(),he={};se.next();){var _e=se.value;if(_e.isTreeLink&&(_e=_e.To(a),_e!==null&&_e!==a)){var Ee=y.contains(_e);if(Ee||y.add(_e),ne){var Ne=x?_e.Oo():_e.Po();he.uv=a,Ne.all(function(He){return function(Ye){return Ye===He.uv||!Ye.isTreeExpanded}}(he))&&b.Aj(_e,E),_e.oh(),_e.Zb(!1)}_e.isTreeExpanded&&(_e.wasTreeExpanded=_e.isTreeExpanded,Ee||J1(_e,y,x,b,E,te))}he={uv:he.uv}}a.isTreeExpanded=!1}qn.prototype.expandTree=function(a){a===void 0&&(a=2),2>a&&(a=2);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new kn;x.add(this),q1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Xh),y.Ue=!1}};function q1(a,y,x,b,E,te,ne){for(var se=te===a?!1:a.isTreeExpanded,he=x?a.Mo():a.Sd(),_e={};he.next();){var Ee=he.value;if(Ee.isTreeLink&&(se||Ee.fd||Ee.bb(),Ee=Ee.To(a),Ee!==null&&Ee!==a&&!y.contains(Ee))){if(y.add(Ee),!se){Ee.Zb(!0),Ee.oh();var Ne=x?Ee.Oo():Ee.Po();_e.vv=a,Ne.all(function(He){return function(Ye){return Ye===He.vv||!Ye.isTreeExpanded}}(_e))&&E.Cj(Ee,te)}(2<b||Ee.wasTreeExpanded)&&(Ee.wasTreeExpanded=!1,q1(Ee,y,x,b-1,E,te,ne))}_e={vv:_e.vv}}a.isTreeExpanded=!0}ot.Object.defineProperties(qn.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Km},set:function(a){var y=this.portSpreading;y!==a&&(tc(this),this.Ba.er=a,this.g("portSpreading",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.Bd())}},avoidable:{get:function(){return(this.U&8)!==0},set:function(a){var y=(this.U&8)!==0;if(y!==a){this.U^=8;var x=this.diagram;x!==null&&Kh(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:us},set:function(a){typeof a=="number"&&(a=new nr(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),tc(this),this.Ba.yp=a;var x=this.diagram;x!==null&&Kh(x,this),this.g("avoidableMargin",y,a)}}},linksConnected:{get:function(){return this.jb.iterator}},linkConnected:{get:function(){return this.Ba!==null?this.Ba.Dq:null},set:function(a){var y=this.linkConnected;y!==a&&(tc(this),this.Ba.Dq=a,this.g("linkConnected",y,a))}},linkDisconnected:{get:function(){return this.Ba!==null?this.Ba.Eq:null},set:function(a){var y=this.linkDisconnected;y!==a&&(tc(this),this.Ba.Eq=a,this.g("linkDisconnected",y,a))}},linkValidation:{get:function(){return this.Ba!==null?this.Ba.gj:null},set:function(a){var y=this.linkValidation;y!==a&&(tc(this),this.Ba.gj=a,this.g("linkValidation",y,a))}},isLinkLabel:{get:function(){return this.Yk!==null}},labeledLink:{get:function(){return this.Yk},set:function(a){var y=this.Yk;if(y!==a){var x=this.diagram,b=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&b!==null&&!x.undoManager.isUndoingRedoing){var E=y.data,te=x.model;if(E!==null&&te.ri()){var ne=te.wa(b);ne!==void 0&&te.Qx(E,ne)}}this.containingGroup=null}this.Yk=a,a!==null&&(eS(a,this),x===null||b===null||x.undoManager.isUndoingRedoing||(E=a.data,x=x.model,E!==null&&x.ri()&&(b=x.wa(b),b!==void 0&&x.Bu(E,b))),this.containingGroup=a.containingGroup),Ra(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&V1(this),this.wc.iteratorValues}},isTreeExpanded:{get:function(){return(this.U&1)!==0},set:function(a){var y=(this.U&1)!==0;if(y!==a){this.U^=1;var x=this.diagram;if(this.g("isTreeExpanded",y,a),y=this.treeExpandedChanged,y!==null){var b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}x!==null&&x.undoManager.isUndoingRedoing?this.Zb(a):a?this.expandTree():this.collapseTree()}}},wasTreeExpanded:{get:function(){return(this.U&2)!==0},set:function(a){var y=(this.U&2)!==0;y!==a&&(this.U^=2,this.g("wasTreeExpanded",y,a))}},treeExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Vr:null},set:function(a){var y=this.treeExpandedChanged;y!==a&&(tc(this),this.Ba.Vr=a,this.g("treeExpandedChanged",y,a))}},isTreeLeaf:{get:function(){return(this.U&4)!==0},set:function(a){var y=(this.U&4)!==0;y!==a&&(this.U^=4,this.g("isTreeLeaf",y,a))}}}),qn.prototype.expandTree=qn.prototype.expandTree,qn.prototype.collapseTree=qn.prototype.collapseTree,qn.prototype.findTreeParts=qn.prototype.wz,qn.prototype.findTreeChildrenNodes=qn.prototype.Ou,qn.prototype.findTreeChildrenLinks=qn.prototype.Qo,qn.prototype.findTreeLevel=qn.prototype.uz,qn.prototype.findTreeParentChain=qn.prototype.vz,qn.prototype.findTreeParentNode=qn.prototype.pg,qn.prototype.findTreeParentLink=qn.prototype.kh,qn.prototype.findCommonTreeParent=qn.prototype.gz,qn.prototype.findTreeRoot=qn.prototype.xz,qn.prototype.isInTreeOf=qn.prototype.Nz,qn.prototype.findPort=qn.prototype.ns,qn.prototype.findLinksTo=qn.prototype.kz,qn.prototype.findLinksBetween=qn.prototype.jz,qn.prototype.findNodesInto=qn.prototype.Oo,qn.prototype.findNodesOutOf=qn.prototype.Po,qn.prototype.findNodesConnected=qn.prototype.Mu,qn.prototype.findLinksInto=qn.prototype.Sd,qn.prototype.findLinksOutOf=qn.prototype.Mo,qn.prototype.findExternalTreeLinksConnected=qn.prototype.qx,qn.prototype.invalidateConnectedLinks=qn.prototype.Bd,qn.prototype.invalidateLinkBundle=qn.prototype.Lz;var Cx=new nn(qn,"SpreadingNone",10),Km=new nn(qn,"SpreadingEvenly",11),Wv=new nn(qn,"SpreadingPacked",12);qn.className="Node",qn.SpreadingNone=Cx,qn.SpreadingEvenly=Km,qn.SpreadingPacked=Wv;function Ki(a,y){a===void 0||a instanceof ks||typeof a=="string"?qn.call(this,a):(qn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new kn,this.$a=null,this.Sc=new Zo,this.Sc.group=this,this.gl=new kn,this.tb=this.$p=null,y&&Object.assign(this,y)}Je(Ki,qn),Ki.prototype.cloneProtected=function(a){qn.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof ja});y instanceof ja?a.$a=y:a.$a=null,this.Sc!==null?(a.Sc=this.Sc.copy(),a.Sc.group=a):(a.Sc!==null&&(a.Sc.group=null),a.Sc=null),this.tb!==null&&(a.tb=this.tb.copy())},$e=Ki.prototype,$e.Af=function(a){qn.prototype.Af.call(this,a);var y=a.Rj();for(a=a.memberParts;a.next();){var x=a.value;if(x.v(),x.C(8),x.Ej(),x instanceof qn)x.Bd(y);else if(x instanceof Bn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},$e.gk=function(a,y,x,b,E,te,ne){if(a===es&&y==="elements"){if(E instanceof ja)this.$a===null?this.$a=E:this.$a!==E&&Lt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof Dn){var se=E.Nl(function(he){return he instanceof ja});se instanceof ja&&(this.$a===null?this.$a=se:this.$a!==se&&Lt("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Jo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Dn&&this.$a.rg(b)&&(this.$a=null));qn.prototype.gk.call(this,a,y,x,b,E,te,ne)},$e.Xl=function(a,y){qn.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Dn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Dn&&(a=a.Pb()),this.tb===null&&(this.tb=new sn),a.mi(this.tb),a instanceof ir&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},$e.eh=function(a,y,x,b){this.nf=this.$a,qn.prototype.eh.call(this,a,y,x,b)},$e.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Bn||y.Va()}),qn.prototype.Va.call(this)},$e.si=function(){if(!qn.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof qn){if(y.isVisible()&&Fa(y))return!1}else if(y instanceof Bn&&y.isVisible()&&Fa(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Zv(a,y){if(a.Gn.add(y)){y instanceof Ki&&a.gl.add(y);var x=a.memberAdded;if(x!==null){var b=!0,E=a.diagram;E!==null&&(b=E.aa,E.aa=!0),x(a,y),E!==null&&(E.aa=b)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!1)}y instanceof Bn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function Vv(a,y){if(a.Gn.remove(y)){y instanceof Ki&&a.gl.remove(y);var x=a.memberRemoved;if(x!==null){var b=!0,E=a.diagram;E!==null&&(b=E.aa,E.aa=!0),x(a,y),E!==null&&(E.aa=b)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!0)}y instanceof Bn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}$e.Lj=function(){if(0<this.Gn.count){var a=this.diagram;if(a!==null)for(var y=this.Gn.copy().iterator;y.next();)a.remove(y.value)}qn.prototype.Lj.call(this)},Ki.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=fn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},Ki.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=fn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},Ki.prototype.canUngroup=function(){if(!this.ungroupable)return!1;var a=this.layer;return a===null||!a.allowUngroup?!1:(a=a.diagram,!!(a===null||a.allowUngroup))},$e=Ki.prototype,$e.Bd=function(a){var y=(this.U&65536)!==0;if(qn.prototype.Bd.call(this,a),!y)for(!(this.U&65536)&&(this.U=this.U^65536),y=this.Lu();y.next();){var x=y.value;if(a===void 0||!a.contains(x)){var b=x.fromNode;b!==null&&b!==this&&b.Td(this)&&!b.isVisible()?(vl(x.fromPort),vl(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(vl(x.fromPort),vl(x.toPort),x.bb()))}}},$e.Lu=function(){var a=this.diagram!==null&&this.diagram.Pw;if(a&&this.$p!==null)return this.$p.iterator;var y=this.Rj();y.add(this);for(var x=new kn,b=y.iterator;b.next();){var E=b.value;if(E instanceof qn)for(E=E.linksConnected;E.next();){var te=E.value;y.contains(te)||x.add(te)}}return a&&(this.$p=x),x.iterator},$e.iz=function(){var a=this.Rj();a.add(this);for(var y=new kn,x=a.iterator;x.next();){var b=x.value;if(b instanceof qn)for(b=b.linksConnected;b.next();){var E=b.value,te=E.fromNode;te===null||a.contains(te)&&te!==this||y.add(te),E=E.toNode,E===null||a.contains(E)&&E!==this||y.add(E)}}return y.iterator},$e.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new kn;return a(this,y),y},$e.Rj=function(){var a=new kn;return Oc(a,this,!0,0,!0),a.remove(this),a},$e.Zb=function(a){qn.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},Ki.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();Q1(this,y,a,this),a.Ue=!1}};function Q1(a,y,x,b){for(var E=a.memberParts;E.next();){var te=E.value;if(te.Zb(!1),te instanceof Ki&&te.isSubGraphExpanded&&(te.wasSubGraphExpanded=te.isSubGraphExpanded,Q1(te,y,x,b)),te instanceof qn)te.Bd(y),x.Aj(te,b);else if(te instanceof Bn)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!1}Ki.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();$1(this,y,a,this),a.Ue=!1}};function $1(a,y,x,b){for(var E=a.memberParts;E.next();){var te=E.value;if(te.Zb(!0),te instanceof Ki&&te.wasSubGraphExpanded&&(te.wasSubGraphExpanded=!1,$1(te,y,x,b)),te instanceof qn)te.Bd(y),x.Cj(te,b);else if(te instanceof Bn)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!0}Ki.prototype.move=function(a,y){y===void 0&&(y=!1);var x=y?this.location:this.position,b=x.x;x=x.y;var E=a.x,te=a.y;if(!(b===E||isNaN(b)&&isNaN(E))||!(x===te||isNaN(x)&&isNaN(te))){for(b=E-(isNaN(b)?0:b),x=te-(isNaN(x)?0:x),te=ft.alloc(),qn.prototype.move.call(this,a,y),a=new kn,y=this.Rj().iterator;y.next();)E=y.value,E instanceof Bn&&(E.suspendsRouting&&a.add(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(E.suspendsRouting=!0);for(y.reset();y.next();)if(E=y.value,!(E.ph()||E instanceof qn&&E.isLinkLabel)){var ne=E.position,se=E.location;ne.w()?(te.x=ne.x+b,te.y=ne.y+x,E.position=te):se.w()&&(te.x=se.x+b,te.y=se.y+x,E.location=te)}for(y.reset();y.next();)E=y.value,E instanceof Bn&&(E.suspendsRouting=a.contains(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(ne=E.position,te.x=ne.x+b,te.y=ne.y+x,te.w()?E.move(te):E.bb(),Yv(E)&&E.bb());ft.free(te)}},ot.Object.defineProperties(Ki.prototype,{placeholder:{get:function(){return this.$a}},computesBoundsAfterDrag:{get:function(){return(this.U&2048)!==0},set:function(a){var y=(this.U&2048)!==0;y!==a&&(this.U^=2048,this.g("computesBoundsAfterDrag",y,a))}},computesBoundsIncludingLinks:{get:function(){return(this.U&4096)!==0},set:function(a){var y=(this.U&4096)!==0;y!==a&&(this.U^=4096,this.g("computesBoundsIncludingLinks",y,a))}},computesBoundsIncludingLocation:{get:function(){return(this.U&8192)!==0},set:function(a){var y=(this.U&8192)!==0;y!==a&&(this.U^=8192,this.g("computesBoundsIncludingLocation",y,a))}},handlesDragDropForMembers:{get:function(){return(this.U&16384)!==0},set:function(a){var y=(this.U&16384)!==0;y!==a&&(this.U^=16384,this.g("handlesDragDropForMembers",y,a))}},memberParts:{get:function(){return this.Gn.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;if(y!==a){a!==null&&a.diagram!==null&&a.diagram.layout===a&&Lt("A layout cannot be both the Diagram.layout and a Group.layout: "+a),y!==null&&(y.diagram=null,y.group=null),this.Sc=a;var x=this.diagram;a!==null&&(a.diagram=x,a.group=this),x!==null&&(x.xh=!0),this.g("layout",y,a),x!==null&&x.$b()}}},memberAdded:{get:function(){return this.Ba!==null?this.Ba.Mq:null},set:function(a){var y=this.memberAdded;y!==a&&(tc(this),this.Ba.Mq=a,this.g("memberAdded",y,a))}},memberRemoved:{get:function(){return this.Ba!==null?this.Ba.Nq:null},set:function(a){var y=this.memberRemoved;y!==a&&(tc(this),this.Ba.Nq=a,this.g("memberRemoved",y,a))}},memberValidation:{get:function(){return this.Ba!==null?this.Ba.ij:null},set:function(a){var y=this.memberValidation;y!==a&&(tc(this),this.Ba.ij=a,this.g("memberValidation",y,a))}},ungroupable:{get:function(){return(this.U&256)!==0},set:function(a){var y=(this.U&256)!==0;y!==a&&(this.U^=256,this.g("ungroupable",y,a))}},isSubGraphExpanded:{get:function(){return(this.U&512)!==0},set:function(a){var y=(this.U&512)!==0;if(y!==a){this.U^=512;var x=this.diagram;if(this.g("isSubGraphExpanded",y,a),y=this.subGraphExpandedChanged,y!==null){var b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}x!==null&&x.undoManager.isUndoingRedoing?(this.$a!==null&&this.$a.v(),this.memberParts.each(function(E){E.updateAdornments()})):a?this.expandSubGraph():this.collapseSubGraph()}}},wasSubGraphExpanded:{get:function(){return(this.U&1024)!==0},set:function(a){var y=(this.U&1024)!==0;y!==a&&(this.U^=1024,this.g("wasSubGraphExpanded",y,a))}},subGraphExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Kr:null},set:function(a){var y=this.subGraphExpandedChanged;y!==a&&(tc(this),this.Ba.Kr=a,this.g("subGraphExpandedChanged",y,a))}},rh:{get:function(){return(this.U&32768)!==0},set:function(a){(this.U&32768)!==0!==a&&(this.U^=32768)}}}),Ki.prototype.expandSubGraph=Ki.prototype.expandSubGraph,Ki.prototype.collapseSubGraph=Ki.prototype.collapseSubGraph,Ki.prototype.findSubGraphParts=Ki.prototype.Rj,Ki.prototype.findContainingGroupChain=Ki.prototype.hz,Ki.prototype.findExternalNodesConnected=Ki.prototype.iz,Ki.prototype.findExternalLinksConnected=Ki.prototype.Lu,Ki.prototype.ensureBounds=Ki.prototype.Va,Ki.className="Group";function ja(a){Zt.call(this),this.yb=zs,this.ko=new sn(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Je(ja,Zt),ja.prototype.cloneProtected=function(a){Zt.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},ja.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return qr(0,0,y.width,y.height,a.x,a.y)},ja.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof Ki||a instanceof Fr)||Lt("Placeholder is not inside a Group or Adornment."),a instanceof Ki){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(Jr(b,(isFinite(x.width)?Math.max(x.width,y.width):y.width)||0,(isFinite(x.height)?Math.max(x.height,y.height):y.height)||0),this.Ge(0,0,b.width,b.height),b=a.memberParts,x=!1;b.next();)if(b.value.isVisible()){x=!0;break}b=a.diagram,!x||b===null||b.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=ft.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),ft.free(x))}else{y=this.dc,x=this.yb,b=x.left+x.right;var E=x.top+x.bottom,te=a.adornedObject;a.angle=te.li();var ne=0;te instanceof ir&&(ne=te.strokeWidth);var se=te.Df(),he=te.naturalBounds,_e=(he.width+ne)*se;ne=(he.height+ne)*se,a.type!==Dn.Link&&(se=te.ga(a.category==="Selection"?xr:a.locationSpot,ft.alloc()),a.location=se,ft.free(se)),isNaN(_e)||isNaN(ne)?(a=te.ga(xr,ft.alloc()),_e=sn.allocAt(a.x,a.y,0,0),_e.Ye(te.ga(eo,a)),_e.Ye(te.ga(Qr,a)),_e.Ye(te.ga(fs,a)),Jr(y,_e.width+b||0,_e.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),ft.free(a),sn.free(_e)):(Jr(y,_e+b||0,ne+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},ja.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},ja.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof Ki&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var E=x.toolManager.findTool("Dragging");if(E===x.currentTool&&(x=E.computeBorder(y,this.ko,a),x!==null))return x}x=sn.alloc(),E=this.computeMemberBounds(x);var te=this.yb;return y instanceof Ki&&!y.isSubGraphExpanded?a.h(E.x-te.left,E.y-te.top,0,0):a.h(E.x-te.left,E.y-te.top,Math.max(E.width+te.left+te.right,0),Math.max(E.height+te.top+te.bottom,0)),sn.free(x),b&&y instanceof Ki&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},ja.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Ki))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,b=1/0,E=-1/0,te=-1/0,ne=y.memberParts;ne.next();){var se=ne.value;if(se.isVisible()){if(se instanceof Bn&&(!y.computesBoundsIncludingLinks||kl(se)||se.fromNode===y||se.toNode===y))continue;se=se.actualBounds,se.left<x&&(x=se.left),se.top<b&&(b=se.top),se.right>E&&(E=se.right),se.bottom>te&&(te=se.bottom)}}return isFinite(x)&&isFinite(b)?a.h(x,b,E-x,te-b):(y=y.location,a.h(y.x,y.y,0,0)),a},ot.Object.defineProperties(ja.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new nr(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),ja.className="Placeholder";function Bn(a){Ci.call(this,Dn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=za,this.Om=0,this.Qm=za,this.Rm=NaN,this.qj=qv,this.po=.5,this.wd=null,this.Nb=new Ln().freeze(),this.Tg=this.Mg=null,this.ml=new sn,this.ua=new In,this.u=this.o=this.Sf=this.Wf=null,this.su=new ft,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Je(Bn,Ci),Bn.prototype.cloneProtected=function(a){Ci.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())},$e=Bn.prototype,$e.Af=function(a){Ci.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&&vl(y),a=a.toPort,a!==null&&vl(a)},$e.qb=function(a){a.classType===Bn?(a.value&2)===2?this.routing=a:a===Al||a===ic||a===Kf?this.curve=a:a===hg||a===$m||a===e0?this.adjusting=a:a!==qv&&a!==za&&Lt("Unknown Link enum value for a Link property: "+a):Ci.prototype.qb.call(this,a)},$e.Xc=function(){this.ba===null&&(this.ba=new Jp)},$e.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Fa(a)||Nc(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Fa(a)||Nc(a)))},$e.zv=function(){return!1},$e.Av=function(){},$e.Zc=function(){return!1},Bn.prototype.computeAngle=function(a,y,x){return Bn.computeAngle(y,x)},Bn.computeAngle=function(a,y){switch(a){default:case za:a=0;break;case cg:a=y;break;case dg:a=y+90;break;case fg:a=y-90;break;case Qv:a=y+180;break;case t0:a=Vt.bp(y),90<a&&270>a&&(a-=180);break;case pg:a=Vt.bp(y+90),90<a&&270>a&&(a-=180);break;case gg:a=Vt.bp(y-90),90<a&&270>a&&(a-=180);break;case n0:if(a=Vt.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return Vt.bp(a)};function Zf(a){var y=a.fromNode,x=a.toNode,b=null;if(y!==null?b=x!==null?y.px(x):y.containingGroup:x!==null?b=x.containingGroup:b=null,y=b,x=a.Ah,x!==y){x!==null&&Vv(x,a),a.Ah=y,y!==null&&Zv(y,a);var E=a.containingGroupChanged;if(E!==null){var te=!0,ne=a.diagram;ne!==null&&(te=ne.aa,ne.aa=!0),E(a,x,y),ne!==null&&(ne.aa=te)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=b}$e=Bn.prototype,$e.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Ci.prototype.oh.call(this)},$e.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},$e.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function eS(a,y){a.wd===null&&(a.wd=new kn),a.wd.add(y),a.v()}$e.Vo=function(a){if(Ci.prototype.Vo.call(this,a),Sd(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 b=this.toPort;x===a&&b===y||Zm(x,this,b)}lg(this)}},$e.Wo=function(a){if(Ci.prototype.Wo.call(this,a),Sd(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Vm(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Vm(x,this,b)}ug(this)}},$e.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))},Bn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Bn.prototype.move=function(a,y){var x=y?this.location:this.position,b=x.x;isNaN(b)&&(b=0);var E=x.y;for(isNaN(E)&&(E=0),b=a.x-b,E=a.y-E,y===!0?Ci.prototype.move.call(this,a,!1):(a=ft.allocAt(x.x+b,x.y+E),Ci.prototype.move.call(this,a,!1),ft.free(a)),nc(this,b,E),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+b,x.y+E)},Bn.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},Bn.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},Bn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(di),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),b=this.i(1);return a.h((x.x+b.x)/2,(x.y+b.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===Al))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()===Al){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return Vt.ax(x.x,x.y,b.x,b.y,b.x,b.y,E.x,E.y,a),a}if(b=(y-1)/3|0,x=3*(b/2|0),b%2===1){b=this.i(x),E=this.i(x+1);var te=this.i(x+2);x=this.i(x+3),Vt.ax(b.x,b.y,E.x,E.y,te.x,te.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var ne=this.flattenedLengths;for(x=this.flattenedTotalLength,E=te=b=0;b<x/2&&te<y&&(E=ne[te],!(b+E>x/2));)b+=E,te++;return y=this.i(te),te=this.i(te+1),1>Math.abs(y.x-te.x)?y.y>te.y?a.h(y.x,y.y-(x/2-b)):a.h(y.x,y.y+(x/2-b)):1>Math.abs(y.y-te.y)?y.x>te.x?a.h(y.x-(x/2-b),y.y):a.h(y.x+(x/2-b),y.y):(x=(x/2-b)/E,a.h(y.x+x*(te.x-y.x),y.y+x*(te.y-y.y))),a},Bn.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()===Al))return this.ua.wx(.5);if(this.computeCurve()===Al&&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 b=this.i(x+2);return x=this.i(x+3),Vt.My(a.x,a.y,y.x,y.y,b.x,b.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,b=this.flattenedTotalLength;var E=0;x=0;for(var te;E<b/2&&x<a&&(te=y[x],!(E+te>b/2));)E+=te,x++;if(y=this.i(x),b=this.i(x+1),1>Math.abs(y.x-b.x)&&1>Math.abs(y.y-b.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-b.x))return y.y>b.y?270:90;if(1>Math.abs(y.y-b.y))return y.x>b.x?180:0}return y.ab(b)},$e=Bn.prototype,$e.i=function(a){return this.Nb.s[a]},$e.dd=function(a,y){this.Nb.cd(a,y)},$e.L=function(a,y,x){this.Nb.cd(a,new ft(y,x))},$e.Kz=function(a,y){this.Nb.Gb(a,y)},$e.m=function(a,y,x){this.Nb.Gb(a,new ft(y,x))},$e.ne=function(a){this.Nb.add(a)},$e.yf=function(a,y){this.Nb.add(new ft(a,y))},$e.pv=function(a){this.Nb.mb(a)},$e.Fj=function(){this.Nb.clear()};function nc(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 b=a.fd,E=new Ln,te=a.Nb.iterator;te.next();){var ne=te.value;E.add(new ft(ne.x+y,ne.y+x).freeze())}E.freeze(),te=a.Nb,a.Nb=E,ne=a.diagram,isNaN(y)||isNaN(x)||ne!==null&&ne.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),Ra(a)),b?Ym(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ne!==null&&ne.animationManager.zb&&vf(ne.animationManager,a,E),a.g("points",te,E)}}$e.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},$e.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,b=1/0,E=a.s,te=E.length,ne=0;ne<te;ne++){var se=E[ne];x=Math.min(se.x,x),b=Math.min(se.y,b)}se=ne=1/0;for(var he=y.s,_e=he.length,Ee=0;Ee<_e;Ee++){var Ne=he[Ee];ne=Math.min(Ne.x,ne),se=Math.min(Ne.y,se),Ne.freeze()}if(y.freeze(),_e===te){for(te=0;te<_e;te++)if(Ee=E[te],Ne=he[te],Ee.x-x!==Ne.x-ne||Ee.y-b!==Ne.y-se){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&vf(x.animationManager,this,y),Ym(this),this.g("points",a,y)}},$e.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function Ym(a){a.Nb.count===0?a.fd=!1:(a.fd=!0,a.cq=null,a.vt=NaN,a.defaultFromPoint=a.i(0),a.defaultToPoint=a.i(a.pointsCount-1),Qm(a,!1))}$e.bb=function(){if(!this.suspendsRouting){var a=this.diagram;if(a){if(a.As.contains(this)||a.undoManager.isUndoingRedoing||(a=a.animationManager,a.isTicking&&!a.isAnimating))return;this.Tg===null||a.isTicking||(this.Tg=null)}a=this.path,a!==null&&(this.fd=!1,this.v(),a.v())}},$e.vg=function(){if(!this.fd&&!this.computingPoints){var a=!0;try{this.computingPoints=!0,this.uh(),a=this.computePoints()}catch(y){this.computingPoints=!1,this.rv()}finally{this.computingPoints=!1,a?this.zf():this.rv()}}},Bn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(qd||(qd=new qn,qd.desiredSize=zi,qd.Va()),this.defaultFromPoint&&(qd.location=this.defaultFromPoint,qd.Va(),y=a=qd)):y=this.fromPort,y!==null&&!a.isVisible()){var x=a.findVisibleNode();x!==null&&x!==a?(a=x,y=x.port):a=x}if(this.Lw=a,a===null||!a.location.w())return!1;for(;!(y===null||y.actualBounds.w()&&y.Ed());)y=y.panel;if(y===null)return!1;var b=this.toNode,E=null;if(b===null?(Qd||(Qd=new qn,Qd.desiredSize=zi,Qd.Va()),this.defaultToPoint&&(Qd.location=this.defaultToPoint,Qd.Va(),E=b=Qd)):E=this.toPort,E===null||b.isVisible()||(x=b.findVisibleNode(),x!==null&&x!==b?(b=x,E=x.port):b=x),this.Mw=b,b===null||!b.location.w())return!1;for(;!(E===null||E.actualBounds.w()&&E.Ed());)E=E.panel;if(E===null)return!1;var te=this.pointsCount,ne=this.computeSpot(!0,y);x=this.computeSpot(!1,E);var se=Vf(ne),he=Vf(x),_e=y===E&&y!==null,Ee=this.isOrthogonal,Ne=this.curve===Al;this.Wf=_e&&!Ee?Ne=!0:!1;var He=this.computeAdjusting()===za||_e;if(!Ee&&!_e&&se&&he){if(se=!1,!He&&3<=te&&(He=this.getLinkPoint(a,y,ne,!0,!1,b,E),he=this.getLinkPoint(b,E,x,!1,!1,a,y),se=this.adjustPoints(0,He,te-1,he))&&(He=this.getLinkPoint(a,y,ne,!0,!1,b,E),he=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,He,te-1,he)),!se)if(this.Fj(),Ne){te=this.getLinkPoint(a,y,ne,!0,!1,b,E),He=this.getLinkPoint(b,E,x,!1,!1,a,y),se=He.x-te.x,he=He.y-te.y,_e=this.computeCurviness(),Ne=Ee=0;var Ye=te.x+se/3,Qe=te.y+he/3,st=Ye,Pt=Qe;Vt.B(he,0)?Pt=0<se?Pt-_e:Pt+_e:(Ee=-se/he,Ne=Math.sqrt(_e*_e/(Ee*Ee+1)),0>_e&&(Ne=-Ne),st=(0>he?-1:1)*Ne+Ye,Pt=Ee*(st-Ye)+Qe),Ye=te.x+2*se/3,Qe=te.y+2*he/3;var St=Ye,Tt=Qe;Vt.B(he,0)?Tt=0<se?Tt-_e:Tt+_e:(St=(0>he?-1:1)*Ne+Ye,Tt=Ee*(St-Ye)+Qe),this.Fj(),this.ne(te),this.yf(st,Pt),this.yf(St,Tt),this.ne(He),this.dd(0,this.getLinkPoint(a,y,ne,!0,!1,b,E)),this.dd(3,this.getLinkPoint(b,E,x,!1,!1,a,y))}else te=b,He=E,b=this.getLinkPoint(a,y,ne,!0,!1,te,He),E=this.getLinkPoint(te,He,x,!1,!1,a,y),this.hasCurviness()?(He=E.x-b.x,x=E.y-b.y,ne=this.computeCurviness(),a=b.x+He/2,y=b.y+x/2,te=a,se=y,Vt.B(x,0)?se=0<He?se-ne:se+ne:(He=-He/x,te=Math.sqrt(ne*ne/(He*He+1)),0>ne&&(te=-te),te=(0>x?-1:1)*te+a,se=He*(te-a)+y),this.ne(b),this.yf(te,se),this.ne(E)):(this.ne(b),this.ne(E),se=sn.alloc(),y.mi(se),he=se.ca(E),He.mi(se),_e=se.ca(b),(he||_e)&&(ne=y.ga(Jm(ne),new ft),this.dd(0,this.getLinkPointFromPoint(a,y,ne,E,!0,ne)),x=He.ga(Jm(x),new ft),this.dd(1,this.getLinkPointFromPoint(te,He,x,b,!1,x))),sn.free(se))}else{Ne=this.isAvoiding,He&&(Ee&&Ne||_e)&&this.Fj();var At=_e?this.computeCurviness():0;Ne=this.getLinkPoint(a,y,ne,!0,Ee,b,E),Ye=st=Qe=0,(Ee||!se||_e)&&(Pt=this.computeEndSegmentLength(a,y,ne,!0),Ye=this.getLinkDirection(a,y,Ne,ne,!0,Ee,b,E),_e&&(se||ne.D(x)||!Ee&&ne.x+x.x===1&&ne.y+x.y===1)&&(Ye-=Ee?90:30,0>At&&(Ye-=180)),0>Ye?Ye+=360:360<=Ye&&(Ye-=360),_e&&(Pt+=Math.abs(At)*(Ee?1:2)),Ye===0?Qe=Pt:Ye===90?st=Pt:Ye===180?Qe=-Pt:Ye===270?st=-Pt:(Qe=Pt*Math.cos(Ye*Math.PI/180),st=Pt*Math.sin(Ye*Math.PI/180)),ne.Mc()&&_e&&(Pt=y.ga($i,ft.alloc()),St=ft.allocAt(Pt.x+1e3*Qe,Pt.y+1e3*st),this.getLinkPointFromPoint(a,y,Pt,St,!0,Ne),ft.free(Pt),ft.free(St))),Pt=this.getLinkPoint(b,E,x,!1,Ee,a,y);var It=Tt=St=0;if(Ee||!he||_e){var Wt=this.computeEndSegmentLength(b,E,x,!1);It=this.getLinkDirection(b,E,Pt,x,!1,Ee,a,y),_e&&(he||ne.D(x)||!Ee&&ne.x+x.x===1&&ne.y+x.y===1)&&(It+=Ee?0:30,0>At&&(It+=180)),0>It?It+=360:360<=It&&(It-=360),_e&&(Wt+=Math.abs(At)*(Ee?1:2)),It===0?St=Wt:It===90?Tt=Wt:It===180?St=-Wt:It===270?Tt=-Wt:(St=Wt*Math.cos(It*Math.PI/180),Tt=Wt*Math.sin(It*Math.PI/180)),x.Mc()&&_e&&(x=E.ga($i,ft.alloc()),ne=ft.allocAt(x.x+1e3*St,x.y+1e3*Tt),this.getLinkPointFromPoint(b,E,x,ne,!1,Pt),ft.free(x),ft.free(ne))}x=Ne,(Ee||!se||_e)&&(x=new ft(Ne.x+Qe,Ne.y+st)),ne=Pt,(Ee||!he||_e)&&(ne=new ft(Pt.x+St,Pt.y+Tt)),!He&&!Ee&&se&&3<te&&this.adjustPoints(0,Ne,te-2,ne)?this.dd(te-1,Pt):!He&&!Ee&&he&&3<te&&this.adjustPoints(1,x,te-1,Pt)?this.dd(0,Ne):!He&&(Ee?6<=te:4<te)&&this.adjustPoints(1,x,te-2,ne)?(this.dd(0,Ne),this.dd(te-1,Pt)):(this.Fj(),this.ne(Ne),(Ee||!se||_e)&&this.ne(x),Ee&&this.addOrthoPoints(x,Ye,ne,It,a,b),(Ee||!he||_e)&&this.ne(ne),this.ne(Pt))}return!0};function Kv(a,y){return Math.abs(y.x-a.x)>Math.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}Bn.prototype.getLinkPointFromPoint=function(a,y,x,b,E,te){if(te===void 0&&(te=new ft),a===null||y===null)return te.assign(x),te;if(a.isVisible()||(E=a.findVisibleNode(),E!==null&&E!==a&&(y=E.port)),a=null,E=y.panel,E===null||E.se()||(E=E.panel),E===null){E=b.x,b=b.y;var ne=x.x;x=x.y}else{a=E.oe,E=1/(a.m11*a.m22-a.m12*a.m21),ne=a.m22*E;var se=-a.m12*E,he=-a.m21*E,_e=a.m11*E,Ee=E*(a.m21*a.dy-a.m22*a.dx),Ne=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*ne+b.y*he+Ee,b=b.x*se+b.y*_e+Ne,ne=x.x*ne+x.y*he+Ee,x=x.x*se+x.y*_e+Ne}return y.Sj(E,b,ne,x,te),a!==null&&te.transform(a),te};function Xm(a,y){var x=y.Zn;return x===null&&(x=new $d,x.port=y,x.node=y.part,y.Zn=x),lS(x,a)}Bn.prototype.getLinkPoint=function(a,y,x,b,E,te,ne,se){if(se===void 0&&(se=new ft),x.sb()&&!Vf(x))return y.ga(x,se),se;if(x.$c()){var he=Xm(this,y);if(he!==null){if(se.assign(he.Zo),E&&this.routing===nS){var _e=Xm(this,ne);if(_e!==null&&he.Gl<_e.Gl){he=ft.alloc(),_e=ft.alloc();var Ee=new sn(y.ga(xr,he),y.ga(eo,_e)),Ne=this.computeSpot(!b,ne);a=this.getLinkPoint(te,ne,Ne,!b,E,a,y,_e),(x.Hf(ga)||x.Hf(is))&&a.y>=Ee.y&&a.y<=Ee.y+Ee.height?se.y=a.y:(x.Hf(ws)||x.Hf(Pa))&&a.x>=Ee.x&&a.x<=Ee.x+Ee.width&&(se.x=a.x),ft.free(he),ft.free(_e)}}return se}}return x=y.ga(Jm(x),ft.alloc()),this.pointsCount>(E?6:2)?(ne=b?this.i(1):this.i(this.pointsCount-2),E&&(ne=Kv(x,ne.copy()))):(he=this.computeSpot(!b,ne),te=ft.alloc(),ne=ne.ga(Jm(he),te),E&&(ne=Kv(x,ne)),ft.free(te)),this.getLinkPointFromPoint(a,y,x,ne,b,se),ft.free(x),se},Bn.prototype.getLinkDirection=function(a,y,x,b,E,te,ne,se){e:if(b.sb())var he=b.x>b.y?b.x>1-b.y?0:b.x<1-b.y?270:315:b.x<b.y?b.x>1-b.y?90:b.x<1-b.y?180:135:.5>b.x?225:.5<b.x?45:0;else{if(b.$c()&&(he=Xm(this,y),he!==null))switch(he.Nc){case 1:he=270;break e;case 2:he=180;break e;default:case 4:he=0;break e;case 8:he=90;break e}he=y.ga($i,ft.alloc()),this.pointsCount>(te?6:2)?(se=E?this.i(1):this.i(this.pointsCount-2),se=te?Kv(he,se.copy()):x):(x=ft.alloc(),se=se.ga($i,x),ft.free(x)),x=Math.abs(se.x-he.x)>Math.abs(se.y-he.y)?se.x>=he.x?0:180:se.y>=he.y?90:270,ft.free(he),he=x}return b.Mc()&&ne.Td(a)&&(he+=180,360<=he&&(he-=360)),Vf(b)||(a=y.li(),a===0)||(45<=a&&135>a?he+=90:135<=a&&225>a?he+=180:225<=a&&315>a&&(he+=270),360<=he&&(he-=360)),he},Bn.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=Xm(this,y),a!==null)?a.Ju:(a=b?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=b?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},Bn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=$i:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===As?qi:y)):(a=y||this.toPort,a===null?a=$i:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===As?qi:y)),a};function Vf(a){return a===qi||a.x===.5&&a.y===.5}function Jm(a){return a.x===.5&&a.y===.5?a:$i}Bn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==za&&4<this.pointsCount?this.computeMidPoint(new ft):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga($i))},Bn.prototype.computeShortLength=function(a){if(a){if(a=this.fromShortLength,isNaN(a)){var y=this.fromPort;y!==null&&(a=y.fromShortLength)}return isNaN(a)?0:a}return a=this.toShortLength,isNaN(a)&&(y=this.toPort,y!==null&&(a=y.toShortLength)),isNaN(a)?0:a},Bn.prototype.Cf=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=te;if(te===void 0&&(ne=Ii.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&Ii.free(ne),!0;if(this.Yc(a,ne)){var se=!1;if(!this.isAtomic)for(var he=this.O.s,_e=he.length;_e--;){var Ee=he[_e];if(Ee.visible||Ee===this.locationObject){var Ne=Ee.actualBounds,He=this.naturalBounds;if(!(Ne.x>He.width||Ne.y>He.height||0>Ne.x+Ne.width||0>Ne.y+Ne.height)){if(Ne=Ii.alloc(),Ne.set(ne),Ee instanceof Dn)se=Ee.Cf(a,y,x,b,E,Ne);else if(this.path===Ee){if(Ee instanceof ir)if(se=a,He=b,Ee.pickable===!1)se=!1;else if(Ne.multiply(Ee.transform),He)e:{var Ye=se,Qe=Ne;if(Ee.fh(Ye,Qe))se=!0;else{if(Qe===void 0&&(Qe=Ee.transform,Ye.Re(Ee.actualBounds))){se=!0;break e}se=Ye.left,He=Ye.right;var st=Ye.top;Ye=Ye.bottom;var Pt=ft.alloc(),St=ft.alloc(),Tt=ft.alloc(),At=Ii.alloc();At.set(Qe),At.bv(Ee.transform),At.Vj(),St.x=He,St.y=st,St.transform(At),Pt.x=se,Pt.y=st,Pt.transform(At),Qe=!1,vd(Ee,Pt,St,Tt)?Qe=!0:(Pt.x=He,Pt.y=Ye,Pt.transform(At),vd(Ee,Pt,St,Tt)?Qe=!0:(St.x=se,St.y=Ye,St.transform(At),vd(Ee,Pt,St,Tt)?Qe=!0:(Pt.x=se,Pt.y=st,Pt.transform(At),vd(Ee,Pt,St,Tt)&&(Qe=!0)))),Ii.free(At),ft.free(Pt),ft.free(St),ft.free(Tt),se=Qe}}else se=Ee.fh(se,Ne)}else se=Fs(Ee,a,b,Ne);se&&(He=Ee,y!==null&&(He=y(Ee)),He&&(x===null||x(He))&&E.add(He)),Ii.free(Ne)}}}return te===void 0&&Ii.free(ne),se||this.background!==null||this.areaBackground!==null}return te===void 0&&Ii.free(ne),!1},Bn.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?Al:this.curve},Bn.prototype.computeCorner=function(){if(this.curve===Al)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Bn.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];if(E!==a&&!E.isPanelMain&&(E.segmentIndex===-1/0||isNaN(E.segmentIndex)))return E}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},Bn.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=rS;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var b=this.findMidLabel();if(b!==null){var E=b.naturalBounds,te=b.margin,ne=isNaN(E.width)?30:E.width*b.scale+te.left+te.right;E=isNaN(E.height)?14:E.height*b.scale+te.top+te.bottom,b=b.segmentOrientation,b===cg||b===t0||b===Qv?a=Math.max(a,E):b===fg||b===gg||b===dg||b===pg?a=Math.max(a,ne):(y=y.ga($i).ab(x.ga($i))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ne)+Math.abs(Math.cos(y)*E)+1)),this.curve===Al&&(a*=1.333)}}return a},Bn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===za&&x.bb()}},Bn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=iS;var y=this.Sf;if(y!==null){for(var x=Wn(),b=0,E=y.links,te=0;te<E.length;te++){var ne=E[te].computeSpacing();x.push(ne),b+=ne}for(b=-b/2,te=0;te<E.length;te++){if(E[te]===this){a=b+x[te]/2;break}b+=x[te]}y.Ds===this.fromNode&&(a=-a),zn(x)}}return a},Bn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Bn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Bn.prototype.adjustPoints=function(a,y,x,b){var E=this.computeAdjusting();if(this.isOrthogonal){if(E===$m)return!1;E===e0&&(E=hg)}switch(E){case $m:var te=this.i(a),ne=this.i(x);if(!te.Xa(y)||!ne.Xa(b)){E=te.x,te=te.y;var se=ne.x-E,he=ne.y-te,_e=Math.sqrt(se*se+he*he);if(!Vt.$(_e,0)){if(Vt.$(se,0))var Ee=0>he?-Math.PI/2:Math.PI/2;else Ee=Math.atan(he/Math.abs(se)),0>se&&(Ee=Math.PI-Ee);ne=y.x;var Ne=y.y;se=b.x-ne;var He=b.y-Ne;for(he=Math.sqrt(se*se+He*He),Vt.$(se,0)?He=0>He?-Math.PI/2:Math.PI/2:(He=Math.atan(He/Math.abs(se)),0>se&&(He=Math.PI-He)),_e=he/_e,Ee=He-Ee,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),se=y.x-E,he=y.y-te,y=Math.sqrt(se*se+he*he),Vt.$(y,0)||(Vt.$(se,0)?he=0>he?-Math.PI/2:Math.PI/2:(he=Math.atan(he/Math.abs(se)),0>se&&(he=Math.PI-he)),se=he+Ee,y*=_e,this.L(a,ne+y*Math.cos(se),Ne+y*Math.sin(se)));this.dd(x,b)}}return!0;case e0:if(te=this.i(a),Ne=this.i(x),!te.Xa(y)||!Ne.Xa(b)){E=te.x,te=te.y,ne=Ne.x,Ne=Ne.y,_e=(ne-E)*(ne-E)+(Ne-te)*(Ne-te),se=y.x,Ee=y.y,he=b.x,He=b.y;var Ye=1;if(he-se!==0){var Qe=(He-Ee)/(he-se);Ye=Math.sqrt(1+1/(Qe*Qe))}else Qe=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var st=y.x,Pt=y.y,St=.5;_e!==0&&(St=((E-st)*(E-ne)+(te-Pt)*(te-Ne))/_e);var Tt=E+St*(ne-E),At=te+St*(Ne-te);y=Math.sqrt((st-Tt)*(st-Tt)+(Pt-At)*(Pt-At)),Pt<Qe*(st-Tt)+At&&(y=-y),0<Qe&&(y=-y),st=se+St*(he-se),St=Ee+St*(He-Ee),Qe!==0?(y=st+y/Ye,this.L(a,y,St-(y-st)/Qe)):this.L(a,st,St+y)}this.dd(x,b)}return!0;case hg:e:{if(this.isOrthogonal&&(E=this.i(a),te=this.i(a+1),ne=this.i(a+2),se=te.x,Ee=te.y,Ne=se,_e=Ee,Vt.B(E.y,te.y)?Vt.B(te.x,ne.x)?Ee=y.y:Vt.B(te.y,ne.y)&&(se=y.x):Vt.B(E.x,te.x)&&(Vt.B(te.y,ne.y)?se=y.x:Vt.B(te.x,ne.x)&&(Ee=y.y)),this.L(a+1,se,Ee),E=this.i(x),te=this.i(x-1),ne=this.i(x-2),se=te.x,Ee=te.y,he=se,He=Ee,Vt.B(E.y,te.y)?Vt.B(te.x,ne.x)?Ee=b.y:Vt.B(te.y,ne.y)&&(se=b.x):Vt.B(E.x,te.x)&&(Vt.B(te.y,ne.y)?se=b.x:Vt.B(te.x,ne.x)&&(Ee=b.y)),this.L(x-1,se,Ee),Yv(this))){this.L(a+1,Ne,_e),this.L(x-1,he,He),x=!1;break e}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},Bn.prototype.addOrthoPoints=function(a,y,x,b,E,te){0>y?y+=360:360<=y&&(y-=360),0>b?b+=360:360<=b&&(b-=360);var ne=b;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;var se=E.actualBounds.copy(),he=te.actualBounds.copy();if(se.w()&&he.w()){se.Bc(mg,mg),he.Bc(mg,mg),se.Ye(a),he.Ye(x);var _e=ft.alloc(),Ee=ft.alloc();y===0?x.x>a.x||b===270&&x.y<a.y&&he.right>a.x||b===90&&x.y>a.y&&he.right>a.x?(_e.h(x.x,a.y),Ee.h(x.x,(a.y+x.y)/2),b===180?(_e.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),Ee.x=_e.x,Ee.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(_e.x=a.x<he.left?this.computeMidOrthoPosition(a.x,a.y,he.left,x.y,!1):a.x<he.right&&(b===270&&a.y<he.top||b===90&&a.y>he.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):he.right,Ee.x=_e.x,Ee.y=x.y):b===0&&a.x<he.left&&a.y>he.top&&a.y<he.bottom&&(_e.x=a.x,_e.y=a.y<x.y?Math.min(x.y,he.top):Math.max(x.y,he.bottom),Ee.y=_e.y)):(_e.h(a.x,x.y),Ee.h((a.x+x.x)/2,x.y),(b===180||b===90&&x.y<se.top||b===270&&x.y>se.bottom)&&(b===180&&(he.ca(a)||se.ca(x))?_e.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===180||b===90)?_e.y=this.computeMidOrthoPosition(a.x,se.top,x.x,Math.max(x.y,he.bottom),!0):x.y>a.y&&(b===180||b===270)&&(_e.y=this.computeMidOrthoPosition(a.x,se.bottom,x.x,Math.min(x.y,he.top),!0)),Ee.x=x.x,Ee.y=_e.y),_e.y>se.top&&_e.y<se.bottom&&(x.x>=se.left&&x.x<=a.x||a.x<=he.right&&a.x>=x.x?(b===90||b===270)&&(_e.h(Math.max((a.x+x.x)/2,a.x),a.y),Ee.h(_e.x,x.y)):(_e.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===0?se.top:Math.min(se.top,he.top)):Math.max(x.y,b===0?se.bottom:Math.max(se.bottom,he.bottom)),Ee.x=x.x,Ee.y=_e.y))):y===180?x.x<a.x||b===270&&x.y<a.y&&he.left<a.x||b===90&&x.y>a.y&&he.left<a.x?(_e.h(x.x,a.y),Ee.h(x.x,(a.y+x.y)/2),b===0?(_e.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),Ee.x=_e.x,Ee.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(_e.x=a.x>he.right?this.computeMidOrthoPosition(a.x,a.y,he.right,x.y,!1):a.x>he.left&&(b===270&&a.y<he.top||b===90&&a.y>he.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):he.left,Ee.x=_e.x,Ee.y=x.y):b===180&&a.x>he.right&&a.y>he.top&&a.y<he.bottom&&(_e.x=a.x,_e.y=a.y<x.y?Math.min(x.y,he.top):Math.max(x.y,he.bottom),Ee.y=_e.y)):(_e.h(a.x,x.y),Ee.h((a.x+x.x)/2,x.y),(b===0||b===90&&x.y<se.top||b===270&&x.y>se.bottom)&&(b===0&&(he.ca(a)||se.ca(x))?_e.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===0||b===90)?_e.y=this.computeMidOrthoPosition(a.x,se.top,x.x,Math.max(x.y,he.bottom),!0):x.y>a.y&&(b===0||b===270)&&(_e.y=this.computeMidOrthoPosition(a.x,se.bottom,x.x,Math.min(x.y,he.top),!0)),Ee.x=x.x,Ee.y=_e.y),_e.y>se.top&&_e.y<se.bottom&&(x.x<=se.right&&x.x>=a.x||a.x>=he.left&&a.x<=x.x?(b===90||b===270)&&(_e.h(Math.min((a.x+x.x)/2,a.x),a.y),Ee.h(_e.x,x.y)):(_e.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===180?se.top:Math.min(se.top,he.top)):Math.max(x.y,b===180?se.bottom:Math.max(se.bottom,he.bottom)),Ee.x=x.x,Ee.y=_e.y))):y===90?x.y>a.y||b===180&&x.x<a.x&&he.bottom>a.y||b===0&&x.x>a.x&&he.bottom>a.y?(_e.h(a.x,x.y),Ee.h((a.x+x.x)/2,x.y),b===270?(_e.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),Ee.x=x.x,Ee.y=_e.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(_e.y=a.y<he.top?this.computeMidOrthoPosition(a.x,a.y,x.x,he.top,!0):a.y<he.bottom&&(b===180&&a.x<he.left||b===0&&a.x>he.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):he.bottom,Ee.x=x.x,Ee.y=_e.y):b===90&&a.y<he.top&&a.x>he.left&&a.x<he.right&&(_e.x=a.x<x.x?Math.min(x.x,he.left):Math.max(x.x,he.right),_e.y=a.y,Ee.x=_e.x)):(_e.h(x.x,a.y),Ee.h(x.x,(a.y+x.y)/2),(b===270||b===0&&x.x<se.left||b===180&&x.x>se.right)&&(b===270&&(he.ca(a)||se.ca(x))?_e.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===270||b===0)?_e.x=this.computeMidOrthoPosition(se.left,a.y,Math.max(x.x,he.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(_e.x=this.computeMidOrthoPosition(se.right,a.y,Math.min(x.x,he.left),x.y,!1)),Ee.x=_e.x,Ee.y=x.y),_e.x>se.left&&_e.x<se.right&&(x.y>=se.top&&x.y<=a.y||a.y<=he.bottom&&a.y>=x.y?(b===0||b===180)&&(_e.h(a.x,Math.max((a.y+x.y)/2,a.y)),Ee.h(x.x,_e.y)):(_e.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===90?se.left:Math.min(se.left,he.left)):Math.max(x.x,b===90?se.right:Math.max(se.right,he.right)),Ee.x=_e.x,Ee.y=x.y))):x.y<a.y||b===180&&x.x<a.x&&he.top<a.y||b===0&&x.x>a.x&&he.top<a.y?(_e.h(a.x,x.y),Ee.h((a.x+x.x)/2,x.y),b===90?(_e.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),Ee.x=x.x,Ee.y=_e.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(_e.y=a.y>he.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,he.bottom,!0):a.y>he.top&&(b===180&&a.x<he.left||b===0&&a.x>he.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):he.top,Ee.x=x.x,Ee.y=_e.y):b===270&&a.y>he.bottom&&a.x>he.left&&a.x<he.right&&(_e.x=a.x<x.x?Math.min(x.x,he.left):Math.max(x.x,he.right),_e.y=a.y,Ee.x=_e.x)):(_e.h(x.x,a.y),Ee.h(x.x,(a.y+x.y)/2),(b===90||b===0&&x.x<se.left||b===180&&x.x>se.right)&&(b===90&&(he.ca(a)||se.ca(x))?_e.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===90||b===0)?_e.x=this.computeMidOrthoPosition(se.left,a.y,Math.max(x.x,he.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(_e.x=this.computeMidOrthoPosition(se.right,a.y,Math.min(x.x,he.left),x.y,!1)),Ee.x=_e.x,Ee.y=x.y),_e.x>se.left&&_e.x<se.right&&(x.y<=se.bottom&&x.y>=a.y||a.y>=he.top&&a.y<=x.y?(b===0||b===180)&&(_e.h(a.x,Math.min((a.y+x.y)/2,a.y)),Ee.h(x.x,_e.y)):(_e.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===270?se.left:Math.min(se.left,he.left)):Math.max(x.x,b===270?se.right:Math.max(se.right,he.right)),Ee.x=_e.x,Ee.y=x.y)));var Ne=x;if(this.isAvoiding){var He=this.diagram;if(He===null||E===te||this.layer.isTemporary||!Ef(He)||se.ca(Ne)&&!te.Td(E)||he.ca(a)&&!E.Td(te))y=!1;else{var Ye=Lf(He,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Ye.Yj(Math.min(a.x,_e.x),Math.min(a.y,_e.y),Math.abs(a.x-_e.x),Math.abs(a.y-_e.y))&&Ye.Yj(Math.min(_e.x,Ee.x),Math.min(_e.y,Ee.y),Math.abs(_e.x-Ee.x),Math.abs(_e.y-Ee.y))&&Ye.Yj(Math.min(Ee.x,Ne.x),Math.min(Ee.y,Ne.y),Math.abs(Ee.x-Ne.x),Math.abs(Ee.y-Ne.y)))y=!1;else{E=a,te=Ne;var Qe=x=null;if(He.isVirtualized){He=Ye.bounds.copy(),He.Bc(-Ye.Ho,-Ye.Go);var st=ft.alloc();Yf(Ye,a.x,a.y)||(Vt.Ff(He.x,He.y,He.x+He.width,He.y+He.height,a.x,a.y,_e.x,_e.y,st)?(x=a=st.copy(),y=st.ab(_e)):Vt.Ff(He.x,He.y,He.x+He.width,He.y+He.height,_e.x,_e.y,Ee.x,Ee.y,st)?(x=a=st.copy(),y=st.ab(Ee)):Vt.Ff(He.x,He.y,He.x+He.width,He.y+He.height,Ee.x,Ee.y,Ne.x,Ne.y,st)&&(x=a=st.copy(),y=st.ab(Ne))),Yf(Ye,Ne.x,Ne.y)||(Vt.Ff(He.x,He.y,He.x+He.width,He.y+He.height,Ne.x,Ne.y,Ee.x,Ee.y,st)?(Qe=Ne=st.copy(),b=Ee.ab(st)):Vt.Ff(He.x,He.y,He.x+He.width,He.y+He.height,Ee.x,Ee.y,_e.x,_e.y,st)?(Qe=Ne=st.copy(),b=_e.ab(st)):Vt.Ff(He.x,He.y,He.x+He.width,He.y+He.height,_e.x,_e.y,a.x,a.y,st)&&(Qe=Ne=st.copy(),b=a.ab(st))),ft.free(st)}se=se.copy().ed(he),se.Bc(Ye.Ho*Ye.Os,Ye.Go*Ye.Os),sS(Ye,a,y,Ne,b,se,!0),he=gh(Ye,Ne.x,Ne.y),!Ye.abort&&he>=Xf&&(oS(Ye),se.Bc(Ye.Ho*Ye.Hx,Ye.Go*Ye.Ix),sS(Ye,a,y,Ne,b,se,!1),he=gh(Ye,Ne.x,Ne.y)),!Ye.abort&&he<Xf&&gh(Ye,Ne.x,Ne.y)!==rc?(Xv(this,Ye,Ne.x,Ne.y,b,!0,ne),se=this.i(2),4>this.pointsCount?(y===0||y===180?(se.x=a.x,se.y=Ne.y):(se.x=Ne.x,se.y=a.y),this.L(2,se.x,se.y),this.m(3,se.x,se.y)):(ne=this.i(3),y===0||y===180?Vt.B(se.x,ne.x)?(se=y===0?Math.max(se.x,a.x):Math.min(se.x,a.x),this.L(2,se,a.y),this.L(3,se,ne.y)):Vt.B(se.y,ne.y)?(Math.abs(a.y-se.y)<=Ye.Go/2&&(this.L(2,se.x,a.y),this.L(3,ne.x,a.y)),this.m(2,se.x,a.y)):this.L(2,a.x,se.y):(y===90||y===270)&&(Vt.B(se.y,ne.y)?(se=y===90?Math.max(se.y,a.y):Math.min(se.y,a.y),this.L(2,a.x,se),this.L(3,ne.x,se)):Vt.B(se.x,ne.x)?(Math.abs(a.x-se.x)<=Ye.Ho/2&&(this.L(2,a.x,se.y),this.L(3,a.x,ne.y)),this.m(2,a.x,se.y)):this.L(2,se.x,a.y))),x!==null&&(a=this.i(1),ne=this.i(2),a.x!==ne.x&&a.y!==ne.y?y===0||y===180?this.m(2,a.x,ne.y):this.m(2,ne.x,a.y):y===0||y===180?this.m(2,E.x,x.y):this.m(2,x.x,E.y)),Qe!==null&&(b===0||b===180?this.yf(te.x,Qe.y):this.yf(Qe.x,te.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(_e.copy()),this.ne(Ee.copy())),ft.free(_e),ft.free(Ee)}},Bn.prototype.computeMidOrthoPosition=function(a,y,x,b,E){var te=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(te=this.computeCurviness()),E?(y+b)/2+te:(a+x)/2+te};function Yv(a){if(a.diagram===null||!a.isAvoiding||!Ef(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=Lf(a.diagram,!0,a.containingGroup,null);for(var b=1;b<x-2;b++){var E=y[b],te=y[b+1];if(!a.Yj(Math.min(E.x,te.x),Math.min(E.y,te.y),Math.abs(E.x-te.x),Math.abs(E.y-te.y)))return!0}return!1}function Xv(a,y,x,b,E,te,ne){var se=y.Ho,he=y.Go,_e=gh(y,x,b),Ee=x,Ne=b;for(E===0?Ee+=se:E===90?Ne+=he:E===180?Ee-=se:Ne-=he,E!==ne&&_e>xd&&gh(y,Ee,Ne)!==_e-1&&(gh(y,x-se,b)===_e-1?(E=180,Ee=x-se,Ne=b):gh(y,x+se,b)===_e-1?(E=0,Ee=x+se,Ne=b):gh(y,x,b-he)===_e-1?(E=270,Ee=x,Ne=b-he):gh(y,x,b+he)===_e-1&&(E=90,Ee=x,Ne=b+he));_e>xd&&gh(y,Ee,Ne)===_e-1;)x=Ee,b=Ne,E===0?Ee+=se:E===90?Ne+=he:E===180?Ee-=se:Ne-=he,--_e;te?_e>xd&&(E===180||E===0?x=Math.floor(x/se)*se+se/2:(E===90||E===270)&&(b=Math.floor(b/he)*he+he/2)):(x=Math.floor(x/se)*se+se/2,b=Math.floor(b/he)*he+he/2),_e>xd&&(te=E,ne=x,Ee=b,E===0?(te=90,Ee+=he):E===90?(te=180,ne-=se):E===180?(te=270,Ee-=he):E===270&&(te=0,ne+=se),gh(y,ne,Ee)===_e-1?Xv(a,y,ne,Ee,te,!1,te):(ne=x,Ee=b,E===0?(te=270,Ee-=he):E===90?(te=0,ne+=se):E===180?(te=90,Ee+=he):E===270&&(te=180,ne-=se),gh(y,ne,Ee)===_e-1&&Xv(a,y,ne,Ee,te,!1,te))),a.yf(x,b)}Bn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=Qn(y,a,x.x,x.y,b.x,b.y),te=0,ne=1;ne<this.pointsCount-1;ne++){x=this.i(ne+1);var se=Qn(y,a,b.x,b.y,x.x,x.y);b=x,se<E&&(te=ne,E=se)}return te},Bn.prototype.qc=function(){this.lk=!1,this.v()},Bn.prototype.Ul=function(a){if(!(!a&&(this.fd===!1||(a=this.Pb(),this.lk&&(a===null||a.geometry!==null))))&&(2>this.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,b=0;b<x;b++){var E=y[b];E!==a&&E.isPanelMain&&E instanceof ir&&(E.ua=this.ua)}}},Bn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&Sd(this)&&b.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(b.animationManager.isAnimating||b.currentTool!==b.toolManager)&&(x=!0);var E=this.i(0).copy(),te=E.copy();b=this.Nb.s;var ne=this.computeCurve();if(ne===Al&&3<=y&&!Vt.$(this.smoothness,0))if(y===3){var se=this.i(1);b=Math.min(E.x,se.x);var he=Math.min(E.y,se.y);se=this.i(2),b=Math.min(b,se.x),he=Math.min(he,se.y)}else{if(this.isOrthogonal)for(he=0;he<y;he++)se=b[he],te.x=Math.min(se.x,te.x),te.y=Math.min(se.y,te.y);else for(b=3;b<y;b+=3)b+3>=y&&(b=y-1),he=this.i(b),te.x=Math.min(he.x,te.x),te.y=Math.min(he.y,te.y);b=te.x,he=te.y}else{for(he=0;he<y;he++)se=b[he],te.x=Math.min(se.x,te.x),te.y=Math.min(se.y,te.y);b=te.x,he=te.y}if(b-=this.su.x,he-=this.su.y,E.x-=b,E.y-=he,y!==2||Sd(this)){if(a.type=In.o,se=A1(a),this.computeShortLength(!0)!==0&&(E=Xd(this,E,!0,te)),Wf(se,E.x,E.y,!1),ne===Al&&3<=y&&!Vt.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-b,x=x.y-he,E=this.i(2).copy(),E.x-=b,E.y-=he,this.computeShortLength(!1)!==0&&(E=Xd(this,E,!1,te)),$h(se,y,x,y,x,E.x,E.y);else if(this.isOrthogonal){y=ft.allocAt(b,he),x=ft.alloc(),x.assign(this.i(1)),te=ft.allocAt(b,he),E=ft.allocAt(b,he),ne=this.i(0);for(var _e,Ee=this.smoothness/3,Ne=1;Ne<this.pointsCount-1;Ne++){_e=this.i(Ne);var He=ne,Ye=_e,Qe=this.i(Jv(this,_e,Ne,!1));if((!Vt.$(He.x,Ye.x)||!Vt.$(Ye.x,Qe.x))&&(!Vt.$(He.y,Ye.y)||!Vt.$(Ye.y,Qe.y))){var st=Ee;isNaN(st)&&(st=this.smoothness/3);var Pt=He.x;He=He.y;var St=Ye.x;Ye=Ye.y;var Tt=Qe.x;Qe=Qe.y;var At=st*qm(Pt,He,St,Ye);st*=qm(St,Ye,Tt,Qe),Vt.$(He,Ye)&&Vt.$(St,Tt)&&(St>Pt?Qe>Ye?(te.x=St-At,te.y=Ye-At,E.x=St+st,E.y=Ye+st):(te.x=St-At,te.y=Ye+At,E.x=St+st,E.y=Ye-st):Qe>Ye?(te.x=St+At,te.y=Ye-At,E.x=St-st,E.y=Ye+st):(te.x=St+At,te.y=Ye+At,E.x=St-st,E.y=Ye-st)),Vt.$(Pt,St)&&Vt.$(Ye,Qe)&&(Ye>He?(Tt>St?(te.x=St-At,te.y=Ye-At,E.x=St+st):(te.x=St+At,te.y=Ye-At,E.x=St-st),E.y=Ye+st):(Tt>St?(te.x=St-At,te.y=Ye+At,E.x=St+st):(te.x=St+At,te.y=Ye+At,E.x=St-st),E.y=Ye-st)),(Vt.$(Pt,St)&&Vt.$(St,Tt)||Vt.$(He,Ye)&&Vt.$(Ye,Qe))&&(Pt=.5*(Pt+Tt),He=.5*(He+Qe),te.x=Pt,te.y=He,E.x=Pt,E.y=He),(Ne===1||Ne===2&&Vt.$(ne.x,this.i(0).x)&&Vt.$(ne.y,this.i(0).y))&&(x.x=.5*(ne.x+_e.x),x.y=.5*(ne.y+_e.y)),$h(se,x.x-b,x.y-he,te.x-b,te.y-he,_e.x-b,_e.y-he),y.set(te),x.set(E),ne=_e}}_e=ne.x,ne=ne.y,Ee=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(Ee=Xd(this,Ee.copy(),!1,Zn)),_e=.5*(_e+Ee.x),ne=.5*(ne+Ee.y),$h(se,E.x-b,E.y-he,_e-b,ne-he,Ee.x-b,Ee.y-he),ft.free(y),ft.free(x),ft.free(te),ft.free(E)}else for(x=3;x<y;x+=3)te=this.i(x-2),x+3>=y&&(x=y-1),E=this.i(x-1),ne=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(ne=Xd(this,ne.copy(),!1,Zn)),$h(se,te.x-b,te.y-he,E.x-b,E.y-he,ne.x-b,ne.y-he);else{for(te=ft.alloc(),te.assign(this.i(0)),E=ft.alloc(),E.assign(te),ne=this.computeCorner(),Ne=1,_e=0;Ne<y;){if(Ne=Jv(this,te,Ne,1<Ne),Ee=this.i(Ne),Ne>=y-1){if(!te.D(Ee))this.computeShortLength(!1)!==0&&(Ee=Xd(this,Ee.copy(),!1,Zn)),Jd(this,se,-b,-he,te,Ee,x);else if(_e===0)for(Ne=1;Ne<y;)E.assign(te),Ee=this.i(Ne++),Jd(this,se,-b,-he,te,Ee,x),te.assign(Ee);break}if(_e=Jv(this,Ee,Ne+1,Ne<y-3),Ne=-b,Pt=-he,He=Ee,St=this.i(_e),st=x,Vt.B(te.y,He.y)&&Vt.B(He.x,St.x))if(Qe=Math.min(ne,Math.abs(He.x-E.x)/2),Qe=At=Math.min(Qe,Math.abs(St.y-He.y)/2),Vt.B(Qe,0))Jd(this,se,Ne,Pt,te,He,st),te.assign(He);else{var It=He.x,Wt=He.y;Ye=It,Tt=Wt,He.x>te.x?It=He.x-Qe:It=He.x+Qe,St.y>He.y?Tt=He.y+At:Tt=He.y-At,St=ft.allocAt(It,Wt),Jd(this,se,Ne,Pt,te,St,st),ft.free(St),Um(se,He.x+Ne,He.y+Pt,Ye+Ne,Tt+Pt),te.h(Ye,Tt)}else Vt.B(te.x,He.x)&&Vt.B(He.y,St.y)?(Qe=Math.min(ne,Math.abs(He.y-E.y)/2),Qe=At=Math.min(Qe,Math.abs(St.x-He.x)/2),Vt.B(At,0)?(Jd(this,se,Ne,Pt,te,He,st),te.assign(He)):(It=He.x,Wt=He.y,Ye=It,Tt=Wt,He.y>te.y?Wt=He.y-Qe:Wt=He.y+Qe,St.x>He.x?Ye=He.x+At:Ye=He.x-At,St=ft.allocAt(It,Wt),Jd(this,se,Ne,Pt,te,St,st),ft.free(St),Um(se,He.x+Ne,He.y+Pt,Ye+Ne,Tt+Pt),te.h(Ye,Tt))):(Jd(this,se,Ne,Pt,te,He,st),te.assign(He));E.assign(Ee),Ne=_e}ft.free(te)}Hm=se}else se=this.i(1).copy(),se.x-=b,se.y-=he,this.computeShortLength(!0)!==0&&(E=Xd(this,E,!0,te)),this.computeShortLength(!1)!==0&&(se=Xd(this,se,!1,te)),a.type=In.j,a.startX=E.x,a.startY=E.y,a.endX=se.x,a.endY=se.y;return this.lk=!0,a};function qm(a,y,x,b){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=b-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),Vt.$(a,0)?y:Vt.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Xd(a,y,x,b){var E=a.pointsCount;if(2>E)return y;if(x){var te=a.i(1);if(x=te.x-b.x,te=te.y-b.y,b=qm(y.x,y.y,x,te),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!0),a>E&&(a=E),E=a*(te-y.y)/b,y.x+=a*(x-y.x)/b,y.y+=E}else{if(te=a.i(E-2),x=te.x-b.x,te=te.y-b.y,b=qm(y.x,y.y,x,te),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!1),a>E&&(a=E),E=a*(y.y-te)/b,y.x-=a*(y.x-x)/b,y.y-=E}return y}function Jv(a,y,x,b){for(var E=a.pointsCount,te=y;Vt.$(y.x,te.x)&&Vt.$(y.y,te.y);){if(x>=E)return E-1;te=a.i(x++)}if(!Vt.$(y.x,te.x)&&!Vt.$(y.y,te.y))return x-1;for(var ne=te;Vt.$(y.x,te.x)&&Vt.$(te.x,ne.x)&&(!b||(y.y>=te.y?te.y>=ne.y:te.y<=ne.y))||Vt.$(y.y,te.y)&&Vt.$(te.y,ne.y)&&(!b||(y.x>=te.x?te.x>=ne.x:te.x<=ne.x));){if(x>=E)return E-1;ne=a.i(x++)}return x-2}Bn.prototype.computeJumpLength=function(){return 10};function Jd(a,y,x,b,E,te,ne){if(!ne&&Sd(a)){ne=a.computeJumpLength();var se=ne/2,he=[],_e=0;if(a.isVisible()&&(_e=Ex(a,E,te,he)),0<_e){if(Vt.B(E.y,te.y))if(E.x<te.x)for(var Ee=0;Ee<_e;){var Ne=Math.max(E.x,Math.min(he[Ee++]-se,te.x-ne));y.lineTo(Ne+x,te.y+b);for(var He=Ne+x,Ye=Math.min(Ne+ne,te.x);Ee<_e&&(Ne=he[Ee],Ne<Ye+ne);)Ee++,Ye=Math.min(Ne+se,te.x);Ne=te.y-ne+b,Ye+=x;var Qe=te.y+b;a.curve===ic?Wf(y,Ye,Qe,!1):$h(y,He,Ne,Ye,Ne,Ye,Qe)}else for(--_e;0<=_e;){for(Ee=Math.min(E.x,Math.max(he[_e--]+se,te.x+ne)),y.lineTo(Ee+x,te.y+b),He=Ee+x,Ne=Math.max(Ee-ne,te.x);0<=_e&&(Ee=he[_e],Ee>Ne-ne);)_e--,Ne=Math.max(Ee-se,te.x);Ee=te.y-ne+b,Ne+=x,Ye=te.y+b,a.curve===ic?Wf(y,Ne,Ye,!1):$h(y,He,Ee,Ne,Ee,Ne,Ye)}else if(Vt.B(E.x,te.x))if(E.y<te.y)for(Ee=0;Ee<_e;){for(Ne=Math.max(E.y,Math.min(he[Ee++]-se,te.y-ne)),y.lineTo(te.x+x,Ne+b),He=Ne+b,Ne=Math.min(Ne+ne,te.y);Ee<_e&&(Ye=he[Ee],Ye<Ne+ne);)Ee++,Ne=Math.min(Ye+se,te.y);Ye=te.x-ne+x,Qe=te.x+x,Ne+=b,a.curve===ic?Wf(y,Qe,Ne,!1):$h(y,Ye,He,Ye,Ne,Qe,Ne)}else for(--_e;0<=_e;){for(Ee=Math.min(E.y,Math.max(he[_e--]+se,te.y+ne)),y.lineTo(te.x+x,Ee+b),He=Ee+b,Ee=Math.max(Ee-ne,te.y);0<=_e&&(Ne=he[_e],Ne>Ee-ne);)_e--,Ee=Math.max(Ne-se,te.y);Ne=te.x-ne+x,Ye=te.x+x,Ee+=b,a.curve===ic?Wf(y,Ye,Ee,!1):$h(y,Ne,He,Ne,Ee,Ye,Ee)}}}y.lineTo(te.x+x,te.y+b)}function Ex(a,y,x,b){var E=a.diagram;if(E===null||y.D(x))return 0;for(E=E.layers;E.next();){var te=E.value;if(te!==null&&te.visible){te=te.Pa.s;for(var ne=te.length,se=0;se<ne;se++){var he=te[se];if(he instanceof Bn){if(he===a)return 0<b.length&&b.sort(function(Ee,Ne){return Ee-Ne}),b.length;if(he.isVisible()&&Sd(he)){var _e=he.routeBounds;_e.w()&&a.routeBounds.Yc(_e)&&!a.usesSamePort(he)&&(_e=he.path,_e!==null&&_e.Ed()&&Lx(y,x,b,he))}}}}}return 0<b.length&&b.sort(function(Ee,Ne){return Ee-Ne}),b.length}function Lx(a,y,x,b){for(var E=Vt.B(a.y,y.y),te=b.pointsCount,ne=b.i(0),se=ft.alloc(),he=1;he<te;he++){var _e=b.i(he);if(he<te-1){var Ee=b.i(he+1);if(ne.y===_e.y&&_e.y===Ee.y){if(_e.x>ne.x&&Ee.x>=_e.x||_e.x<ne.x&&Ee.x<=_e.x)continue}else if(ne.x===_e.x&&_e.x===Ee.x&&(_e.y>ne.y&&Ee.y>=_e.y||_e.y<ne.y&&Ee.y<=_e.y))continue}e:{Ee=a.x;var Ne=a.y,He=y.x,Ye=y.y,Qe=ne.x;ne=ne.y;var st=_e.x,Pt=_e.y;if(Vt.B(Ee,He)){if(!Vt.B(Ne,Ye)&&Vt.B(ne,Pt)&&Math.min(Ne,Ye)<ne&&Math.max(Ne,Ye)>ne&&Math.min(Qe,st)<Ee&&Math.max(Qe,st)>Ee&&!Vt.B(Qe,st)){se.x=Ee,se.y=ne,Ee=!0;break e}}else if(Vt.B(Ne,Ye)&&Vt.B(Qe,st)&&Math.min(Ee,He)<Qe&&Math.max(Ee,He)>Qe&&Math.min(ne,Pt)<Ne&&Math.max(ne,Pt)>Ne&&!Vt.B(ne,Pt)){se.x=Qe,se.y=Ne,Ee=!0;break e}se.x=0,se.y=0,Ee=!1}Ee&&(E?x.push(se.x):x.push(se.y)),ne=_e}ft.free(se)}function Sd(a){return a=a.curve,a===Kf||a===ic}function Qm(a,y){(y||Sd(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()))}Bn.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 b=!1;for(x=x.layers;x.next();){var E=x.value;if(E.visible){if(E===y){b=!0;var te=!1;E=E.Pa.s;for(var ne=E.length,se=0;se<ne;se++){var he=E[se];he instanceof Bn&&(he===this?te=!0:te&&tS(this,he,a))}}else if(b)for(te=E.Pa.s,E=te.length,ne=0;ne<E;ne++)se=te[ne],se instanceof Bn&&tS(this,se,a)}}}}};function tS(a,y,x){if(y!==null&&y.lk&&y.fd&&Sd(y)){var b=y.routeBounds;b.w()&&(a.routeBounds.Yc(b)||x.Yc(b))&&(a.usesSamePort(y)||y.qc())}}Bn.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var b=this.i(0),E=a.i(0);if(b.Xa(E)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||b.Xa(a)||y.Xa(E)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},Bn.prototype.isVisible=function(){if(!Ci.prototype.isVisible.call(this))return!1;var a=this.containingGroup,y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this.fromNode,x!==null){if(this.isTreeLink&&y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(var b=x;b!==null;){if(b.labeledLink===this)return!0;b=b.containingGroup}if(x=x.findVisibleNode(),x===null||x===a)return!1}if(x=this.toNode,x!==null){if(this.isTreeLink&&!y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(y=x;y!==null;){if(y.labeledLink===this)return!0;y=y.containingGroup}if(y=x.findVisibleNode(),y===null||y===a)return!1}return!0},Bn.prototype.Zb=function(a){if(Ci.prototype.Zb.call(this,a),a&&Qm(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},Bn.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?hg:this.qk};function lg(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var b=a.ff,E=a.vf,te=a=null,ne=y.jb.s,se=ne.length,he=0;he<se;he++){var _e=ne[he];(_e.ef===y&&_e.ff===b&&_e.uf===x&&_e.vf===E||_e.ef===x&&_e.ff===E&&_e.uf===y&&_e.vf===b)&&(te===null?te=_e:(a===null&&(a=[],a.push(te)),a.push(_e)))}if(a!==null){for(te=G1(y,x,b,E),te===null&&(te=new i0(y,b,x,E),H1(y,te),H1(x,te)),te.links=a,y=0;y<a.length;y++)a[y].Sf=te;te.Sl()}}}}function ug(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(oi(y.links,a),y.Sl()))}Bn.prototype.ph=function(){return!0},ot.Object.defineProperties(Bn.prototype,{fromNode:{get:function(){return this.ef},set:function(a){var y=this.ef;if(y!==a){var x=this.fromPort;y!==null&&(this.uf!==y&&Vm(y,this,x),ug(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setFromNodeForLink(this,a,y);var E=this.fromPort,te=this.fromPortChanged;if(te!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),te(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.uf!==a&&Zm(a,this,E),lg(this),this.C(1)),this.g("fromNode",y,a),Zf(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&vl(x),ug(this),this.ff=a;var b=this.fromPort;b!==null&&vl(b);var E=this.diagram;if(E!==null){var te=this.data,ne=E.model;te!==null&&ne.ri()&&ne.xv(te,a)}x!==b&&(this.Wf=null,this.bb(),te=this.fromPortChanged,te!==null&&(ne=!0,E!==null&&(ne=E.aa,E.aa=!0),te(this,x,b),E!==null&&(E.aa=ne))),lg(this),this.g("fromPortId",y,a)}}},fromPort:{get:function(){var a=this.ef;return a===null?null:a.ns(this.ff)}},fromPortChanged:{get:function(){return this.gn},set:function(a){var y=this.gn;y!==a&&(this.gn=a,this.g("fromPortChanged",y,a))}},toNode:{get:function(){return this.uf},set:function(a){var y=this.uf;if(y!==a){var x=this.toPort;y!==null&&(this.ef!==y&&Vm(y,this,x),ug(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setToNodeForLink(this,a,y);var E=this.toPort,te=this.toPortChanged;if(te!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),te(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.ef!==a&&Zm(a,this,E),lg(this),this.C(1)),this.g("toNode",y,a),Zf(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&vl(x),ug(this),this.vf=a;var b=this.toPort;b!==null&&vl(b);var E=this.diagram;if(E!==null){var te=this.data,ne=E.model;te!==null&&ne.ri()&&ne.Cv(te,a)}x!==b&&(this.Wf=null,this.bb(),te=this.toPortChanged,te!==null&&(ne=!0,E!==null&&(ne=E.aa,E.aa=!0),te(this,x,b),E!==null&&(E.aa=ne))),lg(this),this.g("toPortId",y,a)}}},toPort:{get:function(){var a=this.uf;return a===null?null:a.ns(this.vf)}},toPortChanged:{get:function(){return this.uo},set:function(a){var y=this.uo;y!==a&&(this.uo=a,this.g("toPortChanged",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:As},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),(y.$c()||a.$c())&&this.fromNode!==null&&vl(this.fromPort),this.bb())}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:NaN},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Pn(a,">= 0",Bn,"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:As},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&&vl(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&&Pn(a,">= 0",Bn,"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<this.wd.count}},labelNodes:{get:function(){return this.wd===null?yr:this.wd.iterator}},relinkableFrom:{get:function(){return(this.Qa&1)!==0},set:function(a){var y=(this.Qa&1)!==0;y!==a&&(this.Qa^=1,this.g("relinkableFrom",y,a),this.Wb())}},relinkableTo:{get:function(){return(this.Qa&2)!==0},set:function(a){var y=(this.Qa&2)!==0;y!==a&&(this.Qa^=2,this.g("relinkableTo",y,a),this.Wb())}},resegmentable:{get:function(){return(this.Qa&4)!==0},set:function(a){var y=(this.Qa&4)!==0;y!==a&&(this.Qa^=4,this.g("resegmentable",y,a),this.Wb())}},isTreeLink:{get:function(){return(this.Qa&8)!==0},set:function(a){var y=(this.Qa&8)!==0;y!==a&&(this.Qa^=8,this.g("isTreeLink",y,a),this.fromNode!==null&&ag(this.fromNode),this.toNode!==null&&ag(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof ir?a:null}},routeBounds:{get:function(){this.vg();var a=this.ml,y=1/0,x=1/0,b=this.pointsCount;if(b===0)a.h(NaN,NaN,0,0);else{if(b===1)b=this.i(0),y=Math.min(b.x,y),x=Math.min(b.y,x),a.h(b.x,b.y,0,0);else if(b===2){b=this.i(0);var E=this.i(1);y=Math.min(b.x,E.x),x=Math.min(b.y,E.y),a.h(b.x,b.y,0,0),a.Ye(E)}else if(this.computeCurve()===Al&&3<=b&&!this.isOrthogonal)if(E=this.i(0),y=E.x,x=E.y,a.h(y,x,0,0),b===3){b=this.i(1),y=Math.min(b.x,y),x=Math.min(b.y,x);var te=this.i(2);y=Math.min(te.x,y),x=Math.min(te.y,x),Vt.Dl(E.x,E.y,b.x,b.y,b.x,b.y,te.x,te.y,.5,a)}else for(te=3;te<b;te+=3){var ne=this.i(te-2);te+3>=b&&(te=b-1);var se=this.i(te-1),he=this.i(te);Vt.Dl(E.x,E.y,ne.x,ne.y,se.x,se.y,he.x,he.y,.5,a),y=Math.min(he.x,y),x=Math.min(he.y,x),E=he}else for(E=this.i(0),te=this.i(1),y=Math.min(E.x,te.x),x=Math.min(E.y,te.y),a.h(E.x,E.y,0,0),a.Ye(te),E=2;E<b;E++)te=this.i(E),y=Math.min(te.x,y),x=Math.min(te.y,x),a.Ye(te);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new ft)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||Ym(this);for(var a=this.cq=[],y=this.pointsCount,x=0;x<y-1;x++){var b=this.i(x),E=this.i(x+1);Vt.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):Vt.$(b.y,E.y)?(b=E.x-b.x,0>b&&(b=-b)):b=Math.sqrt(b.Bf(E)),a.push(b)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,b=a=0;b<x;b++)a+=y[b];this.vt=a}return a}},points:{get:function(){return this.Nb},set:function(a){var y=this.Nb;if(y!==a){var x=null;if(Array.isArray(a)){var b=a.length%2===0;if(b){for(var E=0;E<a.length;E++)if(typeof a[E]!="number"||isNaN(a[E])){b=!1;break}}if(b)for(x=new Ln,b=0;b<a.length/2;b++)E=new ft(a[2*b],a[2*b+1]).freeze(),x.add(E);else{for(b=!0,E=0;E<a.length;E++){var te=a[E];if(!Kt(te)||typeof te.x!="number"||isNaN(te.x)||typeof te.y!="number"||isNaN(te.y)){b=!1;break}}if(b)for(x=new Ln,b=0;b<a.length;b++)E=a[b],x.add(new ft(E.x,E.y).freeze())}}else if(a instanceof Ln)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Lt("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Ym(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&vf(a.animationManager,this,x)),this.g("points",y,x)}}},pointsCount:{get:function(){return this.Nb.count}},fd:{get:function(){return(this.Qa&16)!==0},set:function(a){(this.Qa&16)!==0!==a&&(this.Qa^=16)}},suspendsRouting:{get:function(){return(this.Qa&32)!==0},set:function(a){(this.Qa&32)!==0!==a&&(this.Qa^=32)}},computingPoints:{get:function(){return(this.Qa&64)!==0},set:function(a){(this.Qa&64)!==0!==a&&(this.Qa^=64)}},defaultFromPoint:{get:function(){return this.o},set:function(a){this.o=a.copy()}},defaultToPoint:{get:function(){return this.u},set:function(a){this.u=a.copy()}},isOrthogonal:{get:function(){return(this.qj.value&2)===2}},isAvoiding:{get:function(){return(this.qj.value&4)===4}},lk:{get:function(){return(this.Qa&128)!==0},set:function(a){(this.Qa&128)!==0!==a&&(this.Qa^=128)}},geometry:{get:function(){if(!this.lk){if(this.vg(),2>this.pointsCount)return this.lk=!0,this.ua;this.ua=this.makeGeometry()}return this.ua}},firstPickIndex:{get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!Vf(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Vf(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(),Qm(this,y===ic||y===Kf||a===ic||a===Kf),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(),Qm(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)}}}),Bn.prototype.invalidateOtherJumpOvers=Bn.prototype.Xo,Bn.prototype.findClosestSegment=Bn.prototype.ez,Bn.prototype.updateRoute=Bn.prototype.vg,Bn.prototype.invalidateRoute=Bn.prototype.bb,Bn.prototype.rollbackRoute=Bn.prototype.rv,Bn.prototype.commitRoute=Bn.prototype.zf,Bn.prototype.startRoute=Bn.prototype.uh,Bn.prototype.clearPoints=Bn.prototype.Fj,Bn.prototype.removePoint=Bn.prototype.pv,Bn.prototype.addPointAt=Bn.prototype.yf,Bn.prototype.addPoint=Bn.prototype.ne,Bn.prototype.insertPointAt=Bn.prototype.m,Bn.prototype.insertPoint=Bn.prototype.Kz,Bn.prototype.setPointAt=Bn.prototype.L,Bn.prototype.setPoint=Bn.prototype.dd,Bn.prototype.getPoint=Bn.prototype.i,Bn.prototype.getOtherPort=Bn.prototype.Cz,Bn.prototype.getOtherNode=Bn.prototype.To;var qd=null,Qd=null,qv=new nn(Bn,"Normal",1),Mx=new nn(Bn,"Orthogonal",2),kx=new nn(Bn,"AvoidsNodes",6),nS=new nn(Bn,"AvoidsNodesStraight",7),za=new nn(Bn,"None",0),Al=new nn(Bn,"Bezier",9),ic=new nn(Bn,"JumpGap",10),Kf=new nn(Bn,"JumpOver",11),hg=new nn(Bn,"End",17),$m=new nn(Bn,"Scale",18),e0=new nn(Bn,"Stretch",19),cg=new nn(Bn,"OrientAlong",21),dg=new nn(Bn,"OrientPlus90",22),fg=new nn(Bn,"OrientMinus90",23),Qv=new nn(Bn,"OrientOpposite",24),t0=new nn(Bn,"OrientUpright",25),pg=new nn(Bn,"OrientPlus90Upright",26),gg=new nn(Bn,"OrientMinus90Upright",27),n0=new nn(Bn,"OrientUpright45",28),iS=16,rS=14,mg=8;Bn.className="Link",Bn.Normal=qv,Bn.Orthogonal=Mx,Bn.AvoidsNodes=kx,Bn.AvoidsNodesStraight=nS,Bn.None=za,Bn.Bezier=Al,Bn.JumpGap=ic,Bn.JumpOver=Kf,Bn.End=hg,Bn.Scale=$m,Bn.Stretch=e0,Bn.OrientAlong=cg,Bn.OrientPlus90=dg,Bn.OrientMinus90=fg,Bn.OrientOpposite=Qv,Bn.OrientUpright=t0,Bn.OrientPlus90Upright=pg,Bn.OrientMinus90Upright=gg,Bn.OrientUpright45=n0,Bn.EndSegmentStep=8,Bn.CurvinessStart=iS,Bn.SpacingMin=rS,Bn.OrthoShortCut=mg;function i0(a,y,x,b){Di(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=b,this.links=[]}i0.prototype.Sl=function(){if(!this.qq){var a=this.links;0<a.length&&(a=a[0].diagram,a!==null&&(a.ow.add(this),this.Fe=a.undoManager.isUndoingRedoing))}this.qq=!0},i0.prototype.Nv=function(){if(this.qq){this.qq=!1;var a=this.links;if(0<a.length){var y=a[0],x=y.diagram;x=x===null||x.pi&&!this.Fe,this.Fe=!1,y.arrangeBundledLinks(a,x),a.length===1&&(y.Sf=null,a.length=0)}a.length===0&&(a=this.Ds,this!==null&&a.af!==null&&a.af.remove(this),a=this.cv,this!==null&&a.af!==null&&a.af.remove(this))}},i0.className="LinkBundle";function vg(a){Di(this),this.Yx=this.group=null,this.vs=!0,this.abort=!1,this.Od=this.Nd=1,this.Fn=this.En=-1,this.rc=a.width,this.sc=a.height,this.ac=null,this.ei=this.di=0,this.Os=11,this.Ix=this.Hx=22}vg.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,b=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((b+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<a-1||this.ei<y-1){for(x=[],b=0;b<=a;b++)x[b]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=$v,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(b=0;b<=this.ei;b++)x[b]=a}};function Yf(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function gh(a,y,x){return Yf(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):$v}function oS(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],b=0;b<=a.ei;b++)x[b]>=xd&&(x[b]=$v)}vg.prototype.Yj=function(a,y,x,b){if(a>this.En||a+x<this.Nd||y>this.Fn||y+b<this.Od)return!0;a=(a-this.Nd)/this.rc|0,y=(y-this.Od)/this.sc|0,x=Math.max(0,x)/this.rc+1|0;var E=Math.max(0,b)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(E+=y,y=0),0>x||0>E)return!0;for(b=Math.min(a+x-1,this.di)|0,x=Math.min(y+E-1,this.ei)|0;a<=b;a++){E=this.ac[a];for(var te=y;te<=x;te++)if(E[te]===rc)return!1}return!0};function mh(a,y,x,b,E,te,ne,se,he){if(!(y<te||y>ne||x<se||x>he)){var _e=y|0,Ee=x|0,Ne=a.ac[_e][Ee];if(Ne>=xd&&Ne<Xf)for(E?Ee+=b:_e+=b,Ne+=1;te<=_e&&_e<=ne&&se<=Ee&&Ee<=he&&!(Ne>=a.ac[_e][Ee]);)a.ac[_e][Ee]=Ne,Ne+=1,E?Ee+=b:_e+=b;if(_e=E?Ee:_e,E)if(0<b)for(x+=b;x<_e;x+=b)mh(a,y,x,1,!E,te,ne,se,he),mh(a,y,x,-1,!E,te,ne,se,he);else for(x+=b;x>_e;x+=b)mh(a,y,x,1,!E,te,ne,se,he),mh(a,y,x,-1,!E,te,ne,se,he);else if(0<b)for(y+=b;y<_e;y+=b)mh(a,y,x,1,!E,te,ne,se,he),mh(a,y,x,-1,!E,te,ne,se,he);else for(y+=b;y>_e;y+=b)mh(a,y,x,1,!E,te,ne,se,he),mh(a,y,x,-1,!E,te,ne,se,he)}}function r0(a,y,x,b,E,te,ne,se,he){y|=0,x|=0;var _e=rc,Ee=xd;for(a.ac[y][x]=Ee;_e===rc&&y>te&&y<ne&&x>se&&x<he;)Ee+=1,a.ac[y][x]=Ee,E?x+=b:y+=b,_e=a.ac[y][x]}function o0(a,y,x,b,E,te,ne,se,he){y|=0,x|=0;var _e=rc,Ee=Xf;for(a.ac[y][x]=Ee;_e===rc&&y>te&&y<ne&&x>se&&x<he;)a.ac[y][x]=Ee,E?x+=b:y+=b,_e=a.ac[y][x]}function sS(a,y,x,b,E,te,ne){if(a.ac!==null){a.abort=!1;var se=y.x,he=y.y;if(Yf(a,se,he)){se-=a.Nd,se/=a.rc,he-=a.Od,he/=a.sc;var _e=b.x,Ee=b.y;if(Yf(a,_e,Ee))if(_e-=a.Nd,_e/=a.rc,Ee-=a.Od,Ee/=a.sc,1>=Math.abs(se-_e)&&1>=Math.abs(he-Ee))a.abort=!0;else{var Ne=te.x;b=te.y,y=te.x+te.width;var He=te.y+te.height;Ne-=a.Nd,Ne/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,He-=a.Od,He/=a.sc,te=Math.max(0,Math.min(a.di,Ne|0)),y=Math.min(a.di,Math.max(0,y|0)),Ne=Math.max(0,Math.min(a.ei,b|0)),He=Math.min(a.ei,Math.max(0,He|0)),b=a.ac,se|=0,he|=0,_e|=0,Ee|=0;var Ye=x===0||x===90?1:-1;if(x=x===90||x===270,b[se][he]===rc?(r0(a,se,he,Ye,x,te,y,Ne,He),r0(a,se,he,1,!x,te,y,Ne,He),r0(a,se,he,-1,!x,te,y,Ne,He)):r0(a,se,he,Ye,x,se,he,se,he),b[_e][Ee]===rc?(o0(a,_e,Ee,E===0||E===90?1:-1,E===90||E===270,te,y,Ne,He),o0(a,_e,Ee,1,!(E===90||E===270),te,y,Ne,He),o0(a,_e,Ee,-1,!(E===90||E===270),te,y,Ne,He)):o0(a,_e,Ee,Ye,x,_e,Ee,_e,Ee),x=Wn(),ne&&aS(a,_e,Ee,E,se,he,x))for((x[0]!==_e||x[1]!==Ee)&&(x.unshift(Ee),x.unshift(_e)),(x[x.length-2]!==se||x[x.length-1]!==he)&&(x.push(se),x.push(he)),a=xd,E=x[x.length-2],ne=x[x.length-1],b[E][ne]=a++,te=x.length-4;0<=te;te-=2)for(E=x[te+2],ne=x[te+3],y=x[te],_e=x[te+1];y>E?E++:y<E?E--:_e>ne?ne++:_e<ne&&ne--,b[E][ne]=a++,E!==y||ne!==_e;);else mh(a,se,he,1,!1,te,y,Ne,He),mh(a,se,he,-1,!1,te,y,Ne,He),mh(a,se,he,1,!0,te,y,Ne,He),mh(a,se,he,-1,!0,te,y,Ne,He);zn(x)}}}}function aS(a,y,x,b,E,te,ne){for(var se=a.ac,he=y,_e=x;;){if(he===E&&_e===te)return!0;var Ee=he,Ne=_e;if(b===0)if(Ee<E)Ee++;else break;else if(b===90)if(Ne<te)Ne++;else break;else if(b===180)if(Ee>E)Ee--;else break;else if(Ne>te)Ne--;else break;var He=se[Ee][Ne];if(He===0||He===ey)break;he=Ee,_e=Ne}for(;;){if(Ee=b,Ne=he,He=_e,b===0?He<te?(Ee=90,He++):He>te&&(Ee=270,He--):b===90?Ne<E?(Ee=0,Ne++):Ne>E&&(Ee=180,Ne--):b===180?He<te?(Ee=90,He++):He>te&&(Ee=270,He--):Ne<E?(Ee=0,Ne++):Ne>E&&(Ee=180,Ne--),Ne=se[Ne][He],Ee!==b&&Ne!==0&&Ne!==ey){if(ne.push(he),ne.push(_e),aS(a,he,_e,Ee,E,te,ne))return!0;ne.pop(),ne.pop()}if(se[he][_e]=ey,b===0){if(he===y)return!1;he--}else if(b===90){if(_e===x)return!1;_e--}else if(b===180){if(he===y)return!1;he++}else{if(_e===x)return!1;_e++}}}ot.Object.defineProperties(vg.prototype,{bounds:{get:function(){return new sn(this.Nd,this.Od,this.En-this.Nd,this.Fn-this.Od)}},Ho:{get:function(){return this.rc},set:function(a){0<a&&a!==this.rc&&(this.rc=a,this.initialize(this.bounds))}},Go:{get:function(){return this.sc},set:function(a){0<a&&a!==this.sc&&(this.sc=a,this.initialize(this.bounds))}}});var rc=0,xd=1,Xf=999999,$v=Xf+1,ey=Xf+2;vg.className="PositionArray";function $d(){Di(this),this.port=this.node=null,this.pe=[],this.ap=!1}$d.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var b=a[x];b!==null&&(y+=`
|
|
|
`+b.toString())}return y};function Tx(a,y,x,b){switch(y=y.offsetY,y){case 8:return 90;case 2:return 180;case 1:return 270;case 4:return 0}switch(y){case 9:return 180<x?270:90;case 6:return 90<x&&270>=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 90<x&&x<=180+a?180:x>180+a&&x<=360-a?270:0;case 13:return 180<x&&x<=360-a?270:x>a&&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 b&&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}$d.prototype.Sl=function(){this.pe.length=0};function lS(a,y){var x=a.pe;if(x.length===0){e:if(!a.ap){x=a.ap,a.ap=!0;var b=null,E=a.node,te=E instanceof Ki?E:null;if(te===null||te.isSubGraphExpanded)var ne=E.isTreeExpanded?E.findLinksConnected(a.port.portId):E.qx();else{if(!te.actualBounds.w()){a.ap=x;break e}b=te,ne=b.Lu()}te=a.pe.length=0;var se=a.port.ga(xr,ft.alloc()),he=a.port.ga(eo,ft.alloc());for(E=sn.allocAt(se.x,se.y,0,0),E.Ye(he),ft.free(se),ft.free(he),se=ft.allocAt(E.x+E.width/2,E.y+E.height/2),he=a.port.li(),ne=ne.iterator;ne.next();){var _e=ne.value;if(_e.isVisible()&&_e.fromPort!==_e.toPort){var Ee=_e.fromPort===a.port||_e.fromNode!==null&&_e.fromNode.Td(b),Ne=_e.computeSpot(Ee,a.port);if(Ne.$c()&&(Ee=Ee?_e.toPort:_e.fromPort,Ee!==null)){var He=Ee.part;if(He!==null){var Ye=He.findVisibleNode();Ye!==null&&Ye!==He&&(He=Ye,Ee=He.port),Ee=_e.computeOtherPoint(He,Ee),He=se.ab(Ee),He-=he,0>He?He+=360:360<=He&&(He-=360),Ne=Tx(E,Ne,He,_e.isOrthogonal),Ne===0?(Ne=4,180<He&&(He-=360)):Ne===90?(Ne=8,270<He&&(He-=360)):Ne===180?Ne=2:(Ne=1,90>He&&(He+=360)),Ye=a.pe[te],Ye===void 0?(Ye=new ty(_e,He,Ne),a.pe[te]=Ye):(Ye.link=_e,Ye.angle=He,Ye.Nc=Ne),Ye.hv.set(Ee),te++}}}}for(ft.free(se),a.pe.sort($d.prototype.j),he=a.pe.length,b=-1,te=se=0;te<he;te++)ne=a.pe[te],ne!==void 0&&(ne.Nc!==b&&(b=ne.Nc,se=0),ne.Uo=se,se++);for(b=-1,se=0,te=he-1;0<=te;te--)he=a.pe[te],he!==void 0&&(he.Nc!==b&&(b=he.Nc,se=he.Uo+1),he.Gl=se);if(te=a.pe,Ne=a.port,b=a.node.portSpreading,se=ft.alloc(),he=ft.alloc(),ne=ft.alloc(),_e=ft.alloc(),Ne.ga(xr,se),Ne.ga(Qr,he),Ne.ga(eo,ne),Ne.ga(fs,_e),Ye=He=Ee=Ne=0,b===Wv)for(var Qe=0;Qe<te.length;Qe++){var st=te[Qe];if(st!==null){var Pt=st.link.computeThickness();switch(st.Nc){case 8:He+=Pt;break;case 2:Ye+=Pt;break;case 1:Ne+=Pt;break;default:case 4:Ee+=Pt}}}var St=Qe=0,Tt=1,At=st=0;for(Pt=0;Pt<te.length;Pt++){var It=te[Pt];if(It!==null){if(Qe!==It.Nc){switch(Qe=It.Nc,Qe){case 8:var Wt=ne;St=_e;break;case 2:Wt=_e,St=se;break;case 1:Wt=se,St=he;break;default:case 4:Wt=he,St=ne}switch(st=St.x-Wt.x,At=St.y-Wt.y,Qe){case 8:He>Math.abs(st)?(Tt=Math.abs(st)/He,He=Math.abs(st)):Tt=1;break;case 2:Ye>Math.abs(At)?(Tt=Math.abs(At)/Ye,Ye=Math.abs(At)):Tt=1;break;case 1:Ne>Math.abs(st)?(Tt=Math.abs(st)/Ne,Ne=Math.abs(st)):Tt=1;break;default:case 4:Ee>Math.abs(At)?(Tt=Math.abs(At)/Ee,Ee=Math.abs(At)):Tt=1}St=0}var tn=It.Zo;if(b===Wv){switch(It=It.link.computeThickness(),It*=Tt,tn.set(Wt),Qe){case 8:tn.x=Wt.x+st/2+He/2-St-It/2;break;case 2:tn.y=Wt.y+At/2+Ye/2-St-It/2;break;case 1:tn.x=Wt.x+st/2-Ne/2+St+It/2;break;default:case 4:tn.y=Wt.y+At/2-Ee/2+St+It/2}St+=It}else{var Kn=.5;b===Km&&(Kn=(It.Uo+1)/(It.Gl+1)),tn.x=Wt.x+st*Kn,tn.y=Wt.y+At*Kn}}}for(ft.free(se),ft.free(he),ft.free(ne),ft.free(_e),Wt=a.pe,te=0;te<Wt.length;te++)b=Wt[te],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,sn.free(E)}x=a.pe}for(a=0;a<x.length;a++)if(E=x[a],E!==null&&E.link===y)return E;return null}$d.prototype.j=function(a,y){return a===y?0:a===null?-1:y===null?1:a.Nc<y.Nc?-1:a.Nc>y.Nc?1:a.angle<y.angle?-1:a.angle>y.angle?1:0},$d.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,qi,y.fromPort===this.port),b=a.Uo;if(0>b)return x;var E=a.Gl;if(1>=E||!y.isOrthogonal)return x;y=a.hv;var te=a.Zo;return(a.Nc===2||a.Nc===8)&&(b=E-1-b),((a=a.Nc===2||a.Nc===4)?y.y<te.y:y.x<te.x)?x+8*b:(a?y.y===te.y:y.x===te.x)?x:x+8*(E-1-b)},$d.className="Knot";function ty(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new ft,this.Gl=this.Uo=0,this.Zo=new ft,this.Ju=0}ty.prototype.toString=function(){return this.link.toString()+" "+this.angle.toString()+" "+this.Nc.toString()+":"+this.Uo.toString()+"/"+this.Gl.toString()+" "+this.Zo.toString()+" "+this.Ju.toString()+" "+this.hv.toString()},ty.className="LinkInfo";function Zo(a){Di(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new ft(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}Zo.prototype.cloneProtected=function(a){a.sn=this.sn,a.Gh=this.Gh,a.yn=this.yn,a.Am.assign(this.Am),a.vn=this.vn,a.un=this.un,a.Em=this.Em,a.xn=!0},Zo.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Zo.prototype.qb=function(){},Zo.prototype.toString=function(){var a=Mn(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},Zo.prototype.C=function(){if(this.isValidLayout){var a=this.diagram;if(a!==null&&!a.undoManager.isUndoingRedoing){var y=a.animationManager;!y.isTicking&&(y.defaultAnimation.isAnimating&&y.Cc(),this.isOngoing&&a.pi||this.isInitial&&!a.pi)&&(this.isValidLayout=!1,a.$b())}}},Zo.prototype.createNetwork=function(){return new Mo(this)},Zo.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof rn?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Ki?y.lg(a.memberParts):y.lg(a.iterator),y},Zo.prototype.updateParts=function(){this.isValidLayout=!0;var a=this.diagram;if(a===null&&this.network!==null)for(var y=this.network.vertexes.iterator;y.next();){var x=y.value.node;if(x!==null&&(a=x.diagram,a!==null))break}try{a!==null&&a.Ea("Layout"),this.commitLayout()}finally{a!==null&&a.eb("Layout")}},Zo.prototype.commitLayout=function(){if(this.network!==null){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();if(this.isRouting)for(a=this.network.edges.iterator;a.next();)a.value.commit()}},Zo.prototype.doLayout=function(a){var y=new kn;a instanceof rn?(Ic(this,y,a.nodes,!0,this.rh,!0,!1,!0),Ic(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof Ki?Ic(this,y,a.memberParts,!1,this.rh,!0,!1,!0):y.addAll(a.iterator),0<y.count&&(a=this.diagram,a!==null&&a.Ea("Layout"),this.doMinimalNoNetworkLayout(y),a!==null&&a.eb("Layout")),this.isValidLayout=!0},Zo.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,b=x,E=this.arrangementOrigin.y,te=0,ne=0;for(a=a.iterator;a.next();){var se=a.value;yg(se);var he=se.measuredBounds,_e=he.width;he=he.height,se.moveTo(b,E),se instanceof Ki&&(se.rh=!1),b+=Math.max(_e,50)+20,ne=Math.max(ne,Math.max(he,50)),te>=y-1?(te=0,b=x,E+=ne+20,ne=0):te++}},Zo.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,b=this.arrangementOrigin.y,E=0,te=0,ne=this.network.vertexes.iterator;ne.next();){var se=ne.value.node;if(!(se===null||se instanceof Bn)&&(yg(se),this.rh(se))){var he=se.measuredBounds,_e=he.width;he=he.height,se.moveTo(x,b),se instanceof Ki&&(se.rh=!1),x+=Math.max(_e,50)+20,te=Math.max(te,Math.max(he,50)),E>=a-1?(E=0,x=y,b+=te+20,te=0):E++}}},Zo.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Ki&&a.rh)};function Ic(a,y,x,b,E,te,ne,se){for(x=x.iterator;x.next();){var he=x.value;b&&!he.isTopLevel||E!==null&&!E(he)||!he.canLayout()||(te&&he instanceof qn?he.isLinkLabel||(he instanceof Ki&&he.layout===null?Ic(a,y,he.memberParts,!1,E,te,ne,se):(yg(he),y.add(he))):ne&&he instanceof Bn?y.add(he):!se||!he.Zc()||he instanceof qn||(yg(he),y.add(he)))}}function yg(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}Zo.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new sn),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},Zo.prototype.ex=function(a){var y=new kn;return a instanceof rn?(Ic(this,y,a.nodes,!0,null,!0,!0,!0),Ic(this,y,a.links,!0,null,!0,!0,!0),Ic(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof Ki?Ic(this,y,a.memberParts,!1,null,!0,!0,!0):Ic(this,y,a.iterator,!1,null,!0,!0,!0),y},Zo.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(xr),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},ot.Object.defineProperties(Zo.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())}}}),Zo.prototype.collectParts=Zo.prototype.ex,Zo.prototype.getLayoutBounds=Zo.prototype.ni,Zo.prototype.invalidateLayout=Zo.prototype.C,Zo.className="Layout";function Mo(a){Di(this),this.Sc=a,this.wf=new kn,this.ye=new kn,this.Es=new on,this.zs=new on}Mo.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 kn,this.ye=new kn,this.Es=new on,this.zs=new on},Mo.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,1<a){for(var x=this.wf.iterator;x.next();)y+=`
|
|
|
`+x.value.toString(a-1);for(x=this.ye.iterator;x.next();)y+=`
|
|
|
`+x.value.toString(a-1)}return y},Mo.prototype.createVertex=function(){return new Ts(this)},Mo.prototype.createEdge=function(){return new yl(this)},Mo.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(ne){if(ne instanceof qn)return!ne.isLinkLabel;if(ne instanceof Bn){var se=ne.fromNode;return se===null||se.isLinkLabel?!1:(ne=ne.toNode,!(ne===null||ne.isLinkLabel))}return!1}),a=a.iterator;a.next();){var b=a.value;if(b instanceof qn&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof Ki&&b.layout===null)this.lg(b.memberParts,!1);else if(this.ki(b)===null){var E=this.createVertex();E.node=b,this.dh(E)}}}for(a.reset();a.next();)if(b=a.value,b instanceof Bn&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)&&this.Lo(b)===null){var te=b.fromNode;E=b.toNode,te!==null&&E!==null&&te!==E&&(te=this.findGroupVertex(te),E=this.findGroupVertex(E),te!==null&&E!==null&&this.Zj(te,E,b))}}},Mo.prototype.findGroupVertex=function(a){if(a===null)return null;var y=a.findVisibleNode();if(y===null)return null;if(a=this.ki(y),a!==null)return a;for(y=y.containingGroup;y!==null;){if(a=this.ki(y),a!==null)return a;y=y.containingGroup}return null},$e=Mo.prototype,$e.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},$e.Bl=function(a){if(a===null)return null;var y=this.ki(a);return y===null&&(y=this.createVertex(),y.node=a,this.dh(y)),y},$e.Iu=function(a){if(a!==null&&uS(this,a)){for(var y=a.tg,x=y.count-1;0<=x;x--){var b=y.M(x);this.Mj(b)}for(y=a.mg,a=y.count-1;0<=a;a--)x=y.M(a),this.Mj(x)}};function uS(a,y){if(y===null)return!1;var x=a.wf.remove(y);return x&&(y=y.node,y!==null&&a.Es.remove(y)),x}$e.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},$e.ki=function(a){return a===null?null:this.Es.I(a)},$e.Bo=function(a){if(a!==null){ny(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function ny(a,y){if(y!==null){a.ye.add(y);var x=y.link;x!==null&&a.Lo(x)===null&&a.zs.add(x,y),y.network=a}}$e.Dy=function(a){if(a===null)return null;var y=a.fromNode,x=a.toNode,b=this.Lo(a);return b===null?(b=this.createEdge(),b.link=a,y!==null&&(b.fromVertex=this.Bl(y)),x!==null&&(b.toVertex=this.Bl(x)),this.Bo(b)):(y!==null?b.fromVertex=this.Bl(y):b.fromVertex=null,x!==null?b.toVertex=this.Bl(x):b.toVertex=null),b},$e.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),iy(this,a)}};function iy(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}$e.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},$e.Lo=function(a){return a===null?null:this.zs.I(a)},$e.Zj=function(a,y,x){if(a===null||y===null)return null;if(a.network===this&&y.network===this){var b=this.createEdge();return b.link=x,b.fromVertex=a,b.toVertex=y,this.Bo(b),b}return null},$e.gm=function(a){if(a!==null){var y=a.fromVertex,x=a.toVertex;y!==null&&x!==null&&(y.Jl(a),x.Kl(a),a.gm(),y.Cl(a),x.zl(a))}},$e.Ko=function(){for(var a=Wn(),y=this.ye.iterator;y.next();){var x=y.value;x.fromVertex===x.toVertex&&a.push(x)}for(y=a.length,x=0;x<y;x++)this.Mj(a[x]);zn(a)},Mo.prototype.deleteArtificialVertexes=function(){for(var a=Wn(),y=this.wf.iterator;y.next();){var x=y.value;x.node===null&&x.data===null&&a.push(x)}for(x=a.length,y=0;y<x;y++)this.Iu(a[y]);for(y=Wn(),x=this.ye.iterator;x.next();){var b=x.value;b.link===null&&b.data===null&&y.push(b)}for(x=y.length,b=0;b<x;b++)this.Mj(y[b]);zn(a),zn(y)};function Ax(a){for(var y=Wn(),x=a.ye.iterator;x.next();){var b=x.value;b.fromVertex!==null&&b.toVertex!==null||y.push(b)}for(x=y.length,b=0;b<x;b++)a.Mj(y[b]);zn(y)}Mo.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Ax(this),this.Ko()),a=new Ln;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var b=x.value;if(0<b.tg.count||0<b.mg.count){y=this.layout.createNetwork(),a.add(y),ry(this,y,b),y=!0;break}}}return a.sort(function(E,te){return E===null||te===null||E===te?0:te.vertexes.count-E.vertexes.count}),a};function ry(a,y,x){if(x!==null&&x.network!==y){uS(a,x),y.dh(x);for(var b=x.sourceEdges;b.next();){var E=b.value;E.network!==y&&(iy(a,E),ny(y,E),ry(a,y,E.fromVertex))}for(b=x.destinationEdges;b.next();)x=b.value,x.network!==y&&(iy(a,x),ny(y,x),ry(a,y,x.toVertex))}}Mo.prototype.dz=function(){for(var a=new kn,y=this.wf.iterator;y.next();)a.add(y.value.node);for(y=this.ye.iterator;y.next();)a.add(y.value.link);return a},ot.Object.defineProperties(Mo.prototype,{layout:{get:function(){return this.Sc},set:function(a){a!==null&&(this.Sc=a)}},vertexes:{get:function(){return this.wf}},edges:{get:function(){return this.ye}}}),Mo.prototype.findAllParts=Mo.prototype.dz,Mo.prototype.splitIntoSubNetworks=Mo.prototype.Zx,Mo.prototype.deleteSelfEdges=Mo.prototype.Ko,Mo.prototype.reverseEdge=Mo.prototype.gm,Mo.prototype.linkVertexes=Mo.prototype.Zj,Mo.prototype.findEdge=Mo.prototype.Lo,Mo.prototype.deleteLink=Mo.prototype.Yy,Mo.prototype.deleteEdge=Mo.prototype.Mj,Mo.prototype.addLink=Mo.prototype.Dy,Mo.prototype.addEdge=Mo.prototype.Bo,Mo.prototype.findVertex=Mo.prototype.ki,Mo.prototype.deleteNode=Mo.prototype.Zy,Mo.prototype.deleteVertex=Mo.prototype.Iu,Mo.prototype.addNode=Mo.prototype.Bl,Mo.prototype.addVertex=Mo.prototype.dh,Mo.prototype.addParts=Mo.prototype.lg,Mo.className="LayoutNetwork";function Ts(a){Di(this),this.ob=a,this.j=new sn(0,0,10,10).freeze(),this.o=new ft(5,5).freeze(),this.Sh=this.ub=null,this.tg=new Ln,this.mg=new Ln}Ts.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new Ln,this.mg=new Ln},Ts.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+sr(this);if(0<a&&(y+=this.node!==null?"("+this.node.toString()+")":"",1<a)){a="";for(var x=!0,b=this.tg.iterator;b.next();){var E=b.value;x?x=!1:a+=",",a+=E.toString(0)}for(E="",x=!0,b=this.mg.iterator;b.next();){var te=b.value;x?x=!1:E+=",",E+=te.toString(0)}y+=" sources: "+a+" destinations: "+E}return y},Ts.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;Kt(x)?(x.x=y.x,x.y=y.y,x.width=y.width,x.height=y.height):a.bounds=y.copy()}else if(a=this.node,a!==null){if(y=this.bounds,!(a instanceof Ki)){x=sn.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga($i);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),sn.free(x);return}sn.free(x)}a.moveTo(y.x,y.y)}},Ts.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},Ts.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},Ts.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},Ts.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function oy(a,y){return a=a.Sh,y=y.Sh,a?y?(a=a.text,y=y.text,a<y?-1:a>y?1:0):1:y!==null?-1:0}ot.Object.defineProperties(Ts.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,b=y.width;y=y.height,this.o.h(b/2,y/2),this.j.h(a,x,b,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=sn.alloc(),b=y.ni(a,x);y=b.x;var E=b.y,te=b.width;if(b=b.height,isNaN(y)&&(y=0),isNaN(E)&&(E=0),this.j.h(y,E,te,b),sn.free(x),!(a instanceof Ki)&&(a=a.locationObject.ga($i),a.w())){this.o.h(a.x-y,a.y-E);return}this.o.h(te/2,b/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 kn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new kn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new kn,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 Ln,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}}}),Ts.prototype.deleteDestinationEdge=Ts.prototype.Jl,Ts.prototype.addDestinationEdge=Ts.prototype.zl,Ts.prototype.deleteSourceEdge=Ts.prototype.Kl,Ts.prototype.addSourceEdge=Ts.prototype.Cl,Ts.className="LayoutVertex",Ts.standardComparer=oy,Ts.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<y.length;x++)if(a[x]!==""&&a[x]!==void 0){var b=parseFloat(y[x]),E=parseFloat(a[x]);if(isNaN(b))if(isNaN(E)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(E))return-1;if(b-E!==0)return b-E}}else if(y[x]!=="")return 1;return a[x]!==""&&a[x]!==void 0?-1:0}return 1}return x!==null?-1:0}return 1}return y!==null?-1:0};function yl(a){Di(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}yl.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},yl.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+sr(this);return 0<a&&(y+=this.$k!==null?"("+this.$k.toString()+")":"",1<a&&(y+=" "+(this.kd?this.kd.toString():"null")+" --> "+(this.qd?this.qd.toString():"null"))),y},yl.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},yl.prototype.commit=function(){},yl.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},ot.Object.defineProperties(yl.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)}}}),yl.prototype.getOtherVertex=yl.prototype.Ax,yl.className="LayoutEdge";function ia(a){Zo.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new wn(NaN,NaN).freeze(),this.tf=new wn(10,10).freeze(),this.Jb=Sg,this.Rb=a0,this.nd=xg,this.hd=hS,a&&Object.assign(this,a)}Je(ia,Zo),ia.prototype.cloneProtected=function(a){Zo.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},ia.prototype.qb=function(a){a.classType===ia?a===xg||a===u0||a===sy||a===l0?this.sorting=a:a===a0||a===Du?this.arrangement=a:a===Sg||a===s0?this.alignment=a:Lt("Unknown enum value: "+a):Zo.prototype.qb.call(this,a)},ia.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 b=x.value;if(!b.ph()||b.fromNode===null&&b.toNode===null){if(b.Va(),b instanceof Ki)for(b=b.memberParts;b.next();)y.remove(b.value)}else y.remove(b)}var E=y.Fa();if(E.length!==0){switch(this.sorting){case l0:E.reverse();break;case xg:E.sort(this.comparer);break;case u0:E.sort(this.comparer),E.reverse()}var te=this.wrappingColumn;isNaN(te)&&(te=0);var ne=this.wrappingWidth;switch(isNaN(ne)&&a!==null?(y=a.padding,ne=Math.max(a.viewportBounds.width-y.left-y.right,0)):ne=Math.max(this.wrappingWidth,0),0>=te&&0>=ne&&(te=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),b=[],this.alignment){case s0:var se=y,he=x,_e=sn.alloc(),Ee=Math.max(this.cellSize.width,1);if(!isFinite(Ee))for(var Ne=Ee=0;Ne<E.length;Ne++){var He=this.ni(E[Ne],_e);Ee=Math.max(Ee,He.width)}if(Ee=Math.max(Ee+se,1),Ne=Math.max(this.cellSize.height,1),!isFinite(Ne))for(He=Ne=0;He<E.length;He++){var Ye=this.ni(E[He],_e);Ne=Math.max(Ne,Ye.height)}Ne=Math.max(Ne+he,1),He=this.arrangement;for(var Qe=Ye=this.arrangementOrigin.x,st=this.arrangementOrigin.y,Pt=0,St=0,Tt=0;Tt<E.length;Tt++){var At=E[Tt],It=this.ni(At,_e),Wt=Math.ceil((It.width+se)/Ee)*Ee,tn=Math.ceil((It.height+he)/Ne)*Ne;switch(He){case Du:var Kn=Math.abs(Qe-It.width);break;default:Kn=Qe+It.width}switch((0<te&&Pt>te-1||0<ne&&0<Pt&&Kn-Ye>ne)&&(b.push(new sn(0,st,ne+se,St)),Pt=0,Qe=Ye,st+=St,St=0),St=Math.max(St,tn),He){case Du:It=-It.width;break;default:It=0}switch(At.moveTo(Qe+It,st),He){case Du:Qe-=Wt;break;default:Qe+=Wt}Pt++}b.push(new sn(0,st,ne+se,St)),sn.free(_e);break;case Sg:for(he=ne,Ee=te,Ne=y,He=x,ne=sn.alloc(),Ye=Math.max(this.cellSize.width,1),te=st=_e=0,se=ft.alloc(),Qe=0;Qe<E.length;Qe++)St=E[Qe],Pt=this.ni(St,ne),St=ec(St,St.locationObject,St.locationSpot,se),_e=Math.max(_e,St.x),st=Math.max(st,Pt.width-St.x),te=Math.max(te,St.y);switch(Qe=this.arrangement,Qe){case Du:_e+=Ne;break;default:st+=Ne}Ye=isFinite(Ye)?Math.max(Ye+Ne,1):Math.max(_e+st,1);var hi=St=this.arrangementOrigin.x;for(Tt=this.arrangementOrigin.y,st=0,he>=_e&&(he-=_e),_e=At=0,Wt=Math.max(this.cellSize.height,1),It=te=0,tn=!0,Pt=ft.alloc(),Kn=0;Kn<E.length;Kn++){var ii=E[Kn],Rn=this.ni(ii,ne),_n=ec(ii,ii.locationObject,ii.locationSpot,se);if(0<st)switch(Qe){case Du:hi=(hi-St-(Rn.width-_n.x))/Ye,hi=Vt.$(Math.round(hi),hi)?Math.round(hi):Math.floor(hi),hi=hi*Ye+St;break;default:hi=(hi-St+_n.x)/Ye,hi=Vt.$(Math.round(hi),hi)?Math.round(hi):Math.ceil(hi),hi=hi*Ye+St}else switch(Qe){case Du:At=hi+_n.x+Rn.width;break;default:At=hi-_n.x}switch(Qe){case Du:var Zi=-(hi+_n.x)+At;break;default:Zi=hi+Rn.width-_n.x-At}if(0<Ee&&st>Ee-1||0<he&&0<st&&Zi>he){for(b.push(new sn(0,tn?Tt-te:Tt,he+Ne,It+te+He)),hi=0;hi<st&&Kn!==st;hi++){Zi=E[Kn-st+hi];var Ri=ec(Zi,Zi.locationObject,Zi.locationSpot,Pt);Zi.moveTo(Zi.position.x,Zi.position.y+te-Ri.y)}It+=He,Tt=tn?Tt+It:Tt+(It+te),st=It=te=0,hi=St,tn=!1}switch(hi===St&&(_e=Qe===Du?Math.max(_e,Rn.width-_n.x):Math.min(_e,-_n.x)),te=Math.max(te,_n.y),It=Math.max(It,Rn.height-_n.y),isFinite(Wt)&&(It=Math.max(It,Math.max(Rn.height,Wt)-_n.y)),tn?ii.moveTo(hi-_n.x,Tt-_n.y):ii.moveTo(hi-_n.x,Tt),Qe){case Du:hi-=_n.x+Ne;break;default:hi+=Rn.width-_n.x+Ne}st++}if(b.push(new sn(0,Tt,he+Ne,(tn?It:It+te)+He)),E.length!==st)for(he=0;he<st;he++)Ee=E[E.length-st+he],Ne=ec(Ee,Ee.locationObject,Ee.locationSpot,se),Ee.moveTo(Ee.position.x,Ee.position.y+te-Ne.y);if(ft.free(se),ft.free(Pt),Qe===Du)for(E=0;E<b.length;E++)te=b[E],te.width+=_e,te.x-=_e;else for(E=0;E<b.length;E++)te=b[E],te.x>_e&&(te.width+=te.x-_e,te.x=_e);sn.free(ne)}for(se=te=ne=E=0;se<b.length;se++)he=b[se],E=Math.min(E,he.x),ne=Math.min(ne,he.y),te=Math.max(te,he.x+he.width);this.arrangement===Du?this.commitLayers(b,new ft(E+y/2-(te+E),ne-x/2)):this.commitLayers(b,new ft(E-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},ia.prototype.commitLayers=function(){};function hS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}ot.Object.defineProperties(ia.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0<a||isNaN(a))&&(this.zo=a,this.isViewportSized=isNaN(a),this.C())}},wrappingColumn:{get:function(){return this.yo},set:function(a){this.yo!==a&&(0<a||isNaN(a))&&(this.yo=a,this.C())}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||(this.yg.assign(a),this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf.D(a)||(this.tf.assign(a),this.C())}},alignment:{get:function(){return this.Jb},set:function(a){this.Jb===a||a!==Sg&&a!==s0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==a0&&a!==Du||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==sy&&a!==l0&&a!==xg&&a!==u0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var s0=new nn(ia,"Position",0),Sg=new nn(ia,"Location",1),a0=new nn(ia,"LeftToRight",2),Du=new nn(ia,"RightToLeft",3),sy=new nn(ia,"Forward",4),l0=new nn(ia,"Reverse",5),xg=new nn(ia,"Ascending",6),u0=new nn(ia,"Descending",7);ia.className="GridLayout",ia.standardComparer=hS,ia.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),y=y.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(var x=0;x<a.length;x++)if(y[x]!==""&&y[x]!==void 0){var b=parseFloat(a[x]),E=parseFloat(y[x]);if(isNaN(b))if(isNaN(E)){if(a[x].localeCompare(y[x])!==0)return a[x].localeCompare(y[x])}else return 1;else{if(isNaN(E))return-1;if(b-E!==0)return b-E}}else if(a[x]!=="")return 1;return y[x]!==""&&y[x]!==void 0?-1:0}return 1}return y!==null?-1:0},ia.Position=s0,ia.Location=Sg,ia.LeftToRight=a0,ia.RightToLeft=Du,ia.Forward=sy,ia.Reverse=l0,ia.Ascending=xg,ia.Descending=u0;function io(){this.On=new kn,this.Dn=new kn,this.Pa=new kn,this.cf=new on,this.bf=new on,this.aj=new on,this.H=null,this.tp=!1}$e=io.prototype,$e.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},$e.Xe=function(a){this.H=a},$e.oi=function(a){if(a instanceof qn){if(this.On.add(a),a instanceof Ki){var y=a.containingGroup;y===null?this.H.ai.add(a):y.gl.add(a),y=a.layout,y!==null&&(y.diagram=this.H)}}else a instanceof Bn?this.Dn.add(a):a instanceof Fr||this.Pa.add(a);y=a.data,y===null||a instanceof Fr||(a instanceof Bn?this.bf.add(y,a):this.cf.add(y,a))},$e.pc=function(a){if(a.Ej(),a instanceof qn){if(this.On.remove(a),a instanceof Ki){var y=a.containingGroup;y===null?this.H.ai.remove(a):y.gl.remove(a),y=a.layout,y!==null&&(y.diagram=null)}}else a instanceof Bn?this.Dn.remove(a):a instanceof Fr||this.Pa.remove(a);y=a.data,y===null||a instanceof Fr||(a instanceof Bn?this.bf.remove(y):this.cf.remove(y))},$e.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,b=y.key;(!x.Zc()||x instanceof Ki)&&Lt('Invalid node template in Diagram.nodeTemplateMap: template for "'+b+'" must be a Node or a simple Part, not a Group or Link: '+x)}for(y=a.groupTemplateMap.iterator;y.next();)x=y.value,b=y.key,x instanceof Ki||Lt('Invalid group template in Diagram.groupTemplateMap: template for "'+b+'" must be a Group, not a normal Node or Link: '+x);for(y=a.linkTemplateMap.iterator;y.next();)x=y.value,b=y.key,x instanceof Bn||Lt('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Wn(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=Wn(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=Wn(),b=this.nodes.iterator;b.next();){var E=b.value;E.data!==null&&(a.push(E.data),a.push(E.location))}for(b=this.links.iterator;b.next();)E=b.value,E.data!==null&&(a.push(E.data),a.push(E.location));for(b=this.parts.iterator;b.next();)E=b.value,E.data!==null&&(a.push(E.data),a.push(E.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),b=0;b<y.length;b++)E=this.Lc(y[b]),E!==null&&(E.isSelected=!0);for(b=0;b<x.length;b++)E=this.Lc(x[b]),E!==null&&(E.isHighlighted=!0);for(b=0;b<a.length;b+=2)E=this.Lc(a[b]),E!==null&&(E.location=a[b+1]);zn(y),zn(x),zn(a)}},io.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},io.prototype.addModeledParts=function(a,y){var x=this,b=this.diagram.model;a.forEach(function(E){b.lb(E)&&cS(x,E,!1)}),a.forEach(function(E){b.lb(E)&&x.resolveReferencesForData(E)}),y!==!1&&Pf(this.diagram,!1)};function cS(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);e:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var b=a.Ro(y),E=dS(a,y,b);if(E!==null&&(nu(E),E=E.copy(),E!==null)){var te=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,E.Tf=b,E.ub=y,a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=te,b=E;break e}}b=null}b!==null&&x&&a.resolveReferencesForData(y)}}io.prototype.insertLink=function(){return null},io.prototype.resolveReferencesForData=function(){},io.prototype.Ro=function(a){return this.H.model.Ro(a)};function dS(a,y,x){a=a.H;var b=a.model;return b.Xj()&&b.Yu(y)?(y=a.groupTemplateMap.I(x),y===null&&(y=a.groupTemplateMap.I(""),y===null&&(gS||(gS=!0,Sn('No Group template found for category "'+x+'"'),Sn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,Sn('No Node template found for category "'+x+'"'),Sn(" Using default node template")),y=a.ny))),y}io.prototype.getLinkCategoryForData=function(){return""},io.prototype.setLinkCategoryForData=function(){},io.prototype.setFromNodeForLink=function(){},io.prototype.setToNodeForLink=function(){},io.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(mS||(mS=!0,Sn('No Link template found for category "'+a+'"'),Sn(" Using default link template")),x=y.my)),x},io.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},io.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},io.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Op(this.diagram,a,!1),this.unresolveReferencesForPart(a))},io.prototype.unresolveReferencesForPart=function(){},io.prototype.removeDataForLink=function(){},io.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},io.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof qn?a:null)},io.prototype.findLinkForKey=function(){return null},$e=io.prototype,$e.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},$e.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof qn?a:null)},$e.Kc=function(a){return a===null?null:this.bf.I(a)},$e.ms=function(a){for(var y=0;y<arguments.length;++y);y=new kn;for(var x=this.On.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var te=0;te<arguments.length;te++){var ne=arguments[te];if(Kt(ne)&&ay(this,E,ne)){y.add(b);break}}}return y.iterator},$e.ls=function(a){for(var y=0;y<arguments.length;++y);y=new kn;for(var x=this.Dn.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var te=0;te<arguments.length;te++){var ne=arguments[te];if(Kt(ne)&&ay(this,E,ne)){y.add(b);break}}}return y.iterator};function ay(a,y,x){for(var b in x){var E=y[b],te=x[b];if(vn(te)){if(!vn(E)||E.length<te.length)return!1;for(var ne=0;ne<E.length;ne++){var se=te[ne];if(se!==void 0&&!fS(a,E[ne],se))return!1}}else if(!fS(a,E,te))return!1}return!0}function fS(a,y,x){if(typeof x=="function"){if(!x(y))return!1}else if(x instanceof RegExp){if(!y||!x.test(y.toString()))return!1}else if(Kt(y)&&Kt(x)){if(!ay(a,y,x))return!1}else if(y!==x)return!1;return!0}io.prototype.doModelChanged=function(a){if(this.H){var y=this.H;if(a.model===y.model){var x=a.change;if(y.doModelChanged(a),y.aa){y.aa=!1;try{var b=a.modelChange;if(b!=="")if(x===Ro){if(b==="nodeCategory"){var E=this.Lc(a.object),te=a.newValue;E!==null&&typeof te=="string"&&(E.category=te)}else b==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===es){var ne=a.newValue;b==="nodeDataArray"&&Kt(ne)&&cS(this,ne),y.isModified=!0}else if(x===Jo){var se=a.oldValue;b==="nodeDataArray"&&Kt(se)&&this.ip(se),y.isModified=!0}else x===ha&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===Ro){var he=a.propertyName,_e=a.object;_e===y.model?(he==="nodeKeyProperty"||he==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(_e,he),y.isModified=!0}else if(x===es||x===Jo){var Ee=a.change===es,Ne=Ee?a.newParam:a.oldParam,He=Ee?a.newValue:a.oldValue,Ye=this.aj.I(a.object);if(Array.isArray(Ye))for(a=0;a<Ye.length;a++){var Qe=Ye[a];if(Ee)Mm(Qe,He,Ne,!0);else if(!(0>Ne)){var st=Ne+tg(Qe);Qe.pc(st,!0),wv(Qe,st,Ne)}}y.isModified=!0}}finally{y.aa=!0}}}}},io.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)},io.prototype.rp=function(){for(var a=this.H.model,y=new kn,x=a.nodeDataArray,b=0;b<x.length;b++)y.add(x[b]);var E=[];for(this.nodes.each(function(ne){ne.data===null||y.contains(ne.data)||E.push(ne.data)}),this.parts.each(function(ne){ne.data===null||y.contains(ne.data)||E.push(ne.data)}),E.forEach(function(ne){CS(a,ne,!1)}),b=0;b<x.length;b++){var te=x[b];this.Lc(te)===null&&PS(a,te,!1)}for(this.refreshDataBoundLinks(),x=this.parts.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.nodes.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.links.iterator;x.next();)x.value.updateRelationshipsFromData()},io.prototype.refreshDataBoundLinks=function(){},io.prototype.updateRelationshipsFromData=function(){},io.prototype.updateDataBindings=function(a,y){if(typeof y=="string"){var x=this.Lc(a);if(x!==null)x.La(y);else{x=null;for(var b=this.aj.iterator;b.next();){for(var E=b.value,te=0;te<E.length;te++){var ne=E[te].sx(a);ne!==null&&(x===null&&(x=Wn()),x.push(ne))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);zn(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(vn(x)){var b=a.aj.I(x);if(b===null)b=[],b.push(y),a.aj.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}function uy(a,y,x){gd(y,function(ne){ne=ne.O.s;for(var se=ne.length,he=0;he<se;he++)jp(x,ne[he])});var b=y.Hh;if(vn(b)){var E=a.aj.I(b);if(E!==null){for(var te=0;te<E.length;te++)if(E[te]===y){E.splice(te,1),E.length===0&&a.aj.remove(b);break}}}}io.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new on;if(vn(a))for(var E=0;E<a.length;E++)h0(this,a[E],y,b,x);else for(a=a.iterator;a.next();)h0(this,a.value,y,b,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,E=new kn;for(var te=new on,ne=b.iterator;ne.next();){var se=ne.value;if(se instanceof Bn)a||se.fromNode!==null&&se.toNode!==null||E.add(se);else if(se instanceof qn&&se.data!==null&&x.Tl()){var he=se;se=ne.key;var _e=se.pg();_e!==null&&(_e=b.I(_e),_e!==null?(x.qe(he.data,x.wa(_e.data)),he=y.Kc(he.data),se=se.kh(),se!==null&&he!==null&&te.add(se,he)):x.qe(he.data,void 0))}}if(0<E.count&&y.Is(E,!1),0<te.count)for(x=te.iterator;x.next();)b.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var Ee=new on;b.each(function(Ne){Ne.key.data!==null&&Ee.add(Ne.key.data,Ne.value.data)}),x(Ee,y,this.H.model)}for(y=b.iterator;y.next();)y.value.La();return b};function h0(a,y,x,b,E){if(y===null||E&&!y.canCopy())return null;if(b.contains(y))return b.I(y);var te=a.copyPartData(y,x);if(!(te instanceof Ci))return null;if(te.isSelected=!1,te.isHighlighted=!1,b.add(y,te),y instanceof qn){for(var ne=y.linksConnected;ne.next();){var se=ne.value;if(se.fromNode===y){var he=b.I(se);he!==null&&(he.fromNode=te)}se.toNode===y&&(se=b.I(se),se!==null&&(se.toNode=te))}if(y instanceof Ki&&te instanceof Ki)for(y=y.memberParts;y.next();)ne=h0(a,y.value,x,b,E),ne instanceof Bn||ne===null||(ne.containingGroup=te)}else if(y instanceof Bn&&te instanceof Bn)for(ne=y.fromNode,ne!==null&&(ne=b.I(ne),ne!==null&&(te.fromNode=ne)),ne=y.toNode,ne!==null&&(ne=b.I(ne),ne!==null&&(te.toNode=ne)),y=y.labelNodes;y.next();)ne=h0(a,y.value,x,b,E),ne!==null&&ne instanceof qn&&(ne.labeledLink=te);return te}io.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof Bn||(b=E.copyNodeData(b),Kt(b)&&(E.xf(b),x=y.Lc(b)))}else nu(a),x=a.copy(),x!==null&&(E=this.H,y!==null?y.add(x):b!==null&&E!==null&&E.commandHandler!==null&&E.commandHandler.copiesClipboardData&&(y=E.model,E=null,x instanceof Bn||(E=y.copyNodeData(b)),Kt(E)&&(x.data=E)));return x},ot.Object.defineProperties(io.prototype,{nodes:{get:function(){return this.On}},links:{get:function(){return this.Dn}},parts:{get:function(){return this.Pa}},diagram:{get:function(){return this.H}},addsToTemporaryLayer:{get:function(){return this.tp},set:function(a){this.tp=a}}}),io.prototype.updateAllRelationshipsFromData=io.prototype.rp,io.prototype.findLinksByExample=io.prototype.ls,io.prototype.findNodesByExample=io.prototype.ms,io.prototype.findLinkForData=io.prototype.Kc,io.prototype.findNodeForData=io.prototype.ii,io.prototype.findPartForData=io.prototype.Lc,io.prototype.findNodeForKey=io.prototype.Vb,io.prototype.removeModeledPart=io.prototype.ip,io.prototype.removeModeledParts=io.prototype.Gs,io.prototype.rebuildParts=io.prototype.Wd;var pS=!1,gS=!1,mS=!1;io.className="PartManager";function Ws(a){io.apply(this,arguments)}Je(Ws,io),Ws.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},Ws.prototype.addModeledParts=function(a){for(io.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Zf(a.value);Pf(this.diagram,!1)};function vS(a,y){y.forEach(function(x){yS(a,x)}),Pf(a.diagram,!1)}function yS(a,y){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.bf.contains(y)){var x=a.getLinkCategoryForData(y),b=a.findLinkTemplateForCategory(x);if(b!==null){nu(b);var E=b.copy();if(E!==null){b=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,E.Tf=x,E.ub=y,x=a.diagram.model;var te=p0(x,y,!0);te!==""&&(E.fromPortId=te),te=Nl(x,y,!0),te!==void 0&&(te=a.Vb(te),te instanceof qn&&(E.fromNode=te)),te=p0(x,y,!1),te!==""&&(E.toPortId=te),te=Nl(x,y,!1),te!==void 0&&(te=a.Vb(te),te instanceof qn&&(E.toNode=te)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(ne){ne=a.Vb(ne),ne!==null&&(ne.labeledLink=E)}),a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=b}}}}Ws.prototype.removeAllModeledParts=function(){var a=this.diagram.model;SS(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function SS(a,y){y.forEach(function(x){a.ip(x)})}Ws.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},Ws.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},Ws.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},Ws.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},Ws.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},Ws.prototype.findPartForKey=function(a){var y=io.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},Ws.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},Ws.prototype.doModelChanged=function(a){var y=this;if(io.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var b=a.change;if(x.aa){x.aa=!1;try{var E=a.modelChange;if(E!==""){if(b===Ro){if(E==="linkFromKey"){var te=this.Kc(a.object);if(te!==null){var ne=this.Vb(a.newValue);te.fromNode=ne}}else if(E==="linkToKey"){var se=this.Kc(a.object);if(se!==null){var he=this.Vb(a.newValue);se.toNode=he}}else if(E==="linkFromPortId"){var _e=this.Kc(a.object);if(_e!==null){var Ee=a.newValue;typeof Ee=="string"&&(_e.fromPortId=Ee)}}else if(E==="linkToPortId"){var Ne=this.Kc(a.object);if(Ne!==null){var He=a.newValue;typeof He=="string"&&(Ne.toPortId=He)}}else if(E==="nodeGroupKey"){var Ye=this.Lc(a.object);if(Ye!==null){var Qe=a.newValue;if(Qe!==void 0){var st=this.Vb(Qe);st instanceof Ki?Ye.containingGroup=st:Ye.containingGroup=null}else Ye.containingGroup=null}}else if(E==="linkLabelKeys"){var Pt=this.Kc(a.object);if(Pt!==null){var St=a.oldValue,Tt=a.newValue;Array.isArray(St)&&St.forEach(function(_n){0<=Tt.indexOf(_n)||(_n=y.Vb(_n),_n!==null&&(_n.labeledLink=null))}),Array.isArray(Tt)&&Tt.forEach(function(_n){_n=y.Vb(_n),_n!==null&&(_n.labeledLink=Pt)})}}else if(E==="linkCategory"){var At=this.Kc(a.object),It=a.newValue;At!==null&&typeof It=="string"&&(At.category=It)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===es){var Wt=a.newValue;if(E==="linkDataArray"&&typeof Wt=="object"&&Wt!==null)yS(this,Wt);else if(E==="linkLabelKeys"&&Fc(Wt)){var tn=this.Kc(a.object),Kn=this.Vb(Wt);tn!==null&&Kn!==null&&(Kn.labeledLink=tn)}x.isModified=!0}else if(b===Jo){var hi=a.oldValue;if(E==="linkDataArray"&&typeof hi=="object"&&hi!==null)this.ip(hi);else if(E==="linkLabelKeys"&&Fc(hi)){var ii=this.Vb(hi);ii!==null&&(ii.labeledLink=null)}x.isModified=!0}}else if(b===Ro){var Rn=a.propertyName;a.object!==x.model||Rn!=="linkFromKeyProperty"&&Rn!=="linkToKeyProperty"&&Rn!=="linkFromPortIdProperty"&&Rn!=="linkToPortIdProperty"&&Rn!=="linkLabelKeysProperty"&&Rn!=="nodeIsGroupProperty"&&Rn!=="nodeGroupKeyProperty"&&Rn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},Ws.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new kn,b=y.linkDataArray;b.forEach(function(te){x.add(te)});var E=[];this.links.each(function(te){te.data===null||x.contains(te.data)||E.push(te.data)}),E.forEach(function(te){AS(y,te,!1)}),b.forEach(function(te){a.Kc(te)===null&&TS(y,te,!1)})},Ws.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;if(a instanceof Bn){var E=Nl(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=Nl(b,y,!1),E=x.Vb(E),a.toNode=E,y=b.Ef(y),0<y.length||0<a.labelNodes.count){if(y.length===1&&a.labelNodes.count===1){E=y[0];var te=a.labelNodes.first();if(b.wa(te.data)===E)return}E=new kn().addAll(y);var ne=new kn;a.labelNodes.each(function(se){se.data!==null&&(se=b.wa(se.data),se!==void 0&&ne.add(se))}),y=ne.copy(),y.hp(E),E=E.copy(),E.hp(ne),(0<y.count||0<E.count)&&(y.each(function(se){se=x.Vb(se),se!==null&&se.labeledLink===a&&(se.labeledLink=null)}),E.each(function(se){se=x.Vb(se),se!==null&&se.labeledLink!==a&&(se.labeledLink=a)}))}}else!(a instanceof Fr)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof Ki)&&(a.containingGroup=y)}}},Ws.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=wg(y,x),E=this.Lc(a);if(b!==null&&E!==null){b=b.iterator;for(var te={};b.next();){var ne=b.value;y.lb(ne)?E instanceof Ki&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=E)):(te.link=this.Kc(ne),te.link!==null&&E instanceof qn&&(Nl(y,ne,!0)===x&&(te.link.fromNode=E),Nl(y,ne,!1)===x&&(te.link.toNode=E),ne=y.Ef(ne),Array.isArray(ne)&&ne.some(function(se){return function(he){return he===x?(E.labeledLink=se.link,!0):!1}}(te)))),te={link:te.link}}Iu(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof Ki&&(E.containingGroup=a))}},Ws.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof qn){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)Ou(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&Ou(y,x,b.data)),a instanceof Ki)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&Ou(y,x,b)}}},Ws.prototype.copyPartData=function(a,y){var x=io.prototype.copyPartData.call(this,a,y);if(a instanceof Bn)if(a=a.data,a!==null&&y!==null){var b=y.model;a=b.Jo(a),typeof a=="object"&&a!==null&&(b.fi(a),x=y.Kc(a))}else x!==null&&(y=this.diagram,a!==null&&y!==null&&y.commandHandler!==null&&y.commandHandler.copiesClipboardData&&(y=y.model.Jo(a),typeof y=="object"&&y!==null&&(x.data=y)));return x},Ws.prototype.insertLink=function(a,y,x,b){var E=this.diagram,te=E.model,ne=E.toolManager.findTool("Linking"),se="";if(a!==null&&(y===null&&(y=a),se=y.portId,se===null&&(se="")),y="",x!==null&&(b===null&&(b=x),y=b.portId,y===null&&(y="")),b=ne.archetypeLinkData,b instanceof Bn){if(nu(b),te=b.copy(),te!==null)return te.fromNode=a,te.fromPortId=se,te.toNode=x,te.toPortId=y,E.add(te),a=ne.archetypeLabelNodeData,a instanceof qn&&(nu(a),a=a.copy(),a!==null&&(a.labeledLink=te,E.add(a))),te}else if(b!==null&&(b=te.Jo(b),typeof b=="object"&&b!==null))return a!==null&&qf(te,b,te.wa(a.data),!0),Qf(te,b,se,!0),x!==null&&qf(te,b,te.wa(x.data),!1),Qf(te,b,y,!1),te.fi(b),a=ne.archetypeLabelNodeData,a===null||a instanceof qn||(a=te.copyNodeData(a),typeof a=="object"&&a!==null&&(te.xf(a),a=te.wa(a),a!==void 0&&te.Bu(b,a))),E.Kc(b);return null},Ws.prototype.findLinkForKey=Ws.prototype.findLinkForKey,Ws.prototype.findPartForKey=Ws.prototype.findPartForKey,Ws.prototype.removeAllModeledParts=Ws.prototype.removeAllModeledParts,Ws.prototype.addModeledParts=Ws.prototype.addModeledParts,Ws.prototype.addAllModeledParts=Ws.prototype.addAllModeledParts,Ws.className="GraphLinksPartManager";function Gl(){io.apply(this,arguments),this.Sg=null}Je(Gl,io);function c0(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var b=a.diagram.toolManager.findTool("Linking"),E=y,te=x;if(a.diagram.isTreePathToChildren||(E=x,te=y),(b===null||!_i(b,E,te,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(nu(b),b=b.copy(),b!==null))){var ne=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=y,b.ub=x.data,b.fromNode=E,b.toNode=te,a.diagram.add(b),b.ub=null,b.data=x.data,a.diagram.skipsModelSourceBindings=ne}}}Gl.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},Gl.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},Gl.prototype.setFromNodeForLink=function(a,y,x){var b=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren)b.qe(a.data,b.wa(y));else{var E=this.Sg;this.Sg=a,x!==null&&b.qe(x.data,void 0),b.qe(y,b.wa(a.toNode!==null?a.toNode.data:null)),this.Sg=E}},Gl.prototype.setToNodeForLink=function(a,y,x){var b=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren){var E=this.Sg;this.Sg=a,x!==null&&b.qe(x.data,void 0),b.qe(y,b.wa(a.fromNode!==null?a.fromNode.data:null)),this.Sg=E}else b.qe(a.data,b.wa(y))},Gl.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},Gl.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},Gl.prototype.doModelChanged=function(a){if(io.prototype.doModelChanged.call(this,a),this.diagram){var y=this.diagram;if(a.model===y.model){var x=a.change;if(y.aa){y.aa=!1;try{var b=a.modelChange;if(b!==""){if(x===Ro){if(b==="nodeParentKey"){var E=a.object,te=this.Vb(a.newValue),ne=this.ii(E);if(this.Sg!==null)te!==null&&(this.Sg.data=E,this.Sg.category=this.getLinkCategoryForData(E));else if(ne!==null){var se=ne.kh();se!==null?te===null?y.remove(se):y.isTreePathToChildren?se.fromNode=te:se.toNode=te:c0(this,te,ne)}}else if(b==="parentLinkCategory"){var he=this.ii(a.object),_e=a.newValue;if(he!==null&&typeof _e=="string"){var Ee=he.kh();Ee!==null&&(Ee.category=_e)}}y.isModified=!0}}else if(x===Ro){var Ne=a.propertyName;a.object===y.model&&Ne==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},Gl.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof qn&&(y=b.mh(y),y=x.Vb(y),b=a.pg(),y!==b&&(b=a.kh(),y!==null?b!==null?x.isTreePathToChildren?b.fromNode=y:b.toNode=y:c0(this,y,a):b!==null&&Op(x,b,!1)))}}},Gl.prototype.updateDataBindings=function(a,y){io.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},Gl.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=wg(y,x),E=this.Lc(a);if(b!==null&&E!==null){for(b=b.iterator;b.next();){var te=b.value;y.lb(te)&&E instanceof qn&&y.mh(te)===x&&c0(this,E,this.ii(te))}Iu(y,x)}a=y.mh(a),a!==void 0&&E instanceof qn&&(a=this.Vb(a),c0(this,a,E))}},Gl.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof qn){var x=y.wa(a.data),b=this.Kc(a.data);if(b!==null){b.isSelected=!1,b.isHighlighted=!1;var E=b.layer;if(E!==null){var te=E.pc(-1,b,!1);0<=te&&this.diagram.cb(Jo,"parts",E,b,null,te,null),te=b.layerChanged,te!==null&&te(b,E,null)}}for(b=this.diagram.isTreePathToChildren,a=a.linksConnected;a.next();)E=a.value,E=(b?E.toNode:E.fromNode).data,y.lb(E)&&Ou(y,x,E)}},Gl.prototype.insertLink=function(a,y,x){y=this.diagram.model;var b=a,E=x;return this.diagram.isTreePathToChildren||(b=x,E=a),b!==null&&E!==null?(y.qe(E.data,y.wa(b.data)),E.kh()):null},Gl.prototype.findLinkForKey=Gl.prototype.findLinkForKey,Gl.className="TreePartManager";function gi(a,y){this.kl=new kn,this.il=new kn,this.Wv=`,
|
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
|
"removedNodeKeys": `,this.vh=null,Di(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new on,this.Th="key",this.Bk=this.bl=null,this.Jm=this.Km=!1,this.Mm=!0,this.xm=null,this.lj="category",this.Vf=new on,this.Lt=new Ln,this.Wg=!1,this.o=null,this.undoManager=new No,a!==void 0&&(vn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}gi.prototype.cloneProtected=function(a){a.xa=this.xa,a.Sm=this.Sm,a.Gg=this.Gg,a.Th=this.Th,a.bl=this.bl,a.Bk=this.Bk,a.Km=this.Km,a.Jm=this.Jm,a.Mm=this.Mm,a.xm=this.xm,a.lj=this.lj},gi.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},gi.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},gi.prototype.toString=function(a){if(a===void 0&&(a=0),1<a)return this.np();var y=(this.name!==""?this.name:"")+" Model";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;for(var x=a.length,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+wi(E)}}return y},gi.prototype.xA=function(a){a.change!==ha&&Lt("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof cs?(wS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},gi.prototype.Qv=function(a,y){var x=this,b=!1,E=new kn,te=new kn,ne=new kn,se=this.vh;a.changes.each(function(Ne){Ne.model===x&&(Ne.modelChange==="nodeDataArray"?Ne.change===es?E.add(Ne.newValue):Ne.change===Jo&&ne.add(Ne.oldValue):x.lb(Ne.object)?te.add(Ne.object):Ne.change!==Ro||x.modelData!==Ne.object&&Ne.propertyName!=="modelData"?Ne.object!==null&&(se&&se.contains(Ne.object)?se.get(Ne.object).each(function(He){x.lb(He)&&te.add(He)}):Ne.object instanceof gi||x.ri()&&x.Jc(Ne.object)||_S(x,Ne.object).each(function(He){te.add(He)})):b=!0)});var he=this.il;he.clear(),E.each(function(Ne){he.add(x.wa(Ne)),y||te.add(Ne)});var _e=this.kl;_e.clear(),ne.each(function(Ne){_e.add(x.wa(Ne)),y&&te.add(Ne)}),a=x.cloneDeep(te.Fa());var Ee=null;return b&&(Ee===null&&(Ee={}),Ee.modelData=this.cloneDeep(this.modelData)),0<he.count&&(Ee===null&&(Ee={}),y?Ee.removedNodeKeys=he.Fa():Ee.insertedNodeKeys=he.Fa()),0<a.length&&(Ee===null&&(Ee={}),Ee.modifiedNodeData=a),0<_e.count&&(Ee===null&&(Ee={}),y?Ee.insertedNodeKeys=_e.Fa():Ee.removedNodeKeys=_e.Fa()),_e.clear(),he.clear(),Ee},gi.prototype.cloneDeep=function(a){return Jf(this,a,!0)};function Jf(a,y,x,b,E,te){function ne(Ne,He){se?(Ne.__gohashid===void 0&&te.push(Ne),b.set(Ne,He)):(Ne=so++,b.set(Ne,He),E.set(Ne,y))}if(!Kt(y))return y;te||(te=[]);var se=Object.isExtensible(y);if(b||(b=new on),se){var he=b.get(y);if(he)return he}else for(E||(E=new on),he=E.iterator;he.next();){var _e=he.key;if(he.value===y&&(_e=b.get(_e)))return _e}if(Array.isArray(y)){he=[],ne(y,he);for(var Ee=0;Ee<y.length;Ee++)he.push(Jf(a,y[Ee],!1,b,E,te))}else if(y instanceof ft||y instanceof wn||y instanceof sn||y instanceof nr||y instanceof ui)he=y.copy(),ne(y,he);else{if(y instanceof no||y instanceof In||y instanceof nn)return y;if(y instanceof Ln)he=new Ln().addAll(Jf(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof kn)he=new kn().addAll(Jf(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof on)he=new on().addAll(Jf(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof Date)he=new Date(y.getTime()),ne(y,he);else if(y instanceof RegExp)he=new RegExp(y),ne(y,he),he.lastIndex=y.lastIndex;else if(typeof y.copy=="function")he=y.copy(),ne(y,he);else for(Ee in he={},ne(y,he),y)Ee!=="__gohashid"&&(he[Ee]=Jf(a,y[Ee],!1,b,E,te))}return x&&te.forEach(function(Ne){delete Ne.__gohashid}),he}$e=gi.prototype,$e.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},$e.rm=function(){var a="";return this.name!==""&&(a+=`,
|
|
|
"name": `+this.quote(this.name)),this.dataFormat!==""&&(a+=`,
|
|
|
"dataFormat": `+this.quote(this.dataFormat)),this.isReadOnly&&(a+=`,
|
|
|
"isReadOnly": `+this.isReadOnly),this.nodeKeyProperty!=="key"&&typeof this.nodeKeyProperty=="string"&&(a+=`,
|
|
|
"nodeKeyProperty": `+this.quote(this.nodeKeyProperty)),this.copiesArrays&&(a+=`,
|
|
|
"copiesArrays": true`),this.copiesArrayObjects&&(a+=`,
|
|
|
"copiesArrayObjects": true`),this.copiesKey||(a+=`,
|
|
|
"copiesKey": false`),this.nodeCategoryProperty!=="category"&&typeof this.nodeCategoryProperty=="string"&&(a+=`,
|
|
|
"nodeCategoryProperty": `+this.quote(this.nodeCategoryProperty)),a},$e.gp=function(a){a.name&&(this.name=a.name),a.dataFormat&&(this.dataFormat=a.dataFormat),a.isReadOnly&&(this.isReadOnly=!0),a.nodeKeyProperty&&(this.nodeKeyProperty=a.nodeKeyProperty),a.copiesArrays&&(this.copiesArrays=!0),a.copiesArrayObjects&&(this.copiesArrayObjects=!0),a.copiesKey===!1&&(this.copiesKey=!1),a.nodeCategoryProperty&&(this.nodeCategoryProperty=a.nodeCategoryProperty)};function xS(a,y){y=y.modelData,Kt(y)&&(a.dm(y),a.modelData=y)}$e.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!bS(x,a[x])){y=!0;break}return a="",y&&(a=`,
|
|
|
"modelData": `+hy(this,this.modelData)),a+`,
|
|
|
"nodeDataArray": `+Rc(this,this.nodeDataArray,!0)},$e.kv=function(a){xS(this,a),a=a.nodeDataArray,vn(a)&&(this.dm(a),this.nodeDataArray=a)};function wS(a,y){function x(E,te){if((te=te.part)&&(te=te.data,E!==te)){var ne=b.get(E);ne===null?(ne=new kn,ne.add(te),b.add(E,ne)):ne.add(te)}}var b=a.vh;b===null&&(b=new on,y.changes.each(function(E){if(E.diagram!==null){var te=E.change;te===Ro?(E=E.object.panel)&&(te=E.data)&&x(te,E):(te===es||te===Jo)&&(E=E.object,(te=E.itemArray)&&x(te,E))}}),a.vh=b)}function _S(a,y){for(var x=new kn,b=0;b<a.nodeDataArray.length;b++){var E=a.nodeDataArray[b];d0(a,y,E,E,x)}return x}function d0(a,y,x,b,E){if(Array.isArray(x))for(var te=0;te<x.length;te++){var ne=x[te];if(ne===y)return E.add(b),!0;if(d0(a,y,ne,b,E))return!0}else if(Kt(x)&&Object.getPrototypeOf(x)===Object.prototype)for(te in x){if(ne=x[te],ne===y)return E.add(b),!0;if(d0(a,y,ne,b,E))return!0}return!1}$e.Pv=function(a,y){var x=this,b=!1,E=new kn,te=new kn,ne=new kn,se=this.vh;a.changes.each(function(Ee){Ee.model===x&&(Ee.modelChange==="nodeDataArray"?Ee.change===es?E.add(Ee.newValue):Ee.change===Jo&&ne.add(Ee.oldValue):x.lb(Ee.object)?te.add(Ee.object):Ee.change!==Ro||x.modelData!==Ee.object&&Ee.propertyName!=="modelData"?Ee.object!==null&&(se&&se.contains(Ee.object)?se.get(Ee.object).each(function(Ne){x.lb(Ne)&&te.add(Ne)}):Ee.object instanceof gi||x.ri()&&x.Jc(Ee.object)||_S(x,Ee.object).each(function(Ne){te.add(Ne)})):b=!0)});var he=this.il;he.clear(),E.each(function(Ee){he.add(x.wa(Ee)),y||te.add(Ee)});var _e=this.kl;return _e.clear(),ne.each(function(Ee){_e.add(x.wa(Ee)),y&&te.add(Ee)}),a="",b&&(a+=`,
|
|
|
"modelData": `+hy(this,this.modelData)),0<he.count&&(a+=(y?this.Yv:this.Wv)+Rc(this,he.Fa(),!0)),0<te.count&&(a+=this.jy+Rc(this,te.Fa(),!0)),0<_e.count&&(a+=(y?this.Wv:this.Yv)+Rc(this,_e.Fa(),!0)),_e.clear(),he.clear(),a},$e.fp=function(a){(a.name!==void 0&&a.name!==this.name||a.dataFormat!==void 0&&a.dataFormat!==this.dataFormat||a.isReadOnly!==void 0&&a.isReadOnly!==this.isReadOnly||a.nodeKeyProperty!==void 0&&a.nodeKeyProperty!==this.nodeKeyProperty||a.copiesArrays!==void 0&&a.copiesArrays!==this.copiesArrays||a.copiesArrayObjects!==void 0&&a.copiesArrayObjects!==this.copiesArrayObjects||a.copiesKey!==void 0&&a.copiesKey!==this.copiesKey||a.nodeCategoryProperty!==void 0&&a.nodeCategoryProperty!==this.nodeCategoryProperty)&&Lt("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new on;if(Array.isArray(x))for(var E=0;E<x.length;E++){var te=x[E],ne=this.wa(te);ne!=null&&b.set(ne,te)}if(Array.isArray(y))for(E=y.length,te=0;te<E;te++){ne=y[te];var se=this.hc(ne);se===null&&(se=(se=b.get(ne))?se:this.copyNodeData({}),this.km(se,ne),this.xf(se))}if(Array.isArray(x)){for(y=x.length,b=0;b<y;b++)if(E=x[b],te=this.wa(E),te=this.hc(te),te!==null){for(var he in E)he==="__gohashid"||he===this.nodeKeyProperty||this.Wj()&&he===this.nodeIsGroupProperty||this.setDataProperty(te,he,E[he]);this.lm(E,te)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,he=0;he<x;he++)y=this.hc(a[he]),y!==null&&this.cm(y)},$e.$x=function(a,y){a.change!==ha&&Lt("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof cs?(y===void 0&&(y=_g(this,this)),wS(this,x),a=this.Pv(x,a.propertyName==="FinishedUndo"),this.vh=null,y==="2"?'{ "incremental": 2'+a+"}":'{ "class": '+this.quote(y)+', "incremental": 1'+this.rm()+a+"}"):'{ "incremental": 0 }'},$e.yA=function(a,y){return this.$x(a,y)},$e.np=function(a){return a===void 0&&(a=_g(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},$e.toJSON=function(a){return this.np(a)},$e.Zw=function(a){var y=null;if(typeof a=="string")try{y=jt.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:Lt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Lt("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},$e.Ky=function(a){return this.Zw(a)},gi.constructGraphLinksModel=function(){return new gi},$e=gi.prototype,$e.dm=function(a){if(vn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(Kt(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:Lt("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(Kt(a)){for(y in a)if(x=a[y],Kt(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(E=x.length%2===0,b=0;b<x.length;b++)if(typeof x[b]!="number"){E=!1;break}if(E){for(E=new Ln,b=0;b<x.length/2;b++)E.add(new ft(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return Nx(a)}return a},$e.sm=function(a){return a===void 0?"undefined":a===null?"null":a===!0?"true":a===!1?"false":typeof a=="string"?this.quote(a):typeof a=="number"?a===1/0?"9e9999":a===-1/0?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.sm(a.valueOf()):vn(a)?Rc(this,a):Kt(a)?hy(this,a):typeof a=="function"?"null":a.toString()};function Rc(a,y,x){x===void 0&&(x=!1);var b=y.length;if(0>=b)return"[]";var E=new tr;E.add("["),x&&1<b&&E.add(`
|
|
|
`);for(var te=0;te<b;te++){var ne=y[te];ne!==void 0&&(0<te&&(E.add(","),x&&E.add(`
|
|
|
`)),E.add(a.sm(ne)))}return x&&1<b&&E.add(`
|
|
|
`),E.add("]"),E.toString()}function bS(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function Ua(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function hy(a,y){var x=y;if(x instanceof ft)y={class:"go.Point",x:Ua(x.x),y:Ua(x.y)};else if(x instanceof wn)y={class:"go.Size",width:Ua(x.width),height:Ua(x.height)};else if(x instanceof sn)y={class:"go.Rect",x:Ua(x.x),y:Ua(x.y),width:Ua(x.width),height:Ua(x.height)};else if(x instanceof nr)y={class:"go.Margin",top:Ua(x.top),right:Ua(x.right),bottom:Ua(x.bottom),left:Ua(x.left)};else if(x instanceof ui)x.sb()?y={class:"go.Spot",x:Ua(x.x),y:Ua(x.y),offsetX:Ua(x.offsetX),offsetY:Ua(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof no){if(y={class:"go.Brush",type:x.type.name},x.type===qh?y.color=x.color:(x.type===Dh||x.type===Ul)&&(y.start=x.start,y.end=x.end,x.type===Ul&&(x.startRadius!==0&&(y.startRadius=Ua(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=Ua(x.endRadius)))),x.colorStops!==null){var b={};for(x=x.colorStops.iterator;x.next();)b[x.key]=x.value;y.colorStops=b}}else x instanceof In?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=Ua(x.startX)),x.startY!==0&&(y.startY=Ua(x.startY)),x.endX!==0&&(y.endX=Ua(x.endX)),x.endY!==0&&(y.endY=Ua(x.endY)),x.spot1.D(xr)||(y.spot1=x.spot1),x.spot2.D(eo)||(y.spot2=x.spot2),x.type===In.o&&(y.path=In.ia(x))):x instanceof nn&&(y={class:"go.EnumValue",classType:_g(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var te=ds(y,E);if(!bS(E,te))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&te instanceof Ln){var ne="[";for(te=te.iterator;te.next();){var se=te.value;1<ne.length&&(ne+=","),ne+=a.sm(se.x),ne+=",",ne+=a.sm(se.y)}ne+="]",b+=ne}else b+=a.sm(te)}return b+"}"}function Ha(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function Nx(a){if(typeof a!="object")return a;var y=a.class||"";if(y==="NaN")return NaN;if(y==="Date")return new Date(a.value);if(y.indexOf("go.")!==0)return a;y=y.substr(3);var x=a;if(y==="Point")x=new ft(Ha(a.x),Ha(a.y));else if(y==="Size")x=new wn(Ha(a.width),Ha(a.height));else if(y==="Rect")x=new sn(Ha(a.x),Ha(a.y),Ha(a.width),Ha(a.height));else if(y==="Margin")x=new nr(Ha(a.top),Ha(a.right),Ha(a.bottom),Ha(a.left));else if(y==="Spot")typeof a.enum=="string"?x=zo(a.enum):x=new ui(Ha(a.x),Ha(a.y),Ha(a.offsetX),Ha(a.offsetY));else if(y==="Brush"){if(x=new no,x.type=Mi(no,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof ui&&(x.start=a.start),a.end instanceof ui&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=Ha(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=Ha(a.endRadius)),a=a.colorStops,Kt(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=In.parse(a.path):x=new In,x.type=Mi(In,a.type),typeof a.startX=="number"&&(x.startX=Ha(a.startX)),typeof a.startY=="number"&&(x.startY=Ha(a.startY)),typeof a.endX=="number"&&(x.endX=Ha(a.endX)),typeof a.endY=="number"&&(x.endY=Ha(a.endY)),a.spot1 instanceof ui&&(x.spot1=a.spot1),a.spot2 instanceof ui&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=dy(b),typeof b=="function"&&(x=Mi(b,a.name)));return x}$e.Pe=function(a){return this.Lt.add(a),this},$e.ik=function(a){this.Lt.remove(a)},$e.ds=function(a){this.skipsUndoManager||this.undoManager.Tu(a);for(var y=this.Lt,x=y.length,b=0;b<x;b++)y.M(b)(a)},$e.cb=function(a,y,x,b,E,te,ne){Ls(this,"",a,y,x,b,E,te,ne)},$e.g=function(a,y,x,b,E){Ls(this,"",Ro,a,this,y,x,b,E)},$e.Fs=function(a,y,x,b,E,te){Ls(this,"",Ro,y,a,x,b,E,te)};function Ls(a,y,x,b,E,te,ne,se,he){se===void 0&&(se=null),he===void 0&&(he=null);var _e=new Io;_e.model=a,_e.change=x,_e.modelChange=y,_e.propertyName=b,_e.object=E,_e.oldValue=te,_e.oldParam=se,_e.newValue=ne,_e.newParam=he,a.ds(_e)}gi.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===Ro){var x=a.object,b=a.propertyName,E=a.I(y);b===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),E!==void 0&&this.kb.add(E,x)),Wo(x,b,E)}else a.change===es?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,Kt(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&oi(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&Gn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!vn(b)&&a.propertyName&&(b=ds(a.object,a.propertyName)),vn(b)&&typeof x=="number"&&(a=a.newValue,y?oi(b,x):Gn(b,x,a))):Lt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Jo?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,Kt(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&Gn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&oi(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!vn(b)&&a.propertyName&&(b=ds(a.object,a.propertyName)),vn(b)&&typeof x=="number"&&(a=a.oldValue,y?Gn(b,x,a):oi(b,x))):Lt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==ha&&Lt("unknown ChangedEvent: "+a.toString())},gi.prototype.Ea=function(a){return this.undoManager.Ea(a)},gi.prototype.eb=function(a){return this.undoManager.eb(a)},gi.prototype.Kf=function(){return this.undoManager.Kf()},gi.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},$e=gi.prototype,$e.La=function(a,y){y===void 0&&(y=""),Ls(this,"SourceChanged",ha,y,a,null,null)},$e.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=ds(a,y),y!==void 0)){if(Fc(y))return y;Lt("Key value for node data "+a+" is not a number or a string: "+y)}}},$e.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=ds(a,x);b!==y&&this.hc(y)===null&&(Wo(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),Ls(this,"nodeKey",Ro,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else Wo(a,x,y)}};function Fc(a){return typeof a=="number"||typeof a=="string"}$e.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},$e.hc=function(a){return a===null&&Lt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&Fc(a)?this.kb.I(a):null},$e.$u=function(a){if(a!==null){var y=this.Th;if(y!==""){var x=this.wa(a);if(x===void 0||this.kb.contains(x)){var b=this.bl;if(b!==null&&(x=b(this,a),x!=null&&!this.kb.contains(x))){Wo(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;Wo(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;Wo(a,y,x)}}}}},$e.xf=function(a){a!==null&&(Lr(a),this.lb(a)||PS(this,a,!0))};function PS(a,y,x){var b=a.wa(y);(b===void 0||a.kb.I(b)!==y)&&(a.$u(y),b=a.wa(y),b===void 0&&Lt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,Gn(a.Tc,b,y)),Ls(a,"nodeDataArray",es,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}$e.Fy=function(a){if(vn(a))for(var y=a.length,x=0;x<y;x++)this.xf(a[x]);else for(a=a.iterator;a.next();)this.xf(a.value)},$e.cm=function(a){a!==null&&CS(this,a,!0)};function CS(a,y,x){var b=a.wa(y);if(b!==void 0&&a.kb.remove(b),b=null,x){e:if(x=a.Tc,Array.isArray(x))b=x.indexOf(y);else{b=x.length;for(var E=0;E<b;E++)if(x[E]===y){b=E;break e}b=-1}if(0>b)return;oi(a.Tc,b)}Ls(a,"nodeDataArray",Jo,"nodeDataArray",a,y,null,b,null),a.qp(y)}$e.nA=function(a){if(vn(a))for(var y=a.length,x=0;x<y;x++)this.cm(a[x]);else for(a=a.iterator;a.next();)this.cm(a.value)},$e.$z=function(a){if(a!==this.nodeDataArray&&vn(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var b=a.length,E=0;E<b;E++){var te=a[E],ne=this.wa(te);if(ne!==void 0){x.add(ne);var se=this.hc(ne);se!==te&&(se!==null?(this.Do(se,te),this.lm(te,se)):(te=this.cloneDeep(te),this.km(te,ne),this.xf(te)))}else ne=this.cloneDeep(te),this.xf(ne),x.add(this.wa(ne))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.hc(b))&&this.cm(b);y.clear(),x.clear()}},$e.jp=function(a,y){y!==void 0&&(a=wg(this,a),a instanceof kn&&this.Vf.add(y,a))},$e.Lv=function(){},$e.fm=function(){},$e.em=function(){},$e.qp=function(){};function Ou(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new kn,a.Vf.add(y,b)),b.add(x)}}function Iu(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof kn&&(x==null?a.Vf.remove(y):(b.remove(x),b.count===0&&a.Vf.remove(y)))}}function wg(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof kn?a:null)}$e.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},gi.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):f0(this,a,!0),Kt(a)&&Di(a),a};function f0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var b=[];for(x=0;x<y.length;x++){var E=f0(a,y[x],a.copiesArrayObjects);b.push(E)}return Di(b),b}if(x&&Kt(y)){x=(x=y.constructor)?new x:{},E=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(b in y)if(b==="__gohashid")x.__gohashid=void 0;else if(b===E)x[E]=void 0;else{var te=ds(y,b),ne=_g(a,te);ne==="GraphObject"||ne==="Diagram"||ne==="Layer"||ne==="RowColumnDefinition"||ne==="AnimationManager"||ne==="Tool"||ne==="CommandHandler"||ne==="Layout"||ne==="InputEvent"||ne==="DiagramEvent"||te instanceof gi||te instanceof No||te instanceof cs||te instanceof Io||(te=f0(a,te,!1)),Wo(x,b,te)}return Di(x),x}return y instanceof ft||y instanceof wn||y instanceof sn||y instanceof ui||y instanceof nr?y.copy():y}gi.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}}else!ES&&a instanceof Zt&&(ES=!0,Sn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Sn(" Is that really your intent?"));var b=ds(a,y);b!==x&&(Wo(a,y,x),this.Fs(a,y,b,x))},$e=gi.prototype,$e.set=function(a,y,x){this.setDataProperty(a,y,x)},$e.Do=function(a,y){if(y){var x=this.lb(a),b;for(b in y)b==="__gohashid"||x&&b===this.nodeKeyProperty||this.setDataProperty(a,b,y[b])}},$e.Ay=function(a,y){this.ts(a,-1,y)},$e.ts=function(a,y,x){0>y&&(y=a.length),Gn(a,y,x),Ls(this,"",es,"",a,null,x,null,y)},$e.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Lt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];oi(a,y),Ls(this,"",Jo,"",a,x,null,y,null)},$e.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=ds(a,y),y===void 0))return"";if(typeof y=="string")return y;Lt("getCategoryForNodeData found a non-string category for "+a+": "+y)},$e.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=ds(a,x);b===void 0&&(b=""),b!==y&&(Wo(a,x,y),Ls(this,"nodeCategory",Ro,x,a,b,y))}else Wo(a,x,y)}},$e.lm=function(a,y){this.jm(y,this.Ro(a))},$e.Tl=function(){return!1},$e.Wj=function(){return!1},$e.ri=function(){return!1},$e.xs=function(){return!1},$e.Xj=function(){return!1};function cy(){return new gi}function _g(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 _g(a,y.constructor);return typeof y}function dy(a){return yu[a]?yu[a]:jt.go!==void 0&&jt.go[a]?jt.go[a]:null}function ds(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(b){}return x}function Wo(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(b){}}ot.Object.defineProperties(gi.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===""&&Lt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Lt("Cannot set Model.nodeKeyProperty when there is existing node data"),this.Th=a,this.g("nodeKeyProperty",y,a))}},makeUniqueKeyFunction:{get:function(){return this.bl},set:function(a){var y=this.bl;y!==a&&(this.bl=a,this.g("makeUniqueKeyFunction",y,a))}},nodeDataArray:{get:function(){return this.Tc},set:function(a){var y=this.Tc;if(y!==a){this.kb.clear(),this.Lv();for(var x=a.length,b=0;b<x;b++){var E=a[b];Kt(E)||Lt("Model.nodeDataArray must only contain Objects, not: "+E),Lr(E)}for(this.Tc=a,b=new Ln,E=0;E<x;E++){var te=a[E],ne=this.wa(te);ne===void 0||this.kb.I(ne)!==null?b.add(te):this.kb.add(ne,te)}for(b=b.iterator;b.next();)E=b.value,this.$u(E),te=this.wa(E),te!==void 0&&this.kb.add(te,E);for(Ls(this,"nodeDataArray",Ro,"nodeDataArray",this,y,a),y=0;y<x;y++)b=a[y],this.fm(b),this.em(b);Array.isArray(a)||(this.isReadOnly=!0)}}},copyNodeDataFunction:{get:function(){return this.Bk},set:function(a){var y=this.Bk;y!==a&&(this.Bk=a,this.g("copyNodeDataFunction",y,a))}},copiesArrays:{get:function(){return this.Km},set:function(a){var y=this.Km;y!==a&&(this.Km=a,this.g("copiesArrays",y,a))}},copiesArrayObjects:{get:function(){return this.Jm},set:function(a){var y=this.Jm;y!==a&&(this.Jm=a,this.g("copiesArrayObjects",y,a))}},copiesKey:{get:function(){return this.Mm},set:function(a){var y=this.Mm;y!==a&&(this.Mm=a,this.g("copiesKey",y,a))}},afterCopyFunction:{get:function(){return this.xm},set:function(a){var y=this.xm;y!==a&&(this.xm=a,this.g("afterCopyFunction",y,a))}},nodeCategoryProperty:{get:function(){return this.lj},set:function(a){var y=this.lj;y!==a&&(this.lj=a,this.g("nodeCategoryProperty",y,a))}},type:{get:function(){return"Model"}}}),gi.prototype.setCategoryForNodeData=gi.prototype.jm,gi.prototype.getCategoryForNodeData=gi.prototype.Ro,gi.prototype.removeArrayItem=gi.prototype.ov,gi.prototype.insertArrayItem=gi.prototype.ts,gi.prototype.addArrayItem=gi.prototype.Ay,gi.prototype.assignAllDataProperties=gi.prototype.Do,gi.prototype.set=gi.prototype.set,gi.prototype.clearUnresolvedReferences=gi.prototype.Qy,gi.prototype.mergeNodeDataArray=gi.prototype.$z,gi.prototype.removeNodeDataCollection=gi.prototype.nA,gi.prototype.removeNodeData=gi.prototype.cm,gi.prototype.addNodeDataCollection=gi.prototype.Fy,gi.prototype.addNodeData=gi.prototype.xf,gi.prototype.makeNodeDataKeyUnique=gi.prototype.$u,gi.prototype.findNodeDataForKey=gi.prototype.hc,gi.prototype.containsNodeData=gi.prototype.lb,gi.prototype.setKeyForNodeData=gi.prototype.km,gi.prototype.getKeyForNodeData=gi.prototype.wa,gi.prototype.updateTargetBindings=gi.prototype.La,gi.prototype.commit=gi.prototype.commit,gi.prototype.rollbackTransaction=gi.prototype.Kf,gi.prototype.commitTransaction=gi.prototype.eb,gi.prototype.startTransaction=gi.prototype.Ea,gi.prototype.raiseDataChanged=gi.prototype.Fs,gi.prototype.raiseChanged=gi.prototype.g,gi.prototype.raiseChangedEvent=gi.prototype.cb,gi.prototype.removeChangedListener=gi.prototype.ik,gi.prototype.addChangedListener=gi.prototype.Pe,gi.prototype.writeJsonValue=gi.prototype.sm,gi.prototype.replaceJsonObjects=gi.prototype.dm,gi.prototype.applyIncrementalJSON=gi.prototype.Ky,gi.prototype.applyIncrementalJson=gi.prototype.Zw,gi.prototype.toJSON=gi.prototype.toJSON,gi.prototype.toJson=gi.prototype.np,gi.prototype.toIncrementalJSON=gi.prototype.yA,gi.prototype.toIncrementalJson=gi.prototype.$x,gi.prototype.toIncrementalData=gi.prototype.xA,gi.prototype.clear=gi.prototype.clear;var ES=!1,yu={};gi.className="Model",gi.fromJSON=gi.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=jt.JSON.parse(a)}catch(te){}else typeof a=="object"?x=a:Lt("Unable to construct a Model from: "+a);if(y===null){a=null;var b=x.class;if(typeof b=="string")try{var E=null;b.indexOf("go.")===0?(b=b.substr(3),E=dy(b)):(E=dy(b),E===null&&(E=jt[b])),typeof E=="function"&&(a=new E)}catch(te){}a===null||a instanceof gi?y=a:Lt("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=gi.constructGraphLinksModel()),y.gp(x),y.kv(x),y},gi.safePropertyValue=ds,gi.safePropertySet=Wo,yu.Brush=no,yu.ChangedEvent=Io,yu.Geometry=In,yu.Margin=nr,yu.Panel=Dn,yu.Point=ft,yu.Rect=sn,yu.Size=wn,yu.Spot=ui,yu.Transaction=cs,yu.UndoManager=No;function ms(a,y,x,b){Di(this),this._isFrozen=!1,a===void 0&&(a=""),y===void 0&&(y=a),x===void 0&&(x=null),this.j=-1,this.xd=null,this.xl=a,this.wl=this.to=0,this.Cr=null,this.wn=!1,this.sl=y,this.Im=x,b===void 0?(this.el=MS,this.wk=null):(this.el=bg,this.wk=b),this.st=new kn}ms.prototype.copy=function(){var a=new ms;return a.xl=this.xl,a.to=this.to,a.wl=this.wl,a.Cr=this.Cr,a.wn=this.wn,a.sl=this.sl,a.Im=this.Im,a.el=this.el,a.wk=this.wk,a},$e=ms.prototype,$e.qb=function(a){a.classType===ms&&(this.mode=a)},$e.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},$e.freeze=function(){return this._isFrozen=!0,this},$e.ka=function(){return this._isFrozen=!1,this},$e.Kx=function(a){return a===void 0&&(a=null),this.mode=bg,this.backConverter=a,this},$e.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},$e.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function LS(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}$e.Mv=function(a,y,x){var b=this.sl;if(x===void 0||b===""||b===x){x=this.xl;var E=this.Im;if(E===null&&x==="")Sn("Binding error: target property is the empty string: "+this.toString());else{var te=y;if(b!==""&&(te=ds(y,b)),te!==void 0)if(E===null)x!==""&&Wo(a,x,te);else try{if(x!==""){var ne=E(te,a);Wo(a,x,ne)}else E(te,a)}catch(se){}}}},$e.sp=function(a,y,x,b){if(this.el===bg){var E=this.xl;if(x===void 0||E===x){x=this.sl;var te=this.wk,ne=a;if(E!==""&&(ne=ds(a,E)),ne!==void 0&&!this.st.contains(a))try{this.st.add(a);var se=b!==null?b.diagram:null,he=se!==null?se.model:null;if(te===null){if(x!=="")he!==null?he.setDataProperty(y,x,ne):Wo(y,x,ne);else if(he!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var _e=b.itemIndex,Ee=b.panel.itemArray;he.ov(Ee,_e),he.ts(Ee,_e,ne)}}else try{if(x!==""){var Ne=te(ne,y,he);he!==null?he.setDataProperty(y,x,Ne):Wo(y,x,Ne)}else{var He=te(ne,y,he);if(He!==void 0&&he!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var Ye=b.itemIndex,Qe=b.panel.itemArray;he.ov(Qe,Ye),he.ts(Qe,Ye,He)}}}catch(st){}}finally{this.st.remove(a)}}}},ot.Object.defineProperties(ms.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&Ht(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&Ht(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&Ht(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&Ht(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&Ht(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&Ht(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&Ht(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&Ht(this),this.el=a}}}),ms.prototype.updateSource=ms.prototype.sp,ms.prototype.updateTarget=ms.prototype.Mv,ms.prototype.ofModel=ms.prototype.dA,ms.prototype.ofObject=ms.prototype.cp,ms.prototype.makeTwoWay=ms.prototype.Kx;var Dx="Binding",MS=new nn(ms,"OneWay",1),bg=new nn(ms,"TwoWay",2);ms.className="Binding",ms.parseEnum=function(a,y){return function(x){return x=Mi(a,x),x===null?y:x}},ms.toString=wi,ms.OneWay=MS,ms.TwoWay=bg;function kr(a,y,x){gi.call(this),this.Vv=`,
|
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
|
"removedLinkKeys": `,this.md=[],this.$f=new kn,this.wb=new on,this.Jh="",this.Ri=this.Ak=this.cl=null,this.lf="from",this.mf="to",this.fj=this.ej="",this.dj="category",this.je="",this.jl="isGroup",this.Je="group",this.Lm=!1,y!==void 0&&(this.linkDataArray=y),a!==void 0&&(vn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Je(kr,gi),kr.constructGraphLinksModel=gi.constructGraphLinksModel,kr.prototype.cloneProtected=function(a){gi.prototype.cloneProtected.call(this,a),a.Jh=this.Jh,a.cl=this.cl,a.Ak=this.Ak,a.lf=this.lf,a.mf=this.mf,a.ej=this.ej,a.fj=this.fj,a.dj=this.dj,a.je=this.je,a.jl=this.jl,a.Je=this.Je,a.Lm=this.Lm},$e=kr.prototype,$e.clear=function(){gi.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},$e.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" GraphLinksModel";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;var x=a.length,b;for(b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+wi(E)}for(y+=`
|
|
|
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+Nl(this,E,!0)+"-->"+Nl(this,E,!1)}return y},$e.Qv=function(a,y){this.linkKeyProperty===""&&Lt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=gi.prototype.Qv.call(this,a,y),b=this,E=new kn,te=new kn,ne=new kn,se=this.vh;a.changes.each(function(Ee){Ee.model===b&&(Ee.modelChange==="linkDataArray"?Ee.change===es?E.add(Ee.newValue):Ee.change===Jo&&ne.add(Ee.oldValue):b.Jc(Ee.object)?te.add(Ee.object):Ee.object!==null&&(Ee.object!==null&&se&&se.contains(Ee.object)?se.get(Ee.object).each(function(Ne){b.Jc(Ne)&&te.add(Ne)}):Ee.object instanceof gi||b.lb(Ee.object)||kS(b,Ee.object).each(function(Ne){te.add(Ne)})))});var he=this.il;he.clear(),E.each(function(Ee){he.add(b.Ac(Ee)),y||te.add(Ee)});var _e=this.kl;return _e.clear(),ne.each(function(Ee){_e.add(b.Ac(Ee)),y&&te.add(Ee)}),a=b.cloneDeep(te.Fa()),0<he.count&&(x===null&&(x={}),y?x.removedLinkKeys=he.Fa():x.insertedLinkKeys=he.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<_e.count&&(x===null&&(x={}),y?x.insertedLinkKeys=_e.Fa():x.removedLinkKeys=_e.Fa()),_e.clear(),he.clear(),x},$e.rm=function(){var a=gi.prototype.rm.call(this),y="";return this.linkCategoryProperty!=="category"&&typeof this.linkCategoryProperty=="string"&&(y+=`,
|
|
|
"linkCategoryProperty": `+this.quote(this.linkCategoryProperty)),this.linkKeyProperty!==""&&typeof this.linkKeyProperty=="string"&&(y+=`,
|
|
|
"linkKeyProperty": `+this.quote(this.linkKeyProperty)),this.linkFromKeyProperty!=="from"&&typeof this.linkFromKeyProperty=="string"&&(y+=`,
|
|
|
"linkFromKeyProperty": `+this.quote(this.linkFromKeyProperty)),this.linkToKeyProperty!=="to"&&typeof this.linkToKeyProperty=="string"&&(y+=`,
|
|
|
"linkToKeyProperty": `+this.quote(this.linkToKeyProperty)),this.linkFromPortIdProperty!==""&&typeof this.linkFromPortIdProperty=="string"&&(y+=`,
|
|
|
"linkFromPortIdProperty": `+this.quote(this.linkFromPortIdProperty)),this.linkToPortIdProperty!==""&&typeof this.linkToPortIdProperty=="string"&&(y+=`,
|
|
|
"linkToPortIdProperty": `+this.quote(this.linkToPortIdProperty)),this.linkLabelKeysProperty!==""&&typeof this.linkLabelKeysProperty=="string"&&(y+=`,
|
|
|
"linkLabelKeysProperty": `+this.quote(this.linkLabelKeysProperty)),this.nodeIsGroupProperty!=="isGroup"&&typeof this.nodeIsGroupProperty=="string"&&(y+=`,
|
|
|
"nodeIsGroupProperty": `+this.quote(this.nodeIsGroupProperty)),this.nodeGroupKeyProperty!=="group"&&typeof this.nodeGroupKeyProperty=="string"&&(y+=`,
|
|
|
"nodeGroupKeyProperty": `+this.quote(this.nodeGroupKeyProperty)),a+y},$e.gp=function(a){gi.prototype.gp.call(this,a),a.linkKeyProperty&&(this.linkKeyProperty=a.linkKeyProperty),a.linkFromKeyProperty&&(this.linkFromKeyProperty=a.linkFromKeyProperty),a.linkToKeyProperty&&(this.linkToKeyProperty=a.linkToKeyProperty),a.linkFromPortIdProperty&&(this.linkFromPortIdProperty=a.linkFromPortIdProperty),a.linkToPortIdProperty&&(this.linkToPortIdProperty=a.linkToPortIdProperty),a.linkCategoryProperty&&(this.linkCategoryProperty=a.linkCategoryProperty),a.linkLabelKeysProperty&&(this.linkLabelKeysProperty=a.linkLabelKeysProperty),a.nodeIsGroupProperty&&(this.nodeIsGroupProperty=a.nodeIsGroupProperty),a.nodeGroupKeyProperty&&(this.nodeGroupKeyProperty=a.nodeGroupKeyProperty)},$e.Rv=function(){var a=gi.prototype.Rv.call(this),y=`,
|
|
|
"linkDataArray": `+Rc(this,this.linkDataArray,!0);return a+y},$e.kv=function(a){gi.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function kS(a,y){for(var x=new kn,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];d0(a,y,E,E,x)}return x}$e.Pv=function(a,y){this.linkKeyProperty===""&&Lt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=gi.prototype.Pv.call(this,a,y),b=this,E=new kn,te=new kn,ne=new kn,se=this.vh;a.changes.each(function(Ee){Ee.model===b&&(Ee.modelChange==="linkDataArray"?Ee.change===es?E.add(Ee.newValue):Ee.change===Jo&&ne.add(Ee.oldValue):b.Jc(Ee.object)?te.add(Ee.object):Ee.object!==null&&(Ee.object!==null&&se&&se.contains(Ee.object)?se.get(Ee.object).each(function(Ne){b.Jc(Ne)&&te.add(Ne)}):Ee.object instanceof gi||b.lb(Ee.object)||kS(b,Ee.object).each(function(Ne){te.add(Ne)})))});var he=this.il;he.clear(),E.each(function(Ee){he.add(b.Ac(Ee)),y||te.add(Ee)});var _e=this.kl;return _e.clear(),ne.each(function(Ee){_e.add(b.Ac(Ee)),y&&te.add(Ee)}),a=x,0<he.count&&(a+=(y?this.Xv:this.Vv)+Rc(this,he.Fa(),!0)),0<te.count&&(a+=this.iy+Rc(this,te.Fa(),!0)),0<_e.count&&(a+=(y?this.Vv:this.Xv)+Rc(this,_e.Fa(),!0)),_e.clear(),he.clear(),a},$e.fp=function(a){(a.linkCategoryProperty!==void 0&&a.linkCategoryProperty!==this.linkCategoryProperty||a.linkKeyProperty!==void 0&&a.linkKeyProperty!==this.linkKeyProperty||a.linkFromKeyProperty!==void 0&&a.linkFromKeyProperty!==this.linkFromKeyProperty||a.linkToKeyProperty!==void 0&&a.linkToKeyProperty!==this.linkToKeyProperty||a.linkFromPortIdProperty!==void 0&&a.linkFromPortIdProperty!==this.linkFromPortIdProperty||a.linkToPortIdProperty!==void 0&&a.linkToPortIdProperty!==this.linkToPortIdProperty||a.linkLabelKeysProperty!==void 0&&a.linkLabelKeysProperty!==this.linkLabelKeysProperty||a.nodeIsGroupProperty!==void 0&&a.nodeIsGroupProperty!==this.nodeIsGroupProperty||a.nodeGroupKeyProperty!==void 0&&a.nodeGroupKeyProperty!==this.nodeGroupKeyProperty)&&Lt("applyIncrementalJson cannot change Model properties"),gi.prototype.fp.call(this,a);var y=a.insertedLinkKeys;if(Array.isArray(y))for(var x=y.length,b=0;b<x;b++){var E=y[b],te=this.jh(E);te===null&&(te=this.Jo({}),this.Ks(te,E),this.fi(te))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,b=0;b<x;b++)if(E=y[b],te=this.Ac(E),te=this.jh(te),te!==null){for(var ne in E)ne!=="__gohashid"&&ne!==this.linkKeyProperty&&this.setDataProperty(te,ne,E[ne]);NS(this,E,te)}}if(a=a.removedLinkKeys,Array.isArray(a))for(ne=a.length,y=0;y<ne;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},kr.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===Ro){var x=a.object,b=a.propertyName;if(b===this.linkKeyProperty&&this.Jc(x)){var E=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),E!==void 0&&this.wb.add(E,x),Wo(x,b,E);return}}else if(a.change===es){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,Kt(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)):0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue));return}}else if(a.change===Jo){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,Kt(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue):(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)));return}}gi.prototype.changeState.call(this,a,y)}},$e=kr.prototype,$e.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),Wo(x,this.nodeKeyProperty,a),this.xf(x))}return a}},$e.yx=function(a){return Nl(this,a,!0)},$e.wv=function(a,y){qf(this,a,y,!0)},$e.Bx=function(a){return Nl(this,a,!1)},$e.Bv=function(a,y){qf(this,a,y,!1)};function Nl(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=ds(y,a),a!==void 0))){if(Fc(a))return a;Lt((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function qf(a,y,x,b){if(x===null&&(x=void 0),y!==null){var E=b?a.lf:a.mf;if(E!=="")if(x=a.Vl(x),a.Jc(y)){var te=ds(y,E);te!==x&&(Iu(a,te,y),Wo(y,E,x),a.hc(x)===null&&Ou(a,x,y),Ls(a,b?"linkFromKey":"linkToKey",Ro,E,y,te,x),typeof E=="string"&&a.La(y,E))}else Wo(y,E,x)}}$e.zx=function(a){return p0(this,a,!0)},$e.xv=function(a,y){Qf(this,a,y,!0)},$e.Cx=function(a){return p0(this,a,!1)},$e.Cv=function(a,y){Qf(this,a,y,!1)};function p0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=ds(y,a),y===void 0?"":y)}function Qf(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var te=ds(y,E);te===void 0&&(te=""),te!==x&&(Wo(y,E,x),Ls(a,b?"linkFromPortId":"linkToPortId",Ro,E,y,te,x),typeof E=="string"&&a.La(y,E))}else Wo(y,E,x)}}$e.Ef=function(a){if(a===null)return g0;var y=this.je;return y===""?g0:(a=ds(a,y),a===void 0?g0:a)},$e.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=ds(a,x);if(b===void 0&&(b=g0),b!==y){if(Array.isArray(b))for(var E=b.length,te=0;te<E;te++)Iu(this,b[te],a);for(Wo(a,x,y),E=y.length,te=0;te<E;te++){var ne=y[te];this.hc(ne)===null&&Ou(this,ne,a)}Ls(this,"linkLabelKeys",Ro,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else Wo(a,x,y)}},$e.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=ds(a,x);if(b===void 0)x=[],x.push(y),this.Ls(a,x);else if(Array.isArray(b)){var E=b.indexOf(y);0<=E||(E=b.length,b.push(y),this.Jc(a)&&(this.hc(y)===null&&Ou(this,y,a),Ls(this,"linkLabelKeys",es,x,a,null,y,null,E)))}else Lt(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},$e.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=ds(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(Iu(this,y,a),Ls(this,"linkLabelKeys",Jo,x,a,y,null,E,null)))}else b!==void 0&&Lt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},$e.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=ds(a,y),y!==void 0)){if(Fc(y))return y;Lt("Key value for link data "+a+" is not a number or a string: "+y)}}},$e.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=ds(a,x);b!==y&&this.jh(y)===null&&(Wo(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),Ls(this,"linkKey",Ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Wo(a,x,y)}},$e.jh=function(a){return a===null&&Lt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Fc(a)?this.wb.I(a):null},$e.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 b=this.cl;if(b!==null&&(x=b(this,a),x!=null&&!this.wb.contains(x))){Wo(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;Wo(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;Wo(a,y,x)}}}}},$e.Jc=function(a){return a===null?!1:this.$f.contains(a)},$e.fi=function(a){a!==null&&(Lr(a),this.Jc(a)||TS(this,a,!0))};function TS(a,y,x){if(a.linkKeyProperty!==""){var b=a.Ac(y);if(b!==void 0&&a.wb.I(b)===y)return;a.Bs(y),b=a.Ac(y),b===void 0&&Lt("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(b,y)}a.$f.add(y),b=null,x&&(b=a.md.length,a.md.splice(b,0,y)),Ls(a,"linkDataArray",es,"linkDataArray",a,null,y,null,b),fy(a,y)}$e.Ey=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.fi(a[x]);else for(a=a.iterator;a.next();)this.fi(a.value)},$e.bm=function(a){a!==null&&AS(this,a,!0)};function AS(a,y,x){a.$f.remove(y);var b=a.Ac(y);if(b!==void 0&&a.wb.remove(b),b=null,x){if(b=a.md.indexOf(y),0>b)return;a.md.splice(b,1)}if(Ls(a,"linkDataArray",Jo,"linkDataArray",a,y,null,b,null),x=Nl(a,y,!0),Iu(a,x,y),x=Nl(a,y,!1),Iu(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,te=0;te<E;te++)x=b[te],Iu(a,x,y)}$e.lA=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.bm(a[x]);else for(a=a.iterator;a.next();)this.bm(a.value)},$e.Zz=function(a){if(this.linkKeyProperty===""&&Lt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&vn(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var b=a.length,E=0;E<b;E++){var te=a[E],ne=this.Ac(te);if(ne!==void 0){x.add(ne);var se=this.jh(ne);se!==te&&(se!==null?(this.Do(se,te),NS(this,te,se)):(te=this.cloneDeep(te),this.Ks(te,ne),this.fi(te)))}else ne=this.cloneDeep(te),this.fi(ne),x.add(this.Ac(ne))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.jh(b))&&this.bm(b);y.clear(),x.clear()}};function fy(a,y){var x=Nl(a,y,!0);x=a.Vl(x),a.hc(x)===null&&Ou(a,x,y),x=Nl(a,y,!1),x=a.Vl(x),a.hc(x)===null&&Ou(a,x,y);var b=a.Ef(y);if(Array.isArray(b))for(var E=b.length,te=0;te<E;te++)x=b[te],a.hc(x)===null&&Ou(a,x,y)}$e.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):f0(this,a,!0),Kt(a)&&(Di(a),this.lf!==""&&Wo(a,this.lf,void 0),this.mf!==""&&Wo(a,this.mf,void 0),this.je!==""&&Wo(a,this.je,[])),a},$e.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!ds(a,y)},$e.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=ds(a,y),y!==void 0)){if(Fc(y))return y;Lt("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},$e.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=ds(a,x);b!==y&&(Iu(this,b,a),Wo(a,x,y),this.hc(y)===null&&Ou(this,y,a),Ls(this,"nodeGroupKey",Ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Wo(a,x,y)}},kr.prototype.copyNodeData=function(a){return a===null?null:(a=gi.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||ds(a,this.Je)===void 0||Wo(a,this.Je,void 0),a)},kr.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeGroupKeyProperty){this.mp(a,x);return}}else if(this.Jc(a)){if(y===this.linkFromKeyProperty){qf(this,a,x,!0);return}if(y===this.linkToKeyProperty){qf(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Qf(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Qf(this,a,x,!1);return}if(y===this.linkKeyProperty){this.Ks(a,x);return}if(y===this.linkCategoryProperty){this.lp(a,x);return}if(y===this.linkLabelKeysProperty){this.Ls(a,x);return}}var b=ds(a,y);b!==x&&(Wo(a,y,x),this.Fs(a,y,b,x))},$e=kr.prototype,$e.Do=function(a,y){if(y){var x=this.lb(a),b=this.Jc(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||x&&E===this.nodeIsGroupProperty&&ds(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},$e.jp=function(a,y){gi.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y);for(x=this.$f.iterator;x.next();){var b=x.value,E=a,te=y;if(Nl(this,b,!0)===E){var ne=this.lf;Wo(b,ne,te),Ls(this,"linkFromKey",Ro,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)}if(Nl(this,b,!1)===E&&(ne=this.mf,Wo(b,ne,te),Ls(this,"linkToKey",Ro,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)),ne=this.Ef(b),Array.isArray(ne))for(var se=ne.length,he=this.je,_e=0;_e<se;_e++)ne[_e]===E&&(ne[_e]=te,Ls(this,"linkLabelKeys",es,he,b,E,te,_e,_e))}},$e.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;Wo(a,b,x),Ls(this,"nodeGroupKey",Ro,b,a,y,x),typeof b=="string"&&this.La(a,b)}},$e.Lv=function(){gi.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)fy(this,a[x])},$e.fm=function(a){gi.prototype.fm.call(this,a),a=this.wa(a);var y=wg(this,a);if(y!==null){var x=Wn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;Ls(this,"nodeGroupKey",Ro,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(Nl(this,b,!0)===a&&(E=this.lf,Ls(this,"linkFromKey",Ro,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),Nl(this,b,!1)===a&&(E=this.mf,Ls(this,"linkToKey",Ro,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),E=this.Ef(b),Array.isArray(E))for(var te=E.length,ne=this.je,se=0;se<te;se++)E[se]===a&&(Ls(this,"linkLabelKeys",es,ne,b,a,a,se,se),x.push(b))}for(y=0;y<x.length;y++)Iu(this,a,x[y]);zn(x)}},$e.em=function(a){gi.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&Ou(this,y,a)},$e.qp=function(a){gi.prototype.qp.call(this,a);var y=this.lh(a);Iu(this,y,a)},$e.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=ds(a,y),y===void 0))return"";if(typeof y=="string")return y;Lt("getCategoryForLinkData found a non-string category for "+a+": "+y)},kr.prototype.getLinkCategoryForData=function(a){return this.ps(a)},kr.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=ds(a,x);b===void 0&&(b=""),b!==y&&(Wo(a,x,y),Ls(this,"linkCategory",Ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Wo(a,x,y)}},kr.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},$e=kr.prototype,$e.lm=function(a,y){gi.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function NS(a,y,x){a.lp(x,a.ps(y)),a.wv(x,a.yx(y)),a.Bv(x,a.Bx(y)),a.Ls(x,a.Ef(y)),a.xv(x,a.zx(y)),a.Cv(x,a.Cx(y))}$e.Wj=function(){return!0},$e.ri=function(){return!0},$e.xs=function(){return!0},$e.Xj=function(){return!0},ot.Object.defineProperties(kr.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){var y=this.Ri;y!==a&&(this.Ri=a,this.g("archetypeNodeData",y,a))}},linkFromKeyProperty:{get:function(){return this.lf},set:function(a){var y=this.lf;y!==a&&(this.lf=a,this.g("linkFromKeyProperty",y,a))}},linkToKeyProperty:{get:function(){return this.mf},set:function(a){var y=this.mf;y!==a&&(this.mf=a,this.g("linkToKeyProperty",y,a))}},linkFromPortIdProperty:{get:function(){return this.ej},set:function(a){var y=this.ej;y!==a&&(this.ej=a,this.g("linkFromPortIdProperty",y,a))}},linkToPortIdProperty:{get:function(){return this.fj},set:function(a){var y=this.fj;y!==a&&(this.fj=a,this.g("linkToPortIdProperty",y,a))}},linkLabelKeysProperty:{get:function(){return this.je},set:function(a){var y=this.je;y!==a&&(this.je=a,this.g("linkLabelKeysProperty",y,a))}},linkDataArray:{get:function(){return this.md},set:function(a){var y=this.md;if(y!==a){this.wb.clear();for(var x=a.length,b=0;b<x;b++){var E=a[b];Kt(E)||Lt("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),Lr(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new Ln,E=0;E<x;E++){var te=a[E],ne=this.Ac(te);ne===void 0||this.wb.I(ne)!==null?b.add(te):this.wb.add(ne,te)}for(b=b.iterator;b.next();)E=b.value,this.Bs(E),te=this.Ac(E),te!==void 0&&this.wb.add(te,E)}for(b=new kn,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,Ls(this,"linkDataArray",Ro,"linkDataArray",this,y,a),y=0;y<x;y++)fy(this,a[y])}}},linkKeyProperty:{get:function(){return this.Jh},set:function(a){var y=this.Jh;if(y!==a){this.Jh=a,this.wb.clear();for(var x=this.linkDataArray.length,b=0;b<x;b++){var E=this.linkDataArray[b],te=this.Ac(E);te===void 0&&(this.Bs(E),te=this.Ac(E)),te!==void 0&&this.wb.add(te,E)}this.g("linkKeyProperty",y,a)}}},makeUniqueLinkKeyFunction:{get:function(){return this.cl},set:function(a){var y=this.cl;y!==a&&(this.cl=a,this.g("makeUniqueLinkKeyFunction",y,a))}},copyLinkDataFunction:{get:function(){return this.Ak},set:function(a){var y=this.Ak;y!==a&&(this.Ak=a,this.g("copyLinkDataFunction",y,a))}},nodeIsGroupProperty:{get:function(){return this.jl},set:function(a){var y=this.jl;y!==a&&(this.jl=a,this.g("nodeIsGroupProperty",y,a))}},nodeGroupKeyProperty:{get:function(){return this.Je},set:function(a){var y=this.Je;y!==a&&(this.Je=a,this.g("nodeGroupKeyProperty",y,a))}},Ij:{get:function(){return this.Lm},set:function(a){this.Lm!==a&&(this.Lm=a)}},linkCategoryProperty:{get:function(){return this.dj},set:function(a){var y=this.dj;y!==a&&(this.dj=a,this.g("linkCategoryProperty",y,a))}},type:{get:function(){return"GraphLinksModel"}}}),kr.prototype.setCategoryForLinkData=kr.prototype.lp,kr.prototype.getCategoryForLinkData=kr.prototype.ps,kr.prototype.assignAllDataProperties=kr.prototype.Do,kr.prototype.setGroupKeyForNodeData=kr.prototype.mp,kr.prototype.getGroupKeyForNodeData=kr.prototype.lh,kr.prototype.isGroupForNodeData=kr.prototype.Yu,kr.prototype.copyLinkData=kr.prototype.Jo,kr.prototype.mergeLinkDataArray=kr.prototype.Zz,kr.prototype.removeLinkDataCollection=kr.prototype.lA,kr.prototype.removeLinkData=kr.prototype.bm,kr.prototype.addLinkDataCollection=kr.prototype.Ey,kr.prototype.addLinkData=kr.prototype.fi,kr.prototype.containsLinkData=kr.prototype.Jc,kr.prototype.makeLinkDataKeyUnique=kr.prototype.Bs,kr.prototype.findLinkDataForKey=kr.prototype.jh,kr.prototype.setKeyForLinkData=kr.prototype.Ks,kr.prototype.getKeyForLinkData=kr.prototype.Ac,kr.prototype.removeLabelKeyForLinkData=kr.prototype.Qx,kr.prototype.addLabelKeyForLinkData=kr.prototype.Bu,kr.prototype.setLabelKeysForLinkData=kr.prototype.Ls,kr.prototype.getLabelKeysForLinkData=kr.prototype.Ef,kr.prototype.setToPortIdForLinkData=kr.prototype.Cv,kr.prototype.getToPortIdForLinkData=kr.prototype.Cx,kr.prototype.setFromPortIdForLinkData=kr.prototype.xv,kr.prototype.getFromPortIdForLinkData=kr.prototype.zx,kr.prototype.setToKeyForLinkData=kr.prototype.Bv,kr.prototype.getToKeyForLinkData=kr.prototype.Bx,kr.prototype.setFromKeyForLinkData=kr.prototype.wv,kr.prototype.getFromKeyForLinkData=kr.prototype.yx,kr.prototype.clear=kr.prototype.clear;var g0=Object.freeze([]);kr.className="GraphLinksModel",yu.GraphLinksModel=kr,gi.constructGraphLinksModel=gi.constructGraphLinksModel=function(){return new kr},gi.initDiagramModel=cy=function(){return new kr};function Ga(a,y){gi.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(vn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Je(Ga,gi),Ga.constructGraphLinksModel=gi.constructGraphLinksModel,Ga.prototype.cloneProtected=function(a){gi.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},$e=Ga.prototype,$e.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" TreeModel";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;for(var x=a.length,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+wi(E)}}return y},$e.rm=function(){var a=gi.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},$e.gp=function(a){gi.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},$e.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Lt("applyIncrementalJson cannot change Model properties"),gi.prototype.fp.call(this,a)},$e.Vl=function(a){return a},$e.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=ds(a,y),y!==void 0)){if(Fc(y))return y;Lt("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},$e.qe=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Ke;if(x!=="")if(y=this.Vl(y),this.lb(a)){var b=ds(a,x);b!==y&&(Iu(this,b,a),Wo(a,x,y),this.hc(y)===null&&Ou(this,y,a),Ls(this,"nodeParentKey",Ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Wo(a,x,y)}},$e.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=ds(a,y),y===void 0)?"":typeof y=="string"?y:(Lt("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},Ga.prototype.getLinkCategoryForData=function(a){return this.ss(a)},Ga.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=ds(a,x);b===void 0&&(b=""),b!==y&&(Wo(a,x,y),Ls(this,"parentLinkCategory",Ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Wo(a,x,y)}},Ga.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},Ga.prototype.copyNodeData=function(a){return a===null?null:(a=gi.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||ds(a,this.Ke)===void 0||Wo(a,this.Ke,void 0),a)},Ga.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeParentKeyProperty){this.qe(a,x);return}}var b=ds(a,y);b!==x&&(Wo(a,y,x),this.Fs(a,y,b,x))},$e=Ga.prototype,$e.jp=function(a,y){gi.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},$e.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;Wo(a,b,x),Ls(this,"nodeParentKey",Ro,b,a,y,x),typeof b=="string"&&this.La(a,b)}},$e.fm=function(a){gi.prototype.fm.call(this,a),a=this.wa(a);var y=wg(this,a);if(y!==null){var x=Wn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;Ls(this,"nodeParentKey",Ro,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)Iu(this,a,x[y]);zn(x)}},$e.em=function(a){gi.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&Ou(this,y,a)},$e.qp=function(a){gi.prototype.qp.call(this,a);var y=this.mh(a);Iu(this,y,a)},$e.lm=function(a,y){gi.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},$e.Tl=function(){return!0},$e.xs=function(){return!0},ot.Object.defineProperties(Ga.prototype,{nodeParentKeyProperty:{get:function(){return this.Ke},set:function(a){var y=this.Ke;y!==a&&(this.Ke=a,this.g("nodeParentKeyProperty",y,a))}},Jj:{get:function(){return this.Nm},set:function(a){this.Nm!==a&&(this.Nm=a)}},parentLinkCategoryProperty:{get:function(){return this.nj},set:function(a){var y=this.nj;y!==a&&(this.nj=a,this.g("parentLinkCategoryProperty",y,a))}},linkCategoryProperty:{get:function(){return this.parentLinkCategoryProperty},set:function(a){this.parentLinkCategoryProperty=a}},type:{get:function(){return"TreeModel"}}}),Ga.prototype.setParentLinkCategoryForNodeData=Ga.prototype.Ms,Ga.prototype.getParentLinkCategoryForNodeData=Ga.prototype.ss,Ga.prototype.setParentKeyForNodeData=Ga.prototype.qe,Ga.prototype.getParentKeyForNodeData=Ga.prototype.mh,Ga.className="TreeModel",yu.TreeModel=Ga;function Qo(a){Zo.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Su,this.Ti=0,this.Zv=new ft,this.Jp=this.me=0,this.Xr=new Lg,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=Su,this.K=Wa,this.nd=ep,this.hd=oy,this.tf=6,this.Nn=_0,a&&Object.assign(this,a)}Je(Qo,Zo),Qo.prototype.cloneProtected=function(a){Zo.prototype.cloneProtected.call(this,a),a.eo=this.eo,a.Cm=this.Cm,a.ro=this.ro,a.ul=this.ul,a.Rb=this.Rb,a.K=this.K,a.nd=this.nd,a.hd=this.hd,a.tf=this.tf,a.Nn=this.Nn},Qo.prototype.qb=function(a){a.classType===Qo?a===x0||a===w0||a===y0||a===S0||a===ep?this.sorting=a:a===wd||a===$f||a===Wa||a===jc?this.direction=a:a===oc||a===Bc||a===Su||a===xu?this.arrangement=a:(a===ef||a===_0)&&(this.nodeDiameterFormula=a):Zo.prototype.qb.call(this,a)},Qo.prototype.createNetwork=function(){return new tp(this)},Qo.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin),a=this.network.vertexes,1>=a.count)a.count===1&&(a=a.first(),a.centerX=0,a.centerY=0);else{var y=new Ln;y.addAll(a.iterator),a=new Ln;var x=new Ln,b=this.sort(y),E,te,ne=this.Jp,se=this.arrangement,he=this.nodeDiameterFormula,_e=this.radius;(!isFinite(_e)||0>=_e)&&(_e=NaN);var Ee=this.aspectRatio;(!isFinite(Ee)||0>=Ee)&&(Ee=1);var Ne=this.startAngle;isFinite(Ne)||(Ne=0);var He=this.sweepAngle;if((!isFinite(He)||360<He||1>He)&&(He=360),y=this.spacing,isFinite(y)||(y=NaN),se===xu&&he===ef?se=Su:se===xu&&he!==ef&&(se=this.arrangement),(this.direction===wd||this.direction===$f)&&this.sorting!==ep){for(he=0;!(he>=b.length)&&(a.add(b.M(he)),!(he+1>=b.length));he+=2)x.add(b.M(he+1));this.direction===wd?(this.arrangement===xu&&a.reverse(),b=new Ln,b.addAll(a),b.addAll(x)):(this.arrangement===xu&&x.reverse(),b=new Ln,b.addAll(x),b.addAll(a))}he=b.length;for(var Ye=te=E=0;Ye<b.length;Ye++){var Qe=Ne+He*te*(this.direction===Wa?1:-1)/he,st=b.M(Ye).diameter;isNaN(st)&&(st=zc(b.M(Ye),Qe)),360>He&&(Ye===0||Ye===b.length-1)&&(st/=2),E+=st,te++}if(isNaN(_e)||se===xu){if(isNaN(y)&&(y=6),se!==Su&&se!==xu){for(te=-1/0,ne=0;ne<he;ne++)Ye=b.M(ne),E=b.M(ne===he-1?0:ne+1),isNaN(Ye.diameter)&&zc(Ye,0),isNaN(E.diameter)&&zc(E,0),te=Math.max(te,(Ye.diameter+E.diameter)/2);ne=te+y,se===oc?_e=(te+y)/(2*Math.PI/he):_e=m0(this,ne*(360<=He?he:he-1),Ee,Ne*Math.PI/180,He*Math.PI/180)}else _e=m0(this,E+(360<=He?he:he-1)*(se!==xu?y:1.6*y),Ee,Ne*Math.PI/180,He*Math.PI/180);te=_e*Ee}else if(te=_e*Ee,Ye=py(this,_e,te,Ne*Math.PI/180,He*Math.PI/180),isNaN(y))(se===Su||se===xu)&&(y=(Ye-E)/(360<=He?he:he-1));else if(se===Su||se===xu)Ye=(Ye-E)/(360<=He?he:he-1),Ye<y?(_e=m0(this,E+y*(360<=He?he:he-1),Ee,Ne*Math.PI/180,He*Math.PI/180),te=_e*Ee):y=Ye;else{for(ne=-1/0,E=0;E<he;E++)Qe=b.M(E),st=b.M(E===he-1?0:E+1),isNaN(Qe.diameter)&&zc(Qe,0),isNaN(st.diameter)&&zc(st,0),ne=Math.max(ne,(Qe.diameter+st.diameter)/2);ne+=y,E=m0(this,ne*(360<=He?he:he-1),Ee,Ne*Math.PI/180,He*Math.PI/180),E>_e?(_e=E,te=_e*Ee):ne=Ye/(360<=He?he:he-1)}if(this.kw=se,this.lc=_e,this.Zm=Ee,this.lw=Ne,this.Wp=He,this.Ti=y,this.me=te,this.Jp=ne,y=b,b=this.kw,se=this.lc,_e=this.lw,Ee=this.Wp,Ne=this.Ti,He=this.me,he=this.Jp,this.direction!==wd&&this.direction!==$f||b!==xu)if(this.direction===wd||this.direction===$f){switch(ne=0,b){case Bc:ne=180*v0(this,se,He,_e,he)/Math.PI;break;case Su:he=y=0,ne=a.first(),ne!==null&&(y=zc(ne,Math.PI/2)),ne=x.first(),ne!==null&&(he=zc(ne,Math.PI/2)),ne=180*v0(this,se,He,_e,Ne+(y+he)/2)/Math.PI;break;case oc:ne=Ee/y.length}if(this.direction===wd){switch(b){case Bc:Eg(this,a,_e,jc);break;case Su:Cg(this,a,_e,jc);break;case oc:Pg(this,a,Ee/2,_e,jc)}switch(b){case Bc:Eg(this,x,_e+ne,Wa);break;case Su:Cg(this,x,_e+ne,Wa);break;case oc:Pg(this,x,Ee/2,_e+ne,Wa)}}else{switch(b){case Bc:Eg(this,x,_e,jc);break;case Su:Cg(this,x,_e,jc);break;case oc:Pg(this,x,Ee/2,_e,jc)}switch(b){case Bc:Eg(this,a,_e+ne,Wa);break;case Su:Cg(this,a,_e+ne,Wa);break;case oc:Pg(this,a,Ee/2,_e+ne,Wa)}}}else switch(b){case Bc:Eg(this,y,_e,this.direction);break;case Su:Cg(this,y,_e,this.direction);break;case oc:Pg(this,y,Ee,_e,this.direction);break;case xu:DS(this,y,Ee,_e,this.direction)}else DS(this,y,Ee,_e-Ee/2,Wa)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Pg(a,y,x,b,E){var te=a.Wp,ne=a.lc;a=a.me,b=b*Math.PI/180,x=x*Math.PI/180;for(var se=y.length,he=0;he<se;he++){var _e=b+(E===Wa?he*x/(360<=te?se:se-1):-(he*x)/se),Ee=y.M(he),Ne=ne*Math.tan(_e)/a;Ne=Math.sqrt((ne*ne+a*a*Ne*Ne)/(1+Ne*Ne)),Ee.centerX=Ne*Math.cos(_e),Ee.centerY=Ne*Math.sin(_e),Ee.actualAngle=180*_e/Math.PI}}function Cg(a,y,x,b){var E=a.lc,te=a.me,ne=a.Ti;x=x*Math.PI/180;for(var se=y.length,he=0;he<se;he++){var _e=y.M(he),Ee=y.M(he===se-1?0:he+1),Ne=te*Math.sin(x);_e.centerX=E*Math.cos(x),_e.centerY=Ne,_e.actualAngle=180*x/Math.PI,isNaN(_e.diameter)&&zc(_e,0),isNaN(Ee.diameter)&&zc(Ee,0),_e=v0(a,E,te,b===Wa?x:-x,(_e.diameter+Ee.diameter)/2+ne),x+=b===Wa?_e:-_e}}function Eg(a,y,x,b){var E=a.lc,te=a.me,ne=a.Jp;x=x*Math.PI/180;for(var se=y.length,he=0;he<se;he++){var _e=y.M(he);_e.centerX=E*Math.cos(x),_e.centerY=te*Math.sin(x),_e.actualAngle=180*x/Math.PI,_e=v0(a,E,te,b===Wa?x:-x,ne),x+=b===Wa?_e:-_e}}function DS(a,y,x,b,E){var te=a.Wp;if(a.mj=0,a.Xr=new Lg,360>x){for(te=b+(E===Wa?te:-te);0>te;)te+=360;te%=360,180<te&&(te-=360),te*=Math.PI/180,a.gt=te,IS(a,y,x,b,E)}else OS(a,y,x,b,E);a.Xr.commit(y)}function OS(a,y,x,b,E){var te=a.lc,ne=a.Ti,se=a.Zm,he=te*Math.cos(b*Math.PI/180),_e=a.me*Math.sin(b*Math.PI/180),Ee=y.Fa();if(Ee.length===3)Ee[0].centerX=te,Ee[0].centerY=0,Ee[1].centerX=Ee[0].centerX-Ee[0].width/2-Ee[1].width/2-ne,Ee[1].y=Ee[0].y,Ee[2].centerX=(Ee[0].centerX+Ee[1].centerX)/2,Ee[2].y=Ee[0].y-Ee[2].height-ne;else if(Ee.length===4)Ee[0].centerX=te,Ee[0].centerY=0,Ee[2].centerX=-Ee[0].centerX,Ee[2].centerY=Ee[0].centerY,Ee[1].centerX=0,Ee[1].y=Math.min(Ee[0].y,Ee[2].y)-Ee[1].height-ne,Ee[3].centerX=0,Ee[3].y=Math.max(Ee[0].y+Ee[0].height+ne,Ee[2].y+Ee[2].height+ne);else{te=ft.alloc();for(var Ne=0;Ne<Ee.length&&(Ee[Ne].centerX=he,Ee[Ne].centerY=_e,!(Ne>=Ee.length-1));Ne++)RS(a,he,_e,Ee,Ne,E,te)||FS(a,he,_e,Ee,Ne,E,te),he=te.x,_e=te.y;if(ft.free(te),a.mj++,!(23<a.mj)){he=Ee[0].centerX,_e=Ee[0].centerY,te=Ee[Ee.length-1].centerX,Ne=Ee[Ee.length-1].centerY;var He=Math.abs(he-te)-((Ee[0].width+Ee[Ee.length-1].width)/2+ne),Ye=Math.abs(_e-Ne)-((Ee[0].height+Ee[Ee.length-1].height)/2+ne);ne=0,1>Math.abs(Ye)?Math.abs(he-te)<(Ee[0].width+Ee[Ee.length-1].width)/2&&(ne=0):ne=0<Ye?Ye:1>Math.abs(He)?0:He,he=Math.abs(te)>Math.abs(Ne)?0<te!=_e>Ne:0<Ne!=he<te,(he=E===Wa?he:!he)&&(ne=-Math.abs(ne),ne=Math.min(ne,-Ee[Ee.length-1].width),ne=Math.min(ne,-Ee[Ee.length-1].height)),a.Xr.compare(ne,Ee),1<Math.abs(ne)&&(a.lc=8>a.mj?a.lc-ne/(2*Math.PI):5>Ee.length&&10<ne?a.lc/2:a.lc-(0<ne?1.7:-2.3),a.me=a.lc*se,OS(a,y,x,b,E))}}}function IS(a,y,x,b,E){for(var te=a.lc,ne=a.me,se=a.Zm,he=te*Math.cos(b*Math.PI/180),_e=ne*Math.sin(b*Math.PI/180),Ee=ft.alloc(),Ne=y.Fa(),He=0;He<Ne.length&&(Ne[He].centerX=he,Ne[He].centerY=_e,!(He>=Ne.length-1));He++)RS(a,he,_e,Ne,He,E,Ee)||FS(a,he,_e,Ne,He,E,Ee),he=Ee.x,_e=Ee.y;if(ft.free(Ee),a.mj++,!(23<a.mj)){if(he=Math.atan2(_e,he),he=E===Wa?a.gt-he:he-a.gt,he=Math.abs(he)<Math.abs(he-2*Math.PI)?he:he-2*Math.PI,te=he*(te+ne)/2,ne=a.Xr,Math.abs(te)<Math.abs(ne.Pl))for(ne.Pl=te,ne.mk=[],ne.tm=[],he=0;he<Ne.length;he++)ne.mk[he]=Ne[he].bounds.x,ne.tm[he]=Ne[he].bounds.y;1<Math.abs(te)&&(a.lc=8>a.mj?a.lc-te/(2*Math.PI):a.lc-(0<te?1.7:-2.3),a.me=a.lc*se,IS(a,y,x,b,E))}}function RS(a,y,x,b,E,te,ne){var se=a.lc,he=a.me,_e=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var Ee=!1;if(0<=x!=(te===Wa)){if(te=y+a,te>se){if(te=y-a,te<-se)return ne.x=te,ne.y=_e,!1;Ee=!0}}else if(te=y-a,te<-se){if(te=y+a,te>se)return ne.x=te,ne.y=_e,!1;Ee=!0}return _e=Math.sqrt(1-Math.min(1,te*te/(se*se)))*he,0>x!==Ee&&(_e=-_e),Math.abs(x-_e)>(b[E].height+b[E+1].height)/2?(ne.x=te,ne.y=_e,!1):(ne.x=te,ne.y=_e,!0)}function FS(a,y,x,b,E,te,ne){var se=a.lc,he=a.me,_e=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(te===Wa)){if(te=x-a,te<-he){if(te=x+a,te>he){ne.x=_e,ne.y=te;return}b=!0}}else if(te=x+a,te>he){if(te=x-a,te<-he){ne.x=_e,ne.y=te;return}b=!0}_e=Math.sqrt(1-Math.min(1,te*te/(he*he)))*se,0>y!==b&&(_e=-_e),ne.x=_e,ne.y=te}Qo.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},Qo.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 ft(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;E.x+=x.x,E.y+=x.y,E.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))},Qo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function py(a,y,x,b,E){var te=a.ty;if(.001>Math.abs(a.Zm-1))return b!==void 0&&E!==void 0?E*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var ne=0,se=b!==void 0&&E!==void 0?E/(te+1):Math.PI/(2*(te+1)),he=0,_e=0;_e<=te;_e++){b!==void 0&&E!==void 0?he=b+_e*E/te:he=_e*Math.PI/(2*te);var Ee=Math.sin(he);ne+=Math.sqrt(1-a*a*Ee*Ee)*se}return b!==void 0&&E!==void 0?(y>x?y:x)*ne:4*(y>x?y:x)*ne}function m0(a,y,x,b,E){return y/(b!==void 0&&E!==void 0?py(a,1,x,b,E):py(a,1,x))}function v0(a,y,x,b,E){if(.001>Math.abs(a.Zm-1))return E/y;var te=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,ne=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(b+=Math.PI/2);for(var se=0;;se++){var he=Math.sin(b+se*a);if(ne+=(y>x?y:x)*Math.sqrt(1-te*te*he*he)*a,ne>=E)return se*a}}Qo.prototype.sort=function(a){switch(this.sorting){case y0:break;case S0:a.reverse();break;case x0:a.sort(this.comparer);break;case w0:a.sort(this.comparer),a.reverse();break;case ep:return this.ak(Ox(a));default:Lt("Invalid sorting type.")}return a};function Ox(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new Ln;for(var b=0;b<a.length;b++){var E=-1,te=-1;if(b===0)for(var ne=0;ne<a.length;ne++){var se=a.M(ne).edgesCount;se>E&&(E=se,te=ne)}else for(ne=0;ne<a.length;ne++)se=y[ne],se>E&&(E=se,te=ne);for(x.add(a.M(te)),y[te]=-1,te=a.M(te),ne=te.sourceEdges;ne.next();)E=a.indexOf(ne.value.fromVertex),0>E||0<=y[E]&&y[E]++;for(te=te.destinationEdges;te.next();)E=a.indexOf(te.value.toVertex),0>E||0<=y[E]&&y[E]++}return x}Qo.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var b=a.M(x);y[x]=[];for(var E,te=b.destinationEdges;te.next();)E=a.indexOf(te.value.toVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E);for(b=b.sourceEdges;b.next();)E=a.indexOf(b.value.fromVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E)}for(te=[],x=0;x<y.length;x++)te[x]=0;x=[];var ne=[],se=[];b=[],E=new Ln;for(var he=0,_e=0;_e<y.length;_e++){var Ee=y[_e].length;if(Ee===1)b.push(_e);else if(Ee===0)E.add(a.M(_e));else{if(he===0)x.push(_e);else{for(var Ne=Ee=1/0,He=-1,Ye=[],Qe=0;Qe<x.length;Qe++)0>y[x[Qe]].indexOf(x[Qe===x.length-1?0:Qe+1])&&Ye.push(Qe===x.length-1?0:Qe+1);if(Ye.length===0)for(Qe=0;Qe<x.length;Qe++)Ye.push(Qe);for(Qe=0;Qe<Ye.length;Qe++){for(var st=Ye[Qe],Pt=y[_e],St=0,Tt=0;Tt<ne.length;Tt++){var At=te[ne[Tt]],It=te[se[Tt]];if(At<It){var Wt=At;At=It}else Wt=It;if(Wt<st&&st<=At)for(It=0;It<Pt.length;It++){var tn=Pt[It];0>x.indexOf(tn)||Wt<te[tn]&&te[tn]<At||Wt===te[tn]||At===te[tn]||St++}else for(It=0;It<Pt.length;It++)tn=Pt[It],0>x.indexOf(tn)||Wt<te[tn]&&te[tn]<At&&Wt!==te[tn]&&At!==te[tn]&&St++}for(Pt=St,Tt=St=0;Tt<y[_e].length;Tt++)Wt=x.indexOf(y[_e][Tt]),0<=Wt&&(Wt=Math.abs(st-(Wt>=st?Wt+1:Wt)),St+=Wt<x.length+1-Wt?Wt:x.length+1-Wt);for(Tt=0;Tt<ne.length;Tt++)Wt=te[ne[Tt]],At=te[se[Tt]],Wt>=st&&Wt++,At>=st&&At++,Wt>At&&(It=At,At=Wt,Wt=It),At-Wt<(x.length+2)/2==(Wt<st&&st<=At)&&St++;(Pt<Ee||Pt===Ee&&St<Ne)&&(Ee=Pt,Ne=St,He=st)}for(x.splice(He,0,_e),Ee=0;Ee<x.length;Ee++)te[x[Ee]]=Ee;for(Ee=0;Ee<y[_e].length;Ee++)Ne=y[_e][Ee],0<=x.indexOf(Ne)&&(ne.push(_e),se.push(Ne))}he++}}for(ne=x.length;;){for(te=!0,se=0;se<b.length;se++)if(he=b[se],_e=y[he][0],Ee=x.indexOf(_e),0<=Ee){for(He=Ne=0;He<y[_e].length;He++)Ye=x.indexOf(y[_e][He]),0>Ye||Ye===Ee||(Qe=Ye>Ee?Ye-Ee:Ee-Ye,Ne+=Ye<Ee!=Qe>ne-Qe?1:-1);x.splice(0>Ne?Ee:Ee+1,0,he),b.splice(se,1),se--}else te=!1;if(te)break;x.push(b[0]),b.splice(0,1)}for(y=0;y<x.length;y++)E.add(a.M(x[y]));return E},ot.Object.defineProperties(Qo.prototype,{radius:{get:function(){return this.eo},set:function(a){this.eo!==a&&(0<a||isNaN(a))&&(this.eo=a,this.C())}},aspectRatio:{get:function(){return this.Cm},set:function(a){this.Cm!==a&&0<a&&(this.Cm=a,this.C())}},startAngle:{get:function(){return this.ro},set:function(a){this.ro!==a&&(this.ro=a,this.C())}},sweepAngle:{get:function(){return this.ul},set:function(a){this.ul!==a&&(0<a&&360>=a?this.ul=a:this.ul=360,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==xu&&a!==Su&&a!==Bc&&a!==oc||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Wa&&a!==jc&&a!==wd&&a!==$f||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==y0&&a!==S0&&a!==x0&&!w0&&a!==ep||(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!==_0&&a!==ef||(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 Su=new nn(Qo,"ConstantSpacing",0),Bc=new nn(Qo,"ConstantDistance",1),oc=new nn(Qo,"ConstantAngle",2),xu=new nn(Qo,"Packed",3),Wa=new nn(Qo,"Clockwise",4),jc=new nn(Qo,"Counterclockwise",5),wd=new nn(Qo,"BidirectionalLeft",6),$f=new nn(Qo,"BidirectionalRight",7),y0=new nn(Qo,"Forwards",8),S0=new nn(Qo,"Reverse",9),x0=new nn(Qo,"Ascending",10),w0=new nn(Qo,"Descending",11),ep=new nn(Qo,"Optimized",12),_0=new nn(Qo,"Pythagorean",13),ef=new nn(Qo,"Circular",14);Qo.className="CircularLayout",Qo.ConstantSpacing=Su,Qo.ConstantDistance=Bc,Qo.ConstantAngle=oc,Qo.Packed=xu,Qo.Clockwise=Wa,Qo.Counterclockwise=jc,Qo.BidirectionalLeft=wd,Qo.BidirectionalRight=$f,Qo.Forwards=y0,Qo.Reverse=S0,Qo.Ascending=x0,Qo.Descending=w0,Qo.Optimized=ep,Qo.Pythagorean=_0,Qo.Circular=ef;function Lg(){this.Pl=-1/0,this.tm=this.mk=null}Lg.prototype.compare=function(a,y){if(0<a&&0>this.Pl||Math.abs(a)<Math.abs(this.Pl)&&!(0>a&&0<this.Pl))for(this.Pl=a,this.mk=[],this.tm=[],a=0;a<y.length;a++)this.mk[a]=y[a].bounds.x,this.tm[a]=y[a].bounds.y},Lg.prototype.commit=function(a){if(this.mk!==null&&this.tm!==null)for(var y=0;y<this.mk.length;y++){var x=a.M(y);x.x=this.mk[y],x.y=this.tm[y]}},Lg.className="VertexArrangement";function tp(a){Mo.call(this,a)}Je(tp,Mo),tp.prototype.createVertex=function(){return new Mg(this)},tp.prototype.createEdge=function(){return new b0(this)},tp.className="CircularNetwork";function Mg(a){Ts.call(this,a),this.u=this.Si=NaN}Je(Mg,Ts);function zc(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===xu)if(x.nodeDiameterFormula===ef)a.Si=Math.max(a.width,a.height);else{if(x=Math.abs(Math.sin(y)),y=Math.abs(Math.cos(y)),x===0)return a.width;if(y===0)return a.height;a.Si=Math.min(a.height/x,a.width/y)}else a.Si=x.nodeDiameterFormula===ef?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}ot.Object.defineProperties(Mg.prototype,{diameter:{get:function(){return this.Si},set:function(a){this.Si!==a&&(this.Si=a)}},actualAngle:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}}}),Mg.className="CircularVertex";function b0(a){yl.call(this,a)}Je(b0,yl),b0.className="CircularEdge";function fa(a){Zo.call(this),this.ah=null,this.An=0,this.$d=new wn(100,100).freeze(),this.Bm=!1,this.sf=!0,this.td=!1,this.dl=100,this.$m=1,this.Zf=1e3,this.In=10,this.fo=Math,this.Hk=.05,this.Gk=50,this.Ek=150,this.Fk=0,this.Vm=10,this.Um=5,a&&Object.assign(this,a)}Je(fa,Zo),fa.prototype.cloneProtected=function(a){Zo.prototype.cloneProtected.call(this,a),a.$d.assign(this.$d),a.Bm=this.Bm,a.sf=this.sf,a.td=this.td,a.dl=this.dl,a.$m=this.$m,a.Zf=this.Zf,a.In=this.In,a.fo=this.fo,a.Hk=this.Hk,a.Gk=this.Gk,a.Ek=this.Ek,a.Fk=this.Fk,a.Vm=this.Vm,a.Um=this.Um},fa.prototype.createNetwork=function(){return new tf(this)},fa.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),a=this.maxIterations,0<this.network.vertexes.count){this.network.Ko();for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;x.charge=this.electricalCharge(x),x.mass=this.gravitationalMass(x)}for(y=this.network.edges.iterator;y.next();)x=y.value,x.stiffness=this.springStiffness(x),x.length=this.springLength(x);if(this.Cu(),this.An=0,this.needsClusterLayout()){y=this.network,x=y.Zx();for(var b=x.iterator;b.next();){this.network=b.value;for(var E=this.network.vertexes.iterator;E.next();){var te=E.value;te.Vd=te.vertexes.count,te.sh=1,te.Hj=null,te.We=null}BS(this,0,a)}this.network=y;var ne=b=x.iterator;b=this.arrangementSpacing;var se=ne.count,he=!0;te=E=0;for(var _e=Wn(),Ee=0;Ee<se+y.vertexes.count+2;Ee++)_e[Ee]=null;se=0,ne.reset();for(var Ne=sn.alloc();ne.next();)if(Ee=ne.value,this.computeBounds(Ee,Ne),he)he=!1,E=Ne.x+Ne.width/2,te=Ne.y+Ne.height/2,_e[0]=new ft(Ne.x+Ne.width+b.width,Ne.y),_e[1]=new ft(Ne.x,Ne.y+Ne.height+b.height),se=2;else{var He=jS(_e,se,E,te,Ne.width,Ne.height,b),Ye=_e[He],Qe=new ft(Ye.x+Ne.width+b.width,Ye.y),st=new ft(Ye.x,Ye.y+Ne.height+b.height);for(He+1<se&&_e.splice(He+1,0,null),_e[He]=Qe,_e[He+1]=st,se++,He=Ye.x-Ne.x,Ye=Ye.y-Ne.y,Ee=Ee.vertexes.iterator;Ee.next();)Qe=Ee.value,Qe.centerX+=He,Qe.centerY+=Ye}for(sn.free(Ne),Ee=y.vertexes.iterator;Ee.next();)ne=Ee.value,He=ne.bounds,2>se?(E=He.x+He.width/2,te=He.y+He.height/2,_e[0]=new ft(He.x+He.width+b.width,He.y),_e[1]=new ft(He.x,He.y+He.height+b.height),se=2):(he=jS(_e,se,E,te,He.width,He.height,b),Ne=_e[he],Ye=new ft(Ne.x+He.width+b.width,Ne.y),He=new ft(Ne.x,Ne.y+He.height+b.height),he+1<se&&_e.splice(he+1,0,null),_e[he]=Ye,_e[he+1]=He,se++,ne.centerX=Ne.x+ne.width/2,ne.centerY=Ne.y+ne.height/2);for(zn(_e),b=x.iterator;b.next();){for(x=b.value,E=x.vertexes.iterator;E.next();)y.dh(E.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}US(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},fa.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,b=this.network.vertexes.iterator;b.next();){if(b.value.bounds.Yc(x)&&(a++,2<a))return!0;if(10<y)break;y++}return!1},fa.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var b=a.value;x?(x=!1,y.set(b.bounds)):y.ed(b.bounds)}return y};function BS(a,y,x){if(Ix(a,y)){var b=a.Zf;a.Zf*=1+1/(y+1);var E=Rx(a,y),te=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=te,BS(a,y+1,x),US(a,te),Fx(a,E),y=E.vertexes.Fa(),y.sort(function(ne,se){return ne===null||se===null||ne===se?0:se.Vd-ne.Vd}),x=0;x<y.length;x++)Bx(a,y[x]);a.Zf=b}}function Ix(a,y){if(10<y||3>a.network.vertexes.count)return!1;for(a.ah=a.network.vertexes.Fa(),a=a.ah,a.sort(function(x,b){return x===null||b===null||x===b?0:b.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function Rx(a,y){for(var x=a.network,b=new tf(a),E=0;E<a.ah.length;E++){var te=a.ah[E];if(1<te.Vd){b.dh(te);var ne=new HS;ne.Rs=te.Vd,ne.Ss=te.width,ne.Qs=te.height,ne.Sv=te.focus.x,ne.Tv=te.focus.y,te.We===null&&(te.We=new Ln),te.We.add(ne),te.sv=te.We.count-1}else break}for(te=x.edges.iterator;te.next();){var se=te.value;E=se.fromVertex,ne=se.toVertex,E.network===b&&ne.network===b?b.Bo(se):E.network===b?(se=E.Hj,se===null&&(se=new Ln,E.Hj=se),se.add(ne),E.Vd--,E.sh+=ne.sh):ne.network===b&&(se=ne.Hj,se===null&&(se=new Ln,ne.Hj=se),se.add(E),ne.Vd--,ne.sh+=E.sh)}for(E=b.edges.iterator;E.next();)te=E.value,te.length*=Math.max(1,Vt.sqrt((te.fromVertex.sh+te.toVertex.sh)/(4*y+1)));for(y=b.vertexes.iterator;y.next();){E=y.value;var he=E.Hj;if(he!==null&&0<he.count&&(ne=E.We.M(E.We.count-1).Rs-E.Vd,!(0>=ne))){for(var _e=se=0,Ee=he.count-ne;Ee<he.count;Ee++){var Ne=he.M(Ee),He=null;for(te=Ne.edges.iterator;te.next();){var Ye=te.value;if(Ye.Ax(Ne)===E){He=Ye;break}}He!==null&&(_e+=He.length,se+=Ne.width*Ne.height)}te=E.centerX,he=E.centerY,Ee=E.width,Ne=E.height,He=E.focus,Ye=Ee*Ne,1>Ye&&(Ye=1),se=Vt.sqrt((se+Ye+_e*_e*4/(ne*ne))/Ye),ne=(se-1)*Ee/2,se=(se-1)*Ne/2,E.bounds=new sn(te-He.x-ne,he-He.y-se,Ee+2*ne,Ne+2*se),E.focus=new ft(He.x+ne,He.y+se)}}return a.network=b,x}function Fx(a,y){for(var x=a.network.vertexes.iterator;x.next();){var b=x.value;if(b.network=y,b.We!==null){var E=b.We.M(b.sv);b.Vd=E.Rs;var te=E.Sv,ne=E.Tv;b.bounds=new sn(b.centerX-te,b.centerY-ne,E.Ss,E.Qs),b.focus=new ft(te,ne),b.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Bx(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var b=y.centerX,E=y.centerY,te=y.width,ne=y.height;y.We!==null&&0<y.We.count&&(ne=y.We.M(0),te=ne.Ss,ne=ne.Qs),te=Vt.sqrt(te*te+ne*ne)/2;for(var se=!1,he=ne=0,_e=0,Ee=y.vertexes.iterator;Ee.next();){var Ne=Ee.value;1>=Ne.Vd?he++:(se=!0,_e++,ne+=Math.atan2(y.centerY-Ne.centerY,y.centerX-Ne.centerX))}if(he!==0){for(0<_e&&(ne/=_e),_e=y=0,y=se?2*Math.PI/(he+1):2*Math.PI/he,he%2===0&&(_e=y/2),1<x.count&&x.sort(function(Ye,Qe){return Ye===null||Qe===null||Ye===Qe?0:Qe.width*Qe.height-Ye.width*Ye.height}),se=he%2===0?0:1,x=x.iterator;x.next();)if(he=x.value,!(1<he.Vd||a.isFixed(he))){for(Ee=null,Ne=he.edges.iterator;Ne.next();){Ee=Ne.value;break}Ne=he.width;var He=he.height;Ne=Vt.sqrt(Ne*Ne+He*He)/2,Ee=te+Ee.length+Ne,Ne=ne+(y*(se/2>>1)+_e)*(se%2===0?1:-1),he.centerX=b+Ee*Math.cos(Ne),he.centerY=E+Ee*Math.sin(Ne),se++}}}}function jS(a,y,x,b,E,te,ne){var se=9e19,he=-1,_e=0;e:for(;_e<y;_e++){var Ee=a[_e],Ne=Ee.x-x,He=Ee.y-b;if(Ne=Ne*Ne+He*He,Ne<se){for(He=_e-1;0<=He;He--)if(a[He].y>Ee.y&&a[He].x-Ee.x<E+ne.width)continue e;for(He=_e+1;He<y;He++)if(a[He].x>Ee.x&&a[He].y-Ee.y<te+ne.height)continue e;he=_e,se=Ne}}return he}fa.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},fa.prototype.addComments=function(a){var y=a.node;if(y!==null)for(y=y.Mu();y.next();){var x=y.value;if(x.category==="Comment"&&x.isVisible()){var b=this.network.ki(x);b===null&&(b=this.network.Bl(x)),b.charge=this.defaultCommentElectricalCharge,x=null;for(var E=b.destinationEdges;E.next();){var te=E.value;if(te.toVertex===a){x=te;break}}if(x===null){for(E=b.sourceEdges;E.next();)if(te=E.value,te.fromVertex===a){x=te;break}}x===null&&(x=this.network.Zj(a,b,null)),x.length=this.defaultCommentSpringLength}}};function zS(a,y){var x=a.bounds,b=x.x;a=x.y;var E=x.width;x=x.height;var te=y.bounds,ne=te.x;y=te.y;var se=te.width;return te=te.height,b+E<ne?a>y+te?(x=b+E-ne,a=a-y-te,Vt.sqrt(x*x+a*a)):a+x<y?(b=b+E-ne,a=a+x-y,Vt.sqrt(b*b+a*a)):ne-(b+E):b>ne+se?a>y+te?(x=b-ne-se,a=a-y-te,Vt.sqrt(x*x+a*a)):a+x<y?(b=b-ne-se,a=a+x-y,Vt.sqrt(b*b+a*a)):b-(ne+se):a>y+te?a-(y+te):a+x<y?y-(a+x):.1}function US(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,jx(a)););a.ah=null}function jx(a){a.ah===null&&(a.ah=a.network.vertexes.Fa());var y=a.ah;if(0>=y.length)return!1;var x=y[0];x.forceX=0,x.forceY=0;for(var b=x.centerX,E=b,te=x=x.centerY,ne=1;ne<y.length;ne++){var se=y[ne];se.forceX=0,se.forceY=0;var he=se.centerX;se=se.centerY,b=Math.min(b,he),E=Math.max(E,he),x=Math.min(x,se),te=Math.max(te,se)}(E=E-b>te-x)?y.sort(function(st,Pt){return st===null||Pt===null||st===Pt?0:st.centerX-Pt.centerX}):y.sort(function(st,Pt){return st===null||Pt===null||st===Pt?0:st.centerY-Pt.centerY}),x=a.Zf;var _e=b=se=0;for(te=0;te<y.length;te++){ne=y[te],b=ne.bounds,se=ne.focus,he=b.x+se.x;var Ee=b.y+se.y;b=ne.charge*a.electricalFieldX(he,Ee),_e=ne.charge*a.electricalFieldY(he,Ee),b+=ne.mass*a.gravitationalFieldX(he,Ee),_e+=ne.mass*a.gravitationalFieldY(he,Ee),ne.forceX+=b,ne.forceY+=_e;for(var Ne=te+1;Ne<y.length;Ne++){var He=y[Ne];if(He!==ne){b=He.bounds,se=He.focus,_e=b.x+se.x;var Ye=b.y+se.y;if(he-_e>x||_e-he>x){if(E)break}else if(Ee-Ye>x||Ye-Ee>x){if(!E)break}else{var Qe=zS(ne,He);1>Qe?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new P0),Qe=b.random(),se=b.random(),he>_e?(b=Math.abs(He.bounds.right-ne.bounds.x),b=(1+b)*Qe):he<_e?(b=Math.abs(He.bounds.x-ne.bounds.right),b=-(1+b)*Qe):(b=Math.max(He.width,ne.width),b=(1+b)*Qe-b/2),Ee>Ye?(_e=Math.abs(He.bounds.bottom-ne.bounds.y),_e=(1+_e)*se):he<_e?(_e=Math.abs(He.bounds.y-ne.bounds.bottom),_e=-(1+_e)*se):(_e=Math.max(He.height,ne.height),_e=(1+_e)*se-_e/2)):(se=-(ne.charge*He.charge)/(Qe*Qe),b=(_e-he)/Qe*se,_e=(Ye-Ee)/Qe*se),ne.forceX+=b,ne.forceY+=_e,He.forceX-=b,He.forceY-=_e}}}}for(E=a.network.edges.iterator;E.next();)se=E.value,x=se.fromVertex,te=se.toVertex,ne=x.bounds,he=x.focus,b=ne.x+he.x,ne=ne.y+he.y,Ee=te.bounds,Ne=te.focus,he=Ee.x+Ne.x,Ee=Ee.y+Ne.y,Ne=zS(x,te),1>Ne?(Ne=a.randomNumberGenerator,Ne===null&&(a.randomNumberGenerator=Ne=new P0),se=Ne.random(),Ne=Ne.random(),b=(b>he?1:-1)*(1+(te.width>x.width?te.width:x.width))*se,_e=(ne>Ee?1:-1)*(1+(te.height>x.height?te.height:x.height))*Ne):(se=se.stiffness*(Ne-se.length),b=(he-b)/Ne*se,_e=(Ee-ne)/Ne*se),x.forceX+=b,x.forceY+=_e,te.forceX-=b,te.forceY-=_e;for(E=b=0;E<y.length;E++)x=y[E],a.isFixed(x)?a.moveFixedVertex(x):b=Math.max(b,a.moveVertex(x)||0);return b>a.epsilonDistance*a.epsilonDistance}fa.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,b=this.moveLimit;return y<-b?y=-b:y>b&&(y=b),x<-b?x=-b:x>b&&(x=b),a.centerX+=y,a.centerY+=x,y*y+x*x},fa.prototype.moveFixedVertex=function(){},fa.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},fa.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=As,y.toSpot=As)}},fa.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=sn.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,sn.free(x)}x=sn.alloc();for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;(a!==0||y!==0)&&(x.assign(E.bounds),x.x+=a,x.y+=y,E.bounds=x),E.commit()}sn.free(x)},fa.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},fa.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},fa.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},fa.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},fa.prototype.electricalFieldX=function(){return 0},fa.prototype.electricalFieldY=function(){return 0},fa.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},fa.prototype.gravitationalFieldX=function(){return 0},fa.prototype.gravitationalFieldY=function(){return 0},fa.prototype.isFixed=function(a){return a.isFixed},ot.Object.defineProperties(fa.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&&0<a&&(this.$m=a,this.C())}},infinityDistance:{get:function(){return this.Zf},set:function(a){this.Zf!==a&&1<a&&(this.Zf=a,this.C())}},moveLimit:{get:function(){return this.In},set:function(a){this.In!==a&&1<a&&(this.In=a,this.C())}},randomNumberGenerator:{get:function(){return this.fo},set:function(a){this.fo!==a&&(a!==null&&typeof a.random!="function"&&Lt('ForceDirectedLayout.randomNumberGenerator must have a "random()" function on it: '+a),this.fo=a)}},defaultSpringStiffness:{get:function(){return this.Hk},set:function(a){this.Hk!==a&&(this.Hk=a,this.C())}},defaultSpringLength:{get:function(){return this.Gk},set:function(a){this.Gk!==a&&(this.Gk=a,this.C())}},defaultElectricalCharge:{get:function(){return this.Ek},set:function(a){this.Ek!==a&&(this.Ek=a,this.C())}},defaultGravitationalMass:{get:function(){return this.Fk},set:function(a){this.Fk!==a&&(this.Fk=a,this.C())}},defaultCommentSpringLength:{get:function(){return this.Vm},set:function(a){this.Vm!==a&&(this.Vm=a,this.C())}},defaultCommentElectricalCharge:{get:function(){return this.Um},set:function(a){this.Um!==a&&(this.Um=a,this.C())}}}),fa.className="ForceDirectedLayout";function HS(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}HS.className="ForceDirectedSubnet";function tf(a){Mo.call(this,a)}Je(tf,Mo),tf.prototype.createVertex=function(){return new kg(this)},tf.prototype.createEdge=function(){return new Tg(this)},tf.className="ForceDirectedNetwork";function kg(a){Ts.call(this,a),this.ia=!1,this.Ha=this.u=NaN,this.sh=this.Vd=this.V=this.F=0,this.We=this.Hj=null,this.sv=0}Je(kg,Ts),ot.Object.defineProperties(kg.prototype,{isFixed:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},charge:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},mass:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},forceX:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}},forceY:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}}}),kg.className="ForceDirectedVertex";function Tg(a){yl.call(this,a),this.j=this.o=NaN}Je(Tg,yl),ot.Object.defineProperties(Tg.prototype,{stiffness:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},length:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}}}),Tg.className="ForceDirectedEdge";function P0(){var a=0;a===void 0&&(a=42),this.seed=a,this.ay=48271,this.ey=2147483647,this.Q=44488.07041494893,this.gy=3399,this.by=1/2147483647,this.random()}P0.prototype.random=function(){var a=this.seed%this.Q*this.ay-this.seed/this.Q*this.gy;return 0<a?this.seed=a:this.seed=a+this.ey,this.seed*this.by},P0.className="RandomNumberGenerator";function ro(a){Zo.call(this),this.kc=this.ie=25,this.K=0,this.Dk=k0,this.Zk=T0,this.Qk=A0,this.bj=4,this.rk=N0,this.bg=15,this.sf=!0,this.Cn=4,this.Ra=this.Iq=this.Ia=-1,this.Md=this.Hn=0,this.Ta=this.Kd=this.Ld=this.he=this.tc=null,this.Kn=0,this.Jn=this.kj=null,this.le=0,this.fl=null,this.Rf=new ft,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Je(ro,Zo),ro.prototype.cloneProtected=function(a){Zo.prototype.cloneProtected.call(this,a),a.ie=this.ie,a.kc=this.kc,a.K=this.K,a.Dk=this.Dk,a.Zk=this.Zk,a.Qk=this.Qk,a.bj=this.bj,a.rk=this.rk,a.bg=this.bg,a.sf=this.sf,a.Cn=this.Cn,a.ve=this.ve},ro.prototype.qb=function(a){a.classType===ro?a.name.indexOf("Aggressive")===0?this.aggressiveOption=a:a.name.indexOf("Cycle")===0?this.cycleRemoveOption=a:a.name.indexOf("Init")===0?this.initializeOption=a:a.name.indexOf("Layer")===0?this.layeringOption=a:Lt("Unknown enum value: "+a):Zo.prototype.qb.call(this,a)},ro.prototype.createNetwork=function(){return new ip(this)},ro.prototype.doLayout=function(a){for(this.network===null&&(this.network=this.makeNetwork(a)),this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin),this.Iq=-1,this.Md=this.Hn=0,this.fl=this.Jn=this.kj=null,a=0;a<this.He.length;a++)this.He[a]=null;if(0<this.network.vertexes.count){for(this.network.Ko(),this.cycleRemoveOption!==Ng&&this.removeCycles(),a=this.network.vertexes.iterator;a.next();)a.value.layer=-1;for(this.Ia=-1,this.assignLayers(),a.reset();a.next();)this.Ia=Math.max(this.Ia,a.value.layer);this.cycleRemoveOption===Ng&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var b=x.value;b.valid=!1,y.push(b)}for(x=0;x<y.length;x++){b=y[x];var E=b.fromVertex,te=b.toVertex;if(!(b.valid||(E.node===null&&E.data===null||te.node===null&&te.data===null)&&E.layer===te.layer)){var ne=0,se=0,he=0,_e=0;if(b.link!==null){if(se=b.link,se===null)continue;var Ee=E.node;if(ne=te.node,Ee===null||ne===null)continue;var Ne=se.fromNode;he=se.toNode;for(var He=se.fromPort;He!==null&&!He.Ed();)He=He.panel;for(se=se.toPort;se!==null&&!se.Ed();)se=se.panel;if(b.rev){_e=Ne;var Ye=He;Ne=he,He=se,he=_e,se=Ye}var Qe=E.focus;_e=te.focus;var st=b.rev?te.bounds:E.bounds;Ye=ft.alloc(),Ee!==Ne?st.w()&&Ne.isVisible()?Ne.actualBounds.w()?(ec(Ne,He,$i,Ye),Ye.x+=Ne.actualBounds.x-st.x,Ye.y+=Ne.actualBounds.y-st.y):(ec(Ne,He,$i,Ye),Ye.w()||Ye.assign(Qe)):Ye.assign(Qe):st.w()?(ec(Ne,He,$i,Ye),Ye.w()||Ye.assign(Qe)):Ye.assign(Qe),Ne=b.rev?E.bounds:te.bounds,Ee=ft.alloc(),ne!==he?Ne.w()&&he.isVisible()?he.actualBounds.w()?(ec(he,se,$i,Ee),Ee.x+=he.actualBounds.x-Ne.x,Ee.y+=he.actualBounds.y-Ne.y):(ec(he,se,$i,Ee),Ee.w()||Ee.assign(_e)):Ee.assign(_e):Ne.w()?(ec(he,se,$i,Ee),Ee.w()||Ee.assign(_e)):Ee.assign(_e),this.K===90||this.K===270?(ne=Math.round((Ye.x-Qe.x)/this.kc),he=Ye.x,se=Math.round((Ee.x-_e.x)/this.kc),_e=Ee.x):(ne=Math.round((Ye.y-Qe.y)/this.kc),he=Ye.y,se=Math.round((Ee.y-_e.y)/this.kc),_e=Ee.y),ft.free(Ye),ft.free(Ee),b.portFromColOffset=ne,b.portFromPos=he,b.portToColOffset=se,b.portToPos=_e}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;if(Ye=E.layer,Ee=te.layer,Ne=0,st=b.link,st!==null){var Pt=st.fromPort,St=st.toPort;if(Pt!==null&&St!==null){var Tt=st.fromNode;if(He=st.toNode,Tt!==null&&He!==null){var At=M0(this,!0),It=M0(this,!1),Wt=this.setsPortSpots?At:st.computeSpot(!0,Pt);Qe=this.setsPortSpots?It:st.computeSpot(!1,St);var tn=st.isOrthogonal;Wt.$c()&&Wt.Hf(It)&&Qe.$c()&&Qe.Hf(At)?Ne=0:(At=st.getLinkPoint(Tt,Pt,Wt,!0,tn,He,St,ft.alloc()),It=st.getLinkDirection(Tt,Pt,At,Wt,!0,tn,He,St),ft.free(At),Wt.ys()||It!==qS(this,b,!0)?this.setsPortSpots&&Tt!==null&&Tt.ports.count===1&&b.rev&&(Ne+=1):Ne+=1,Wt=st.getLinkPoint(He,St,Qe,!1,tn,Tt,Pt,ft.alloc()),st=st.getLinkDirection(He,St,Wt,Qe,!1,tn,Tt,Pt),ft.free(Wt),Qe.ys()||st!==qS(this,b,!1)?this.setsPortSpots&&He!==null&&He.ports.count===1&&b.rev&&(Ne+=2):Ne+=2)}}}if(He=Ne,Ne=He===1||He===3,(He=He===2||He===3)&&(Qe=a.createVertex(),Qe.node=null,Qe.Dj=1,Qe.layer=Ye,Qe.near=E,a.dh(Qe),E=a.Zj(E,Qe,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=ne,E.portToColOffset=0,E.portFromPos=he,E.portToPos=0,E=Qe),st=1,Ne&&st--,Ye-Ee>st&&0<Ye){for(b.valid=!1,Qe=a.createVertex(),Qe.node=null,Qe.Dj=2,Qe.layer=Ye-1,a.dh(Qe),E=a.Zj(E,Qe,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=He?0:ne,E.portToColOffset=0,E.portFromPos=He?0:he,E.portToPos=0,E=Qe,Ye--;Ye-Ee>st&&0<Ye;)Qe=a.createVertex(),Qe.node=null,Qe.Dj=3,Qe.layer=Ye-1,a.dh(Qe),E=a.Zj(E,Qe,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=Qe,Ye--;E=a.Zj(Qe,te,b.link),E.valid=!Ne,Ne&&(Qe.near=te),E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=se,E.portFromPos=0,E.portToPos=_e}else b.valid=!0}}for(a=this.tc=[],y=0;y<=this.Ia;y++)a[y]=0;for(y=this.network.vertexes.iterator;y.next();)y.value.index=-1;for(this.initializeIndices(),this.Iq=-1,x=this.Md=this.Hn=0;x<=this.Ia;x++)a[x]>a[this.Md]&&(this.Iq=a[x]-1,this.Md=x),a[x]<a[this.Hn]&&(this.Hn=x);for(this.fl=[],x=0;x<a.length;x++)this.fl[x]=[];for(y.reset();y.next();)a=y.value,this.fl[a.layer][a.index]=a;for(this.Ra=-1,a=0;a<=this.Ia;a++){for(y=Uc(this,a),x=0,b=this.tc[a],te=0;te<b;te++)E=y[te],x+=this.nodeMinColumnSpace(E,!0),E.column=x,x+=1,x+=this.nodeMinColumnSpace(E,!1);this.Ra=Math.max(this.Ra,x-1),Hc(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},ro.prototype.linkMinLength=function(){return 1};function gy(a){var y=a.fromVertex.node||a.fromVertex.data;return a=a.toVertex.node||a.toVertex.data,y===null&&a===null?8:y===null||a===null?4:1}ro.prototype.nodeMinLayerSpace=function(a,y){return a.node===null&&a.data===null?0:this.K===90||this.K===270?y?a.focus.y+10:a.bounds.height-a.focus.y+10:y?a.focus.x+10:a.bounds.width-a.focus.x+10},ro.prototype.nodeMinColumnSpace=function(a,y){if(a.node===null&&a.data===null)return 0;var x=y?a.ev:a.dv;return x!==null?x:(x=this.K,x===90||x===270?y?a.ev=a.focus.x/this.kc+1|0:a.dv=(a.bounds.width-a.focus.x)/this.kc+1|0:y?a.ev=a.focus.y/this.kc+1|0:a.dv=(a.bounds.height-a.focus.y)/this.kc+1|0)};function tl(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var b=x.value;a.kj[y]=b.layer,y++,a.kj[y]=b.column,y++,a.kj[y]=b.index,y++}return a.kj}function Wl(a,y){var x=0;for(a=a.network.vertexes.iterator;a.next();){var b=a.value;b.layer=y[x],x++,b.column=y[x],x++,b.index=y[x],x++}}function GS(a,y,x){var b=Uc(a,y),E=a.tc[y];(a.Jn===null||a.Jn.length<E*E)&&(a.Jn=[]);for(var te=a.Jn,ne=0;ne<E;ne++){var se=0,he=b[ne],_e=he.near;if(_e!==null&&_e.layer===he.layer)if(he=_e.index,he>ne)for(var Ee=ne+1;Ee<he;Ee++){var Ne=b[Ee];Ne.near===_e&&Ne.Dj===_e.Dj||se++}else for(Ee=ne-1;Ee>he;Ee--)Ne=b[Ee],Ne.near===_e&&Ne.Dj===_e.Dj||se++;var He;if(0<=x)for(he=b[ne].sourceEdgesArrayAccess,_e=0;_e<he.length;_e++){var Ye=he[_e];if(Ye.valid&&Ye.fromVertex.layer!==y)for(Ne=Ye.fromVertex.index,Ee=Ye.portToPos,Ye=Ye.portFromPos,He=_e+1;He<he.length;He++){var Qe=he[He];if(Qe.valid&&Qe.fromVertex.layer!==y){var st=Qe.fromVertex.index,Pt=Qe.portToPos;Qe=Qe.portFromPos,Ee<Pt&&(Ne>st||Ne===st&&Ye>Qe)&&se++,Pt<Ee&&(st>Ne||st===Ne&&Qe>Ye)&&se++}}}if(0>=x){for(he=b[ne].destinationEdgesArrayAccess,_e=0;_e<he.length;_e++)if(Ye=he[_e],Ye.valid&&Ye.toVertex.layer!==y)for(Ne=Ye.toVertex.index,Ee=Ye.portToPos,Ye=Ye.portFromPos,He=_e+1;He<he.length;He++)Qe=he[He],Qe.valid&&Qe.toVertex.layer!==y&&(st=Qe.toVertex.index,Pt=Qe.portToPos,Qe=Qe.portFromPos,Ye<Qe&&(Ne>st||Ne===st&&Ee>Pt)&&se++,Qe<Ye&&(st>Ne||st===Ne&&Pt>Ee)&&se++)}for(te[ne*E+ne]=se,he=ne+1;he<E;he++){var St=0,Tt=0;if(0<=x){se=b[ne].sourceEdgesArrayAccess;var At=b[he].sourceEdgesArrayAccess;for(_e=0;_e<se.length;_e++)if(Ye=se[_e],Ye.valid&&Ye.fromVertex.layer!==y)for(Ne=Ye.fromVertex.index,Ye=Ye.portFromPos,He=0;He<At.length;He++)Qe=At[He],Qe.valid&&Qe.fromVertex.layer!==y&&(st=Qe.fromVertex.index,Qe=Qe.portFromPos,(Ne<st||Ne===st&&Ye<Qe)&&Tt++,(st<Ne||st===Ne&&Qe<Ye)&&St++)}if(0>=x){for(se=b[ne].destinationEdgesArrayAccess,At=b[he].destinationEdgesArrayAccess,_e=0;_e<se.length;_e++)if(Ye=se[_e],Ye.valid&&Ye.toVertex.layer!==y)for(Ne=Ye.toVertex.index,Ee=Ye.portToPos,He=0;He<At.length;He++)Qe=At[He],Qe.valid&&Qe.toVertex.layer!==y&&(st=Qe.toVertex.index,Pt=Qe.portToPos,(Ne<st||Ne===st&&Ee<Pt)&&Tt++,(st<Ne||st===Ne&&Pt<Ee)&&St++)}te[ne*E+he]=St,te[he*E+ne]=Tt}}return Hc(a,y,b),te}ro.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=GS(this,y,1),b=this.tc[y],E=0;E<b;E++)for(var te=E;te<b;te++)a+=x[E*b+te];return a};function C0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,te=Uc(b,E),ne=b.tc[E],se=0,he=0;he<ne;he++){var _e=te[he].destinationEdgesArrayAccess;if(_e!==null)for(var Ee=0;Ee<_e.length;Ee++){var Ne=_e[Ee];if(Ne.valid&&Ne.toVertex.layer!==E){var He=Ne.fromVertex.column+Ne.portFromColOffset,Ye=Ne.toVertex.column+Ne.portToColOffset;se+=(Math.abs(He-Ye)+1)*gy(Ne)}}}Hc(b,E,te),y+=se}return y}ro.prototype.normalize=function(){var a=1/0;this.Ra=-1;for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;a=Math.min(a,x.column-this.nodeMinColumnSpace(x,!0)),this.Ra=Math.max(this.Ra,x.column+this.nodeMinColumnSpace(x,!1))}for(y.reset();y.next();)y.value.column-=a;this.Ra-=a};function my(a,y,x){for(var b=Uc(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var se=b[ne],he=null;0>=x&&(he=se.sourceEdgesArrayAccess);var _e=null;0<=x&&(_e=se.destinationEdgesArrayAccess);var Ee=0,Ne=0,He=se.near;if(He!==null&&He.layer===se.layer&&(Ee+=He.column-1,Ne++),he!==null)for(He=0;He<he.length;He++){se=he[He];var Ye=se.fromVertex;se.valid&&!se.rev&&Ye.layer!==y&&(Ee+=Ye.column,Ne++)}if(_e!==null)for(he=0;he<_e.length;he++)se=_e[he],He=se.toVertex,se.valid&&!se.rev&&He.layer!==y&&(Ee+=He.column,Ne++);te[ne]=Ne===0?-1:Ee/Ne}return Hc(a,y,b),te}function WS(a,y,x){for(var b=Uc(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var se=b[ne],he=null;0>=x&&(he=se.sourceEdgesArrayAccess);var _e=null;0<=x&&(_e=se.destinationEdgesArrayAccess);var Ee=0,Ne=[],He=se.near;if(He!==null&&He.layer===se.layer&&(Ne[Ee]=He.column-1,Ee++),se=void 0,he!==null)for(He=0;He<he.length;He++){se=he[He];var Ye=se.fromVertex;se.valid&&!se.rev&&Ye.layer!==y&&(Ne[Ee]=Ye.column+se.portFromColOffset,Ee++)}if(_e!==null)for(he=0;he<_e.length;he++)se=_e[he],He=se.toVertex,se.valid&&!se.rev&&He.layer!==y&&(Ne[Ee]=He.column+se.portToColOffset,Ee++);Ee===0?te[ne]=-1:(Ne.sort(function(Qe,st){return Qe-st}),_e=Ee>>1,te[ne]=Ee&1?Ne[_e]:Ne[_e-1]+Ne[_e]>>1)}return Hc(a,y,b),te}function Ag(a,y,x,b,E,te){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();){var se=ne.value,he=se.toVertex,_e=y.layer-he.layer;se=a.linkMinLength(se),_e===se&&Ag(a,he,x,b,E,te)}if(te)for(ne=y.sourceEdges;ne.next();)se=ne.value,he=se.fromVertex,_e=he.layer-y.layer,se=a.linkMinLength(se),_e===se&&Ag(a,he,x,b,E,te)}}function vy(a,y,x,b,E,te){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();)vy(a,ne.value.toVertex,x,b,E,te);if(te)for(y=y.sourceEdges;y.next();)vy(a,y.value.fromVertex,x,b,E,te)}}ro.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case xy:a=this.network;var y=0,x=a.vertexes.count-1,b=[];b.length=x+1;for(var E=a.vertexes.iterator;E.next();)E.value.valid=!0;for(;zx(a)!==null;){for(E=ZS(a);E!==null;)b[x]=E,x--,E.valid=!1,E=ZS(a);for(E=VS(a);E!==null;)b[y]=E,y++,E.valid=!1,E=VS(a);E=null;for(var te=0,ne=this.network.vertexes.iterator;ne.next();){var se=ne.value;if(se.valid){for(var he=0,_e=se.destinationEdges;_e.next();)_e.value.toVertex.valid&&he++;_e=0;for(var Ee=se.sourceEdges;Ee.next();)Ee.value.fromVertex.valid&&_e++;(E===null||te<he-_e)&&(E=se,te=he-_e)}}E!==null&&(b[y]=E,y++,E.valid=!1)}for(y=0;y<a.vertexes.count;y++)b[y].index=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case k0:for(b=this.network.vertexes.iterator;b.next();)a=b.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,b.reset();b.next();)y=b.value,y.sourceEdges.count===0&&yy(this,y);for(b.reset();b.next();)y=b.value,y.Ll===-1&&yy(this,y);for(a.reset();a.next();)b=a.value,b.forest||(y=b.fromVertex,x=y.finish,E=b.toVertex,te=E.finish,E.Ll<y.Ll&&x<te&&(this.network.gm(b),b.rev=!0));break;case Ng:for(a=this.network,y=a.vertexes.iterator,b=1/0;y.next();)b=Math.min(b,y.value.layer);if(1/0>b){if(0>b)for(y.reset();y.next();)y.value.layer-=b;for(b=[],y.reset();y.next();)x=y.value,E=b[x.layer],E===void 0?b[x.layer]=[x]:E.push(x);for(x=y=0;x<b.length;x++)if(E=b[x],!E||E.length===0)y++;else if(0<x)for(te=0;te<E.length;te++)E[te].layer-=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function zx(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function ZS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.destinationEdges;b.next();)if(b.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function VS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.sourceEdges;b.next();)if(b.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function yy(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var b=x.value,E=b.toVertex;E.Ll===-1&&(b.forest=!0,yy(a,E))}y.finish=a.Kn,a.Kn++}ro.prototype.assignLayers=function(){switch(this.Zk){case wy:KS(this);break;case _y:for(var a,y=this.network.vertexes.iterator;y.next();)a=XS(this,y.value),this.Ia=Math.max(a,this.Ia);for(y.reset();y.next();)a=y.value,a.layer=this.Ia-a.layer;break;default:case T0:for(KS(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&JS(this,a);for(a=1/0,y.reset();y.next();)a=Math.min(a,y.value.layer);for(this.Ia=-1,y.reset();y.next();){var x=y.value;x.layer-=a,this.Ia=Math.max(this.Ia,x.layer)}}};function KS(a){for(var y=a.network.vertexes.iterator;y.next();){var x=YS(a,y.value);a.Ia=Math.max(x,a.Ia)}}function YS(a,y){var x=0;if(y.layer===-1){for(var b=y.destinationEdges;b.next();){var E=b.value,te=E.toVertex;E=a.linkMinLength(E),x=Math.max(x,YS(a,te)+E)}y.layer=x}else x=y.layer;return x}function XS(a,y){var x=0;if(y.layer===-1){for(var b=y.sourceEdges;b.next();){var E=b.value,te=E.fromVertex;E=a.linkMinLength(E),x=Math.max(x,XS(a,te)+E)}y.layer=x}else x=y.layer;return x}function JS(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)JS(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var b=y.sourceEdgesArrayAccess,E=b.length,te=0;te<E;te++){var ne=b[te],se=ne.fromVertex,he=ne.toVertex;ne=a.linkMinLength(ne),se.layer-he.layer>ne&&Ag(a,se,0,-1,!0,!1)}for(Ag(a,y,1,-1,!0,!0);y.component!==0;){for(te=0,b=1/0,se=0,he=null,ne=a.network.vertexes.iterator;ne.next();){var _e=ne.value;if(_e.component===1){var Ee=0,Ne=!1,He=_e.sourceEdgesArrayAccess;E=He.length;for(var Ye=0;Ye<E;Ye++){var Qe=He[Ye],st=Qe.fromVertex;Ee+=1,st.component!==1&&(te+=1,st=st.layer-_e.layer,Qe=a.linkMinLength(Qe),b=Math.min(b,st-Qe))}for(He=_e.destinationEdgesArrayAccess,E=He.length,Ye=0;Ye<E;Ye++)Qe=He[Ye].toVertex,--Ee,Qe.component!==1?--te:Ne=!0;(he===null||Ee<se)&&!Ne&&(he=_e,se=Ee)}}if(0<te){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer+=b);y.component=0}else he.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(Ag(a,y,1,-1,!0,!1);y.component!==0;){for(b=0,E=1/0,te=0,se=null,he=a.network.vertexes.iterator;he.next();)if(ne=he.value,ne.component===1){for(_e=0,Ee=!1,He=ne.sourceEdgesArrayAccess,Ne=He.length,Ye=0;Ye<Ne;Ye++)Qe=He[Ye].fromVertex,_e+=1,Qe.component!==1?b+=1:Ee=!0;for(He=ne.destinationEdgesArrayAccess,Ne=He.length,Ye=0;Ye<Ne;Ye++)Qe=He[Ye],st=Qe.toVertex,--_e,st.component!==1&&(--b,st=ne.layer-st.layer,Qe=a.linkMinLength(Qe),E=Math.min(E,st-Qe));(se===null||_e>te)&&!Ee&&(se=ne,te=_e)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else se.component=0}}}function qS(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}ro.prototype.initializeIndices=function(){switch(this.Qk){default:case Py: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 A0: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&&QS(this,x);break;case by: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&&$S(this,x)}};function QS(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 b=0;b<y.length-1;b++){var E=y[b],te=y[b+1];E.portFromColOffset>te.portFromColOffset&&(x=!0,y[b]=te,y[b+1]=E)}}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.toVertex,b.index===-1&&QS(a,b))}function $S(a,y){var x=y.layer;y.index=a.tc[x],a.tc[x]++,y=y.sourceEdgesArrayAccess;for(var b=!0;b;)for(b=!1,x=0;x<y.length-1;x++){var E=y[x],te=y[x+1];E.portToColOffset>te.portToColOffset&&(b=!0,y[x]=te,y[x+1]=E)}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.fromVertex,b.index===-1&&$S(a,b))}ro.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=tl(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)E0(this,b,1),iu(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=tl(this)),b=this.Ia;0<=b;b--)E0(this,b,-1),iu(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=tl(this))}for(Wl(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)E0(this,b,0),iu(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=tl(this)),b=this.Ia;0<=b;b--)E0(this,b,0),iu(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=tl(this))}Wl(this,y);var te,ne,se;switch(this.rk){case Cy:break;case Ey:for(se=a+1;(b=this.countCrossings())<se;)for(se=b,x=this.Ia;0<=x;x--)for(ne=0;ne<=x;ne++){for(te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=iu(this,b,-1)||te;for(E=this.countCrossings(),E>=a?Wl(this,y):(a=E,y=tl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=iu(this,b,1)||te;for(E=this.countCrossings(),E>=a?Wl(this,y):(a=E,y=tl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=iu(this,b,1)||te;for(E>=a?Wl(this,y):(a=E,y=tl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=iu(this,b,-1)||te;for(E>=a?Wl(this,y):(a=E,y=tl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=iu(this,b,0)||te;for(E>=a?Wl(this,y):(a=E,y=tl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=iu(this,b,0)||te;E>=a?Wl(this,y):(a=E,y=tl(this))}break;default:case N0:for(x=this.Ia,ne=0,se=a+1;(b=this.countCrossings())<se;){for(se=b,te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=iu(this,b,-1)||te;for(E=this.countCrossings(),E>=a?Wl(this,y):(a=E,y=tl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=iu(this,b,1)||te;for(E=this.countCrossings(),E>=a?Wl(this,y):(a=E,y=tl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=iu(this,b,1)||te;for(E>=a?Wl(this,y):(a=E,y=tl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=iu(this,b,-1)||te;for(E>=a?Wl(this,y):(a=E,y=tl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=iu(this,b,0)||te;for(E>=a?Wl(this,y):(a=E,y=tl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=iu(this,b,0)||te;E>=a?Wl(this,y):(a=E,y=tl(this))}}Wl(this,y)};function E0(a,y,x){var b=Uc(a,y),E=a.tc[y],te=WS(a,y,x),ne=my(a,y,x);for(x=0;x<E;x++)ne[x]===-1&&(ne[x]=b[x].column),te[x]===-1&&(te[x]=b[x].column);for(var se=!0,he;se;)for(se=!1,x=0;x<E-1;x++)(te[x+1]<te[x]||te[x+1]===te[x]&&ne[x+1]<ne[x])&&(se=!0,he=te[x],te[x]=te[x+1],te[x+1]=he,he=ne[x],ne[x]=ne[x+1],ne[x+1]=he,he=b[x],b[x]=b[x+1],b[x+1]=he);for(x=te=0;x<E;x++)he=b[x],he.index=x,te+=a.nodeMinColumnSpace(he,!0),he.column=te,te+=1,te+=a.nodeMinColumnSpace(he,!1);Hc(a,y,b)}function iu(a,y,x){var b=Uc(a,y),E=a.tc[y];x=GS(a,y,x);var te,ne=[];for(te=0;te<E;te++)ne[te]=-1;var se=[];for(te=0;te<E;te++)se[te]=-1;for(var he=!1,_e=!0;_e;)for(_e=!1,te=0;te<E-1;te++){var Ee=x[b[te].index*E+b[te+1].index],Ne=x[b[te+1].index*E+b[te].index],He=0,Ye=0,Qe=b[te].column,st=b[te+1].column,Pt=a.nodeMinColumnSpace(b[te],!0),St=a.nodeMinColumnSpace(b[te],!1),Tt=a.nodeMinColumnSpace(b[te+1],!0),At=a.nodeMinColumnSpace(b[te+1],!1);Pt=Qe-Pt+Tt,St=st-St+At;var It=b[te].sourceEdges.iterator;for(It.reset();It.next();)if(Tt=It.value,At=Tt.fromVertex,Tt.valid&&At.layer===y){for(Tt=0;b[Tt]!==At;)Tt++;Tt<te&&(He+=2*(te-Tt),Ye+=2*(te+1-Tt)),Tt===te+1&&(He+=1),Tt>te+1&&(He+=4*(Tt-te),Ye+=4*(Tt-(te+1)))}for(It=b[te].destinationEdges.iterator,It.reset();It.next();)if(Tt=It.value,At=Tt.toVertex,Tt.valid&&At.layer===y){for(Tt=0;b[Tt]!==At;)Tt++;Tt===te+1&&(Ye+=1)}for(It=b[te+1].sourceEdges.iterator,It.reset();It.next();)if(Tt=It.value,At=Tt.fromVertex,Tt.valid&&At.layer===y){for(Tt=0;b[Tt]!==At;)Tt++;Tt<te&&(He+=2*(te+1-Tt),Ye+=2*(te-Tt)),Tt===te&&(Ye+=1),Tt>te+1&&(He+=4*(Tt-(te+1)),Ye+=4*(Tt-te))}for(It=b[te+1].destinationEdges.iterator,It.reset();It.next();)if(Tt=It.value,At=Tt.toVertex,Tt.valid&&At.layer===y){for(Tt=0;b[Tt]!==At;)Tt++;Tt===te&&(He+=1)}Tt=At=0,It=ne[b[te].index];var Wt=se[b[te].index],tn=ne[b[te+1].index],Kn=se[b[te+1].index];It!==-1&&(At+=Math.abs(It-Qe),Tt+=Math.abs(It-St)),Wt!==-1&&(At+=Math.abs(Wt-Qe),Tt+=Math.abs(Wt-St)),tn!==-1&&(At+=Math.abs(tn-st),Tt+=Math.abs(tn-Pt)),Kn!==-1&&(At+=Math.abs(Kn-st),Tt+=Math.abs(Kn-Pt)),(Ye<He-.5||Ye===He&&Ne<Ee-.5||Ye===He&&Ne===Ee&&Tt<At-.5)&&(_e=he=!0,b[te].column=St,b[te+1].column=Pt,Ee=b[te],b[te]=b[te+1],b[te+1]=Ee)}for(te=0;te<E;te++)b[te].index=te;return Hc(a,y,b),he}ro.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&Yx)!==0;if(1e3<this.network.edges.count&&y&&(a=!1),a){var x=[];for(y=0;y<=this.Ia;y++)x[y]=0;for(var b,E=this.network.vertexes.iterator;E.next();){var te=E.value;y=te.layer,b=te.column,te=this.nodeMinColumnSpace(te,!1),x[y]=Math.max(x[y],b+te)}for(E.reset();E.next();)te=E.value,y=te.layer,b=te.column,te.column=(8*(this.Ra-x[y])>>1)+8*b;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=np(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=np(this,y,-1)||x;x=np(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)Sy(this,y,1);for(y=this.Md-1;0<=y;y--)Sy(this,y,-1);Sy(this,this.Md,0)}if(a&&(ex(this,-1),ex(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=np(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=np(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=np(this,y,0)||x}}else Wx(this)};function np(a,y,x){for(var b=!1;Ux(a,y,x);)b=!0;return b}function Ux(a,y,x){var b,E=Uc(a,y),te=a.tc[y],ne=my(a,y,-1);if(0<x)for(b=0;b<te;b++)ne[b]=-1;var se=my(a,y,1);if(0>x)for(b=0;b<te;b++)se[b]=-1;for(var he=!1,_e=!0;_e;)for(_e=!1,b=0;b<te;b++){var Ee=E[b].column,Ne=a.nodeMinColumnSpace(E[b],!0),He=a.nodeMinColumnSpace(E[b],!1),Ye=0;0>b-1||Ee-E[b-1].column-1>Ne+a.nodeMinColumnSpace(E[b-1],!1)?Ye=Ee-1:Ye=Ee,Ne=b+1>=te||E[b+1].column-Ee-1>He+a.nodeMinColumnSpace(E[b+1],!0)?Ee+1:Ee;var Qe=He=0,st=0;if(0>=x)for(var Pt=E[b].sourceEdges.iterator;Pt.next();){var St=Pt.value,Tt=St.fromVertex;if(St.valid&&Tt.layer!==y){var At=gy(St),It=St.portFromColOffset;St=St.portToColOffset,Tt=Tt.column,He+=(Math.abs(Ee+St-(Tt+It))+1)*At,Qe+=(Math.abs(Ye+St-(Tt+It))+1)*At,st+=(Math.abs(Ne+St-(Tt+It))+1)*At}}if(0<=x)for(Pt=E[b].destinationEdges.iterator;Pt.next();)St=Pt.value,Tt=St.toVertex,St.valid&&Tt.layer!==y&&(At=gy(St),It=St.portFromColOffset,St=St.portToColOffset,Tt=Tt.column,He+=(Math.abs(Ee+It-(Tt+St))+1)*At,Qe+=(Math.abs(Ye+It-(Tt+St))+1)*At,st+=(Math.abs(Ne+It-(Tt+St))+1)*At);St=It=At=0,Pt=ne[E[b].index],Tt=se[E[b].index],Pt!==-1&&(At+=Math.abs(Pt-Ee),It+=Math.abs(Pt-Ye),St+=Math.abs(Pt-Ne)),Tt!==-1&&(At+=Math.abs(Tt-Ee),It+=Math.abs(Tt-Ye),St+=Math.abs(Tt-Ne)),Qe<He||Qe===He&&It<At?(_e=he=!0,E[b].column=Ye):(st<He||st===He&&St<At)&&(_e=he=!0,E[b].column=Ne)}return Hc(a,y,E),a.normalize(),he}function Sy(a,y,x){var b=Uc(a,y),E=a.tc[y],te=WS(a,y,x),ne=[];for(x=0;x<E;x++)ne[x]=te[x];for(te=!0;te;)for(te=!1,x=0;x<E;x++){var se=b[x].column,he=a.nodeMinColumnSpace(b[x],!0),_e=a.nodeMinColumnSpace(b[x],!1),Ee=0;if(ne[x]===-1)if(x===0&&x===E-1)Ee=se;else if(x===0){var Ne=b[x+1].column;Ne-se===_e+a.nodeMinColumnSpace(b[x+1],!0)?Ee=se-1:Ee=se}else x===E-1?(Ne=b[x-1].column,Ee=se-Ne===he+a.nodeMinColumnSpace(b[x-1],!1)?se+1:se):(Ne=b[x-1].column,he=Ne+a.nodeMinColumnSpace(b[x-1],!1)+he+1,Ne=b[x+1].column,_e=Ne-a.nodeMinColumnSpace(b[x+1],!0)-_e-1,Ee=(he+_e)/2|0);else x===0&&x===E-1?Ee=ne[x]:x===0?(Ne=b[x+1].column,_e=Ne-a.nodeMinColumnSpace(b[x+1],!0)-_e-1,Ee=Math.min(ne[x],_e)):x===E-1?(Ne=b[x-1].column,he=Ne+a.nodeMinColumnSpace(b[x-1],!1)+he+1,Ee=Math.max(ne[x],he)):(Ne=b[x-1].column,he=Ne+a.nodeMinColumnSpace(b[x-1],!1)+he+1,Ne=b[x+1].column,_e=Ne-a.nodeMinColumnSpace(b[x+1],!0)-_e-1,he<ne[x]&&ne[x]<_e?Ee=ne[x]:he>=ne[x]?Ee=he:_e<=ne[x]&&(Ee=_e));Ee!==se&&(te=!0,b[x].column=Ee)}Hc(a,y,b),a.normalize()}function Hx(a,y){for(var x=!0,b=a.network.vertexes.iterator;b.next();){var E=b.value,te=a.nodeMinColumnSpace(E,!0),ne=a.nodeMinColumnSpace(E,!1);if(E.column-te<=y&&E.column+ne>=y){x=!1;break}}if(a=!1,x)for(b.reset();b.next();)x=b.value,x.column>y&&(--x.column,a=!0);return a}function Gx(a,y){var x=y+1,b,E=[],te=[];for(b=0;b<=a.Ia;b++)E[b]=!1,te[b]=!1;for(var ne=a.network.vertexes.iterator;ne.next();){b=ne.value;var se=b.column-a.nodeMinColumnSpace(b,!0),he=b.column+a.nodeMinColumnSpace(b,!1);se<=y&&he>=y&&(E[b.layer]=!0),se<=x&&he>=x&&(te[b.layer]=!0)}for(se=!0,x=!1,b=0;b<=a.Ia;b++)se=se&&!(E[b]&&te[b]);if(se)for(ne.reset();ne.next();)a=ne.value,a.column>y&&(--a.column,x=!0);return x}function ex(a,y){for(var x=0;x<=a.Ra;x++)for(;Hx(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Gx(a,x););a.normalize();var b;if(0<y)for(x=0;x<=a.Ra;x++){var E=tl(a),te=C0(a);for(b=te+1;te<b;){b=te,tx(a,x,1);var ne=C0(a);ne>te?Wl(a,E):ne<te&&(te=ne,E=tl(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=tl(a),te=C0(a),b=te+1;te<b;)b=te,tx(a,x,-1),ne=C0(a),ne>te?Wl(a,E):ne<te&&(te=ne,E=tl(a));a.normalize()}function tx(a,y,x){a.le=0;for(var b=a.network.vertexes.iterator;b.next();)b.value.component=-1;if(0<x)for(b.reset();b.next();){var E=b.value;E.column-a.nodeMinColumnSpace(E,!0)<=y&&(E.component=a.le)}if(0>x)for(b.reset();b.next();)E=b.value,E.column+a.nodeMinColumnSpace(E,!1)>=y&&(E.component=a.le);for(a.le++,b.reset();b.next();)y=b.value,y.component===-1&&(vy(a,y,a.le,-1,!0,!0),a.le++);var te;for(y=[],te=0;te<a.le*a.le;te++)y[te]=!1;for(E=[],te=0;te<(a.Ia+1)*(a.Ra+1);te++)E[te]=-1;for(b.reset();b.next();){te=b.value;for(var ne=te.layer,se=Math.max(0,te.column-a.nodeMinColumnSpace(te,!0)),he=Math.min(a.Ra,te.column+a.nodeMinColumnSpace(te,!1));se<=he;se++)E[ne*(a.Ra+1)+se]=te.component}for(te=0;te<=a.Ia;te++){if(0<x)for(ne=0;ne<a.Ra;ne++)E[te*(a.Ra+1)+ne]!==-1&&E[te*(a.Ra+1)+ne+1]!==-1&&E[te*(a.Ra+1)+ne]!==E[te*(a.Ra+1)+ne+1]&&(y[E[te*(a.Ra+1)+ne]*a.le+E[te*(a.Ra+1)+ne+1]]=!0);if(0>x)for(ne=a.Ra;0<ne;ne--)E[te*(a.Ra+1)+ne]!==-1&&E[te*(a.Ra+1)+ne-1]!==-1&&E[te*(a.Ra+1)+ne]!==E[te*(a.Ra+1)+ne-1]&&(y[E[te*(a.Ra+1)+ne]*a.le+E[te*(a.Ra+1)+ne-1]]=!0)}for(E=[],te=0;te<a.le;te++)E[te]=!0;for(ne=[],ne.push(0);ne.length!==0;)if(he=ne[ne.length-1],ne.pop(),E[he])for(E[he]=!1,te=0;te<a.le;te++)y[he*a.le+te]&&ne.splice(0,0,te);if(0<x)for(b.reset();b.next();)a=b.value,E[a.component]&&--a.column;if(0>x)for(b.reset();b.next();)x=b.value,E[x.component]&&(x.column+=1)}function Wx(a){for(var y=Wn(),x=a.fl.length,b=0;b<=x;b++)y[b]=[];for(b=a.network.vertexes.iterator;b.next();){var E=b.value;y[x-E.layer][E.index]=E}x=new kn,Zx(y,x);var te=null,ne=null,se=null,he=null,_e=(a.ve&1)!==0,Ee=(a.ve&2)!==0,Ne=(a.ve&4)!==0,He=(a.ve&8)!==0;for(_e&&(a.verticalAlignment(y,x,!0),te=L0(a,y,!0,!1)),y.reverse(),Ne&&(a.verticalAlignment(y,x,!1),se=L0(a,y,!1,!1)),b=ti(y),E=b.next();!E.done;E=b.next())E.value.reverse();He&&(a.verticalAlignment(y,x,!1),he=L0(a,y,!1,!0)),y.reverse(),Ee&&(a.verticalAlignment(y,x,!0),ne=L0(a,y,!0,!0)),zn(y),a.u(te,ne,se,he),a.network.vertexes.each(function(Ye){var Qe=Wn();_e&&Qe.push(te.get(Ye)),Ee&&Qe.push(ne.get(Ye)),Ne&&Qe.push(se.get(Ye)),He&&Qe.push(he.get(Ye)),Qe.sort(function(Pt,St){return Pt-St});var st=Qe.length;st=(Qe[Math.floor((st-1)/2)]+Qe[Math.ceil((st-1)/2)])/2,zn(Qe),Ye.zc=st})}function Zx(a,y){for(var x=a.length,b=1;b<x-1;b++)for(var E=0,te=0,ne=a[b],se=a[b+1],he=0;te<se.length;he++){var _e=se[he];e:{if(_e.node===null){var Ee=Ly(_e);if(0<Ee.length){Ee=Ee[0].node===null;break e}}Ee=!1}var Ne=Ee;if(he===se.length-1||Ne){for(Ee=ne.length-1,Ne&&(Ee=Ly(_e)[0].index);te<=he;){if(_e=se[te],!_e.bo){Ne=[];for(var He=ti(_e.sourceEdgesArrayAccess),Ye=He.next();!Ye.done;Ye=He.next())Ye=Ye.value,Ye.valid&&Ne.push(Ye);_e.bo=Ne}for(_e=ti(_e.bo),Ne=_e.next();!Ne.done;Ne=_e.next())Ne=Ne.value,He=Ne.fromVertex.index,(He<E||He>Ee)&&y.add(Ne);te++}E=Ee}}}ro.prototype.verticalAlignment=function(a,y,x){Vx(a),a=ti(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=ti(b.value);for(var te=b.next();!te.done;te=b.next()){te=te.value;var ne=x?Ly(te):Xx(te),se=ne.length;if(0<se){ne.sort(function(Ne,He){return Ne.vi-He.vi});var he=(se-1)/2;for(se=Math.floor(he),he=Math.ceil(he);se<=he;se++)if(te.align===te){var _e=ne[se],Ee=void 0;Ee=x?D0(_e,te):D0(te,_e),!y.contains(Ee)&&E<_e.vi&&(_e.align=te,te.root=_e.root,te.align=_e.root,E=_e.vi)}}}}};function Vx(a){for(var y=0;y<a.length;y++)for(var x=a[y],b=0;b<x.length;b++){var E=x[b];E.root=E,E.align=E,E.Tz=y,E.vi=b}}function L0(a,y,x,b){for(var E=a.K===90||a.K===270,te=ti(y),ne=te.next();!ne.done;ne=te.next()){var se=ti(ne.value);for(ne=se.next();!ne.done;ne=se.next())ne=ne.value,ne.sd=ne,ne.shift=1/0,ne.zc=NaN,ne.qg=0}for(ne=a.K===90||a.K===270,te=ti(y),se=te.next();!se.done;se=te.next()){se=ti(se.value);for(var he=se.next();!he.done;he=se.next())if(he=he.value,he.root===he){for(var _e=0,Ee=he;Ee.align!==he;){var Ne=Ee.align,He=ne?Ee.width:Ee.height,Ye=ne?Ne.width:Ne.height;if(x){var Qe=D0(Ee,Ne),st=Qe.portFromPos,Pt=Qe.portToPos;Qe.link!==null&&(Ee.node&&Ee.node!==Qe.link.fromNode&&(st=ne?Ee.focusX:Ee.focusY),Ne.node&&Ne.node!==Qe.link.toNode&&(Pt=ne?Ne.focusX:Ne.focusY))}else Qe=D0(Ne,Ee),st=Qe.portToPos,Pt=Qe.portFromPos,Qe.link!==null&&(Ee.node&&Ee.node!==Qe.link.toNode&&(st=ne?Ee.focusX:Ee.focusY),Ne.node&&Ne.node!==Qe.link.fromNode&&(Pt=ne?Ne.focusX:Ne.focusY));He=b?Ee.qg+(He-st)-(Ye-Pt):Ee.qg+st-Pt,Ne.qg=He,_e=Math.min(_e,He),Ee=Ee.align}Ee=he;do Ee.qg=Ee.qg-_e,Ee=Ee.align;while(Ee!==he)}}for(x=ti(y),ne=x.next();!ne.done;ne=x.next())for(te=ti(ne.value),ne=te.next();!ne.done;ne=te.next())ne=ne.value,ne.root===ne&&nx(a,ne,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(ne=y[x][0],ne.sd===ne)){ne.sd.shift===1/0&&(ne.sd.shift=0),ne=x,se=0;do{for(te=y[ne][se];te.align!==te.root;)te=te.align,ne++,0<te.vi&&(se=ix(te,y),se.sd.shift=Math.min(se.sd.shift,te.sd.shift+te.zc+te.qg-(se.zc+se.qg+(E?se.width:se.height)+a.columnSpacing)));se=te.vi+1}while(ne<y.length&&se<y[ne].length&&te.sd===y[ne][se].sd)}for(a=new on,y=ti(y),ne=y.next();!ne.done;ne=y.next())for(x=ti(ne.value),ne=x.next();!ne.done;ne=x.next())ne=ne.value,ne.zc=ne.zc+ne.sd.shift+ne.qg,te=E?ne.width:ne.height,a.add(ne,b?-ne.zc-te:ne.zc);return a}function nx(a,y,x){if(isNaN(y.zc)){y.zc=0;var b=y;do{if(0<b.vi){var E=ix(b,x),te=E.root;nx(a,te,x),y.sd===y&&(y.sd=te.sd);var ne=a.K===90||a.K===270?E.width:E.height;y.sd===te.sd&&(y.zc=Math.max(y.zc,te.zc+E.qg+ne-b.qg+a.columnSpacing))}b=b.align}while(b!==y);for(;b.align!==y;)b=b.align,b.zc=y.zc,b.sd=y.sd}}function ix(a,y){var x=a.Tz;return a=a.vi,1>a&&Lt("Could not determine previous vertex in layer"),y[x][a-1]}ro.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=Wn(),E=Wn(),te=1/0,ne=0;4>ne;ne++)if(y[ne]){var se=Kx(this,y[ne],b,E,ne);se<te&&(x=ne,te=se)}for(te={},ne=0;4>ne;te={delta:te.delta},ne++)y[ne]&&(te.delta=ne===0||ne===2?b[x]-b[ne]:E[x]-E[ne],te.delta!==0&&y[ne].each(function(he){return function(_e){_e.value+=he.delta}}(te)));zn(b),zn(E)};function Kx(a,y,x,b,E){if(!y||y.count===0)return x[E]=0,b[E]=0,1/0;var te=1/0,ne=-1/0;return y.each(function(se){var he=se.key;se=se.value,he=a.K===90||a.K===270?he.width:he.height,se<te&&(te=se),se+he>ne&&(ne=se+he)}),x[E]=te,b[E]=ne,ne-te}ro.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=M0(this,!0),y=M0(this,!1),x=this.network.edges.iterator;x.next();){var b=x.value.link;b!==null&&(b.fromSpot=a,b.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function M0(a,y){return a.K===270?y?ua:$s:a.K===90?y?$s:ua:a.K===180?y?ma:Os:y?Os:ma}ro.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 b=0;b<=this.Ia;b++){var E=x;0>=this.he[b]+this.Ld[b]&&(E=0),0<b&&(y+=E/2),this.K===90||this.K===0?(y+=this.Ld[b],this.Kd[b]=y,y+=this.he[b]):(y+=this.he[b],this.Kd[b]=y,y+=this.Ld[b]),b<this.Ia&&(y+=E/2),this.Ta[b]=y}for(x=y,y=this.arrangementOrigin,b=0;b<=this.Ia;b++)this.K===270?this.Kd[b]=y.y+this.Kd[b]:this.K===90?(this.Kd[b]=y.y+x-this.Kd[b],this.Ta[b]=x-this.Ta[b]):this.K===180?this.Kd[b]=y.x+this.Kd[b]:(this.Kd[b]=y.x+x-this.Kd[b],this.Ta[b]=x-this.Ta[b]);x=this.ve!==0,a.reset(),b=this.K===270||this.K===90;for(var te=1/0,ne=E=1/0,se=-1/0;a.next();){var he=a.value,_e=he.layer,Ee=he.column|0;b?(ne=y.x+this.kc*Ee,_e=this.Kd[_e]):(ne=this.Kd[_e],_e=y.y+this.kc*Ee),he.centerX=ne,he.centerY=_e,x&&isFinite(he.zc)&&(b?he.node?he.x=y.x+he.zc:he.centerX=y.x+he.zc:he.node?he.y=y.y+he.zc:he.centerY=y.y+he.zc),te=Math.min(he.x,te),E=Math.min(he.y,E),b?(ne=te,se=Math.max(se,he.bounds.right)):(ne=E,se=Math.max(se,he.bounds.bottom))}for(this.xw=se-ne,te=y.x-te,y=y.y-E,this.Rf=new ft(x&&b?0:te,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=te,x.y+=y,x.commit()},ro.prototype.Gu=function(){for(var a=0,y=this.ie,x=0;x<=this.Ia;x++)a+=this.he[x],a+=this.Ld[x];a+=this.Ia*y,y=[],x=this.ve!==0?this.xw:this.kc*this.Ra;for(var b=this.maxLayer;0<=b;b--)this.K===270?b===0?y.push(new sn(0,0,x,Math.abs(this.Ta[0]))):y.push(new sn(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new sn(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new sn(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new sn(0,0,Math.abs(this.Ta[0]),x)):y.push(new sn(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new sn(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new sn(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},ro.prototype.commitLayers=function(){},ro.prototype.commitLinks=function(){for(var a=this.network.edges.iterator,y;a.next();)y=a.value.link,y!==null&&(y.uh(),y.Fj(),y.zf());for(a.reset();a.next();)y=a.value.link,y!==null&&y.vg();for(a.reset();a.next();){var x=a.value;if(y=x.link,y!==null){y.uh();var b=y,E=b.fromNode,te=b.toNode,ne=b.fromPort,se=b.toPort;if(E!==null){var he=E.findVisibleNode();he!==null&&he!==E&&(E=he,ne=he.port)}te!==null&&(he=te.findVisibleNode(),he!==null&&he!==te&&(te=he,se=he.port));var _e=y.computeSpot(!0,ne);he=y.computeSpot(!1,se);var Ee=x.fromVertex,Ne=x.toVertex;if(x.valid)y.curve===Al&&y.pointsCount===4&&(Ee.column===Ne.column&&this.alignOption===0?(x=y.getLinkPoint(E,ne,_e,!0,!1,te,se),se=y.getLinkPoint(te,se,he,!1,!1,E,ne),x.w()||x.set(E.actualBounds.center),se.w()||se.set(te.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+se.x)/3,(2*x.y+se.y)/3),y.yf((x.x+2*se.x)/3,(x.y+2*se.y)/3),y.yf(se.x,se.y)):(x=b=!1,ne!==null&&_e===qi&&(b=!0),se!==null&&he===qi&&(x=!0),(b||x)&&(he=null,b&&(he=y.getLinkPointFromPoint(E,ne,ne.ga($i),y.i(3),!0),he.w()||he.set(E.actualBounds.center),y.L(0,he.x,he.y)),E=null,x&&(E=y.getLinkPointFromPoint(te,se,se.ga($i),y.i(0),!1),E.w()||E.set(te.actualBounds.center),y.L(3,E.x,E.y)),he&&(te=y.i(2),y.L(1,(2*he.x+te.x)/3,(2*he.y+te.y)/3)),E&&(te=y.i(1),y.L(2,(2*E.x+te.x)/3,(2*E.y+te.y)/3))))),y.zf();else if(Ee.layer===Ne.layer)y.zf();else{var He=!1,Ye=!1,Qe=this.ie,st=y.firstPickIndex+1;if(y.isOrthogonal){Ye=!0;var Pt=y.pointsCount;4<Pt&&y.points.removeRange(2,Pt-3)}else if(y.curve===Al)He=!0,Pt=y.pointsCount,4<Pt&&y.points.removeRange(2,Pt-3),Pt===4&&(st=2);else{Pt=y.pointsCount;var St=_e===qi,Tt=he===qi;2<Pt&&St&&Tt?y.points.removeRange(1,Pt-2):3<Pt&&St&&!Tt?y.points.removeRange(1,Pt-3):3<Pt&&!St&&Tt?y.points.removeRange(2,Pt-2):4<Pt&&!St&&!Tt&&y.points.removeRange(2,Pt-3)}if(x.rev){for(;Ne!==null&&Ee!==Ne;){var At=Pt=null;for(St=Ne.sourceEdges.iterator;St.next()&&(Tt=St.value,Tt.link!==x.link||(Pt=Tt.fromVertex,At=Tt.toVertex,Pt.node!==null)););if(Pt===null)break;if(Pt!==Ee){St=y.i(st-1).x,Tt=y.i(st-1).y;var It=Pt.centerX,Wt=Pt.centerY;if(Ye)this.K===180||this.K===0?st===y.firstPickIndex+1?(y.m(st++,St,Tt),y.m(st++,St,Wt)):(At!==null?At.centerY:Tt)!==Wt&&(At=this.Ta[Pt.layer-1]+this.Rf.x,y.m(st++,At,Tt),y.m(st++,At,Wt)):st===y.firstPickIndex+1?(y.m(st++,St,Tt),y.m(st++,It,Tt)):(At!==null?At.centerX:St)!==It&&(At=this.Ta[Pt.layer-1]+this.Rf.y,y.m(st++,St,At),y.m(st++,It,At));else if(st===y.firstPickIndex+1){At=Math.max(10,this.he[Ne.layer]);var tn=Math.max(10,this.Ld[Ne.layer]);if(He)this.K===180?It<=Ne.bounds.x?(Ne=Ne.bounds.x,y.m(st++,Ne-At,Wt),y.m(st++,Ne,Wt),y.m(st++,Ne+tn,Wt)):(y.m(st++,It-At,Wt),y.m(st++,It,Wt),y.m(st++,It+tn,Wt)):this.K===90?Wt>=Ne.bounds.bottom?(Ne=Ne.bounds.y+Ne.bounds.height,y.m(st++,It,Ne+tn),y.m(st++,It,Ne),y.m(st++,It,Ne-At)):(y.m(st++,It,Wt+tn),y.m(st++,It,Wt),y.m(st++,It,Wt-At)):this.K===270?Wt<=Ne.bounds.y?(Ne=Ne.bounds.y,y.m(st++,It,Ne-At),y.m(st++,It,Ne),y.m(st++,It,Ne+tn)):(y.m(st++,It,Wt-At),y.m(st++,It,Wt),y.m(st++,It,Wt+tn)):this.K===0&&(It>=Ne.bounds.right?(Ne=Ne.bounds.x+Ne.bounds.width,y.m(st++,Ne+tn,Wt),y.m(st++,Ne,Wt),y.m(st++,Ne-At,Wt)):(y.m(st++,It+tn,Wt),y.m(st++,It,Wt),y.m(st++,It-At,Wt)));else{y.m(st++,St,Tt);var Kn=0;this.K===180||this.K===0?((this.K===180?It>=Ne.bounds.right:It<=Ne.bounds.x)&&(Kn=(this.K===0?-At:tn)/2),y.m(st++,St+Kn,Wt)):((this.K===270?Wt>=Ne.bounds.bottom:Wt<=Ne.bounds.y)&&(Kn=(this.K===90?-At:tn)/2),y.m(st++,It,Tt+Kn)),y.m(st++,It,Wt)}}else At=Math.max(10,this.he[Pt.layer]),tn=Math.max(10,this.Ld[Pt.layer]),He?this.K===180?(y.m(st++,It-At-Qe,Wt),y.m(st++,Math.min(It-At+Qe/2,It),Wt),y.m(st++,It,Wt),y.m(st++,It,Wt),y.m(st++,Math.max(It+tn-Qe/2,It),Wt),y.m(st++,It+tn+Qe,Wt)):this.K===90?(y.m(st++,It,Wt+tn+Qe),y.m(st++,It,Math.max(Wt+tn-Qe/2,Wt)),y.m(st++,It,Wt),y.m(st++,It,Wt),y.m(st++,It,Math.min(Wt-At+Qe/2,Wt)),y.m(st++,It,Wt-At-Qe)):this.K===270?(y.m(st++,It,Wt-At-Qe),y.m(st++,It,Math.min(Wt-At+Qe/2,Wt)),y.m(st++,It,Wt),y.m(st++,It,Wt),y.m(st++,It,Math.max(Wt+tn-Qe/2,Wt)),y.m(st++,It,Wt+tn+Qe)):(y.m(st++,It+tn+Qe,Wt),y.m(st++,Math.max(It+tn-Qe/2,It),Wt),y.m(st++,It,Wt),y.m(st++,It,Wt),y.m(st++,Math.min(It-At+Qe/2,It),Wt),y.m(st++,It-At-Qe,Wt)):y.m(st++,It,Wt)}Ne=Pt}(se===null||_e!==qi||Ye)&&(St=y.i(st-1).x,Tt=y.i(st-1).y,It=y.i(st).x,Wt=y.i(st).y,Ye?(Qe=this.Ld[Ee.layer],this.K===180||this.K===0?(Ye=Tt,Ye>=Ee.bounds.y&&Ye<=Ee.bounds.bottom&&(this.K===180?It>=Ee.bounds.x:It<=Ee.bounds.right)&&(Ne=Ee.centerX+(this.K===180?-Qe:Qe),Ye<Ee.bounds.y+Ee.bounds.height/2?Ye=Ee.bounds.y-this.kc/2:Ye=Ee.bounds.bottom+this.kc/2,y.m(st++,Ne,Tt),y.m(st++,Ne,Ye)),y.m(st++,It,Ye)):(Ye=St,Ye>=Ee.bounds.x&&Ye<=Ee.bounds.right&&(this.K===270?Wt>=Ee.bounds.y:Wt<=Ee.bounds.bottom)&&(Ne=Ee.centerY+(this.K===270?-Qe:Qe),Ye<Ee.bounds.x+Ee.bounds.width/2?Ye=Ee.bounds.x-this.kc/2:Ye=Ee.bounds.right+this.kc/2,y.m(st++,St,Ne),y.m(st++,Ye,Ne)),y.m(st++,Ye,Wt)),y.m(st++,It,Wt)):He?(At=Math.max(10,this.he[Ee.layer]),tn=Math.max(10,this.Ld[Ee.layer]),this.K===180&&It>=Ee.bounds.x?(Ne=Ee.bounds.x+Ee.bounds.width,y.L(st-2,Ne,Tt),y.L(st-1,Ne+tn,Tt)):this.K===90&&Wt<=Ee.bounds.bottom?(Ne=Ee.bounds.y,y.L(st-2,St,Ne),y.L(st-1,St,Ne-At)):this.K===270&&Wt>=Ee.bounds.y?(Ne=Ee.bounds.y+Ee.bounds.height,y.L(st-2,St,Ne),y.L(st-1,St,Ne+tn)):this.K===0&&It<=Ee.bounds.right&&(Ne=Ee.bounds.x,y.L(st-2,Ne,Tt),y.L(st-1,Ne-At,Tt))):(At=Math.max(10,this.he[Ee.layer]),tn=Math.max(10,this.Ld[Ee.layer]),Ye=0,this.K===180||this.K===0?((this.K===180?It<=Ee.bounds.x:It>=Ee.bounds.right)&&(Ye=(this.K===0?tn:-At)/2),y.m(st++,It+Ye,Tt)):((this.K===270?Wt<=Ee.bounds.y:Wt>=Ee.bounds.bottom)&&(Ye=(this.K===90?tn:-At)/2),y.m(st++,St,Wt+Ye)),y.m(st++,It,Wt)))}else{for(;Ee!==null&&Ee!==Ne;){for(At=Pt=null,Ee=Ee.destinationEdges.iterator;Ee.next()&&(St=Ee.value,St.link!==x.link||(Pt=St.toVertex,At=St.fromVertex,At.node!==null&&(At=null),Pt.node!==null)););if(Pt===null)break;Pt!==Ne&&(St=y.i(st-1).x,Tt=y.i(st-1).y,It=Pt.centerX,Wt=Pt.centerY,Ye?this.K===180||this.K===0?(At!==null?At.centerY:Tt)!==Wt&&(At=this.Ta[Pt.layer]+this.Rf.x,st===y.firstPickIndex+1&&(At=this.K===0?Math.max(At,St):Math.min(At,St)),y.m(st++,At,Tt),y.m(st++,At,Wt)):(At!==null?At.centerX:St)!==It&&(At=this.Ta[Pt.layer]+this.Rf.y,st===y.firstPickIndex+1&&(At=this.K===90?Math.max(At,Tt):Math.min(At,Tt)),y.m(st++,St,At),y.m(st++,It,At)):(At=Math.max(10,this.he[Pt.layer]),tn=Math.max(10,this.Ld[Pt.layer]),He?this.K===180?(y.m(st++,It+tn+Qe,Wt),y.m(st++,Math.max(It+tn-Qe/2,It),Wt),y.m(st++,It,Wt),y.m(st++,It,Wt),y.m(st++,Math.min(It-At+Qe/2,It),Wt),y.m(st++,It-At-Qe,Wt)):this.K===90?(y.m(st++,It,Wt-At-Qe),y.m(st++,It,Math.min(Wt-At+Qe/2,Wt)),y.m(st++,It,Wt),y.m(st++,It,Wt),y.m(st++,It,Math.max(Wt+tn-Qe/2,Wt)),y.m(st++,It,Wt+tn+Qe)):this.K===270?(y.m(st++,It,Wt+tn+Qe),y.m(st++,It,Math.max(Wt+tn-Qe/2,Wt)),y.m(st++,It,Wt),y.m(st++,It,Wt),y.m(st++,It,Math.min(Wt-At+Qe/2,Wt)),y.m(st++,It,Wt-At-Qe)):(y.m(st++,It-At-Qe,Wt),y.m(st++,Math.min(It-At+Qe/2,It),Wt),y.m(st++,It,Wt),y.m(st++,It,Wt),y.m(st++,Math.max(It+tn-Qe/2,It),Wt),y.m(st++,It+tn+Qe,Wt)):this.K===180?(y.m(st++,It+tn,Wt),y.m(st++,It-At,Wt)):this.K===90?(y.m(st++,It,Wt-At),y.m(st++,It,Wt+tn)):this.K===270?(y.m(st++,It,Wt+tn),y.m(st++,It,Wt-At)):(y.m(st++,It-At,Wt),y.m(st++,It+tn,Wt)))),Ee=Pt}Ye&&(St=y.i(st-1).x,Tt=y.i(st-1).y,It=y.i(st).x,Wt=y.i(st).y,this.K===180||this.K===0?Tt!==Wt&&(At=this.K===0?Math.min(Math.max((It+St)/2,this.Ta[Ne.layer]+this.Rf.x),It):Math.max(Math.min((It+St)/2,this.Ta[Ne.layer]+this.Rf.x),It),y.m(st++,At,Tt),y.m(st++,At,Wt)):St!==It&&(At=this.K===90?Math.min(Math.max((Wt+Tt)/2,this.Ta[Ne.layer]+this.Rf.y),Wt):Math.max(Math.min((Wt+Tt)/2,this.Ta[Ne.layer]+this.Rf.y),Wt),y.m(st++,St,At),y.m(st++,It,At)))}b!==null&&He&&4<=y.pointsCount&&(ne!==null&&(ne=_e===qi?y.getLinkPointFromPoint(E,ne,ne.ga($i),y.i(3),!0):y.i(0),_e===qi&&(_e=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ne.x+_e.x)/2,_e.y),y.L(2,b.x,(_e.y+b.y)/2)):(y.L(1,_e.x,(ne.y+_e.y)/2),y.L(2,(_e.x+b.x)/2,b.y))),ne.w()||ne.set(E.actualBounds.center),y.L(0,ne.x,ne.y)),se!==null&&(E=he===qi?y.getLinkPointFromPoint(te,se,se.ga($i),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),he===qi&&(se=y.i(y.pointsCount-3),he=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+se.x)/2,se.y),y.L(y.pointsCount-2,he.x,(se.y+he.y)/2)):(y.L(y.pointsCount-2,se.x,(E.y+se.y)/2),y.L(y.pointsCount-3,(se.x+he.x)/2,he.y))),E.w()||E.set(te.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},ro.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new Ln,y=this.network.edges.iterator;y.next();){var x=y.value.link;x!==null&&x.isOrthogonal&&!a.contains(x)&&a.add(x)}if(0<a.count)if(this.K===90||this.K===270){for(y=0,x=[],a=a.iterator;a.next();){var b=a.value;if(b!==null&&b.isOrthogonal)for(var E=2;E<b.pointsCount-3;E++){var te=b.i(E),ne=b.i(E+1);if(this.B(te.y,ne.y)&&!this.B(te.x,ne.x)){var se=new Gc;se.layer=Math.floor(te.y/2);var he=b.i(0),_e=b.i(b.pointsCount-1);if(se.first=he.x*he.x+he.y,se.jc=_e.x*_e.x+_e.y,se.rd=Math.min(te.x,ne.x),se.Ic=Math.max(te.x,ne.x),se.index=E,se.link=b,E+2<b.pointsCount){he=b.i(E-1),_e=b.i(E+2);var Ee=0;he.y<te.y?Ee=_e.y<te.y?3:te.x<ne.x?2:1:he.y>te.y&&(Ee=_e.y>te.y?0:ne.x<te.x?2:1),se.j=Ee}x.push(se)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(te=x[a].layer,b=a+1;b<x.length&&x[b].layer===te;)b++;if(1<b-a)for(te=a;te<b;){for(ne=x[te].Ic,E=a+1;E<b&&x[E].rd<ne;)ne=Math.max(ne,x[E].Ic),E++;if(ne=E-te,1<ne){for(this.zi(x,this.Js,te,te+ne),Ee=1,se=x[te].jc,he=te;he<E;he++)_e=x[he],_e.jc!==se&&(Ee++,se=_e.jc);this.zi(x,this.Ux,te,te+ne);var Ne=1;for(se=x[te].first,he=te;he<E;he++)_e=x[he],_e.first!==se&&(Ne++,se=_e.first);for(he=!0,_e=Ne,Ee<Ne?(he=!1,_e=Ee,se=x[te].jc,this.zi(x,this.Js,te,te+ne)):se=x[te].first,Ee=0,Ne=te;Ne<E;Ne++){var He=x[Ne];(he?He.first:He.jc)!==se&&(Ee++,se=he?He.first:He.jc);var Ye=He.link;te=Ye.i(He.index),ne=Ye.i(He.index+1);var Qe=this.linkSpacing*(Ee-(_e-1)/2);y++,Ye.uh(),Ye.L(He.index,te.x,te.y+Qe),Ye.L(He.index+1,ne.x,ne.y+Qe),Ye.zf()}}te=E}a=b}}else{for(y=0,x=[],a=a.iterator;a.next();)if(b=a.value,b!==null&&b.isOrthogonal)for(E=2;E<b.pointsCount-3;E++)te=b.i(E),ne=b.i(E+1),this.B(te.x,ne.x)&&!this.B(te.y,ne.y)&&(se=new Gc,se.layer=Math.floor(te.x/2),he=b.i(0),_e=b.i(b.pointsCount-1),se.first=he.x+he.y*he.y,se.jc=_e.x+_e.y*_e.y,se.rd=Math.min(te.y,ne.y),se.Ic=Math.max(te.y,ne.y),se.index=E,se.link=b,E+2<b.pointsCount&&(he=b.i(E-1),_e=b.i(E+2),Ee=0,he.x<te.x?Ee=_e.x<te.x?3:te.y<ne.y?2:1:he.x>te.x&&(Ee=_e.x>te.x?0:ne.y<te.y?2:1),se.j=Ee),x.push(se));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(te=x[a].layer,b=a+1;b<x.length&&x[b].layer===te;)b++;if(1<b-a)for(te=a;te<b;){for(ne=x[te].Ic,E=a+1;E<b&&x[E].rd<ne;)ne=Math.max(ne,x[E].Ic),E++;if(ne=E-te,1<ne){for(this.zi(x,this.Js,te,te+ne),Ee=1,se=x[te].jc,he=te;he<E;he++)_e=x[he],_e.jc!==se&&(Ee++,se=_e.jc);for(this.zi(x,this.Ux,te,te+ne),Ne=1,se=x[te].first,he=te;he<E;he++)_e=x[he],_e.first!==se&&(Ne++,se=_e.first);for(he=!0,_e=Ne,Ee<Ne?(he=!1,_e=Ee,se=x[te].jc,this.zi(x,this.Js,te,te+ne)):se=x[te].first,Ee=0,Ne=te;Ne<E;Ne++)He=x[Ne],(he?He.first:He.jc)!==se&&(Ee++,se=he?He.first:He.jc),Ye=He.link,te=Ye.i(He.index),ne=Ye.i(He.index+1),Qe=this.linkSpacing*(Ee-(_e-1)/2),y++,Ye.uh(),Ye.L(He.index,te.x+Qe,te.y),Ye.L(He.index+1,ne.x+Qe,ne.y),Ye.zf()}te=E}a=b}}}},$e=ro.prototype,$e.Vx=function(a,y){return a instanceof Gc&&y instanceof Gc&&a!==y?a.layer<y.layer?-1:a.layer>y.layer?1:a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},$e.Ux=function(a,y){return a instanceof Gc&&y instanceof Gc&&a!==y?a.first<y.first?-1:a.first>y.first||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},$e.Js=function(a,y){return a instanceof Gc&&y instanceof Gc&&a!==y?a.jc<y.jc?-1:a.jc>y.jc||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},$e.B=function(a,y){return a-=y,-1<a&&1>a},$e.zi=function(a,y,x,b){var E=a.length,te=b-x;if(!(1>=te))if((0>x||x>=E-1)&&Lt("not in range 0 <= from < length: "+x),te===2)b=a[x],E=a[x+1],0<y(b,E)&&(a[x]=E,a[x+1]=b);else if(x===0)if(b>=E)a.sort(y);else for(x=a.slice(0,b),x.sort(y),y=0;y<b;y++)a[y]=x[y];else if(b>=E)for(b=a.slice(x),b.sort(y),y=x;y<E;y++)a[y]=b[y-x];else for(E=a.slice(x,b),E.sort(y),y=x;y<b;y++)a[y]=E[y-x]};function Uc(a,y){var x=a.tc[y];if(x>=a.He.length){for(var b=[],E=0;E<a.He.length;E++)b[E]=a.He[E];a.He=b}for(a.He[x]===void 0||a.He[x]===null?b=[]:(b=a.He[x],a.He[x]=null),a=a.fl[y],y=0;y<a.length;y++)x=a[y],b[x.index]=x;return b}function Hc(a,y,x){a.He[a.tc[y]]=x}ot.Object.defineProperties(ro.prototype,{layerSpacing:{get:function(){return this.ie},set:function(a){this.ie!==a&&0<=a&&(this.ie=a,this.C())}},columnSpacing:{get:function(){return this.kc},set:function(a){this.kc!==a&&0<a&&(this.kc=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K!==a&&(a===0||a===90||a===180||a===270?(this.K=a,this.C()):Lt("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==xy&&a!==k0&&a!==Ng||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==T0&&a!==wy&&a!==_y||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==A0&&a!==by&&a!==Py||(this.Qk=a,this.C())}},iterations:{get:function(){return this.bj},set:function(a){this.bj!==a&&0<=a&&(this.bj=a,this.C())}},aggressiveOption:{get:function(){return this.rk},set:function(a){this.rk===a||a!==Cy&&a!==N0&&a!==Ey||(this.rk=a,this.C())}},packOption:{get:function(){return this.bg},set:function(a){this.bg!==a&&0<=a&&8>a&&(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 k0=new nn(ro,"CycleDepthFirst",0),xy=new nn(ro,"CycleGreedy",1),Ng=new nn(ro,"CycleFromLayers",2),T0=new nn(ro,"LayerOptimalLinkLength",0),wy=new nn(ro,"LayerLongestPathSink",1),_y=new nn(ro,"LayerLongestPathSource",2),A0=new nn(ro,"InitDepthFirstOut",0),by=new nn(ro,"InitDepthFirstIn",1),Py=new nn(ro,"InitNaive",2),Cy=new nn(ro,"AggressiveNone",0),N0=new nn(ro,"AggressiveLess",1),Ey=new nn(ro,"AggressiveMore",2),Yx=8;ro.className="LayeredDigraphLayout",ro.CycleDepthFirst=k0,ro.CycleGreedy=xy,ro.CycleFromLayers=Ng,ro.LayerOptimalLinkLength=T0,ro.LayerLongestPathSink=wy,ro.LayerLongestPathSource=_y,ro.InitDepthFirstOut=A0,ro.InitDepthFirstIn=by,ro.InitNaive=Py,ro.AggressiveNone=Cy,ro.AggressiveLess=N0,ro.AggressiveMore=Ey,ro.PackNone=0,ro.PackExpand=1,ro.PackStraighten=2,ro.PackMedian=4,ro.PackAll=15,ro.AlignNone=0,ro.AlignUpperLeft=1,ro.AlignUpperRight=2,ro.AlignLowerLeft=4,ro.AlignLowerRight=8,ro.AlignAll=15;function Gc(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}Gc.className="SegInfo";function ip(a){Mo.call(this,a)}Je(ip,Mo),ip.prototype.createVertex=function(){return new Zl(this)},ip.prototype.createEdge=function(){return new Dg(this)},ip.className="LayeredDigraphNetwork";function Zl(a){Ts.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}Je(Zl,Ts);function rx(a,y){return a.index-y.index}function D0(a,y){if(!a.$n){for(var x=[],b=ti(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=ti(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Lt("Unable to find destination edge to given vertex")}function Ly(a){if(!a.co){for(var y=[],x=ti(a.sourceEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.fromVertex);y.sort(rx),a.co=y}return a.co}function Xx(a){if(!a.ao){for(var y=[],x=ti(a.destinationEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.toVertex);y.sort(rx),a.ao=y}return a.ao}Zl.prototype.Cl=function(a){Ts.prototype.Cl.call(this,a),this.bo=this.co=null},Zl.prototype.Kl=function(a){Ts.prototype.Kl.call(this,a),this.bo=this.co=null},Zl.prototype.zl=function(a){Ts.prototype.zl.call(this,a),this.$n=this.ao=null},Zl.prototype.Jl=function(a){Ts.prototype.Jl.call(this,a),this.$n=this.ao=null},ot.Object.defineProperties(Zl.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)}}}),Zl.prototype.deleteDestinationEdge=Zl.prototype.Jl,Zl.prototype.addDestinationEdge=Zl.prototype.zl,Zl.prototype.deleteSourceEdge=Zl.prototype.Kl,Zl.prototype.addSourceEdge=Zl.prototype.Cl,Zl.className="LayeredDigraphVertex";function Dg(a){yl.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Je(Dg,yl),ot.Object.defineProperties(Dg.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)}}}),Dg.className="LayeredDigraphEdge";function vr(a){Zo.call(this),this.Ub=new kn,this.Wn=F0,this.ud=vh,this.vo=j0,this.Bq=By,this.$v=[],this.td=!0,this.Rb=z0,this.$d=new wn(10,10).freeze();var y=new sf(this);this.W=new ru(y),this.Y=new ru(y),this.ru=[],a&&Object.assign(this,a)}Je(vr,Zo),vr.prototype.cloneProtected=function(a){Zo.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)},vr.prototype.qb=function(a){a.classType===vr?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:Lt("Unknown enum value: "+a):Zo.prototype.qb.call(this,a)},vr.prototype.createNetwork=function(){return new sf(this)},vr.prototype.makeNetwork=function(a){function y(b){if(b instanceof qn)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof Bn){var E=b.fromNode;return E===null||E.isLinkLabel||E.category==="Comment"?!1:(b=b.toNode,!(b===null||b.isLinkLabel||b.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof rn?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Ki?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},vr.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==U0&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof rn&&(y=a),this.path===F0&&y!==null?this.ud=y.isTreePathToChildren?vh:rf:this.ud=this.path===F0?vh:this.path,0<this.network.vertexes.count){for(this.network.Ko(),a=this.network.vertexes.iterator;a.next();)y=a.value,y.initialized=!1,y.level=0,y.parent=null,y.children=[];if(0<this.Ub.count){for(a=new kn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof qn?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof ru&&a.add(x)}this.Ub=a}for(this.Ub.count===0&&this.findRoots(),a=this.Ub.copy().iterator;a.next();)y=a.value,y.initialized||(y.initialized=!0,My(this,y));for(y=this.network.vertexes,a=null;a=Jx(y),0<a.count;)y=ox(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,My(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof ru&&ax(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof ru&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof ru&&ux(this,y);if(this.Cu(),this.layerStyle===H0){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var b=x.parent;b===null&&(b=x),b=b.angle===0||b.angle===180;var E=a[x.level];E===void 0&&(E=0),a[x.level]=Math.max(E,b?x.width:x.height)}for(y=0;y<a.length;y++)a[y]===void 0&&(a[y]=0);for(this.$v=a,y=this.network.vertexes.iterator;y.next();)x=y.value,b=x.parent,b===null&&(b=x),b.angle===0||b.angle===180?(b.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(b.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===jy)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,b=-1,E=0;E<y.children.length;E++){var te=y.children[E];b=Math.max(b,x?te.width:te.height)}if(0<=b)for(E=0;E<y.children.length;E++)te=y.children[E],x?(y.angle===180&&(te.focusX+=b-te.width),te.width=b):(y.angle===270&&(te.focusY+=b-te.height),te.height=b)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof ru&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new kn,this.isValidLayout=!0};function Jx(a){var y=new kn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}vr.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case vh:x.sourceEdges.count===0&&this.Ub.add(x);break;case rf:x.destinationEdges.count===0&&this.Ub.add(x);break;default:Lt("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=ox(this,a),a!==null&&this.Ub.add(a))};function ox(a,y){var x=999999,b=null;for(y=y.iterator;y.next();){var E=y.value;switch(a.ud){case vh:E.sourceEdges.count<x&&(x=E.sourceEdges.count,b=E);break;case rf:E.destinationEdges.count<x&&(x=E.destinationEdges.count,b=E);break;default:Lt("Unhandled path value "+a.ud.toString())}}return b}function My(a,y){if(y!==null){switch(a.ud){case vh:if(0<y.destinationEdges.count){for(var x=new Ln,b=y.destinationVertexes;b.next();){var E=b.value;sx(a,y,E)&&x.add(E)}0<x.count&&(y.children=x.Fa())}break;case rf:if(0<y.sourceEdges.count){for(x=new Ln,b=y.sourceVertexes;b.next();)E=b.value,sx(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:Lt("Unhandled path value"+a.ud.toString())}for(x=y.children,b=x.length,E=0;E<b;E++){var te=x[E];te.initialized=!0,te.level=y.level+1,te.parent=y,a.Ub.remove(te)}for(y=0;y<b;y++)My(a,x[y])}}function sx(a,y,x){if(x.initialized){if(y===null)var b=!1;else{for(b=y.parent;b!==null&&b!==x;)b=b.parent;b=b===x}if(b||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}vr.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,b=0,E=0;E<x.length;E++)x[E]===y&&b++;if(0<b){b=Array(x.length-b);for(var te=E=0;te<x.length;te++)x[te]!==y&&(b[E++]=x[te]);a.children=b}}};function ax(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===xh&&a.sortTreeVertexChildren(y);for(var x=0,b=y.childrenCount,E=0,te=y.children,ne=te.length,se=0;se<ne;se++){var he=te[se];ax(a,he),x+=he.descendantCount+1,b=Math.max(b,he.maxChildrenCount),E=Math.max(E,he.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=b,y.maxGenerationCount=0<b?E+1:0}}function qx(a,y){switch(a.vo){default:case j0:return y.parent!==null?y.parent:a.W;case Ry:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Iy:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Oy:var x=!0;if(y.childrenCount===0)x=!1;else for(var b=y.children,E=b.length,te=0;te<E;te++)if(0<b[te].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}vr.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(qx(this,a)),a.parent!==null&&a.parent.alignment===xh){for(var y=a.angle,x=a.parent.children,b=0;b<x.length&&a!==x[b];)b++;b%2===0?b!==x.length-1&&(y=y===90?180:y===180?270:y===270?180:270):y=y===90?0:y===180?90:y===270?0:90,a.angle=y}a.initialized=!0};function lx(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,b=0;b<x;b++)lx(a,y[b])}}vr.prototype.assignTreeVertexValues=function(){};function ux(a,y){if(y!==null){y.alignment!==xh&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)ux(a,y[b])}}vr.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case rp:break;case Ig:a.children.reverse();break;case Rg:a.children.sort(a.comparer);break;case Fg:a.children.sort(a.comparer),a.children.reverse();break;default:Lt("Unhandled sorting value "+a.sorting.toString())}},vr.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},vr.prototype.addComments=function(a){var y=a.angle,x=a.parent,b=0,E=!1;x!==null&&(b=x.angle,E=x.alignment,E=Wc(E)),y=y===90||y===270,b=b===90||b===270,x=a.childrenCount===0;var te=0,ne=0,se=0,he=a.commentSpacing;if(a.node!==null)for(var _e=a.node.Mu();_e.next();){var Ee=_e.value;Ee.category==="Comment"&&Ee.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(Ee),Ee.Va(),Ee=Ee.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(te=Math.max(te,Ee.width),ne+=Ee.height+Math.abs(se)):(te+=Ee.width+Math.abs(se),ne=Math.max(ne,Ee.height)),se=he)}a.comments!==null&&(y&&!x||!E&&!b&&x||E&&b&&x?(te+=Math.abs(a.commentMargin),ne=Math.max(0,ne-a.height)):(ne+=Math.abs(a.commentMargin),te=Math.max(0,te-a.width)),E=sn.allocAt(0,0,a.bounds.width+te,a.bounds.height+ne),a.bounds=E,sn.free(E))};function Wc(a){return a===sc||a===xh||a===ac||a===Rh}function Og(a){return a===sc||a===xh}function ky(a){var y=a.parent;if(y!==null){var x=y.alignment;if(Wc(x)){if(Og(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===ac)return!0}}return!1}vr.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,b=a.angle,E=0,te=!1;x!==null&&(E=x.angle,te=x.alignment,te=Wc(te)),b=b===90||b===270,x=E===90||E===270;for(var ne=a.childrenCount===0,se=ky(a),he=0,_e=a.comments,Ee=_e.length,Ne=ft.alloc(),He=0;He<Ee;He++){var Ye=_e[He],Qe=Ye.measuredBounds;if(b&&!ne||!te&&!x&&ne||te&&x&&ne){if(135<E&&!te||x&&se)if(0<=a.commentMargin)for(Ne.h(a.bounds.x-a.commentMargin-Qe.width,a.bounds.y+he),Ye.move(Ne),Ye=Ye.Sd();Ye.next();){var st=Ye.value;st.fromSpot=ma,st.toSpot=Os}else for(Ne.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+he),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)st=Ye.value,st.fromSpot=Os,st.toSpot=ma;else if(0<=a.commentMargin)for(Ne.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+he),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)st=Ye.value,st.fromSpot=Os,st.toSpot=ma;else for(Ne.h(a.bounds.x+a.commentMargin-Qe.width,a.bounds.y+he),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)st=Ye.value,st.fromSpot=ma,st.toSpot=Os;he=0<=a.commentSpacing?he+(Qe.height+a.commentSpacing):he+(a.commentSpacing-Qe.height)}else{if(135<E&&!te||!x&&se)if(0<=a.commentMargin)for(Ne.h(a.bounds.x+he,a.bounds.y-a.commentMargin-Qe.height),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)st=Ye.value,st.fromSpot=ua,st.toSpot=$s;else for(Ne.h(a.bounds.x+he,a.bounds.y+2*a.focus.y-a.commentMargin),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)st=Ye.value,st.fromSpot=$s,st.toSpot=ua;else if(0<=a.commentMargin)for(Ne.h(a.bounds.x+he,a.bounds.y+2*a.focus.y+a.commentMargin),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)st=Ye.value,st.fromSpot=$s,st.toSpot=ua;else for(Ne.h(a.bounds.x+he,a.bounds.y+a.commentMargin-Qe.height),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)st=Ye.value,st.fromSpot=ua,st.toSpot=$s;he=0<=a.commentSpacing?he+(Qe.width+a.commentSpacing):he+(a.commentSpacing-Qe.width)}}if(ft.free(Ne),y=he-a.commentSpacing-(b?y.height:y.width),this.ud===vh)for(a=a.destinationEdges;a.next();)E=a.value.link,E===null||E.isAvoiding||(E.fromEndSegmentLength=0<y?y:NaN);else for(a=a.sourceEdges;a.next();)E=a.value.link,E===null||E.isAvoiding||(E.toEndSegmentLength=0<y?y:NaN)}},vr.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,b=0;b<x;b++)this.layoutTree(y[b]);switch(a.compaction){case B0:hx(this,a);break;case Bg:if(a.alignment===xh)hx(this,a);else if(a.childrenCount===0)b=a.parent,x=!1,y=0,b!==null&&(y=b.angle,x=b.alignment,x=Wc(x)),b=ky(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!b?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&b?a.la.h(a.width-2*a.focus.x,0):a.la.h(0,a.height-2*a.focus.y),a.Yo=null,a.kp=null;else{var E=wu(a);y=E===90||E===270;var te=0,ne=a.children,se=ne.length;for(x=0;x<se;x++)b=ne[x],te=Math.max(te,y?b.Da.width:b.Da.height);var he=a.alignment;b=he===yh;var _e=he===Sh,Ee=Wc(he),Ne=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var He=a.nodeSpacing,Ye=this.computeNodeIndent(a),Qe=a.rowSpacing,st=0;(b||_e||a.hm||a.im&&a.maxGenerationCount===1)&&(st=Math.max(0,a.rowIndent)),b=a.width;var Pt=a.height,St=0,Tt=0,At=0,It=null,Wt=null,tn=0,Kn=0,hi=0,ii=0,Rn=0,_n=0,Zi=0,Ri=0;if(Ee&&!Og(he)&&135<E&&ne.reverse(),Og(he))if(1<se)for(var Ur=0;Ur<se;Ur++)Ur%2===0&&Ur!==se-1&&(Ri=Math.max(Ri,y?ne[Ur].Da.width:ne[Ur].Da.height));else se===1&&(Ri=y?ne[0].Da.width:ne[0].Da.height);if(Ee){switch(he){case sc:Tt=135>E?cx(this,a,ne,Ri,St,Tt):dx(this,a,ne,Ri,St,Tt),Ri=Tt.x,St=Tt.width,Tt=Tt.height;break;case ac:for(It=0;It<se;It++)Wt=ne[It],Ne=Wt.Da,At=_n===0?0:Qe,y?(Wt.S.h(te-Ne.width,ii+At),St=Math.max(St,Ne.width),Tt=Math.max(Tt,ii+At+Ne.height),ii+=At+Ne.height):(Wt.S.h(hi+At,te-Ne.height),St=Math.max(St,hi+At+Ne.width),Tt=Math.max(Tt,Ne.height),hi+=At+Ne.width),_n++;break;case Rh:for(It=0;It<se;It++)Wt=ne[It],te=Wt.Da,Ne=_n===0?0:Qe,y?(Wt.S.h(He/2+a.focus.x,ii+Ne),St=Math.max(St,te.width),Tt=Math.max(Tt,ii+Ne+te.height),ii+=Ne+te.height):(Wt.S.h(hi+Ne,He/2+a.focus.y),St=Math.max(St,hi+Ne+te.width),Tt=Math.max(Tt,te.height),hi+=Ne+te.width),_n++}It=ll(this,2),Wt=ll(this,2),y?(It[0].h(0,0),It[1].h(0,Tt),Wt[0].h(St,0)):(It[0].h(0,0),It[1].h(St,0),Wt[0].h(0,Tt)),Wt[1].h(St,Tt)}else for(Ur=0;Ur<se;Ur++){var wo=ne[Ur],Bs=wo.Da;if(y){0<Ne&&0<_n&&hi+He+Bs.width>Ne&&(hi<te&&_d(a,he,te-hi,0,Zi,Ur-1),Rn++,_n=0,Zi=Ur,At=Tt,hi=0,ii=135<E?-Tt-Qe:Tt+Qe),I0(this,wo,0,ii);var Zs=0;if(_n===0)It=wo.Yo,Wt=wo.kp,tn=Bs.width,Kn=Bs.height,(It===null||Wt===null||E!==wu(wo))&&(It=ll(this,2),Wt=ll(this,2),It[0].h(0,0),It[1].h(0,Kn),Wt[0].h(tn,0),Wt[1].h(tn,Kn));else{var Ma=Wn();Kn=fx(this,a,wo,It,Wt,tn,Kn,Ma),Zs=Kn.x,It=Ma[0],Wt=Ma[1],tn=Kn.width,Kn=Kn.height,zn(Ma),hi<Bs.width&&0>Zs&&(nf(a,-Zs,0,Zi,Ur-1),R0(It,-Zs,0),R0(Wt,-Zs,0),Zs=0)}wo.S.h(Zs,ii),St=Math.max(St,tn),Tt=Math.max(Tt,At+(Rn===0?0:Qe)+Bs.height),hi=tn}else 0<Ne&&0<_n&&ii+He+Bs.height>Ne&&(ii<te&&_d(a,he,0,te-ii,Zi,Ur-1),Rn++,_n=0,Zi=Ur,At=St,ii=0,hi=135<E?-St-Qe:St+Qe),I0(this,wo,hi,0),Zs=0,_n===0?(It=wo.Yo,Wt=wo.kp,tn=Bs.width,Kn=Bs.height,(It===null||Wt===null||E!==wu(wo))&&(It=ll(this,2),Wt=ll(this,2),It[0].h(0,0),It[1].h(tn,0),Wt[0].h(0,Kn),Wt[1].h(tn,Kn))):(Ma=Wn(),Kn=fx(this,a,wo,It,Wt,tn,Kn,Ma),Zs=Kn.x,It=Ma[0],Wt=Ma[1],tn=Kn.width,Kn=Kn.height,zn(Ma),ii<Bs.height&&0>Zs&&(nf(a,0,-Zs,Zi,Ur-1),R0(It,0,-Zs),R0(Wt,0,-Zs),Zs=0)),wo.S.h(hi,Zs),Tt=Math.max(Tt,Kn),St=Math.max(St,At+(Rn===0?0:Qe)+Bs.width),ii=Kn;_n++}switch(0<Rn&&(y?(Tt+=Math.max(0,x),hi<St&&_d(a,he,St-hi,0,Zi,se-1),0<st&&(_e||nf(a,st,0,0,se-1),St+=st)):(St+=Math.max(0,x),ii<Tt&&_d(a,he,0,Tt-ii,Zi,se-1),0<st&&(_e||nf(a,0,st,0,se-1),Tt+=st))),st=_e=0,he){case op:y?_e+=St/2-a.focus.x-Ye/2:st+=Tt/2-a.focus.y-Ye/2;break;case of:0<Rn?y?_e+=St/2-a.focus.x-Ye/2:st+=Tt/2-a.focus.y-Ye/2:y?(Ri=ne[0].S.x+ne[0].la.x,_e+=Ri+(ne[se-1].S.x+ne[se-1].la.x+2*ne[se-1].focus.x-Ri)/2-a.focus.x-Ye/2):(Ri=ne[0].S.y+ne[0].la.y,st+=Ri+(ne[se-1].S.y+ne[se-1].la.y+2*ne[se-1].focus.y-Ri)/2-a.focus.y-Ye/2);break;case yh:y?(_e-=Ye,St+=Ye):(st-=Ye,Tt+=Ye);break;case Sh:y?(_e+=St-a.width+Ye,St+=Ye):(st+=Tt-a.height+Ye,Tt+=Ye);break;case sc:y?1<se?_e+=Ri+He/2-a.focus.x:_e+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<se?st+=Ri+He/2-a.focus.y:st+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case ac:y?_e+=St+He/2-a.focus.x:st+=Tt+He/2-a.focus.y;break;case Rh:break;default:Tt=this.customAlignment(a,_e,st,St,Tt),_e=Tt[0],st=Tt[1],St=Tt[2],Tt=Tt[3]}for(Ye=0;Ye<se;Ye++)Ri=ne[Ye],y?Ri.S.h(Ri.S.x+Ri.la.x-_e,Ri.S.y+(135<E?(Ee?-Tt:-Ri.Da.height)+Ri.la.y-x:Pt+x+Ri.la.y)):Ri.S.h(Ri.S.x+(135<E?(Ee?-St:-Ri.Da.width)+Ri.la.x-x:b+x+Ri.la.x),Ri.S.y+Ri.la.y-st);if(se=ne=0,Ee?y?(St=Ty(a,St,_e),0>_e&&(_e=0),135<E&&(st+=Tt+x),Tt+=Pt+x,he===Rh&&(ne+=He/2+a.focus.x),se+=Pt+x):(135<E&&(_e+=St+x),St+=b+x,Tt=Ay(a,Tt,st),0>st&&(st=0),he===Rh&&(se+=He/2+a.focus.y),ne+=b+x):y?(a.comments===null?b>St&&(St=Ny(he,b-St,0),ne=St.x,se=St.y,St=b,_e=0):St=Ty(a,St,_e),0>_e&&(ne-=_e,_e=0),135<E&&(st+=Tt+x),Tt=Math.max(Math.max(Tt,Pt),Tt+Pt+x),se+=Pt+x):(135<E&&(_e+=St+x),St=Math.max(Math.max(St,b),St+b+x),a.comments===null?Pt>Tt&&(Tt=Ny(he,0,Pt-Tt),ne=Tt.x,se=Tt.y,Tt=Pt,st=0):Tt=Ay(a,Tt,st),0>st&&(se-=st,st=0),ne+=b+x),0<Rn)E=ll(this,4),Rn=ll(this,4),y?(E[2].h(0,Pt+x),E[3].h(E[2].x,Tt),Rn[2].h(St,E[2].y),Rn[3].h(Rn[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(St,E[2].y),Rn[2].h(E[2].x,Tt),Rn[3].h(E[3].x,Rn[2].y));else{for(E=ll(this,It.length+2),Rn=ll(this,Wt.length+2),he=0;he<It.length;he++)Ee=It[he],E[he+2].h(Ee.x+ne,Ee.y+se);for(he=0;he<Wt.length;he++)Ee=Wt[he],Rn[he+2].h(Ee.x+ne,Ee.y+se)}y?(E[0].h(_e,0),E[1].h(E[0].x,Pt),E[2].y<E[1].y&&(E[2].x>E[0].x?E[2].assign(E[1]):E[1].assign(E[2])),E[3].y<E[2].y&&(E[3].x>E[0].x?E[3].assign(E[2]):E[2].assign(E[3])),Rn[0].h(_e+b,0),Rn[1].h(Rn[0].x,Pt),Rn[2].y<Rn[1].y&&(Rn[2].x<Rn[0].x?Rn[2].assign(Rn[1]):Rn[1].assign(Rn[2])),Rn[3].y<Rn[2].y&&(Rn[3].x<Rn[0].x?Rn[3].assign(Rn[2]):Rn[2].assign(Rn[3])),E[2].y-=x/2,Rn[2].y-=x/2):(E[0].h(0,st),E[1].h(b,E[0].y),E[2].x<E[1].x&&(E[2].y>E[0].y?E[2].assign(E[1]):E[1].assign(E[2])),E[3].x<E[2].x&&(E[3].y>E[0].y?E[3].assign(E[2]):E[2].assign(E[3])),Rn[0].h(0,st+Pt),Rn[1].h(b,Rn[0].y),Rn[2].x<Rn[1].x&&(Rn[2].y<Rn[0].y?Rn[2].assign(Rn[1]):Rn[1].assign(Rn[2])),Rn[3].x<Rn[2].x&&(Rn[3].y<Rn[0].y?Rn[3].assign(Rn[2]):Rn[2].assign(Rn[3])),E[2].x-=x/2,Rn[2].x-=x/2),Ru(this,It),Ru(this,Wt),a.Yo=E,a.kp=Rn,a.la.h(_e,st),a.Da.h(St,Tt)}break;default:Lt("Unhandled compaction value "+a.compaction.toString())}}};function hx(a,y){if(y.childrenCount===0){var x=!1,b=0;y.parent!==null&&(b=y.parent.angle,x=y.parent.alignment,x=Wc(x));var E=ky(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(b!==180&&b!==270||x)&&!E?y.la.h(0,0):b===180&&!x||(b===90||b===270)&&E?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{b=wu(y),x=b===90||b===270;var te=0;E=y.children;for(var ne=E.length,se=0;se<ne;se++){var he=E[se];te=Math.max(te,x?he.Da.width:he.Da.height)}var _e=y.alignment,Ee=_e===yh,Ne=_e===Sh;se=Wc(_e);var He=Math.max(0,y.breadthLimit);he=a.computeLayerSpacing(y);var Ye=y.nodeSpacing,Qe=a.computeNodeIndent(y),st=Ee||Ne?0:Qe/2,Pt=y.rowSpacing,St=0;(Ee||Ne||y.hm||y.im&&y.maxGenerationCount===1)&&(St=Math.max(0,y.rowIndent)),Ee=y.width;var Tt=y.height,At=0,It=0,Wt=0,tn=0,Kn=0,hi=0,ii=0,Rn=0,_n=0,Zi=0;if(se&&!Og(_e)&&135<b&&E.reverse(),Og(_e))if(1<ne)for(var Ri=0;Ri<ne;Ri++){var Ur=E[Ri],wo=Ur.Da;Ri%2===0&&Ri!==ne-1?_n=Math.max(_n,(x?wo.width:wo.height)+a.computeBusNodeSpacing(Ur)-Ye):Ri%2!==0&&(Zi=Math.max(Zi,(x?wo.width:wo.height)+a.computeBusNodeSpacing(Ur)-Ye))}else ne===1&&(_n=x?E[0].Da.width:E[0].Da.height);if(se)switch(_e){case sc:case xh:It=135>b?cx(a,y,E,_n,At,It):dx(a,y,E,_n,At,It),_n=It.x,At=It.width,It=It.height;break;case ac:for(He=0;He<ne;He++)st=E[He],Wt=st.Da,Zi=ii===0?0:Pt,x?(st.S.h(te-Wt.width,Kn+Zi),At=Math.max(At,Wt.width),It=Math.max(It,Kn+Zi+Wt.height),Kn+=Zi+Wt.height):(st.S.h(tn+Zi,te-Wt.height),At=Math.max(At,tn+Zi+Wt.width),It=Math.max(It,Wt.height),tn+=Zi+Wt.width),ii++;break;case Rh:for(te=0;te<ne;te++)He=E[te],st=He.Da,Wt=ii===0?0:Pt,x?(He.S.h(Ye/2+y.focus.x,Kn+Wt),At=Math.max(At,st.width),It=Math.max(It,Kn+Wt+st.height),Kn+=Wt+st.height):(He.S.h(tn+Wt,Ye/2+y.focus.y),At=Math.max(At,tn+Wt+st.width),It=Math.max(It,st.height),tn+=Wt+st.width),ii++}else for(Zi=0;Zi<ne;Zi++)Ri=E[Zi],Ur=Ri.Da,x?(0<He&&0<ii&&tn+Ye+Ur.width>He&&(tn<te&&_d(y,_e,te-tn,0,Rn,Zi-1),hi++,ii=0,Rn=Zi,Wt=It,tn=0,Kn=135<b?-It-Pt:It+Pt),wo=ii===0?st:Ye,I0(a,Ri,0,Kn),Ri.S.h(tn+wo,Kn),At=Math.max(At,tn+wo+Ur.width),It=Math.max(It,Wt+(hi===0?0:Pt)+Ur.height),tn+=wo+Ur.width):(0<He&&0<ii&&Kn+Ye+Ur.height>He&&(Kn<te&&_d(y,_e,0,te-Kn,Rn,Zi-1),hi++,ii=0,Rn=Zi,Wt=At,Kn=0,tn=135<b?-At-Pt:At+Pt),wo=ii===0?st:Ye,I0(a,Ri,tn,0),Ri.S.h(tn,Kn+wo),It=Math.max(It,Kn+wo+Ur.height),At=Math.max(At,Wt+(hi===0?0:Pt)+Ur.width),Kn+=wo+Ur.height),ii++;switch(0<hi&&(x?(It+=Math.max(0,he),tn<At&&_d(y,_e,At-tn,0,Rn,ne-1),0<St&&(Ne||nf(y,St,0,0,ne-1),At+=St)):(At+=Math.max(0,he),Kn<It&&_d(y,_e,0,It-Kn,Rn,ne-1),0<St&&(Ne||nf(y,0,St,0,ne-1),It+=St))),St=Ne=0,_e){case op:x?Ne+=At/2-y.focus.x-Qe/2:St+=It/2-y.focus.y-Qe/2;break;case of:0<hi?x?Ne+=At/2-y.focus.x-Qe/2:St+=It/2-y.focus.y-Qe/2:x?(a=E[0].S.x+E[0].la.x,Ne+=a+(E[ne-1].S.x+E[ne-1].la.x+2*E[ne-1].focus.x-a)/2-y.focus.x-Qe/2):(a=E[0].S.y+E[0].la.y,St+=a+(E[ne-1].S.y+E[ne-1].la.y+2*E[ne-1].focus.y-a)/2-y.focus.y-Qe/2);break;case yh:x?(Ne-=Qe,At+=Qe):(St-=Qe,It+=Qe);break;case Sh:x?(Ne+=At-y.width+Qe,At+=Qe):(St+=It-y.height+Qe,It+=Qe);break;case sc:case xh:x?1<ne?Ne+=_n+Ye/2-y.focus.x:Ne+=E[0].focus.x-y.focus.x+E[0].la.x:1<ne?St+=_n+Ye/2-y.focus.y:St+=E[0].focus.y-y.focus.y+E[0].la.y;break;case ac:x?Ne+=At+Ye/2-y.focus.x:St+=It+Ye/2-y.focus.y;break;case Rh:break;default:a=a.customAlignment(y,Ne,St,At,It),Ne=a[0],St=a[1],At=a[2],It=a[3]}for(a=0;a<ne;a++)Qe=E[a],x?Qe.S.h(Qe.S.x+Qe.la.x-Ne,Qe.S.y+(135<b?(se?-It:-Qe.Da.height)+Qe.la.y-he:Tt+he+Qe.la.y)):Qe.S.h(Qe.S.x+(135<b?(se?-At:-Qe.Da.width)+Qe.la.x-he:Ee+he+Qe.la.x),Qe.S.y+Qe.la.y-St);x?(At=Ty(y,At,Ne),0>Ne&&(Ne=0),135<b&&(St+=It+he),It=Math.max(Math.max(It,Tt),It+Tt+he)):(135<b&&(Ne+=At+he),At=Math.max(Math.max(At,Ee),At+Ee+he),It=Ay(y,It,St),0>St&&(St=0)),y.la.h(Ne,St),y.Da.h(At,It)}}vr.prototype.customAlignment=function(a,y,x,b,E){return[y,x,b,E]};function cx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new sn(b,0,E,te);if(ne===1)return y=x[0],E=y.Da.width,te=y.Da.height,new sn(b,0,E,te);for(var se=y.nodeSpacing,he=y.rowSpacing,_e=wu(y)===90,Ee=0,Ne=0,He=0,Ye=0;Ye<ne;Ye++)if(!(Ye%2!==0||1<ne&&Ye===ne-1)){var Qe=x[Ye],st=Qe.Da,Pt=Ee===0?0:he;if(_e){var St=a.computeBusNodeSpacing(Qe)-se;Qe.S.h(b-(st.width+St),He+Pt),E=Math.max(E,st.width+St),te=Math.max(te,He+Pt+st.height),He+=Pt+st.height}else St=a.computeBusNodeSpacing(Qe)-se,Qe.S.h(Ne+Pt,b-(st.height+St)),te=Math.max(te,st.height+St),E=Math.max(E,Ne+Pt+st.width),Ne+=Pt+st.width;Ee++}for(Ee=0,Qe=Ne,Ye=He,_e?(Ne=b+se,He=0):(Ne=0,He=b+se),st=0;st<ne;st++)if(st%2!==0){Pt=x[st],St=Pt.Da;var Tt=Ee===0?0:he;if(_e){var At=a.computeBusNodeSpacing(Pt)-se;Pt.S.h(Ne+At,He+Tt),E=Math.max(E,Ne+St.width+At),te=Math.max(te,He+Tt+St.height),He+=Tt+St.height}else At=a.computeBusNodeSpacing(Pt)-se,Pt.S.h(Ne+Tt,He+At),E=Math.max(E,Ne+Tt+St.width),te=Math.max(te,He+St.height+At),Ne+=Tt+St.width;Ee++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,_e?Math.max(Math.abs(Ye),Math.abs(He)):Math.max(Math.abs(Qe),Math.abs(Ne))),_e?(x.S.h(b+se/2-x.focus.x-x.la.x,te+a),_e=b+se/2-x.focus.x-x.la.x,E=Math.max(E,_e+ne.width),0>_e&&(E-=_e),te=Math.max(te,Math.max(Ye,He)+a+ne.height),0>x.S.x&&(b=O0(y,x.S.x,!1,b,se))):(x.S.h(E+a,b+se/2-x.focus.y-x.la.y),E=Math.max(E,Math.max(Qe,Ne)+a+ne.width),He=b+se/2-x.focus.y-x.la.y,te=Math.max(te,He+ne.height),0>He&&(te-=He),0>x.S.y&&(b=O0(y,x.S.y,!0,b,se)))),new sn(b,0,E,te)}function dx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new sn(b,0,E,te);if(ne===1)return x=x[0],E=x.Da.width,te=x.Da.height,new sn(b,0,E,te);for(var se=y.nodeSpacing,he=y.rowSpacing,_e=wu(y)===270,Ee=0,Ne=0,He=0,Ye=0;Ye<ne;Ye++)if(!(Ye%2!==0||1<ne&&Ye===ne-1)){var Qe=x[Ye],st=Qe.Da,Pt=Ee===0?0:he;if(_e){var St=a.computeBusNodeSpacing(Qe)-se;He-=Pt+st.height,Qe.S.h(b-(st.width+St),He),E=Math.max(E,st.width+St),te=Math.max(te,Math.abs(He))}else St=a.computeBusNodeSpacing(Qe)-se,Ne-=Pt+st.width,Qe.S.h(Ne,b-(st.height+St)),te=Math.max(te,st.height+St),E=Math.max(E,Math.abs(Ne));Ee++}for(Ee=0,Qe=Ne,Ye=He,_e?(Ne=b+se,He=0):(Ne=0,He=b+se),st=0;st<ne;st++)if(st%2!==0){Pt=x[st],St=Pt.Da;var Tt=Ee===0?0:he;if(_e){var At=a.computeBusNodeSpacing(Pt)-se;He-=Tt+St.height,Pt.S.h(Ne+At,He),E=Math.max(E,Ne+St.width+At),te=Math.max(te,Math.abs(He))}else At=a.computeBusNodeSpacing(Pt)-se,Ne-=Tt+St.width,Pt.S.h(Ne,He+At),te=Math.max(te,He+St.height+At),E=Math.max(E,Math.abs(Ne));Ee++}for(1<ne&&ne%2===1&&(he=x[ne-1],Ee=he.Da,a=a.computeBusLastRowSpacing(he,_e?Math.max(Math.abs(Ye),Math.abs(He)):Math.max(Math.abs(Qe),Math.abs(Ne))),_e?(he.S.h(b+se/2-he.focus.x-he.la.x,-te-Ee.height-a),Ne=b+se/2-he.focus.x-he.la.x,E=Math.max(E,Ne+Ee.width),0>Ne&&(E-=Ne),te=Math.max(te,Math.abs(Math.min(Ye,He))+a+Ee.height),0>he.S.x&&(b=O0(y,he.S.x,!1,b,se))):(he.S.h(-E-Ee.width-a,b+se/2-he.focus.y-he.la.y),E=Math.max(E,Math.abs(Math.min(Qe,Ne))+a+Ee.width),He=b+se/2-he.focus.y-he.la.y,te=Math.max(te,He+Ee.height),0>He&&(te-=He),0>he.S.y&&(b=O0(y,he.S.y,!0,b,se)))),y=0;y<ne;y++)se=x[y],_e?se.S.h(se.S.x,se.S.y+te):se.S.h(se.S.x+E,se.S.y);return new sn(b,0,E,te)}vr.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},vr.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function O0(a,y,x,b,E){a=a.children;for(var te=a.length,ne=0;ne<te;ne++)x?a[ne].S.h(a[ne].S.x,a[ne].S.y-y):a[ne].S.h(a[ne].S.x-y,a[ne].S.y);return y=a[te-1],Math.max(b,x?y.la.y+y.focus.y-E/2:y.la.x+y.focus.x-E/2)}function Ty(a,y,x){switch(a.alignment){case of:case op:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case yh:return a.width>y?a.width:y;case Sh:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case sc:case xh:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case ac:return a.width-a.focus.x+a.nodeSpacing/2+y;case Rh:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ay(a,y,x){switch(a.alignment){case of:case op:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case yh:return a.height>y?a.height:y;case Sh:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case sc:case xh:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case ac:return a.height-a.focus.y+a.nodeSpacing/2+y;case Rh:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Ny(a,y,x){switch(a){case op:y/=2,x/=2;break;case of:y/=2,x/=2;break;case yh:x=y=0;break;case Sh:break;default:Lt("Unhandled alignment value "+a.toString())}return new ft(y,x)}function _d(a,y,x,b,E,te){y=Ny(y,x,b),nf(a,y.x,y.y,E,te)}function nf(a,y,x,b,E){if(y!==0||x!==0)for(a=a.children;b<=E;b++){var te=a[b].S;te.x+=y,te.y+=x}}function I0(a,y,x,b){var E=y.parent;switch(a.ud){case vh:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case rf:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:Lt("Unhandled path value "+a.ud.toString())}}function R0(a,y,x){for(var b=0;b<a.length;b++){var E=a[b];E.x+=y,E.y+=x}}function fx(a,y,x,b,E,te,ne,se){var he=wu(y),_e=he===90||he===270,Ee=y.nodeSpacing;y=b;var Ne=E;b=te;var He=ne,Ye=x.Yo,Qe=x.kp;ne=x.Da;var st=_e?Math.max(He,ne.height):Math.max(b,ne.width);if((Ye===null||he!==wu(x))&&(Ye=ll(a,2),Qe=ll(a,2),_e?(Ye[0].h(0,0),Ye[1].h(0,ne.height),Qe[0].h(ne.width,0),Qe[1].h(Qe[0].x,Ye[1].y)):(Ye[0].h(0,0),Ye[1].h(ne.width,0),Qe[0].h(0,ne.height),Qe[1].h(Ye[1].x,Qe[0].y))),_e){if(He=9999999,!(Ne===null||2>Ne.length||Ye===null||2>Ye.length))for(E=x=0;x<Ne.length&&E<Ye.length;){te=Ne[x];var Pt=Ye[E];he=Pt.x,_e=Pt.y,he+=b;var St=te;x+1<Ne.length&&(St=Ne[x+1]);var Tt=Pt;Pt=Tt.x,Tt=Tt.y,E+1<Ye.length&&(Tt=Ye[E+1],Pt=Tt.x,Tt=Tt.y,Pt+=b);var At=He;te.y===_e?At=he-te.x:te.y>_e&&te.y<Tt?At=he+(te.y-_e)/(Tt-_e)*(Pt-he)-te.x:_e>te.y&&_e<St.y&&(At=he-(te.x+(_e-te.y)/(St.y-te.y)*(St.x-te.x))),At<He&&(He=At),St.y<=te.y?x++:Tt<=_e?E++:(St.y<=Tt&&x++,Tt<=St.y&&E++)}if(He=b-He,He+=Ee,x=Ye,E=He,y===null||2>y.length||x===null||2>x.length)b=null;else{for(Ee=ll(a,y.length+x.length),b=te=he=0;te<x.length&&x[te].y<y[0].y;)_e=x[te++],Ee[b++].h(_e.x+E,_e.y);for(;he<y.length;)_e=y[he++],Ee[b++].h(_e.x,_e.y);for(he=y[y.length-1].y;te<x.length&&x[te].y<=he;)te++;for(;te<x.length&&x[te].y>he;)_e=x[te++],Ee[b++].h(_e.x+E,_e.y);for(x=ll(a,b),he=0;he<b;he++)x[he].assign(Ee[he]);Ru(a,Ee),b=x}if(te=Qe,he=He,Ne===null||2>Ne.length||te===null||2>te.length)E=null;else{for(Ee=ll(a,Ne.length+te.length),E=_e=x=0;x<Ne.length&&Ne[x].y<te[0].y;)St=Ne[x++],Ee[E++].h(St.x,St.y);for(;_e<te.length;)St=te[_e++],Ee[E++].h(St.x+he,St.y);for(te=te[te.length-1].y;x<Ne.length&&Ne[x].y<=te;)x++;for(;x<Ne.length&&Ne[x].y>te;)he=Ne[x++],Ee[E++].h(he.x,he.y);for(te=ll(a,E),x=0;x<E;x++)te[x].assign(Ee[x]);Ru(a,Ee),E=te}return te=Math.max(0,He)+ne.width,ne=st,Ru(a,y),Ru(a,Ye),Ru(a,Ne),Ru(a,Qe),se[0]=b,se[1]=E,new sn(He,0,te,ne)}if(b=9999999,!(Ne===null||2>Ne.length||Ye===null||2>Ye.length))for(E=x=0;x<Ne.length&&E<Ye.length;)te=Ne[x],Pt=Ye[E],he=Pt.x,_e=Pt.y,_e+=He,St=te,x+1<Ne.length&&(St=Ne[x+1]),Tt=Pt,Pt=Tt.x,Tt=Tt.y,E+1<Ye.length&&(Tt=Ye[E+1],Pt=Tt.x,Tt=Tt.y,Tt+=He),At=b,te.x===he?At=_e-te.y:te.x>he&&te.x<Pt?At=_e+(te.x-he)/(Pt-he)*(Tt-_e)-te.y:he>te.x&&he<St.x&&(At=_e-(te.y+(he-te.x)/(St.x-te.x)*(St.y-te.y))),At<b&&(b=At),St.x<=te.x?x++:Pt<=he?E++:(St.x<=Pt&&x++,Pt<=St.x&&E++);if(He-=b,He+=Ee,x=Ye,E=He,y===null||2>y.length||x===null||2>x.length)b=null;else{for(Ee=ll(a,y.length+x.length),b=te=he=0;te<x.length&&x[te].x<y[0].x;)_e=x[te++],Ee[b++].h(_e.x,_e.y+E);for(;he<y.length;)_e=y[he++],Ee[b++].h(_e.x,_e.y);for(he=y[y.length-1].x;te<x.length&&x[te].x<=he;)te++;for(;te<x.length&&x[te].x>he;)_e=x[te++],Ee[b++].h(_e.x,_e.y+E);for(x=ll(a,b),he=0;he<b;he++)x[he].assign(Ee[he]);Ru(a,Ee),b=x}if(te=Qe,he=He,Ne===null||2>Ne.length||te===null||2>te.length)E=null;else{for(Ee=ll(a,Ne.length+te.length),E=_e=x=0;x<Ne.length&&Ne[x].x<te[0].x;)St=Ne[x++],Ee[E++].h(St.x,St.y);for(;_e<te.length;)St=te[_e++],Ee[E++].h(St.x,St.y+he);for(te=te[te.length-1].x;x<Ne.length&&Ne[x].x<=te;)x++;for(;x<Ne.length&&Ne[x].x>te;)he=Ne[x++],Ee[E++].h(he.x,he.y);for(te=ll(a,E),x=0;x<E;x++)te[x].assign(Ee[x]);Ru(a,Ee),E=te}return te=st,ne=Math.max(0,He)+ne.height,Ru(a,y),Ru(a,Ye),Ru(a,Ne),Ru(a,Qe),se[0]=b,se[1]=E,new sn(He,0,te,ne)}function ll(a,y){if(a=a.ru[y],a!==void 0&&(a=a.pop(),a!==void 0))return a;a=[];for(var x=0;x<y;x++)a[x]=new ft;return a}function Ru(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}vr.prototype.arrangeTrees=function(){if(this.Rb===U0)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof ru){var x=y.node;if(x!==null){var b=x.position;x=b.x,b=b.y,isFinite(x)||(x=0),isFinite(b)||(b=0),Dy(this,y,x,b)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof ru&&a.push(x);switch(this.sorting){case rp:break;case Ig:a.reverse();break;case Rg:a.sort(this.comparer);break;case Fg:a.sort(this.comparer),a.reverse();break;default:Lt("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,b=0;b<a.length;b++){var E=a[b];switch(Dy(this,E,y+E.la.x,x+E.la.y),this.Rb){case z0:x+=E.Da.height+this.$d.height;break;case Fy:y+=E.Da.width+this.$d.width;break;default:Lt("Unhandled arrangement value "+this.Rb.toString())}}}};function Dy(a,y,x,b){if(y!==null){y.x=x,y.y=b,y=y.children;for(var E=y.length,te=0;te<E;te++){var ne=y[te];Dy(a,ne,x+ne.S.x,b+ne.S.y)}}}vr.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},vr.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},vr.prototype.Gu=function(){if(this.layerStyle===H0){for(var a=this.$v,y=[],x=null,b=this.network.vertexes.iterator;b.next();){var E=b.value;x===null?x=E.bounds.copy():x.ed(E.bounds);var te=y[E.level];te===void 0?te=this.computeLayerSpacing(E):te=Math.max(te,this.computeLayerSpacing(E)),y[E.level]=te}for(b=0;b<y.length;b++)y[b]===void 0&&(y[b]=0);if(this.angle===90||this.angle===270?(x.Bc(this.nodeSpacing/2,this.layerSpacing),b=new ft(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new ft(-this.layerSpacing/2,-this.nodeSpacing/2)),E=[],x=this.angle===90||this.angle===270?x.width:x.height,te=0,this.angle===180||this.angle===270)for(var ne=0;ne<a.length;ne++)te+=a[ne]+y[ne];for(ne=0;ne<a.length;ne++){var se=a[ne]+y[ne];this.angle===270?(te-=se,E.push(new sn(0,te,x,se))):this.angle===90?(E.push(new sn(0,te,x,se)),te+=se):this.angle===180?(te-=se,E.push(new sn(te,0,se,x))):(E.push(new sn(te,0,se,x)),te+=se)}this.commitLayers(E,b)}},vr.prototype.commitLayers=function(){},vr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},vr.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof ru&&px(this,y)}};function px(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,b=0;b<x;b++)px(a,y[b])}}vr.prototype.setPortSpots=function(a){var y=a.alignment;if(Wc(y)){var x=this.ud===vh,b=wu(a);switch(b){case 0:var E=Os;break;case 90:E=$s;break;case 180:E=ma;break;default:E=ua}var te=a.children,ne=te.length;switch(y){case sc:case xh:for(y=0;y<ne;y++){var se=te[y];if(se=(x?se.sourceEdges:se.destinationEdges).first(),se!==null&&(se=se.link,se!==null)){var he=b===90||b===270?ma:ua;if(ne===1||y===ne-1&&ne%2===1)switch(b){case 0:he=ma;break;case 90:he=ua;break;case 180:he=Os;break;default:he=$s}else y%2===0&&(he=b===90||b===270?Os:$s);x?(a.setsPortSpot&&(se.fromSpot=E),a.setsChildPortSpot&&(se.toSpot=he)):(a.setsPortSpot&&(se.fromSpot=he),a.setsChildPortSpot&&(se.toSpot=E))}}break;case ac:for(b=b===90||b===270?Os:$s,te=x?a.destinationEdges:a.sourceEdges;te.next();)ne=te.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)):(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)));break;case Rh:for(b=b===90||b===270?ma:ua,te=x?a.destinationEdges:a.sourceEdges;te.next();)ne=te.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)):(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)))}}else if(x=wu(a),this.ud===vh){for(E=a.destinationEdges;E.next();)if(b=E.value.link,b!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:b.fromSpot=Os;break;case 90:b.fromSpot=$s;break;case 180:b.fromSpot=ma;break;default:b.fromSpot=ua}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=ma;break;case 90:b.toSpot=ua;break;case 180:b.toSpot=Os;break;default:b.toSpot=$s}else b.toSpot=a.childPortSpot}}else for(E=a.sourceEdges;E.next();)if(b=E.value.link,b!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:b.toSpot=Os;break;case 90:b.toSpot=$s;break;case 180:b.toSpot=ma;break;default:b.toSpot=ua}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=ma;break;case 90:b.fromSpot=ua;break;case 180:b.fromSpot=Os;break;default:b.fromSpot=$s}else b.fromSpot=a.childPortSpot}};function wu(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}vr.prototype.computeLayerSpacing=function(a){var y=wu(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var b=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*b:a.width*b}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},vr.prototype.computeNodeIndent=function(a){var y=wu(a),x=a.nodeIndent;if(0<a.nodeIndentPastParent){var b=Math.min(1,a.nodeIndentPastParent);x+=y===90||y===270?a.width*b:a.height*b}return x=Math.max(0,x)},ot.Object.defineProperties(vr.prototype,{roots:{get:function(){return this.Ub},set:function(a){this.Ub!==a&&(this.Ub=a,this.C())}},path:{get:function(){return this.Wn},set:function(a){this.Wn!==a&&(this.Wn=a,this.C())}},treeStyle:{get:function(){return this.vo},set:function(a){this.Rb===a||a!==j0&&a!==Iy&&a!==Oy&&a!==Ry||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==By&&a!==jy&&a!==H0||(this.Bq=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==z0&&a!==Fy&&a!==U0||(this.Rb=a,this.C())}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},rootDefaults:{get:function(){return this.W},set:function(a){this.W!==a&&(this.W=a,this.C())}},alternateDefaults:{get:function(){return this.Y},set:function(a){this.Y!==a&&(this.Y=a,this.C())}},sorting:{get:function(){return this.W.sorting},set:function(a){this.W.sorting===a||a!==rp&&a!==Ig&&a!==Rg&&!Fg||(this.W.sorting=a,this.C())}},comparer:{get:function(){return this.W.comparer},set:function(a){this.W.comparer!==a&&(this.W.comparer=a,this.C())}},angle:{get:function(){return this.W.angle},set:function(a){this.W.angle!==a&&(a===0||a===90||a===180||a===270?(this.W.angle=a,this.C()):Lt("TreeLayout.angle must be 0, 90, 180, or 270"))}},alignment:{get:function(){return this.W.alignment},set:function(a){this.W.alignment!==a&&(this.W.alignment=a,this.C())}},nodeIndent:{get:function(){return this.W.nodeIndent},set:function(a){this.W.nodeIndent!==a&&0<=a&&(this.W.nodeIndent=a,this.C())}},nodeIndentPastParent:{get:function(){return this.W.nodeIndentPastParent},set:function(a){this.W.nodeIndentPastParent!==a&&0<=a&&1>=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!==B0&&a!==Bg||(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!==rp&&a!==Ig&&a!==Rg&&!Fg||(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!==B0&&a!==Bg||(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 F0=new nn(vr,"PathDefault",-1),vh=new nn(vr,"PathDestination",0),rf=new nn(vr,"PathSource",1),rp=new nn(vr,"SortingForwards",10),Ig=new nn(vr,"SortingReverse",11),Rg=new nn(vr,"SortingAscending",12),Fg=new nn(vr,"SortingDescending",13),op=new nn(vr,"AlignmentCenterSubtrees",20),of=new nn(vr,"AlignmentCenterChildren",21),yh=new nn(vr,"AlignmentStart",22),Sh=new nn(vr,"AlignmentEnd",23),sc=new nn(vr,"AlignmentBus",24),xh=new nn(vr,"AlignmentBusBranching",25),ac=new nn(vr,"AlignmentTopLeftBus",26),Rh=new nn(vr,"AlignmentBottomRightBus",27),B0=new nn(vr,"CompactionNone",30),Bg=new nn(vr,"CompactionBlock",31),j0=new nn(vr,"StyleLayered",40),Oy=new nn(vr,"StyleLastParents",41),Iy=new nn(vr,"StyleAlternating",42),Ry=new nn(vr,"StyleRootOnly",43),z0=new nn(vr,"ArrangementVertical",50),Fy=new nn(vr,"ArrangementHorizontal",51),U0=new nn(vr,"ArrangementFixedRoots",52),By=new nn(vr,"LayerIndividual",60),jy=new nn(vr,"LayerSiblings",61),H0=new nn(vr,"LayerUniform",62);vr.className="TreeLayout",vr.PathDefault=F0,vr.PathDestination=vh,vr.PathSource=rf,vr.SortingForwards=rp,vr.SortingReverse=Ig,vr.SortingAscending=Rg,vr.SortingDescending=Fg,vr.AlignmentCenterSubtrees=op,vr.AlignmentCenterChildren=of,vr.AlignmentStart=yh,vr.AlignmentEnd=Sh,vr.AlignmentBus=sc,vr.AlignmentBusBranching=xh,vr.AlignmentTopLeftBus=ac,vr.AlignmentBottomRightBus=Rh,vr.CompactionNone=B0,vr.CompactionBlock=Bg,vr.StyleLayered=j0,vr.StyleLastParents=Oy,vr.StyleAlternating=Iy,vr.StyleRootOnly=Ry,vr.ArrangementVertical=z0,vr.ArrangementHorizontal=Fy,vr.ArrangementFixedRoots=U0,vr.LayerIndividual=By,vr.LayerSiblings=jy,vr.LayerUniform=H0;function sf(a){Mo.call(this,a)}Je(sf,Mo),sf.prototype.createVertex=function(){return new ru(this)},sf.prototype.createEdge=function(){return new sp(this)},sf.className="TreeNetwork";function ru(a){Ts.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 ft(0,0),this.Da=new wn(0,0),this.la=new ft(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=rp,this.hd=oy,this.Kb=0,this.Jb=of,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Bg,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=As,this.wr=!0,this.Dp=As}Je(ru,Ts),ru.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)},ot.Object.defineProperties(ru.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;x<y;x++);this.u=a}}},level:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},descendantCount:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}},maxChildrenCount:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},maxGenerationCount:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a)}},comments:{get:function(){return this.td},set:function(a){if(this.td!==a){if(a!==null)for(var y=a.length,x=0;x<y;x++);this.td=a}}},sorting:{get:function(){return this.nd},set:function(a){this.nd!==a&&(this.nd=a)}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a)}},angle:{get:function(){return this.Kb},set:function(a){this.Kb!==a&&(this.Kb=a)}},alignment:{get:function(){return this.Jb},set:function(a){this.Jb!==a&&(this.Jb=a)}},nodeIndent:{get:function(){return this.Uq},set:function(a){this.Uq!==a&&(this.Uq=a)}},nodeIndentPastParent:{get:function(){return this.Vq},set:function(a){this.Vq!==a&&(this.Vq=a)}},nodeSpacing:{get:function(){return this.Wq},set:function(a){this.Wq!==a&&(this.Wq=a)}},layerSpacing:{get:function(){return this.ie},set:function(a){this.ie!==a&&(this.ie=a)}},layerSpacingParentOverlap:{get:function(){return this.Aq},set:function(a){this.Aq!==a&&(this.Aq=a)}},compaction:{get:function(){return this.Hp},set:function(a){this.Hp!==a&&(this.Hp=a)}},breadthLimit:{get:function(){return this.Ap},set:function(a){this.Ap!==a&&(this.Ap=a)}},rowSpacing:{get:function(){return this.nr},set:function(a){this.nr!==a&&(this.nr=a)}},rowIndent:{get:function(){return this.mr},set:function(a){this.mr!==a&&(this.mr=a)}},commentSpacing:{get:function(){return this.Gp},set:function(a){this.Gp!==a&&(this.Gp=a)}},commentMargin:{get:function(){return this.Fp},set:function(a){this.Fp!==a&&(this.Fp=a)}},setsPortSpot:{get:function(){return this.xr},set:function(a){this.xr!==a&&(this.xr=a)}},portSpot:{get:function(){return this.dr},set:function(a){this.dr.D(a)||(this.dr=a)}},setsChildPortSpot:{get:function(){return this.wr},set:function(a){this.wr!==a&&(this.wr=a)}},childPortSpot:{get:function(){return this.Dp},set:function(a){this.Dp.D(a)||(this.Dp=a)}},childrenCount:{get:function(){return this.children.length}},relativePosition:{get:function(){return this.S},set:function(a){this.S.set(a)}},subtreeSize:{get:function(){return this.Da},set:function(a){this.Da.set(a)}},subtreeOffset:{get:function(){return this.la},set:function(a){this.la.set(a)}}}),ru.className="TreeVertex";function sp(a){yl.call(this,a),this.$t=new ft(0,0)}Je(sp,yl),sp.prototype.commit=function(){var a=this.link;if(a!==null&&!a.isAvoiding){var y=this.network.layout,x=null,b=null;switch(y.ud){case vh:x=this.fromVertex,b=this.toVertex;break;case rf:x=this.toVertex,b=this.fromVertex;break;default:Lt("Unhandled path value "+y.ud.toString())}if(x!==null&&b!==null){var E=this.$t;if(E.x!==0||E.y!==0||x.qA){b=x.bounds;var te=wu(x),ne=y.computeLayerSpacing(x),se=x.rowSpacing;a.vg();var he=a.curve===Al,_e=a.isOrthogonal,Ee;if(a.uh(),_e||he){for(Ee=2;4<a.pointsCount;)a.pv(2);var Ne=a.i(1),He=a.i(2)}else{for(Ee=1;3<a.pointsCount;)a.pv(1);Ne=a.i(0),He=a.i(a.pointsCount-1)}var Ye=a.i(a.pointsCount-1);te===0?(x.alignment===Sh?(te=b.bottom+E.y,E.y===0&&Ne.y>Ye.y+x.rowIndent&&(te=Math.min(te,Math.max(Ne.y,te-y.computeNodeIndent(x))))):x.alignment===yh?(te=b.top+E.y,E.y===0&&Ne.y<Ye.y-x.rowIndent&&(te=Math.max(te,Math.min(Ne.y,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,he?(a.m(Ee,Ne.x,te),Ee++,a.m(Ee,b.right+ne,te),Ee++,a.m(Ee,b.right+ne+(E.x-se)/3,te),Ee++,a.m(Ee,b.right+ne+2*(E.x-se)/3,te),Ee++,a.m(Ee,b.right+ne+(E.x-se),te),Ee++,a.m(Ee,He.x,te)):(_e&&(a.m(Ee,b.right+ne/2,Ne.y),Ee++),a.m(Ee,b.right+ne/2,te),Ee++,a.m(Ee,b.right+ne+E.x-(_e?se/2:se),te),Ee++,_e&&a.m(Ee,a.i(Ee-1).x,He.y))):te===90?(x.alignment===Sh?(te=b.right+E.x,E.x===0&&Ne.x>Ye.x+x.rowIndent&&(te=Math.min(te,Math.max(Ne.x,te-y.computeNodeIndent(x))))):x.alignment===yh?(te=b.left+E.x,E.x===0&&Ne.x<Ye.x-x.rowIndent&&(te=Math.max(te,Math.min(Ne.x,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,he?(a.m(Ee,te,Ne.y),Ee++,a.m(Ee,te,b.bottom+ne),Ee++,a.m(Ee,te,b.bottom+ne+(E.y-se)/3),Ee++,a.m(Ee,te,b.bottom+ne+2*(E.y-se)/3),Ee++,a.m(Ee,te,b.bottom+ne+(E.y-se)),Ee++,a.m(Ee,te,He.y)):(_e&&(a.m(Ee,Ne.x,b.bottom+ne/2),Ee++),a.m(Ee,te,b.bottom+ne/2),Ee++,a.m(Ee,te,b.bottom+ne+E.y-(_e?se/2:se)),Ee++,_e&&a.m(Ee,He.x,a.i(Ee-1).y))):te===180?(x.alignment===Sh?(te=b.bottom+E.y,E.y===0&&Ne.y>Ye.y+x.rowIndent&&(te=Math.min(te,Math.max(Ne.y,te-y.computeNodeIndent(x))))):x.alignment===yh?(te=b.top+E.y,E.y===0&&Ne.y<Ye.y-x.rowIndent&&(te=Math.max(te,Math.min(Ne.y,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,he?(a.m(Ee,Ne.x,te),Ee++,a.m(Ee,b.left-ne,te),Ee++,a.m(Ee,b.left-ne+(E.x+se)/3,te),Ee++,a.m(Ee,b.left-ne+2*(E.x+se)/3,te),Ee++,a.m(Ee,b.left-ne+(E.x+se),te),Ee++,a.m(Ee,He.x,te)):(_e&&(a.m(Ee,b.left-ne/2,Ne.y),Ee++),a.m(Ee,b.left-ne/2,te),Ee++,a.m(Ee,b.left-ne+E.x+(_e?se/2:se),te),Ee++,_e&&a.m(Ee,a.i(Ee-1).x,He.y))):te===270?(x.alignment===Sh?(te=b.right+E.x,E.x===0&&Ne.x>Ye.x+x.rowIndent&&(te=Math.min(te,Math.max(Ne.x,te-y.computeNodeIndent(x))))):x.alignment===yh?(te=b.left+E.x,E.x===0&&Ne.x<Ye.x-x.rowIndent&&(te=Math.max(te,Math.min(Ne.x,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,he?(a.m(Ee,te,Ne.y),Ee++,a.m(Ee,te,b.top-ne),Ee++,a.m(Ee,te,b.top-ne+(E.y+se)/3),Ee++,a.m(Ee,te,b.top-ne+2*(E.y+se)/3),Ee++,a.m(Ee,te,b.top-ne+(E.y+se)),Ee++,a.m(Ee,te,He.y)):(_e&&(a.m(Ee,Ne.x,b.top-ne/2),Ee++),a.m(Ee,te,b.top-ne/2),Ee++,a.m(Ee,te,b.top-ne+E.y+(_e?se/2:se)),Ee++,_e&&a.m(Ee,He.x,a.i(Ee-1).y))):Lt("Invalid angle "+te),a.zf()}else E=b,a=this.link,b=this.network.layout,y=wu(x),y!==wu(E)&&(ne=b.computeLayerSpacing(x),se=x.bounds,x=E.bounds,y===0&&x.left-se.right<ne+1||y===90&&x.top-se.bottom<ne+1||y===180&&se.left-x.right<ne+1||y===270&&se.top-x.bottom<ne+1||(a.vg(),x=a.curve===Al,E=a.isOrthogonal,b=Wc(this.fromVertex.alignment),a.uh(),y===0?(y=se.right+ne/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y-20,a.i(1).y),a.m(2,y-20,x),a.m(3,y,x),a.m(4,y+20,x),a.L(5,a.i(5).x,x)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===90?(y=se.bottom+ne/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y-20),a.m(2,x,y-20),a.m(3,x,y),a.m(4,x,y+20),a.L(5,x,a.i(5).y)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)):y===180?(y=se.left-ne/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y+20,a.i(1).y),a.m(2,y+20,x),a.m(3,y,x),a.m(4,y-20,x),a.L(5,a.i(5).x,x)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===270&&(y=se.top-ne/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y+20),a.m(2,x,y+20),a.m(3,x,y),a.m(4,x,y-20),a.L(5,x,a.i(5).y)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)),a.zf()))}}},ot.Object.defineProperties(sp.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)}},relativePoint:{get:function(){return this.$t},set:function(a){this.$t.set(a)}}}),sp.className="TreeEdge",bo.prototype.initializeStandardTools=function(){this.gb("Action",new ji,this.mouseDownTools),this.gb("Relinking",new wr,this.mouseDownTools),this.gb("LinkReshaping",new Wi,this.mouseDownTools),this.gb("Rotating",new zr,this.mouseDownTools),this.gb("Resizing",new Co,this.mouseDownTools),this.gb("Linking",new ai,this.mouseMoveTools),this.gb("Dragging",new Ho,this.mouseMoveTools),this.gb("DragSelecting",new mo,this.mouseMoveTools),this.gb("Panning",new Oo,this.mouseMoveTools),this.gb("ContextMenu",new Fo,this.mouseUpTools),this.gb("TextEditing",new ao,this.mouseUpTools),this.gb("ClickCreating",new $o,this.mouseUpTools),this.gb("ClickSelecting",new Ko,this.mouseUpTools)},Yu("Horizontal",new vm),Yu("Spot",new Sm),Yu("Table",new wm),Yu("Viewbox",new Pm),Yu("TableRow",new _m),Yu("TableColumn",new bm),Yu("Graduated",new eg),Yu("Grid",new $p),kf.add("GraphLinksModel",Ws),kf.add("TreeModel",Gl);var G0=jt.go,zy={get licenseKey(){return rn.licenseKey},set licenseKey(a){rn.licenseKey=a},get version(){return rn.version},Group:Ki,EnumValue:nn,List:Ln,Set:kn,Map:on,Point:ft,Size:wn,Rect:sn,Margin:nr,Spot:ui,Geometry:In,PathFigure:ps,PathSegment:Rr,InputEvent:ea,DiagramEvent:Eu,ChangedEvent:Io,Model:gi,GraphLinksModel:kr,TreeModel:Ga,Binding:ms,Transaction:cs,UndoManager:No,CommandHandler:bt,Tool:Ar,DraggingTool:Ho,DraggingInfo:Th,DraggingOptions:ce,LinkingBaseTool:qt,LinkingTool:ai,RelinkingTool:wr,LinkReshapingTool:Wi,ResizingTool:Co,RotatingTool:zr,ClickSelectingTool:Ko,ActionTool:ji,ClickCreatingTool:$o,HTMLInfo:Ks,ContextMenuTool:Fo,DragSelectingTool:mo,PanningTool:Oo,TextEditingTool:ao,ToolManager:bo,Animation:ca,AnimationManager:Gs,AnimationTrigger:fu,Layer:Xs,Diagram:rn,Palette:Te,Overview:Fe,Brush:no,GraphObject:Zt,Panel:Dn,RowColumnDefinition:Es,Shape:ir,TextBlock:Lo,Picture:$a,Part:Ci,Adornment:Fr,Node:qn,Link:Bn,Placeholder:ja,Layout:Zo,LayoutNetwork:Mo,LayoutVertex:Ts,LayoutEdge:yl,GridLayout:ia,PanelLayout:ks,CircularLayout:Qo,CircularNetwork:tp,CircularVertex:Mg,CircularEdge:b0,ForceDirectedLayout:fa,ForceDirectedNetwork:tf,ForceDirectedVertex:kg,ForceDirectedEdge:Tg,LayeredDigraphLayout:ro,LayeredDigraphNetwork:ip,LayeredDigraphVertex:Zl,LayeredDigraphEdge:Dg,TreeLayout:vr,TreeNetwork:sf,TreeVertex:ru,TreeEdge:sp};typeof G0=="object"&&G0.version&&Sn("WARNING: a `go` object on the root object is already defined. "+("Debug"in G0?"debug ":"")+"version: "+G0.version+", replaced with version: "+zy.version),rn.prototype.go=zy,jt.go=zy,typeof xn.exports=="object"&&(xn.exports=typeof Ie.g!="undefined"?Ie.g.go:self.go)}();var Le=typeof Ie.g!="undefined"?Ie.g.go:self.go;const Se=typeof Ie.g!="undefined"?Ie.g.go:self.go,je=Se.Group,Me=Se.EnumValue,Ce=Se.List,xe=Se.Set,be=Se.Map,ye=Se.Point,we=Se.Size,pe=Se.Rect,de=Se.Margin,ge=Se.Spot,fe=Se.Geometry,ue=Se.PathFigure,ee=Se.PathSegment,z=Se.InputEvent,oe=Se.DiagramEvent,re=Se.ChangedEvent,ae=Se.Model,le=Se.GraphLinksModel,me=Se.TreeModel,ve=Se.Binding,Pe=Se.Transaction,Ae=Se.UndoManager,De=Se.CommandHandler,Oe=Se.Tool,Ze=Se.DraggingTool,qe=Se.DraggingInfo,Xe=Se.LinkingBaseTool,mt=Se.LinkingTool,pt=Se.RelinkingTool,Mt=Se.LinkReshapingTool,at=Se.ResizingTool,_t=Se.RotatingTool,dt=Se.ClickSelectingTool,Rt=Se.ActionTool,ut=Se.ClickCreatingTool,rt=Se.HTMLInfo,ct=Se.ContextMenuTool,yt=Se.DragSelectingTool,wt=Se.PanningTool,xt=Se.TextEditingTool,Ut=Se.ToolManager,zt=Se.Animation,dn=Se.AnimationManager,Ft=Se.AnimationTrigger,Dt=Se.Layer,Qt=Se.Diagram,Yt=Se.Palette,Jt=Se.Overview,lt=Se.Brush,Ue=Se.GraphObject,Be=Se.Panel,tt=Se.RowColumnDefinition,ht=Se.Shape,et=Se.TextBlock,Ve=Se.TextBlockMetrics,Re=Se.Picture,ze=Se.Part,it=Se.Adornment,Ke=Se.Node,We=Se.Link,vt=Se.Placeholder,kt=Se.Layout,hn=Se.LayoutNetwork,en=Se.LayoutVertex,Gt=Se.LayoutEdge,gn=Se.GridLayout,bn=Se.PanelLayout,yn=Se.CircularLayout,un=Se.CircularNetwork,Jn=Se.CircularVertex,mn=Se.CircularEdge,Yn=Se.ForceDirectedLayout,ri=Se.ForceDirectedNetwork,bi=Se.ForceDirectedVertex,jn=Se.ForceDirectedEdge,ki=Se.LayeredDigraphLayout,Hi=Se.LayeredDigraphNetwork,Fi=Se.LayeredDigraphVertex,rr=Se.LayeredDigraphEdge,Cr=Se.TreeLayout,gr=Se.TreeNetwork,Ni=Se.TreeVertex,Ti=Se.TreeEdge,cr=Se.version},24334:function(xn,ln,Ie){var Le,Se;(function(je,Me){xn.exports=Me(je)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof Ie.g!="undefined"?Ie.g:this,function(je){"use strict";je=je||{};var Me=je.Base64,Ce="2.6.4",xe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",be=function(pt){for(var Mt={},at=0,_t=pt.length;at<_t;at++)Mt[pt.charAt(at)]=at;return Mt}(xe),ye=String.fromCharCode,we=function(pt){if(pt.length<2){var Mt=pt.charCodeAt(0);return Mt<128?pt:Mt<2048?ye(192|Mt>>>6)+ye(128|Mt&63):ye(224|Mt>>>12&15)+ye(128|Mt>>>6&63)+ye(128|Mt&63)}else{var Mt=65536+(pt.charCodeAt(0)-55296)*1024+(pt.charCodeAt(1)-56320);return ye(240|Mt>>>18&7)+ye(128|Mt>>>12&63)+ye(128|Mt>>>6&63)+ye(128|Mt&63)}},pe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,de=function(pt){return pt.replace(pe,we)},ge=function(pt){var Mt=[0,2,1][pt.length%3],at=pt.charCodeAt(0)<<16|(pt.length>1?pt.charCodeAt(1):0)<<8|(pt.length>2?pt.charCodeAt(2):0),_t=[xe.charAt(at>>>18),xe.charAt(at>>>12&63),Mt>=2?"=":xe.charAt(at>>>6&63),Mt>=1?"=":xe.charAt(at&63)];return _t.join("")},fe=je.btoa&&typeof je.btoa=="function"?function(pt){return je.btoa(pt)}:function(pt){if(pt.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return pt.replace(/[\s\S]{1,3}/g,ge)},ue=function(pt){return fe(de(String(pt)))},ee=function(pt){return pt.replace(/[+\/]/g,function(Mt){return Mt=="+"?"-":"_"}).replace(/=/g,"")},z=function(pt,Mt){return Mt?ee(ue(pt)):ue(pt)},oe=function(pt){return z(pt,!0)},re;je.Uint8Array&&(re=function(pt,Mt){for(var at="",_t=0,dt=pt.length;_t<dt;_t+=3){var Rt=pt[_t],ut=pt[_t+1],rt=pt[_t+2],ct=Rt<<16|ut<<8|rt;at+=xe.charAt(ct>>>18)+xe.charAt(ct>>>12&63)+(typeof ut!="undefined"?xe.charAt(ct>>>6&63):"=")+(typeof rt!="undefined"?xe.charAt(ct&63):"=")}return Mt?ee(at):at});var ae=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,le=function(pt){switch(pt.length){case 4:var Mt=(7&pt.charCodeAt(0))<<18|(63&pt.charCodeAt(1))<<12|(63&pt.charCodeAt(2))<<6|63&pt.charCodeAt(3),at=Mt-65536;return ye((at>>>10)+55296)+ye((at&1023)+56320);case 3:return ye((15&pt.charCodeAt(0))<<12|(63&pt.charCodeAt(1))<<6|63&pt.charCodeAt(2));default:return ye((31&pt.charCodeAt(0))<<6|63&pt.charCodeAt(1))}},me=function(pt){return pt.replace(ae,le)},ve=function(pt){var Mt=pt.length,at=Mt%4,_t=(Mt>0?be[pt.charAt(0)]<<18:0)|(Mt>1?be[pt.charAt(1)]<<12:0)|(Mt>2?be[pt.charAt(2)]<<6:0)|(Mt>3?be[pt.charAt(3)]:0),dt=[ye(_t>>>16),ye(_t>>>8&255),ye(_t&255)];return dt.length-=[0,0,2,1][at],dt.join("")},Pe=je.atob&&typeof je.atob=="function"?function(pt){return je.atob(pt)}:function(pt){return pt.replace(/\S{1,4}/g,ve)},Ae=function(pt){return Pe(String(pt).replace(/[^A-Za-z0-9\+\/]/g,""))},De=function(pt){return me(Pe(pt))},Oe=function(pt){return String(pt).replace(/[-_]/g,function(Mt){return Mt=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ze=function(pt){return De(Oe(pt))},qe;je.Uint8Array&&(qe=function(pt){return Uint8Array.from(Ae(Oe(pt)),function(Mt){return Mt.charCodeAt(0)})});var Xe=function(){var pt=je.Base64;return je.Base64=Me,pt};if(je.Base64={VERSION:Ce,atob:Ae,btoa:fe,fromBase64:Ze,toBase64:z,utob:de,encode:z,encodeURI:oe,btou:me,decode:Ze,noConflict:Xe,fromUint8Array:re,toUint8Array:qe},typeof Object.defineProperty=="function"){var mt=function(pt){return{value:pt,enumerable:!1,writable:!0,configurable:!0}};je.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",mt(function(){return Ze(this)})),Object.defineProperty(String.prototype,"toBase64",mt(function(pt){return z(this,pt)})),Object.defineProperty(String.prototype,"toBase64URI",mt(function(){return z(this,!0)}))}}return je.Meteor&&(Base64=je.Base64),xn.exports?xn.exports.Base64=je.Base64:(Le=[],Se=function(){return je.Base64}.apply(ln,Le),Se!==void 0&&(xn.exports=Se)),{Base64:je.Base64}})},2859:function(xn,ln,Ie){"use strict";Ie.d(ln,{hP:function(){return Jt}});var Le=function(lt,Ue){return(Le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Be,tt){Be.__proto__=tt}||function(Be,tt){for(var ht in tt)Object.prototype.hasOwnProperty.call(tt,ht)&&(Be[ht]=tt[ht])})(lt,Ue)};function Se(lt,Ue){function Be(){this.constructor=lt}Le(lt,Ue),lt.prototype=Ue===null?Object.create(Ue):(Be.prototype=Ue.prototype,new Be)}function je(lt,Ue,Be,tt){return new(Be||(Be=Promise))(function(ht,et){function Ve(it){try{ze(tt.next(it))}catch(Ke){et(Ke)}}function Re(it){try{ze(tt.throw(it))}catch(Ke){et(Ke)}}function ze(it){var Ke;it.done?ht(it.value):(Ke=it.value,Ke instanceof Be?Ke:new Be(function(We){We(Ke)})).then(Ve,Re)}ze((tt=tt.apply(lt,Ue||[])).next())})}function Me(lt,Ue){var Be,tt,ht,et,Ve={label:0,sent:function(){if(1&ht[0])throw ht[1];return ht[1]},trys:[],ops:[]};return et={next:Re(0),throw:Re(1),return:Re(2)},typeof Symbol=="function"&&(et[Symbol.iterator]=function(){return this}),et;function Re(ze){return function(it){return function(Ke){if(Be)throw new TypeError("Generator is already executing.");for(;Ve;)try{if(Be=1,tt&&(ht=2&Ke[0]?tt.return:Ke[0]?tt.throw||((ht=tt.return)&&ht.call(tt),0):tt.next)&&!(ht=ht.call(tt,Ke[1])).done)return ht;switch(tt=0,ht&&(Ke=[2&Ke[0],ht.value]),Ke[0]){case 0:case 1:ht=Ke;break;case 4:return Ve.label++,{value:Ke[1],done:!1};case 5:Ve.label++,tt=Ke[1],Ke=[0];continue;case 7:Ke=Ve.ops.pop(),Ve.trys.pop();continue;default:if(ht=Ve.trys,!((ht=ht.length>0&&ht[ht.length-1])||Ke[0]!==6&&Ke[0]!==2)){Ve=0;continue}if(Ke[0]===3&&(!ht||Ke[1]>ht[0]&&Ke[1]<ht[3])){Ve.label=Ke[1];break}if(Ke[0]===6&&Ve.label<ht[1]){Ve.label=ht[1],ht=Ke;break}if(ht&&Ve.label<ht[2]){Ve.label=ht[2],Ve.ops.push(Ke);break}ht[2]&&Ve.ops.pop(),Ve.trys.pop();continue}Ke=Ue.call(lt,Ve)}catch(We){Ke=[6,We],tt=0}finally{Be=ht=0}if(5&Ke[0])throw Ke[1];return{value:Ke[0]?Ke[1]:void 0,done:!0}}([ze,it])}}}function Ce(){for(var lt=0,Ue=0,Be=arguments.length;Ue<Be;Ue++)lt+=arguments[Ue].length;var tt=Array(lt),ht=0;for(Ue=0;Ue<Be;Ue++)for(var et=arguments[Ue],Ve=0,Re=et.length;Ve<Re;Ve++,ht++)tt[ht]=et[Ve];return tt}var xe=function(){function lt(){}return lt.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},lt.setAttributes=function(Ue,Be){for(var tt=0,ht=Be;tt<ht.length;tt++){var et=ht[tt],Ve=et[0],Re=et[1];Ue.setAttribute(Ve,Re)}},lt.createRect=function(Ue,Be,tt){var ht=document.createElementNS("http://www.w3.org/2000/svg","rect");return ht.setAttribute("width",Ue.toString()),ht.setAttribute("height",Be.toString()),tt&<.setAttributes(ht,tt),ht},lt.createLine=function(Ue,Be,tt,ht,et){var Ve=document.createElementNS("http://www.w3.org/2000/svg","line");return Ve.setAttribute("x1",Ue.toString()),Ve.setAttribute("y1",Be.toString()),Ve.setAttribute("x2",tt.toString()),Ve.setAttribute("y2",ht.toString()),et&<.setAttributes(Ve,et),Ve},lt.createPolygon=function(Ue,Be){var tt=document.createElementNS("http://www.w3.org/2000/svg","polygon");return tt.setAttribute("points",Ue),Be&<.setAttributes(tt,Be),tt},lt.createCircle=function(Ue,Be){var tt=document.createElementNS("http://www.w3.org/2000/svg","circle");return tt.setAttribute("cx",(Ue/2).toString()),tt.setAttribute("cy",(Ue/2).toString()),tt.setAttribute("r",Ue.toString()),Be&<.setAttributes(tt,Be),tt},lt.createEllipse=function(Ue,Be,tt){var ht=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ht.setAttribute("cx",(Ue/2).toString()),ht.setAttribute("cy",(Be/2).toString()),ht.setAttribute("rx",(Ue/2).toString()),ht.setAttribute("ry",(Be/2).toString()),tt&<.setAttributes(ht,tt),ht},lt.createGroup=function(Ue){var Be=document.createElementNS("http://www.w3.org/2000/svg","g");return Ue&<.setAttributes(Be,Ue),Be},lt.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},lt.createMarker=function(Ue,Be,tt,ht,et,Ve,Re){var ze=document.createElementNS("http://www.w3.org/2000/svg","marker");return lt.setAttributes(ze,[["id",Ue],["orient",Be],["markerWidth",tt.toString()],["markerHeight",ht.toString()],["refX",et.toString()],["refY",Ve.toString()]]),ze.appendChild(Re),ze},lt.createText=function(Ue){var Be=document.createElementNS("http://www.w3.org/2000/svg","text");return Be.setAttribute("x","0"),Be.setAttribute("y","0"),Ue&<.setAttributes(Be,Ue),Be},lt.createTSpan=function(Ue,Be){var tt=document.createElementNS("http://www.w3.org/2000/svg","tspan");return tt.textContent=Ue,Be&<.setAttributes(tt,Be),tt},lt.createImage=function(Ue){var Be=document.createElementNS("http://www.w3.org/2000/svg","image");return Ue&<.setAttributes(Be,Ue),Be},lt.createPoint=function(Ue,Be){var tt=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return tt.x=Ue,tt.y=Be,tt},lt.createPath=function(Ue,Be){var tt=document.createElementNS("http://www.w3.org/2000/svg","path");return tt.setAttribute("d",Ue),Be&<.setAttributes(tt,Be),tt},lt}(),be=function(){function lt(){}return lt.addKey=function(Ue){lt.key=Ue},Object.defineProperty(lt,"isLicensed",{get:function(){return!!lt.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(lt.key)},enumerable:!1,configurable:!0}),lt}(),ye=function(){function lt(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return lt.prototype.rasterize=function(Ue,Be,tt){var ht=this;return new Promise(function(et){var Ve=tt!==void 0?tt:document.createElement("canvas");Ue===null&&(ht.markersOnly=!0,ht.naturalSize=!1);var Re=document.createElementNS("http://www.w3.org/2000/svg","svg");Re.setAttribute("xmlns","http://www.w3.org/2000/svg"),Re.setAttribute("width",Be.width.baseVal.valueAsString),Re.setAttribute("height",Be.height.baseVal.valueAsString),Re.setAttribute("viewBox","0 0 "+Be.viewBox.baseVal.width.toString()+" "+Be.viewBox.baseVal.height.toString()),Re.innerHTML=Be.innerHTML,ht.naturalSize===!0?(Re.width.baseVal.value=Ue.naturalWidth,Re.height.baseVal.value=Ue.naturalHeight):ht.width!==void 0&&ht.height!==void 0&&(Re.width.baseVal.value=ht.width,Re.height.baseVal.value=ht.height),Ve.width=Re.width.baseVal.value,Ve.height=Re.height.baseVal.value;var ze=Re.outerHTML,it=Ve.getContext("2d");ht.markersOnly!==!0&&it.drawImage(Ue,0,0,Ve.width,Ve.height);var Ke=window.URL,We=new Image(Ve.width,Ve.height);We.setAttribute("crossOrigin","anonymous");var vt=new Blob([ze],{type:"image/svg+xml"}),kt=Ke.createObjectURL(vt);We.onload=function(){it.drawImage(We,0,0),Ke.revokeObjectURL(kt);var hn=Ve.toDataURL(ht.imageType,ht.imageQuality);et(hn)},We.src=kt})},lt}(),we=function(){},pe=function(){function lt(Ue){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Ue+"_"}return Object.defineProperty(lt.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),lt.prototype.addClass=function(Ue){return this.styleSheet===void 0&&this.addStyleSheet(),Ue.name=""+this.classNamePrefix+Ue.localName,this.classes.push(Ue),this.styleSheet.sheet.insertRule("."+Ue.name+" {"+Ue.style+"}",this.styleSheet.sheet.cssRules.length),Ue},lt.prototype.addRule=function(Ue){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Ue),this.styleSheet.sheet.insertRule(Ue.selector+" {"+Ue.style+"}",this.styleSheet.sheet.cssRules.length)},lt.prototype.addStyleSheet=function(){var Ue;this.styleSheet=document.createElement("style"),((Ue=this.styleSheetRoot)!==null&&Ue!==void 0?Ue:document.head).appendChild(this.styleSheet),this.addRule(new de("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new de("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new de("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new ge("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new ge("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},lt.prototype.removeStyleSheet=function(){var Ue;this.styleSheet&&(((Ue=this.styleSheetRoot)!==null&&Ue!==void 0?Ue:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},lt}(),de=function(lt,Ue){this.selector=lt,this.style=Ue},ge=function(lt,Ue){this.localName=lt,this.style=Ue},fe=function(){function lt(Ue,Be,tt,ht,et){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Ue,this.displayMode=Be,this.markerItems=tt,this.uiStyleSettings=ht,this.styles=et,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return lt.prototype.show=function(Ue){var Be=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ue,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var tt=document.createElement("div");tt.className=this.toolbarBlockStyleClass.name,tt.style.whiteSpace="nowrap",this.uiContainer.appendChild(tt),this.addActionButton(tt,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(tt,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(tt,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(tt,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(tt,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(tt,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(tt,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(tt,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"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(et){var Ve=document.createElement("div");Ve.className=""+Be.toolbarButtonStyleClass.name,Ve.setAttribute("data-type-name",et.typeName),Ve.innerHTML=et.icon,Ve.addEventListener("click",function(){Be.markerToolbarButtonClicked(Ve,et)}),Be.buttons.push(Ve),Be.markerButtons.push(Ve)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var ht=document.createElement("div");ht.className=this.toolbarBlockStyleClass.name,ht.style.whiteSpace="nowrap",ht.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ht),this.addActionButton(ht,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(ht,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},lt.prototype.addButtonClickListener=function(Ue){this.buttonClickListeners.push(Ue)},lt.prototype.removeButtonClickListener=function(Ue){this.buttonClickListeners.indexOf(Ue)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Ue),1)},lt.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},lt.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Ue=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Be=0;Be<this.markerButtons.length;Be++)Be<Ue||Be===Ue&&this.markerButtons.length-1===Ue?this.markerButtonBlock.appendChild(this.markerButtons[Be]):(Be===Ue&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Be]))}},lt.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},lt.prototype.resetButtonStyles=function(){var Ue=this;this.buttons.forEach(function(Be){Be.className=Be.className.replace(Ue.uiStyleSettings.toolbarButtonStyleColorsClassName?Ue.uiStyleSettings.toolbarButtonStyleColorsClassName:Ue.toolbarButtonStyleColorsClass.name,"").trim(),Be.className=Be.className.replace(Ue.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Ue.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Ue.toolbarActiveButtonStyleColorsClass.name,"").trim(),Be.className+=" "+(Ue.uiStyleSettings.toolbarButtonStyleColorsClassName?Ue.uiStyleSettings.toolbarButtonStyleColorsClassName:Ue.toolbarButtonStyleColorsClass.name)})},lt.prototype.addActionButton=function(Ue,Be,tt){var ht=this,et=document.createElement("div");switch(et.className=""+this.toolbarButtonStyleClass.name,et.innerHTML=Be,et.setAttribute("data-action",tt),et.addEventListener("click",function(){ht.actionToolbarButtonClicked(et,tt)}),tt){case"select":et.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":et.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":et.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":et.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":et.style.fill=this.uiStyleSettings.closeButtonColor}Ue.appendChild(et),this.buttons.push(et)},lt.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ge("toolbar",`
|
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
box-sizing: content-box;
|
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
overflow: hidden;
|
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new ge("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ge("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ge("toolbar-overflow-block",`
|
|
|
position: absolute;
|
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
|
z-index: 10;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new ge("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var Ue=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ge("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Ue)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Ue)+`px;
|
|
|
padding: `+Ue+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ge("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ge("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new de("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new de("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},lt.prototype.markerToolbarButtonClicked=function(Ue,Be){this.setActiveButton(Ue),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(tt){return tt("marker",Be)}),this.markerButtonOverflowBlock.style.display="none"},lt.prototype.actionToolbarButtonClicked=function(Ue,Be){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(tt){return tt("action",Be)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},lt.prototype.setActiveButton=function(Ue){this.resetButtonStyles(),Ue.className=Ue.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Ue.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},lt.prototype.setActiveMarkerButton=function(Ue){var Be=this.markerButtons.find(function(tt){return tt.getAttribute("data-type-name")===Ue});Be&&this.setActiveButton(Be)},lt.prototype.setCurrentMarker=function(Ue){var Be=this;this.currentMarker=Ue,this.buttons.filter(function(tt){return/delete|notes/.test(tt.getAttribute("data-action"))}).forEach(function(tt){Be.currentMarker===void 0?(tt.style.fillOpacity="0.4",tt.style.pointerEvents="none"):(tt.style.fillOpacity="1",tt.style.pointerEvents="all")})},lt}(),ue=function(){function lt(Ue,Be,tt,ht){this.panels=[],this.panelButtons=[],this.markerjsContainer=Ue,this.displayMode=Be,this.uiStyleSettings=tt,this.styles=ht,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return lt.prototype.addStyles=function(){var Ue;this.toolboxStyleClass=this.styles.addClass(new ge("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 ge("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var Be=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ge("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ge("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ge("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 ge("toolbox-panel-row_colors",`
|
|
|
background-color: `+((Ue=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Ue!==void 0?Ue:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ge("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Be)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Be)+`px;
|
|
|
padding: `+Be+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ge("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ge("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new de("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new de("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},lt.prototype.show=function(Ue){var Be;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ue,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Be=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Be!==void 0?Be:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},lt.prototype.setPanelButtons=function(Ue){var Be,tt,ht=this;this.panels=Ue,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Be=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Be!==void 0?Be:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((tt=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&tt!==void 0?tt:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(et){var Ve;et.uiStyleSettings=ht.uiStyleSettings;var Re=document.createElement("div");Re.className=ht.toolboxButtonStyleClass.name+" "+((Ve=ht.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ve!==void 0?Ve:ht.toolboxButtonStyleColorsClass.name),Re.innerHTML=et.icon,Re.title=et.title,Re.addEventListener("click",function(){ht.panelButtonClick(et)}),ht.panelButtons.push(Re),ht.buttonRow.appendChild(Re)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},lt.prototype.panelButtonClick=function(Ue){var Be=this,tt=-1;if(Ue!==this.activePanel){tt=this.panels.indexOf(Ue),this.panelRow.innerHTML="";var ht=Ue.getUi();ht.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ht),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=Ue}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Be.displayMode==="inline"?Be.panelRow.style.display="none":Be.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(et,Ve){var Re,ze;et.className=Be.toolboxButtonStyleClass.name+" "+(Ve===tt?""+((Re=Be.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Re!==void 0?Re:Be.toolboxActiveButtonStyleColorsClass.name):""+((ze=Be.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ze!==void 0?ze:Be.toolboxButtonStyleColorsClass.name))})},lt}(),ee=function(lt,Ue){this.title=lt,this.icon=Ue},z=function(lt){function Ue(Be,tt,ht,et){var Ve=lt.call(this,Be,et||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return Ve.colors=[],Ve.addTransparent=!1,Ve.colorBoxes=[],Ve.colors=tt,Ve.currentColor=ht,Ve.setCurrentColor=Ve.setCurrentColor.bind(Ve),Ve.getColorBox=Ve.getColorBox.bind(Ve),Ve}return Se(Ue,lt),Ue.prototype.getUi=function(){var Be=this,tt=document.createElement("div");return tt.style.overflow="hidden",tt.style.whiteSpace="nowrap",this.colors.forEach(function(ht){var et=Be.getColorBox(ht);tt.appendChild(et),Be.colorBoxes.push(et)}),tt},Ue.prototype.getColorBox=function(Be){var tt=this,ht=this.uiStyleSettings.toolbarHeight/4,et=this.uiStyleSettings.toolbarHeight-ht,Ve=document.createElement("div");Ve.style.display="inline-block",Ve.style.boxSizing="content-box",Ve.style.width=et-2+"px",Ve.style.height=et-2+"px",Ve.style.padding="1px",Ve.style.marginRight="2px",Ve.style.marginBottom="2px",Ve.style.borderWidth="2px",Ve.style.borderStyle="solid",Ve.style.borderRadius=(et+2)/2+"px",Ve.style.borderColor=Be===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ve.addEventListener("click",function(){tt.setCurrentColor(Be,Ve)});var Re=document.createElement("div");return Re.style.display="inline-block",Re.style.width=et-2+"px",Re.style.height=et-2+"px",Re.style.backgroundColor=Be,Re.style.borderRadius=et/2+"px",Be==="transparent"&&(Re.style.fill=this.uiStyleSettings.toolboxAccentColor,Re.innerHTML=`<svg viewBox="0 0 24 24">
|
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
|
</svg>`),Ve.appendChild(Re),Ve},Ue.prototype.setCurrentColor=function(Be,tt){var ht=this;this.currentColor=Be,this.colorBoxes.forEach(function(et){et.style.borderColor=et===tt?ht.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Be)},Ue}(ee),oe=function(){function lt(Ue,Be,tt){this._state="new",this._isSelected=!1,this._container=Ue,this._overlayContainer=Be,this.globalSettings=tt,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(lt.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),lt.prototype.ownsTarget=function(Ue){return!1},Object.defineProperty(lt.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),lt.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},lt.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},lt.prototype.pointerDown=function(Ue,Be){},lt.prototype.dblClick=function(Ue,Be){},lt.prototype.manipulate=function(Ue){},lt.prototype.pointerUp=function(Ue){this.stateChanged()},lt.prototype.dispose=function(){},lt.prototype.addMarkerVisualToContainer=function(Ue){this.container.childNodes.length>0?this.container.insertBefore(Ue,this.container.childNodes[0]):this.container.appendChild(Ue)},lt.prototype.getState=function(){return{typeName:lt.typeName,state:this.state,notes:this.notes}},lt.prototype.restoreState=function(Ue){this._state=Ue.state,this.notes=Ue.notes},lt.prototype.scale=function(Ue,Be){},lt.prototype.colorChanged=function(Ue){this.onColorChanged&&this.onColorChanged(Ue),this.stateChanged()},lt.prototype.fillColorChanged=function(Ue){this.onFillColorChanged&&this.onFillColorChanged(Ue),this.stateChanged()},lt.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Ue=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Ue.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Ue)&&this.onStateChanged(this)}},lt.typeName="MarkerBase",lt}(),re=function(){function lt(){this.findGripByVisual=this.findGripByVisual.bind(this)}return lt.prototype.findGripByVisual=function(Ue){return this.topLeft.ownsTarget(Ue)?this.topLeft:this.topCenter.ownsTarget(Ue)?this.topCenter:this.topRight.ownsTarget(Ue)?this.topRight:this.centerLeft.ownsTarget(Ue)?this.centerLeft:this.centerRight.ownsTarget(Ue)?this.centerRight:this.bottomLeft.ownsTarget(Ue)?this.bottomLeft:this.bottomCenter.ownsTarget(Ue)?this.bottomCenter:this.bottomRight.ownsTarget(Ue)?this.bottomRight:void 0},lt}(),ae=function(){function lt(){this.GRIP_SIZE=10,this.visual=xe.createGroup(),this.visual.appendChild(xe.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(xe.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return lt.prototype.ownsTarget=function(Ue){return Ue===this.visual||Ue===this.visual.childNodes[0]||Ue===this.visual.childNodes[1]},lt}(),le=function(){function lt(){}return lt.toITransformMatrix=function(Ue){return{a:Ue.a,b:Ue.b,c:Ue.c,d:Ue.d,e:Ue.e,f:Ue.f}},lt.toSVGMatrix=function(Ue,Be){return Ue.a=Be.a,Ue.b=Be.b,Ue.c=Be.c,Ue.d=Be.d,Ue.e=Be.e,Ue.f=Be.f,Ue},lt}(),me=function(lt){function Ue(Be,tt,ht){var et=lt.call(this,Be,tt,ht)||this;return et.left=0,et.top=0,et.width=0,et.height=0,et.defaultSize={x:50,y:20},et.offsetX=0,et.offsetY=0,et.rotationAngle=0,et.CB_DISTANCE=10,et._suppressMarkerCreateEvent=!1,et.container.transform.baseVal.appendItem(xe.createTransform()),et.setupControlBox(),et}return Se(Ue,lt),Object.defineProperty(Ue.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ue.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ue.prototype,"visual",{get:function(){return this._visual},set:function(Be){this._visual=Be;var tt=xe.createTransform();this._visual.transform.baseVal.appendItem(tt)},enumerable:!1,configurable:!0}),Ue.prototype.ownsTarget=function(Be){return!!lt.prototype.ownsTarget.call(this,Be)||!!(this.controlGrips.findGripByVisual(Be)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Be))},Ue.prototype.pointerDown=function(Be,tt){lt.prototype.pointerDown.call(this,Be,tt),this.state==="new"&&(this.left=Be.x,this.top=Be.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ht=this.unrotatePoint(Be);if(this.manipulationStartX=ht.x,this.manipulationStartY=ht.y,this.offsetX=ht.x-this.left,this.offsetY=ht.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(tt),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(tt)){this.activeGrip=this.rotatorGrip;var et=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=et.x-this.width/2,this.top=et.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ve=this.container.transform.baseVal.getItem(0);Ve.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ve,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Ue.prototype.pointerUp=function(Be){var tt=this.state;lt.prototype.pointerUp.call(this,Be),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Be),this._state="select",tt==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Ue.prototype.moveVisual=function(Be){this.visual.style.transform="translate("+Be.x+"px, "+Be.y+"px)"},Ue.prototype.manipulate=function(Be){var tt=this.unrotatePoint(Be);this.state==="creating"?this.resize(Be):this.state==="move"?(this.left=this.manipulationStartLeft+(tt.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(tt.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(tt):this.state==="rotate"&&this.rotate(Be)},Ue.prototype.resize=function(Be){var tt=this.manipulationStartLeft,ht=this.manipulationStartWidth,et=this.manipulationStartTop,Ve=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:tt=this.manipulationStartLeft+Be.x-this.manipulationStartX,ht=this.manipulationStartWidth+this.manipulationStartLeft-tt;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ht=this.manipulationStartWidth+Be.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:et=this.manipulationStartTop+Be.y-this.manipulationStartY,Ve=this.manipulationStartHeight+this.manipulationStartTop-et;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ve=this.manipulationStartHeight+Be.y-this.manipulationStartY}ht>=0?(this.left=tt,this.width=ht):(this.left=tt+ht,this.width=-ht),Ve>=0?(this.top=et,this.height=Ve):(this.top=et+Ve,this.height=-Ve),this.setSize()},Ue.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Ue.prototype.rotate=function(Be){if(Math.abs(Be.x-this.centerX)>.1){var tt=Math.sign(Be.x-this.centerX);this.rotationAngle=180*Math.atan((Be.y-this.centerY)/(Be.x-this.centerX))/Math.PI+90*tt,this.applyRotation()}},Ue.prototype.applyRotation=function(){var Be=this.container.transform.baseVal.getItem(0);Be.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Be,0)},Ue.prototype.rotatePoint=function(Be){if(this.rotationAngle===0)return Be;var tt=this.container.getCTM(),ht=xe.createPoint(Be.x,Be.y);return{x:(ht=ht.matrixTransform(tt)).x,y:ht.y}},Ue.prototype.unrotatePoint=function(Be){if(this.rotationAngle===0)return Be;var tt=this.container.getCTM();tt=tt.inverse();var ht=xe.createPoint(Be.x,Be.y);return{x:(ht=ht.matrixTransform(tt)).x,y:ht.y}},Ue.prototype.select=function(){lt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ue.prototype.deselect=function(){lt.prototype.deselect.call(this),this.controlBox.style.display="none"},Ue.prototype.setupControlBox=function(){this.controlBox=xe.createGroup();var Be=xe.createTransform();Be.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Be),this.container.appendChild(this.controlBox),this.controlRect=xe.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=xe.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 re,this.addControlGrips(),this.controlBox.style.display="none"},Ue.prototype.adjustControlBox=function(){var Be=this.controlBox.transform.baseVal.getItem(0);Be.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Be,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()},Ue.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()},Ue.prototype.createGrip=function(){var Be=new ae;return Be.visual.transform.baseVal.appendItem(xe.createTransform()),this.controlBox.appendChild(Be.visual),Be},Ue.prototype.positionGrips=function(){var Be=this.controlGrips.topLeft.GRIP_SIZE,tt=-Be/2,ht=tt,et=(this.width+this.CB_DISTANCE)/2-Be/2,Ve=(this.height+this.CB_DISTANCE)/2-Be/2,Re=this.height+this.CB_DISTANCE-Be/2,ze=this.width+this.CB_DISTANCE-Be/2;this.positionGrip(this.controlGrips.topLeft.visual,tt,ht),this.positionGrip(this.controlGrips.topCenter.visual,et,ht),this.positionGrip(this.controlGrips.topRight.visual,ze,ht),this.positionGrip(this.controlGrips.centerLeft.visual,tt,Ve),this.positionGrip(this.controlGrips.centerRight.visual,ze,Ve),this.positionGrip(this.controlGrips.bottomLeft.visual,tt,Re),this.positionGrip(this.controlGrips.bottomCenter.visual,et,Re),this.positionGrip(this.controlGrips.bottomRight.visual,ze,Re),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,et,ht-3*this.CB_DISTANCE)},Ue.prototype.positionGrip=function(Be,tt,ht){var et=Be.transform.baseVal.getItem(0);et.setTranslate(tt,ht),Be.transform.baseVal.replaceItem(et,0)},Ue.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Ue.prototype.showControlBox=function(){this.controlBox.style.display=""},Ue.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:le.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:le.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},lt.prototype.getState.call(this))},Ue.prototype.restoreState=function(Be){lt.prototype.restoreState.call(this,Be);var tt=Be;this.left=tt.left,this.top=tt.top,this.width=tt.width,this.height=tt.height,this.rotationAngle=tt.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(le.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,tt.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(le.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,tt.containerTransformMatrix))},Ue.prototype.scale=function(Be,tt){lt.prototype.scale.call(this,Be,tt);var ht=this.rotatePoint({x:this.left,y:this.top}),et=this.unrotatePoint({x:ht.x*Be,y:ht.y*tt});this.left=et.x,this.top=et.y,this.width=this.width*Be,this.height=this.height*tt,this.adjustControlBox()},Ue}(oe),ve=function(lt){function Ue(Be,tt,ht){var et=lt.call(this,Be,tt,ht)||this;return et.fillColor="transparent",et.strokeColor="transparent",et.strokeWidth=0,et.strokeDasharray="",et.opacity=1,et.setStrokeColor=et.setStrokeColor.bind(et),et.setFillColor=et.setFillColor.bind(et),et.setStrokeWidth=et.setStrokeWidth.bind(et),et.setStrokeDasharray=et.setStrokeDasharray.bind(et),et.createVisual=et.createVisual.bind(et),et}return Se(Ue,lt),Ue.prototype.ownsTarget=function(Be){return!(!lt.prototype.ownsTarget.call(this,Be)&&Be!==this.visual)},Ue.prototype.createVisual=function(){this.visual=xe.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)},Ue.prototype.pointerDown=function(Be,tt){lt.prototype.pointerDown.call(this,Be,tt),this.state==="new"&&(this.createVisual(),this.moveVisual(Be),this._state="creating")},Ue.prototype.manipulate=function(Be){lt.prototype.manipulate.call(this,Be)},Ue.prototype.resize=function(Be){lt.prototype.resize.call(this,Be),this.setSize()},Ue.prototype.setSize=function(){lt.prototype.setSize.call(this),xe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Ue.prototype.pointerUp=function(Be){lt.prototype.pointerUp.call(this,Be),this.setSize()},Ue.prototype.setStrokeColor=function(Be){this.strokeColor=Be,this.visual&&xe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Be),this.stateChanged()},Ue.prototype.setFillColor=function(Be){this.fillColor=Be,this.visual&&xe.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Ue.prototype.setStrokeWidth=function(Be){this.strokeWidth=Be,this.visual&&xe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ue.prototype.setStrokeDasharray=function(Be){this.strokeDasharray=Be,this.visual&&xe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ue.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},lt.prototype.getState.call(this))},Ue.prototype.restoreState=function(Be){var tt=Be;this.fillColor=tt.fillColor,this.strokeColor=tt.strokeColor,this.strokeWidth=tt.strokeWidth,this.strokeDasharray=tt.strokeDasharray,this.opacity=tt.opacity,this.createVisual(),lt.prototype.restoreState.call(this,Be),this.setSize()},Ue.prototype.scale=function(Be,tt){lt.prototype.scale.call(this,Be,tt),this.setSize()},Ue.title="Rectangle marker",Ue}(me),Pe=function(lt){function Ue(Be,tt,ht,et){var Ve=lt.call(this,Be,et||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Ve.widths=[],Ve.widthBoxes=[],Ve.widths=tt,Ve.currentWidth=ht,Ve.setCurrentWidth=Ve.setCurrentWidth.bind(Ve),Ve}return Se(Ue,lt),Ue.prototype.getUi=function(){var Be=this,tt=document.createElement("div");return tt.style.display="flex",tt.style.overflow="hidden",tt.style.flexGrow="2",this.widths.forEach(function(ht){var et=document.createElement("div");et.style.display="flex",et.style.flexGrow="2",et.style.alignItems="center",et.style.justifyContent="space-between",et.style.padding="5px",et.style.borderWidth="2px",et.style.borderStyle="solid",et.style.borderColor=ht===Be.currentWidth?Be.uiStyleSettings.toolboxAccentColor:"transparent",et.addEventListener("click",function(){Be.setCurrentWidth(ht,et)}),tt.appendChild(et);var Ve=document.createElement("div");Ve.innerText=ht.toString(),Ve.style.marginRight="5px",et.appendChild(Ve);var Re=document.createElement("div");Re.style.minHeight="20px",Re.style.flexGrow="2",Re.style.display="flex",Re.style.alignItems="center";var ze=document.createElement("hr");ze.style.minWidth="20px",ze.style.border="0px",ze.style.borderTop=ht+"px solid "+Be.uiStyleSettings.toolboxColor,ze.style.flexGrow="2",Re.appendChild(ze),et.appendChild(Re),Be.widthBoxes.push(et)}),tt},Ue.prototype.setCurrentWidth=function(Be,tt){var ht=this;this.currentWidth=Be,this.widthBoxes.forEach(function(et){et.style.borderColor=et===tt?ht.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Ue}(ee),Ae=function(lt){function Ue(Be,tt,ht,et){var Ve=lt.call(this,Be,et||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return Ve.styles=[],Ve.styleBoxes=[],Ve.styles=tt,Ve.currentStyle=ht,Ve.setCurrentStyle=Ve.setCurrentStyle.bind(Ve),Ve}return Se(Ue,lt),Ue.prototype.getUi=function(){var Be=this,tt=document.createElement("div");return tt.style.display="flex",tt.style.overflow="hidden",tt.style.flexGrow="2",this.styles.forEach(function(ht){var et=document.createElement("div");et.style.display="flex",et.style.alignItems="center",et.style.justifyContent="space-between",et.style.padding="5px",et.style.borderWidth="2px",et.style.borderStyle="solid",et.style.overflow="hidden",et.style.maxWidth=100/Be.styles.length-5+"%",et.style.borderColor=ht===Be.currentStyle?Be.uiStyleSettings.toolboxAccentColor:"transparent",et.addEventListener("click",function(){Be.setCurrentStyle(ht,et)}),tt.appendChild(et);var Ve=document.createElement("div");Ve.style.minHeight="20px",Ve.style.flexGrow="2",Ve.style.overflow="hidden";var Re=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Be.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ht!==""?'stroke-dasharray="'+ht+'"':"")+` />
|
|
|
</svg>`;Ve.innerHTML=Re,et.appendChild(Ve),Be.styleBoxes.push(et)}),tt},Ue.prototype.setCurrentStyle=function(Be,tt){var ht=this;this.currentStyle=Be,this.styleBoxes.forEach(function(et){et.style.borderColor=et===tt?ht.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Ue}(ee),De=function(lt){function Ue(Be,tt,ht){var et=lt.call(this,Be,tt,ht)||this;return et.strokeColor=ht.defaultColor,et.strokeWidth=ht.defaultStrokeWidth,et.strokeDasharray=ht.defaultStrokeDasharray,et.strokePanel=new z("Line color",ht.defaultColorSet,ht.defaultColor),et.strokePanel.onColorChanged=et.setStrokeColor,et.strokeWidthPanel=new Pe("Line width",ht.defaultStrokeWidths,ht.defaultStrokeWidth),et.strokeWidthPanel.onWidthChanged=et.setStrokeWidth,et.strokeStylePanel=new Ae("Line style",ht.defaultStrokeDasharrays,ht.defaultStrokeDasharray),et.strokeStylePanel.onStyleChanged=et.setStrokeDasharray,et}return Se(Ue,lt),Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var Be=lt.prototype.getState.call(this);return Be.typeName=Ue.typeName,Be},Ue.typeName="FrameMarker",Ue.title="Frame marker",Ue.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Ue}(ve),Oe=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"},Ze=function(lt){function Ue(Be,tt,ht){var et=lt.call(this,Be,tt,ht)||this;return et.x1=0,et.y1=0,et.x2=0,et.y2=0,et.defaultLength=50,et.manipulationStartX=0,et.manipulationStartY=0,et.manipulationStartX1=0,et.manipulationStartY1=0,et.manipulationStartX2=0,et.manipulationStartY2=0,et.setupControlBox(),et}return Se(Ue,lt),Ue.prototype.ownsTarget=function(Be){return!!lt.prototype.ownsTarget.call(this,Be)||!(!this.grip1.ownsTarget(Be)&&!this.grip2.ownsTarget(Be))},Ue.prototype.pointerDown=function(Be,tt){lt.prototype.pointerDown.call(this,Be,tt),this.manipulationStartX=Be.x,this.manipulationStartY=Be.y,this.state==="new"&&(this.x1=Be.x,this.y1=Be.y,this.x2=Be.x,this.y2=Be.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(tt)?this.activeGrip=this.grip1:this.grip2.ownsTarget(tt)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Ue.prototype.pointerUp=function(Be){var tt=this.state;lt.prototype.pointerUp.call(this,Be),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(Be),this._state="select",tt==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Ue.prototype.adjustVisual=function(){},Ue.prototype.manipulate=function(Be){this.state==="creating"?this.resize(Be):this.state==="move"?(this.x1=this.manipulationStartX1+Be.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Be.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Be.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Be.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Be)},Ue.prototype.resize=function(Be){switch(this.activeGrip){case this.grip1:this.x1=Be.x,this.y1=Be.y;break;case this.grip2:case void 0:this.x2=Be.x,this.y2=Be.y}this.adjustVisual(),this.adjustControlBox()},Ue.prototype.select=function(){lt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ue.prototype.deselect=function(){lt.prototype.deselect.call(this),this.controlBox.style.display="none"},Ue.prototype.setupControlBox=function(){this.controlBox=xe.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Ue.prototype.adjustControlBox=function(){this.positionGrips()},Ue.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Ue.prototype.createGrip=function(){var Be=new ae;return Be.visual.transform.baseVal.appendItem(xe.createTransform()),this.controlBox.appendChild(Be.visual),Be},Ue.prototype.positionGrips=function(){var Be=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Be/2,this.y1-Be/2),this.positionGrip(this.grip2.visual,this.x2-Be/2,this.y2-Be/2)},Ue.prototype.positionGrip=function(Be,tt,ht){var et=Be.transform.baseVal.getItem(0);et.setTranslate(tt,ht),Be.transform.baseVal.replaceItem(et,0)},Ue.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},lt.prototype.getState.call(this))},Ue.prototype.restoreState=function(Be){lt.prototype.restoreState.call(this,Be);var tt=Be;this.x1=tt.x1,this.y1=tt.y1,this.x2=tt.x2,this.y2=tt.y2},Ue.prototype.scale=function(Be,tt){lt.prototype.scale.call(this,Be,tt),this.x1=this.x1*Be,this.y1=this.y1*tt,this.x2=this.x2*Be,this.y2=this.y2*tt,this.adjustVisual(),this.adjustControlBox()},Ue}(oe),qe=function(lt){function Ue(Be,tt,ht){var et=lt.call(this,Be,tt,ht)||this;return et.strokeColor="transparent",et.strokeWidth=0,et.strokeDasharray="",et.setStrokeColor=et.setStrokeColor.bind(et),et.setStrokeWidth=et.setStrokeWidth.bind(et),et.setStrokeDasharray=et.setStrokeDasharray.bind(et),et.strokeColor=ht.defaultColor,et.strokeWidth=ht.defaultStrokeWidth,et.strokeDasharray=ht.defaultStrokeDasharray,et.strokePanel=new z("Line color",ht.defaultColorSet,ht.defaultColor),et.strokePanel.onColorChanged=et.setStrokeColor,et.strokeWidthPanel=new Pe("Line width",ht.defaultStrokeWidths,ht.defaultStrokeWidth),et.strokeWidthPanel.onWidthChanged=et.setStrokeWidth,et.strokeStylePanel=new Ae("Line style",ht.defaultStrokeDasharrays,ht.defaultStrokeDasharray),et.strokeStylePanel.onStyleChanged=et.setStrokeDasharray,et}return Se(Ue,lt),Ue.prototype.ownsTarget=function(Be){return!(!lt.prototype.ownsTarget.call(this,Be)&&Be!==this.visual&&Be!==this.selectorLine&&Be!==this.visibleLine)},Ue.prototype.createVisual=function(){this.visual=xe.createGroup(),this.selectorLine=xe.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=xe.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)},Ue.prototype.pointerDown=function(Be,tt){lt.prototype.pointerDown.call(this,Be,tt),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Ue.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()),xe.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),xe.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),xe.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Ue.prototype.setStrokeColor=function(Be){this.strokeColor=Be,this.adjustVisual(),this.colorChanged(Be)},Ue.prototype.setStrokeWidth=function(Be){this.strokeWidth=Be,this.adjustVisual()},Ue.prototype.setStrokeDasharray=function(Be){this.strokeDasharray=Be,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var Be=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},lt.prototype.getState.call(this));return Be.typeName=Ue.typeName,Be},Ue.prototype.restoreState=function(Be){lt.prototype.restoreState.call(this,Be);var tt=Be;this.strokeColor=tt.strokeColor,this.strokeWidth=tt.strokeWidth,this.strokeDasharray=tt.strokeDasharray,this.createVisual(),this.adjustVisual()},Ue.typeName="LineMarker",Ue.title="Line marker",Ue.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Ue}(Ze),Xe=function(lt){function Ue(Be,tt,ht,et){var Ve=lt.call(this,Be,et||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return Ve.fonts=[],Ve.fontBoxes=[],Ve.fonts=tt,Ve.currentFont=ht,Ve.setCurrentFont=Ve.setCurrentFont.bind(Ve),Ve}return Se(Ue,lt),Ue.prototype.getUi=function(){var Be=this,tt=document.createElement("div");return tt.style.overflow="hidden",tt.style.flexGrow="2",this.fonts.forEach(function(ht){var et=document.createElement("div");et.style.display="inline-block",et.style.alignItems="center",et.style.justifyContent="space-between",et.style.padding="5px",et.style.borderWidth="2px",et.style.borderStyle="solid",et.style.overflow="hidden",et.style.maxWidth=100/Be.fonts.length-5+"%",et.style.borderColor=ht===Be.currentFont?Be.uiStyleSettings.toolboxAccentColor:"transparent",et.addEventListener("click",function(){Be.setCurrentFont(ht,et)}),tt.appendChild(et);var Ve=document.createElement("div");Ve.style.display="flex",Ve.style.minHeight="20px",Ve.style.flexGrow="2",Ve.style.fontFamily=ht,Ve.style.overflow="hidden";var Re=document.createElement("div");Re.style.whiteSpace="nowrap",Re.style.overflow="hidden",Re.style.textOverflow="ellipsis",Re.innerHTML="The quick brown fox jumps over the lazy dog",Ve.appendChild(Re),et.appendChild(Ve),Be.fontBoxes.push(et)}),tt},Ue.prototype.setCurrentFont=function(Be,tt){var ht=this;this.currentFont=Be,this.fontBoxes.forEach(function(et){et.style.borderColor=et===tt?ht.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Ue}(ee),mt=function(lt){function Ue(Be,tt,ht){var et=lt.call(this,Be,tt,ht)||this;return et.color="transparent",et.padding=5,et.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",et.text=et.DEFAULT_TEXT,et.isMoved=!1,et.color=ht.defaultColor,et.fontFamily=ht.defaultFontFamily,et.defaultSize={x:100,y:30},et.setColor=et.setColor.bind(et),et.setFont=et.setFont.bind(et),et.renderText=et.renderText.bind(et),et.sizeText=et.sizeText.bind(et),et.textEditDivClicked=et.textEditDivClicked.bind(et),et.showTextEditor=et.showTextEditor.bind(et),et.setSize=et.setSize.bind(et),et.positionTextEditor=et.positionTextEditor.bind(et),et.colorPanel=new z("Color",ht.defaultColorSet,ht.defaultColor),et.colorPanel.onColorChanged=et.setColor,et.fontFamilyPanel=new Xe("Font",ht.defaultFontFamilies,ht.defaultFontFamily),et.fontFamilyPanel.onFontChanged=et.setFont,et}return Se(Ue,lt),Ue.prototype.ownsTarget=function(Be){if(lt.prototype.ownsTarget.call(this,Be)||Be===this.visual||Be===this.textElement||Be===this.bgRectangle)return!0;var tt=!1;return this.textElement.childNodes.forEach(function(ht){ht===Be&&(tt=!0)}),tt},Ue.prototype.createVisual=function(){this.visual=xe.createGroup(),this.bgRectangle=xe.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=xe.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(xe.createTransform()),this.textElement.transform.baseVal.appendItem(xe.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Ue.prototype.pointerDown=function(Be,tt){lt.prototype.pointerDown.call(this,Be,tt),this.isMoved=!1,this.pointerDownPoint=Be,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Be),this._state="creating")},Ue.prototype.renderText=function(){var Be=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(tt){Be.textElement.appendChild(xe.createTSpan(tt.trim()===""?" ":tt.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Ue.prototype.getTextScale=function(){var Be=this.textElement.getBBox(),tt=1;if(Be.width>0&&Be.height>0){var ht=(1*this.width-this.width*this.padding*2/100)/Be.width,et=(1*this.height-this.height*this.padding*2/100)/Be.height;tt=Math.min(ht,et)}return tt},Ue.prototype.getTextPosition=function(Be){var tt=this.textElement.getBBox(),ht=0,et=0;return tt.width>0&&tt.height>0&&(ht=(this.width-tt.width*Be)/2,et=this.height/2-tt.height*Be/2),{x:ht,y:et}},Ue.prototype.sizeText=function(){var Be=this.textElement.getBBox(),tt=this.getTextScale(),ht=this.getTextPosition(tt);ht.y-=Be.y*tt,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ht.x+"px, "+ht.y+"px) scale("+tt+", "+tt+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ht.x,ht.y),this.textElement.transform.baseVal.getItem(1).setScale(tt,tt))},Ue.prototype.manipulate=function(Be){lt.prototype.manipulate.call(this,Be),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Be.x-this.pointerDownPoint.x)>5||Math.abs(Be.y-this.pointerDownPoint.y)>5)},Ue.prototype.resize=function(Be){lt.prototype.resize.call(this,Be),this.isMoved=!0,this.setSize(),this.sizeText()},Ue.prototype.setSize=function(){lt.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(xe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),xe.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Ue.prototype.pointerUp=function(Be){var tt=this.state;tt==="creating"&&(this._suppressMarkerCreateEvent=!0),lt.prototype.pointerUp.call(this,Be),this.setSize(),(tt==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Ue.prototype.showTextEditor=function(){var Be=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(tt){tt.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var tt=Number.parseFloat(Be.textEditor.style.fontSize);Be.textEditor.clientWidth>=Number.parseInt(Be.textEditor.style.maxWidth)&&tt>.9;)tt-=.1,Be.textEditor.style.fontSize=Math.max(tt,.9)+"em"}),this.textEditor.addEventListener("keyup",function(tt){tt.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(tt){if(tt.clipboardData){var ht=tt.clipboardData.getData("text"),et=window.getSelection();if(!et.rangeCount)return!1;et.deleteFromDocument(),et.getRangeAt(0).insertNode(document.createTextNode(ht)),tt.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Be.textEditDivClicked(Be.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Ue.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Be=this.getTextScale(),tt=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ht=this.textElement.getBBox(),et={x:ht.width*Be,y:ht.height*Be};tt.x-=et.x/2,tt.y-=et.y/2,this.textEditor.style.top=tt.y+"px",this.textEditor.style.left=tt.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-tt.x+"px",this.textEditor.style.fontSize=Math.max(16*Be,12)+"px",this.textElement.style.display="none"}},Ue.prototype.textEditDivClicked=function(Be){this.text=Be.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Ue.prototype.select=function(){lt.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Ue.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),lt.prototype.deselect.call(this)},Ue.prototype.dblClick=function(Be,tt){lt.prototype.dblClick.call(this,Be,tt),this.showTextEditor()},Ue.prototype.setColor=function(Be){this.textElement&&xe.setAttributes(this.textElement,[["fill",Be]]),this.color=Be,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Be)},Ue.prototype.setFont=function(Be){this.textElement&&xe.setAttributes(this.textElement,[["font-family",Be]]),this.fontFamily=Be,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Ue.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Ue.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var Be=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},lt.prototype.getState.call(this));return Be.typeName=Ue.typeName,Be},Ue.prototype.restoreState=function(Be){var tt=Be;this.color=tt.color,this.fontFamily=tt.fontFamily,this.padding=tt.padding,this.text=tt.text,this.createVisual(),lt.prototype.restoreState.call(this,Be),this.setSize()},Ue.prototype.scale=function(Be,tt){lt.prototype.scale.call(this,Be,tt),this.setSize(),this.sizeText(),this.positionTextEditor()},Ue.typeName="TextMarker",Ue.title="Text marker",Ue.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',Ue}(me),pt=function(lt){function Ue(Be,tt,ht){var et=lt.call(this,Be,tt,ht)||this;return et.color="transparent",et.lineWidth=3,et.drawing=!1,et.pixelRatio=1,et.color=ht.defaultColor,et.lineWidth=ht.defaultStrokeWidth,et.pixelRatio=ht.freehandPixelRatio,et.setColor=et.setColor.bind(et),et.addCanvas=et.addCanvas.bind(et),et.finishCreation=et.finishCreation.bind(et),et.setLineWidth=et.setLineWidth.bind(et),et.colorPanel=new z("Color",ht.defaultColorSet,ht.defaultColor),et.colorPanel.onColorChanged=et.setColor,et.lineWidthPanel=new Pe("Line width",ht.defaultStrokeWidths,ht.defaultStrokeWidth),et.lineWidthPanel.onWidthChanged=et.setLineWidth,et}return Se(Ue,lt),Ue.prototype.ownsTarget=function(Be){return!(!lt.prototype.ownsTarget.call(this,Be)&&Be!==this.visual&&Be!==this.drawingImage)},Ue.prototype.createVisual=function(){this.visual=xe.createGroup(),this.drawingImage=xe.createImage(),this.visual.appendChild(this.drawingImage);var Be=xe.createTransform();this.visual.transform.baseVal.appendItem(Be),this.addMarkerVisualToContainer(this.visual)},Ue.prototype.pointerDown=function(Be,tt){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(Be.x,Be.y),this.drawing=!0):lt.prototype.pointerDown.call(this,Be,tt)},Ue.prototype.manipulate=function(Be){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Be.x,Be.y),this.canvasContext.stroke()):lt.prototype.manipulate.call(this,Be)},Ue.prototype.resize=function(Be){lt.prototype.resize.call(this,Be),xe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),xe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Ue.prototype.pointerUp=function(Be){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):lt.prototype.pointerUp.call(this,Be)},Ue.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)},Ue.prototype.select=function(){this.state==="creating"&&this.finishCreation(),lt.prototype.select.call(this)},Ue.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),lt.prototype.deselect.call(this)},Ue.prototype.finishCreation=function(){for(var Be=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),tt=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ht=tt[0],et=tt[1],Ve=tt[2],Re=tt[3],ze=!1,it=0;it<this.canvasElement.height;it++)for(var Ke=0;Ke<this.canvasElement.width;Ke++)Be.data[it*this.canvasElement.width*4+4*Ke+3]>0&&(ze=!0,it<et&&(et=it),Ke<ht&&(ht=Ke),it>Re&&(Re=it),Ke>Ve&&(Ve=Ke));if(ze){this.left=ht/this.pixelRatio,this.top=et/this.pixelRatio,this.width=(Ve-ht)/this.pixelRatio,this.height=(Re-et)/this.pixelRatio;var We=document.createElement("canvas");We.width=Ve-ht,We.height=Re-et,We.getContext("2d").putImageData(this.canvasContext.getImageData(ht,et,Ve-ht,Re-et),0,0),this.drawingImgUrl=We.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Ue.prototype.setDrawingImage=function(){xe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),xe.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Ue.prototype.setColor=function(Be){this.color=Be,this.colorChanged(Be)},Ue.prototype.setLineWidth=function(Be){this.lineWidth=Be},Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var Be=Object.assign({drawingImgUrl:this.drawingImgUrl},lt.prototype.getState.call(this));return Be.typeName=Ue.typeName,Be},Ue.prototype.restoreState=function(Be){this.createVisual(),lt.prototype.restoreState.call(this,Be),this.drawingImgUrl=Be.drawingImgUrl,this.setDrawingImage()},Ue.prototype.scale=function(Be,tt){lt.prototype.scale.call(this,Be,tt),this.setDrawingImage()},Ue.typeName="FreehandMarker",Ue.title="Freehand marker",Ue.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',Ue}(me),Mt=function(lt){function Ue(Be,tt,ht){var et=lt.call(this,Be,ht||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return et.typeBoxes=[],et.currentType=tt,et.setCurrentType=et.setCurrentType.bind(et),et}return Se(Ue,lt),Ue.prototype.getUi=function(){var Be=this,tt=document.createElement("div");tt.style.display="flex",tt.style.overflow="hidden",tt.style.flexGrow="2";for(var ht=function(Re){var ze="both";switch(Re){case 0:ze="both";break;case 1:ze="start";break;case 2:ze="end";break;case 3:ze="none"}var it=document.createElement("div");if(it.style.display="flex",it.style.flexGrow="2",it.style.alignItems="center",it.style.justifyContent="space-between",it.style.padding="5px",it.style.borderWidth="2px",it.style.borderStyle="solid",it.style.borderColor=ze===et.currentType?et.uiStyleSettings.toolboxAccentColor:"transparent",it.addEventListener("click",function(){Be.setCurrentType(ze,it)}),tt.appendChild(it),ze==="both"||ze==="start"){var Ke=document.createElement("div");Ke.style.display="flex",Ke.style.alignItems="center",Ke.style.minHeight="20px",Ke.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,5 10,0 10,10" fill="`+(et.uiStyleSettings!==void 0?et.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Ke.style.marginLeft="5px",it.appendChild(Ke)}var We=document.createElement("div");We.style.display="flex",We.style.alignItems="center",We.style.minHeight="20px",We.style.flexGrow="2";var vt=document.createElement("hr");if(vt.style.minWidth="20px",vt.style.border="0px",vt.style.borderTop="3px solid "+(et.uiStyleSettings!==void 0?et.uiStyleSettings.toolboxColor:"#eeeeee"),vt.style.flexGrow="2",We.appendChild(vt),it.appendChild(We),ze==="both"||ze==="end"){var kt=document.createElement("div");kt.style.display="flex",kt.style.alignItems="center",kt.style.minHeight="20px",kt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,0 10,5 0,10" fill="`+(et.uiStyleSettings!==void 0?et.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,kt.style.marginRight="5px",it.appendChild(kt)}et.typeBoxes.push(it)},et=this,Ve=0;Ve<4;Ve++)ht(Ve);return tt},Ue.prototype.setCurrentType=function(Be,tt){var ht=this;this.currentType=Be,this.typeBoxes.forEach(function(et){et.style.borderColor=et===tt?ht.uiStyleSettings!==void 0?ht.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Ue}(ee),at=function(lt){function Ue(Be,tt,ht){var et=lt.call(this,Be,tt,ht)||this;return et.arrowType="end",et.arrowBaseHeight=10,et.arrowBaseWidth=10,et.getArrowPoints=et.getArrowPoints.bind(et),et.setArrowType=et.setArrowType.bind(et),et.arrowTypePanel=new Mt("Arrow type","end"),et.arrowTypePanel.onArrowTypeChanged=et.setArrowType,et}return Se(Ue,lt),Ue.prototype.ownsTarget=function(Be){return!(!lt.prototype.ownsTarget.call(this,Be)&&Be!==this.arrow1&&Be!==this.arrow2)},Ue.prototype.getArrowPoints=function(Be,tt){var ht=this.arrowBaseWidth+2*this.strokeWidth,et=this.arrowBaseHeight+2*this.strokeWidth;return Be-ht/2+","+(tt+et/2)+" "+Be+","+(tt-et/2)+" "+(Be+ht/2)+","+(tt+et/2)},Ue.prototype.createTips=function(){this.arrow1=xe.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(xe.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=xe.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(xe.createTransform()),this.visual.appendChild(this.arrow2)},Ue.prototype.pointerDown=function(Be,tt){lt.prototype.pointerDown.call(this,Be,tt),this.state==="creating"&&this.createTips()},Ue.prototype.adjustVisual=function(){if(lt.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",xe.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),xe.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Be=0;Math.abs(this.x1-this.x2)>.1&&(Be=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var tt=this.arrow1.transform.baseVal.getItem(0);tt.setRotate(Be,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(tt,0);var ht=this.arrow2.transform.baseVal.getItem(0);ht.setRotate(Be+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ht,0)}},Ue.prototype.setArrowType=function(Be){this.arrowType=Be,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var Be=Object.assign({arrowType:this.arrowType},lt.prototype.getState.call(this));return Be.typeName=Ue.typeName,Be},Ue.prototype.restoreState=function(Be){lt.prototype.restoreState.call(this,Be);var tt=Be;this.arrowType=tt.arrowType,this.createTips(),this.adjustVisual()},Ue.typeName="ArrowMarker",Ue.title="Arrow marker",Ue.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Ue}(qe),_t=function(lt){function Ue(Be,tt,ht){var et=lt.call(this,Be,tt,ht)||this;return et.fillColor=ht.defaultFillColor,et.strokeWidth=0,et.fillPanel=new z("Color",ht.defaultColorSet,ht.defaultFillColor),et.fillPanel.onColorChanged=et.setFillColor,et}return Se(Ue,lt),Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var Be=lt.prototype.getState.call(this);return Be.typeName=Ue.typeName,Be},Ue.typeName="CoverMarker",Ue.title="Cover marker",Ue.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Ue}(ve),dt=function(lt){function Ue(Be,tt,ht,et){var Ve=lt.call(this,Be,et||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return Ve.opacities=[],Ve.opacityBoxes=[],Ve.opacities=tt,Ve.currentOpacity=ht,Ve.setCurrentOpacity=Ve.setCurrentOpacity.bind(Ve),Ve}return Se(Ue,lt),Ue.prototype.getUi=function(){var Be=this,tt=document.createElement("div");return tt.style.display="flex",tt.style.overflow="hidden",tt.style.flexGrow="2",tt.style.justifyContent="space-between",this.opacities.forEach(function(ht){var et=document.createElement("div");et.style.display="flex",et.style.alignItems="center",et.style.justifyContent="center",et.style.padding="5px",et.style.borderWidth="2px",et.style.borderStyle="solid",et.style.borderColor=ht===Be.currentOpacity?Be.uiStyleSettings.toolboxAccentColor:"transparent",et.addEventListener("click",function(){Be.setCurrentOpacity(ht,et)}),tt.appendChild(et);var Ve=document.createElement("div");Ve.innerText=100*ht+"%",et.appendChild(Ve),Be.opacityBoxes.push(et)}),tt},Ue.prototype.setCurrentOpacity=function(Be,tt){var ht=this;this.currentOpacity=Be,this.opacityBoxes.forEach(function(et){et.style.borderColor=et===tt?ht.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Ue}(ee),Rt=function(lt){function Ue(Be,tt,ht){var et=lt.call(this,Be,tt,ht)||this;return et.setOpacity=et.setOpacity.bind(et),et.fillColor=ht.defaultHighlightColor,et.strokeWidth=0,et.opacity=ht.defaultHighlightOpacity,et.fillPanel=new z("Color",ht.defaultColorSet,et.fillColor),et.fillPanel.onColorChanged=et.setFillColor,et.opacityPanel=new dt("Opacity",ht.defaultOpacitySteps,et.opacity),et.opacityPanel.onOpacityChanged=et.setOpacity,et}return Se(Ue,lt),Ue.prototype.setOpacity=function(Be){this.opacity=Be,this.visual&&xe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var Be=lt.prototype.getState.call(this);return Be.typeName=Ue.typeName,Be},Ue.typeName="HighlightMarker",Ue.title="Highlight marker",Ue.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',Ue}(_t),ut='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',rt='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',ct=function(lt){function Ue(Be,tt,ht){var et=lt.call(this,Be,tt,ht)||this;return et.bgColor="transparent",et.tipPosition={x:0,y:0},et.tipBase1Position={x:0,y:0},et.tipBase2Position={x:0,y:0},et.tipMoving=!1,et.color=ht.defaultStrokeColor,et.bgColor=ht.defaultFillColor,et.fontFamily=ht.defaultFontFamily,et.defaultSize={x:100,y:30},et.setBgColor=et.setBgColor.bind(et),et.getTipPoints=et.getTipPoints.bind(et),et.positionTip=et.positionTip.bind(et),et.setTipPoints=et.setTipPoints.bind(et),et.colorPanel=new z("Text color",ht.defaultColorSet,et.color,ut),et.colorPanel.onColorChanged=et.setColor,et.bgColorPanel=new z("Fill color",ht.defaultColorSet,et.bgColor,rt),et.bgColorPanel.onColorChanged=et.setBgColor,et.fontFamilyPanel=new Xe("Font",ht.defaultFontFamilies,ht.defaultFontFamily),et.fontFamilyPanel.onFontChanged=et.setFont,et.tipGrip=new ae,et.tipGrip.visual.transform.baseVal.appendItem(xe.createTransform()),et.controlBox.appendChild(et.tipGrip.visual),et}return Se(Ue,lt),Ue.prototype.ownsTarget=function(Be){return lt.prototype.ownsTarget.call(this,Be)||this.tipGrip.ownsTarget(Be)||this.tip===Be},Ue.prototype.createTip=function(){xe.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=xe.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Ue.prototype.pointerDown=function(Be,tt){this.state==="new"&<.prototype.pointerDown.call(this,Be,tt),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(tt)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):lt.prototype.pointerDown.call(this,Be,tt)},Ue.prototype.pointerUp=function(Be){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,lt.prototype.pointerUp.call(this,Be);else{var tt=this.state==="creating";lt.prototype.pointerUp.call(this,Be),this.setTipPoints(tt),this.positionTip()}},Ue.prototype.manipulate=function(Be){if(this.tipMoving){var tt=this.unrotatePoint(Be);this.tipPosition={x:tt.x-this.manipulationStartLeft,y:tt.y-this.manipulationStartTop},this.positionTip()}else lt.prototype.manipulate.call(this,Be)},Ue.prototype.setBgColor=function(Be){this.bgRectangle&&this.tip&&(xe.setAttributes(this.bgRectangle,[["fill",Be]]),xe.setAttributes(this.tip,[["fill",Be]])),this.bgColor=Be,this.fillColorChanged(Be)},Ue.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},Ue.prototype.setTipPoints=function(Be){Be===void 0&&(Be=!1);var tt=Math.min(this.height/2,15),ht=this.height/5;Be&&(this.tipPosition={x:tt+ht/2,y:this.height+20});var et=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?et<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ht=this.width/5,tt=Math.min(this.width/2,15),this.tipBase1Position={x:tt,y:0},this.tipBase2Position={x:tt+ht,y:0}):(this.tipBase1Position={x:0,y:tt},this.tipBase2Position={x:0,y:tt+ht}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?et<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ht=this.width/5,tt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-tt-ht,y:0},this.tipBase2Position={x:this.width-tt,y:0}):(this.tipBase1Position={x:this.width,y:tt},this.tipBase2Position={x:this.width,y:tt+ht}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?et<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ht=this.width/5,tt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-tt-ht,y:this.height},this.tipBase2Position={x:this.width-tt,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-tt-ht},this.tipBase2Position={x:this.width,y:this.height-tt}):et<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ht=this.width/5,tt=Math.min(this.width/2,15),this.tipBase1Position={x:tt,y:this.height},this.tipBase2Position={x:tt+ht,y:this.height}):(this.tipBase1Position={x:0,y:this.height-tt},this.tipBase2Position={x:0,y:this.height-tt-ht})},Ue.prototype.resize=function(Be){lt.prototype.resize.call(this,Be),this.positionTip()},Ue.prototype.positionTip=function(){xe.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Be=this.tipGrip.visual.transform.baseVal.getItem(0);Be.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Be,0)},Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ue.prototype.select=function(){this.positionTip(),lt.prototype.select.call(this)},Ue.prototype.getState=function(){var Be=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},lt.prototype.getState.call(this));return Be.typeName=Ue.typeName,Be},Ue.prototype.restoreState=function(Be){var tt=Be;this.bgColor=tt.bgColor,this.tipPosition=tt.tipPosition,lt.prototype.restoreState.call(this,Be),this.createTip(),this.setTipPoints()},Ue.prototype.scale=function(Be,tt){lt.prototype.scale.call(this,Be,tt),this.tipPosition={x:this.tipPosition.x*Be,y:this.tipPosition.y*tt},this.positionTip()},Ue.typeName="CalloutMarker",Ue.title="Callout marker",Ue.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',Ue}(mt),yt=function(lt){function Ue(Be,tt,ht){var et=lt.call(this,Be,tt,ht)||this;return et.fillColor="transparent",et.strokeColor="transparent",et.strokeWidth=0,et.strokeDasharray="",et.opacity=1,et.strokeColor=ht.defaultColor,et.strokeWidth=ht.defaultStrokeWidth,et.strokeDasharray=ht.defaultStrokeDasharray,et.fillColor=ht.defaultFillColor,et.setStrokeColor=et.setStrokeColor.bind(et),et.setFillColor=et.setFillColor.bind(et),et.setStrokeWidth=et.setStrokeWidth.bind(et),et.setStrokeDasharray=et.setStrokeDasharray.bind(et),et.setOpacity=et.setOpacity.bind(et),et.createVisual=et.createVisual.bind(et),et.strokePanel=new z("Line color",Ce(ht.defaultColorSet,["transparent"]),ht.defaultColor),et.strokePanel.onColorChanged=et.setStrokeColor,et.fillPanel=new z("Fill color",Ce(ht.defaultColorSet,["transparent"]),et.fillColor,rt),et.fillPanel.onColorChanged=et.setFillColor,et.strokeWidthPanel=new Pe("Line width",ht.defaultStrokeWidths,ht.defaultStrokeWidth),et.strokeWidthPanel.onWidthChanged=et.setStrokeWidth,et.strokeStylePanel=new Ae("Line style",ht.defaultStrokeDasharrays,ht.defaultStrokeDasharray),et.strokeStylePanel.onStyleChanged=et.setStrokeDasharray,et.opacityPanel=new dt("Opacity",ht.defaultOpacitySteps,et.opacity),et.opacityPanel.onOpacityChanged=et.setOpacity,et}return Se(Ue,lt),Ue.prototype.ownsTarget=function(Be){return!(!lt.prototype.ownsTarget.call(this,Be)&&Be!==this.visual)},Ue.prototype.createVisual=function(){this.visual=xe.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},Ue.prototype.pointerDown=function(Be,tt){lt.prototype.pointerDown.call(this,Be,tt),this.state==="new"&&(this.createVisual(),this.moveVisual(Be),this._state="creating")},Ue.prototype.manipulate=function(Be){lt.prototype.manipulate.call(this,Be)},Ue.prototype.resize=function(Be){lt.prototype.resize.call(this,Be),this.setSize()},Ue.prototype.setSize=function(){lt.prototype.setSize.call(this),xe.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Ue.prototype.pointerUp=function(Be){lt.prototype.pointerUp.call(this,Be),this.setSize()},Ue.prototype.setStrokeColor=function(Be){this.strokeColor=Be,this.visual&&xe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Be),this.stateChanged()},Ue.prototype.setFillColor=function(Be){this.fillColor=Be,this.visual&&xe.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Be),this.stateChanged()},Ue.prototype.setStrokeWidth=function(Be){this.strokeWidth=Be,this.visual&&xe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ue.prototype.setStrokeDasharray=function(Be){this.strokeDasharray=Be,this.visual&&xe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ue.prototype.setOpacity=function(Be){this.opacity=Be,this.visual&&xe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var Be=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},lt.prototype.getState.call(this));return Be.typeName=Ue.typeName,Be},Ue.prototype.restoreState=function(Be){var tt=Be;this.fillColor=tt.fillColor,this.strokeColor=tt.strokeColor,this.strokeWidth=tt.strokeWidth,this.strokeDasharray=tt.strokeDasharray,this.opacity=tt.opacity,this.createVisual(),lt.prototype.restoreState.call(this,Be),this.setSize()},Ue.prototype.scale=function(Be,tt){lt.prototype.scale.call(this,Be,tt),this.setSize()},Ue.typeName="EllipseMarker",Ue.title="Ellipse marker",Ue.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',Ue}(me),wt=function(lt){function Ue(Be,tt,ht){return lt.call(this,Be,tt,ht)||this}return Se(Ue,lt),Object.defineProperty(Ue.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Ue.prototype.ownsTarget=function(Be){return!(!lt.prototype.ownsTarget.call(this,Be)&&Be!==this.tip1&&Be!==this.tip2)},Ue.prototype.createTips=function(){this.tip1=xe.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(xe.createTransform()),this.visual.appendChild(this.tip1),this.tip2=xe.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(xe.createTransform()),this.visual.appendChild(this.tip2)},Ue.prototype.pointerDown=function(Be,tt){lt.prototype.pointerDown.call(this,Be,tt),this.state==="creating"&&this.createTips()},Ue.prototype.adjustVisual=function(){if(lt.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(xe.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),xe.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var Be=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),tt=this.tip1.transform.baseVal.getItem(0);tt.setRotate(Be,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(tt,0);var ht=this.tip2.transform.baseVal.getItem(0);ht.setRotate(Be+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ht,0)}},Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var Be=lt.prototype.getState.call(this);return Be.typeName=Ue.typeName,Be},Ue.prototype.restoreState=function(Be){lt.prototype.restoreState.call(this,Be),this.createTips(),this.adjustVisual()},Ue.typeName="MeasurementMarker",Ue.title="Measurement marker",Ue.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',Ue}(qe),xt=function(lt){function Ue(Be,tt,ht){var et=lt.call(this,Be,tt,ht)||this;return et.strokePanel.colors=ht.defaultColorSet,et.fillColor="transparent",et}return Se(Ue,lt),Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var Be=lt.prototype.getState.call(this);return Be.typeName=Ue.typeName,Be},Ue.typeName="EllipseFrameMarker",Ue.title="Ellipse frame marker",Ue.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',Ue}(yt),Ut=function(){function lt(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(lt.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),lt.prototype.addUndoStep=function(Ue){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Ue)||(this.undoStack.push(Ue),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Ue)&&this.redoStack.splice(0,this.redoStack.length))},lt.prototype.replaceLastUndoStep=function(Ue){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Ue)},lt.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},lt.prototype.undo=function(){if(this.undoStack.length>1){var Ue=this.undoStack.pop();return Ue!==void 0&&this.redoStack.push(Ue),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},lt.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},lt}(),zt=function(lt){function Ue(Be,tt,ht){var et=lt.call(this,Be,tt,ht)||this;return et.strokeColor="transparent",et.strokeWidth=0,et.strokeDasharray="",et.curveX=0,et.curveY=0,et.manipulationStartCurveX=0,et.manipulationStartCurveY=0,et.setStrokeColor=et.setStrokeColor.bind(et),et.setStrokeWidth=et.setStrokeWidth.bind(et),et.setStrokeDasharray=et.setStrokeDasharray.bind(et),et.positionGrips=et.positionGrips.bind(et),et.addControlGrips=et.addControlGrips.bind(et),et.adjustVisual=et.adjustVisual.bind(et),et.setupControlBox=et.setupControlBox.bind(et),et.resize=et.resize.bind(et),et.strokeColor=ht.defaultColor,et.strokeWidth=ht.defaultStrokeWidth,et.strokeDasharray=ht.defaultStrokeDasharray,et.strokePanel=new z("Line color",ht.defaultColorSet,ht.defaultColor),et.strokePanel.onColorChanged=et.setStrokeColor,et.strokeWidthPanel=new Pe("Line width",ht.defaultStrokeWidths,ht.defaultStrokeWidth),et.strokeWidthPanel.onWidthChanged=et.setStrokeWidth,et.strokeStylePanel=new Ae("Line style",ht.defaultStrokeDasharrays,ht.defaultStrokeDasharray),et.strokeStylePanel.onStyleChanged=et.setStrokeDasharray,et}return Se(Ue,lt),Ue.prototype.ownsTarget=function(Be){return!(!lt.prototype.ownsTarget.call(this,Be)&&Be!==this.visual&&Be!==this.selectorCurve&&Be!==this.visibleCurve&&!this.curveGrip.ownsTarget(Be))},Ue.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Ue.prototype.createVisual=function(){this.visual=xe.createGroup(),this.selectorCurve=xe.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=xe.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)},Ue.prototype.pointerDown=function(Be,tt){lt.prototype.pointerDown.call(this,Be,tt),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Be.x,this.curveY=Be.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(tt)&&(this.activeGrip=this.curveGrip,this._state="resize")},Ue.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),xe.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),xe.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),xe.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Ue.prototype.setupControlBox=function(){lt.prototype.setupControlBox.call(this),this.curveControlLine1=xe.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=xe.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)},Ue.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,lt.prototype.addControlGrips.call(this)},Ue.prototype.positionGrips=function(){lt.prototype.positionGrips.call(this);var Be=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Be/2,this.curveY-Be/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()))},Ue.prototype.manipulate=function(Be){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Be.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Be.y-this.manipulationStartY),lt.prototype.manipulate.call(this,Be)},Ue.prototype.resize=function(Be){this.activeGrip===this.curveGrip&&(this.curveX=Be.x,this.curveY=Be.y),lt.prototype.resize.call(this,Be),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Ue.prototype.setStrokeColor=function(Be){this.strokeColor=Be,this.adjustVisual(),this.colorChanged(Be)},Ue.prototype.setStrokeWidth=function(Be){this.strokeWidth=Be,this.adjustVisual()},Ue.prototype.setStrokeDasharray=function(Be){this.strokeDasharray=Be,this.adjustVisual()},Ue.prototype.scale=function(Be,tt){this.curveX=this.curveX*Be,this.curveY=this.curveY*tt,lt.prototype.scale.call(this,Be,tt)},Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var Be=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},lt.prototype.getState.call(this));return Be.typeName=Ue.typeName,Be},Ue.prototype.restoreState=function(Be){lt.prototype.restoreState.call(this,Be);var tt=Be;this.strokeColor=tt.strokeColor,this.strokeWidth=tt.strokeWidth,this.strokeDasharray=tt.strokeDasharray,this.curveX=tt.curveX,this.curveY=tt.curveY,this.createVisual(),this.adjustVisual()},Ue.typeName="CurveMarker",Ue.title="Curve marker",Ue.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',Ue}(Ze),dn=function(lt){function Ue(Be,tt,ht){var et=lt.call(this,Be,tt,ht)||this;return et.fillColor="transparent",et.strokeColor="transparent",et.strokeWidth=0,et.strokeDasharray="",et.textColor="transparent",et.fontSize="1rem",et.isMoved=!1,et.captionText="Caption",et.PADDING=5,et.captionBoxWidth=0,et.captionBoxHeight=0,et.strokeColor=ht.defaultColor,et.strokeWidth=ht.defaultStrokeWidth,et.strokeDasharray=ht.defaultStrokeDasharray,et.fillColor=ht.defaultFillColor,et.textColor=ht.defaultStrokeColor,et.fontFamily=ht.defaultFontFamily,et.fontSize=ht.defaultCaptionFontSize,et.captionText=ht.defaultCaptionText,et.setStrokeColor=et.setStrokeColor.bind(et),et.setFillColor=et.setFillColor.bind(et),et.setStrokeWidth=et.setStrokeWidth.bind(et),et.setStrokeDasharray=et.setStrokeDasharray.bind(et),et.createVisual=et.createVisual.bind(et),et.sizeCaption=et.sizeCaption.bind(et),et.setCaptionText=et.setCaptionText.bind(et),et.showTextEditor=et.showTextEditor.bind(et),et.positionTextEditor=et.positionTextEditor.bind(et),et.finishTextEditing=et.finishTextEditing.bind(et),et.setFont=et.setFont.bind(et),et.setTextColor=et.setTextColor.bind(et),et.strokePanel=new z("Line color",Ce(ht.defaultColorSet,["transparent"]),et.strokeColor),et.strokePanel.onColorChanged=et.setStrokeColor,et.fillPanel=new z("Fill color",Ce(ht.defaultColorSet,["transparent"]),et.fillColor,rt),et.fillPanel.onColorChanged=et.setFillColor,et.strokeWidthPanel=new Pe("Line width",ht.defaultStrokeWidths,ht.defaultStrokeWidth),et.strokeWidthPanel.onWidthChanged=et.setStrokeWidth,et.strokeStylePanel=new Ae("Line style",ht.defaultStrokeDasharrays,ht.defaultStrokeDasharray),et.strokeStylePanel.onStyleChanged=et.setStrokeDasharray,et.fontFamilyPanel=new Xe("Font",ht.defaultFontFamilies,ht.defaultFontFamily),et.fontFamilyPanel.onFontChanged=et.setFont,et.textColorPanel=new z("Text color",ht.defaultColorSet,et.textColor,ut),et.textColorPanel.onColorChanged=et.setTextColor,et}return Se(Ue,lt),Ue.prototype.ownsTarget=function(Be){return!(!lt.prototype.ownsTarget.call(this,Be)&&Be!==this.visual&&Be!==this.frame&&Be!==this.captionBg&&Be!==this.captionElement)},Ue.prototype.createVisual=function(){this.visual=xe.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=xe.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=xe.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=xe.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()},Ue.prototype.setCaptionText=function(Be){this.captionText=Be,this.captionElement.textContent=this.captionText,this.sizeCaption()},Ue.prototype.pointerDown=function(Be,tt){lt.prototype.pointerDown.call(this,Be,tt),this.isMoved=!1,this.pointerDownPoint=Be,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Be),this._state="creating")},Ue.prototype.manipulate=function(Be){lt.prototype.manipulate.call(this,Be),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Be.x-this.pointerDownPoint.x)>5||Math.abs(Be.y-this.pointerDownPoint.y)>5)},Ue.prototype.resize=function(Be){lt.prototype.resize.call(this,Be),this.setSize()},Ue.prototype.sizeCaption=function(){var Be=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Be.width+2*this.PADDING,this.captionBoxHeight=Be.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),xe.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')"]]),xe.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')"]])},Ue.prototype.showTextEditor=function(){var Be=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(tt){tt.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(tt){tt.key==="Enter"&&Be.finishTextEditing(Be.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(tt){tt.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Be.finishTextEditing(Be.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Be.finishTextEditing(Be.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Ue.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"))},Ue.prototype.finishTextEditing=function(Be){this.setCaptionText(Be.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Ue.prototype.setFont=function(Be){this.captionElement&&xe.setAttributes(this.captionElement,[["font-family",Be]]),this.fontFamily=Be,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Ue.prototype.setTextColor=function(Be){this.captionElement&&xe.setAttributes(this.captionElement,[["fill",Be]]),this.textColor=Be,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Ue.prototype.setSize=function(){lt.prototype.setSize.call(this),xe.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Ue.prototype.pointerUp=function(Be){lt.prototype.pointerUp.call(this,Be),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Ue.prototype.dblClick=function(Be,tt){lt.prototype.dblClick.call(this,Be,tt),this.showTextEditor()},Ue.prototype.setStrokeColor=function(Be){this.strokeColor=Be,this.frame&&xe.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Be),this.stateChanged()},Ue.prototype.setFillColor=function(Be){this.fillColor=Be,this.captionBg&&xe.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Be),this.stateChanged()},Ue.prototype.setStrokeWidth=function(Be){this.strokeWidth=Be,this.frame&&xe.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ue.prototype.setStrokeDasharray=function(Be){this.strokeDasharray=Be,this.frame&&xe.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var Be=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},lt.prototype.getState.call(this));return Be.typeName=this.typeName,Be},Ue.prototype.restoreState=function(Be){var tt=Be;this.fillColor=tt.fillColor,this.strokeColor=tt.strokeColor,this.strokeWidth=tt.strokeWidth,this.strokeDasharray=tt.strokeDasharray,this.textColor=tt.textColor,this.fontFamily=tt.fontFamily,this.captionText=tt.captionText,this.fontSize=tt.fontSize,this.createVisual(),lt.prototype.restoreState.call(this,Be),this.setSize()},Ue.prototype.scale=function(Be,tt){lt.prototype.scale.call(this,Be,tt),this.setSize()},Ue.typeName="CaptionFrameMarker",Ue.title="Caption frame marker",Ue.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',Ue}(me),Ft=function(){function lt(Ue,Be){Be===void 0&&(Be=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Ue,this.cancelable=Be}return Object.defineProperty(lt.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),lt.prototype.preventDefault=function(){this._defaultPrevented=!0},lt}(),Dt=function(lt){function Ue(Be,tt,ht){var et=lt.call(this,Be,!1)||this;return et.dataUrl=tt,et.state=ht,et}return Se(Ue,lt),Ue}(Ft),Qt=function(lt){function Ue(Be,tt,ht){ht===void 0&&(ht=!1);var et=lt.call(this,Be,ht)||this;return et.marker=tt,et}return Se(Ue,lt),Ue}(Ft),Yt=function(){function lt(){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 lt.prototype.addEventListener=function(Ue,Be){this[Ue].push(Be)},lt.prototype.removeEventListener=function(Ue,Be){var tt=this[Ue].indexOf(Be);tt>-1&&this[Ue].splice(tt,1)},lt}(),Jt=function(){function lt(Ue){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Oe,this._isOpen=!1,this.undoRedoManager=new Ut,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 Yt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=lt.instanceCounter++,this.styles=new pe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Ue,this.targetRoot=document.body,this.width=Ue.clientWidth,this.height=Ue.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(lt.prototype,"ALL_MARKER_TYPES",{get:function(){return[De,pt,at,mt,xt,yt,Rt,ct,wt,_t,qe,zt,dn]},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[De,pt,at,mt,yt,Rt,ct]},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[De,pt,at,mt,Rt]},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Ue){var Be=this;this._availableMarkerTypes.splice(0),Ue.forEach(function(tt){if(typeof tt=="string"){var ht=Be.ALL_MARKER_TYPES.find(function(et){return et.typeName===tt});ht!==void 0&&Be._availableMarkerTypes.push(ht)}else Be._availableMarkerTypes.push(tt)})},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Ue){this._zoomLevel=Ue,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(lt.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),lt.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),be.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},lt.prototype.show=function(){var Ue=this;this.styles.styleSheetRoot===void 0&&we.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=we.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Be){return Be(new Ft(Ue))})},lt.prototype.render=function(){return je(this,void 0,void 0,function(){var Ue;return Me(this,function(Be){switch(Be.label){case 0:return this.setCurrentMarker(),(Ue=new ye).naturalSize=this.renderAtNaturalSize,Ue.imageType=this.renderImageType,Ue.imageQuality=this.renderImageQuality,Ue.markersOnly=this.renderMarkersOnly,Ue.width=this.renderWidth,Ue.height=this.renderHeight,[4,Ue.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Be.sent(),[4,Ue.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Be.sent()]}})})},lt.prototype.close=function(Ue){var Be=this;if(Ue===void 0&&(Ue=!1),this.isOpen){var tt=!1;Ue||this.eventListeners.beforeclose.forEach(function(ht){var et=new Ft(Be,!0);ht(et),et.defaultPrevented&&(tt=!0)}),tt||(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(ht){return ht(new Ft(Be))}),this.detachEvents(),this._isOpen=!1)}},lt.prototype.addMarkersToToolbar=function(){for(var Ue,Be=[],tt=0;tt<arguments.length;tt++)Be[tt]=arguments[tt];(Ue=this._availableMarkerTypes).push.apply(Ue,Be)},lt.prototype.addRenderEventListener=function(Ue){this.addEventListener("render",function(Be){Ue(Be.dataUrl,Be.state)})},lt.prototype.removeRenderEventListener=function(Ue){},lt.prototype.addCloseEventListener=function(Ue){this.addEventListener("close",function(){Ue()})},lt.prototype.removeCloseEventListener=function(Ue){},lt.prototype.setupResizeObserver=function(){var Ue=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Ue.resize(Ue.target.clientWidth,Ue.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Ue.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},lt.prototype.onPopupTargetResize=function(){var Ue=1*this.target.clientWidth/this.target.clientHeight,Be=this.editorCanvas.clientWidth/Ue>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Ue:this.editorCanvas.clientWidth,tt=Be<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Ue;this.resize(Be,tt)},lt.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},lt.prototype.resize=function(Ue,Be){this._isResizing=!0;var tt=Ue/this.imageWidth,ht=Be/this.imageHeight;this.imageWidth=Math.round(Ue),this.imageHeight=Math.round(Be),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(tt,ht),this._isResizing=!1},lt.prototype.scaleMarkers=function(Ue,Be){var tt,ht=this;this._currentMarker&&this._currentMarker instanceof mt?this._currentMarker.scale(Ue,Be):(tt=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(et){et!==ht._currentMarker&&et.scale(Ue,Be)}),tt!==void 0&&this.setCurrentMarker(tt)},lt.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},lt.prototype.setTopLeft=function(){var Ue=this.editingTarget.getBoundingClientRect(),Be=this.editorCanvas.getBoundingClientRect();this.left=Ue.left-Be.left,this.top=Ue.top-Be.top},lt.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},lt.prototype.addDefs=function(){for(var Ue,Be=[],tt=0;tt<arguments.length;tt++)Be[tt]=arguments[tt];this.defs=xe.createDefs(),this.addDefsToImage(),(Ue=this.defs).append.apply(Ue,Be)},lt.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},lt.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},lt.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},lt.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},lt.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},lt.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},lt.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},lt.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var Ue=document.createElement("a");Ue.href="https://markerjs.com/",Ue.target="_blank",Ue.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',Ue.title="Powered by marker.js",Ue.style.display="grid",Ue.style.alignItems="center",Ue.style.justifyItems="center",Ue.style.padding="3px",Ue.style.width="20px",Ue.style.height="20px",this.logoUI.appendChild(Ue),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},lt.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")},lt.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"},lt.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},lt.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 Ue=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=Ue+"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 fe(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<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new ue(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},lt.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},lt.prototype.removeMarker=function(Ue){this.markerImage.removeChild(Ue.container),this.markers.indexOf(Ue)>-1&&this.markers.splice(this.markers.indexOf(Ue),1),Ue.dispose()},lt.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())},lt.prototype.toolbarButtonClicked=function(Ue,Be){if(Ue==="marker"&&Be!==void 0)this.createNewMarker(Be);else if(Ue==="action")switch(Be){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()}},lt.prototype.deleteSelectedMarker=function(){var Ue=this;if(this._currentMarker!==void 0){var Be=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ht){var et=new Qt(Ue,Ue._currentMarker,!0);ht(et),et.defaultPrevented&&(Be=!0)}),!Be){var tt=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(ht){return ht(new Qt(Ue,tt))})}}},lt.prototype.clear=function(){var Ue=this,Be=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ve){var Re=new Qt(Ue,void 0,!0);Ve(Re),Re.defaultPrevented&&(Be=!0)}),!Be)){this.setCurrentMarker();for(var tt=function(Ve){var Re=ht.markers[Ve];ht.setCurrentMarker(ht.markers[Ve]),ht._currentMarker.dispose(),ht.markerImage.removeChild(ht._currentMarker.container),ht.markers.splice(ht.markers.indexOf(ht._currentMarker),1),ht.eventListeners.markerdelete.forEach(function(ze){return ze(new Qt(Ue,Re))})},ht=this,et=this.markers.length-1;et>=0;et--)tt(et);this.addUndoStep()}},Object.defineProperty(lt.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),lt.prototype.showNotesEditor=function(){var Ue;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=(Ue=this._currentMarker.notes)!==null&&Ue!==void 0?Ue:"",this.overlayContainer.appendChild(this.notesArea))},lt.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)},lt.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},lt.prototype.addUndoStep=function(){var Ue=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Be=this.getState(),tt=this.undoRedoManager.getLastUndoStep();if(!tt||tt.width===Be.width&&tt.height===Be.height){var ht=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Be),ht<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(et){return et(new Ft(Ue))})}else this.undoRedoManager.replaceLastUndoStep(Be),this.eventListeners.statechange.forEach(function(et){return et(new Ft(Ue))})}},lt.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},lt.prototype.undoStep=function(){var Ue=this,Be=this.undoRedoManager.undo();Be!==void 0&&(this.restoreState(Be),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(tt){return tt(new Ft(Ue))}))},lt.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},lt.prototype.redoStep=function(){var Ue=this,Be=this.undoRedoManager.redo();Be!==void 0&&(this.restoreState(Be),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(tt){return tt(new Ft(Ue))}))},lt.prototype.stepZoom=function(){var Ue=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Ue<this.zoomSteps.length-1?this.zoomSteps[Ue+1]:this.zoomSteps[0]},lt.prototype.panTo=function(Ue){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Ue.x,top:this.prevPanPoint.y-Ue.y}),this.prevPanPoint=Ue},lt.prototype.startRenderAndClose=function(){return je(this,void 0,void 0,function(){var Ue,Be,tt=this;return Me(this,function(ht){switch(ht.label){case 0:return[4,this.render()];case 1:return Ue=ht.sent(),Be=this.getState(),this.eventListeners.render.forEach(function(et){return et(new Dt(tt,Ue,Be))}),this.close(!0),[2]}})})},lt.prototype.getState=function(Ue){Ue===!0&&this.setCurrentMarker();var Be={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(tt){return Be.markers.push(tt.getState())}),Be},lt.prototype.restoreState=function(Ue){var Be=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Ue.markers.forEach(function(tt){var ht=Be._availableMarkerTypes.find(function(Ve){return Ve.typeName===tt.typeName});if(ht!==void 0){var et=Be.addNewMarker(ht);et.restoreState(tt),Be.markers.push(et)}}),Ue.width&&Ue.height&&(Ue.width!==this.imageWidth||Ue.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Ue.width,this.imageHeight/Ue.height),this.eventListeners.restorestate.forEach(function(tt){return tt(new Ft(Be))})},lt.prototype.addNewMarker=function(Ue){var Be=xe.createGroup();return this.markerImage.appendChild(Be),new Ue(Be,this.overlayContainer,this.settings)},lt.prototype.createNewMarker=function(Ue){var Be,tt=this;(Be=typeof Ue=="string"?this._availableMarkerTypes.find(function(ht){return ht.typeName===Ue}):Ue)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Be),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(Be.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ht){return ht(new Qt(tt,tt._currentMarker))}))},lt.prototype.markerCreated=function(Ue){var Be=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Ue),this.setCurrentMarker(Ue),Ue instanceof pt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(pt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(tt){return tt(new Qt(Be,Be._currentMarker))})},lt.prototype.colorChanged=function(Ue){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Ue,this.settings.defaultStrokeColor=Ue)},lt.prototype.fillColorChanged=function(Ue){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Ue)},lt.prototype.markerStateChanged=function(Ue){var Be=this;this.eventListeners.markerchange.forEach(function(tt){return tt(new Qt(Be,Ue))})},lt.prototype.setCurrentMarker=function(Ue){var Be=this;this._currentMarker!==Ue&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(tt){return tt(new Qt(Be,Be._currentMarker))})),this._currentMarker=Ue,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(tt){return tt(new Qt(Be,Be._currentMarker))}))},lt.prototype.onPointerDown=function(Ue){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Ue.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Be=this.markers.find(function(tt){return tt.ownsTarget(Ue.target)});Be!==void 0?(this.setCurrentMarker(Be),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ue.clientX,Ue.clientY),Ue.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Ue.clientX,y:Ue.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ue.clientX,Ue.clientY))},lt.prototype.onDblClick=function(Ue){if(this._isFocused||this.focus(),this.mode==="select"){var Be=this.markers.find(function(tt){return tt.ownsTarget(Ue.target)});Be!==void 0&&Be!==this._currentMarker&&this.setCurrentMarker(Be),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Ue.clientX,Ue.clientY),Ue.target):this.setCurrentMarker()}},lt.prototype.onPointerMove=function(Ue){this.touchPoints!==1&&Ue.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Ue.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Ue.clientX,Ue.clientY)):this.zoomLevel>1&&this.panTo({x:Ue.clientX,y:Ue.clientY}))},lt.prototype.onPointerUp=function(Ue){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Ue.clientX,Ue.clientY)),this.isDragging=!1,this.addUndoStep()},lt.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},lt.prototype.onKeyUp=function(Ue){this._currentMarker===void 0||this.notesArea!==void 0||Ue.key!=="Delete"&&Ue.key!=="Backspace"||this.deleteSelectedMarker()},lt.prototype.clientToLocalCoordinates=function(Ue,Be){var tt=this.markerImage.getBoundingClientRect();return{x:(Ue-tt.left)/this.zoomLevel,y:(Be-tt.top)/this.zoomLevel}},lt.prototype.onWindowResize=function(){this.positionUI()},lt.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Ue=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Ue+"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()},lt.prototype.addLicenseKey=function(Ue){be.addKey(Ue)},lt.prototype.addEventListener=function(Ue,Be){this.eventListeners.addEventListener(Ue,Be)},lt.prototype.removeEventListener=function(Ue,Be){this.eventListeners.removeEventListener(Ue,Be)},lt.prototype.renderState=function(Ue){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Ue),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(lt.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),lt.prototype.focus=function(){var Ue=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Be){return Be(new Ft(Ue))}))},lt.prototype.blur=function(){var Ue=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Be){return Be(new Ft(Ue))}))},lt.instanceCounter=0,lt}()},66042:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return mt}});var Le=Ie(98506),Se=Ie(16886),je=Ie(43403),Me=Ie(34280),Ce=Ie(59301),xe=Ce.createContext(null),be=Ce.createContext({}),ye=xe,we=Ie(52873),pe=Ie(67711),de=Ie(92310),ge=Ie.n(de),fe=Ie(77900),ue=Ie(10228),ee=Ie(26112),z=Ie(33346),oe=Ie(8654),re=["prefixCls","className","containerRef"],ae=function(Mt){var at=Mt.prefixCls,_t=Mt.className,dt=Mt.containerRef,Rt=(0,z.Z)(Mt,re),ut=Ce.useContext(be),rt=ut.panel,ct=(0,oe.x1)(rt,dt);return Ce.createElement("div",(0,pe.Z)({className:ge()("".concat(at,"-content"),_t),role:"dialog",ref:ct},(0,ee.Z)(Mt,{aria:!0}),{"aria-modal":"true"},Rt))},le=ae,me=Ie(48736);function ve(pt){return typeof pt=="string"&&String(Number(pt))===pt?((0,me.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(pt)):pt}function Pe(pt){warning(!("wrapperClassName"in pt),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!pt.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Ae={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function De(pt,Mt){var at,_t,dt,Rt=pt.prefixCls,ut=pt.open,rt=pt.placement,ct=pt.inline,yt=pt.push,wt=pt.forceRender,xt=pt.autoFocus,Ut=pt.keyboard,zt=pt.classNames,dn=pt.rootClassName,Ft=pt.rootStyle,Dt=pt.zIndex,Qt=pt.className,Yt=pt.id,Jt=pt.style,lt=pt.motion,Ue=pt.width,Be=pt.height,tt=pt.children,ht=pt.mask,et=pt.maskClosable,Ve=pt.maskMotion,Re=pt.maskClassName,ze=pt.maskStyle,it=pt.afterOpenChange,Ke=pt.onClose,We=pt.onMouseEnter,vt=pt.onMouseOver,kt=pt.onMouseLeave,hn=pt.onClick,en=pt.onKeyDown,Gt=pt.onKeyUp,gn=pt.styles,bn=pt.drawerRender,yn=Ce.useRef(),un=Ce.useRef(),Jn=Ce.useRef();Ce.useImperativeHandle(Mt,function(){return yn.current});var mn=function(ti){var Oi=ti.keyCode,pr=ti.shiftKey;switch(Oi){case ue.Z.TAB:{if(Oi===ue.Z.TAB){if(!pr&&document.activeElement===Jn.current){var dr;(dr=un.current)===null||dr===void 0||dr.focus({preventScroll:!0})}else if(pr&&document.activeElement===un.current){var Qi;(Qi=Jn.current)===null||Qi===void 0||Qi.focus({preventScroll:!0})}}break}case ue.Z.ESC:{Ke&&Ut&&(ti.stopPropagation(),Ke(ti));break}}};Ce.useEffect(function(){if(ut&&xt){var Li;(Li=yn.current)===null||Li===void 0||Li.focus({preventScroll:!0})}},[ut]);var Yn=Ce.useState(!1),ri=(0,Se.Z)(Yn,2),bi=ri[0],jn=ri[1],ki=Ce.useContext(ye),Hi;typeof yt=="boolean"?Hi=yt?{}:{distance:0}:Hi=yt||{};var Fi=(at=(_t=(dt=Hi)===null||dt===void 0?void 0:dt.distance)!==null&&_t!==void 0?_t:ki==null?void 0:ki.pushDistance)!==null&&at!==void 0?at:180,rr=Ce.useMemo(function(){return{pushDistance:Fi,push:function(){jn(!0)},pull:function(){jn(!1)}}},[Fi]);Ce.useEffect(function(){if(ut){var Li;ki==null||(Li=ki.push)===null||Li===void 0||Li.call(ki)}else{var ti;ki==null||(ti=ki.pull)===null||ti===void 0||ti.call(ki)}},[ut]),Ce.useEffect(function(){return function(){var Li;ki==null||(Li=ki.pull)===null||Li===void 0||Li.call(ki)}},[]);var Cr=ht&&Ce.createElement(fe.default,(0,pe.Z)({key:"mask"},Ve,{visible:ut}),function(Li,ti){var Oi=Li.className,pr=Li.style;return Ce.createElement("div",{className:ge()("".concat(Rt,"-mask"),Oi,zt==null?void 0:zt.mask,Re),style:(0,Le.Z)((0,Le.Z)((0,Le.Z)({},pr),ze),gn==null?void 0:gn.mask),onClick:et&&ut?Ke:void 0,ref:ti})}),gr=typeof lt=="function"?lt(rt):lt,Ni={};if(bi&&Fi)switch(rt){case"top":Ni.transform="translateY(".concat(Fi,"px)");break;case"bottom":Ni.transform="translateY(".concat(-Fi,"px)");break;case"left":Ni.transform="translateX(".concat(Fi,"px)");break;default:Ni.transform="translateX(".concat(-Fi,"px)");break}rt==="left"||rt==="right"?Ni.width=ve(Ue):Ni.height=ve(Be);var Ti={onMouseEnter:We,onMouseOver:vt,onMouseLeave:kt,onClick:hn,onKeyDown:en,onKeyUp:Gt},cr=Ce.createElement(fe.default,(0,pe.Z)({key:"panel"},gr,{visible:ut,forceRender:wt,onVisibleChanged:function(ti){it==null||it(ti)},removeOnLeave:!1,leavedClassName:"".concat(Rt,"-content-wrapper-hidden")}),function(Li,ti){var Oi=Li.className,pr=Li.style,dr=Ce.createElement(le,(0,pe.Z)({id:Yt,containerRef:ti,prefixCls:Rt,className:ge()(Qt,zt==null?void 0:zt.content),style:(0,Le.Z)((0,Le.Z)({},Jt),gn==null?void 0:gn.content)},(0,ee.Z)(pt,{aria:!0}),Ti),tt);return Ce.createElement("div",(0,pe.Z)({className:ge()("".concat(Rt,"-content-wrapper"),zt==null?void 0:zt.wrapper,Oi),style:(0,Le.Z)((0,Le.Z)((0,Le.Z)({},Ni),pr),gn==null?void 0:gn.wrapper)},(0,ee.Z)(pt,{data:!0})),bn?bn(dr):dr)}),$e=(0,Le.Z)({},Ft);return Dt&&($e.zIndex=Dt),Ce.createElement(ye.Provider,{value:rr},Ce.createElement("div",{className:ge()(Rt,"".concat(Rt,"-").concat(rt),dn,(0,we.Z)((0,we.Z)({},"".concat(Rt,"-open"),ut),"".concat(Rt,"-inline"),ct)),style:$e,tabIndex:-1,ref:yn,onKeyDown:mn},Cr,Ce.createElement("div",{tabIndex:0,ref:un,style:Ae,"aria-hidden":"true","data-sentinel":"start"}),cr,Ce.createElement("div",{tabIndex:0,ref:Jn,style:Ae,"aria-hidden":"true","data-sentinel":"end"})))}var Oe=Ce.forwardRef(De),Ze=Oe,qe=function(Mt){var at=Mt.open,_t=at===void 0?!1:at,dt=Mt.prefixCls,Rt=dt===void 0?"rc-drawer":dt,ut=Mt.placement,rt=ut===void 0?"right":ut,ct=Mt.autoFocus,yt=ct===void 0?!0:ct,wt=Mt.keyboard,xt=wt===void 0?!0:wt,Ut=Mt.width,zt=Ut===void 0?378:Ut,dn=Mt.mask,Ft=dn===void 0?!0:dn,Dt=Mt.maskClosable,Qt=Dt===void 0?!0:Dt,Yt=Mt.getContainer,Jt=Mt.forceRender,lt=Mt.afterOpenChange,Ue=Mt.destroyOnClose,Be=Mt.onMouseEnter,tt=Mt.onMouseOver,ht=Mt.onMouseLeave,et=Mt.onClick,Ve=Mt.onKeyDown,Re=Mt.onKeyUp,ze=Mt.panelRef,it=Ce.useState(!1),Ke=(0,Se.Z)(it,2),We=Ke[0],vt=Ke[1],kt=Ce.useState(!1),hn=(0,Se.Z)(kt,2),en=hn[0],Gt=hn[1];(0,Me.Z)(function(){Gt(!0)},[]);var gn=en?_t:!1,bn=Ce.useRef(),yn=Ce.useRef();(0,Me.Z)(function(){gn&&(yn.current=document.activeElement)},[gn]);var un=function(bi){var jn;if(vt(bi),lt==null||lt(bi),!bi&&yn.current&&!((jn=bn.current)!==null&&jn!==void 0&&jn.contains(yn.current))){var ki;(ki=yn.current)===null||ki===void 0||ki.focus({preventScroll:!0})}},Jn=Ce.useMemo(function(){return{panel:ze}},[ze]);if(!Jt&&!We&&!gn&&Ue)return null;var mn={onMouseEnter:Be,onMouseOver:tt,onMouseLeave:ht,onClick:et,onKeyDown:Ve,onKeyUp:Re},Yn=(0,Le.Z)((0,Le.Z)({},Mt),{},{open:gn,prefixCls:Rt,placement:rt,autoFocus:yt,keyboard:xt,width:zt,mask:Ft,maskClosable:Qt,inline:Yt===!1,afterOpenChange:un,ref:bn},mn);return Ce.createElement(be.Provider,{value:Jn},Ce.createElement(je.Z,{open:gn||Jt||We,autoDestroy:!1,getContainer:Yt,autoLock:Ft&&(gn||We)},Ce.createElement(Ze,Yn)))},Xe=qe,mt=Xe},91574:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return hn}});var Le=Ie(67711),Se=Ie(98506),je=Ie(52873),Me=Ie(16886),Ce=Ie(26420),xe=Ie(33346),be=Ie(92310),ye=Ie.n(be),we=/margin|padding|width|height|max|min|offset/,pe={left:!0,top:!0},de={cssFloat:1,styleFloat:1,float:1};function ge(en){return en.nodeType===1?en.ownerDocument.defaultView.getComputedStyle(en,null):{}}function fe(en,Gt,gn){if(Gt=Gt.toLowerCase(),gn==="auto"){if(Gt==="height")return en.offsetHeight;if(Gt==="width")return en.offsetWidth}return Gt in pe||(pe[Gt]=we.test(Gt)),pe[Gt]?parseFloat(gn)||0:gn}function ue(en,Gt){var gn=arguments.length,bn=ge(en);return Gt=de[Gt]?"cssFloat"in en.style?"cssFloat":"styleFloat":Gt,gn===1?bn:fe(en,Gt,bn[Gt]||en.style[Gt])}function ee(en,Gt,gn){var bn=arguments.length;if(Gt=de[Gt]?"cssFloat"in en.style?"cssFloat":"styleFloat":Gt,bn===3)return typeof gn=="number"&&we.test(Gt)&&(gn="".concat(gn,"px")),en.style[Gt]=gn,gn;for(var yn in Gt)Gt.hasOwnProperty(yn)&&ee(en,yn,Gt[yn]);return ge(en)}function z(en){return en===document.body?document.documentElement.clientWidth:en.offsetWidth}function oe(en){return en===document.body?window.innerHeight||document.documentElement.clientHeight:en.offsetHeight}function re(){var en=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),Gt=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:en,height:Gt}}function ae(){var en=document.documentElement.clientWidth,Gt=window.innerHeight||document.documentElement.clientHeight;return{width:en,height:Gt}}function le(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function me(en){var Gt=en.getBoundingClientRect(),gn=document.documentElement;return{left:Gt.left+(window.pageXOffset||gn.scrollLeft)-(gn.clientLeft||document.body.clientLeft||0),top:Gt.top+(window.pageYOffset||gn.scrollTop)-(gn.clientTop||document.body.clientTop||0)}}var ve=Ie(18929),Pe=Ie(59301),Ae=Ie(55311),De=Ie(8224),Oe=Ie(10228),Ze=Ie(43403),qe=Ie(77900),Xe=Pe.createContext(null),mt=function(Gt){var gn=Gt.visible,bn=Gt.maskTransitionName,yn=Gt.getContainer,un=Gt.prefixCls,Jn=Gt.rootClassName,mn=Gt.icons,Yn=Gt.countRender,ri=Gt.showSwitch,bi=Gt.showProgress,jn=Gt.current,ki=Gt.transform,Hi=Gt.count,Fi=Gt.scale,rr=Gt.minScale,Cr=Gt.maxScale,gr=Gt.closeIcon,Ni=Gt.onActive,Ti=Gt.onClose,cr=Gt.onZoomIn,$e=Gt.onZoomOut,Li=Gt.onRotateRight,ti=Gt.onRotateLeft,Oi=Gt.onFlipX,pr=Gt.onFlipY,dr=Gt.onReset,Qi=Gt.toolbarRender,So=Gt.zIndex,$t=Gt.image,Ge=(0,Pe.useContext)(Xe),Je=mn.rotateLeft,ot=mn.rotateRight,Et=mn.zoomIn,Nt=mn.zoomOut,pn=mn.close,jt=mn.left,cn=mn.right,On=mn.flipX,pi=mn.flipY,Fn="".concat(un,"-operations-operation");Pe.useEffect(function(){var Mn=function(mi){mi.keyCode===Oe.Z.ESC&&Ti()};return gn&&window.addEventListener("keydown",Mn),function(){window.removeEventListener("keydown",Mn)}},[gn]);var Lt=function(wi,mi){wi.preventDefault(),wi.stopPropagation(),Ni(mi)},Ht=Pe.useCallback(function(Mn){var wi=Mn.type,mi=Mn.disabled,En=Mn.onClick,ei=Mn.icon;return Pe.createElement("div",{key:wi,className:ye()(Fn,"".concat(un,"-operations-operation-").concat(wi),(0,je.Z)({},"".concat(un,"-operations-operation-disabled"),!!mi)),onClick:En},ei)},[Fn,un]),Pn=ri?Ht({icon:jt,onClick:function(wi){return Lt(wi,-1)},type:"prev",disabled:jn===0}):void 0,Sn=ri?Ht({icon:cn,onClick:function(wi){return Lt(wi,1)},type:"next",disabled:jn===Hi-1}):void 0,Kt=Ht({icon:pi,onClick:pr,type:"flipY"}),vn=Ht({icon:On,onClick:Oi,type:"flipX"}),Hn=Ht({icon:Je,onClick:ti,type:"rotateLeft"}),Gn=Ht({icon:ot,onClick:Li,type:"rotateRight"}),oi=Ht({icon:Nt,onClick:$e,type:"zoomOut",disabled:Fi<=rr}),Wn=Ht({icon:Et,onClick:cr,type:"zoomIn",disabled:Fi===Cr}),zn=Pe.createElement("div",{className:"".concat(un,"-operations")},Kt,vn,Hn,Gn,oi,Wn);return Pe.createElement(qe.default,{visible:gn,motionName:bn},function(Mn){var wi=Mn.className,mi=Mn.style;return Pe.createElement(Ze.Z,{open:!0,getContainer:yn!=null?yn:document.body},Pe.createElement("div",{className:ye()("".concat(un,"-operations-wrapper"),wi,Jn),style:(0,Se.Z)((0,Se.Z)({},mi),{},{zIndex:So})},gr===null?null:Pe.createElement("button",{className:"".concat(un,"-close"),onClick:Ti},gr||pn),ri&&Pe.createElement(Pe.Fragment,null,Pe.createElement("div",{className:ye()("".concat(un,"-switch-left"),(0,je.Z)({},"".concat(un,"-switch-left-disabled"),jn===0)),onClick:function(ei){return Lt(ei,-1)}},jt),Pe.createElement("div",{className:ye()("".concat(un,"-switch-right"),(0,je.Z)({},"".concat(un,"-switch-right-disabled"),jn===Hi-1)),onClick:function(ei){return Lt(ei,1)}},cn)),Pe.createElement("div",{className:"".concat(un,"-footer")},bi&&Pe.createElement("div",{className:"".concat(un,"-progress")},Yn?Yn(jn+1,Hi):"".concat(jn+1," / ").concat(Hi)),Qi?Qi(zn,(0,Se.Z)((0,Se.Z)({icons:{prevIcon:Pn,nextIcon:Sn,flipYIcon:Kt,flipXIcon:vn,rotateLeftIcon:Hn,rotateRightIcon:Gn,zoomOutIcon:oi,zoomInIcon:Wn},actions:{onActive:Ni,onFlipY:pr,onFlipX:Oi,onRotateLeft:ti,onRotateRight:Li,onZoomOut:$e,onZoomIn:cr,onReset:dr,onClose:Ti},transform:ki},Ge?{current:jn,total:Hi}:{}),{},{image:$t})):zn)))})},pt=mt,Mt=Ie(13697),at=Ie(16089),_t={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function dt(en,Gt,gn,bn){var yn=(0,Pe.useRef)(null),un=(0,Pe.useRef)([]),Jn=(0,Pe.useState)(_t),mn=(0,Me.Z)(Jn,2),Yn=mn[0],ri=mn[1],bi=function(Fi){ri(_t),(0,Mt.Z)(_t,Yn)||bn==null||bn({transform:_t,action:Fi})},jn=function(Fi,rr){yn.current===null&&(un.current=[],yn.current=(0,at.Z)(function(){ri(function(Cr){var gr=Cr;return un.current.forEach(function(Ni){gr=(0,Se.Z)((0,Se.Z)({},gr),Ni)}),yn.current=null,bn==null||bn({transform:gr,action:rr}),gr})})),un.current.push((0,Se.Z)((0,Se.Z)({},Yn),Fi))},ki=function(Fi,rr,Cr,gr,Ni){var Ti=en.current,cr=Ti.width,$e=Ti.height,Li=Ti.offsetWidth,ti=Ti.offsetHeight,Oi=Ti.offsetLeft,pr=Ti.offsetTop,dr=Fi,Qi=Yn.scale*Fi;Qi>gn?(Qi=gn,dr=gn/Yn.scale):Qi<Gt&&(Qi=Ni?Qi:Gt,dr=Qi/Yn.scale);var So=Cr!=null?Cr:innerWidth/2,$t=gr!=null?gr:innerHeight/2,Ge=dr-1,Je=Ge*cr*.5,ot=Ge*$e*.5,Et=Ge*(So-Yn.x-Oi),Nt=Ge*($t-Yn.y-pr),pn=Yn.x-(Et-Je),jt=Yn.y-(Nt-ot);if(Fi<1&&Qi===1){var cn=Li*Qi,On=ti*Qi,pi=ae(),Fn=pi.width,Lt=pi.height;cn<=Fn&&On<=Lt&&(pn=0,jt=0)}jn({x:pn,y:jt,scale:Qi},rr)};return{transform:Yn,resetTransform:bi,updateTransform:jn,dispatchZoomChange:ki}}var Rt=Ie(48736);function ut(en,Gt,gn,bn){var yn=Gt+gn,un=(gn-bn)/2;if(gn>bn){if(Gt>0)return(0,je.Z)({},en,un);if(Gt<0&&yn<bn)return(0,je.Z)({},en,-un)}else if(Gt<0||yn>bn)return(0,je.Z)({},en,Gt<0?un:-un);return{}}function rt(en,Gt,gn,bn){var yn=ae(),un=yn.width,Jn=yn.height,mn=null;return en<=un&&Gt<=Jn?mn={x:0,y:0}:(en>un||Gt>Jn)&&(mn=(0,Se.Z)((0,Se.Z)({},ut("x",gn,en,un)),ut("y",bn,Gt,Jn))),mn}var ct=1,yt=1;function wt(en,Gt,gn,bn,yn,un,Jn){var mn=yn.rotate,Yn=yn.scale,ri=yn.x,bi=yn.y,jn=(0,Pe.useState)(!1),ki=(0,Me.Z)(jn,2),Hi=ki[0],Fi=ki[1],rr=(0,Pe.useRef)({diffX:0,diffY:0,transformX:0,transformY:0}),Cr=function($e){!Gt||$e.button!==0||($e.preventDefault(),$e.stopPropagation(),rr.current={diffX:$e.pageX-ri,diffY:$e.pageY-bi,transformX:ri,transformY:bi},Fi(!0))},gr=function($e){gn&&Hi&&un({x:$e.pageX-rr.current.diffX,y:$e.pageY-rr.current.diffY},"move")},Ni=function(){if(gn&&Hi){Fi(!1);var $e=rr.current,Li=$e.transformX,ti=$e.transformY,Oi=ri!==Li&&bi!==ti;if(!Oi)return;var pr=en.current.offsetWidth*Yn,dr=en.current.offsetHeight*Yn,Qi=en.current.getBoundingClientRect(),So=Qi.left,$t=Qi.top,Ge=mn%180!==0,Je=rt(Ge?dr:pr,Ge?pr:dr,So,$t);Je&&un((0,Se.Z)({},Je),"dragRebound")}},Ti=function($e){if(!(!gn||$e.deltaY==0)){var Li=Math.abs($e.deltaY/100),ti=Math.min(Li,yt),Oi=ct+ti*bn;$e.deltaY>0&&(Oi=ct/Oi),Jn(Oi,"wheel",$e.clientX,$e.clientY)}};return(0,Pe.useEffect)(function(){var cr,$e,Li,ti;if(Gt){Li=(0,De.Z)(window,"mouseup",Ni,!1),ti=(0,De.Z)(window,"mousemove",gr,!1);try{window.top!==window.self&&(cr=(0,De.Z)(window.top,"mouseup",Ni,!1),$e=(0,De.Z)(window.top,"mousemove",gr,!1))}catch(Oi){(0,Rt.Kp)(!1,"[rc-image] ".concat(Oi))}}return function(){var Oi,pr,dr,Qi;(Oi=Li)===null||Oi===void 0||Oi.remove(),(pr=ti)===null||pr===void 0||pr.remove(),(dr=cr)===null||dr===void 0||dr.remove(),(Qi=$e)===null||Qi===void 0||Qi.remove()}},[gn,Hi,ri,bi,mn,Gt]),{isMoving:Hi,onMouseDown:Cr,onMouseMove:gr,onMouseUp:Ni,onWheel:Ti}}function xt(en){return new Promise(function(Gt){if(!en){Gt(!1);return}var gn=document.createElement("img");gn.onerror=function(){return Gt(!1)},gn.onload=function(){return Gt(!0)},gn.src=en})}function Ut(en){var Gt=en.src,gn=en.isCustomPlaceholder,bn=en.fallback,yn=(0,Pe.useState)(gn?"loading":"normal"),un=(0,Me.Z)(yn,2),Jn=un[0],mn=un[1],Yn=(0,Pe.useRef)(!1),ri=Jn==="error";(0,Pe.useEffect)(function(){var Hi=!0;return xt(Gt).then(function(Fi){!Fi&&Hi&&mn("error")}),function(){Hi=!1}},[Gt]),(0,Pe.useEffect)(function(){gn&&!Yn.current?mn("loading"):ri&&mn("normal")},[Gt]);var bi=function(){mn("normal")},jn=function(Fi){Yn.current=!1,Jn==="loading"&&Fi!==null&&Fi!==void 0&&Fi.complete&&(Fi.naturalWidth||Fi.naturalHeight)&&(Yn.current=!0,bi())},ki=ri&&bn?{src:bn}:{onLoad:bi,src:Gt};return[jn,ki,Jn]}function zt(en,Gt){var gn=en.x-Gt.x,bn=en.y-Gt.y;return Math.hypot(gn,bn)}function dn(en,Gt,gn,bn){var yn=zt(en,gn),un=zt(Gt,bn);if(yn===0&&un===0)return[en.x,en.y];var Jn=yn/(yn+un),mn=en.x+Jn*(Gt.x-en.x),Yn=en.y+Jn*(Gt.y-en.y);return[mn,Yn]}function Ft(en,Gt,gn,bn,yn,un,Jn){var mn=yn.rotate,Yn=yn.scale,ri=yn.x,bi=yn.y,jn=(0,Pe.useState)(!1),ki=(0,Me.Z)(jn,2),Hi=ki[0],Fi=ki[1],rr=(0,Pe.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),Cr=function($e){rr.current=(0,Se.Z)((0,Se.Z)({},rr.current),$e)},gr=function($e){if(Gt){$e.stopPropagation(),Fi(!0);var Li=$e.touches,ti=Li===void 0?[]:Li;ti.length>1?Cr({point1:{x:ti[0].clientX,y:ti[0].clientY},point2:{x:ti[1].clientX,y:ti[1].clientY},eventType:"touchZoom"}):Cr({point1:{x:ti[0].clientX-ri,y:ti[0].clientY-bi},eventType:"move"})}},Ni=function($e){var Li=$e.touches,ti=Li===void 0?[]:Li,Oi=rr.current,pr=Oi.point1,dr=Oi.point2,Qi=Oi.eventType;if(ti.length>1&&Qi==="touchZoom"){var So={x:ti[0].clientX,y:ti[0].clientY},$t={x:ti[1].clientX,y:ti[1].clientY},Ge=dn(pr,dr,So,$t),Je=(0,Me.Z)(Ge,2),ot=Je[0],Et=Je[1],Nt=zt(So,$t)/zt(pr,dr);Jn(Nt,"touchZoom",ot,Et,!0),Cr({point1:So,point2:$t,eventType:"touchZoom"})}else Qi==="move"&&(un({x:ti[0].clientX-pr.x,y:ti[0].clientY-pr.y},"move"),Cr({eventType:"move"}))},Ti=function(){if(gn){if(Hi&&Fi(!1),Cr({eventType:"none"}),bn>Yn)return un({x:0,y:0,scale:bn},"touchZoom");var $e=en.current.offsetWidth*Yn,Li=en.current.offsetHeight*Yn,ti=en.current.getBoundingClientRect(),Oi=ti.left,pr=ti.top,dr=mn%180!==0,Qi=rt(dr?Li:$e,dr?$e:Li,Oi,pr);Qi&&un((0,Se.Z)({},Qi),"dragRebound")}};return(0,Pe.useEffect)(function(){var cr;return gn&&Gt&&(cr=(0,De.Z)(window,"touchmove",function($e){return $e.preventDefault()},{passive:!1})),function(){var $e;($e=cr)===null||$e===void 0||$e.remove()}},[gn,Gt]),{isTouching:Hi,onTouchStart:gr,onTouchMove:Ni,onTouchEnd:Ti}}var Dt=["fallback","src","imgRef"],Qt=["prefixCls","src","alt","imageInfo","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],Yt=function(Gt){var gn=Gt.fallback,bn=Gt.src,yn=Gt.imgRef,un=(0,xe.Z)(Gt,Dt),Jn=Ut({src:bn,fallback:gn}),mn=(0,Me.Z)(Jn,2),Yn=mn[0],ri=mn[1];return Pe.createElement("img",(0,Le.Z)({ref:function(jn){yn.current=jn,Yn(jn)}},un,ri))},Jt=function(Gt){var gn=Gt.prefixCls,bn=Gt.src,yn=Gt.alt,un=Gt.imageInfo,Jn=Gt.fallback,mn=Gt.movable,Yn=mn===void 0?!0:mn,ri=Gt.onClose,bi=Gt.visible,jn=Gt.icons,ki=jn===void 0?{}:jn,Hi=Gt.rootClassName,Fi=Gt.closeIcon,rr=Gt.getContainer,Cr=Gt.current,gr=Cr===void 0?0:Cr,Ni=Gt.count,Ti=Ni===void 0?1:Ni,cr=Gt.countRender,$e=Gt.scaleStep,Li=$e===void 0?.5:$e,ti=Gt.minScale,Oi=ti===void 0?1:ti,pr=Gt.maxScale,dr=pr===void 0?50:pr,Qi=Gt.transitionName,So=Qi===void 0?"zoom":Qi,$t=Gt.maskTransitionName,Ge=$t===void 0?"fade":$t,Je=Gt.imageRender,ot=Gt.imgCommonProps,Et=Gt.toolbarRender,Nt=Gt.onTransform,pn=Gt.onChange,jt=(0,xe.Z)(Gt,Qt),cn=(0,Pe.useRef)(),On=(0,Pe.useContext)(Xe),pi=On&&Ti>1,Fn=On&&Ti>=1,Lt=(0,Pe.useState)(!0),Ht=(0,Me.Z)(Lt,2),Pn=Ht[0],Sn=Ht[1],Kt=dt(cn,Oi,dr,Nt),vn=Kt.transform,Hn=Kt.resetTransform,Gn=Kt.updateTransform,oi=Kt.dispatchZoomChange,Wn=wt(cn,Yn,bi,Li,vn,Gn,oi),zn=Wn.isMoving,Mn=Wn.onMouseDown,wi=Wn.onWheel,mi=Ft(cn,Yn,bi,Oi,vn,Gn,oi),En=mi.isTouching,ei=mi.onTouchStart,er=mi.onTouchMove,Sr=mi.onTouchEnd,Tr=vn.rotate,nn=vn.scale,Mi=ye()((0,je.Z)({},"".concat(gn,"-moving"),zn));(0,Pe.useEffect)(function(){Pn||Sn(!0)},[Pn]);var tr=function(){Hn("close")},vi=function(){oi(ct+Li,"zoomIn")},or=function(){oi(ct/(ct+Li),"zoomOut")},Vi=function(){Gn({rotate:Tr+90},"rotateRight")},yr=function(){Gn({rotate:Tr-90},"rotateLeft")},fr=function(){Gn({flipX:!vn.flipX},"flipX")},_r=function(){Gn({flipY:!vn.flipY},"flipY")},Yr=function(){Hn("reset")},Ln=function(so){var Er=gr+so;!Number.isInteger(Er)||Er<0||Er>Ti-1||(Sn(!1),Hn(so<0?"prev":"next"),pn==null||pn(Er,gr))},oo=function(so){!bi||!pi||(so.keyCode===Oe.Z.LEFT?Ln(-1):so.keyCode===Oe.Z.RIGHT&&Ln(1))},kn=function(so){bi&&(nn!==1?Gn({x:0,y:0,scale:1},"doubleClick"):oi(ct+Li,"doubleClick",so.clientX,so.clientY))};(0,Pe.useEffect)(function(){var sr=(0,De.Z)(window,"keydown",oo,!1);return function(){sr.remove()}},[bi,pi,gr]);var Di=Pe.createElement(Yt,(0,Le.Z)({},ot,{width:Gt.width,height:Gt.height,imgRef:cn,className:"".concat(gn,"-img"),alt:yn,style:{transform:"translate3d(".concat(vn.x,"px, ").concat(vn.y,"px, 0) scale3d(").concat(vn.flipX?"-":"").concat(nn,", ").concat(vn.flipY?"-":"").concat(nn,", 1) rotate(").concat(Tr,"deg)"),transitionDuration:(!Pn||En)&&"0s"},fallback:Jn,src:bn,onWheel:wi,onMouseDown:Mn,onDoubleClick:kn,onTouchStart:ei,onTouchMove:er,onTouchEnd:Sr,onTouchCancel:Sr})),Lr=(0,Se.Z)({url:bn,alt:yn},un);return Pe.createElement(Pe.Fragment,null,Pe.createElement(Ae.Z,(0,Le.Z)({transitionName:So,maskTransitionName:Ge,closable:!1,keyboard:!0,prefixCls:gn,onClose:ri,visible:bi,classNames:{wrapper:Mi},rootClassName:Hi,getContainer:rr},jt,{afterClose:tr}),Pe.createElement("div",{className:"".concat(gn,"-img-wrapper")},Je?Je(Di,(0,Se.Z)({transform:vn,image:Lr},On?{current:gr}:{})):Di)),Pe.createElement(pt,{visible:bi,transform:vn,maskTransitionName:Ge,closeIcon:Fi,getContainer:rr,prefixCls:gn,rootClassName:Hi,icons:ki,countRender:cr,showSwitch:pi,showProgress:Fn,current:gr,count:Ti,scale:nn,minScale:Oi,maxScale:dr,toolbarRender:Et,onActive:Ln,onZoomIn:vi,onZoomOut:or,onRotateRight:Vi,onRotateLeft:yr,onFlipX:fr,onFlipY:_r,onClose:ri,onReset:Yr,zIndex:jt.zIndex!==void 0?jt.zIndex+1:void 0,image:Lr}))},lt=Jt,Ue=Ie(15142),Be=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];function tt(en){var Gt=Pe.useState({}),gn=(0,Me.Z)(Gt,2),bn=gn[0],yn=gn[1],un=Pe.useCallback(function(mn,Yn){return yn(function(ri){return(0,Se.Z)((0,Se.Z)({},ri),{},(0,je.Z)({},mn,Yn))}),function(){yn(function(ri){var bi=(0,Se.Z)({},ri);return delete bi[mn],bi})}},[]),Jn=Pe.useMemo(function(){return en?en.map(function(mn){if(typeof mn=="string")return{data:{src:mn}};var Yn={};return Object.keys(mn).forEach(function(ri){["src"].concat((0,Ue.Z)(Be)).includes(ri)&&(Yn[ri]=mn[ri])}),{data:Yn}}):Object.keys(bn).reduce(function(mn,Yn){var ri=bn[Yn],bi=ri.canPreview,jn=ri.data;return bi&&mn.push({data:jn,id:Yn}),mn},[])},[en,bn]);return[Jn,un,!!en]}var ht=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],et=["src"],Ve=function(Gt){var gn,bn=Gt.previewPrefixCls,yn=bn===void 0?"rc-image-preview":bn,un=Gt.children,Jn=Gt.icons,mn=Jn===void 0?{}:Jn,Yn=Gt.items,ri=Gt.preview,bi=Gt.fallback,jn=(0,Ce.Z)(ri)==="object"?ri:{},ki=jn.visible,Hi=jn.onVisibleChange,Fi=jn.getContainer,rr=jn.current,Cr=jn.movable,gr=jn.minScale,Ni=jn.maxScale,Ti=jn.countRender,cr=jn.closeIcon,$e=jn.onChange,Li=jn.onTransform,ti=jn.toolbarRender,Oi=jn.imageRender,pr=(0,xe.Z)(jn,ht),dr=tt(Yn),Qi=(0,Me.Z)(dr,3),So=Qi[0],$t=Qi[1],Ge=Qi[2],Je=(0,ve.Z)(0,{value:rr}),ot=(0,Me.Z)(Je,2),Et=ot[0],Nt=ot[1],pn=(0,Pe.useState)(!1),jt=(0,Me.Z)(pn,2),cn=jt[0],On=jt[1],pi=((gn=So[Et])===null||gn===void 0?void 0:gn.data)||{},Fn=pi.src,Lt=(0,xe.Z)(pi,et),Ht=(0,ve.Z)(!!ki,{value:ki,onChange:function(En,ei){Hi==null||Hi(En,ei,Et)}}),Pn=(0,Me.Z)(Ht,2),Sn=Pn[0],Kt=Pn[1],vn=(0,Pe.useState)(null),Hn=(0,Me.Z)(vn,2),Gn=Hn[0],oi=Hn[1],Wn=Pe.useCallback(function(mi,En,ei,er){var Sr=Ge?So.findIndex(function(Tr){return Tr.data.src===En}):So.findIndex(function(Tr){return Tr.id===mi});Nt(Sr<0?0:Sr),Kt(!0),oi({x:ei,y:er}),On(!0)},[So,Ge]);Pe.useEffect(function(){Sn?cn||Nt(0):On(!1)},[Sn]);var zn=function(En,ei){Nt(En),$e==null||$e(En,ei)},Mn=function(){Kt(!1),oi(null)},wi=Pe.useMemo(function(){return{register:$t,onPreview:Wn}},[$t,Wn]);return Pe.createElement(Xe.Provider,{value:wi},un,Pe.createElement(lt,(0,Le.Z)({"aria-hidden":!Sn,movable:Cr,visible:Sn,prefixCls:yn,closeIcon:cr,onClose:Mn,mousePosition:Gn,imgCommonProps:Lt,src:Fn,fallback:bi,icons:mn,minScale:gr,maxScale:Ni,getContainer:Fi,current:Et,count:So.length,countRender:Ti,onTransform:Li,toolbarRender:ti,imageRender:Oi,onChange:zn},pr)))},Re=Ve,ze=0;function it(en,Gt){var gn=Pe.useState(function(){return ze+=1,String(ze)}),bn=(0,Me.Z)(gn,1),yn=bn[0],un=Pe.useContext(Xe),Jn={data:Gt,canPreview:en};return Pe.useEffect(function(){if(un)return un.register(yn,Jn)},[]),Pe.useEffect(function(){un&&un.register(yn,Jn)},[en,Gt]),yn}var Ke=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],We=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],vt=function(Gt){var gn=Gt.src,bn=Gt.alt,yn=Gt.onPreviewClose,un=Gt.prefixCls,Jn=un===void 0?"rc-image":un,mn=Gt.previewPrefixCls,Yn=mn===void 0?"".concat(Jn,"-preview"):mn,ri=Gt.placeholder,bi=Gt.fallback,jn=Gt.width,ki=Gt.height,Hi=Gt.style,Fi=Gt.preview,rr=Fi===void 0?!0:Fi,Cr=Gt.className,gr=Gt.onClick,Ni=Gt.onError,Ti=Gt.wrapperClassName,cr=Gt.wrapperStyle,$e=Gt.rootClassName,Li=(0,xe.Z)(Gt,Ke),ti=ri&&ri!==!0,Oi=(0,Ce.Z)(rr)==="object"?rr:{},pr=Oi.src,dr=Oi.visible,Qi=dr===void 0?void 0:dr,So=Oi.onVisibleChange,$t=So===void 0?yn:So,Ge=Oi.getContainer,Je=Ge===void 0?void 0:Ge,ot=Oi.mask,Et=Oi.maskClassName,Nt=Oi.movable,pn=Oi.icons,jt=Oi.scaleStep,cn=Oi.minScale,On=Oi.maxScale,pi=Oi.imageRender,Fn=Oi.toolbarRender,Lt=(0,xe.Z)(Oi,We),Ht=pr!=null?pr:gn,Pn=(0,ve.Z)(!!Qi,{value:Qi,onChange:$t}),Sn=(0,Me.Z)(Pn,2),Kt=Sn[0],vn=Sn[1],Hn=Ut({src:gn,isCustomPlaceholder:ti,fallback:bi}),Gn=(0,Me.Z)(Hn,3),oi=Gn[0],Wn=Gn[1],zn=Gn[2],Mn=(0,Pe.useState)(null),wi=(0,Me.Z)(Mn,2),mi=wi[0],En=wi[1],ei=(0,Pe.useContext)(Xe),er=!!rr,Sr=function(){vn(!1),En(null)},Tr=ye()(Jn,Ti,$e,(0,je.Z)({},"".concat(Jn,"-error"),zn==="error")),nn=(0,Pe.useMemo)(function(){var or={};return Be.forEach(function(Vi){Gt[Vi]!==void 0&&(or[Vi]=Gt[Vi])}),or},Be.map(function(or){return Gt[or]})),Mi=(0,Pe.useMemo)(function(){return(0,Se.Z)((0,Se.Z)({},nn),{},{src:Ht})},[Ht,nn]),tr=it(er,Mi),vi=function(Vi){var yr=me(Vi.target),fr=yr.left,_r=yr.top;ei?ei.onPreview(tr,Ht,fr,_r):(En({x:fr,y:_r}),vn(!0)),gr==null||gr(Vi)};return Pe.createElement(Pe.Fragment,null,Pe.createElement("div",(0,Le.Z)({},Li,{className:Tr,onClick:er?vi:gr,style:(0,Se.Z)({width:jn,height:ki},cr)}),Pe.createElement("img",(0,Le.Z)({},nn,{className:ye()("".concat(Jn,"-img"),(0,je.Z)({},"".concat(Jn,"-img-placeholder"),ri===!0),Cr),style:(0,Se.Z)({height:ki},Hi),ref:oi},Wn,{width:jn,height:ki,onError:Ni})),zn==="loading"&&Pe.createElement("div",{"aria-hidden":"true",className:"".concat(Jn,"-placeholder")},ri),ot&&er&&Pe.createElement("div",{className:ye()("".concat(Jn,"-mask"),Et),style:{display:(Hi==null?void 0:Hi.display)==="none"?"none":void 0}},ot)),!ei&&er&&Pe.createElement(lt,(0,Le.Z)({"aria-hidden":!Kt,visible:Kt,prefixCls:Yn,onClose:Sr,mousePosition:mi,src:Ht,alt:bn,imageInfo:{width:jn,height:ki},fallback:bi,getContainer:Je,icons:pn,movable:Nt,scaleStep:jt,minScale:cn,maxScale:On,rootClassName:$e,imageRender:pi,imgCommonProps:nn,toolbarRender:Fn},Lt)))};vt.PreviewGroup=Re;var kt=vt,hn=kt},23425:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return Ae}});var Le=Ie(52873),Se=Ie(67711),je=Ie(26420),Me=Ie(98506),Ce=Ie(16886),xe=Ie(92310),be=Ie.n(xe),ye=Ie(18929),we=Ie(10228),pe=Ie(26112),de=Ie(48736),ge=Ie(59301),fe=Ie(17119),ue=[10,20,50,100],ee=function(Oe){var Ze=Oe.pageSizeOptions,qe=Ze===void 0?ue:Ze,Xe=Oe.locale,mt=Oe.changeSize,pt=Oe.pageSize,Mt=Oe.goButton,at=Oe.quickGo,_t=Oe.rootPrefixCls,dt=Oe.disabled,Rt=Oe.buildOptionText,ut=Oe.showSizeChanger,rt=Oe.sizeChangerRender,ct=ge.useState(""),yt=(0,Ce.Z)(ct,2),wt=yt[0],xt=yt[1],Ut=function(){return!wt||Number.isNaN(wt)?void 0:Number(wt)},zt=typeof Rt=="function"?Rt:function(Be){return"".concat(Be," ").concat(Xe.items_per_page)},dn=function(tt){xt(tt.target.value)},Ft=function(tt){Mt||wt===""||(xt(""),!(tt.relatedTarget&&(tt.relatedTarget.className.indexOf("".concat(_t,"-item-link"))>=0||tt.relatedTarget.className.indexOf("".concat(_t,"-item"))>=0))&&(at==null||at(Ut())))},Dt=function(tt){wt!==""&&(tt.keyCode===we.Z.ENTER||tt.type==="click")&&(xt(""),at==null||at(Ut()))},Qt=function(){return qe.some(function(tt){return tt.toString()===pt.toString()})?qe:qe.concat([pt]).sort(function(tt,ht){var et=Number.isNaN(Number(tt))?0:Number(tt),Ve=Number.isNaN(Number(ht))?0:Number(ht);return et-Ve})},Yt="".concat(_t,"-options");if(!ut&&!at)return null;var Jt=null,lt=null,Ue=null;return ut&&rt&&(Jt=rt({disabled:dt,size:pt,onSizeChange:function(tt){mt==null||mt(Number(tt))},"aria-label":Xe.page_size,className:"".concat(Yt,"-size-changer"),options:Qt().map(function(Be){return{label:zt(Be),value:Be}})})),at&&(Mt&&(Ue=typeof Mt=="boolean"?ge.createElement("button",{type:"button",onClick:Dt,onKeyUp:Dt,disabled:dt,className:"".concat(Yt,"-quick-jumper-button")},Xe.jump_to_confirm):ge.createElement("span",{onClick:Dt,onKeyUp:Dt},Mt)),lt=ge.createElement("div",{className:"".concat(Yt,"-quick-jumper")},Xe.jump_to,ge.createElement("input",{disabled:dt,type:"text",value:wt,onChange:dn,onKeyUp:Dt,onBlur:Ft,"aria-label":Xe.page}),Xe.page,Ue)),ge.createElement("li",{className:Yt},Jt,lt)},z=ee,oe=function(Oe){var Ze=Oe.rootPrefixCls,qe=Oe.page,Xe=Oe.active,mt=Oe.className,pt=Oe.showTitle,Mt=Oe.onClick,at=Oe.onKeyPress,_t=Oe.itemRender,dt="".concat(Ze,"-item"),Rt=be()(dt,"".concat(dt,"-").concat(qe),(0,Le.Z)((0,Le.Z)({},"".concat(dt,"-active"),Xe),"".concat(dt,"-disabled"),!qe),mt),ut=function(){Mt(qe)},rt=function(wt){at(wt,Mt,qe)},ct=_t(qe,"page",ge.createElement("a",{rel:"nofollow"},qe));return ct?ge.createElement("li",{title:pt?String(qe):null,className:Rt,onClick:ut,onKeyDown:rt,tabIndex:0},ct):null},re=oe,ae=function(Oe,Ze,qe){return qe};function le(){}function me(De){var Oe=Number(De);return typeof Oe=="number"&&!Number.isNaN(Oe)&&isFinite(Oe)&&Math.floor(Oe)===Oe}function ve(De,Oe,Ze){var qe=typeof De=="undefined"?Oe:De;return Math.floor((Ze-1)/qe)+1}var Pe=function(Oe){var Ze=Oe.prefixCls,qe=Ze===void 0?"rc-pagination":Ze,Xe=Oe.selectPrefixCls,mt=Xe===void 0?"rc-select":Xe,pt=Oe.className,Mt=Oe.current,at=Oe.defaultCurrent,_t=at===void 0?1:at,dt=Oe.total,Rt=dt===void 0?0:dt,ut=Oe.pageSize,rt=Oe.defaultPageSize,ct=rt===void 0?10:rt,yt=Oe.onChange,wt=yt===void 0?le:yt,xt=Oe.hideOnSinglePage,Ut=Oe.align,zt=Oe.showPrevNextJumpers,dn=zt===void 0?!0:zt,Ft=Oe.showQuickJumper,Dt=Oe.showLessItems,Qt=Oe.showTitle,Yt=Qt===void 0?!0:Qt,Jt=Oe.onShowSizeChange,lt=Jt===void 0?le:Jt,Ue=Oe.locale,Be=Ue===void 0?fe.Z:Ue,tt=Oe.style,ht=Oe.totalBoundaryShowSizeChanger,et=ht===void 0?50:ht,Ve=Oe.disabled,Re=Oe.simple,ze=Oe.showTotal,it=Oe.showSizeChanger,Ke=it===void 0?Rt>et:it,We=Oe.sizeChangerRender,vt=Oe.pageSizeOptions,kt=Oe.itemRender,hn=kt===void 0?ae:kt,en=Oe.jumpPrevIcon,Gt=Oe.jumpNextIcon,gn=Oe.prevIcon,bn=Oe.nextIcon,yn=ge.useRef(null),un=(0,ye.Z)(10,{value:ut,defaultValue:ct}),Jn=(0,Ce.Z)(un,2),mn=Jn[0],Yn=Jn[1],ri=(0,ye.Z)(1,{value:Mt,defaultValue:_t,postState:function(Lr){return Math.max(1,Math.min(Lr,ve(void 0,mn,Rt)))}}),bi=(0,Ce.Z)(ri,2),jn=bi[0],ki=bi[1],Hi=ge.useState(jn),Fi=(0,Ce.Z)(Hi,2),rr=Fi[0],Cr=Fi[1];(0,ge.useEffect)(function(){Cr(jn)},[jn]);var gr=wt!==le,Ni="current"in Oe,Ti=Math.max(1,jn-(Dt?3:5)),cr=Math.min(ve(void 0,mn,Rt),jn+(Dt?3:5));function $e(Di,Lr){var sr=Di||ge.createElement("button",{type:"button","aria-label":Lr,className:"".concat(qe,"-item-link")});return typeof Di=="function"&&(sr=ge.createElement(Di,(0,Me.Z)({},Oe))),sr}function Li(Di){var Lr=Di.target.value,sr=ve(void 0,mn,Rt),so;return Lr===""?so=Lr:Number.isNaN(Number(Lr))?so=rr:Lr>=sr?so=sr:so=Number(Lr),so}function ti(Di){return me(Di)&&Di!==jn&&me(Rt)&&Rt>0}var Oi=Rt>mn?Ft:!1;function pr(Di){(Di.keyCode===we.Z.UP||Di.keyCode===we.Z.DOWN)&&Di.preventDefault()}function dr(Di){var Lr=Li(Di);switch(Lr!==rr&&Cr(Lr),Di.keyCode){case we.Z.ENTER:$t(Lr);break;case we.Z.UP:$t(Lr-1);break;case we.Z.DOWN:$t(Lr+1);break;default:break}}function Qi(Di){$t(Li(Di))}function So(Di){var Lr=ve(Di,mn,Rt),sr=jn>Lr&&Lr!==0?Lr:jn;Yn(Di),Cr(sr),lt==null||lt(jn,Di),ki(sr),wt==null||wt(sr,Di)}function $t(Di){if(ti(Di)&&!Ve){var Lr=ve(void 0,mn,Rt),sr=Di;return Di>Lr?sr=Lr:Di<1&&(sr=1),sr!==rr&&Cr(sr),ki(sr),wt==null||wt(sr,mn),sr}return jn}var Ge=jn>1,Je=jn<ve(void 0,mn,Rt);function ot(){Ge&&$t(jn-1)}function Et(){Je&&$t(jn+1)}function Nt(){$t(Ti)}function pn(){$t(cr)}function jt(Di,Lr){if(Di.key==="Enter"||Di.charCode===we.Z.ENTER||Di.keyCode===we.Z.ENTER){for(var sr=arguments.length,so=new Array(sr>2?sr-2:0),Er=2;Er<sr;Er++)so[Er-2]=arguments[Er];Lr.apply(void 0,so)}}function cn(Di){jt(Di,ot)}function On(Di){jt(Di,Et)}function pi(Di){jt(Di,Nt)}function Fn(Di){jt(Di,pn)}function Lt(Di){var Lr=hn(Di,"prev",$e(gn,"prev page"));return ge.isValidElement(Lr)?ge.cloneElement(Lr,{disabled:!Ge}):Lr}function Ht(Di){var Lr=hn(Di,"next",$e(bn,"next page"));return ge.isValidElement(Lr)?ge.cloneElement(Lr,{disabled:!Je}):Lr}function Pn(Di){(Di.type==="click"||Di.keyCode===we.Z.ENTER)&&$t(rr)}var Sn=null,Kt=(0,pe.Z)(Oe,{aria:!0,data:!0}),vn=ze&&ge.createElement("li",{className:"".concat(qe,"-total-text")},ze(Rt,[Rt===0?0:(jn-1)*mn+1,jn*mn>Rt?Rt:jn*mn])),Hn=null,Gn=ve(void 0,mn,Rt);if(xt&&Rt<=mn)return null;var oi=[],Wn={rootPrefixCls:qe,onClick:$t,onKeyPress:jt,showTitle:Yt,itemRender:hn,page:-1},zn=jn-1>0?jn-1:0,Mn=jn+1<Gn?jn+1:Gn,wi=Ft&&Ft.goButton,mi=(0,je.Z)(Re)==="object"?Re.readOnly:!Re,En=wi,ei=null;Re&&(wi&&(typeof wi=="boolean"?En=ge.createElement("button",{type:"button",onClick:Pn,onKeyUp:Pn},Be.jump_to_confirm):En=ge.createElement("span",{onClick:Pn,onKeyUp:Pn},wi),En=ge.createElement("li",{title:Yt?"".concat(Be.jump_to).concat(jn,"/").concat(Gn):null,className:"".concat(qe,"-simple-pager")},En)),ei=ge.createElement("li",{title:Yt?"".concat(jn,"/").concat(Gn):null,className:"".concat(qe,"-simple-pager")},mi?rr:ge.createElement("input",{type:"text","aria-label":Be.jump_to,value:rr,disabled:Ve,onKeyDown:pr,onKeyUp:dr,onChange:dr,onBlur:Qi,size:3}),ge.createElement("span",{className:"".concat(qe,"-slash")},"/"),Gn));var er=Dt?1:2;if(Gn<=3+er*2){Gn||oi.push(ge.createElement(re,(0,Se.Z)({},Wn,{key:"noPager",page:1,className:"".concat(qe,"-item-disabled")})));for(var Sr=1;Sr<=Gn;Sr+=1)oi.push(ge.createElement(re,(0,Se.Z)({},Wn,{key:Sr,page:Sr,active:jn===Sr})))}else{var Tr=Dt?Be.prev_3:Be.prev_5,nn=Dt?Be.next_3:Be.next_5,Mi=hn(Ti,"jump-prev",$e(en,"prev page")),tr=hn(cr,"jump-next",$e(Gt,"next page"));dn&&(Sn=Mi?ge.createElement("li",{title:Yt?Tr:null,key:"prev",onClick:Nt,tabIndex:0,onKeyDown:pi,className:be()("".concat(qe,"-jump-prev"),(0,Le.Z)({},"".concat(qe,"-jump-prev-custom-icon"),!!en))},Mi):null,Hn=tr?ge.createElement("li",{title:Yt?nn:null,key:"next",onClick:pn,tabIndex:0,onKeyDown:Fn,className:be()("".concat(qe,"-jump-next"),(0,Le.Z)({},"".concat(qe,"-jump-next-custom-icon"),!!Gt))},tr):null);var vi=Math.max(1,jn-er),or=Math.min(jn+er,Gn);jn-1<=er&&(or=1+er*2),Gn-jn<=er&&(vi=Gn-er*2);for(var Vi=vi;Vi<=or;Vi+=1)oi.push(ge.createElement(re,(0,Se.Z)({},Wn,{key:Vi,page:Vi,active:jn===Vi})));if(jn-1>=er*2&&jn!==3&&(oi[0]=ge.cloneElement(oi[0],{className:be()("".concat(qe,"-item-after-jump-prev"),oi[0].props.className)}),oi.unshift(Sn)),Gn-jn>=er*2&&jn!==Gn-2){var yr=oi[oi.length-1];oi[oi.length-1]=ge.cloneElement(yr,{className:be()("".concat(qe,"-item-before-jump-next"),yr.props.className)}),oi.push(Hn)}vi!==1&&oi.unshift(ge.createElement(re,(0,Se.Z)({},Wn,{key:1,page:1}))),or!==Gn&&oi.push(ge.createElement(re,(0,Se.Z)({},Wn,{key:Gn,page:Gn})))}var fr=Lt(zn);if(fr){var _r=!Ge||!Gn;fr=ge.createElement("li",{title:Yt?Be.prev_page:null,onClick:ot,tabIndex:_r?null:0,onKeyDown:cn,className:be()("".concat(qe,"-prev"),(0,Le.Z)({},"".concat(qe,"-disabled"),_r)),"aria-disabled":_r},fr)}var Yr=Ht(Mn);if(Yr){var Ln,oo;Re?(Ln=!Je,oo=Ge?0:null):(Ln=!Je||!Gn,oo=Ln?null:0),Yr=ge.createElement("li",{title:Yt?Be.next_page:null,onClick:Et,tabIndex:oo,onKeyDown:On,className:be()("".concat(qe,"-next"),(0,Le.Z)({},"".concat(qe,"-disabled"),Ln)),"aria-disabled":Ln},Yr)}var kn=be()(qe,pt,(0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)({},"".concat(qe,"-start"),Ut==="start"),"".concat(qe,"-center"),Ut==="center"),"".concat(qe,"-end"),Ut==="end"),"".concat(qe,"-simple"),Re),"".concat(qe,"-disabled"),Ve));return ge.createElement("ul",(0,Se.Z)({className:kn,style:tt,ref:yn},Kt),vn,fr,Re?ei:oi,Yr,ge.createElement(z,{locale:Be,rootPrefixCls:qe,disabled:Ve,selectPrefixCls:mt,changeSize:So,pageSize:mn,pageSizeOptions:vt,quickGo:Oi?$t:null,goButton:En,showSizeChanger:Ke,sizeChangerRender:We}))},Ae=Pe},6551:function(xn,ln,Ie){"use strict";Ie.d(ln,{ZP:function(){return be}});var Le=Ie(16886),Se=Ie(59301),je=Ie(47273),Me=0,Ce=(0,je.Z)();function xe(){var ye;return Ce?(ye=Me,Me+=1):ye="TEST_OR_SSR",ye}function be(ye){var we=Se.useState(),pe=(0,Le.Z)(we,2),de=pe[0],ge=pe[1];return Se.useEffect(function(){ge("rc_select_".concat(xe()))},[]),ye||de}},37463:function(xn,ln,Ie){"use strict";Ie.d(ln,{Ac:function(){return un},Xo:function(){return mn},Wx:function(){return ri},ZP:function(){return Fn},lk:function(){return le}});var Le=Ie(67711),Se=Ie(15142),je=Ie(52873),Me=Ie(98506),Ce=Ie(16886),xe=Ie(33346),be=Ie(26420),ye=Ie(18929),we=Ie(48736),pe=Ie(59301),de=Ie(92310),ge=Ie.n(de),fe=Ie(34280),ue=Ie(49658),ee=Ie(8654),z=function(Ht){var Pn=Ht.className,Sn=Ht.customizeIcon,Kt=Ht.customizeIconProps,vn=Ht.children,Hn=Ht.onMouseDown,Gn=Ht.onClick,oi=typeof Sn=="function"?Sn(Kt):Sn;return pe.createElement("span",{className:Pn,onMouseDown:function(zn){zn.preventDefault(),Hn==null||Hn(zn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Gn,"aria-hidden":!0},oi!==void 0?oi:pe.createElement("span",{className:ge()(Pn.split(/\s+/).map(function(Wn){return"".concat(Wn,"-icon")}))},vn))},oe=z,re=function(Ht,Pn,Sn,Kt,vn){var Hn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Gn=arguments.length>6?arguments[6]:void 0,oi=arguments.length>7?arguments[7]:void 0,Wn=pe.useMemo(function(){if((0,be.Z)(Kt)==="object")return Kt.clearIcon;if(vn)return vn},[Kt,vn]),zn=pe.useMemo(function(){return!!(!Hn&&Kt&&(Sn.length||Gn)&&!(oi==="combobox"&&Gn===""))},[Kt,Hn,Sn.length,Gn,oi]);return{allowClear:zn,clearIcon:pe.createElement(oe,{className:"".concat(Ht,"-clear"),onMouseDown:Pn,customizeIcon:Wn},"\xD7")}},ae=pe.createContext(null);function le(){return pe.useContext(ae)}function me(){var Lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ht=pe.useState(!1),Pn=(0,Ce.Z)(Ht,2),Sn=Pn[0],Kt=Pn[1],vn=pe.useRef(null),Hn=function(){window.clearTimeout(vn.current)};pe.useEffect(function(){return Hn},[]);var Gn=function(Wn,zn){Hn(),vn.current=window.setTimeout(function(){Kt(Wn),zn&&zn()},Lt)};return[Sn,Gn,Hn]}function ve(){var Lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ht=pe.useRef(null),Pn=pe.useRef(null);pe.useEffect(function(){return function(){window.clearTimeout(Pn.current)}},[]);function Sn(Kt){(Kt||Ht.current===null)&&(Ht.current=Kt),window.clearTimeout(Pn.current),Pn.current=window.setTimeout(function(){Ht.current=null},Lt)}return[function(){return Ht.current},Sn]}function Pe(Lt,Ht,Pn,Sn){var Kt=pe.useRef(null);Kt.current={open:Ht,triggerOpen:Pn,customizedTrigger:Sn},pe.useEffect(function(){function vn(Hn){var Gn;if(!((Gn=Kt.current)!==null&&Gn!==void 0&&Gn.customizedTrigger)){var oi=Hn.target;oi.shadowRoot&&Hn.composed&&(oi=Hn.composedPath()[0]||oi),Kt.current.open&&Lt().filter(function(Wn){return Wn}).every(function(Wn){return!Wn.contains(oi)&&Wn!==oi})&&Kt.current.triggerOpen(!1)}}return window.addEventListener("mousedown",vn),function(){return window.removeEventListener("mousedown",vn)}},[])}var Ae=Ie(10228);function De(Lt){return Lt&&![Ae.Z.ESC,Ae.Z.SHIFT,Ae.Z.BACKSPACE,Ae.Z.TAB,Ae.Z.WIN_KEY,Ae.Z.ALT,Ae.Z.META,Ae.Z.WIN_KEY_RIGHT,Ae.Z.CTRL,Ae.Z.SEMICOLON,Ae.Z.EQUALS,Ae.Z.CAPS_LOCK,Ae.Z.CONTEXT_MENU,Ae.Z.F1,Ae.Z.F2,Ae.Z.F3,Ae.Z.F4,Ae.Z.F5,Ae.Z.F6,Ae.Z.F7,Ae.Z.F8,Ae.Z.F9,Ae.Z.F10,Ae.Z.F11,Ae.Z.F12].includes(Lt)}var Oe=Ie(26112),Ze=Ie(11780);function qe(Lt,Ht,Pn){var Sn=(0,Me.Z)((0,Me.Z)({},Lt),Pn?Ht:{});return Object.keys(Ht).forEach(function(Kt){var vn=Ht[Kt];typeof vn=="function"&&(Sn[Kt]=function(){for(var Hn,Gn=arguments.length,oi=new Array(Gn),Wn=0;Wn<Gn;Wn++)oi[Wn]=arguments[Wn];return vn.apply(void 0,oi),(Hn=Lt[Kt])===null||Hn===void 0?void 0:Hn.call.apply(Hn,[Lt].concat(oi))})}),Sn}var Xe=qe,mt=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],pt=function(Ht,Pn){var Sn=Ht.prefixCls,Kt=Ht.id,vn=Ht.inputElement,Hn=Ht.autoFocus,Gn=Ht.autoComplete,oi=Ht.editable,Wn=Ht.activeDescendantId,zn=Ht.value,Mn=Ht.open,wi=Ht.attrs,mi=(0,xe.Z)(Ht,mt),En=vn||pe.createElement("input",null),ei=En,er=ei.ref,Sr=ei.props;return(0,we.Kp)(!("maxLength"in En.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),En=pe.cloneElement(En,(0,Me.Z)((0,Me.Z)((0,Me.Z)({type:"search"},Xe(mi,Sr,!0)),{},{id:Kt,ref:(0,ee.sQ)(Pn,er),autoComplete:Gn||"off",autoFocus:Hn,className:ge()("".concat(Sn,"-selection-search-input"),Sr==null?void 0:Sr.className),role:"combobox","aria-expanded":Mn||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Kt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Kt,"_list"),"aria-activedescendant":Mn?Wn:void 0},wi),{},{value:oi?zn:"",readOnly:!oi,unselectable:oi?null:"on",style:(0,Me.Z)((0,Me.Z)({},Sr.style),{},{opacity:oi?null:0})})),En},Mt=pe.forwardRef(pt),at=Mt;function _t(Lt){return Array.isArray(Lt)?Lt:Lt!==void 0?[Lt]:[]}var dt=typeof window!="undefined"&&window.document&&window.document.documentElement,Rt=dt;function ut(Lt){return Lt!=null}function rt(Lt){return!Lt&&Lt!==0}function ct(Lt){return["string","number"].includes((0,be.Z)(Lt))}function yt(Lt){var Ht=void 0;return Lt&&(ct(Lt.title)?Ht=Lt.title.toString():ct(Lt.label)&&(Ht=Lt.label.toString())),Ht}function wt(Lt,Ht){Rt?pe.useLayoutEffect(Lt,Ht):pe.useEffect(Lt,Ht)}function xt(Lt){var Ht;return(Ht=Lt.key)!==null&&Ht!==void 0?Ht:Lt.value}var Ut=function(Ht){Ht.preventDefault(),Ht.stopPropagation()},zt=function(Ht){var Pn=Ht.id,Sn=Ht.prefixCls,Kt=Ht.values,vn=Ht.open,Hn=Ht.searchValue,Gn=Ht.autoClearSearchValue,oi=Ht.inputRef,Wn=Ht.placeholder,zn=Ht.disabled,Mn=Ht.mode,wi=Ht.showSearch,mi=Ht.autoFocus,En=Ht.autoComplete,ei=Ht.activeDescendantId,er=Ht.tabIndex,Sr=Ht.removeIcon,Tr=Ht.maxTagCount,nn=Ht.maxTagTextLength,Mi=Ht.maxTagPlaceholder,tr=Mi===void 0?function($n){return"+ ".concat($n.length," ...")}:Mi,vi=Ht.tagRender,or=Ht.onToggleOpen,Vi=Ht.onRemove,yr=Ht.onInputChange,fr=Ht.onInputPaste,_r=Ht.onInputKeyDown,Yr=Ht.onInputMouseDown,Ln=Ht.onInputCompositionStart,oo=Ht.onInputCompositionEnd,kn=Ht.onInputBlur,Di=pe.useRef(null),Lr=(0,pe.useState)(0),sr=(0,Ce.Z)(Lr,2),so=sr[0],Er=sr[1],mr=(0,pe.useState)(!1),_o=(0,Ce.Z)(mr,2),an=_o[0],Nn=_o[1],on="".concat(Sn,"-selection"),ft=vn||Mn==="multiple"&&Gn===!1||Mn==="tags"?Hn:"",Zn=Mn==="tags"||Mn==="multiple"&&Gn===!1||wi&&(vn||an);wt(function(){Er(Di.current.scrollWidth)},[ft]);var si=function(Un,Qn,Vn,ni,ci){return pe.createElement("span",{title:yt(Un),className:ge()("".concat(on,"-item"),(0,je.Z)({},"".concat(on,"-item-disabled"),Vn))},pe.createElement("span",{className:"".concat(on,"-item-content")},Qn),ni&&pe.createElement(oe,{className:"".concat(on,"-item-remove"),onMouseDown:Ut,onClick:ci,customizeIcon:Sr},"\xD7"))},Ei=function(Un,Qn,Vn,ni,ci,wn){var zi=function(Mr){Ut(Mr),or(!vn)};return pe.createElement("span",{onMouseDown:zi},vi({label:Qn,value:Un,disabled:Vn,closable:ni,onClose:ci,isMaxTag:!!wn}))},yi=function(Un){var Qn=Un.disabled,Vn=Un.label,ni=Un.value,ci=!zn&&!Qn,wn=Vn;if(typeof nn=="number"&&(typeof Vn=="string"||typeof Vn=="number")){var zi=String(wn);zi.length>nn&&(wn="".concat(zi.slice(0,nn),"..."))}var Gi=function(Ji){Ji&&Ji.stopPropagation(),Vi(Un)};return typeof vi=="function"?Ei(ni,wn,Qn,ci,Gi):si(Un,wn,Qn,ci,Gi)},di=function(Un){if(!Kt.length)return null;var Qn=typeof tr=="function"?tr(Un):tr;return typeof vi=="function"?Ei(void 0,Qn,!1,!1,void 0,!0):si({title:Qn},Qn,!1)},An=pe.createElement("div",{className:"".concat(on,"-search"),style:{width:so},onFocus:function(){Nn(!0)},onBlur:function(){Nn(!1)}},pe.createElement(at,{ref:oi,open:vn,prefixCls:Sn,id:Pn,inputElement:null,disabled:zn,autoFocus:mi,autoComplete:En,editable:Zn,activeDescendantId:ei,value:ft,onKeyDown:_r,onMouseDown:Yr,onChange:yr,onPaste:fr,onCompositionStart:Ln,onCompositionEnd:oo,onBlur:kn,tabIndex:er,attrs:(0,Oe.Z)(Ht,!0)}),pe.createElement("span",{ref:Di,className:"".concat(on,"-search-mirror"),"aria-hidden":!0},ft,"\xA0")),Xn=pe.createElement(Ze.Z,{prefixCls:"".concat(on,"-overflow"),data:Kt,renderItem:yi,renderRest:di,suffix:An,itemKey:xt,maxCount:Tr});return pe.createElement("span",{className:"".concat(on,"-wrap")},Xn,!Kt.length&&!ft&&pe.createElement("span",{className:"".concat(on,"-placeholder")},Wn))},dn=zt,Ft=function(Ht){var Pn=Ht.inputElement,Sn=Ht.prefixCls,Kt=Ht.id,vn=Ht.inputRef,Hn=Ht.disabled,Gn=Ht.autoFocus,oi=Ht.autoComplete,Wn=Ht.activeDescendantId,zn=Ht.mode,Mn=Ht.open,wi=Ht.values,mi=Ht.placeholder,En=Ht.tabIndex,ei=Ht.showSearch,er=Ht.searchValue,Sr=Ht.activeValue,Tr=Ht.maxLength,nn=Ht.onInputKeyDown,Mi=Ht.onInputMouseDown,tr=Ht.onInputChange,vi=Ht.onInputPaste,or=Ht.onInputCompositionStart,Vi=Ht.onInputCompositionEnd,yr=Ht.onInputBlur,fr=Ht.title,_r=pe.useState(!1),Yr=(0,Ce.Z)(_r,2),Ln=Yr[0],oo=Yr[1],kn=zn==="combobox",Di=kn||ei,Lr=wi[0],sr=er||"";kn&&Sr&&!Ln&&(sr=Sr),pe.useEffect(function(){kn&&oo(!1)},[kn,Sr]);var so=zn!=="combobox"&&!Mn&&!ei?!1:!!sr,Er=fr===void 0?yt(Lr):fr,mr=pe.useMemo(function(){return Lr?null:pe.createElement("span",{className:"".concat(Sn,"-selection-placeholder"),style:so?{visibility:"hidden"}:void 0},mi)},[Lr,so,mi,Sn]);return pe.createElement("span",{className:"".concat(Sn,"-selection-wrap")},pe.createElement("span",{className:"".concat(Sn,"-selection-search")},pe.createElement(at,{ref:vn,prefixCls:Sn,id:Kt,open:Mn,inputElement:Pn,disabled:Hn,autoFocus:Gn,autoComplete:oi,editable:Di,activeDescendantId:Wn,value:sr,onKeyDown:nn,onMouseDown:Mi,onChange:function(an){oo(!0),tr(an)},onPaste:vi,onCompositionStart:or,onCompositionEnd:Vi,onBlur:yr,tabIndex:En,attrs:(0,Oe.Z)(Ht,!0),maxLength:kn?Tr:void 0})),!kn&&Lr?pe.createElement("span",{className:"".concat(Sn,"-selection-item"),title:Er,style:so?{visibility:"hidden"}:void 0},Lr.label):null,mr)},Dt=Ft,Qt=function(Ht,Pn){var Sn=(0,pe.useRef)(null),Kt=(0,pe.useRef)(!1),vn=Ht.prefixCls,Hn=Ht.open,Gn=Ht.mode,oi=Ht.showSearch,Wn=Ht.tokenWithEnter,zn=Ht.disabled,Mn=Ht.prefix,wi=Ht.autoClearSearchValue,mi=Ht.onSearch,En=Ht.onSearchSubmit,ei=Ht.onToggleOpen,er=Ht.onInputKeyDown,Sr=Ht.onInputBlur,Tr=Ht.domRef;pe.useImperativeHandle(Pn,function(){return{focus:function(Er){Sn.current.focus(Er)},blur:function(){Sn.current.blur()}}});var nn=ve(0),Mi=(0,Ce.Z)(nn,2),tr=Mi[0],vi=Mi[1],or=function(Er){var mr=Er.which,_o=Sn.current instanceof HTMLTextAreaElement;!_o&&Hn&&(mr===Ae.Z.UP||mr===Ae.Z.DOWN)&&Er.preventDefault(),er&&er(Er),mr===Ae.Z.ENTER&&Gn==="tags"&&!Kt.current&&!Hn&&(En==null||En(Er.target.value)),!(_o&&!Hn&&~[Ae.Z.UP,Ae.Z.DOWN,Ae.Z.LEFT,Ae.Z.RIGHT].indexOf(mr))&&De(mr)&&ei(!0)},Vi=function(){vi(!0)},yr=(0,pe.useRef)(null),fr=function(Er){mi(Er,!0,Kt.current)!==!1&&ei(!0)},_r=function(){Kt.current=!0},Yr=function(Er){Kt.current=!1,Gn!=="combobox"&&fr(Er.target.value)},Ln=function(Er){var mr=Er.target.value;if(Wn&&yr.current&&/[\r\n]/.test(yr.current)){var _o=yr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");mr=mr.replace(_o,yr.current)}yr.current=null,fr(mr)},oo=function(Er){var mr=Er.clipboardData,_o=mr==null?void 0:mr.getData("text");yr.current=_o||""},kn=function(Er){var mr=Er.target;if(mr!==Sn.current){var _o=document.body.style.msTouchAction!==void 0;_o?setTimeout(function(){Sn.current.focus()}):Sn.current.focus()}},Di=function(Er){var mr=tr();Er.target!==Sn.current&&!mr&&!(Gn==="combobox"&&zn)&&Er.preventDefault(),(Gn!=="combobox"&&(!oi||!mr)||!Hn)&&(Hn&&wi!==!1&&mi("",!0,!1),ei())},Lr={inputRef:Sn,onInputKeyDown:or,onInputMouseDown:Vi,onInputChange:Ln,onInputPaste:oo,onInputCompositionStart:_r,onInputCompositionEnd:Yr,onInputBlur:Sr},sr=Gn==="multiple"||Gn==="tags"?pe.createElement(dn,(0,Le.Z)({},Ht,Lr)):pe.createElement(Dt,(0,Le.Z)({},Ht,Lr));return pe.createElement("div",{ref:Tr,className:"".concat(vn,"-selector"),onClick:kn,onMouseDown:Di},Mn&&pe.createElement("div",{className:"".concat(vn,"-prefix")},Mn),sr)},Yt=pe.forwardRef(Qt),Jt=Yt,lt=Ie(65030),Ue=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Be=function(Ht){var Pn=Ht===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Pn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Pn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Pn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Pn,adjustY:1},htmlRegion:"scroll"}}},tt=function(Ht,Pn){var Sn=Ht.prefixCls,Kt=Ht.disabled,vn=Ht.visible,Hn=Ht.children,Gn=Ht.popupElement,oi=Ht.animation,Wn=Ht.transitionName,zn=Ht.dropdownStyle,Mn=Ht.dropdownClassName,wi=Ht.direction,mi=wi===void 0?"ltr":wi,En=Ht.placement,ei=Ht.builtinPlacements,er=Ht.dropdownMatchSelectWidth,Sr=Ht.dropdownRender,Tr=Ht.dropdownAlign,nn=Ht.getPopupContainer,Mi=Ht.empty,tr=Ht.getTriggerDOMNode,vi=Ht.onPopupVisibleChange,or=Ht.onPopupMouseEnter,Vi=(0,xe.Z)(Ht,Ue),yr="".concat(Sn,"-dropdown"),fr=Gn;Sr&&(fr=Sr(Gn));var _r=pe.useMemo(function(){return ei||Be(er)},[ei,er]),Yr=oi?"".concat(yr,"-").concat(oi):Wn,Ln=typeof er=="number",oo=pe.useMemo(function(){return Ln?null:er===!1?"minWidth":"width"},[er,Ln]),kn=zn;Ln&&(kn=(0,Me.Z)((0,Me.Z)({},kn),{},{width:er}));var Di=pe.useRef(null);return pe.useImperativeHandle(Pn,function(){return{getPopupElement:function(){var sr;return(sr=Di.current)===null||sr===void 0?void 0:sr.popupElement}}}),pe.createElement(lt.Z,(0,Le.Z)({},Vi,{showAction:vi?["click"]:[],hideAction:vi?["click"]:[],popupPlacement:En||(mi==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:_r,prefixCls:yr,popupTransitionName:Yr,popup:pe.createElement("div",{onMouseEnter:or},fr),ref:Di,stretch:oo,popupAlign:Tr,popupVisible:vn,getPopupContainer:nn,popupClassName:ge()(Mn,(0,je.Z)({},"".concat(yr,"-empty"),Mi)),popupStyle:kn,getTriggerDOMNode:tr,onPopupVisibleChange:vi}),Hn)},ht=pe.forwardRef(tt),et=ht,Ve=Ie(57879);function Re(Lt,Ht){var Pn=Lt.key,Sn;return"value"in Lt&&(Sn=Lt.value),Pn!=null?Pn:Sn!==void 0?Sn:"rc-index-key-".concat(Ht)}function ze(Lt){return typeof Lt!="undefined"&&!Number.isNaN(Lt)}function it(Lt,Ht){var Pn=Lt||{},Sn=Pn.label,Kt=Pn.value,vn=Pn.options,Hn=Pn.groupLabel,Gn=Sn||(Ht?"children":"label");return{label:Gn,value:Kt||"value",options:vn||"options",groupLabel:Hn||Gn}}function Ke(Lt){var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Pn=Ht.fieldNames,Sn=Ht.childrenAsData,Kt=[],vn=it(Pn,!1),Hn=vn.label,Gn=vn.value,oi=vn.options,Wn=vn.groupLabel;function zn(Mn,wi){Array.isArray(Mn)&&Mn.forEach(function(mi){if(wi||!(oi in mi)){var En=mi[Gn];Kt.push({key:Re(mi,Kt.length),groupOption:wi,data:mi,label:mi[Hn],value:En})}else{var ei=mi[Wn];ei===void 0&&Sn&&(ei=mi.label),Kt.push({key:Re(mi,Kt.length),group:!0,data:mi,label:ei}),zn(mi[oi],!0)}})}return zn(Lt,!1),Kt}function We(Lt){var Ht=(0,Me.Z)({},Lt);return"props"in Ht||Object.defineProperty(Ht,"props",{get:function(){return(0,we.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Ht}}),Ht}var vt=function(Ht,Pn,Sn){if(!Pn||!Pn.length)return null;var Kt=!1,vn=function Gn(oi,Wn){var zn=(0,Ve.Z)(Wn),Mn=zn[0],wi=zn.slice(1);if(!Mn)return[oi];var mi=oi.split(Mn);return Kt=Kt||mi.length>1,mi.reduce(function(En,ei){return[].concat((0,Se.Z)(En),(0,Se.Z)(Gn(ei,wi)))},[]).filter(Boolean)},Hn=vn(Ht,Pn);return Kt?typeof Sn!="undefined"?Hn.slice(0,Sn):Hn:null},kt=pe.createContext(null),hn=kt;function en(Lt){var Ht=Lt.visible,Pn=Lt.values;if(!Ht)return null;var Sn=50;return pe.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Pn.slice(0,Sn).map(function(Kt){var vn=Kt.label,Hn=Kt.value;return["number","string"].includes((0,be.Z)(vn))?vn:Hn}).join(", ")),Pn.length>Sn?", ...":null)}var Gt=["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"],gn=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],bn=function(Ht){return Ht==="tags"||Ht==="multiple"},yn=pe.forwardRef(function(Lt,Ht){var Pn,Sn=Lt.id,Kt=Lt.prefixCls,vn=Lt.className,Hn=Lt.showSearch,Gn=Lt.tagRender,oi=Lt.direction,Wn=Lt.omitDomProps,zn=Lt.displayValues,Mn=Lt.onDisplayValuesChange,wi=Lt.emptyOptions,mi=Lt.notFoundContent,En=mi===void 0?"Not Found":mi,ei=Lt.onClear,er=Lt.mode,Sr=Lt.disabled,Tr=Lt.loading,nn=Lt.getInputElement,Mi=Lt.getRawInputElement,tr=Lt.open,vi=Lt.defaultOpen,or=Lt.onDropdownVisibleChange,Vi=Lt.activeValue,yr=Lt.onActiveValueChange,fr=Lt.activeDescendantId,_r=Lt.searchValue,Yr=Lt.autoClearSearchValue,Ln=Lt.onSearch,oo=Lt.onSearchSplit,kn=Lt.tokenSeparators,Di=Lt.allowClear,Lr=Lt.prefix,sr=Lt.suffixIcon,so=Lt.clearIcon,Er=Lt.OptionList,mr=Lt.animation,_o=Lt.transitionName,an=Lt.dropdownStyle,Nn=Lt.dropdownClassName,on=Lt.dropdownMatchSelectWidth,ft=Lt.dropdownRender,Zn=Lt.dropdownAlign,si=Lt.placement,Ei=Lt.builtinPlacements,yi=Lt.getPopupContainer,di=Lt.showAction,An=di===void 0?[]:di,Xn=Lt.onFocus,$n=Lt.onBlur,Un=Lt.onKeyUp,Qn=Lt.onKeyDown,Vn=Lt.onMouseDown,ni=(0,xe.Z)(Lt,Gt),ci=bn(er),wn=(Hn!==void 0?Hn:ci)||er==="combobox",zi=(0,Me.Z)({},ni);gn.forEach(function(zo){delete zi[zo]}),Wn==null||Wn.forEach(function(zo){delete zi[zo]});var Gi=pe.useState(!1),Mr=(0,Ce.Z)(Gi,2),Ji=Mr[0],Zr=Mr[1];pe.useEffect(function(){Zr((0,ue.Z)())},[]);var jr=pe.useRef(null),$r=pe.useRef(null),Vr=pe.useRef(null),co=pe.useRef(null),ko=pe.useRef(null),sn=pe.useRef(!1),Jr=me(),Dr=(0,Ce.Z)(Jr,3),ur=Dr[0],Ui=Dr[1],Hr=Dr[2];pe.useImperativeHandle(Ht,function(){var zo,xo;return{focus:(zo=co.current)===null||zo===void 0?void 0:zo.focus,blur:(xo=co.current)===null||xo===void 0?void 0:xo.blur,scrollTo:function(Ii){var Hs;return(Hs=ko.current)===null||Hs===void 0?void 0:Hs.scrollTo(Ii)},nativeElement:jr.current||$r.current}});var fo=pe.useMemo(function(){var zo;if(er!=="combobox")return _r;var xo=(zo=zn[0])===null||zo===void 0?void 0:zo.value;return typeof xo=="string"||typeof xo=="number"?String(xo):""},[_r,er,zn]),uo=er==="combobox"&&typeof nn=="function"&&nn()||null,br=typeof Mi=="function"&&Mi(),qr=(0,ee.x1)($r,br==null||(Pn=br.props)===null||Pn===void 0?void 0:Pn.ref),Ss=pe.useState(!1),Vs=(0,Ce.Z)(Ss,2),Aa=Vs[0],oa=Vs[1];(0,fe.Z)(function(){oa(!0)},[]);var nr=(0,ye.Z)(!1,{defaultValue:vi,value:tr}),ns=(0,Ce.Z)(nr,2),ss=ns[0],zs=ns[1],us=Aa?ss:!1,Ms=!En&&wi;(Sr||Ms&&us&&er==="combobox")&&(us=!1);var ui=Ms?!1:us,qi=pe.useCallback(function(zo){var xo=zo!==void 0?zo:!us;Sr||(zs(xo),us!==xo&&(or==null||or(xo)))},[Sr,us,zs,or]),xr=pe.useMemo(function(){return(kn||[]).some(function(zo){return[`
|
|
|
`,`\r
|
|
|
`].includes(zo)})},[kn]),Br=pe.useContext(hn)||{},Qr=Br.maxCount,jo=Br.rawValues,$i=function(xo,Us,Ii){if(!(ci&&ze(Qr)&&(jo==null?void 0:jo.size)>=Qr)){var Hs=!0,Vt=xo;yr==null||yr(null);var In=vt(xo,kn,ze(Qr)?Qr-jo.size:void 0),pl=Ii?null:In;return er!=="combobox"&&pl&&(Vt="",oo==null||oo(pl),qi(!1),Hs=!1),Ln&&fo!==Vt&&Ln(Vt,{source:Us?"typing":"effect"}),Hs}},pa=function(xo){!xo||!xo.trim()||Ln(xo,{source:"submit"})};pe.useEffect(function(){!us&&!ci&&er!=="combobox"&&$i("",!1,!1)},[us]),pe.useEffect(function(){ss&&Sr&&zs(!1),Sr&&!sn.current&&Ui(!1)},[Sr]);var fs=ve(),hs=(0,Ce.Z)(fs,2),eo=hs[0],ws=hs[1],ga=pe.useRef(!1),is=function(xo){var Us=eo(),Ii=xo.key,Hs=Ii==="Enter";if(Hs&&(er!=="combobox"&&xo.preventDefault(),us||qi(!0)),ws(!!fo),Ii==="Backspace"&&!Us&&ci&&!fo&&zn.length){for(var Vt=(0,Se.Z)(zn),In=null,pl=Vt.length-1;pl>=0;pl-=1){var Kl=Vt[pl];if(!Kl.disabled){Vt.splice(pl,1),In=Kl;break}}In&&Mn(Vt,{type:"remove",values:[In]})}for(var Ns=arguments.length,sa=new Array(Ns>1?Ns-1:0),rl=1;rl<Ns;rl++)sa[rl-1]=arguments[rl];if(us&&(!Hs||!ga.current)){var bl;Hs&&(ga.current=!0),(bl=ko.current)===null||bl===void 0||bl.onKeyDown.apply(bl,[xo].concat(sa))}Qn==null||Qn.apply(void 0,[xo].concat(sa))},Pa=function(xo){for(var Us=arguments.length,Ii=new Array(Us>1?Us-1:0),Hs=1;Hs<Us;Hs++)Ii[Hs-1]=arguments[Hs];if(us){var Vt;(Vt=ko.current)===null||Vt===void 0||Vt.onKeyUp.apply(Vt,[xo].concat(Ii))}xo.key==="Enter"&&(ga.current=!1),Un==null||Un.apply(void 0,[xo].concat(Ii))},Sa=function(xo){var Us=zn.filter(function(Ii){return Ii!==xo});Mn(Us,{type:"remove",values:[xo]})},Na=function(){ga.current=!1},_s=pe.useRef(!1),nl=function(){Ui(!0),Sr||(Xn&&!_s.current&&Xn.apply(void 0,arguments),An.includes("focus")&&qi(!0)),_s.current=!0},Hu=function(){sn.current=!0,Ui(!1,function(){_s.current=!1,sn.current=!1,qi(!1)}),!Sr&&(fo&&(er==="tags"?Ln(fo,{source:"submit"}):er==="multiple"&&Ln("",{source:"blur"})),$n&&$n.apply(void 0,arguments))},fl=[];pe.useEffect(function(){return function(){fl.forEach(function(zo){return clearTimeout(zo)}),fl.splice(0,fl.length)}},[]);var Ol=function(xo){var Us,Ii=xo.target,Hs=(Us=Vr.current)===null||Us===void 0?void 0:Us.getPopupElement();if(Hs&&Hs.contains(Ii)){var Vt=setTimeout(function(){var Ns=fl.indexOf(Vt);if(Ns!==-1&&fl.splice(Ns,1),Hr(),!Ji&&!Hs.contains(document.activeElement)){var sa;(sa=co.current)===null||sa===void 0||sa.focus()}});fl.push(Vt)}for(var In=arguments.length,pl=new Array(In>1?In-1:0),Kl=1;Kl<In;Kl++)pl[Kl-1]=arguments[Kl];Vn==null||Vn.apply(void 0,[xo].concat(pl))},il=pe.useState({}),Pu=(0,Ce.Z)(il,2),eh=Pu[1];function lu(){eh({})}var As;br&&(As=function(xo){qi(xo)}),Pe(function(){var zo;return[jr.current,(zo=Vr.current)===null||zo===void 0?void 0:zo.getPopupElement()]},ui,qi,!!br);var Gu=pe.useMemo(function(){return(0,Me.Z)((0,Me.Z)({},Lt),{},{notFoundContent:En,open:us,triggerOpen:ui,id:Sn,showSearch:wn,multiple:ci,toggleOpen:qi})},[Lt,En,ui,us,Sn,wn,ci,qi]),th=!!sr||Tr,uu;th&&(uu=pe.createElement(oe,{className:ge()("".concat(Kt,"-arrow"),(0,je.Z)({},"".concat(Kt,"-arrow-loading"),Tr)),customizeIcon:sr,customizeIconProps:{loading:Tr,searchValue:fo,open:us,focused:ur,showSearch:wn}}));var hu=function(){var xo;ei==null||ei(),(xo=co.current)===null||xo===void 0||xo.focus(),Mn([],{type:"clear",values:zn}),$i("",!1,!1)},ua=re(Kt,hu,zn,Di,so,Sr,fo,er),ma=ua.allowClear,Os=ua.clearIcon,$s=pe.createElement(Er,{ref:ko}),Il=ge()(Kt,vn,(0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)({},"".concat(Kt,"-focused"),ur),"".concat(Kt,"-multiple"),ci),"".concat(Kt,"-single"),!ci),"".concat(Kt,"-allow-clear"),Di),"".concat(Kt,"-show-arrow"),th),"".concat(Kt,"-disabled"),Sr),"".concat(Kt,"-loading"),Tr),"".concat(Kt,"-open"),us),"".concat(Kt,"-customize-input"),uo),"".concat(Kt,"-show-search"),wn)),Ca=pe.createElement(et,{ref:Vr,disabled:Sr,prefixCls:Kt,visible:ui,popupElement:$s,animation:mr,transitionName:_o,dropdownStyle:an,dropdownClassName:Nn,direction:oi,dropdownMatchSelectWidth:on,dropdownRender:ft,dropdownAlign:Zn,placement:si,builtinPlacements:Ei,getPopupContainer:yi,empty:wi,getTriggerDOMNode:function(xo){return $r.current||xo},onPopupVisibleChange:As,onPopupMouseEnter:lu},br?pe.cloneElement(br,{ref:qr}):pe.createElement(Jt,(0,Le.Z)({},Lt,{domRef:$r,prefixCls:Kt,inputElement:uo,ref:co,id:Sn,prefix:Lr,showSearch:wn,autoClearSearchValue:Yr,mode:er,activeDescendantId:fr,tagRender:Gn,values:zn,open:us,onToggleOpen:qi,activeValue:Vi,searchValue:fo,onSearch:$i,onSearchSubmit:pa,onRemove:Sa,tokenWithEnter:xr,onInputBlur:Na}))),Yo;return br?Yo=Ca:Yo=pe.createElement("div",(0,Le.Z)({className:Il},zi,{ref:jr,onMouseDown:Ol,onKeyDown:is,onKeyUp:Pa,onFocus:nl,onBlur:Hu}),pe.createElement(en,{visible:ur&&!us,values:zn}),Ca,uu,ma&&Os),pe.createElement(ae.Provider,{value:Gu},Yo)}),un=yn,Jn=function(){return null};Jn.isSelectOptGroup=!0;var mn=Jn,Yn=function(){return null};Yn.isSelectOption=!0;var ri=Yn,bi=Ie(80547),jn=Ie(2738),ki=Ie(6790);function Hi(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Fi=["disabled","title","children","style","className"];function rr(Lt){return typeof Lt=="string"||typeof Lt=="number"}var Cr=function(Ht,Pn){var Sn=le(),Kt=Sn.prefixCls,vn=Sn.id,Hn=Sn.open,Gn=Sn.multiple,oi=Sn.mode,Wn=Sn.searchValue,zn=Sn.toggleOpen,Mn=Sn.notFoundContent,wi=Sn.onPopupScroll,mi=pe.useContext(hn),En=mi.maxCount,ei=mi.flattenOptions,er=mi.onActiveValue,Sr=mi.defaultActiveFirstOption,Tr=mi.onSelect,nn=mi.menuItemSelectedIcon,Mi=mi.rawValues,tr=mi.fieldNames,vi=mi.virtual,or=mi.direction,Vi=mi.listHeight,yr=mi.listItemHeight,fr=mi.optionRender,_r="".concat(Kt,"-item"),Yr=(0,bi.Z)(function(){return ei},[Hn,ei],function(di,An){return An[0]&&di[1]!==An[1]}),Ln=pe.useRef(null),oo=pe.useMemo(function(){return Gn&&ze(En)&&(Mi==null?void 0:Mi.size)>=En},[Gn,En,Mi==null?void 0:Mi.size]),kn=function(An){An.preventDefault()},Di=function(An){var Xn;(Xn=Ln.current)===null||Xn===void 0||Xn.scrollTo(typeof An=="number"?{index:An}:An)},Lr=pe.useCallback(function(di){return oi==="combobox"?!1:Mi.has(di)},[oi,(0,Se.Z)(Mi).toString(),Mi.size]),sr=function(An){for(var Xn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,$n=Yr.length,Un=0;Un<$n;Un+=1){var Qn=(An+Un*Xn+$n)%$n,Vn=Yr[Qn]||{},ni=Vn.group,ci=Vn.data;if(!ni&&!(ci!=null&&ci.disabled)&&(Lr(ci.value)||!oo))return Qn}return-1},so=pe.useState(function(){return sr(0)}),Er=(0,Ce.Z)(so,2),mr=Er[0],_o=Er[1],an=function(An){var Xn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;_o(An);var $n={source:Xn?"keyboard":"mouse"},Un=Yr[An];if(!Un){er(null,-1,$n);return}er(Un.value,An,$n)};(0,pe.useEffect)(function(){an(Sr!==!1?sr(0):-1)},[Yr.length,Wn]);var Nn=pe.useCallback(function(di){return oi==="combobox"?String(di).toLowerCase()===Wn.toLowerCase():Mi.has(di)},[oi,Wn,(0,Se.Z)(Mi).toString(),Mi.size]);(0,pe.useEffect)(function(){var di=setTimeout(function(){if(!Gn&&Hn&&Mi.size===1){var Xn=Array.from(Mi)[0],$n=Yr.findIndex(function(Un){var Qn=Un.data;return Wn?String(Qn.value).startsWith(Wn):Qn.value===Xn});$n!==-1&&(an($n),Di($n))}});if(Hn){var An;(An=Ln.current)===null||An===void 0||An.scrollTo(void 0)}return function(){return clearTimeout(di)}},[Hn,Wn]);var on=function(An){An!==void 0&&Tr(An,{selected:!Mi.has(An)}),Gn||zn(!1)};if(pe.useImperativeHandle(Pn,function(){return{onKeyDown:function(An){var Xn=An.which,$n=An.ctrlKey;switch(Xn){case Ae.Z.N:case Ae.Z.P:case Ae.Z.UP:case Ae.Z.DOWN:{var Un=0;if(Xn===Ae.Z.UP?Un=-1:Xn===Ae.Z.DOWN?Un=1:Hi()&&$n&&(Xn===Ae.Z.N?Un=1:Xn===Ae.Z.P&&(Un=-1)),Un!==0){var Qn=sr(mr+Un,Un);Di(Qn),an(Qn,!0)}break}case Ae.Z.TAB:case Ae.Z.ENTER:{var Vn,ni=Yr[mr];ni&&!(ni!=null&&(Vn=ni.data)!==null&&Vn!==void 0&&Vn.disabled)&&!oo?on(ni.value):on(void 0),Hn&&An.preventDefault();break}case Ae.Z.ESC:zn(!1),Hn&&An.stopPropagation()}},onKeyUp:function(){},scrollTo:function(An){Di(An)}}}),Yr.length===0)return pe.createElement("div",{role:"listbox",id:"".concat(vn,"_list"),className:"".concat(_r,"-empty"),onMouseDown:kn},Mn);var ft=Object.keys(tr).map(function(di){return tr[di]}),Zn=function(An){return An.label};function si(di,An){var Xn=di.group;return{role:Xn?"presentation":"option",id:"".concat(vn,"_list_").concat(An)}}var Ei=function(An){var Xn=Yr[An];if(!Xn)return null;var $n=Xn.data||{},Un=$n.value,Qn=Xn.group,Vn=(0,Oe.Z)($n,!0),ni=Zn(Xn);return Xn?pe.createElement("div",(0,Le.Z)({"aria-label":typeof ni=="string"&&!Qn?ni:null},Vn,{key:An},si(Xn,An),{"aria-selected":Nn(Un)}),Un):null},yi={role:"listbox",id:"".concat(vn,"_list")};return pe.createElement(pe.Fragment,null,vi&&pe.createElement("div",(0,Le.Z)({},yi,{style:{height:0,width:0,overflow:"hidden"}}),Ei(mr-1),Ei(mr),Ei(mr+1)),pe.createElement(ki.Z,{itemKey:"key",ref:Ln,data:Yr,height:Vi,itemHeight:yr,fullHeight:!1,onMouseDown:kn,onScroll:wi,virtual:vi,direction:or,innerProps:vi?null:yi},function(di,An){var Xn=di.group,$n=di.groupOption,Un=di.data,Qn=di.label,Vn=di.value,ni=Un.key;if(Xn){var ci,wn=(ci=Un.title)!==null&&ci!==void 0?ci:rr(Qn)?Qn.toString():void 0;return pe.createElement("div",{className:ge()(_r,"".concat(_r,"-group"),Un.className),title:wn},Qn!==void 0?Qn:ni)}var zi=Un.disabled,Gi=Un.title,Mr=Un.children,Ji=Un.style,Zr=Un.className,jr=(0,xe.Z)(Un,Fi),$r=(0,jn.Z)(jr,ft),Vr=Lr(Vn),co=zi||!Vr&&oo,ko="".concat(_r,"-option"),sn=ge()(_r,ko,Zr,(0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)({},"".concat(ko,"-grouped"),$n),"".concat(ko,"-active"),mr===An&&!co),"".concat(ko,"-disabled"),co),"".concat(ko,"-selected"),Vr)),Jr=Zn(di),Dr=!nn||typeof nn=="function"||Vr,ur=typeof Jr=="number"?Jr:Jr||Vn,Ui=rr(ur)?ur.toString():void 0;return Gi!==void 0&&(Ui=Gi),pe.createElement("div",(0,Le.Z)({},(0,Oe.Z)($r),vi?{}:si(di,An),{"aria-selected":Nn(Vn),className:sn,title:Ui,onMouseMove:function(){mr===An||co||an(An)},onClick:function(){co||on(Vn)},style:Ji}),pe.createElement("div",{className:"".concat(ko,"-content")},typeof fr=="function"?fr(di,{index:An}):ur),pe.isValidElement(nn)||Vr,Dr&&pe.createElement(oe,{className:"".concat(_r,"-option-state"),customizeIcon:nn,customizeIconProps:{value:Vn,disabled:co,isSelected:Vr}},Vr?"\u2713":null))}))},gr=pe.forwardRef(Cr),Ni=gr,Ti=function(Lt,Ht){var Pn=pe.useRef({values:new Map,options:new Map}),Sn=pe.useMemo(function(){var vn=Pn.current,Hn=vn.values,Gn=vn.options,oi=Lt.map(function(Mn){if(Mn.label===void 0){var wi;return(0,Me.Z)((0,Me.Z)({},Mn),{},{label:(wi=Hn.get(Mn.value))===null||wi===void 0?void 0:wi.label})}return Mn}),Wn=new Map,zn=new Map;return oi.forEach(function(Mn){Wn.set(Mn.value,Mn),zn.set(Mn.value,Ht.get(Mn.value)||Gn.get(Mn.value))}),Pn.current.values=Wn,Pn.current.options=zn,oi},[Lt,Ht]),Kt=pe.useCallback(function(vn){return Ht.get(vn)||Pn.current.options.get(vn)},[Ht]);return[Sn,Kt]};function cr(Lt,Ht){return _t(Lt).join("").toUpperCase().includes(Ht)}var $e=function(Lt,Ht,Pn,Sn,Kt){return pe.useMemo(function(){if(!Pn||Sn===!1)return Lt;var vn=Ht.options,Hn=Ht.label,Gn=Ht.value,oi=[],Wn=typeof Sn=="function",zn=Pn.toUpperCase(),Mn=Wn?Sn:function(mi,En){return Kt?cr(En[Kt],zn):En[vn]?cr(En[Hn!=="children"?Hn:"label"],zn):cr(En[Gn],zn)},wi=Wn?function(mi){return We(mi)}:function(mi){return mi};return Lt.forEach(function(mi){if(mi[vn]){var En=Mn(Pn,wi(mi));if(En)oi.push(mi);else{var ei=mi[vn].filter(function(er){return Mn(Pn,wi(er))});ei.length&&oi.push((0,Me.Z)((0,Me.Z)({},mi),{},(0,je.Z)({},vn,ei)))}return}Mn(Pn,wi(mi))&&oi.push(mi)}),oi},[Lt,Sn,Kt,Pn,Ht])},Li=Ie(6551),ti=Ie(11592),Oi=["children","value"],pr=["children"];function dr(Lt){var Ht=Lt,Pn=Ht.key,Sn=Ht.props,Kt=Sn.children,vn=Sn.value,Hn=(0,xe.Z)(Sn,Oi);return(0,Me.Z)({key:Pn,value:vn!==void 0?vn:Pn,children:Kt},Hn)}function Qi(Lt){var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,ti.Z)(Lt).map(function(Pn,Sn){if(!pe.isValidElement(Pn)||!Pn.type)return null;var Kt=Pn,vn=Kt.type.isSelectOptGroup,Hn=Kt.key,Gn=Kt.props,oi=Gn.children,Wn=(0,xe.Z)(Gn,pr);return Ht||!vn?dr(Pn):(0,Me.Z)((0,Me.Z)({key:"__RC_SELECT_GRP__".concat(Hn===null?Sn:Hn,"__"),label:Hn},Wn),{},{options:Qi(oi)})}).filter(function(Pn){return Pn})}var So=function(Ht,Pn,Sn,Kt,vn){return pe.useMemo(function(){var Hn=Ht,Gn=!Ht;Gn&&(Hn=Qi(Pn));var oi=new Map,Wn=new Map,zn=function(mi,En,ei){ei&&typeof ei=="string"&&mi.set(En[ei],En)},Mn=function wi(mi){for(var En=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ei=0;ei<mi.length;ei+=1){var er=mi[ei];!er[Sn.options]||En?(oi.set(er[Sn.value],er),zn(Wn,er,Sn.label),zn(Wn,er,Kt),zn(Wn,er,vn)):wi(er[Sn.options],!0)}};return Mn(Hn),{options:Hn,valueOptions:oi,labelOptions:Wn}},[Ht,Pn,Sn,Kt,vn])},$t=So;function Ge(Lt){var Ht=pe.useRef();Ht.current=Lt;var Pn=pe.useCallback(function(){return Ht.current.apply(Ht,arguments)},[]);return Pn}function Je(Lt){var Ht=Lt.mode,Pn=Lt.options,Sn=Lt.children,Kt=Lt.backfill,vn=Lt.allowClear,Hn=Lt.placeholder,Gn=Lt.getInputElement,oi=Lt.showSearch,Wn=Lt.onSearch,zn=Lt.defaultOpen,Mn=Lt.autoFocus,wi=Lt.labelInValue,mi=Lt.value,En=Lt.inputValue,ei=Lt.optionLabelProp,er=isMultiple(Ht),Sr=oi!==void 0?oi:er||Ht==="combobox",Tr=Pn||convertChildrenToData(Sn);if(warning(Ht!=="tags"||Tr.every(function(vi){return!vi.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ht==="tags"||Ht==="combobox"){var nn=Tr.some(function(vi){return vi.options?vi.options.some(function(or){return typeof("value"in or?or.value:or.key)=="number"}):typeof("value"in vi?vi.value:vi.key)=="number"});warning(!nn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ht!=="combobox"||!ei,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ht==="combobox"||!Kt,"`backfill` only works with `combobox` mode."),warning(Ht==="combobox"||!Gn,"`getInputElement` only work with `combobox` mode."),noteOnce(Ht!=="combobox"||!Gn||!vn||!Hn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Wn&&!Sr&&Ht!=="combobox"&&Ht!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!zn||Mn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),mi!=null){var Mi=toArray(mi);warning(!wi||Mi.every(function(vi){return _typeof(vi)==="object"&&("key"in vi||"value"in vi)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!er||Array.isArray(mi),"`value` should be array when `mode` is `multiple` or `tags`")}if(Sn){var tr=null;toNodeArray(Sn).some(function(vi){if(!React.isValidElement(vi)||!vi.type)return!1;var or=vi,Vi=or.type;if(Vi.isSelectOption)return!1;if(Vi.isSelectOptGroup){var yr=toNodeArray(vi.props.children).every(function(fr){return!React.isValidElement(fr)||!vi.type||fr.type.isSelectOption?!0:(tr=fr.type,!1)});return!yr}return tr=Vi,!0}),tr&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(tr.displayName||tr.name||tr,"`.")),warning(En===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function ot(Lt,Ht){if(Lt){var Pn=function Sn(Kt){for(var vn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Hn=0;Hn<Kt.length;Hn++){var Gn=Kt[Hn];if(Gn[Ht==null?void 0:Ht.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!vn&&Array.isArray(Gn[Ht==null?void 0:Ht.options])&&Sn(Gn[Ht==null?void 0:Ht.options],!0))break}};Pn(Lt)}}var Et=null,Nt=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],pn=["inputValue"];function jt(Lt){return!Lt||(0,be.Z)(Lt)!=="object"}var cn=pe.forwardRef(function(Lt,Ht){var Pn=Lt.id,Sn=Lt.mode,Kt=Lt.prefixCls,vn=Kt===void 0?"rc-select":Kt,Hn=Lt.backfill,Gn=Lt.fieldNames,oi=Lt.inputValue,Wn=Lt.searchValue,zn=Lt.onSearch,Mn=Lt.autoClearSearchValue,wi=Mn===void 0?!0:Mn,mi=Lt.onSelect,En=Lt.onDeselect,ei=Lt.dropdownMatchSelectWidth,er=ei===void 0?!0:ei,Sr=Lt.filterOption,Tr=Lt.filterSort,nn=Lt.optionFilterProp,Mi=Lt.optionLabelProp,tr=Lt.options,vi=Lt.optionRender,or=Lt.children,Vi=Lt.defaultActiveFirstOption,yr=Lt.menuItemSelectedIcon,fr=Lt.virtual,_r=Lt.direction,Yr=Lt.listHeight,Ln=Yr===void 0?200:Yr,oo=Lt.listItemHeight,kn=oo===void 0?20:oo,Di=Lt.labelRender,Lr=Lt.value,sr=Lt.defaultValue,so=Lt.labelInValue,Er=Lt.onChange,mr=Lt.maxCount,_o=(0,xe.Z)(Lt,Nt),an=(0,Li.ZP)(Pn),Nn=bn(Sn),on=!!(!tr&&or),ft=pe.useMemo(function(){return Sr===void 0&&Sn==="combobox"?!1:Sr},[Sr,Sn]),Zn=pe.useMemo(function(){return it(Gn,on)},[JSON.stringify(Gn),on]),si=(0,ye.Z)("",{value:Wn!==void 0?Wn:oi,postState:function(xr){return xr||""}}),Ei=(0,Ce.Z)(si,2),yi=Ei[0],di=Ei[1],An=$t(tr,or,Zn,nn,Mi),Xn=An.valueOptions,$n=An.labelOptions,Un=An.options,Qn=pe.useCallback(function(qi){var xr=_t(qi);return xr.map(function(Br){var Qr,jo,$i,pa,fs;if(jt(Br))Qr=Br;else{var hs;$i=Br.key,jo=Br.label,Qr=(hs=Br.value)!==null&&hs!==void 0?hs:$i}var eo=Xn.get(Qr);if(eo){var ws;if(jo===void 0&&(jo=eo==null?void 0:eo[Mi||Zn.label]),$i===void 0&&($i=(ws=eo==null?void 0:eo.key)!==null&&ws!==void 0?ws:Qr),pa=eo==null?void 0:eo.disabled,fs=eo==null?void 0:eo.title,0)var ga}return{label:jo,value:Qr,key:$i,disabled:pa,title:fs}})},[Zn,Mi,Xn]),Vn=(0,ye.Z)(sr,{value:Lr}),ni=(0,Ce.Z)(Vn,2),ci=ni[0],wn=ni[1],zi=pe.useMemo(function(){var qi,xr=Nn&&ci===null?[]:ci,Br=Qn(xr);return Sn==="combobox"&&rt((qi=Br[0])===null||qi===void 0?void 0:qi.value)?[]:Br},[ci,Qn,Sn,Nn]),Gi=Ti(zi,Xn),Mr=(0,Ce.Z)(Gi,2),Ji=Mr[0],Zr=Mr[1],jr=pe.useMemo(function(){if(!Sn&&Ji.length===1){var qi=Ji[0];if(qi.value===null&&(qi.label===null||qi.label===void 0))return[]}return Ji.map(function(xr){var Br;return(0,Me.Z)((0,Me.Z)({},xr),{},{label:(Br=typeof Di=="function"?Di(xr):xr.label)!==null&&Br!==void 0?Br:xr.value})})},[Sn,Ji,Di]),$r=pe.useMemo(function(){return new Set(Ji.map(function(qi){return qi.value}))},[Ji]);pe.useEffect(function(){if(Sn==="combobox"){var qi,xr=(qi=Ji[0])===null||qi===void 0?void 0:qi.value;di(ut(xr)?String(xr):"")}},[Ji]);var Vr=Ge(function(qi,xr){var Br=xr!=null?xr:qi;return(0,je.Z)((0,je.Z)({},Zn.value,qi),Zn.label,Br)}),co=pe.useMemo(function(){if(Sn!=="tags")return Un;var qi=(0,Se.Z)(Un),xr=function(Qr){return Xn.has(Qr)};return(0,Se.Z)(Ji).sort(function(Br,Qr){return Br.value<Qr.value?-1:1}).forEach(function(Br){var Qr=Br.value;xr(Qr)||qi.push(Vr(Qr,Br.label))}),qi},[Vr,Un,Xn,Ji,Sn]),ko=$e(co,Zn,yi,ft,nn),sn=pe.useMemo(function(){return Sn!=="tags"||!yi||ko.some(function(qi){return qi[nn||"value"]===yi})||ko.some(function(qi){return qi[Zn.value]===yi})?ko:[Vr(yi)].concat((0,Se.Z)(ko))},[Vr,nn,Sn,ko,yi,Zn]),Jr=function qi(xr){var Br=(0,Se.Z)(xr).sort(function(Qr,jo){return Tr(Qr,jo,{searchValue:yi})});return Br.map(function(Qr){return Array.isArray(Qr.options)?(0,Me.Z)((0,Me.Z)({},Qr),{},{options:Qr.options.length>0?qi(Qr.options):Qr.options}):Qr})},Dr=pe.useMemo(function(){return Tr?Jr(sn):sn},[sn,Tr,yi]),ur=pe.useMemo(function(){return Ke(Dr,{fieldNames:Zn,childrenAsData:on})},[Dr,Zn,on]),Ui=function(xr){var Br=Qn(xr);if(wn(Br),Er&&(Br.length!==Ji.length||Br.some(function($i,pa){var fs;return((fs=Ji[pa])===null||fs===void 0?void 0:fs.value)!==($i==null?void 0:$i.value)}))){var Qr=so?Br:Br.map(function($i){return $i.value}),jo=Br.map(function($i){return We(Zr($i.value))});Er(Nn?Qr:Qr[0],Nn?jo:jo[0])}},Hr=pe.useState(null),fo=(0,Ce.Z)(Hr,2),uo=fo[0],br=fo[1],qr=pe.useState(0),Ss=(0,Ce.Z)(qr,2),Vs=Ss[0],Aa=Ss[1],oa=Vi!==void 0?Vi:Sn!=="combobox",nr=pe.useCallback(function(qi,xr){var Br=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Qr=Br.source,jo=Qr===void 0?"keyboard":Qr;Aa(xr),Hn&&Sn==="combobox"&&qi!==null&&jo==="keyboard"&&br(String(qi))},[Hn,Sn]),ns=function(xr,Br,Qr){var jo=function(){var Sa,Na=Zr(xr);return[so?{label:Na==null?void 0:Na[Zn.label],value:xr,key:(Sa=Na==null?void 0:Na.key)!==null&&Sa!==void 0?Sa:xr}:xr,We(Na)]};if(Br&&mi){var $i=jo(),pa=(0,Ce.Z)($i,2),fs=pa[0],hs=pa[1];mi(fs,hs)}else if(!Br&&En&&Qr!=="clear"){var eo=jo(),ws=(0,Ce.Z)(eo,2),ga=ws[0],is=ws[1];En(ga,is)}},ss=Ge(function(qi,xr){var Br,Qr=Nn?xr.selected:!0;Qr?Br=Nn?[].concat((0,Se.Z)(Ji),[qi]):[qi]:Br=Ji.filter(function(jo){return jo.value!==qi}),Ui(Br),ns(qi,Qr),Sn==="combobox"?br(""):(!bn||wi)&&(di(""),br(""))}),zs=function(xr,Br){Ui(xr);var Qr=Br.type,jo=Br.values;(Qr==="remove"||Qr==="clear")&&jo.forEach(function($i){ns($i.value,!1,Qr)})},us=function(xr,Br){if(di(xr),br(null),Br.source==="submit"){var Qr=(xr||"").trim();if(Qr){var jo=Array.from(new Set([].concat((0,Se.Z)($r),[Qr])));Ui(jo),ns(Qr,!0),di("")}return}Br.source!=="blur"&&(Sn==="combobox"&&Ui(xr),zn==null||zn(xr))},Ms=function(xr){var Br=xr;Sn!=="tags"&&(Br=xr.map(function(jo){var $i=$n.get(jo);return $i==null?void 0:$i.value}).filter(function(jo){return jo!==void 0}));var Qr=Array.from(new Set([].concat((0,Se.Z)($r),(0,Se.Z)(Br))));Ui(Qr),Qr.forEach(function(jo){ns(jo,!0)})},ui=pe.useMemo(function(){var qi=fr!==!1&&er!==!1;return(0,Me.Z)((0,Me.Z)({},An),{},{flattenOptions:ur,onActiveValue:nr,defaultActiveFirstOption:oa,onSelect:ss,menuItemSelectedIcon:yr,rawValues:$r,fieldNames:Zn,virtual:qi,direction:_r,listHeight:Ln,listItemHeight:kn,childrenAsData:on,maxCount:mr,optionRender:vi})},[mr,An,ur,nr,oa,ss,yr,$r,Zn,fr,er,_r,Ln,kn,on,vi]);return pe.createElement(hn.Provider,{value:ui},pe.createElement(un,(0,Le.Z)({},_o,{id:an,prefixCls:vn,ref:Ht,omitDomProps:pn,mode:Sn,displayValues:jr,onDisplayValuesChange:zs,direction:_r,searchValue:yi,onSearch:us,autoClearSearchValue:wi,onSearchSplit:Ms,dropdownMatchSelectWidth:er,OptionList:Ni,emptyOptions:!ur.length,activeValue:uo,activeDescendantId:"".concat(an,"_list_").concat(Vs)})))}),On=cn;On.Option=ri,On.OptGroup=mn;var pi=On,Fn=pi},63158:function(xn,ln,Ie){"use strict";var Le=Ie(67711),Se=Ie(52873),je=Ie(16886),Me=Ie(33346),Ce=Ie(59301),xe=Ie(92310),be=Ie.n(xe),ye=Ie(18929),we=Ie(10228),pe=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],de=Ce.forwardRef(function(ge,fe){var ue,ee=ge.prefixCls,z=ee===void 0?"rc-switch":ee,oe=ge.className,re=ge.checked,ae=ge.defaultChecked,le=ge.disabled,me=ge.loadingIcon,ve=ge.checkedChildren,Pe=ge.unCheckedChildren,Ae=ge.onClick,De=ge.onChange,Oe=ge.onKeyDown,Ze=(0,Me.Z)(ge,pe),qe=(0,ye.Z)(!1,{value:re,defaultValue:ae}),Xe=(0,je.Z)(qe,2),mt=Xe[0],pt=Xe[1];function Mt(Rt,ut){var rt=mt;return le||(rt=Rt,pt(rt),De==null||De(rt,ut)),rt}function at(Rt){Rt.which===we.Z.LEFT?Mt(!1,Rt):Rt.which===we.Z.RIGHT&&Mt(!0,Rt),Oe==null||Oe(Rt)}function _t(Rt){var ut=Mt(!mt,Rt);Ae==null||Ae(ut,Rt)}var dt=be()(z,oe,(ue={},(0,Se.Z)(ue,"".concat(z,"-checked"),mt),(0,Se.Z)(ue,"".concat(z,"-disabled"),le),ue));return Ce.createElement("button",(0,Le.Z)({},Ze,{type:"button",role:"switch","aria-checked":mt,disabled:le,className:dt,ref:fe,onKeyDown:at,onClick:_t}),me,Ce.createElement("span",{className:"".concat(z,"-inner")},Ce.createElement("span",{className:"".concat(z,"-inner-checked")},ve),Ce.createElement("span",{className:"".concat(z,"-inner-unchecked")},Pe)))});de.displayName="Switch",ln.Z=de},86351:function(xn,ln,Ie){"use strict";Ie.d(ln,{R:function(){return Se},w:function(){return Le}});var Le={},Se="rc-table-internal-hook"},97347:function(xn,ln,Ie){"use strict";Ie.d(ln,{L:function(){return z},Z:function(){return me}});var Le=Ie(16886),Se=Ie(52873),je=Ie(15142),Me=Ie(26420),Ce=Ie(98506),xe=Ie(33346),be=Ie(11592),ye=Ie(48736),we=Ie(59301),pe=Ie(86351),de=Ie(54451);function ge(ve){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof Pe=="number"?Pe:Pe.endsWith("%")?ve*parseFloat(Pe)/100:null}function fe(ve,Pe,Ae){return we.useMemo(function(){if(Pe&&Pe>0){var De=0,Oe=0;ve.forEach(function(_t){var dt=ge(Pe,_t.width);dt?De+=dt:Oe+=1});var Ze=Math.max(Pe,Ae),qe=Math.max(Ze-De,Oe),Xe=Oe,mt=qe/Oe,pt=0,Mt=ve.map(function(_t){var dt=(0,Ce.Z)({},_t),Rt=ge(Pe,dt.width);if(Rt)dt.width=Rt;else{var ut=Math.floor(mt);dt.width=Xe===1?qe:ut,qe-=ut,Xe-=1}return pt+=dt.width,dt});if(pt<Ze){var at=Ze/pt;qe=Ze,Mt.forEach(function(_t,dt){var Rt=Math.floor(_t.width*at);_t.width=dt===Mt.length-1?qe:Rt,qe-=Rt})}return[Mt,Math.max(pt,Ze)]}return[ve,Pe]},[ve,Pe,Ae])}var ue=["children"],ee=["fixed"];function z(ve){return(0,be.Z)(ve).filter(function(Pe){return we.isValidElement(Pe)}).map(function(Pe){var Ae=Pe.key,De=Pe.props,Oe=De.children,Ze=(0,xe.Z)(De,ue),qe=(0,Ce.Z)({key:Ae},Ze);return Oe&&(qe.children=z(Oe)),qe})}function oe(ve){return ve.filter(function(Pe){return Pe&&(0,Me.Z)(Pe)==="object"&&!Pe.hidden}).map(function(Pe){var Ae=Pe.children;return Ae&&Ae.length>0?(0,Ce.Z)((0,Ce.Z)({},Pe),{},{children:oe(Ae)}):Pe})}function re(ve){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return ve.filter(function(Ae){return Ae&&(0,Me.Z)(Ae)==="object"}).reduce(function(Ae,De,Oe){var Ze=De.fixed,qe=Ze===!0?"left":Ze,Xe="".concat(Pe,"-").concat(Oe),mt=De.children;return mt&&mt.length>0?[].concat((0,je.Z)(Ae),(0,je.Z)(re(mt,Xe).map(function(pt){return(0,Ce.Z)({fixed:qe},pt)}))):[].concat((0,je.Z)(Ae),[(0,Ce.Z)((0,Ce.Z)({key:Xe},De),{},{fixed:qe})])},[])}function ae(ve){return ve.map(function(Pe){var Ae=Pe.fixed,De=(0,xe.Z)(Pe,ee),Oe=Ae;return Ae==="left"?Oe="right":Ae==="right"&&(Oe="left"),(0,Ce.Z)({fixed:Oe},De)})}function le(ve,Pe){var Ae=ve.prefixCls,De=ve.columns,Oe=ve.children,Ze=ve.expandable,qe=ve.expandedKeys,Xe=ve.columnTitle,mt=ve.getRowKey,pt=ve.onTriggerExpand,Mt=ve.expandIcon,at=ve.rowExpandable,_t=ve.expandIconColumnIndex,dt=ve.direction,Rt=ve.expandRowByClick,ut=ve.columnWidth,rt=ve.fixed,ct=ve.scrollWidth,yt=ve.clientWidth,wt=we.useMemo(function(){var Jt=De||z(Oe)||[];return oe(Jt.slice())},[De,Oe]),xt=we.useMemo(function(){if(Ze){var Jt=wt.slice();if(!Jt.includes(pe.w)){var lt=_t||0;lt>=0&&(lt||rt==="left"||!rt)&&Jt.splice(lt,0,pe.w),rt==="right"&&Jt.splice(wt.length,0,pe.w)}var Ue=Jt.indexOf(pe.w);Jt=Jt.filter(function(et,Ve){return et!==pe.w||Ve===Ue});var Be=wt[Ue],tt;rt?tt=rt:tt=Be?Be.fixed:null;var ht=(0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)({},de.v,{className:"".concat(Ae,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",Xe),"fixed",tt),"className","".concat(Ae,"-row-expand-icon-cell")),"width",ut),"render",function(Ve,Re,ze){var it=mt(Re,ze),Ke=qe.has(it),We=at?at(Re):!0,vt=Mt({prefixCls:Ae,expanded:Ke,expandable:We,record:Re,onExpand:pt});return Rt?we.createElement("span",{onClick:function(hn){return hn.stopPropagation()}},vt):vt});return Jt.map(function(et){return et===pe.w?ht:et})}return wt.filter(function(et){return et!==pe.w})},[Ze,wt,mt,qe,Mt,dt]),Ut=we.useMemo(function(){var Jt=xt;return Pe&&(Jt=Pe(Jt)),Jt.length||(Jt=[{render:function(){return null}}]),Jt},[Pe,xt,dt]),zt=we.useMemo(function(){return dt==="rtl"?ae(re(Ut)):re(Ut)},[Ut,dt,ct]),dn=we.useMemo(function(){for(var Jt=-1,lt=zt.length-1;lt>=0;lt-=1){var Ue=zt[lt].fixed;if(Ue==="left"||Ue===!0){Jt=lt;break}}if(Jt>=0)for(var Be=0;Be<=Jt;Be+=1){var tt=zt[Be].fixed;if(tt!=="left"&&tt!==!0)return!0}var ht=zt.findIndex(function(Re){var ze=Re.fixed;return ze==="right"});if(ht>=0)for(var et=ht;et<zt.length;et+=1){var Ve=zt[et].fixed;if(Ve!=="right")return!0}return!1},[zt]),Ft=fe(zt,ct,yt),Dt=(0,Le.Z)(Ft,2),Qt=Dt[0],Yt=Dt[1];return[Ut,Qt,Yt,dn]}var me=le},4030:function(xn,ln,Ie){"use strict";Ie.d(ln,{w2:function(){return Le.w},vP:function(){return rr.v},RQ:function(){return Le.R},ER:function(){return it},Q$:function(){return Sr},TN:function(){return Er}});var Le=Ie(86351),Se=Ie(16886),je=Ie(6089),Me=Ie(34280),Ce=Ie(13697),xe=Ie(59301),be=Ie(4676);function ye(an){var Nn=xe.createContext(void 0),on=function(Zn){var si=Zn.value,Ei=Zn.children,yi=xe.useRef(si);yi.current=si;var di=xe.useState(function(){return{getValue:function(){return yi.current},listeners:new Set}}),An=(0,Se.Z)(di,1),Xn=An[0];return(0,Me.Z)(function(){(0,be.unstable_batchedUpdates)(function(){Xn.listeners.forEach(function($n){$n(si)})})},[si]),xe.createElement(Nn.Provider,{value:Xn},Ei)};return{Context:Nn,Provider:on,defaultValue:an}}function we(an,Nn){var on=(0,je.Z)(typeof Nn=="function"?Nn:function($n){if(Nn===void 0)return $n;if(!Array.isArray(Nn))return $n[Nn];var Un={};return Nn.forEach(function(Qn){Un[Qn]=$n[Qn]}),Un}),ft=xe.useContext(an==null?void 0:an.Context),Zn=ft||{},si=Zn.listeners,Ei=Zn.getValue,yi=xe.useRef();yi.current=on(ft?Ei():an==null?void 0:an.defaultValue);var di=xe.useState({}),An=(0,Se.Z)(di,2),Xn=An[1];return(0,Me.Z)(function(){if(!ft)return;function $n(Un){var Qn=on(Un);(0,Ce.Z)(yi.current,Qn,!0)||Xn({})}return si.add($n),function(){si.delete($n)}},[ft]),yi.current}var pe=Ie(67711),de=Ie(8654);function ge(){var an=xe.createContext(null);function Nn(){return xe.useContext(an)}function on(Zn,si){var Ei=(0,de.Yr)(Zn),yi=function(An,Xn){var $n=Ei?{ref:Xn}:{},Un=xe.useRef(0),Qn=xe.useRef(An),Vn=Nn();return Vn!==null?xe.createElement(Zn,(0,pe.Z)({},An,$n)):((!si||si(Qn.current,An))&&(Un.current+=1),Qn.current=An,xe.createElement(an.Provider,{value:Un.current},xe.createElement(Zn,(0,pe.Z)({},An,$n))))};return Ei?xe.forwardRef(yi):yi}function ft(Zn,si){var Ei=(0,de.Yr)(Zn),yi=function(An,Xn){var $n=Ei?{ref:Xn}:{};return Nn(),xe.createElement(Zn,(0,pe.Z)({},An,$n))};return Ei?xe.memo(xe.forwardRef(yi),si):xe.memo(yi,si)}return{makeImmutable:on,responseImmutable:ft,useImmutableMark:Nn}}var fe=ge(),ue=fe.makeImmutable,ee=fe.responseImmutable,z=fe.useImmutableMark,oe=ge(),re=oe.makeImmutable,ae=oe.responseImmutable,le=oe.useImmutableMark,me=ye(),ve=me;function Pe(an,Nn){var on=React.useRef(0);on.current+=1;var ft=React.useRef(an),Zn=[];Object.keys(an||{}).map(function(Ei){var yi;(an==null?void 0:an[Ei])!==((yi=ft.current)===null||yi===void 0?void 0:yi[Ei])&&Zn.push(Ei)}),ft.current=an;var si=React.useRef([]);return Zn.length&&(si.current=Zn),React.useDebugValue(on.current),React.useDebugValue(si.current.join(", ")),Nn&&console.log("".concat(Nn,":"),on.current,si.current),on.current}var Ae=null,De=null,Oe=Ie(26420),Ze=Ie(98506),qe=Ie(52873),Xe=Ie(92310),mt=Ie.n(Xe),pt=Ie(80547),Mt=Ie(97938),at=Ie(48736),_t=xe.createContext({renderWithProps:!1}),dt=_t,Rt="RC_TABLE_KEY";function ut(an){return an==null?[]:Array.isArray(an)?an:[an]}function rt(an){var Nn=[],on={};return an.forEach(function(ft){for(var Zn=ft||{},si=Zn.key,Ei=Zn.dataIndex,yi=si||ut(Ei).join("-")||Rt;on[yi];)yi="".concat(yi,"_next");on[yi]=!0,Nn.push(yi)}),Nn}function ct(an){return an!=null}function yt(an){return typeof an=="number"&&!Number.isNaN(an)}function wt(an){return an&&(0,Oe.Z)(an)==="object"&&!Array.isArray(an)&&!xe.isValidElement(an)}function xt(an,Nn,on,ft,Zn,si){var Ei=xe.useContext(dt),yi=le(),di=(0,pt.Z)(function(){if(ct(ft))return[ft];var An=Nn==null||Nn===""?[]:Array.isArray(Nn)?Nn:[Nn],Xn=(0,Mt.Z)(an,An),$n=Xn,Un=void 0;if(Zn){var Qn=Zn(Xn,an,on);wt(Qn)?($n=Qn.children,Un=Qn.props,Ei.renderWithProps=!0):$n=Qn}return[$n,Un]},[yi,an,ft,Nn,Zn,on],function(An,Xn){if(si){var $n=(0,Se.Z)(An,2),Un=$n[1],Qn=(0,Se.Z)(Xn,2),Vn=Qn[1];return si(Vn,Un)}return Ei.renderWithProps?!0:!(0,Ce.Z)(An,Xn,!0)});return di}function Ut(an,Nn,on,ft){var Zn=an+Nn-1;return an<=ft&&Zn>=on}function zt(an,Nn){return we(ve,function(on){var ft=Ut(an,Nn||1,on.hoverStartRow,on.hoverEndRow);return[ft,on.onHover]})}var dn=Ie(70425),Ft=function(Nn){var on=Nn.ellipsis,ft=Nn.rowType,Zn=Nn.children,si,Ei=on===!0?{showTitle:!0}:on;return Ei&&(Ei.showTitle||ft==="header")&&(typeof Zn=="string"||typeof Zn=="number"?si=Zn.toString():xe.isValidElement(Zn)&&typeof Zn.props.children=="string"&&(si=Zn.props.children)),si};function Dt(an){var Nn,on,ft,Zn,si,Ei,yi,di,An=an.component,Xn=an.children,$n=an.ellipsis,Un=an.scope,Qn=an.prefixCls,Vn=an.className,ni=an.align,ci=an.record,wn=an.render,zi=an.dataIndex,Gi=an.renderIndex,Mr=an.shouldCellUpdate,Ji=an.index,Zr=an.rowType,jr=an.colSpan,$r=an.rowSpan,Vr=an.fixLeft,co=an.fixRight,ko=an.firstFixLeft,sn=an.lastFixLeft,Jr=an.firstFixRight,Dr=an.lastFixRight,ur=an.appendNode,Ui=an.additionalProps,Hr=Ui===void 0?{}:Ui,fo=an.isSticky,uo="".concat(Qn,"-cell"),br=we(ve,["supportSticky","allColumnsFixedLeft","rowHoverable"]),qr=br.supportSticky,Ss=br.allColumnsFixedLeft,Vs=br.rowHoverable,Aa=xt(ci,zi,Gi,Xn,wn,Mr),oa=(0,Se.Z)(Aa,2),nr=oa[0],ns=oa[1],ss={},zs=typeof Vr=="number"&&qr,us=typeof co=="number"&&qr;zs&&(ss.position="sticky",ss.left=Vr),us&&(ss.position="sticky",ss.right=co);var Ms=(Nn=(on=(ft=ns==null?void 0:ns.colSpan)!==null&&ft!==void 0?ft:Hr.colSpan)!==null&&on!==void 0?on:jr)!==null&&Nn!==void 0?Nn:1,ui=(Zn=(si=(Ei=ns==null?void 0:ns.rowSpan)!==null&&Ei!==void 0?Ei:Hr.rowSpan)!==null&&si!==void 0?si:$r)!==null&&Zn!==void 0?Zn:1,qi=zt(Ji,ui),xr=(0,Se.Z)(qi,2),Br=xr[0],Qr=xr[1],jo=(0,dn.zX)(function(ga){var is;ci&&Qr(Ji,Ji+ui-1),Hr==null||(is=Hr.onMouseEnter)===null||is===void 0||is.call(Hr,ga)}),$i=(0,dn.zX)(function(ga){var is;ci&&Qr(-1,-1),Hr==null||(is=Hr.onMouseLeave)===null||is===void 0||is.call(Hr,ga)});if(Ms===0||ui===0)return null;var pa=(yi=Hr.title)!==null&&yi!==void 0?yi:Ft({rowType:Zr,ellipsis:$n,children:nr}),fs=mt()(uo,Vn,(di={},(0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)(di,"".concat(uo,"-fix-left"),zs&&qr),"".concat(uo,"-fix-left-first"),ko&&qr),"".concat(uo,"-fix-left-last"),sn&&qr),"".concat(uo,"-fix-left-all"),sn&&Ss&&qr),"".concat(uo,"-fix-right"),us&&qr),"".concat(uo,"-fix-right-first"),Jr&&qr),"".concat(uo,"-fix-right-last"),Dr&&qr),"".concat(uo,"-ellipsis"),$n),"".concat(uo,"-with-append"),ur),"".concat(uo,"-fix-sticky"),(zs||us)&&fo&&qr),(0,qe.Z)(di,"".concat(uo,"-row-hover"),!ns&&Br)),Hr.className,ns==null?void 0:ns.className),hs={};ni&&(hs.textAlign=ni);var eo=(0,Ze.Z)((0,Ze.Z)((0,Ze.Z)((0,Ze.Z)({},ns==null?void 0:ns.style),ss),hs),Hr.style),ws=nr;return(0,Oe.Z)(ws)==="object"&&!Array.isArray(ws)&&!xe.isValidElement(ws)&&(ws=null),$n&&(sn||Jr)&&(ws=xe.createElement("span",{className:"".concat(uo,"-content")},ws)),xe.createElement(An,(0,pe.Z)({},ns,Hr,{className:fs,style:eo,title:pa,scope:Un,onMouseEnter:Vs?jo:void 0,onMouseLeave:Vs?$i:void 0,colSpan:Ms!==1?Ms:null,rowSpan:ui!==1?ui:null}),ur,ws)}var Qt=xe.memo(Dt);function Yt(an,Nn,on,ft,Zn){var si=on[an]||{},Ei=on[Nn]||{},yi,di;si.fixed==="left"?yi=ft.left[Zn==="rtl"?Nn:an]:Ei.fixed==="right"&&(di=ft.right[Zn==="rtl"?an:Nn]);var An=!1,Xn=!1,$n=!1,Un=!1,Qn=on[Nn+1],Vn=on[an-1],ni=Qn&&!Qn.fixed||Vn&&!Vn.fixed||on.every(function(Mr){return Mr.fixed==="left"});if(Zn==="rtl"){if(yi!==void 0){var ci=Vn&&Vn.fixed==="left";Un=!ci&&ni}else if(di!==void 0){var wn=Qn&&Qn.fixed==="right";$n=!wn&&ni}}else if(yi!==void 0){var zi=Qn&&Qn.fixed==="left";An=!zi&&ni}else if(di!==void 0){var Gi=Vn&&Vn.fixed==="right";Xn=!Gi&&ni}return{fixLeft:yi,fixRight:di,lastFixLeft:An,firstFixRight:Xn,lastFixRight:$n,firstFixLeft:Un,isSticky:ft.isSticky}}var Jt=xe.createContext({}),lt=Jt;function Ue(an){var Nn=an.className,on=an.index,ft=an.children,Zn=an.colSpan,si=Zn===void 0?1:Zn,Ei=an.rowSpan,yi=an.align,di=we(ve,["prefixCls","direction"]),An=di.prefixCls,Xn=di.direction,$n=xe.useContext(lt),Un=$n.scrollColumnIndex,Qn=$n.stickyOffsets,Vn=$n.flattenColumns,ni=on+si-1,ci=ni+1===Un?si+1:si,wn=Yt(on,on+ci-1,Vn,Qn,Xn);return xe.createElement(Qt,(0,pe.Z)({className:Nn,index:on,component:"td",prefixCls:An,record:null,dataIndex:null,align:yi,colSpan:ci,rowSpan:Ei,render:function(){return ft}},wn))}var Be=Ie(33346),tt=["children"];function ht(an){var Nn=an.children,on=(0,Be.Z)(an,tt);return xe.createElement("tr",on,Nn)}function et(an){var Nn=an.children;return Nn}et.Row=ht,et.Cell=Ue;var Ve=et;function Re(an){var Nn=an.children,on=an.stickyOffsets,ft=an.flattenColumns,Zn=we(ve,"prefixCls"),si=ft.length-1,Ei=ft[si],yi=xe.useMemo(function(){return{stickyOffsets:on,flattenColumns:ft,scrollColumnIndex:Ei!=null&&Ei.scrollbar?si:null}},[Ei,ft,si,on]);return xe.createElement(lt.Provider,{value:yi},xe.createElement("tfoot",{className:"".concat(Zn,"-summary")},Nn))}var ze=ae(Re),it=Ve,Ke=Ie(29301),We=Ie(24514),vt=Ie(75152),kt=Ie(26112);function hn(an,Nn,on,ft,Zn,si,Ei){an.push({record:Nn,indent:on,index:Ei});var yi=si(Nn),di=Zn==null?void 0:Zn.has(yi);if(Nn&&Array.isArray(Nn[ft])&&di)for(var An=0;An<Nn[ft].length;An+=1)hn(an,Nn[ft][An],on+1,ft,Zn,si,An)}function en(an,Nn,on,ft){var Zn=xe.useMemo(function(){if(on!=null&&on.size){for(var si=[],Ei=0;Ei<(an==null?void 0:an.length);Ei+=1){var yi=an[Ei];hn(si,yi,0,Nn,on,ft,Ei)}return si}return an==null?void 0:an.map(function(di,An){return{record:di,indent:0,index:An}})},[an,Nn,on,ft]);return Zn}function Gt(an,Nn,on,ft){var Zn=we(ve,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),si=Zn.flattenColumns,Ei=Zn.expandableType,yi=Zn.expandedKeys,di=Zn.childrenColumnName,An=Zn.onTriggerExpand,Xn=Zn.rowExpandable,$n=Zn.onRow,Un=Zn.expandRowByClick,Qn=Zn.rowClassName,Vn=Ei==="nest",ni=Ei==="row"&&(!Xn||Xn(an)),ci=ni||Vn,wn=yi&&yi.has(Nn),zi=di&&an&&an[di],Gi=(0,dn.zX)(An),Mr=$n==null?void 0:$n(an,on),Ji=Mr==null?void 0:Mr.onClick,Zr=function(co){Un&&ci&&An(an,co);for(var ko=arguments.length,sn=new Array(ko>1?ko-1:0),Jr=1;Jr<ko;Jr++)sn[Jr-1]=arguments[Jr];Ji==null||Ji.apply(void 0,[co].concat(sn))},jr;typeof Qn=="string"?jr=Qn:typeof Qn=="function"&&(jr=Qn(an,on,ft));var $r=rt(si);return(0,Ze.Z)((0,Ze.Z)({},Zn),{},{columnsKey:$r,nestExpandable:Vn,expanded:wn,hasNestChildren:zi,record:an,onTriggerExpand:Gi,rowSupportExpand:ni,expandable:ci,rowProps:(0,Ze.Z)((0,Ze.Z)({},Mr),{},{className:mt()(jr,Mr==null?void 0:Mr.className),onClick:Zr})})}function gn(an){var Nn=an.prefixCls,on=an.children,ft=an.component,Zn=an.cellComponent,si=an.className,Ei=an.expanded,yi=an.colSpan,di=an.isEmpty,An=we(ve,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Xn=An.scrollbarSize,$n=An.fixHeader,Un=An.fixColumn,Qn=An.componentWidth,Vn=An.horizonScroll,ni=on;return(di?Vn&&Qn:Un)&&(ni=xe.createElement("div",{style:{width:Qn-($n&&!di?Xn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Nn,"-expanded-row-fixed")},ni)),xe.createElement(ft,{className:si,style:{display:Ei?null:"none"}},xe.createElement(Qt,{component:Zn,prefixCls:Nn,colSpan:yi},ni))}var bn=gn;function yn(an){var Nn=an.prefixCls,on=an.record,ft=an.onExpand,Zn=an.expanded,si=an.expandable,Ei="".concat(Nn,"-row-expand-icon");if(!si)return xe.createElement("span",{className:mt()(Ei,"".concat(Nn,"-row-spaced"))});var yi=function(An){ft(on,An),An.stopPropagation()};return xe.createElement("span",{className:mt()(Ei,(0,qe.Z)((0,qe.Z)({},"".concat(Nn,"-row-expanded"),Zn),"".concat(Nn,"-row-collapsed"),!Zn)),onClick:yi})}function un(an,Nn,on){var ft=[];function Zn(si){(si||[]).forEach(function(Ei,yi){ft.push(Nn(Ei,yi)),Zn(Ei[on])})}return Zn(an),ft}function Jn(an,Nn,on,ft){return typeof an=="string"?an:typeof an=="function"?an(Nn,on,ft):""}function mn(an,Nn,on,ft,Zn){var si=an.record,Ei=an.prefixCls,yi=an.columnsKey,di=an.fixedInfoList,An=an.expandIconColumnIndex,Xn=an.nestExpandable,$n=an.indentSize,Un=an.expandIcon,Qn=an.expanded,Vn=an.hasNestChildren,ni=an.onTriggerExpand,ci=yi[on],wn=di[on],zi;on===(An||0)&&Xn&&(zi=xe.createElement(xe.Fragment,null,xe.createElement("span",{style:{paddingLeft:"".concat($n*ft,"px")},className:"".concat(Ei,"-row-indent indent-level-").concat(ft)}),Un({prefixCls:Ei,expanded:Qn,expandable:Vn,record:si,onExpand:ni})));var Gi;return Nn.onCell&&(Gi=Nn.onCell(si,Zn)),{key:ci,fixedInfo:wn,appendCellNode:zi,additionalCellProps:Gi||{}}}function Yn(an){var Nn=an.className,on=an.style,ft=an.record,Zn=an.index,si=an.renderIndex,Ei=an.rowKey,yi=an.indent,di=yi===void 0?0:yi,An=an.rowComponent,Xn=an.cellComponent,$n=an.scopeCellComponent,Un=Gt(ft,Ei,Zn,di),Qn=Un.prefixCls,Vn=Un.flattenColumns,ni=Un.expandedRowClassName,ci=Un.expandedRowRender,wn=Un.rowProps,zi=Un.expanded,Gi=Un.rowSupportExpand,Mr=xe.useRef(!1);Mr.current||(Mr.current=zi);var Ji=Jn(ni,ft,Zn,di),Zr=xe.createElement(An,(0,pe.Z)({},wn,{"data-row-key":Ei,className:mt()(Nn,"".concat(Qn,"-row"),"".concat(Qn,"-row-level-").concat(di),wn==null?void 0:wn.className,(0,qe.Z)({},Ji,di>=1)),style:(0,Ze.Z)((0,Ze.Z)({},on),wn==null?void 0:wn.style)}),Vn.map(function(Vr,co){var ko=Vr.render,sn=Vr.dataIndex,Jr=Vr.className,Dr=mn(Un,Vr,co,di,Zn),ur=Dr.key,Ui=Dr.fixedInfo,Hr=Dr.appendCellNode,fo=Dr.additionalCellProps;return xe.createElement(Qt,(0,pe.Z)({className:Jr,ellipsis:Vr.ellipsis,align:Vr.align,scope:Vr.rowScope,component:Vr.rowScope?$n:Xn,prefixCls:Qn,key:ur,record:ft,index:Zn,renderIndex:si,dataIndex:sn,render:ko,shouldCellUpdate:Vr.shouldCellUpdate},Ui,{appendNode:Hr,additionalProps:fo}))})),jr;if(Gi&&(Mr.current||zi)){var $r=ci(ft,Zn,di+1,zi);jr=xe.createElement(bn,{expanded:zi,className:mt()("".concat(Qn,"-expanded-row"),"".concat(Qn,"-expanded-row-level-").concat(di+1),Ji),prefixCls:Qn,component:An,cellComponent:Xn,colSpan:Vn.length,isEmpty:!1},$r)}return xe.createElement(xe.Fragment,null,Zr,jr)}var ri=ae(Yn);function bi(an){var Nn=an.columnKey,on=an.onColumnResize,ft=xe.useRef();return(0,Me.Z)(function(){ft.current&&on(Nn,ft.current.offsetWidth)},[]),xe.createElement(Ke.Z,{data:Nn},xe.createElement("td",{ref:ft,style:{padding:0,border:0,height:0}},xe.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}var jn=Ie(29194);function ki(an){var Nn=an.prefixCls,on=an.columnsKey,ft=an.onColumnResize,Zn=xe.useRef(null);return xe.createElement("tr",{"aria-hidden":"true",className:"".concat(Nn,"-measure-row"),style:{height:0,fontSize:0},ref:Zn},xe.createElement(Ke.Z.Collection,{onBatchResize:function(Ei){(0,jn.Z)(Zn.current)&&Ei.forEach(function(yi){var di=yi.data,An=yi.size;ft(di,An.offsetWidth)})}},on.map(function(si){return xe.createElement(bi,{key:si,columnKey:si,onColumnResize:ft})})))}function Hi(an){var Nn=an.data,on=an.measureColumnWidth,ft=we(ve,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Zn=ft.prefixCls,si=ft.getComponent,Ei=ft.onColumnResize,yi=ft.flattenColumns,di=ft.getRowKey,An=ft.expandedKeys,Xn=ft.childrenColumnName,$n=ft.emptyNode,Un=en(Nn,Xn,An,di),Qn=xe.useRef({renderWithProps:!1}),Vn=si(["body","wrapper"],"tbody"),ni=si(["body","row"],"tr"),ci=si(["body","cell"],"td"),wn=si(["body","cell"],"th"),zi;Nn.length?zi=Un.map(function(Mr,Ji){var Zr=Mr.record,jr=Mr.indent,$r=Mr.index,Vr=di(Zr,Ji);return xe.createElement(ri,{key:Vr,rowKey:Vr,record:Zr,index:Ji,renderIndex:$r,rowComponent:ni,cellComponent:ci,scopeCellComponent:wn,indent:jr})}):zi=xe.createElement(bn,{expanded:!0,className:"".concat(Zn,"-placeholder"),prefixCls:Zn,component:ni,cellComponent:ci,colSpan:yi.length,isEmpty:!0},$n);var Gi=rt(yi);return xe.createElement(dt.Provider,{value:Qn.current},xe.createElement(Vn,{className:"".concat(Zn,"-tbody")},on&&xe.createElement(ki,{prefixCls:Zn,columnsKey:Gi,onColumnResize:Ei}),zi))}var Fi=ae(Hi),rr=Ie(54451),Cr=["columnType"];function gr(an){for(var Nn=an.colWidths,on=an.columns,ft=an.columCount,Zn=we(ve,["tableLayout"]),si=Zn.tableLayout,Ei=[],yi=ft||on.length,di=!1,An=yi-1;An>=0;An-=1){var Xn=Nn[An],$n=on&&on[An],Un=void 0,Qn=void 0;if($n&&(Un=$n[rr.v],si==="auto"&&(Qn=$n.minWidth)),Xn||Qn||Un||di){var Vn=Un||{},ni=Vn.columnType,ci=(0,Be.Z)(Vn,Cr);Ei.unshift(xe.createElement("col",(0,pe.Z)({key:An,style:{width:Xn,minWidth:Qn}},ci))),di=!0}}return xe.createElement("colgroup",null,Ei)}var Ni=gr,Ti=Ie(15142),cr=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function $e(an,Nn){return(0,xe.useMemo)(function(){for(var on=[],ft=0;ft<Nn;ft+=1){var Zn=an[ft];if(Zn!==void 0)on[ft]=Zn;else return null}return on},[an.join("_"),Nn])}var Li=xe.forwardRef(function(an,Nn){var on=an.className,ft=an.noData,Zn=an.columns,si=an.flattenColumns,Ei=an.colWidths,yi=an.columCount,di=an.stickyOffsets,An=an.direction,Xn=an.fixHeader,$n=an.stickyTopOffset,Un=an.stickyBottomOffset,Qn=an.stickyClassName,Vn=an.onScroll,ni=an.maxContentScroll,ci=an.children,wn=(0,Be.Z)(an,cr),zi=we(ve,["prefixCls","scrollbarSize","isSticky","getComponent"]),Gi=zi.prefixCls,Mr=zi.scrollbarSize,Ji=zi.isSticky,Zr=zi.getComponent,jr=Zr(["header","table"],"table"),$r=Ji&&!Xn?0:Mr,Vr=xe.useRef(null),co=xe.useCallback(function(fo){(0,de.mH)(Nn,fo),(0,de.mH)(Vr,fo)},[]);xe.useEffect(function(){var fo;function uo(br){var qr=br,Ss=qr.currentTarget,Vs=qr.deltaX;Vs&&(Vn({currentTarget:Ss,scrollLeft:Ss.scrollLeft+Vs}),br.preventDefault())}return(fo=Vr.current)===null||fo===void 0||fo.addEventListener("wheel",uo,{passive:!1}),function(){var br;(br=Vr.current)===null||br===void 0||br.removeEventListener("wheel",uo)}},[]);var ko=xe.useMemo(function(){return si.every(function(fo){return fo.width})},[si]),sn=si[si.length-1],Jr={fixed:sn?sn.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Gi,"-cell-scrollbar")}}},Dr=(0,xe.useMemo)(function(){return $r?[].concat((0,Ti.Z)(Zn),[Jr]):Zn},[$r,Zn]),ur=(0,xe.useMemo)(function(){return $r?[].concat((0,Ti.Z)(si),[Jr]):si},[$r,si]),Ui=(0,xe.useMemo)(function(){var fo=di.right,uo=di.left;return(0,Ze.Z)((0,Ze.Z)({},di),{},{left:An==="rtl"?[].concat((0,Ti.Z)(uo.map(function(br){return br+$r})),[0]):uo,right:An==="rtl"?fo:[].concat((0,Ti.Z)(fo.map(function(br){return br+$r})),[0]),isSticky:Ji})},[$r,di,Ji]),Hr=$e(Ei,yi);return xe.createElement("div",{style:(0,Ze.Z)({overflow:"hidden"},Ji?{top:$n,bottom:Un}:{}),ref:co,className:mt()(on,(0,qe.Z)({},Qn,!!Qn))},xe.createElement(jr,{style:{tableLayout:"fixed",visibility:ft||Hr?null:"hidden"}},(!ft||!ni||ko)&&xe.createElement(Ni,{colWidths:Hr?[].concat((0,Ti.Z)(Hr),[$r]):[],columCount:yi+1,columns:ur}),ci((0,Ze.Z)((0,Ze.Z)({},wn),{},{stickyOffsets:Ui,columns:Dr,flattenColumns:ur}))))}),ti=xe.memo(Li),Oi=function(Nn){var on=Nn.cells,ft=Nn.stickyOffsets,Zn=Nn.flattenColumns,si=Nn.rowComponent,Ei=Nn.cellComponent,yi=Nn.onHeaderRow,di=Nn.index,An=we(ve,["prefixCls","direction"]),Xn=An.prefixCls,$n=An.direction,Un;yi&&(Un=yi(on.map(function(Vn){return Vn.column}),di));var Qn=rt(on.map(function(Vn){return Vn.column}));return xe.createElement(si,Un,on.map(function(Vn,ni){var ci=Vn.column,wn=Yt(Vn.colStart,Vn.colEnd,Zn,ft,$n),zi;return ci&&ci.onHeaderCell&&(zi=Vn.column.onHeaderCell(ci)),xe.createElement(Qt,(0,pe.Z)({},Vn,{scope:ci.title?Vn.colSpan>1?"colgroup":"col":null,ellipsis:ci.ellipsis,align:ci.align,component:Ei,prefixCls:Xn,key:Qn[ni]},wn,{additionalProps:zi,rowType:"header"}))}))},pr=Oi;function dr(an){var Nn=[];function on(Ei,yi){var di=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Nn[di]=Nn[di]||[];var An=yi,Xn=Ei.filter(Boolean).map(function($n){var Un={key:$n.key,className:$n.className||"",children:$n.title,column:$n,colStart:An},Qn=1,Vn=$n.children;return Vn&&Vn.length>0&&(Qn=on(Vn,An,di+1).reduce(function(ni,ci){return ni+ci},0),Un.hasSubColumns=!0),"colSpan"in $n&&(Qn=$n.colSpan),"rowSpan"in $n&&(Un.rowSpan=$n.rowSpan),Un.colSpan=Qn,Un.colEnd=Un.colStart+Qn-1,Nn[di].push(Un),An+=Qn,Qn});return Xn}on(an,0);for(var ft=Nn.length,Zn=function(yi){Nn[yi].forEach(function(di){!("rowSpan"in di)&&!di.hasSubColumns&&(di.rowSpan=ft-yi)})},si=0;si<ft;si+=1)Zn(si);return Nn}var Qi=function(Nn){var on=Nn.stickyOffsets,ft=Nn.columns,Zn=Nn.flattenColumns,si=Nn.onHeaderRow,Ei=we(ve,["prefixCls","getComponent"]),yi=Ei.prefixCls,di=Ei.getComponent,An=xe.useMemo(function(){return dr(ft)},[ft]),Xn=di(["header","wrapper"],"thead"),$n=di(["header","row"],"tr"),Un=di(["header","cell"],"th");return xe.createElement(Xn,{className:"".concat(yi,"-thead")},An.map(function(Qn,Vn){var ni=xe.createElement(pr,{key:Vn,flattenColumns:Zn,cells:Qn,stickyOffsets:on,rowComponent:$n,cellComponent:Un,onHeaderRow:si,index:Vn});return ni}))},So=ae(Qi),$t=Ie(97347);function Ge(an,Nn,on){var ft=(0,rr.g)(an),Zn=ft.expandIcon,si=ft.expandedRowKeys,Ei=ft.defaultExpandedRowKeys,yi=ft.defaultExpandAllRows,di=ft.expandedRowRender,An=ft.onExpand,Xn=ft.onExpandedRowsChange,$n=ft.childrenColumnName,Un=Zn||yn,Qn=$n||"children",Vn=xe.useMemo(function(){return di?"row":an.expandable&&an.internalHooks===Le.R&&an.expandable.__PARENT_RENDER_ICON__||Nn.some(function(Ji){return Ji&&(0,Oe.Z)(Ji)==="object"&&Ji[Qn]})?"nest":!1},[!!di,Nn]),ni=xe.useState(function(){return Ei||(yi?un(Nn,on,Qn):[])}),ci=(0,Se.Z)(ni,2),wn=ci[0],zi=ci[1],Gi=xe.useMemo(function(){return new Set(si||wn||[])},[si,wn]),Mr=xe.useCallback(function(Ji){var Zr=on(Ji,Nn.indexOf(Ji)),jr,$r=Gi.has(Zr);$r?(Gi.delete(Zr),jr=(0,Ti.Z)(Gi)):jr=[].concat((0,Ti.Z)(Gi),[Zr]),zi(jr),An&&An(!$r,Ji),Xn&&Xn(jr)},[on,Gi,Nn,An,Xn]);return[ft,Vn,Gi,Un,Qn,Mr]}function Je(an,Nn,on){var ft=an.map(function(Zn,si){return Yt(si,si,an,Nn,on)});return(0,pt.Z)(function(){return ft},[ft],function(Zn,si){return!(0,Ce.Z)(Zn,si)})}function ot(an){var Nn=(0,xe.useRef)(an),on=(0,xe.useState)({}),ft=(0,Se.Z)(on,2),Zn=ft[1],si=(0,xe.useRef)(null),Ei=(0,xe.useRef)([]);function yi(di){Ei.current.push(di);var An=Promise.resolve();si.current=An,An.then(function(){if(si.current===An){var Xn=Ei.current,$n=Nn.current;Ei.current=[],Xn.forEach(function(Un){Nn.current=Un(Nn.current)}),si.current=null,$n!==Nn.current&&Zn({})}})}return(0,xe.useEffect)(function(){return function(){si.current=null}},[]),[Nn.current,yi]}function Et(an){var Nn=(0,xe.useRef)(an||null),on=(0,xe.useRef)();function ft(){window.clearTimeout(on.current)}function Zn(Ei){Nn.current=Ei,ft(),on.current=window.setTimeout(function(){Nn.current=null,on.current=void 0},100)}function si(){return Nn.current}return(0,xe.useEffect)(function(){return ft},[]),[Zn,si]}function Nt(){var an=xe.useState(-1),Nn=(0,Se.Z)(an,2),on=Nn[0],ft=Nn[1],Zn=xe.useState(-1),si=(0,Se.Z)(Zn,2),Ei=si[0],yi=si[1],di=xe.useCallback(function(An,Xn){ft(An),yi(Xn)},[]);return[on,Ei,di]}var pn=Ie(47273),jt=(0,pn.Z)()?window:null;function cn(an,Nn){var on=(0,Oe.Z)(an)==="object"?an:{},ft=on.offsetHeader,Zn=ft===void 0?0:ft,si=on.offsetSummary,Ei=si===void 0?0:si,yi=on.offsetScroll,di=yi===void 0?0:yi,An=on.getContainer,Xn=An===void 0?function(){return jt}:An,$n=Xn()||jt,Un=!!an;return xe.useMemo(function(){return{isSticky:Un,stickyClassName:Un?"".concat(Nn,"-sticky-holder"):"",offsetHeader:Zn,offsetSummary:Ei,offsetScroll:di,container:$n}},[Un,di,Zn,Ei,Nn,$n])}function On(an,Nn,on){var ft=(0,xe.useMemo)(function(){var Zn=Nn.length,si=function(An,Xn,$n){for(var Un=[],Qn=0,Vn=An;Vn!==Xn;Vn+=$n)Un.push(Qn),Nn[Vn].fixed&&(Qn+=an[Vn]||0);return Un},Ei=si(0,Zn,1),yi=si(Zn-1,-1,-1).reverse();return on==="rtl"?{left:yi,right:Ei}:{left:Ei,right:yi}},[an,Nn,on]);return ft}var pi=On;function Fn(an){var Nn=an.className,on=an.children;return xe.createElement("div",{className:Nn},on)}var Lt=Fn,Ht=Ie(8224),Pn=Ie(16089),Sn=Ie(76846);function Kt(an){var Nn=(0,Sn.bn)(an),on=Nn.getBoundingClientRect(),ft=document.documentElement;return{left:on.left+(window.pageXOffset||ft.scrollLeft)-(ft.clientLeft||document.body.clientLeft||0),top:on.top+(window.pageYOffset||ft.scrollTop)-(ft.clientTop||document.body.clientTop||0)}}var vn=function(Nn,on){var ft,Zn,si=Nn.scrollBodyRef,Ei=Nn.onScroll,yi=Nn.offsetScroll,di=Nn.container,An=Nn.direction,Xn=we(ve,"prefixCls"),$n=((ft=si.current)===null||ft===void 0?void 0:ft.scrollWidth)||0,Un=((Zn=si.current)===null||Zn===void 0?void 0:Zn.clientWidth)||0,Qn=$n&&Un*(Un/$n),Vn=xe.useRef(),ni=ot({scrollLeft:0,isHiddenScrollBar:!0}),ci=(0,Se.Z)(ni,2),wn=ci[0],zi=ci[1],Gi=xe.useRef({delta:0,x:0}),Mr=xe.useState(!1),Ji=(0,Se.Z)(Mr,2),Zr=Ji[0],jr=Ji[1],$r=xe.useRef(null);xe.useEffect(function(){return function(){Pn.Z.cancel($r.current)}},[]);var Vr=function(){jr(!1)},co=function(ur){ur.persist(),Gi.current.delta=ur.pageX-wn.scrollLeft,Gi.current.x=0,jr(!0),ur.preventDefault()},ko=function(ur){var Ui,Hr=ur||((Ui=window)===null||Ui===void 0?void 0:Ui.event),fo=Hr.buttons;if(!Zr||fo===0){Zr&&jr(!1);return}var uo=Gi.current.x+ur.pageX-Gi.current.x-Gi.current.delta,br=An==="rtl";uo=Math.max(br?Qn-Un:0,Math.min(br?0:Un-Qn,uo));var qr=!br||Math.abs(uo)+Math.abs(Qn)<Un;qr&&(Ei({scrollLeft:uo/Un*($n+2)}),Gi.current.x=ur.pageX)},sn=function(){Pn.Z.cancel($r.current),$r.current=(0,Pn.Z)(function(){if(si.current){var ur=Kt(si.current).top,Ui=ur+si.current.offsetHeight,Hr=di===window?document.documentElement.scrollTop+window.innerHeight:Kt(di).top+di.clientHeight;Ui-(0,vt.Z)()<=Hr||ur>=Hr-yi?zi(function(fo){return(0,Ze.Z)((0,Ze.Z)({},fo),{},{isHiddenScrollBar:!0})}):zi(function(fo){return(0,Ze.Z)((0,Ze.Z)({},fo),{},{isHiddenScrollBar:!1})})}})},Jr=function(ur){zi(function(Ui){return(0,Ze.Z)((0,Ze.Z)({},Ui),{},{scrollLeft:ur/$n*Un||0})})};return xe.useImperativeHandle(on,function(){return{setScrollLeft:Jr,checkScrollBarVisible:sn}}),xe.useEffect(function(){var Dr=(0,Ht.Z)(document.body,"mouseup",Vr,!1),ur=(0,Ht.Z)(document.body,"mousemove",ko,!1);return sn(),function(){Dr.remove(),ur.remove()}},[Qn,Zr]),xe.useEffect(function(){if(si.current){for(var Dr=[],ur=(0,Sn.bn)(si.current);ur;)Dr.push(ur),ur=ur.parentElement;return Dr.forEach(function(Ui){return Ui.addEventListener("scroll",sn,!1)}),window.addEventListener("resize",sn,!1),window.addEventListener("scroll",sn,!1),di.addEventListener("scroll",sn,!1),function(){Dr.forEach(function(Ui){return Ui.removeEventListener("scroll",sn)}),window.removeEventListener("resize",sn),window.removeEventListener("scroll",sn),di.removeEventListener("scroll",sn)}}},[di]),xe.useEffect(function(){wn.isHiddenScrollBar||zi(function(Dr){var ur=si.current;return ur?(0,Ze.Z)((0,Ze.Z)({},Dr),{},{scrollLeft:ur.scrollLeft/ur.scrollWidth*ur.clientWidth}):Dr})},[wn.isHiddenScrollBar]),$n<=Un||!Qn||wn.isHiddenScrollBar?null:xe.createElement("div",{style:{height:(0,vt.Z)(),width:Un,bottom:yi},className:"".concat(Xn,"-sticky-scroll")},xe.createElement("div",{onMouseDown:co,ref:Vn,className:mt()("".concat(Xn,"-sticky-scroll-bar"),(0,qe.Z)({},"".concat(Xn,"-sticky-scroll-bar-active"),Zr)),style:{width:"".concat(Qn,"px"),transform:"translate3d(".concat(wn.scrollLeft,"px, 0, 0)")}}))},Hn=xe.forwardRef(vn);function Gn(an){return null}var oi=Gn;function Wn(an){return null}var zn=Wn,Mn="rc-table",wi=[],mi={};function En(){return"No Data"}function ei(an,Nn){var on=(0,Ze.Z)({rowKey:"key",prefixCls:Mn,emptyText:En},an),ft=on.prefixCls,Zn=on.className,si=on.rowClassName,Ei=on.style,yi=on.data,di=on.rowKey,An=on.scroll,Xn=on.tableLayout,$n=on.direction,Un=on.title,Qn=on.footer,Vn=on.summary,ni=on.caption,ci=on.id,wn=on.showHeader,zi=on.components,Gi=on.emptyText,Mr=on.onRow,Ji=on.onHeaderRow,Zr=on.onScroll,jr=on.internalHooks,$r=on.transformColumns,Vr=on.internalRefs,co=on.tailor,ko=on.getContainerWidth,sn=on.sticky,Jr=on.rowHoverable,Dr=Jr===void 0?!0:Jr,ur=yi||wi,Ui=!!ur.length,Hr=jr===Le.R,fo=xe.useCallback(function(po,Nr){return(0,Mt.Z)(zi,po)||Nr},[zi]),uo=xe.useMemo(function(){return typeof di=="function"?di:function(po){var Nr=po&&po[di];return Nr}},[di]),br=fo(["body"]),qr=Nt(),Ss=(0,Se.Z)(qr,3),Vs=Ss[0],Aa=Ss[1],oa=Ss[2],nr=Ge(on,ur,uo),ns=(0,Se.Z)(nr,6),ss=ns[0],zs=ns[1],us=ns[2],Ms=ns[3],ui=ns[4],qi=ns[5],xr=An==null?void 0:An.x,Br=xe.useState(0),Qr=(0,Se.Z)(Br,2),jo=Qr[0],$i=Qr[1],pa=(0,$t.Z)((0,Ze.Z)((0,Ze.Z)((0,Ze.Z)({},on),ss),{},{expandable:!!ss.expandedRowRender,columnTitle:ss.columnTitle,expandedKeys:us,getRowKey:uo,onTriggerExpand:qi,expandIcon:Ms,expandIconColumnIndex:ss.expandIconColumnIndex,direction:$n,scrollWidth:Hr&&co&&typeof xr=="number"?xr:null,clientWidth:jo}),Hr?$r:null),fs=(0,Se.Z)(pa,4),hs=fs[0],eo=fs[1],ws=fs[2],ga=fs[3],is=ws!=null?ws:xr,Pa=xe.useMemo(function(){return{columns:hs,flattenColumns:eo}},[hs,eo]),Sa=xe.useRef(),Na=xe.useRef(),_s=xe.useRef(),nl=xe.useRef();xe.useImperativeHandle(Nn,function(){return{nativeElement:Sa.current,scrollTo:function(Nr){var Do;if(_s.current instanceof HTMLElement){var ya=Nr.index,ls=Nr.top,Wu=Nr.key;if(yt(ls)){var cu;(cu=_s.current)===null||cu===void 0||cu.scrollTo({top:ls})}else{var Mu,Ya=Wu!=null?Wu:uo(ur[ya]);(Mu=_s.current.querySelector('[data-row-key="'.concat(Ya,'"]')))===null||Mu===void 0||Mu.scrollIntoView()}}else(Do=_s.current)!==null&&Do!==void 0&&Do.scrollTo&&_s.current.scrollTo(Nr)}}});var Hu=xe.useRef(),fl=xe.useState(!1),Ol=(0,Se.Z)(fl,2),il=Ol[0],Pu=Ol[1],eh=xe.useState(!1),lu=(0,Se.Z)(eh,2),As=lu[0],Gu=lu[1],th=xe.useState(new Map),uu=(0,Se.Z)(th,2),hu=uu[0],ua=uu[1],ma=rt(eo),Os=ma.map(function(po){return hu.get(po)}),$s=xe.useMemo(function(){return Os},[Os.join("_")]),Il=pi($s,eo,$n),Ca=An&&ct(An.y),Yo=An&&ct(is)||!!ss.fixed,zo=Yo&&eo.some(function(po){var Nr=po.fixed;return Nr}),xo=xe.useRef(),Us=cn(sn,ft),Ii=Us.isSticky,Hs=Us.offsetHeader,Vt=Us.offsetSummary,In=Us.offsetScroll,pl=Us.stickyClassName,Kl=Us.container,Ns=xe.useMemo(function(){return Vn==null?void 0:Vn(ur)},[Vn,ur]),sa=(Ca||Ii)&&xe.isValidElement(Ns)&&Ns.type===Ve&&Ns.props.fixed,rl,bl,Cu;Ca&&(bl={overflowY:Ui?"scroll":"auto",maxHeight:An.y}),Yo&&(rl={overflowX:"auto"},Ca||(bl={overflowY:"hidden"}),Cu={width:is===!0?"auto":is,minWidth:"100%"});var ps=xe.useCallback(function(po,Nr){ua(function(Do){if(Do.get(po)!==Nr){var ya=new Map(Do);return ya.set(po,Nr),ya}return Do})},[]),Rr=Et(null),va=(0,Se.Z)(Rr,2),Is=va[0],gs=va[1];function to(po,Nr){Nr&&(typeof Nr=="function"?Nr(po):Nr.scrollLeft!==po&&(Nr.scrollLeft=po,Nr.scrollLeft!==po&&setTimeout(function(){Nr.scrollLeft=po},0)))}var bs=(0,je.Z)(function(po){var Nr=po.currentTarget,Do=po.scrollLeft,ya=$n==="rtl",ls=typeof Do=="number"?Do:Nr.scrollLeft,Wu=Nr||mi;if(!gs()||gs()===Wu){var cu;Is(Wu),to(ls,Na.current),to(ls,_s.current),to(ls,Hu.current),to(ls,(cu=xo.current)===null||cu===void 0?void 0:cu.setScrollLeft)}var Mu=Nr||Na.current;if(Mu){var Ya=Hr&&co&&typeof is=="number"?is:Mu.scrollWidth,Jl=Mu.clientWidth;if(Ya===Jl){Pu(!1),Gu(!1);return}ya?(Pu(-ls<Ya-Jl),Gu(-ls>0)):(Pu(ls>0),Gu(ls<Ya-Jl))}}),Da=(0,je.Z)(function(po){bs(po),Zr==null||Zr(po)}),Xo=function(){if(Yo&&_s.current){var Nr;bs({currentTarget:(0,Sn.bn)(_s.current),scrollLeft:(Nr=_s.current)===null||Nr===void 0?void 0:Nr.scrollLeft})}else Pu(!1),Gu(!1)},Ka=function(Nr){var Do,ya=Nr.width;(Do=xo.current)===null||Do===void 0||Do.checkScrollBarVisible();var ls=Sa.current?Sa.current.offsetWidth:ya;Hr&&ko&&Sa.current&&(ls=ko(Sa.current,ls)||ls),ls!==jo&&(Xo(),$i(ls))},ea=xe.useRef(!1);xe.useEffect(function(){ea.current&&Xo()},[Yo,yi,hs.length]),xe.useEffect(function(){ea.current=!0},[]);var Eu=xe.useState(0),Io=(0,Se.Z)(Eu,2),ha=Io[0],Ro=Io[1],es=xe.useState(!0),Jo=(0,Se.Z)(es,2),cs=Jo[0],No=Jo[1];(0,Me.Z)(function(){(!co||!Hr)&&(_s.current instanceof Element?Ro((0,vt.o)(_s.current).width):Ro((0,vt.o)(nl.current).width)),No((0,We.G)("position","sticky"))},[]),xe.useEffect(function(){Hr&&Vr&&(Vr.body.current=_s.current)});var nh=xe.useCallback(function(po){return xe.createElement(xe.Fragment,null,xe.createElement(So,po),sa==="top"&&xe.createElement(ze,po,Ns))},[sa,Ns]),Ar=xe.useCallback(function(po){return xe.createElement(ze,po,Ns)},[Ns]),vc=fo(["table"],"table"),bo=xe.useMemo(function(){return Xn||(zo?is==="max-content"?"auto":"fixed":Ca||Ii||eo.some(function(po){var Nr=po.ellipsis;return Nr})?"fixed":"auto")},[Ca,zo,eo,Xn,Ii]),Gh,Lu={colWidths:$s,columCount:eo.length,stickyOffsets:Il,onHeaderRow:Ji,fixHeader:Ca,scroll:An},ih=xe.useMemo(function(){return Ui?null:typeof Gi=="function"?Gi():Gi},[Ui,Gi]),Wh=xe.createElement(Fi,{data:ur,measureColumnWidth:Ca||Yo||Ii}),Ph=xe.createElement(Ni,{colWidths:eo.map(function(po){var Nr=po.width;return Nr}),columns:eo}),Yl=ni!=null?xe.createElement("caption",{className:"".concat(ft,"-caption")},ni):void 0,Wr=(0,kt.Z)(on,{data:!0}),Ho=(0,kt.Z)(on,{aria:!0});if(Ca||Ii){var Pl;typeof br=="function"?(Pl=br(ur,{scrollbarSize:ha,ref:_s,onScroll:bs}),Lu.colWidths=eo.map(function(po,Nr){var Do=po.width,ya=Nr===eo.length-1?Do-ha:Do;return typeof ya=="number"&&!Number.isNaN(ya)?ya:0})):Pl=xe.createElement("div",{style:(0,Ze.Z)((0,Ze.Z)({},rl),bl),onScroll:Da,ref:_s,className:mt()("".concat(ft,"-body"))},xe.createElement(vc,(0,pe.Z)({style:(0,Ze.Z)((0,Ze.Z)({},Cu),{},{tableLayout:bo})},Ho),Yl,Ph,Wh,!sa&&Ns&&xe.createElement(ze,{stickyOffsets:Il,flattenColumns:eo},Ns)));var Ch=(0,Ze.Z)((0,Ze.Z)((0,Ze.Z)({noData:!ur.length,maxContentScroll:Yo&&is==="max-content"},Lu),Pa),{},{direction:$n,stickyClassName:pl,onScroll:bs});Gh=xe.createElement(xe.Fragment,null,wn!==!1&&xe.createElement(ti,(0,pe.Z)({},Ch,{stickyTopOffset:Hs,className:"".concat(ft,"-header"),ref:Na}),nh),Pl,sa&&sa!=="top"&&xe.createElement(ti,(0,pe.Z)({},Ch,{stickyBottomOffset:Vt,className:"".concat(ft,"-summary"),ref:Hu}),Ar),Ii&&_s.current&&_s.current instanceof Element&&xe.createElement(Hn,{ref:xo,offsetScroll:In,scrollBodyRef:_s,onScroll:bs,container:Kl,direction:$n}))}else Gh=xe.createElement("div",{style:(0,Ze.Z)((0,Ze.Z)({},rl),bl),className:mt()("".concat(ft,"-content")),onScroll:bs,ref:_s},xe.createElement(vc,(0,pe.Z)({style:(0,Ze.Z)((0,Ze.Z)({},Cu),{},{tableLayout:bo})},Ho),Yl,Ph,wn!==!1&&xe.createElement(So,(0,pe.Z)({},Lu,Pa)),Wh,Ns&&xe.createElement(ze,{stickyOffsets:Il,flattenColumns:eo},Ns)));var Cl=xe.createElement("div",(0,pe.Z)({className:mt()(ft,Zn,(0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)({},"".concat(ft,"-rtl"),$n==="rtl"),"".concat(ft,"-ping-left"),il),"".concat(ft,"-ping-right"),As),"".concat(ft,"-layout-fixed"),Xn==="fixed"),"".concat(ft,"-fixed-header"),Ca),"".concat(ft,"-fixed-column"),zo),"".concat(ft,"-fixed-column-gapped"),zo&&ga),"".concat(ft,"-scroll-horizontal"),Yo),"".concat(ft,"-has-fix-left"),eo[0]&&eo[0].fixed),"".concat(ft,"-has-fix-right"),eo[eo.length-1]&&eo[eo.length-1].fixed==="right")),style:Ei,id:ci,ref:Sa},Wr),Un&&xe.createElement(Lt,{className:"".concat(ft,"-title")},Un(ur)),xe.createElement("div",{ref:nl,className:"".concat(ft,"-container")},Gh),Qn&&xe.createElement(Lt,{className:"".concat(ft,"-footer")},Qn(ur)));Yo&&(Cl=xe.createElement(Ke.Z,{onResize:Ka},Cl));var Eh=Je(eo,Il,$n),Xl=xe.useMemo(function(){return{scrollX:is,prefixCls:ft,getComponent:fo,scrollbarSize:ha,direction:$n,fixedInfoList:Eh,isSticky:Ii,supportSticky:cs,componentWidth:jo,fixHeader:Ca,fixColumn:zo,horizonScroll:Yo,tableLayout:bo,rowClassName:si,expandedRowClassName:ss.expandedRowClassName,expandIcon:Ms,expandableType:zs,expandRowByClick:ss.expandRowByClick,expandedRowRender:ss.expandedRowRender,onTriggerExpand:qi,expandIconColumnIndex:ss.expandIconColumnIndex,indentSize:ss.indentSize,allColumnsFixedLeft:eo.every(function(po){return po.fixed==="left"}),emptyNode:ih,columns:hs,flattenColumns:eo,onColumnResize:ps,hoverStartRow:Vs,hoverEndRow:Aa,onHover:oa,rowExpandable:ss.rowExpandable,onRow:Mr,getRowKey:uo,expandedKeys:us,childrenColumnName:ui,rowHoverable:Dr}},[is,ft,fo,ha,$n,Eh,Ii,cs,jo,Ca,zo,Yo,bo,si,ss.expandedRowClassName,Ms,zs,ss.expandRowByClick,ss.expandedRowRender,qi,ss.expandIconColumnIndex,ss.indentSize,ih,hs,eo,ps,Vs,Aa,oa,ss.rowExpandable,Mr,uo,us,ui,Dr]);return xe.createElement(ve.Provider,{value:Xl},Cl)}var er=xe.forwardRef(ei);function Sr(an){return re(er,an)}var Tr=Sr();Tr.EXPAND_COLUMN=Le.w,Tr.INTERNAL_HOOKS=Le.R,Tr.Column=oi,Tr.ColumnGroup=zn,Tr.Summary=it;var nn=Tr,Mi=Ie(6790),tr=ye(null),vi=ye(null);function or(an,Nn,on){var ft=Nn||1;return on[an+ft]-(on[an]||0)}function Vi(an){var Nn=an.rowInfo,on=an.column,ft=an.colIndex,Zn=an.indent,si=an.index,Ei=an.component,yi=an.renderIndex,di=an.record,An=an.style,Xn=an.className,$n=an.inverse,Un=an.getHeight,Qn=on.render,Vn=on.dataIndex,ni=on.className,ci=on.width,wn=we(vi,["columnsOffset"]),zi=wn.columnsOffset,Gi=mn(Nn,on,ft,Zn,si),Mr=Gi.key,Ji=Gi.fixedInfo,Zr=Gi.appendCellNode,jr=Gi.additionalCellProps,$r=jr.style,Vr=jr.colSpan,co=Vr===void 0?1:Vr,ko=jr.rowSpan,sn=ko===void 0?1:ko,Jr=ft-1,Dr=or(Jr,co,zi),ur=co>1?ci-Dr:0,Ui=(0,Ze.Z)((0,Ze.Z)((0,Ze.Z)({},$r),An),{},{flex:"0 0 ".concat(Dr,"px"),width:"".concat(Dr,"px"),marginRight:ur,pointerEvents:"auto"}),Hr=xe.useMemo(function(){return $n?sn<=1:co===0||sn===0||sn>1},[sn,co,$n]);Hr?Ui.visibility="hidden":$n&&(Ui.height=Un==null?void 0:Un(sn));var fo=Hr?function(){return null}:Qn,uo={};return(sn===0||co===0)&&(uo.rowSpan=1,uo.colSpan=1),xe.createElement(Qt,(0,pe.Z)({className:mt()(ni,Xn),ellipsis:on.ellipsis,align:on.align,scope:on.rowScope,component:Ei,prefixCls:Nn.prefixCls,key:Mr,record:di,index:si,renderIndex:yi,dataIndex:Vn,render:fo,shouldCellUpdate:on.shouldCellUpdate},Ji,{appendNode:Zr,additionalProps:(0,Ze.Z)((0,Ze.Z)({},jr),{},{style:Ui},uo)}))}var yr=Vi,fr=["data","index","className","rowKey","style","extra","getHeight"],_r=xe.forwardRef(function(an,Nn){var on=an.data,ft=an.index,Zn=an.className,si=an.rowKey,Ei=an.style,yi=an.extra,di=an.getHeight,An=(0,Be.Z)(an,fr),Xn=on.record,$n=on.indent,Un=on.index,Qn=we(ve,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Vn=Qn.scrollX,ni=Qn.flattenColumns,ci=Qn.prefixCls,wn=Qn.fixColumn,zi=Qn.componentWidth,Gi=we(tr,["getComponent"]),Mr=Gi.getComponent,Ji=Gt(Xn,si,ft,$n),Zr=Mr(["body","row"],"div"),jr=Mr(["body","cell"],"div"),$r=Ji.rowSupportExpand,Vr=Ji.expanded,co=Ji.rowProps,ko=Ji.expandedRowRender,sn=Ji.expandedRowClassName,Jr;if($r&&Vr){var Dr=ko(Xn,ft,$n+1,Vr),ur=Jn(sn,Xn,ft,$n),Ui={};wn&&(Ui={style:(0,qe.Z)({},"--virtual-width","".concat(zi,"px"))});var Hr="".concat(ci,"-expanded-row-cell");Jr=xe.createElement(Zr,{className:mt()("".concat(ci,"-expanded-row"),"".concat(ci,"-expanded-row-level-").concat($n+1),ur)},xe.createElement(Qt,{component:jr,prefixCls:ci,className:mt()(Hr,(0,qe.Z)({},"".concat(Hr,"-fixed"),wn)),additionalProps:Ui},Dr))}var fo=(0,Ze.Z)((0,Ze.Z)({},Ei),{},{width:Vn});yi&&(fo.position="absolute",fo.pointerEvents="none");var uo=xe.createElement(Zr,(0,pe.Z)({},co,An,{"data-row-key":si,ref:$r?null:Nn,className:mt()(Zn,"".concat(ci,"-row"),co==null?void 0:co.className,(0,qe.Z)({},"".concat(ci,"-row-extra"),yi)),style:(0,Ze.Z)((0,Ze.Z)({},fo),co==null?void 0:co.style)}),ni.map(function(br,qr){return xe.createElement(yr,{key:qr,component:jr,rowInfo:Ji,column:br,colIndex:qr,indent:$n,index:ft,renderIndex:Un,record:Xn,inverse:yi,getHeight:di})}));return $r?xe.createElement("div",{ref:Nn},uo,Jr):uo}),Yr=ae(_r),Ln=Yr,oo=xe.forwardRef(function(an,Nn){var on=an.data,ft=an.onScroll,Zn=we(ve,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),si=Zn.flattenColumns,Ei=Zn.onColumnResize,yi=Zn.getRowKey,di=Zn.expandedKeys,An=Zn.prefixCls,Xn=Zn.childrenColumnName,$n=Zn.scrollX,Un=Zn.direction,Qn=we(tr),Vn=Qn.sticky,ni=Qn.scrollY,ci=Qn.listItemHeight,wn=Qn.getComponent,zi=Qn.onScroll,Gi=xe.useRef(),Mr=en(on,Xn,di,yi),Ji=xe.useMemo(function(){var Jr=0;return si.map(function(Dr){var ur=Dr.width,Ui=Dr.key;return Jr+=ur,[Ui,ur,Jr]})},[si]),Zr=xe.useMemo(function(){return Ji.map(function(Jr){return Jr[2]})},[Ji]);xe.useEffect(function(){Ji.forEach(function(Jr){var Dr=(0,Se.Z)(Jr,2),ur=Dr[0],Ui=Dr[1];Ei(ur,Ui)})},[Ji]),xe.useImperativeHandle(Nn,function(){var Jr,Dr={scrollTo:function(Ui){var Hr;(Hr=Gi.current)===null||Hr===void 0||Hr.scrollTo(Ui)},nativeElement:(Jr=Gi.current)===null||Jr===void 0?void 0:Jr.nativeElement};return Object.defineProperty(Dr,"scrollLeft",{get:function(){var Ui;return((Ui=Gi.current)===null||Ui===void 0?void 0:Ui.getScrollInfo().x)||0},set:function(Ui){var Hr;(Hr=Gi.current)===null||Hr===void 0||Hr.scrollTo({left:Ui})}}),Dr});var jr=function(Dr,ur){var Ui,Hr=(Ui=Mr[ur])===null||Ui===void 0?void 0:Ui.record,fo=Dr.onCell;if(fo){var uo,br=fo(Hr,ur);return(uo=br==null?void 0:br.rowSpan)!==null&&uo!==void 0?uo:1}return 1},$r=function(Dr){var ur=Dr.start,Ui=Dr.end,Hr=Dr.getSize,fo=Dr.offsetY;if(Ui<0)return null;for(var uo=si.filter(function(Ms){return jr(Ms,ur)===0}),br=ur,qr=function(ui){if(uo=uo.filter(function(qi){return jr(qi,ui)===0}),!uo.length)return br=ui,1},Ss=ur;Ss>=0&&!qr(Ss);Ss-=1);for(var Vs=si.filter(function(Ms){return jr(Ms,Ui)!==1}),Aa=Ui,oa=function(ui){if(Vs=Vs.filter(function(qi){return jr(qi,ui)!==1}),!Vs.length)return Aa=Math.max(ui-1,Ui),1},nr=Ui;nr<Mr.length&&!oa(nr);nr+=1);for(var ns=[],ss=function(ui){var qi=Mr[ui];if(!qi)return 1;si.some(function(xr){return jr(xr,ui)>1})&&ns.push(ui)},zs=br;zs<=Aa;zs+=1)ss(zs);var us=ns.map(function(Ms){var ui=Mr[Ms],qi=yi(ui.record,Ms),xr=function(jo){var $i=Ms+jo-1,pa=yi(Mr[$i].record,$i),fs=Hr(qi,pa);return fs.bottom-fs.top},Br=Hr(qi);return xe.createElement(Ln,{key:Ms,data:ui,rowKey:qi,index:Ms,style:{top:-fo+Br.top},extra:!0,getHeight:xr})});return us},Vr=xe.useMemo(function(){return{columnsOffset:Zr}},[Zr]),co="".concat(An,"-tbody"),ko=wn(["body","wrapper"]),sn={};return Vn&&(sn.position="sticky",sn.bottom=0,(0,Oe.Z)(Vn)==="object"&&Vn.offsetScroll&&(sn.bottom=Vn.offsetScroll)),xe.createElement(vi.Provider,{value:Vr},xe.createElement(Mi.Z,{fullHeight:!1,ref:Gi,prefixCls:"".concat(co,"-virtual"),styles:{horizontalScrollBar:sn},className:co,height:ni,itemHeight:ci||24,data:Mr,itemKey:function(Dr){return yi(Dr.record)},component:ko,scrollWidth:$n,direction:Un,onVirtualScroll:function(Dr){var ur,Ui=Dr.x;ft({currentTarget:(ur=Gi.current)===null||ur===void 0?void 0:ur.nativeElement,scrollLeft:Ui})},onScroll:zi,extraRender:$r},function(Jr,Dr,ur){var Ui=yi(Jr.record,Dr);return xe.createElement(Ln,{data:Jr,rowKey:Ui,index:Dr,style:ur.style})}))}),kn=ae(oo),Di=kn,Lr=function(Nn,on){var ft=on.ref,Zn=on.onScroll;return xe.createElement(Di,{ref:ft,data:Nn,onScroll:Zn})};function sr(an,Nn){var on=an.data,ft=an.columns,Zn=an.scroll,si=an.sticky,Ei=an.prefixCls,yi=Ei===void 0?Mn:Ei,di=an.className,An=an.listItemHeight,Xn=an.components,$n=an.onScroll,Un=Zn||{},Qn=Un.x,Vn=Un.y;typeof Qn!="number"&&(Qn=1),typeof Vn!="number"&&(Vn=500);var ni=(0,dn.zX)(function(zi,Gi){return(0,Mt.Z)(Xn,zi)||Gi}),ci=(0,dn.zX)($n),wn=xe.useMemo(function(){return{sticky:si,scrollY:Vn,listItemHeight:An,getComponent:ni,onScroll:ci}},[si,Vn,An,ni,ci]);return xe.createElement(tr.Provider,{value:wn},xe.createElement(nn,(0,pe.Z)({},an,{className:mt()(di,"".concat(yi,"-virtual")),scroll:(0,Ze.Z)((0,Ze.Z)({},Zn),{},{x:Qn}),components:(0,Ze.Z)((0,Ze.Z)({},Xn),{},{body:on!=null&&on.length?Lr:void 0}),columns:ft,internalHooks:Le.R,tailor:!0,ref:Nn})))}var so=xe.forwardRef(sr);function Er(an){return re(so,an)}var mr=Er(),_o=null},54451:function(xn,ln,Ie){"use strict";Ie.d(ln,{g:function(){return xe},v:function(){return Ce}});var Le=Ie(98506),Se=Ie(33346),je=Ie(48736),Me=["expandable"],Ce="RC_TABLE_INTERNAL_COL_DEFINE";function xe(be){var ye=be.expandable,we=(0,Se.Z)(be,Me),pe;return"expandable"in be?pe=(0,Le.Z)((0,Le.Z)({},we),ye):pe=we,pe.showExpandColumn===!1&&(pe.expandIconColumnIndex=-1),pe}},22711:function(xn,ln,Ie){"use strict";Ie.r(ln),Ie.d(ln,{ResizableTextArea:function(){return Xe},default:function(){return at}});var Le=Ie(67711),Se=Ie(52873),je=Ie(98506),Me=Ie(15142),Ce=Ie(16886),xe=Ie(33346),be=Ie(92310),ye=Ie.n(be),we=Ie(36901),pe=Ie(66003),de=Ie(30292),ge=Ie(18929),fe=Ie(59301),ue=Ie(26420),ee=Ie(29301),z=Ie(34280),oe=Ie(16089),re=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important;
|
|
|
pointer-events: none !important;
|
|
|
`,ae=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],le={},me;function ve(_t){var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Rt=_t.getAttribute("id")||_t.getAttribute("data-reactid")||_t.getAttribute("name");if(dt&&le[Rt])return le[Rt];var ut=window.getComputedStyle(_t),rt=ut.getPropertyValue("box-sizing")||ut.getPropertyValue("-moz-box-sizing")||ut.getPropertyValue("-webkit-box-sizing"),ct=parseFloat(ut.getPropertyValue("padding-bottom"))+parseFloat(ut.getPropertyValue("padding-top")),yt=parseFloat(ut.getPropertyValue("border-bottom-width"))+parseFloat(ut.getPropertyValue("border-top-width")),wt=ae.map(function(Ut){return"".concat(Ut,":").concat(ut.getPropertyValue(Ut))}).join(";"),xt={sizingStyle:wt,paddingSize:ct,borderSize:yt,boxSizing:rt};return dt&&Rt&&(le[Rt]=xt),xt}function Pe(_t){var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ut=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;me||(me=document.createElement("textarea"),me.setAttribute("tab-index","-1"),me.setAttribute("aria-hidden","true"),me.setAttribute("name","hiddenTextarea"),document.body.appendChild(me)),_t.getAttribute("wrap")?me.setAttribute("wrap",_t.getAttribute("wrap")):me.removeAttribute("wrap");var rt=ve(_t,dt),ct=rt.paddingSize,yt=rt.borderSize,wt=rt.boxSizing,xt=rt.sizingStyle;me.setAttribute("style","".concat(xt,";").concat(re)),me.value=_t.value||_t.placeholder||"";var Ut=void 0,zt=void 0,dn,Ft=me.scrollHeight;if(wt==="border-box"?Ft+=yt:wt==="content-box"&&(Ft-=ct),Rt!==null||ut!==null){me.value=" ";var Dt=me.scrollHeight-ct;Rt!==null&&(Ut=Dt*Rt,wt==="border-box"&&(Ut=Ut+ct+yt),Ft=Math.max(Ut,Ft)),ut!==null&&(zt=Dt*ut,wt==="border-box"&&(zt=zt+ct+yt),dn=Ft>zt?"":"hidden",Ft=Math.min(zt,Ft))}var Qt={height:Ft,overflowY:dn,resize:"none"};return Ut&&(Qt.minHeight=Ut),zt&&(Qt.maxHeight=zt),Qt}var Ae=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],De=0,Oe=1,Ze=2,qe=fe.forwardRef(function(_t,dt){var Rt=_t,ut=Rt.prefixCls,rt=Rt.defaultValue,ct=Rt.value,yt=Rt.autoSize,wt=Rt.onResize,xt=Rt.className,Ut=Rt.style,zt=Rt.disabled,dn=Rt.onChange,Ft=Rt.onInternalAutoSize,Dt=(0,xe.Z)(Rt,Ae),Qt=(0,ge.Z)(rt,{value:ct,postState:function(ri){return ri!=null?ri:""}}),Yt=(0,Ce.Z)(Qt,2),Jt=Yt[0],lt=Yt[1],Ue=function(ri){lt(ri.target.value),dn==null||dn(ri)},Be=fe.useRef();fe.useImperativeHandle(dt,function(){return{textArea:Be.current}});var tt=fe.useMemo(function(){return yt&&(0,ue.Z)(yt)==="object"?[yt.minRows,yt.maxRows]:[]},[yt]),ht=(0,Ce.Z)(tt,2),et=ht[0],Ve=ht[1],Re=!!yt,ze=function(){try{if(document.activeElement===Be.current){var ri=Be.current,bi=ri.selectionStart,jn=ri.selectionEnd,ki=ri.scrollTop;Be.current.setSelectionRange(bi,jn),Be.current.scrollTop=ki}}catch(Hi){}},it=fe.useState(Ze),Ke=(0,Ce.Z)(it,2),We=Ke[0],vt=Ke[1],kt=fe.useState(),hn=(0,Ce.Z)(kt,2),en=hn[0],Gt=hn[1],gn=function(){vt(De)};(0,z.Z)(function(){Re&&gn()},[ct,et,Ve,Re]),(0,z.Z)(function(){if(We===De)vt(Oe);else if(We===Oe){var Yn=Pe(Be.current,!1,et,Ve);vt(Ze),Gt(Yn)}else ze()},[We]);var bn=fe.useRef(),yn=function(){oe.Z.cancel(bn.current)},un=function(ri){We===Ze&&(wt==null||wt(ri),yt&&(yn(),bn.current=(0,oe.Z)(function(){gn()})))};fe.useEffect(function(){return yn},[]);var Jn=Re?en:null,mn=(0,je.Z)((0,je.Z)({},Ut),Jn);return(We===De||We===Oe)&&(mn.overflowY="hidden",mn.overflowX="hidden"),fe.createElement(ee.Z,{onResize:un,disabled:!(yt||wt)},fe.createElement("textarea",(0,Le.Z)({},Dt,{ref:Be,style:mn,className:ye()(ut,xt,(0,Se.Z)({},"".concat(ut,"-disabled"),zt)),disabled:zt,value:Jt,onChange:Ue})))}),Xe=qe,mt=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],pt=fe.forwardRef(function(_t,dt){var Rt,ut=_t.defaultValue,rt=_t.value,ct=_t.onFocus,yt=_t.onBlur,wt=_t.onChange,xt=_t.allowClear,Ut=_t.maxLength,zt=_t.onCompositionStart,dn=_t.onCompositionEnd,Ft=_t.suffix,Dt=_t.prefixCls,Qt=Dt===void 0?"rc-textarea":Dt,Yt=_t.showCount,Jt=_t.count,lt=_t.className,Ue=_t.style,Be=_t.disabled,tt=_t.hidden,ht=_t.classNames,et=_t.styles,Ve=_t.onResize,Re=_t.onClear,ze=_t.onPressEnter,it=_t.readOnly,Ke=_t.autoSize,We=_t.onKeyDown,vt=(0,xe.Z)(_t,mt),kt=(0,ge.Z)(ut,{value:rt,defaultValue:ut}),hn=(0,Ce.Z)(kt,2),en=hn[0],Gt=hn[1],gn=en==null?"":String(en),bn=fe.useState(!1),yn=(0,Ce.Z)(bn,2),un=yn[0],Jn=yn[1],mn=fe.useRef(!1),Yn=fe.useState(null),ri=(0,Ce.Z)(Yn,2),bi=ri[0],jn=ri[1],ki=(0,fe.useRef)(null),Hi=(0,fe.useRef)(null),Fi=function(){var On;return(On=Hi.current)===null||On===void 0?void 0:On.textArea},rr=function(){Fi().focus()};(0,fe.useImperativeHandle)(dt,function(){var cn;return{resizableTextArea:Hi.current,focus:rr,blur:function(){Fi().blur()},nativeElement:((cn=ki.current)===null||cn===void 0?void 0:cn.nativeElement)||Fi()}}),(0,fe.useEffect)(function(){Jn(function(cn){return!Be&&cn})},[Be]);var Cr=fe.useState(null),gr=(0,Ce.Z)(Cr,2),Ni=gr[0],Ti=gr[1];fe.useEffect(function(){if(Ni){var cn;(cn=Fi()).setSelectionRange.apply(cn,(0,Me.Z)(Ni))}},[Ni]);var cr=(0,pe.Z)(Jt,Yt),$e=(Rt=cr.max)!==null&&Rt!==void 0?Rt:Ut,Li=Number($e)>0,ti=cr.strategy(gn),Oi=!!$e&&ti>$e,pr=function(On,pi){var Fn=pi;!mn.current&&cr.exceedFormatter&&cr.max&&cr.strategy(pi)>cr.max&&(Fn=cr.exceedFormatter(pi,{max:cr.max}),pi!==Fn&&Ti([Fi().selectionStart||0,Fi().selectionEnd||0])),Gt(Fn),(0,de.rJ)(On.currentTarget,On,wt,Fn)},dr=function(On){mn.current=!0,zt==null||zt(On)},Qi=function(On){mn.current=!1,pr(On,On.currentTarget.value),dn==null||dn(On)},So=function(On){pr(On,On.target.value)},$t=function(On){On.key==="Enter"&&ze&&ze(On),We==null||We(On)},Ge=function(On){Jn(!0),ct==null||ct(On)},Je=function(On){Jn(!1),yt==null||yt(On)},ot=function(On){Gt(""),rr(),(0,de.rJ)(Fi(),On,wt)},Et=Ft,Nt;cr.show&&(cr.showFormatter?Nt=cr.showFormatter({value:gn,count:ti,maxLength:$e}):Nt="".concat(ti).concat(Li?" / ".concat($e):""),Et=fe.createElement(fe.Fragment,null,Et,fe.createElement("span",{className:ye()("".concat(Qt,"-data-count"),ht==null?void 0:ht.count),style:et==null?void 0:et.count},Nt)));var pn=function(On){var pi;Ve==null||Ve(On),(pi=Fi())!==null&&pi!==void 0&&pi.style.height&&jn(!0)},jt=!Ke&&!Yt&&!xt;return fe.createElement(we.BaseInput,{ref:ki,value:gn,allowClear:xt,handleReset:ot,suffix:Et,prefixCls:Qt,classNames:(0,je.Z)((0,je.Z)({},ht),{},{affixWrapper:ye()(ht==null?void 0:ht.affixWrapper,(0,Se.Z)((0,Se.Z)({},"".concat(Qt,"-show-count"),Yt),"".concat(Qt,"-textarea-allow-clear"),xt))}),disabled:Be,focused:un,className:ye()(lt,Oi&&"".concat(Qt,"-out-of-range")),style:(0,je.Z)((0,je.Z)({},Ue),bi&&!jt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Nt=="string"?Nt:void 0}},hidden:tt,readOnly:it,onClear:Re},fe.createElement(Xe,(0,Le.Z)({},vt,{autoSize:Ke,maxLength:Ut,onKeyDown:$t,onChange:So,onFocus:Ge,onBlur:Je,onCompositionStart:dr,onCompositionEnd:Qi,className:ye()(ht==null?void 0:ht.textarea),style:(0,je.Z)((0,je.Z)({},et==null?void 0:et.textarea),{},{resize:Ue==null?void 0:Ue.resize}),disabled:Be,prefixCls:Qt,onResize:pn,ref:Hi,readOnly:it})))}),Mt=pt,at=Mt},639:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return le}});var Le=Ie(67711),Se=Ie(52873),je=Ie(98506),Me=Ie(16886),Ce=Ie(33346),xe=Ie(59301),be=Ie(92310),ye=Ie.n(be),we=Ie(26112),pe=Ie(30699),de=function(ve){for(var Pe=ve.prefixCls,Ae=ve.level,De=ve.isStart,Oe=ve.isEnd,Ze="".concat(Pe,"-indent-unit"),qe=[],Xe=0;Xe<Ae;Xe+=1)qe.push(xe.createElement("span",{key:Xe,className:ye()(Ze,(0,Se.Z)((0,Se.Z)({},"".concat(Ze,"-start"),De[Xe]),"".concat(Ze,"-end"),Oe[Xe]))}));return xe.createElement("span",{"aria-hidden":"true",className:"".concat(Pe,"-indent")},qe)},ge=xe.memo(de),fe=Ie(65065),ue=Ie(34061),ee=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],z="open",oe="close",re="---",ae=function(ve){var Pe,Ae,De,Oe=ve.eventKey,Ze=ve.className,qe=ve.style,Xe=ve.dragOver,mt=ve.dragOverGapTop,pt=ve.dragOverGapBottom,Mt=ve.isLeaf,at=ve.isStart,_t=ve.isEnd,dt=ve.expanded,Rt=ve.selected,ut=ve.checked,rt=ve.halfChecked,ct=ve.loading,yt=ve.domRef,wt=ve.active,xt=ve.data,Ut=ve.onMouseMove,zt=ve.selectable,dn=(0,Ce.Z)(ve,ee),Ft=xe.useContext(pe.k),Dt=xe.useContext(pe.y),Qt=xe.useRef(null),Yt=xe.useState(!1),Jt=(0,Me.Z)(Yt,2),lt=Jt[0],Ue=Jt[1],Be=!!(Ft.disabled||ve.disabled||(Pe=Dt.nodeDisabled)!==null&&Pe!==void 0&&Pe.call(Dt,xt)),tt=xe.useMemo(function(){return!Ft.checkable||ve.checkable===!1?!1:Ft.checkable},[Ft.checkable,ve.checkable]),ht=function(ti){Be||Ft.onNodeSelect(ti,(0,ue.F)(ve))},et=function(ti){Be||!tt||ve.disableCheckbox||Ft.onNodeCheck(ti,(0,ue.F)(ve),!ut)},Ve=xe.useMemo(function(){return typeof zt=="boolean"?zt:Ft.selectable},[zt,Ft.selectable]),Re=function(ti){Ft.onNodeClick(ti,(0,ue.F)(ve)),Ve?ht(ti):et(ti)},ze=function(ti){Ft.onNodeDoubleClick(ti,(0,ue.F)(ve))},it=function(ti){Ft.onNodeMouseEnter(ti,(0,ue.F)(ve))},Ke=function(ti){Ft.onNodeMouseLeave(ti,(0,ue.F)(ve))},We=function(ti){Ft.onNodeContextMenu(ti,(0,ue.F)(ve))},vt=xe.useMemo(function(){return!!(Ft.draggable&&(!Ft.draggable.nodeDraggable||Ft.draggable.nodeDraggable(xt)))},[Ft.draggable,xt]),kt=function(ti){ti.stopPropagation(),Ue(!0),Ft.onNodeDragStart(ti,ve);try{ti.dataTransfer.setData("text/plain","")}catch(Oi){}},hn=function(ti){ti.preventDefault(),ti.stopPropagation(),Ft.onNodeDragEnter(ti,ve)},en=function(ti){ti.preventDefault(),ti.stopPropagation(),Ft.onNodeDragOver(ti,ve)},Gt=function(ti){ti.stopPropagation(),Ft.onNodeDragLeave(ti,ve)},gn=function(ti){ti.stopPropagation(),Ue(!1),Ft.onNodeDragEnd(ti,ve)},bn=function(ti){ti.preventDefault(),ti.stopPropagation(),Ue(!1),Ft.onNodeDrop(ti,ve)},yn=function(ti){ct||Ft.onNodeExpand(ti,(0,ue.F)(ve))},un=xe.useMemo(function(){var Li=(0,fe.Z)(Ft.keyEntities,Oe)||{},ti=Li.children;return!!(ti||[]).length},[Ft.keyEntities,Oe]),Jn=xe.useMemo(function(){return Mt===!1?!1:Mt||!Ft.loadData&&!un||Ft.loadData&&ve.loaded&&!un},[Mt,Ft.loadData,un,ve.loaded]);xe.useEffect(function(){ct||typeof Ft.loadData=="function"&&dt&&!Jn&&!ve.loaded&&Ft.onNodeLoad((0,ue.F)(ve))},[ct,Ft.loadData,Ft.onNodeLoad,dt,Jn,ve]);var mn=xe.useMemo(function(){var Li;return(Li=Ft.draggable)!==null&&Li!==void 0&&Li.icon?xe.createElement("span",{className:"".concat(Ft.prefixCls,"-draggable-icon")},Ft.draggable.icon):null},[Ft.draggable]),Yn=function(ti){var Oi=ve.switcherIcon||Ft.switcherIcon;return typeof Oi=="function"?Oi((0,je.Z)((0,je.Z)({},ve),{},{isLeaf:ti})):Oi},ri=function(){if(Jn){var ti=Yn(!0);return ti!==!1?xe.createElement("span",{className:ye()("".concat(Ft.prefixCls,"-switcher"),"".concat(Ft.prefixCls,"-switcher-noop"))},ti):null}var Oi=Yn(!1);return Oi!==!1?xe.createElement("span",{onClick:yn,className:ye()("".concat(Ft.prefixCls,"-switcher"),"".concat(Ft.prefixCls,"-switcher_").concat(dt?z:oe))},Oi):null},bi=xe.useMemo(function(){if(!tt)return null;var Li=typeof tt!="boolean"?tt:null;return xe.createElement("span",{className:ye()("".concat(Ft.prefixCls,"-checkbox"),(0,Se.Z)((0,Se.Z)((0,Se.Z)({},"".concat(Ft.prefixCls,"-checkbox-checked"),ut),"".concat(Ft.prefixCls,"-checkbox-indeterminate"),!ut&&rt),"".concat(Ft.prefixCls,"-checkbox-disabled"),Be||ve.disableCheckbox)),onClick:et,role:"checkbox","aria-checked":rt?"mixed":ut,"aria-disabled":Be||ve.disableCheckbox,"aria-label":"Select ".concat(typeof ve.title=="string"?ve.title:"tree node")},Li)},[tt,ut,rt,Be,ve.disableCheckbox,ve.title]),jn=xe.useMemo(function(){return Jn?null:dt?z:oe},[Jn,dt]),ki=xe.useMemo(function(){return xe.createElement("span",{className:ye()("".concat(Ft.prefixCls,"-iconEle"),"".concat(Ft.prefixCls,"-icon__").concat(jn||"docu"),(0,Se.Z)({},"".concat(Ft.prefixCls,"-icon_loading"),ct))})},[Ft.prefixCls,jn,ct]),Hi=xe.useMemo(function(){var Li=!!Ft.draggable,ti=!ve.disabled&&Li&&Ft.dragOverNodeKey===Oe;return ti?Ft.dropIndicatorRender({dropPosition:Ft.dropPosition,dropLevelOffset:Ft.dropLevelOffset,indent:Ft.indent,prefixCls:Ft.prefixCls,direction:Ft.direction}):null},[Ft.dropPosition,Ft.dropLevelOffset,Ft.indent,Ft.prefixCls,Ft.direction,Ft.draggable,Ft.dragOverNodeKey,Ft.dropIndicatorRender]),Fi=xe.useMemo(function(){var Li=ve.title,ti=Li===void 0?re:Li,Oi="".concat(Ft.prefixCls,"-node-content-wrapper"),pr;if(Ft.showIcon){var dr=ve.icon||Ft.icon;pr=dr?xe.createElement("span",{className:ye()("".concat(Ft.prefixCls,"-iconEle"),"".concat(Ft.prefixCls,"-icon__customize"))},typeof dr=="function"?dr(ve):dr):ki}else Ft.loadData&&ct&&(pr=ki);var Qi;return typeof ti=="function"?Qi=ti(xt):Ft.titleRender?Qi=Ft.titleRender(xt):Qi=ti,xe.createElement("span",{ref:Qt,title:typeof ti=="string"?ti:"",className:ye()(Oi,"".concat(Oi,"-").concat(jn||"normal"),(0,Se.Z)({},"".concat(Ft.prefixCls,"-node-selected"),!Be&&(Rt||lt))),onMouseEnter:it,onMouseLeave:Ke,onContextMenu:We,onClick:Re,onDoubleClick:ze},pr,xe.createElement("span",{className:"".concat(Ft.prefixCls,"-title")},Qi),Hi)},[Ft.prefixCls,Ft.showIcon,ve,Ft.icon,ki,Ft.titleRender,xt,jn,it,Ke,We,Re,ze]),rr=(0,we.Z)(dn,{aria:!0,data:!0}),Cr=(0,fe.Z)(Ft.keyEntities,Oe)||{},gr=Cr.level,Ni=_t[_t.length-1],Ti=!Be&&vt,cr=Ft.draggingNodeKey===Oe,$e=zt!==void 0?{"aria-selected":!!zt}:void 0;return xe.createElement("div",(0,Le.Z)({ref:yt,role:"treeitem","aria-expanded":Mt?void 0:dt,className:ye()(Ze,"".concat(Ft.prefixCls,"-treenode"),(De={},(0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)(De,"".concat(Ft.prefixCls,"-treenode-disabled"),Be),"".concat(Ft.prefixCls,"-treenode-switcher-").concat(dt?"open":"close"),!Mt),"".concat(Ft.prefixCls,"-treenode-checkbox-checked"),ut),"".concat(Ft.prefixCls,"-treenode-checkbox-indeterminate"),rt),"".concat(Ft.prefixCls,"-treenode-selected"),Rt),"".concat(Ft.prefixCls,"-treenode-loading"),ct),"".concat(Ft.prefixCls,"-treenode-active"),wt),"".concat(Ft.prefixCls,"-treenode-leaf-last"),Ni),"".concat(Ft.prefixCls,"-treenode-draggable"),vt),"dragging",cr),(0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)(De,"drop-target",Ft.dropTargetKey===Oe),"drop-container",Ft.dropContainerKey===Oe),"drag-over",!Be&&Xe),"drag-over-gap-top",!Be&&mt),"drag-over-gap-bottom",!Be&&pt),"filter-node",(Ae=Ft.filterTreeNode)===null||Ae===void 0?void 0:Ae.call(Ft,(0,ue.F)(ve))),"".concat(Ft.prefixCls,"-treenode-leaf"),Jn))),style:qe,draggable:Ti,onDragStart:Ti?kt:void 0,onDragEnter:vt?hn:void 0,onDragOver:vt?en:void 0,onDragLeave:vt?Gt:void 0,onDrop:vt?bn:void 0,onDragEnd:vt?gn:void 0,onMouseMove:Ut},$e,rr),xe.createElement(ge,{prefixCls:Ft.prefixCls,level:gr,isStart:at,isEnd:_t}),mn,ri(),bi,Fi)};ae.isTreeNode=1;var le=ae},30699:function(xn,ln,Ie){"use strict";Ie.d(ln,{k:function(){return Se},y:function(){return je}});var Le=Ie(59301),Se=Le.createContext(null),je=Le.createContext({})},71598:function(xn,ln,Ie){"use strict";Ie.d(ln,{OF:function(){return Oe.Z},y6:function(){return oe.y},ZP:function(){return Be}});var Le=Ie(67711),Se=Ie(26420),je=Ie(98506),Me=Ie(15142),Ce=Ie(42573),xe=Ie(58698),be=Ie(62437),ye=Ie(74700),we=Ie(45080),pe=Ie(52873),de=Ie(92310),ge=Ie.n(de),fe=Ie(10228),ue=Ie(26112),ee=Ie(48736),z=Ie(59301),oe=Ie(30699),re=function(ht){var et=ht.dropPosition,Ve=ht.dropLevelOffset,Re=ht.indent,ze={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(et){case-1:ze.top=0,ze.left=-Ve*Re;break;case 1:ze.bottom=0,ze.left=-Ve*Re;break;case 0:ze.bottom=0,ze.left=Re;break}return z.createElement("div",{style:ze})},ae=re;function le(tt){if(tt==null)throw new TypeError("Cannot destructure "+tt)}var me=Ie(16886),ve=Ie(33346),Pe=Ie(34280),Ae=Ie(6790),De=Ie(77900),Oe=Ie(639);function Ze(tt,ht){var et=z.useState(!1),Ve=(0,me.Z)(et,2),Re=Ve[0],ze=Ve[1];(0,Pe.Z)(function(){if(Re)return tt(),function(){ht()}},[Re]),(0,Pe.Z)(function(){return ze(!0),function(){ze(!1)}},[])}var qe=Ze,Xe=Ie(34061),mt=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],pt=z.forwardRef(function(tt,ht){var et=tt.className,Ve=tt.style,Re=tt.motion,ze=tt.motionNodes,it=tt.motionType,Ke=tt.onMotionStart,We=tt.onMotionEnd,vt=tt.active,kt=tt.treeNodeRequiredProps,hn=(0,ve.Z)(tt,mt),en=z.useState(!0),Gt=(0,me.Z)(en,2),gn=Gt[0],bn=Gt[1],yn=z.useContext(oe.k),un=yn.prefixCls,Jn=ze&&it!=="hide";(0,Pe.Z)(function(){ze&&Jn!==gn&&bn(Jn)},[ze]);var mn=function(){ze&&Ke()},Yn=z.useRef(!1),ri=function(){ze&&!Yn.current&&(Yn.current=!0,We())};qe(mn,ri);var bi=function(ki){Jn===ki&&ri()};return ze?z.createElement(De.default,(0,Le.Z)({ref:ht,visible:gn},Re,{motionAppear:it==="show",onVisibleChanged:bi}),function(jn,ki){var Hi=jn.className,Fi=jn.style;return z.createElement("div",{ref:ki,className:ge()("".concat(un,"-treenode-motion"),Hi),style:Fi},ze.map(function(rr){var Cr=Object.assign({},(le(rr.data),rr.data)),gr=rr.title,Ni=rr.key,Ti=rr.isStart,cr=rr.isEnd;delete Cr.children;var $e=(0,Xe.H8)(Ni,kt);return z.createElement(Oe.Z,(0,Le.Z)({},Cr,$e,{title:gr,active:vt,data:rr.data,key:Ni,isStart:Ti,isEnd:cr}))}))}):z.createElement(Oe.Z,(0,Le.Z)({domRef:ht,className:et,style:Ve},hn,{active:vt}))}),Mt=pt;function at(){var tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],et=tt.length,Ve=ht.length;if(Math.abs(et-Ve)!==1)return{add:!1,key:null};function Re(ze,it){var Ke=new Map;ze.forEach(function(vt){Ke.set(vt,!0)});var We=it.filter(function(vt){return!Ke.has(vt)});return We.length===1?We[0]:null}return et<Ve?{add:!0,key:Re(tt,ht)}:{add:!1,key:Re(ht,tt)}}function _t(tt,ht,et){var Ve=tt.findIndex(function(Ke){return Ke.key===et}),Re=tt[Ve+1],ze=ht.findIndex(function(Ke){return Ke.key===et});if(Re){var it=ht.findIndex(function(Ke){return Ke.key===Re.key});return ht.slice(ze+1,it)}return ht.slice(ze+1)}var dt=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],Rt={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},ut=function(){},rt="RC_TREE_MOTION_".concat(Math.random()),ct={key:rt},yt={key:rt,level:0,index:0,pos:"0",node:ct,nodes:[ct]},wt={parent:null,children:[],pos:yt.pos,data:ct,title:null,key:rt,isStart:[],isEnd:[]};function xt(tt,ht,et,Ve){return ht===!1||!et?tt:tt.slice(0,Math.ceil(et/Ve)+1)}function Ut(tt){var ht=tt.key,et=tt.pos;return(0,Xe.km)(ht,et)}function zt(tt){for(var ht=String(tt.data.key),et=tt;et.parent;)et=et.parent,ht="".concat(et.data.key," > ").concat(ht);return ht}var dn=z.forwardRef(function(tt,ht){var et=tt.prefixCls,Ve=tt.data,Re=tt.selectable,ze=tt.checkable,it=tt.expandedKeys,Ke=tt.selectedKeys,We=tt.checkedKeys,vt=tt.loadedKeys,kt=tt.loadingKeys,hn=tt.halfCheckedKeys,en=tt.keyEntities,Gt=tt.disabled,gn=tt.dragging,bn=tt.dragOverNodeKey,yn=tt.dropPosition,un=tt.motion,Jn=tt.height,mn=tt.itemHeight,Yn=tt.virtual,ri=tt.scrollWidth,bi=tt.focusable,jn=tt.activeItem,ki=tt.focused,Hi=tt.tabIndex,Fi=tt.onKeyDown,rr=tt.onFocus,Cr=tt.onBlur,gr=tt.onActiveChange,Ni=tt.onListChangeStart,Ti=tt.onListChangeEnd,cr=(0,ve.Z)(tt,dt),$e=z.useRef(null),Li=z.useRef(null);z.useImperativeHandle(ht,function(){return{scrollTo:function(Gn){$e.current.scrollTo(Gn)},getIndentWidth:function(){return Li.current.offsetWidth}}});var ti=z.useState(it),Oi=(0,me.Z)(ti,2),pr=Oi[0],dr=Oi[1],Qi=z.useState(Ve),So=(0,me.Z)(Qi,2),$t=So[0],Ge=So[1],Je=z.useState(Ve),ot=(0,me.Z)(Je,2),Et=ot[0],Nt=ot[1],pn=z.useState([]),jt=(0,me.Z)(pn,2),cn=jt[0],On=jt[1],pi=z.useState(null),Fn=(0,me.Z)(pi,2),Lt=Fn[0],Ht=Fn[1],Pn=z.useRef(Ve);Pn.current=Ve;function Sn(){var Hn=Pn.current;Ge(Hn),Nt(Hn),On([]),Ht(null),Ti()}(0,Pe.Z)(function(){dr(it);var Hn=at(pr,it);if(Hn.key!==null)if(Hn.add){var Gn=$t.findIndex(function(mi){var En=mi.key;return En===Hn.key}),oi=xt(_t($t,Ve,Hn.key),Yn,Jn,mn),Wn=$t.slice();Wn.splice(Gn+1,0,wt),Nt(Wn),On(oi),Ht("show")}else{var zn=Ve.findIndex(function(mi){var En=mi.key;return En===Hn.key}),Mn=xt(_t(Ve,$t,Hn.key),Yn,Jn,mn),wi=Ve.slice();wi.splice(zn+1,0,wt),Nt(wi),On(Mn),Ht("hide")}else $t!==Ve&&(Ge(Ve),Nt(Ve))},[it,Ve]),z.useEffect(function(){gn||Sn()},[gn]);var Kt=un?Et:Ve,vn={expandedKeys:it,selectedKeys:Ke,loadedKeys:vt,loadingKeys:kt,checkedKeys:We,halfCheckedKeys:hn,dragOverNodeKey:bn,dropPosition:yn,keyEntities:en};return z.createElement(z.Fragment,null,ki&&jn&&z.createElement("span",{style:Rt,"aria-live":"assertive"},zt(jn)),z.createElement("div",null,z.createElement("input",{style:Rt,disabled:bi===!1||Gt,tabIndex:bi!==!1?Hi:null,onKeyDown:Fi,onFocus:rr,onBlur:Cr,value:"",onChange:ut,"aria-label":"for screen reader"})),z.createElement("div",{className:"".concat(et,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},z.createElement("div",{className:"".concat(et,"-indent")},z.createElement("div",{ref:Li,className:"".concat(et,"-indent-unit")}))),z.createElement(Ae.Z,(0,Le.Z)({},cr,{data:Kt,itemKey:Ut,height:Jn,fullHeight:!1,virtual:Yn,itemHeight:mn,scrollWidth:ri,prefixCls:"".concat(et,"-list"),ref:$e,role:"tree",onVisibleChange:function(Gn){Gn.every(function(oi){return Ut(oi)!==rt})&&Sn()}}),function(Hn){var Gn=Hn.pos,oi=Object.assign({},(le(Hn.data),Hn.data)),Wn=Hn.title,zn=Hn.key,Mn=Hn.isStart,wi=Hn.isEnd,mi=(0,Xe.km)(zn,Gn);delete oi.key,delete oi.children;var En=(0,Xe.H8)(mi,vn);return z.createElement(Mt,(0,Le.Z)({},oi,En,{title:Wn,active:!!jn&&zn===jn.key,pos:Gn,data:Hn.data,isStart:Mn,isEnd:wi,motion:un,motionNodes:zn===rt?cn:null,motionType:Lt,onMotionStart:Ni,onMotionEnd:Sn,treeNodeRequiredProps:vn,onMouseMove:function(){gr(null)}}))}))}),Ft=dn,Dt=Ie(82661),Qt=Ie(34643),Yt=Ie(65065),Jt=10,lt=function(tt){(0,ye.Z)(et,tt);var ht=(0,we.Z)(et);function et(){var Ve;(0,Ce.Z)(this,et);for(var Re=arguments.length,ze=new Array(Re),it=0;it<Re;it++)ze[it]=arguments[it];return Ve=ht.call.apply(ht,[this].concat(ze)),(0,pe.Z)((0,be.Z)(Ve),"destroyed",!1),(0,pe.Z)((0,be.Z)(Ve),"delayedDragEnterLogic",void 0),(0,pe.Z)((0,be.Z)(Ve),"loadingRetryTimes",{}),(0,pe.Z)((0,be.Z)(Ve),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,Xe.w$)()}),(0,pe.Z)((0,be.Z)(Ve),"dragStartMousePosition",null),(0,pe.Z)((0,be.Z)(Ve),"dragNodeProps",null),(0,pe.Z)((0,be.Z)(Ve),"currentMouseOverDroppableNodeKey",null),(0,pe.Z)((0,be.Z)(Ve),"listRef",z.createRef()),(0,pe.Z)((0,be.Z)(Ve),"onNodeDragStart",function(Ke,We){var vt=Ve.state,kt=vt.expandedKeys,hn=vt.keyEntities,en=Ve.props.onDragStart,Gt=We.eventKey;Ve.dragNodeProps=We,Ve.dragStartMousePosition={x:Ke.clientX,y:Ke.clientY};var gn=(0,Dt._5)(kt,Gt);Ve.setState({draggingNodeKey:Gt,dragChildrenKeys:(0,Dt.wA)(Gt,hn),indent:Ve.listRef.current.getIndentWidth()}),Ve.setExpandedKeys(gn),window.addEventListener("dragend",Ve.onWindowDragEnd),en==null||en({event:Ke,node:(0,Xe.F)(We)})}),(0,pe.Z)((0,be.Z)(Ve),"onNodeDragEnter",function(Ke,We){var vt=Ve.state,kt=vt.expandedKeys,hn=vt.keyEntities,en=vt.dragChildrenKeys,Gt=vt.flattenNodes,gn=vt.indent,bn=Ve.props,yn=bn.onDragEnter,un=bn.onExpand,Jn=bn.allowDrop,mn=bn.direction,Yn=We.pos,ri=We.eventKey;if(Ve.currentMouseOverDroppableNodeKey!==ri&&(Ve.currentMouseOverDroppableNodeKey=ri),!Ve.dragNodeProps){Ve.resetDragState();return}var bi=(0,Dt.OM)(Ke,Ve.dragNodeProps,We,gn,Ve.dragStartMousePosition,Jn,Gt,hn,kt,mn),jn=bi.dropPosition,ki=bi.dropLevelOffset,Hi=bi.dropTargetKey,Fi=bi.dropContainerKey,rr=bi.dropTargetPos,Cr=bi.dropAllowed,gr=bi.dragOverNodeKey;if(en.includes(Hi)||!Cr){Ve.resetDragState();return}if(Ve.delayedDragEnterLogic||(Ve.delayedDragEnterLogic={}),Object.keys(Ve.delayedDragEnterLogic).forEach(function(Ni){clearTimeout(Ve.delayedDragEnterLogic[Ni])}),Ve.dragNodeProps.eventKey!==We.eventKey&&(Ke.persist(),Ve.delayedDragEnterLogic[Yn]=window.setTimeout(function(){if(Ve.state.draggingNodeKey!==null){var Ni=(0,Me.Z)(kt),Ti=(0,Yt.Z)(hn,We.eventKey);Ti&&(Ti.children||[]).length&&(Ni=(0,Dt.L0)(kt,We.eventKey)),Ve.props.hasOwnProperty("expandedKeys")||Ve.setExpandedKeys(Ni),un==null||un(Ni,{node:(0,Xe.F)(We),expanded:!0,nativeEvent:Ke.nativeEvent})}},800)),Ve.dragNodeProps.eventKey===Hi&&ki===0){Ve.resetDragState();return}Ve.setState({dragOverNodeKey:gr,dropPosition:jn,dropLevelOffset:ki,dropTargetKey:Hi,dropContainerKey:Fi,dropTargetPos:rr,dropAllowed:Cr}),yn==null||yn({event:Ke,node:(0,Xe.F)(We),expandedKeys:kt})}),(0,pe.Z)((0,be.Z)(Ve),"onNodeDragOver",function(Ke,We){var vt=Ve.state,kt=vt.dragChildrenKeys,hn=vt.flattenNodes,en=vt.keyEntities,Gt=vt.expandedKeys,gn=vt.indent,bn=Ve.props,yn=bn.onDragOver,un=bn.allowDrop,Jn=bn.direction;if(Ve.dragNodeProps){var mn=(0,Dt.OM)(Ke,Ve.dragNodeProps,We,gn,Ve.dragStartMousePosition,un,hn,en,Gt,Jn),Yn=mn.dropPosition,ri=mn.dropLevelOffset,bi=mn.dropTargetKey,jn=mn.dropContainerKey,ki=mn.dropTargetPos,Hi=mn.dropAllowed,Fi=mn.dragOverNodeKey;kt.includes(bi)||!Hi||(Ve.dragNodeProps.eventKey===bi&&ri===0?Ve.state.dropPosition===null&&Ve.state.dropLevelOffset===null&&Ve.state.dropTargetKey===null&&Ve.state.dropContainerKey===null&&Ve.state.dropTargetPos===null&&Ve.state.dropAllowed===!1&&Ve.state.dragOverNodeKey===null||Ve.resetDragState():Yn===Ve.state.dropPosition&&ri===Ve.state.dropLevelOffset&&bi===Ve.state.dropTargetKey&&jn===Ve.state.dropContainerKey&&ki===Ve.state.dropTargetPos&&Hi===Ve.state.dropAllowed&&Fi===Ve.state.dragOverNodeKey||Ve.setState({dropPosition:Yn,dropLevelOffset:ri,dropTargetKey:bi,dropContainerKey:jn,dropTargetPos:ki,dropAllowed:Hi,dragOverNodeKey:Fi}),yn==null||yn({event:Ke,node:(0,Xe.F)(We)}))}}),(0,pe.Z)((0,be.Z)(Ve),"onNodeDragLeave",function(Ke,We){Ve.currentMouseOverDroppableNodeKey===We.eventKey&&!Ke.currentTarget.contains(Ke.relatedTarget)&&(Ve.resetDragState(),Ve.currentMouseOverDroppableNodeKey=null);var vt=Ve.props.onDragLeave;vt==null||vt({event:Ke,node:(0,Xe.F)(We)})}),(0,pe.Z)((0,be.Z)(Ve),"onWindowDragEnd",function(Ke){Ve.onNodeDragEnd(Ke,null,!0),window.removeEventListener("dragend",Ve.onWindowDragEnd)}),(0,pe.Z)((0,be.Z)(Ve),"onNodeDragEnd",function(Ke,We){var vt=Ve.props.onDragEnd;Ve.setState({dragOverNodeKey:null}),Ve.cleanDragState(),vt==null||vt({event:Ke,node:(0,Xe.F)(We)}),Ve.dragNodeProps=null,window.removeEventListener("dragend",Ve.onWindowDragEnd)}),(0,pe.Z)((0,be.Z)(Ve),"onNodeDrop",function(Ke,We){var vt,kt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,hn=Ve.state,en=hn.dragChildrenKeys,Gt=hn.dropPosition,gn=hn.dropTargetKey,bn=hn.dropTargetPos,yn=hn.dropAllowed;if(yn){var un=Ve.props.onDrop;if(Ve.setState({dragOverNodeKey:null}),Ve.cleanDragState(),gn!==null){var Jn=(0,je.Z)((0,je.Z)({},(0,Xe.H8)(gn,Ve.getTreeNodeRequiredProps())),{},{active:((vt=Ve.getActiveItem())===null||vt===void 0?void 0:vt.key)===gn,data:(0,Yt.Z)(Ve.state.keyEntities,gn).node}),mn=en.includes(gn);(0,ee.ZP)(!mn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Yn=(0,Dt.yx)(bn),ri={event:Ke,node:(0,Xe.F)(Jn),dragNode:Ve.dragNodeProps?(0,Xe.F)(Ve.dragNodeProps):null,dragNodesKeys:[Ve.dragNodeProps.eventKey].concat(en),dropToGap:Gt!==0,dropPosition:Gt+Number(Yn[Yn.length-1])};kt||un==null||un(ri),Ve.dragNodeProps=null}}}),(0,pe.Z)((0,be.Z)(Ve),"cleanDragState",function(){var Ke=Ve.state.draggingNodeKey;Ke!==null&&Ve.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),Ve.dragStartMousePosition=null,Ve.currentMouseOverDroppableNodeKey=null}),(0,pe.Z)((0,be.Z)(Ve),"triggerExpandActionExpand",function(Ke,We){var vt=Ve.state,kt=vt.expandedKeys,hn=vt.flattenNodes,en=We.expanded,Gt=We.key,gn=We.isLeaf;if(!(gn||Ke.shiftKey||Ke.metaKey||Ke.ctrlKey)){var bn=hn.filter(function(un){return un.key===Gt})[0],yn=(0,Xe.F)((0,je.Z)((0,je.Z)({},(0,Xe.H8)(Gt,Ve.getTreeNodeRequiredProps())),{},{data:bn.data}));Ve.setExpandedKeys(en?(0,Dt._5)(kt,Gt):(0,Dt.L0)(kt,Gt)),Ve.onNodeExpand(Ke,yn)}}),(0,pe.Z)((0,be.Z)(Ve),"onNodeClick",function(Ke,We){var vt=Ve.props,kt=vt.onClick,hn=vt.expandAction;hn==="click"&&Ve.triggerExpandActionExpand(Ke,We),kt==null||kt(Ke,We)}),(0,pe.Z)((0,be.Z)(Ve),"onNodeDoubleClick",function(Ke,We){var vt=Ve.props,kt=vt.onDoubleClick,hn=vt.expandAction;hn==="doubleClick"&&Ve.triggerExpandActionExpand(Ke,We),kt==null||kt(Ke,We)}),(0,pe.Z)((0,be.Z)(Ve),"onNodeSelect",function(Ke,We){var vt=Ve.state.selectedKeys,kt=Ve.state,hn=kt.keyEntities,en=kt.fieldNames,Gt=Ve.props,gn=Gt.onSelect,bn=Gt.multiple,yn=We.selected,un=We[en.key],Jn=!yn;Jn?bn?vt=(0,Dt.L0)(vt,un):vt=[un]:vt=(0,Dt._5)(vt,un);var mn=vt.map(function(Yn){var ri=(0,Yt.Z)(hn,Yn);return ri?ri.node:null}).filter(Boolean);Ve.setUncontrolledState({selectedKeys:vt}),gn==null||gn(vt,{event:"select",selected:Jn,node:We,selectedNodes:mn,nativeEvent:Ke.nativeEvent})}),(0,pe.Z)((0,be.Z)(Ve),"onNodeCheck",function(Ke,We,vt){var kt=Ve.state,hn=kt.keyEntities,en=kt.checkedKeys,Gt=kt.halfCheckedKeys,gn=Ve.props,bn=gn.checkStrictly,yn=gn.onCheck,un=We.key,Jn,mn={event:"check",node:We,checked:vt,nativeEvent:Ke.nativeEvent};if(bn){var Yn=vt?(0,Dt.L0)(en,un):(0,Dt._5)(en,un),ri=(0,Dt._5)(Gt,un);Jn={checked:Yn,halfChecked:ri},mn.checkedNodes=Yn.map(function(rr){return(0,Yt.Z)(hn,rr)}).filter(Boolean).map(function(rr){return rr.node}),Ve.setUncontrolledState({checkedKeys:Yn})}else{var bi=(0,Qt.S)([].concat((0,Me.Z)(en),[un]),!0,hn),jn=bi.checkedKeys,ki=bi.halfCheckedKeys;if(!vt){var Hi=new Set(jn);Hi.delete(un);var Fi=(0,Qt.S)(Array.from(Hi),{checked:!1,halfCheckedKeys:ki},hn);jn=Fi.checkedKeys,ki=Fi.halfCheckedKeys}Jn=jn,mn.checkedNodes=[],mn.checkedNodesPositions=[],mn.halfCheckedKeys=ki,jn.forEach(function(rr){var Cr=(0,Yt.Z)(hn,rr);if(Cr){var gr=Cr.node,Ni=Cr.pos;mn.checkedNodes.push(gr),mn.checkedNodesPositions.push({node:gr,pos:Ni})}}),Ve.setUncontrolledState({checkedKeys:jn},!1,{halfCheckedKeys:ki})}yn==null||yn(Jn,mn)}),(0,pe.Z)((0,be.Z)(Ve),"onNodeLoad",function(Ke){var We,vt=Ke.key,kt=Ve.state.keyEntities,hn=(0,Yt.Z)(kt,vt);if(!(hn!=null&&(We=hn.children)!==null&&We!==void 0&&We.length)){var en=new Promise(function(Gt,gn){Ve.setState(function(bn){var yn=bn.loadedKeys,un=yn===void 0?[]:yn,Jn=bn.loadingKeys,mn=Jn===void 0?[]:Jn,Yn=Ve.props,ri=Yn.loadData,bi=Yn.onLoad;if(!ri||un.includes(vt)||mn.includes(vt))return null;var jn=ri(Ke);return jn.then(function(){var ki=Ve.state.loadedKeys,Hi=(0,Dt.L0)(ki,vt);bi==null||bi(Hi,{event:"load",node:Ke}),Ve.setUncontrolledState({loadedKeys:Hi}),Ve.setState(function(Fi){return{loadingKeys:(0,Dt._5)(Fi.loadingKeys,vt)}}),Gt()}).catch(function(ki){if(Ve.setState(function(Fi){return{loadingKeys:(0,Dt._5)(Fi.loadingKeys,vt)}}),Ve.loadingRetryTimes[vt]=(Ve.loadingRetryTimes[vt]||0)+1,Ve.loadingRetryTimes[vt]>=Jt){var Hi=Ve.state.loadedKeys;(0,ee.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Ve.setUncontrolledState({loadedKeys:(0,Dt.L0)(Hi,vt)}),Gt()}gn(ki)}),{loadingKeys:(0,Dt.L0)(mn,vt)}})});return en.catch(function(){}),en}}),(0,pe.Z)((0,be.Z)(Ve),"onNodeMouseEnter",function(Ke,We){var vt=Ve.props.onMouseEnter;vt==null||vt({event:Ke,node:We})}),(0,pe.Z)((0,be.Z)(Ve),"onNodeMouseLeave",function(Ke,We){var vt=Ve.props.onMouseLeave;vt==null||vt({event:Ke,node:We})}),(0,pe.Z)((0,be.Z)(Ve),"onNodeContextMenu",function(Ke,We){var vt=Ve.props.onRightClick;vt&&(Ke.preventDefault(),vt({event:Ke,node:We}))}),(0,pe.Z)((0,be.Z)(Ve),"onFocus",function(){var Ke=Ve.props.onFocus;Ve.setState({focused:!0});for(var We=arguments.length,vt=new Array(We),kt=0;kt<We;kt++)vt[kt]=arguments[kt];Ke==null||Ke.apply(void 0,vt)}),(0,pe.Z)((0,be.Z)(Ve),"onBlur",function(){var Ke=Ve.props.onBlur;Ve.setState({focused:!1}),Ve.onActiveChange(null);for(var We=arguments.length,vt=new Array(We),kt=0;kt<We;kt++)vt[kt]=arguments[kt];Ke==null||Ke.apply(void 0,vt)}),(0,pe.Z)((0,be.Z)(Ve),"getTreeNodeRequiredProps",function(){var Ke=Ve.state,We=Ke.expandedKeys,vt=Ke.selectedKeys,kt=Ke.loadedKeys,hn=Ke.loadingKeys,en=Ke.checkedKeys,Gt=Ke.halfCheckedKeys,gn=Ke.dragOverNodeKey,bn=Ke.dropPosition,yn=Ke.keyEntities;return{expandedKeys:We||[],selectedKeys:vt||[],loadedKeys:kt||[],loadingKeys:hn||[],checkedKeys:en||[],halfCheckedKeys:Gt||[],dragOverNodeKey:gn,dropPosition:bn,keyEntities:yn}}),(0,pe.Z)((0,be.Z)(Ve),"setExpandedKeys",function(Ke){var We=Ve.state,vt=We.treeData,kt=We.fieldNames,hn=(0,Xe.oH)(vt,Ke,kt);Ve.setUncontrolledState({expandedKeys:Ke,flattenNodes:hn},!0)}),(0,pe.Z)((0,be.Z)(Ve),"onNodeExpand",function(Ke,We){var vt=Ve.state.expandedKeys,kt=Ve.state,hn=kt.listChanging,en=kt.fieldNames,Gt=Ve.props,gn=Gt.onExpand,bn=Gt.loadData,yn=We.expanded,un=We[en.key];if(!hn){var Jn=vt.includes(un),mn=!yn;if((0,ee.ZP)(yn&&Jn||!yn&&!Jn,"Expand state not sync with index check"),vt=mn?(0,Dt.L0)(vt,un):(0,Dt._5)(vt,un),Ve.setExpandedKeys(vt),gn==null||gn(vt,{node:We,expanded:mn,nativeEvent:Ke.nativeEvent}),mn&&bn){var Yn=Ve.onNodeLoad(We);Yn&&Yn.then(function(){var ri=(0,Xe.oH)(Ve.state.treeData,vt,en);Ve.setUncontrolledState({flattenNodes:ri})}).catch(function(){var ri=Ve.state.expandedKeys,bi=(0,Dt._5)(ri,un);Ve.setExpandedKeys(bi)})}}}),(0,pe.Z)((0,be.Z)(Ve),"onListChangeStart",function(){Ve.setUncontrolledState({listChanging:!0})}),(0,pe.Z)((0,be.Z)(Ve),"onListChangeEnd",function(){setTimeout(function(){Ve.setUncontrolledState({listChanging:!1})})}),(0,pe.Z)((0,be.Z)(Ve),"onActiveChange",function(Ke){var We=Ve.state.activeKey,vt=Ve.props,kt=vt.onActiveChange,hn=vt.itemScrollOffset,en=hn===void 0?0:hn;We!==Ke&&(Ve.setState({activeKey:Ke}),Ke!==null&&Ve.scrollTo({key:Ke,offset:en}),kt==null||kt(Ke))}),(0,pe.Z)((0,be.Z)(Ve),"getActiveItem",function(){var Ke=Ve.state,We=Ke.activeKey,vt=Ke.flattenNodes;return We===null?null:vt.find(function(kt){var hn=kt.key;return hn===We})||null}),(0,pe.Z)((0,be.Z)(Ve),"offsetActiveKey",function(Ke){var We=Ve.state,vt=We.flattenNodes,kt=We.activeKey,hn=vt.findIndex(function(gn){var bn=gn.key;return bn===kt});hn===-1&&Ke<0&&(hn=vt.length),hn=(hn+Ke+vt.length)%vt.length;var en=vt[hn];if(en){var Gt=en.key;Ve.onActiveChange(Gt)}else Ve.onActiveChange(null)}),(0,pe.Z)((0,be.Z)(Ve),"onKeyDown",function(Ke){var We=Ve.state,vt=We.activeKey,kt=We.expandedKeys,hn=We.checkedKeys,en=We.fieldNames,Gt=Ve.props,gn=Gt.onKeyDown,bn=Gt.checkable,yn=Gt.selectable;switch(Ke.which){case fe.Z.UP:{Ve.offsetActiveKey(-1),Ke.preventDefault();break}case fe.Z.DOWN:{Ve.offsetActiveKey(1),Ke.preventDefault();break}}var un=Ve.getActiveItem();if(un&&un.data){var Jn=Ve.getTreeNodeRequiredProps(),mn=un.data.isLeaf===!1||!!(un.data[en.children]||[]).length,Yn=(0,Xe.F)((0,je.Z)((0,je.Z)({},(0,Xe.H8)(vt,Jn)),{},{data:un.data,active:!0}));switch(Ke.which){case fe.Z.LEFT:{mn&&kt.includes(vt)?Ve.onNodeExpand({},Yn):un.parent&&Ve.onActiveChange(un.parent.key),Ke.preventDefault();break}case fe.Z.RIGHT:{mn&&!kt.includes(vt)?Ve.onNodeExpand({},Yn):un.children&&un.children.length&&Ve.onActiveChange(un.children[0].key),Ke.preventDefault();break}case fe.Z.ENTER:case fe.Z.SPACE:{bn&&!Yn.disabled&&Yn.checkable!==!1&&!Yn.disableCheckbox?Ve.onNodeCheck({},Yn,!hn.includes(vt)):!bn&&yn&&!Yn.disabled&&Yn.selectable!==!1&&Ve.onNodeSelect({},Yn);break}}}gn==null||gn(Ke)}),(0,pe.Z)((0,be.Z)(Ve),"setUncontrolledState",function(Ke){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,vt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Ve.destroyed){var kt=!1,hn=!0,en={};Object.keys(Ke).forEach(function(Gt){if(Ve.props.hasOwnProperty(Gt)){hn=!1;return}kt=!0,en[Gt]=Ke[Gt]}),kt&&(!We||hn)&&Ve.setState((0,je.Z)((0,je.Z)({},en),vt))}}),(0,pe.Z)((0,be.Z)(Ve),"scrollTo",function(Ke){Ve.listRef.current.scrollTo(Ke)}),Ve}return(0,xe.Z)(et,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Re=this.props,ze=Re.activeKey,it=Re.itemScrollOffset,Ke=it===void 0?0:it;ze!==void 0&&ze!==this.state.activeKey&&(this.setState({activeKey:ze}),ze!==null&&this.scrollTo({key:ze,offset:Ke}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var Re=this.state,ze=Re.focused,it=Re.flattenNodes,Ke=Re.keyEntities,We=Re.draggingNodeKey,vt=Re.activeKey,kt=Re.dropLevelOffset,hn=Re.dropContainerKey,en=Re.dropTargetKey,Gt=Re.dropPosition,gn=Re.dragOverNodeKey,bn=Re.indent,yn=this.props,un=yn.prefixCls,Jn=yn.className,mn=yn.style,Yn=yn.showLine,ri=yn.focusable,bi=yn.tabIndex,jn=bi===void 0?0:bi,ki=yn.selectable,Hi=yn.showIcon,Fi=yn.icon,rr=yn.switcherIcon,Cr=yn.draggable,gr=yn.checkable,Ni=yn.checkStrictly,Ti=yn.disabled,cr=yn.motion,$e=yn.loadData,Li=yn.filterTreeNode,ti=yn.height,Oi=yn.itemHeight,pr=yn.scrollWidth,dr=yn.virtual,Qi=yn.titleRender,So=yn.dropIndicatorRender,$t=yn.onContextMenu,Ge=yn.onScroll,Je=yn.direction,ot=yn.rootClassName,Et=yn.rootStyle,Nt=(0,ue.Z)(this.props,{aria:!0,data:!0}),pn;Cr&&((0,Se.Z)(Cr)==="object"?pn=Cr:typeof Cr=="function"?pn={nodeDraggable:Cr}:pn={});var jt={prefixCls:un,selectable:ki,showIcon:Hi,icon:Fi,switcherIcon:rr,draggable:pn,draggingNodeKey:We,checkable:gr,checkStrictly:Ni,disabled:Ti,keyEntities:Ke,dropLevelOffset:kt,dropContainerKey:hn,dropTargetKey:en,dropPosition:Gt,dragOverNodeKey:gn,indent:bn,direction:Je,dropIndicatorRender:So,loadData:$e,filterTreeNode:Li,titleRender:Qi,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return z.createElement(oe.k.Provider,{value:jt},z.createElement("div",{className:ge()(un,Jn,ot,(0,pe.Z)((0,pe.Z)((0,pe.Z)({},"".concat(un,"-show-line"),Yn),"".concat(un,"-focused"),ze),"".concat(un,"-active-focused"),vt!==null)),style:Et},z.createElement(Ft,(0,Le.Z)({ref:this.listRef,prefixCls:un,style:mn,data:it,disabled:Ti,selectable:ki,checkable:!!gr,motion:cr,dragging:We!==null,height:ti,itemHeight:Oi,virtual:dr,focusable:ri,focused:ze,tabIndex:jn,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:$t,onScroll:Ge,scrollWidth:pr},this.getTreeNodeRequiredProps(),Nt))))}}],[{key:"getDerivedStateFromProps",value:function(Re,ze){var it=ze.prevProps,Ke={prevProps:Re};function We(jn){return!it&&Re.hasOwnProperty(jn)||it&&it[jn]!==Re[jn]}var vt,kt=ze.fieldNames;if(We("fieldNames")&&(kt=(0,Xe.w$)(Re.fieldNames),Ke.fieldNames=kt),We("treeData")?vt=Re.treeData:We("children")&&((0,ee.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),vt=(0,Xe.zn)(Re.children)),vt){Ke.treeData=vt;var hn=(0,Xe.I8)(vt,{fieldNames:kt});Ke.keyEntities=(0,je.Z)((0,pe.Z)({},rt,yt),hn.keyEntities)}var en=Ke.keyEntities||ze.keyEntities;if(We("expandedKeys")||it&&We("autoExpandParent"))Ke.expandedKeys=Re.autoExpandParent||!it&&Re.defaultExpandParent?(0,Dt.r7)(Re.expandedKeys,en):Re.expandedKeys;else if(!it&&Re.defaultExpandAll){var Gt=(0,je.Z)({},en);delete Gt[rt];var gn=[];Object.keys(Gt).forEach(function(jn){var ki=Gt[jn];ki.children&&ki.children.length&&gn.push(ki.key)}),Ke.expandedKeys=gn}else!it&&Re.defaultExpandedKeys&&(Ke.expandedKeys=Re.autoExpandParent||Re.defaultExpandParent?(0,Dt.r7)(Re.defaultExpandedKeys,en):Re.defaultExpandedKeys);if(Ke.expandedKeys||delete Ke.expandedKeys,vt||Ke.expandedKeys){var bn=(0,Xe.oH)(vt||ze.treeData,Ke.expandedKeys||ze.expandedKeys,kt);Ke.flattenNodes=bn}if(Re.selectable&&(We("selectedKeys")?Ke.selectedKeys=(0,Dt.BT)(Re.selectedKeys,Re):!it&&Re.defaultSelectedKeys&&(Ke.selectedKeys=(0,Dt.BT)(Re.defaultSelectedKeys,Re))),Re.checkable){var yn;if(We("checkedKeys")?yn=(0,Dt.E6)(Re.checkedKeys)||{}:!it&&Re.defaultCheckedKeys?yn=(0,Dt.E6)(Re.defaultCheckedKeys)||{}:vt&&(yn=(0,Dt.E6)(Re.checkedKeys)||{checkedKeys:ze.checkedKeys,halfCheckedKeys:ze.halfCheckedKeys}),yn){var un=yn,Jn=un.checkedKeys,mn=Jn===void 0?[]:Jn,Yn=un.halfCheckedKeys,ri=Yn===void 0?[]:Yn;if(!Re.checkStrictly){var bi=(0,Qt.S)(mn,!0,en);mn=bi.checkedKeys,ri=bi.halfCheckedKeys}Ke.checkedKeys=mn,Ke.halfCheckedKeys=ri}}return We("loadedKeys")&&(Ke.loadedKeys=Re.loadedKeys),Ke}}]),et}(z.Component);(0,pe.Z)(lt,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:ae,allowDrop:function(){return!0},expandAction:!1}),(0,pe.Z)(lt,"TreeNode",Oe.Z);var Ue=lt,Be=Ue},82661:function(xn,ln,Ie){"use strict";Ie.d(ln,{BT:function(){return z},E6:function(){return ae},L0:function(){return pe},OM:function(){return ee},_5:function(){return we},r7:function(){return le},wA:function(){return ge},yx:function(){return de}});var Le=Ie(15142),Se=Ie(26420),je=Ie(48736),Me=Ie(59301),Ce=Ie(639),xe=Ie(65065),be=Ie(34061),ye=null;function we(me,ve){if(!me)return[];var Pe=me.slice(),Ae=Pe.indexOf(ve);return Ae>=0&&Pe.splice(Ae,1),Pe}function pe(me,ve){var Pe=(me||[]).slice();return Pe.indexOf(ve)===-1&&Pe.push(ve),Pe}function de(me){return me.split("-")}function ge(me,ve){var Pe=[],Ae=(0,xe.Z)(ve,me);function De(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Oe.forEach(function(Ze){var qe=Ze.key,Xe=Ze.children;Pe.push(qe),De(Xe)})}return De(Ae.children),Pe}function fe(me){if(me.parent){var ve=de(me.pos);return Number(ve[ve.length-1])===me.parent.children.length-1}return!1}function ue(me){var ve=de(me.pos);return Number(ve[ve.length-1])===0}function ee(me,ve,Pe,Ae,De,Oe,Ze,qe,Xe,mt){var pt,Mt=me.clientX,at=me.clientY,_t=me.target.getBoundingClientRect(),dt=_t.top,Rt=_t.height,ut=(mt==="rtl"?-1:1)*(((De==null?void 0:De.x)||0)-Mt),rt=(ut-12)/Ae,ct=Xe.filter(function(Be){var tt;return(tt=qe[Be])===null||tt===void 0||(tt=tt.children)===null||tt===void 0?void 0:tt.length}),yt=(0,xe.Z)(qe,Pe.eventKey);if(at<dt+Rt/2){var wt=Ze.findIndex(function(Be){return Be.key===yt.key}),xt=wt<=0?0:wt-1,Ut=Ze[xt].key;yt=(0,xe.Z)(qe,Ut)}var zt=yt.key,dn=yt,Ft=yt.key,Dt=0,Qt=0;if(!ct.includes(zt))for(var Yt=0;Yt<rt&&fe(yt);Yt+=1)yt=yt.parent,Qt+=1;var Jt=ve.data,lt=yt.node,Ue=!0;return ue(yt)&&yt.level===0&&at<dt+Rt/2&&Oe({dragNode:Jt,dropNode:lt,dropPosition:-1})&&yt.key===Pe.eventKey?Dt=-1:(dn.children||[]).length&&ct.includes(Ft)?Oe({dragNode:Jt,dropNode:lt,dropPosition:0})?Dt=0:Ue=!1:Qt===0?rt>-1.5?Oe({dragNode:Jt,dropNode:lt,dropPosition:1})?Dt=1:Ue=!1:Oe({dragNode:Jt,dropNode:lt,dropPosition:0})?Dt=0:Oe({dragNode:Jt,dropNode:lt,dropPosition:1})?Dt=1:Ue=!1:Oe({dragNode:Jt,dropNode:lt,dropPosition:1})?Dt=1:Ue=!1,{dropPosition:Dt,dropLevelOffset:Qt,dropTargetKey:yt.key,dropTargetPos:yt.pos,dragOverNodeKey:Ft,dropContainerKey:Dt===0?null:((pt=yt.parent)===null||pt===void 0?void 0:pt.key)||null,dropAllowed:Ue}}function z(me,ve){if(me){var Pe=ve.multiple;return Pe?me.slice():me.length?[me[0]]:me}}var oe=function(ve){return ve};function re(me,ve){if(!me)return[];var Pe=ve||{},Ae=Pe.processProps,De=Ae===void 0?oe:Ae,Oe=Array.isArray(me)?me:[me];return Oe.map(function(Ze){var qe=Ze.children,Xe=_objectWithoutProperties(Ze,ye),mt=re(qe,ve);return React.createElement(TreeNode,_extends({key:Xe.key},De(Xe)),mt)})}function ae(me){if(!me)return null;var ve;if(Array.isArray(me))ve={checkedKeys:me,halfCheckedKeys:void 0};else if((0,Se.Z)(me)==="object")ve={checkedKeys:me.checked||void 0,halfCheckedKeys:me.halfChecked||void 0};else return(0,je.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return ve}function le(me,ve){var Pe=new Set;function Ae(De){if(!Pe.has(De)){var Oe=(0,xe.Z)(ve,De);if(Oe){Pe.add(De);var Ze=Oe.parent,qe=Oe.node;qe.disabled||Ze&&Ae(Ze.key)}}}return(me||[]).forEach(function(De){Ae(De)}),(0,Le.Z)(Pe)}},34643:function(xn,ln,Ie){"use strict";Ie.d(ln,{S:function(){return be}});var Le=Ie(48736),Se=Ie(65065);function je(ye,we){var pe=new Set;return ye.forEach(function(de){we.has(de)||pe.add(de)}),pe}function Me(ye){var we=ye||{},pe=we.disabled,de=we.disableCheckbox,ge=we.checkable;return!!(pe||de)||ge===!1}function Ce(ye,we,pe,de){for(var ge=new Set(ye),fe=new Set,ue=0;ue<=pe;ue+=1){var ee=we.get(ue)||new Set;ee.forEach(function(ae){var le=ae.key,me=ae.node,ve=ae.children,Pe=ve===void 0?[]:ve;ge.has(le)&&!de(me)&&Pe.filter(function(Ae){return!de(Ae.node)}).forEach(function(Ae){ge.add(Ae.key)})})}for(var z=new Set,oe=pe;oe>=0;oe-=1){var re=we.get(oe)||new Set;re.forEach(function(ae){var le=ae.parent,me=ae.node;if(!(de(me)||!ae.parent||z.has(ae.parent.key))){if(de(ae.parent.node)){z.add(le.key);return}var ve=!0,Pe=!1;(le.children||[]).filter(function(Ae){return!de(Ae.node)}).forEach(function(Ae){var De=Ae.key,Oe=ge.has(De);ve&&!Oe&&(ve=!1),!Pe&&(Oe||fe.has(De))&&(Pe=!0)}),ve&&ge.add(le.key),Pe&&fe.add(le.key),z.add(le.key)}})}return{checkedKeys:Array.from(ge),halfCheckedKeys:Array.from(je(fe,ge))}}function xe(ye,we,pe,de,ge){for(var fe=new Set(ye),ue=new Set(we),ee=0;ee<=de;ee+=1){var z=pe.get(ee)||new Set;z.forEach(function(le){var me=le.key,ve=le.node,Pe=le.children,Ae=Pe===void 0?[]:Pe;!fe.has(me)&&!ue.has(me)&&!ge(ve)&&Ae.filter(function(De){return!ge(De.node)}).forEach(function(De){fe.delete(De.key)})})}ue=new Set;for(var oe=new Set,re=de;re>=0;re-=1){var ae=pe.get(re)||new Set;ae.forEach(function(le){var me=le.parent,ve=le.node;if(!(ge(ve)||!le.parent||oe.has(le.parent.key))){if(ge(le.parent.node)){oe.add(me.key);return}var Pe=!0,Ae=!1;(me.children||[]).filter(function(De){return!ge(De.node)}).forEach(function(De){var Oe=De.key,Ze=fe.has(Oe);Pe&&!Ze&&(Pe=!1),!Ae&&(Ze||ue.has(Oe))&&(Ae=!0)}),Pe||fe.delete(me.key),Ae&&ue.add(me.key),oe.add(me.key)}})}return{checkedKeys:Array.from(fe),halfCheckedKeys:Array.from(je(ue,fe))}}function be(ye,we,pe,de){var ge=[],fe;de?fe=de:fe=Me;var ue=new Set(ye.filter(function(re){var ae=!!(0,Se.Z)(pe,re);return ae||ge.push(re),ae})),ee=new Map,z=0;Object.keys(pe).forEach(function(re){var ae=pe[re],le=ae.level,me=ee.get(le);me||(me=new Set,ee.set(le,me)),me.add(ae),z=Math.max(z,le)}),(0,Le.ZP)(!ge.length,"Tree missing follow keys: ".concat(ge.slice(0,100).map(function(re){return"'".concat(re,"'")}).join(", ")));var oe;return we===!0?oe=Ce(ue,ee,z,fe):oe=xe(ue,we.halfCheckedKeys,ee,z,fe),oe}},65065:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return Le}});function Le(Se,je){return Se[je]}},34061:function(xn,ln,Ie){"use strict";Ie.d(ln,{F:function(){return le},H8:function(){return ae},I8:function(){return re},km:function(){return ge},oH:function(){return z},w$:function(){return fe},zn:function(){return ee}});var Le=Ie(26420),Se=Ie(15142),je=Ie(98506),Me=Ie(33346),Ce=Ie(11592),xe=Ie(2738),be=Ie(48736),ye=Ie(65065),we=["children"];function pe(me,ve){return"".concat(me,"-").concat(ve)}function de(me){return me&&me.type&&me.type.isTreeNode}function ge(me,ve){return me!=null?me:ve}function fe(me){var ve=me||{},Pe=ve.title,Ae=ve._title,De=ve.key,Oe=ve.children,Ze=Pe||"title";return{title:Ze,_title:Ae||[Ze],key:De||"key",children:Oe||"children"}}function ue(me,ve){var Pe=new Map;function Ae(De){var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(De||[]).forEach(function(Ze){var qe=Ze[ve.key],Xe=Ze[ve.children];warning(qe!=null,"Tree node must have a certain key: [".concat(Oe).concat(qe,"]"));var mt=String(qe);warning(!Pe.has(mt)||qe===null||qe===void 0,"Same 'key' exist in the Tree: ".concat(mt)),Pe.set(mt,!0),Ae(Xe,"".concat(Oe).concat(mt," > "))})}Ae(me)}function ee(me){function ve(Pe){var Ae=(0,Ce.Z)(Pe);return Ae.map(function(De){if(!de(De))return(0,be.ZP)(!De,"Tree/TreeNode can only accept TreeNode as children."),null;var Oe=De.key,Ze=De.props,qe=Ze.children,Xe=(0,Me.Z)(Ze,we),mt=(0,je.Z)({key:Oe},Xe),pt=ve(qe);return pt.length&&(mt.children=pt),mt}).filter(function(De){return De})}return ve(me)}function z(me,ve,Pe){var Ae=fe(Pe),De=Ae._title,Oe=Ae.key,Ze=Ae.children,qe=new Set(ve===!0?[]:ve),Xe=[];function mt(pt){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return pt.map(function(at,_t){for(var dt=pe(Mt?Mt.pos:"0",_t),Rt=ge(at[Oe],dt),ut,rt=0;rt<De.length;rt+=1){var ct=De[rt];if(at[ct]!==void 0){ut=at[ct];break}}var yt=Object.assign((0,xe.Z)(at,[].concat((0,Se.Z)(De),[Oe,Ze])),{title:ut,key:Rt,parent:Mt,pos:dt,children:null,data:at,isStart:[].concat((0,Se.Z)(Mt?Mt.isStart:[]),[_t===0]),isEnd:[].concat((0,Se.Z)(Mt?Mt.isEnd:[]),[_t===pt.length-1])});return Xe.push(yt),ve===!0||qe.has(Rt)?yt.children=mt(at[Ze]||[],yt):yt.children=[],yt})}return mt(me),Xe}function oe(me,ve,Pe){var Ae={};(0,Le.Z)(Pe)==="object"?Ae=Pe:Ae={externalGetKey:Pe},Ae=Ae||{};var De=Ae,Oe=De.childrenPropName,Ze=De.externalGetKey,qe=De.fieldNames,Xe=fe(qe),mt=Xe.key,pt=Xe.children,Mt=Oe||pt,at;Ze?typeof Ze=="string"?at=function(Rt){return Rt[Ze]}:typeof Ze=="function"&&(at=function(Rt){return Ze(Rt)}):at=function(Rt,ut){return ge(Rt[mt],ut)};function _t(dt,Rt,ut,rt){var ct=dt?dt[Mt]:me,yt=dt?pe(ut.pos,Rt):"0",wt=dt?[].concat((0,Se.Z)(rt),[dt]):[];if(dt){var xt=at(dt,yt),Ut={node:dt,index:Rt,pos:yt,key:xt,parentPos:ut.node?ut.pos:null,level:ut.level+1,nodes:wt};ve(Ut)}ct&&ct.forEach(function(zt,dn){_t(zt,dn,{node:dt,pos:yt,level:ut?ut.level+1:-1},wt)})}_t(null)}function re(me){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Pe=ve.initWrapper,Ae=ve.processEntity,De=ve.onProcessFinished,Oe=ve.externalGetKey,Ze=ve.childrenPropName,qe=ve.fieldNames,Xe=arguments.length>2?arguments[2]:void 0,mt=Oe||Xe,pt={},Mt={},at={posEntities:pt,keyEntities:Mt};return Pe&&(at=Pe(at)||at),oe(me,function(_t){var dt=_t.node,Rt=_t.index,ut=_t.pos,rt=_t.key,ct=_t.parentPos,yt=_t.level,wt=_t.nodes,xt={node:dt,nodes:wt,index:Rt,key:rt,pos:ut,level:yt},Ut=ge(rt,ut);pt[ut]=xt,Mt[Ut]=xt,xt.parent=pt[ct],xt.parent&&(xt.parent.children=xt.parent.children||[],xt.parent.children.push(xt)),Ae&&Ae(xt,at)},{externalGetKey:mt,childrenPropName:Ze,fieldNames:qe}),De&&De(at),at}function ae(me,ve){var Pe=ve.expandedKeys,Ae=ve.selectedKeys,De=ve.loadedKeys,Oe=ve.loadingKeys,Ze=ve.checkedKeys,qe=ve.halfCheckedKeys,Xe=ve.dragOverNodeKey,mt=ve.dropPosition,pt=ve.keyEntities,Mt=(0,ye.Z)(pt,me),at={eventKey:me,expanded:Pe.indexOf(me)!==-1,selected:Ae.indexOf(me)!==-1,loaded:De.indexOf(me)!==-1,loading:Oe.indexOf(me)!==-1,checked:Ze.indexOf(me)!==-1,halfChecked:qe.indexOf(me)!==-1,pos:String(Mt?Mt.pos:""),dragOver:Xe===me&&mt===0,dragOverGapTop:Xe===me&&mt===-1,dragOverGapBottom:Xe===me&&mt===1};return at}function le(me){var ve=me.data,Pe=me.expanded,Ae=me.selected,De=me.checked,Oe=me.loaded,Ze=me.loading,qe=me.halfChecked,Xe=me.dragOver,mt=me.dragOverGapTop,pt=me.dragOverGapBottom,Mt=me.pos,at=me.active,_t=me.eventKey,dt=(0,je.Z)((0,je.Z)({},ve),{},{expanded:Pe,selected:Ae,checked:De,loaded:Oe,loading:Ze,halfChecked:qe,dragOver:Xe,dragOverGapTop:mt,dragOverGapBottom:pt,pos:Mt,active:at,key:_t});return"props"in dt||Object.defineProperty(dt,"props",{get:function(){return(0,be.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),me}}),dt}},8224:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return Se}});var Le=Ie(4676);function Se(je,Me,Ce,xe){var be=Le.unstable_batchedUpdates?function(we){Le.unstable_batchedUpdates(Ce,we)}:Ce;return je!=null&&je.addEventListener&&je.addEventListener(Me,be,xe),{remove:function(){je!=null&&je.removeEventListener&&je.removeEventListener(Me,be,xe)}}}},24514:function(xn,ln,Ie){"use strict";Ie.d(ln,{G:function(){return Me}});var Le=Ie(47273),Se=function(xe){if((0,Le.Z)()&&window.document.documentElement){var be=Array.isArray(xe)?xe:[xe],ye=window.document.documentElement;return be.some(function(we){return we in ye.style})}return!1},je=function(xe,be){if(!Se(xe))return!1;var ye=document.createElement("div"),we=ye.style[xe];return ye.style[xe]=be,ye.style[xe]!==we};function Me(Ce,xe){return!Array.isArray(Ce)&&xe!==void 0?je(Ce,xe):Se(Ce)}},6790:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return Jt}});var Le=Ie(67711),Se=Ie(26420),je=Ie(98506),Me=Ie(52873),Ce=Ie(16886),xe=Ie(33346),be=Ie(92310),ye=Ie.n(be),we=Ie(29301),pe=Ie(70425),de=Ie(34280),ge=Ie(59301),fe=Ie(4676),ue=ge.forwardRef(function(lt,Ue){var Be=lt.height,tt=lt.offsetY,ht=lt.offsetX,et=lt.children,Ve=lt.prefixCls,Re=lt.onInnerResize,ze=lt.innerProps,it=lt.rtl,Ke=lt.extra,We={},vt={display:"flex",flexDirection:"column"};return tt!==void 0&&(We={height:Be,position:"relative",overflow:"hidden"},vt=(0,je.Z)((0,je.Z)({},vt),{},(0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)({transform:"translateY(".concat(tt,"px)")},it?"marginRight":"marginLeft",-ht),"position","absolute"),"left",0),"right",0),"top",0))),ge.createElement("div",{style:We},ge.createElement(we.Z,{onResize:function(hn){var en=hn.offsetHeight;en&&Re&&Re()}},ge.createElement("div",(0,Le.Z)({style:vt,className:ye()((0,Me.Z)({},"".concat(Ve,"-holder-inner"),Ve)),ref:Ue},ze),et,Ke)))});ue.displayName="Filler";var ee=ue;function z(lt){var Ue=lt.children,Be=lt.setRef,tt=ge.useCallback(function(ht){Be(ht)},[]);return ge.cloneElement(Ue,{ref:tt})}function oe(lt,Ue,Be,tt,ht,et,Ve,Re){var ze=Re.getKey;return lt.slice(Ue,Be+1).map(function(it,Ke){var We=Ue+Ke,vt=Ve(it,We,{style:{width:tt},offsetX:ht}),kt=ze(it);return ge.createElement(z,{key:kt,setRef:function(en){return et(it,en)}},vt)})}function re(lt,Ue,Be,tt){var ht=Be-lt,et=Ue-Be,Ve=Math.min(ht,et)*2;if(tt<=Ve){var Re=Math.floor(tt/2);return tt%2?Be+Re+1:Be-Re}return ht>et?Be-(tt-et):Be+(tt-ht)}function ae(lt,Ue,Be){var tt=lt.length,ht=Ue.length,et,Ve;if(tt===0&&ht===0)return null;tt<ht?(et=lt,Ve=Ue):(et=Ue,Ve=lt);var Re={__EMPTY_ITEM__:!0};function ze(hn){return hn!==void 0?Be(hn):Re}for(var it=null,Ke=Math.abs(tt-ht)!==1,We=0;We<Ve.length;We+=1){var vt=ze(et[We]),kt=ze(Ve[We]);if(vt!==kt){it=We,Ke=Ke||vt!==ze(Ve[We+1]);break}}return it===null?null:{index:it,multiple:Ke}}function le(lt,Ue,Be){var tt=ge.useState(lt),ht=(0,Ce.Z)(tt,2),et=ht[0],Ve=ht[1],Re=ge.useState(null),ze=(0,Ce.Z)(Re,2),it=ze[0],Ke=ze[1];return ge.useEffect(function(){var We=ae(et||[],lt||[],Ue);(We==null?void 0:We.index)!==void 0&&(Be==null||Be(We.index),Ke(lt[We.index])),Ve(lt)},[lt]),[it]}var me=Ie(16089),ve=(typeof navigator=="undefined"?"undefined":(0,Se.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Pe=ve,Ae=function(lt,Ue,Be,tt){var ht=(0,ge.useRef)(!1),et=(0,ge.useRef)(null);function Ve(){clearTimeout(et.current),ht.current=!0,et.current=setTimeout(function(){ht.current=!1},50)}var Re=(0,ge.useRef)({top:lt,bottom:Ue,left:Be,right:tt});return Re.current.top=lt,Re.current.bottom=Ue,Re.current.left=Be,Re.current.right=tt,function(ze,it){var Ke=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,We=ze?it<0&&Re.current.left||it>0&&Re.current.right:it<0&&Re.current.top||it>0&&Re.current.bottom;return Ke&&We?(clearTimeout(et.current),ht.current=!1):(!We||ht.current)&&Ve(),!ht.current&&We}};function De(lt,Ue,Be,tt,ht,et,Ve){var Re=(0,ge.useRef)(0),ze=(0,ge.useRef)(null),it=(0,ge.useRef)(null),Ke=(0,ge.useRef)(!1),We=Ae(Ue,Be,tt,ht);function vt(bn,yn){if(me.Z.cancel(ze.current),!We(!1,yn)){var un=bn;if(!un._virtualHandled)un._virtualHandled=!0;else return;Re.current+=yn,it.current=yn,Pe||un.preventDefault(),ze.current=(0,me.Z)(function(){var Jn=Ke.current?10:1;Ve(Re.current*Jn,!1),Re.current=0})}}function kt(bn,yn){Ve(yn,!0),Pe||bn.preventDefault()}var hn=(0,ge.useRef)(null),en=(0,ge.useRef)(null);function Gt(bn){if(lt){me.Z.cancel(en.current),en.current=(0,me.Z)(function(){hn.current=null},2);var yn=bn.deltaX,un=bn.deltaY,Jn=bn.shiftKey,mn=yn,Yn=un;(hn.current==="sx"||!hn.current&&Jn&&un&&!yn)&&(mn=un,Yn=0,hn.current="sx");var ri=Math.abs(mn),bi=Math.abs(Yn);hn.current===null&&(hn.current=et&&ri>bi?"x":"y"),hn.current==="y"?vt(bn,Yn):kt(bn,mn)}}function gn(bn){lt&&(Ke.current=bn.detail===it.current)}return[Gt,gn]}function Oe(lt,Ue,Be,tt){var ht=ge.useMemo(function(){return[new Map,[]]},[lt,Be.id,tt]),et=(0,Ce.Z)(ht,2),Ve=et[0],Re=et[1],ze=function(Ke){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ke,vt=Ve.get(Ke),kt=Ve.get(We);if(vt===void 0||kt===void 0)for(var hn=lt.length,en=Re.length;en<hn;en+=1){var Gt,gn=lt[en],bn=Ue(gn);Ve.set(bn,en);var yn=(Gt=Be.get(bn))!==null&&Gt!==void 0?Gt:tt;if(Re[en]=(Re[en-1]||0)+yn,bn===Ke&&(vt=en),bn===We&&(kt=en),vt!==void 0&&kt!==void 0)break}return{top:Re[vt-1]||0,bottom:Re[kt]}};return ze}var Ze=Ie(42573),qe=Ie(58698),Xe=function(){function lt(){(0,Ze.Z)(this,lt),(0,Me.Z)(this,"maps",void 0),(0,Me.Z)(this,"id",0),(0,Me.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,qe.Z)(lt,[{key:"set",value:function(Be,tt){this.diffRecords.set(Be,this.maps[Be]),this.maps[Be]=tt,this.id+=1}},{key:"get",value:function(Be){return this.maps[Be]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),lt}(),mt=Xe;function pt(lt){var Ue=parseFloat(lt);return isNaN(Ue)?0:Ue}function Mt(lt,Ue,Be){var tt=ge.useState(0),ht=(0,Ce.Z)(tt,2),et=ht[0],Ve=ht[1],Re=(0,ge.useRef)(new Map),ze=(0,ge.useRef)(new mt),it=(0,ge.useRef)(0);function Ke(){it.current+=1}function We(){var kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ke();var hn=function(){var gn=!1;Re.current.forEach(function(bn,yn){if(bn&&bn.offsetParent){var un=bn.offsetHeight,Jn=getComputedStyle(bn),mn=Jn.marginTop,Yn=Jn.marginBottom,ri=pt(mn),bi=pt(Yn),jn=un+ri+bi;ze.current.get(yn)!==jn&&(ze.current.set(yn,jn),gn=!0)}}),gn&&Ve(function(bn){return bn+1})};if(kt)hn();else{it.current+=1;var en=it.current;Promise.resolve().then(function(){en===it.current&&hn()})}}function vt(kt,hn){var en=lt(kt),Gt=Re.current.get(en);hn?(Re.current.set(en,hn),We()):Re.current.delete(en),!Gt!=!hn&&(hn?Ue==null||Ue(kt):Be==null||Be(kt))}return(0,ge.useEffect)(function(){return Ke},[]),[vt,We,ze.current,et]}var at=14/15;function _t(lt,Ue,Be){var tt=(0,ge.useRef)(!1),ht=(0,ge.useRef)(0),et=(0,ge.useRef)(0),Ve=(0,ge.useRef)(null),Re=(0,ge.useRef)(null),ze,it=function(kt){if(tt.current){var hn=Math.ceil(kt.touches[0].pageX),en=Math.ceil(kt.touches[0].pageY),Gt=ht.current-hn,gn=et.current-en,bn=Math.abs(Gt)>Math.abs(gn);bn?ht.current=hn:et.current=en;var yn=Be(bn,bn?Gt:gn,!1,kt);yn&&kt.preventDefault(),clearInterval(Re.current),yn&&(Re.current=setInterval(function(){bn?Gt*=at:gn*=at;var un=Math.floor(bn?Gt:gn);(!Be(bn,un,!0)||Math.abs(un)<=.1)&&clearInterval(Re.current)},16))}},Ke=function(){tt.current=!1,ze()},We=function(kt){ze(),kt.touches.length===1&&!tt.current&&(tt.current=!0,ht.current=Math.ceil(kt.touches[0].pageX),et.current=Math.ceil(kt.touches[0].pageY),Ve.current=kt.target,Ve.current.addEventListener("touchmove",it,{passive:!1}),Ve.current.addEventListener("touchend",Ke,{passive:!0}))};ze=function(){Ve.current&&(Ve.current.removeEventListener("touchmove",it),Ve.current.removeEventListener("touchend",Ke))},(0,de.Z)(function(){return lt&&Ue.current.addEventListener("touchstart",We,{passive:!0}),function(){var vt;(vt=Ue.current)===null||vt===void 0||vt.removeEventListener("touchstart",We),ze(),clearInterval(Re.current)}},[lt])}function dt(lt){return Math.floor(Math.pow(lt,.5))}function Rt(lt,Ue){var Be="touches"in lt?lt.touches[0]:lt;return Be[Ue?"pageX":"pageY"]-window[Ue?"scrollX":"scrollY"]}function ut(lt,Ue,Be){ge.useEffect(function(){var tt=Ue.current;if(lt&&tt){var ht=!1,et,Ve,Re=function(){me.Z.cancel(et)},ze=function vt(){Re(),et=(0,me.Z)(function(){Be(Ve),vt()})},it=function(kt){if(!(kt.target.draggable||kt.button!==0)){var hn=kt;hn._virtualHandled||(hn._virtualHandled=!0,ht=!0)}},Ke=function(){ht=!1,Re()},We=function(kt){if(ht){var hn=Rt(kt,!1),en=tt.getBoundingClientRect(),Gt=en.top,gn=en.bottom;if(hn<=Gt){var bn=Gt-hn;Ve=-dt(bn),ze()}else if(hn>=gn){var yn=hn-gn;Ve=dt(yn),ze()}else Re()}};return tt.addEventListener("mousedown",it),tt.ownerDocument.addEventListener("mouseup",Ke),tt.ownerDocument.addEventListener("mousemove",We),function(){tt.removeEventListener("mousedown",it),tt.ownerDocument.removeEventListener("mouseup",Ke),tt.ownerDocument.removeEventListener("mousemove",We),Re()}}},[lt])}var rt=10;function ct(lt,Ue,Be,tt,ht,et,Ve,Re){var ze=ge.useRef(),it=ge.useState(null),Ke=(0,Ce.Z)(it,2),We=Ke[0],vt=Ke[1];return(0,de.Z)(function(){if(We&&We.times<rt){if(!lt.current){vt(function(cr){return(0,je.Z)({},cr)});return}et();var kt=We.targetAlign,hn=We.originAlign,en=We.index,Gt=We.offset,gn=lt.current.clientHeight,bn=!1,yn=kt,un=null;if(gn){for(var Jn=kt||hn,mn=0,Yn=0,ri=0,bi=Math.min(Ue.length-1,en),jn=0;jn<=bi;jn+=1){var ki=ht(Ue[jn]);Yn=mn;var Hi=Be.get(ki);ri=Yn+(Hi===void 0?tt:Hi),mn=ri}for(var Fi=Jn==="top"?Gt:gn-Gt,rr=bi;rr>=0;rr-=1){var Cr=ht(Ue[rr]),gr=Be.get(Cr);if(gr===void 0){bn=!0;break}if(Fi-=gr,Fi<=0)break}switch(Jn){case"top":un=Yn-Gt;break;case"bottom":un=ri-gn+Gt;break;default:{var Ni=lt.current.scrollTop,Ti=Ni+gn;Yn<Ni?yn="top":ri>Ti&&(yn="bottom")}}un!==null&&Ve(un),un!==We.lastTop&&(bn=!0)}bn&&vt((0,je.Z)((0,je.Z)({},We),{},{times:We.times+1,targetAlign:yn,lastTop:un}))}},[We,lt.current]),function(kt){if(kt==null){Re();return}if(me.Z.cancel(ze.current),typeof kt=="number")Ve(kt);else if(kt&&(0,Se.Z)(kt)==="object"){var hn,en=kt.align;"index"in kt?hn=kt.index:hn=Ue.findIndex(function(bn){return ht(bn)===kt.key});var Gt=kt.offset,gn=Gt===void 0?0:Gt;vt({times:0,index:hn,offset:gn,originAlign:en})}}}var yt=ge.forwardRef(function(lt,Ue){var Be=lt.prefixCls,tt=lt.rtl,ht=lt.scrollOffset,et=lt.scrollRange,Ve=lt.onStartMove,Re=lt.onStopMove,ze=lt.onScroll,it=lt.horizontal,Ke=lt.spinSize,We=lt.containerSize,vt=lt.style,kt=lt.thumbStyle,hn=lt.showScrollBar,en=ge.useState(!1),Gt=(0,Ce.Z)(en,2),gn=Gt[0],bn=Gt[1],yn=ge.useState(null),un=(0,Ce.Z)(yn,2),Jn=un[0],mn=un[1],Yn=ge.useState(null),ri=(0,Ce.Z)(Yn,2),bi=ri[0],jn=ri[1],ki=!tt,Hi=ge.useRef(),Fi=ge.useRef(),rr=ge.useState(hn),Cr=(0,Ce.Z)(rr,2),gr=Cr[0],Ni=Cr[1],Ti=ge.useRef(),cr=function(){hn===!0||hn===!1||(clearTimeout(Ti.current),Ni(!0),Ti.current=setTimeout(function(){Ni(!1)},3e3))},$e=et-We||0,Li=We-Ke||0,ti=ge.useMemo(function(){if(ht===0||$e===0)return 0;var ot=ht/$e;return ot*Li},[ht,$e,Li]),Oi=function(Et){Et.stopPropagation(),Et.preventDefault()},pr=ge.useRef({top:ti,dragging:gn,pageY:Jn,startTop:bi});pr.current={top:ti,dragging:gn,pageY:Jn,startTop:bi};var dr=function(Et){bn(!0),mn(Rt(Et,it)),jn(pr.current.top),Ve(),Et.stopPropagation(),Et.preventDefault()};ge.useEffect(function(){var ot=function(jt){jt.preventDefault()},Et=Hi.current,Nt=Fi.current;return Et.addEventListener("touchstart",ot,{passive:!1}),Nt.addEventListener("touchstart",dr,{passive:!1}),function(){Et.removeEventListener("touchstart",ot),Nt.removeEventListener("touchstart",dr)}},[]);var Qi=ge.useRef();Qi.current=$e;var So=ge.useRef();So.current=Li,ge.useEffect(function(){if(gn){var ot,Et=function(jt){var cn=pr.current,On=cn.dragging,pi=cn.pageY,Fn=cn.startTop;me.Z.cancel(ot);var Lt=Hi.current.getBoundingClientRect(),Ht=We/(it?Lt.width:Lt.height);if(On){var Pn=(Rt(jt,it)-pi)*Ht,Sn=Fn;!ki&&it?Sn-=Pn:Sn+=Pn;var Kt=Qi.current,vn=So.current,Hn=vn?Sn/vn:0,Gn=Math.ceil(Hn*Kt);Gn=Math.max(Gn,0),Gn=Math.min(Gn,Kt),ot=(0,me.Z)(function(){ze(Gn,it)})}},Nt=function(){bn(!1),Re()};return window.addEventListener("mousemove",Et,{passive:!0}),window.addEventListener("touchmove",Et,{passive:!0}),window.addEventListener("mouseup",Nt,{passive:!0}),window.addEventListener("touchend",Nt,{passive:!0}),function(){window.removeEventListener("mousemove",Et),window.removeEventListener("touchmove",Et),window.removeEventListener("mouseup",Nt),window.removeEventListener("touchend",Nt),me.Z.cancel(ot)}}},[gn]),ge.useEffect(function(){return cr(),function(){clearTimeout(Ti.current)}},[ht]),ge.useImperativeHandle(Ue,function(){return{delayHidden:cr}});var $t="".concat(Be,"-scrollbar"),Ge={position:"absolute",visibility:gr?null:"hidden"},Je={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return it?(Object.assign(Ge,{height:8,left:0,right:0,bottom:0}),Object.assign(Je,(0,Me.Z)({height:"100%",width:Ke},ki?"left":"right",ti))):(Object.assign(Ge,(0,Me.Z)({width:8,top:0,bottom:0},ki?"right":"left",0)),Object.assign(Je,{width:"100%",height:Ke,top:ti})),ge.createElement("div",{ref:Hi,className:ye()($t,(0,Me.Z)((0,Me.Z)((0,Me.Z)({},"".concat($t,"-horizontal"),it),"".concat($t,"-vertical"),!it),"".concat($t,"-visible"),gr)),style:(0,je.Z)((0,je.Z)({},Ge),vt),onMouseDown:Oi,onMouseMove:cr},ge.createElement("div",{ref:Fi,className:ye()("".concat($t,"-thumb"),(0,Me.Z)({},"".concat($t,"-thumb-moving"),gn)),style:(0,je.Z)((0,je.Z)({},Je),kt),onMouseDown:dr}))}),wt=yt,xt=20;function Ut(){var lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Be=lt/Ue*lt;return isNaN(Be)&&(Be=0),Be=Math.max(Be,xt),Math.floor(Be)}var zt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],dn=[],Ft={overflowY:"auto",overflowAnchor:"none"};function Dt(lt,Ue){var Be=lt.prefixCls,tt=Be===void 0?"rc-virtual-list":Be,ht=lt.className,et=lt.height,Ve=lt.itemHeight,Re=lt.fullHeight,ze=Re===void 0?!0:Re,it=lt.style,Ke=lt.data,We=lt.children,vt=lt.itemKey,kt=lt.virtual,hn=lt.direction,en=lt.scrollWidth,Gt=lt.component,gn=Gt===void 0?"div":Gt,bn=lt.onScroll,yn=lt.onVirtualScroll,un=lt.onVisibleChange,Jn=lt.innerProps,mn=lt.extraRender,Yn=lt.styles,ri=lt.showScrollBar,bi=ri===void 0?"optional":ri,jn=(0,xe.Z)(lt,zt),ki=ge.useCallback(function(An){return typeof vt=="function"?vt(An):An==null?void 0:An[vt]},[vt]),Hi=Mt(ki,null,null),Fi=(0,Ce.Z)(Hi,4),rr=Fi[0],Cr=Fi[1],gr=Fi[2],Ni=Fi[3],Ti=!!(kt!==!1&&et&&Ve),cr=ge.useMemo(function(){return Object.values(gr.maps).reduce(function(An,Xn){return An+Xn},0)},[gr.id,gr.maps]),$e=Ti&&Ke&&(Math.max(Ve*Ke.length,cr)>et||!!en),Li=hn==="rtl",ti=ye()(tt,(0,Me.Z)({},"".concat(tt,"-rtl"),Li),ht),Oi=Ke||dn,pr=(0,ge.useRef)(),dr=(0,ge.useRef)(),Qi=(0,ge.useRef)(),So=(0,ge.useState)(0),$t=(0,Ce.Z)(So,2),Ge=$t[0],Je=$t[1],ot=(0,ge.useState)(0),Et=(0,Ce.Z)(ot,2),Nt=Et[0],pn=Et[1],jt=(0,ge.useState)(!1),cn=(0,Ce.Z)(jt,2),On=cn[0],pi=cn[1],Fn=function(){pi(!0)},Lt=function(){pi(!1)},Ht={getKey:ki};function Pn(An){Je(function(Xn){var $n;typeof An=="function"?$n=An(Xn):$n=An;var Un=Vi($n);return pr.current.scrollTop=Un,Un})}var Sn=(0,ge.useRef)({start:0,end:Oi.length}),Kt=(0,ge.useRef)(),vn=le(Oi,ki),Hn=(0,Ce.Z)(vn,1),Gn=Hn[0];Kt.current=Gn;var oi=ge.useMemo(function(){if(!Ti)return{scrollHeight:void 0,start:0,end:Oi.length-1,offset:void 0};if(!$e){var An;return{scrollHeight:((An=dr.current)===null||An===void 0?void 0:An.offsetHeight)||0,start:0,end:Oi.length-1,offset:void 0}}for(var Xn=0,$n,Un,Qn,Vn=Oi.length,ni=0;ni<Vn;ni+=1){var ci=Oi[ni],wn=ki(ci),zi=gr.get(wn),Gi=Xn+(zi===void 0?Ve:zi);Gi>=Ge&&$n===void 0&&($n=ni,Un=Xn),Gi>Ge+et&&Qn===void 0&&(Qn=ni),Xn=Gi}return $n===void 0&&($n=0,Un=0,Qn=Math.ceil(et/Ve)),Qn===void 0&&(Qn=Oi.length-1),Qn=Math.min(Qn+1,Oi.length-1),{scrollHeight:Xn,start:$n,end:Qn,offset:Un}},[$e,Ti,Ge,Oi,Ni,et]),Wn=oi.scrollHeight,zn=oi.start,Mn=oi.end,wi=oi.offset;Sn.current.start=zn,Sn.current.end=Mn,ge.useLayoutEffect(function(){var An=gr.getRecord();if(An.size===1){var Xn=Array.from(An.keys())[0],$n=An.get(Xn),Un=Oi[zn];if(Un&&$n===void 0){var Qn=ki(Un);if(Qn===Xn){var Vn=gr.get(Xn),ni=Vn-Ve;Pn(function(ci){return ci+ni})}}}gr.resetRecord()},[Wn]);var mi=ge.useState({width:0,height:et}),En=(0,Ce.Z)(mi,2),ei=En[0],er=En[1],Sr=function(Xn){er({width:Xn.offsetWidth,height:Xn.offsetHeight})},Tr=(0,ge.useRef)(),nn=(0,ge.useRef)(),Mi=ge.useMemo(function(){return Ut(ei.width,en)},[ei.width,en]),tr=ge.useMemo(function(){return Ut(ei.height,Wn)},[ei.height,Wn]),vi=Wn-et,or=(0,ge.useRef)(vi);or.current=vi;function Vi(An){var Xn=An;return Number.isNaN(or.current)||(Xn=Math.min(Xn,or.current)),Xn=Math.max(Xn,0),Xn}var yr=Ge<=0,fr=Ge>=vi,_r=Nt<=0,Yr=Nt>=en,Ln=Ae(yr,fr,_r,Yr),oo=function(){return{x:Li?-Nt:Nt,y:Ge}},kn=(0,ge.useRef)(oo()),Di=(0,pe.zX)(function(An){if(yn){var Xn=(0,je.Z)((0,je.Z)({},oo()),An);(kn.current.x!==Xn.x||kn.current.y!==Xn.y)&&(yn(Xn),kn.current=Xn)}});function Lr(An,Xn){var $n=An;Xn?((0,fe.flushSync)(function(){pn($n)}),Di()):Pn($n)}function sr(An){var Xn=An.currentTarget.scrollTop;Xn!==Ge&&Pn(Xn),bn==null||bn(An),Di()}var so=function(Xn){var $n=Xn,Un=en?en-ei.width:0;return $n=Math.max($n,0),$n=Math.min($n,Un),$n},Er=(0,pe.zX)(function(An,Xn){Xn?((0,fe.flushSync)(function(){pn(function($n){var Un=$n+(Li?-An:An);return so(Un)})}),Di()):Pn(function($n){var Un=$n+An;return Un})}),mr=De(Ti,yr,fr,_r,Yr,!!en,Er),_o=(0,Ce.Z)(mr,2),an=_o[0],Nn=_o[1];_t(Ti,pr,function(An,Xn,$n,Un){var Qn=Un;return Ln(An,Xn,$n)?!1:!Qn||!Qn._virtualHandled?(Qn&&(Qn._virtualHandled=!0),an({preventDefault:function(){},deltaX:An?Xn:0,deltaY:An?0:Xn}),!0):!1}),ut($e,pr,function(An){Pn(function(Xn){return Xn+An})}),(0,de.Z)(function(){function An($n){var Un=yr&&$n.detail<0,Qn=fr&&$n.detail>0;Ti&&!Un&&!Qn&&$n.preventDefault()}var Xn=pr.current;return Xn.addEventListener("wheel",an,{passive:!1}),Xn.addEventListener("DOMMouseScroll",Nn,{passive:!0}),Xn.addEventListener("MozMousePixelScroll",An,{passive:!1}),function(){Xn.removeEventListener("wheel",an),Xn.removeEventListener("DOMMouseScroll",Nn),Xn.removeEventListener("MozMousePixelScroll",An)}},[Ti,yr,fr]),(0,de.Z)(function(){if(en){var An=so(Nt);pn(An),Di({x:An})}},[ei.width,en]);var on=function(){var Xn,$n;(Xn=Tr.current)===null||Xn===void 0||Xn.delayHidden(),($n=nn.current)===null||$n===void 0||$n.delayHidden()},ft=ct(pr,Oi,gr,Ve,ki,function(){return Cr(!0)},Pn,on);ge.useImperativeHandle(Ue,function(){return{nativeElement:Qi.current,getScrollInfo:oo,scrollTo:function(Xn){function $n(Un){return Un&&(0,Se.Z)(Un)==="object"&&("left"in Un||"top"in Un)}$n(Xn)?(Xn.left!==void 0&&pn(so(Xn.left)),ft(Xn.top)):ft(Xn)}}}),(0,de.Z)(function(){if(un){var An=Oi.slice(zn,Mn+1);un(An,Oi)}},[zn,Mn,Oi]);var Zn=Oe(Oi,ki,gr,Ve),si=mn==null?void 0:mn({start:zn,end:Mn,virtual:$e,offsetX:Nt,offsetY:wi,rtl:Li,getSize:Zn}),Ei=oe(Oi,zn,Mn,en,Nt,rr,We,Ht),yi=null;et&&(yi=(0,je.Z)((0,Me.Z)({},ze?"height":"maxHeight",et),Ft),Ti&&(yi.overflowY="hidden",en&&(yi.overflowX="hidden"),On&&(yi.pointerEvents="none")));var di={};return Li&&(di.dir="rtl"),ge.createElement("div",(0,Le.Z)({ref:Qi,style:(0,je.Z)((0,je.Z)({},it),{},{position:"relative"}),className:ti},di,jn),ge.createElement(we.Z,{onResize:Sr},ge.createElement(gn,{className:"".concat(tt,"-holder"),style:yi,ref:pr,onScroll:sr,onMouseEnter:on},ge.createElement(ee,{prefixCls:tt,height:Wn,offsetX:Nt,offsetY:wi,scrollWidth:en,onInnerResize:Cr,ref:dr,innerProps:Jn,rtl:Li,extra:si},Ei))),$e&&Wn>et&&ge.createElement(wt,{ref:Tr,prefixCls:tt,scrollOffset:Ge,scrollRange:Wn,rtl:Li,onScroll:Lr,onStartMove:Fn,onStopMove:Lt,spinSize:tr,containerSize:ei.height,style:Yn==null?void 0:Yn.verticalScrollBar,thumbStyle:Yn==null?void 0:Yn.verticalScrollBarThumb,showScrollBar:bi}),$e&&en>ei.width&&ge.createElement(wt,{ref:nn,prefixCls:tt,scrollOffset:Nt,scrollRange:en,rtl:Li,onScroll:Lr,onStartMove:Fn,onStopMove:Lt,spinSize:Mi,containerSize:ei.width,horizontal:!0,style:Yn==null?void 0:Yn.horizontalScrollBar,thumbStyle:Yn==null?void 0:Yn.horizontalScrollBarThumb,showScrollBar:bi}))}var Qt=ge.forwardRef(Dt);Qt.displayName="List";var Yt=Qt,Jt=Yt},7062:function(xn,ln,Ie){var Le=Ie(19637),Se=Ie(97573),je=[Ie(96627)];xn.exports=Le.createStore(Se,je)},96627:function(xn,ln,Ie){xn.exports=Le;function Le(){return Ie(42424),{}}},42424:function(){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(xn){return xn<10?"0"+xn:xn}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(xn){return rx_escapable.lastIndex=0,rx_escapable.test(xn)?'"'+xn.replace(rx_escapable,function(ln){var Ie=meta[ln];return typeof Ie=="string"?Ie:"\\u"+("0000"+ln.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+xn+'"'}function str(xn,ln){var Ie,Le,Se,je,Me=gap,Ce,xe=ln[xn];switch(xe&&typeof xe=="object"&&typeof xe.toJSON=="function"&&(xe=xe.toJSON(xn)),typeof rep=="function"&&(xe=rep.call(ln,xn,xe)),typeof xe){case"string":return quote(xe);case"number":return isFinite(xe)?String(xe):"null";case"boolean":case"null":return String(xe);case"object":if(!xe)return"null";if(gap+=indent,Ce=[],Object.prototype.toString.apply(xe)==="[object Array]"){for(je=xe.length,Ie=0;Ie<je;Ie+=1)Ce[Ie]=str(Ie,xe)||"null";return Se=Ce.length===0?"[]":gap?`[
|
|
|
`+gap+Ce.join(`,
|
|
|
`+gap)+`
|
|
|
`+Me+"]":"["+Ce.join(",")+"]",gap=Me,Se}if(rep&&typeof rep=="object")for(je=rep.length,Ie=0;Ie<je;Ie+=1)typeof rep[Ie]=="string"&&(Le=rep[Ie],Se=str(Le,xe),Se&&Ce.push(quote(Le)+(gap?": ":":")+Se));else for(Le in xe)Object.prototype.hasOwnProperty.call(xe,Le)&&(Se=str(Le,xe),Se&&Ce.push(quote(Le)+(gap?": ":":")+Se));return Se=Ce.length===0?"{}":gap?`{
|
|
|
`+gap+Ce.join(`,
|
|
|
`+gap)+`
|
|
|
`+Me+"}":"{"+Ce.join(",")+"}",gap=Me,Se}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(xn,ln,Ie){var Le;if(gap="",indent="",typeof Ie=="number")for(Le=0;Le<Ie;Le+=1)indent+=" ";else typeof Ie=="string"&&(indent=Ie);if(rep=ln,ln&&typeof ln!="function"&&(typeof ln!="object"||typeof ln.length!="number"))throw new Error("JSON.stringify");return str("",{"":xn})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(xn,ln){var Ie,Le,Se=xn[ln];if(Se&&typeof Se=="object")for(Ie in Se)Object.prototype.hasOwnProperty.call(Se,Ie)&&(Le=walk(Se,Ie),Le!==void 0?Se[Ie]=Le:delete Se[Ie]);return reviver.call(xn,ln,Se)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(xn){return"\\u"+("0000"+xn.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},19637:function(xn,ln,Ie){var Le=Ie(67039),Se=Le.slice,je=Le.pluck,Me=Le.each,Ce=Le.bind,xe=Le.create,be=Le.isList,ye=Le.isFunction,we=Le.isObject;xn.exports={createStore:ge};var pe={version:"2.0.12",enabled:!1,get:function(fe,ue){var ee=this.storage.read(this._namespacePrefix+fe);return this._deserialize(ee,ue)},set:function(fe,ue){return ue===void 0?this.remove(fe):(this.storage.write(this._namespacePrefix+fe,this._serialize(ue)),ue)},remove:function(fe){this.storage.remove(this._namespacePrefix+fe)},each:function(fe){var ue=this;this.storage.each(function(ee,z){fe.call(ue,ue._deserialize(ee),(z||"").replace(ue._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(fe){return this._namespacePrefix=="__storejs_"+fe+"_"},createStore:function(){return ge.apply(this,arguments)},addPlugin:function(fe){this._addPlugin(fe)},namespace:function(fe){return ge(this.storage,this.plugins,fe)}};function de(){var fe=typeof console=="undefined"?null:console;if(fe){var ue=fe.warn?fe.warn:fe.log;ue.apply(fe,arguments)}}function ge(fe,ue,ee){ee||(ee=""),fe&&!be(fe)&&(fe=[fe]),ue&&!be(ue)&&(ue=[ue]);var z=ee?"__storejs_"+ee+"_":"",oe=ee?new RegExp("^"+z):null,re=/^[a-zA-Z0-9_\-]*$/;if(!re.test(ee))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var ae={_namespacePrefix:z,_namespaceRegexp:oe,_testStorage:function(me){try{var ve="__storejs__test__";me.write(ve,ve);var Pe=me.read(ve)===ve;return me.remove(ve),Pe}catch(Ae){return!1}},_assignPluginFnProp:function(me,ve){var Pe=this[ve];this[ve]=function(){var De=Se(arguments,0),Oe=this;function Ze(){if(Pe)return Me(arguments,function(Xe,mt){De[mt]=Xe}),Pe.apply(Oe,De)}var qe=[Ze].concat(De);return me.apply(Oe,qe)}},_serialize:function(me){return JSON.stringify(me)},_deserialize:function(me,ve){if(!me)return ve;var Pe="";try{Pe=JSON.parse(me)}catch(Ae){Pe=me}return Pe!==void 0?Pe:ve},_addStorage:function(me){this.enabled||this._testStorage(me)&&(this.storage=me,this.enabled=!0)},_addPlugin:function(me){var ve=this;if(be(me)){Me(me,function(De){ve._addPlugin(De)});return}var Pe=je(this.plugins,function(De){return me===De});if(!Pe){if(this.plugins.push(me),!ye(me))throw new Error("Plugins must be function values that return objects");var Ae=me.call(this);if(!we(Ae))throw new Error("Plugins must return an object of function properties");Me(Ae,function(De,Oe){if(!ye(De))throw new Error("Bad plugin property: "+Oe+" from plugin "+me.name+". Plugins should only return functions.");ve._assignPluginFnProp(De,Oe)})}},addStorage:function(me){de("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(me)}},le=xe(ae,pe,{plugins:[]});return le.raw={},Me(le,function(me,ve){ye(me)&&(le.raw[ve]=Ce(le,me))}),Me(fe,function(me){le._addStorage(me)}),Me(ue,function(me){le._addPlugin(me)}),le}},67039:function(xn,ln,Ie){var Le=Ce(),Se=xe(),je=be(),Me=typeof window!="undefined"?window:Ie.g;xn.exports={assign:Le,create:Se,trim:je,bind:ye,slice:we,each:pe,map:de,pluck:ge,isList:fe,isFunction:ue,isObject:ee,Global:Me};function Ce(){return Object.assign?Object.assign:function(oe,re,ae,le){for(var me=1;me<arguments.length;me++)pe(Object(arguments[me]),function(ve,Pe){oe[Pe]=ve});return oe}}function xe(){if(Object.create)return function(re,ae,le,me){var ve=we(arguments,1);return Le.apply(this,[Object.create(re)].concat(ve))};{let oe=function(){};var z=oe;return function(ae,le,me,ve){var Pe=we(arguments,1);return oe.prototype=ae,Le.apply(this,[new oe].concat(Pe))}}}function be(){return String.prototype.trim?function(oe){return String.prototype.trim.call(oe)}:function(oe){return oe.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function ye(z,oe){return function(){return oe.apply(z,Array.prototype.slice.call(arguments,0))}}function we(z,oe){return Array.prototype.slice.call(z,oe||0)}function pe(z,oe){ge(z,function(re,ae){return oe(re,ae),!1})}function de(z,oe){var re=fe(z)?[]:{};return ge(z,function(ae,le){return re[le]=oe(ae,le),!1}),re}function ge(z,oe){if(fe(z)){for(var re=0;re<z.length;re++)if(oe(z[re],re))return z[re]}else for(var ae in z)if(z.hasOwnProperty(ae)&&oe(z[ae],ae))return z[ae]}function fe(z){return z!=null&&typeof z!="function"&&typeof z.length=="number"}function ue(z){return z&&{}.toString.call(z)==="[object Function]"}function ee(z){return z&&{}.toString.call(z)==="[object Object]"}},97573:function(xn,ln,Ie){xn.exports=[Ie(52496),Ie(16436),Ie(76673),Ie(35701),Ie(65578),Ie(65300)]},35701:function(xn,ln,Ie){var Le=Ie(67039),Se=Le.Global,je=Le.trim;xn.exports={name:"cookieStorage",read:Ce,write:be,each:xe,remove:ye,clearAll:we};var Me=Se.document;function Ce(de){if(!de||!pe(de))return null;var ge="(?:^|.*;\\s*)"+escape(de).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(Me.cookie.replace(new RegExp(ge),"$1"))}function xe(de){for(var ge=Me.cookie.split(/; ?/g),fe=ge.length-1;fe>=0;fe--)if(je(ge[fe])){var ue=ge[fe].split("="),ee=unescape(ue[0]),z=unescape(ue[1]);de(z,ee)}}function be(de,ge){de&&(Me.cookie=escape(de)+"="+escape(ge)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function ye(de){!de||!pe(de)||(Me.cookie=escape(de)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function we(){xe(function(de,ge){ye(ge)})}function pe(de){return new RegExp("(?:^|;\\s*)"+escape(de).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(Me.cookie)}},52496:function(xn,ln,Ie){var Le=Ie(67039),Se=Le.Global;xn.exports={name:"localStorage",read:Me,write:Ce,each:xe,remove:be,clearAll:ye};function je(){return Se.localStorage}function Me(we){return je().getItem(we)}function Ce(we,pe){return je().setItem(we,pe)}function xe(we){for(var pe=je().length-1;pe>=0;pe--){var de=je().key(pe);we(Me(de),de)}}function be(we){return je().removeItem(we)}function ye(){return je().clear()}},65300:function(xn){xn.exports={name:"memoryStorage",read:Ie,write:Le,each:Se,remove:je,clearAll:Me};var ln={};function Ie(Ce){return ln[Ce]}function Le(Ce,xe){ln[Ce]=xe}function Se(Ce){for(var xe in ln)ln.hasOwnProperty(xe)&&Ce(ln[xe],xe)}function je(Ce){delete ln[Ce]}function Me(Ce){ln={}}},16436:function(xn,ln,Ie){var Le=Ie(67039),Se=Le.Global;xn.exports={name:"oldFF-globalStorage",read:Me,write:Ce,each:xe,remove:be,clearAll:ye};var je=Se.globalStorage;function Me(we){return je[we]}function Ce(we,pe){je[we]=pe}function xe(we){for(var pe=je.length-1;pe>=0;pe--){var de=je.key(pe);we(je[de],de)}}function be(we){return je.removeItem(we)}function ye(){xe(function(we,pe){delete je[we]})}},76673:function(xn,ln,Ie){var Le=Ie(67039),Se=Le.Global;xn.exports={name:"oldIE-userDataStorage",write:be,read:ye,each:we,remove:pe,clearAll:de};var je="storejs",Me=Se.document,Ce=ue(),xe=(Se.navigator?Se.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function be(ee,z){if(!xe){var oe=fe(ee);Ce(function(re){re.setAttribute(oe,z),re.save(je)})}}function ye(ee){if(!xe){var z=fe(ee),oe=null;return Ce(function(re){oe=re.getAttribute(z)}),oe}}function we(ee){Ce(function(z){for(var oe=z.XMLDocument.documentElement.attributes,re=oe.length-1;re>=0;re--){var ae=oe[re];ee(z.getAttribute(ae.name),ae.name)}})}function pe(ee){var z=fe(ee);Ce(function(oe){oe.removeAttribute(z),oe.save(je)})}function de(){Ce(function(ee){var z=ee.XMLDocument.documentElement.attributes;ee.load(je);for(var oe=z.length-1;oe>=0;oe--)ee.removeAttribute(z[oe].name);ee.save(je)})}var ge=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function fe(ee){return ee.replace(/^\d/,"___$&").replace(ge,"___")}function ue(){if(!Me||!Me.documentElement||!Me.documentElement.addBehavior)return null;var ee="script",z,oe,re;try{oe=new ActiveXObject("htmlfile"),oe.open(),oe.write("<"+ee+">document.w=window</"+ee+'><iframe src="/favicon.ico"></iframe>'),oe.close(),z=oe.w.frames[0].document,re=z.createElement("div")}catch(ae){re=Me.createElement("div"),z=Me.body}return function(ae){var le=[].slice.call(arguments,0);le.unshift(re),z.appendChild(re),re.addBehavior("#default#userData"),re.load(je),ae.apply(this,le),z.removeChild(re)}}},65578:function(xn,ln,Ie){var Le=Ie(67039),Se=Le.Global;xn.exports={name:"sessionStorage",read:Me,write:Ce,each:xe,remove:be,clearAll:ye};function je(){return Se.sessionStorage}function Me(we){return je().getItem(we)}function Ce(we,pe){return je().setItem(we,pe)}function xe(we){for(var pe=je().length-1;pe>=0;pe--){var de=je().key(pe);we(Me(de),de)}}function be(we){return je().removeItem(we)}function ye(){return je().clear()}},82059:function(xn){var ln=arguments[3],Ie=arguments[4],Le=arguments[5],Se=JSON.stringify;xn.exports=function(je,Me){for(var Ce,xe=Object.keys(Le),be=0,ye=xe.length;be<ye;be++){var we=xe[be],pe=Le[we].exports;if(pe===je||pe&&pe.default===je){Ce=we;break}}if(!Ce){Ce=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var de={},be=0,ye=xe.length;be<ye;be++){var we=xe[be];de[we]=we}Ie[Ce]=["function(require,module,exports){"+je+"(self); }",de]}var ge=Math.floor(Math.pow(16,8)*Math.random()).toString(16),fe={};fe[Ce]=Ce,Ie[ge]=["function(require,module,exports){var f = require("+Se(Ce)+");(f.default ? f.default : f)(self);}",fe];var ue={};ee(ge);function ee(me){ue[me]=!0;for(var ve in Ie[me][1]){var Pe=Ie[me][1][ve];ue[Pe]||ee(Pe)}}var z="("+ln+")({"+Object.keys(ue).map(function(me){return Se(me)+":["+Ie[me][0]+","+Se(Ie[me][1])+"]"}).join(",")+"},{},["+Se(ge)+"])",oe=window.URL||window.webkitURL||window.mozURL||window.msURL,re=new Blob([z],{type:"text/javascript"});if(Me&&Me.bare)return re;var ae=oe.createObjectURL(re),le=new Worker(ae);return le.objectURL=ae,le}},34376:function(xn){(function(ln,Ie){if(1)xn.exports=Ie();else var Le,Se})(window,function(){return function(ln){var Ie={};function Le(Se){if(Ie[Se])return Ie[Se].exports;var je=Ie[Se]={i:Se,l:!1,exports:{}};return ln[Se].call(je.exports,je,je.exports,Le),je.l=!0,je.exports}return Le.m=ln,Le.c=Ie,Le.d=function(Se,je,Me){Le.o(Se,je)||Object.defineProperty(Se,je,{enumerable:!0,get:Me})},Le.r=function(Se){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(Se,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(Se,"__esModule",{value:!0})},Le.t=function(Se,je){if(1&je&&(Se=Le(Se)),8&je||4&je&&typeof Se=="object"&&Se&&Se.__esModule)return Se;var Me=Object.create(null);if(Le.r(Me),Object.defineProperty(Me,"default",{enumerable:!0,value:Se}),2&je&&typeof Se!="string")for(var Ce in Se)Le.d(Me,Ce,function(xe){return Se[xe]}.bind(null,Ce));return Me},Le.n=function(Se){var je=Se&&Se.__esModule?function(){return Se.default}:function(){return Se};return Le.d(je,"a",je),je},Le.o=function(Se,je){return Object.prototype.hasOwnProperty.call(Se,je)},Le.p="",Le(Le.s=34)}([function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.forwardEvent=Ie.EventEmitter=void 0;var Se=function(){function je(){this._listeners=[],this._disposed=!1}return Object.defineProperty(je.prototype,"event",{get:function(){var Me=this;return this._event||(this._event=function(Ce){return Me._listeners.push(Ce),{dispose:function(){if(!Me._disposed){for(var xe=0;xe<Me._listeners.length;xe++)if(Me._listeners[xe]===Ce)return void Me._listeners.splice(xe,1)}}}}),this._event},enumerable:!1,configurable:!0}),je.prototype.fire=function(Me,Ce){for(var xe=[],be=0;be<this._listeners.length;be++)xe.push(this._listeners[be]);for(be=0;be<xe.length;be++)xe[be].call(void 0,Me,Ce)},je.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},je}();Ie.EventEmitter=Se,Ie.forwardEvent=function(je,Me){return je(function(Ce){return Me.fire(Ce)})}},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.IUnicodeService=Ie.IOptionsService=Ie.ILogService=Ie.IInstantiationService=Ie.IDirtyRowService=Ie.ICharsetService=Ie.ICoreService=Ie.ICoreMouseService=Ie.IBufferService=void 0;var Se=Le(14);Ie.IBufferService=Se.createDecorator("BufferService"),Ie.ICoreMouseService=Se.createDecorator("CoreMouseService"),Ie.ICoreService=Se.createDecorator("CoreService"),Ie.ICharsetService=Se.createDecorator("CharsetService"),Ie.IDirtyRowService=Se.createDecorator("DirtyRowService"),Ie.IInstantiationService=Se.createDecorator("InstantiationService"),Ie.ILogService=Se.createDecorator("LogService"),Ie.IOptionsService=Se.createDecorator("OptionsService"),Ie.IUnicodeService=Se.createDecorator("UnicodeService")},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.getDisposeArrayDisposable=Ie.disposeArray=Ie.Disposable=void 0;var Se=function(){function Me(){this._disposables=[],this._isDisposed=!1}return Me.prototype.dispose=function(){this._isDisposed=!0;for(var Ce=0,xe=this._disposables;Ce<xe.length;Ce++)xe[Ce].dispose();this._disposables.length=0},Me.prototype.register=function(Ce){return this._disposables.push(Ce),Ce},Me.prototype.unregister=function(Ce){var xe=this._disposables.indexOf(Ce);xe!==-1&&this._disposables.splice(xe,1)},Me}();function je(Me){for(var Ce=0,xe=Me;Ce<xe.length;Ce++)xe[Ce].dispose();Me.length=0}Ie.Disposable=Se,Ie.disposeArray=je,Ie.getDisposeArrayDisposable=function(Me){return{dispose:function(){return je(Me)}}}},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.WHITESPACE_CELL_CODE=Ie.WHITESPACE_CELL_WIDTH=Ie.WHITESPACE_CELL_CHAR=Ie.NULL_CELL_CODE=Ie.NULL_CELL_WIDTH=Ie.NULL_CELL_CHAR=Ie.CHAR_DATA_CODE_INDEX=Ie.CHAR_DATA_WIDTH_INDEX=Ie.CHAR_DATA_CHAR_INDEX=Ie.CHAR_DATA_ATTR_INDEX=Ie.DEFAULT_ATTR=Ie.DEFAULT_COLOR=void 0,Ie.DEFAULT_COLOR=256,Ie.DEFAULT_ATTR=256|Ie.DEFAULT_COLOR<<9,Ie.CHAR_DATA_ATTR_INDEX=0,Ie.CHAR_DATA_CHAR_INDEX=1,Ie.CHAR_DATA_WIDTH_INDEX=2,Ie.CHAR_DATA_CODE_INDEX=3,Ie.NULL_CELL_CHAR="",Ie.NULL_CELL_WIDTH=1,Ie.NULL_CELL_CODE=0,Ie.WHITESPACE_CELL_CHAR=" ",Ie.WHITESPACE_CELL_WIDTH=1,Ie.WHITESPACE_CELL_CODE=32},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(ye,we){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(pe,de){pe.__proto__=de}||function(pe,de){for(var ge in de)de.hasOwnProperty(ge)&&(pe[ge]=de[ge])})(ye,we)},function(ye,we){function pe(){this.constructor=ye}Se(ye,we),ye.prototype=we===null?Object.create(we):(pe.prototype=we.prototype,new pe)});Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.CellData=void 0;var Me=Le(8),Ce=Le(3),xe=Le(6),be=function(ye){function we(){var pe=ye!==null&&ye.apply(this,arguments)||this;return pe.content=0,pe.fg=0,pe.bg=0,pe.extended=new xe.ExtendedAttrs,pe.combinedData="",pe}return je(we,ye),we.fromCharData=function(pe){var de=new we;return de.setFromCharData(pe),de},we.prototype.isCombined=function(){return 2097152&this.content},we.prototype.getWidth=function(){return this.content>>22},we.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?Me.stringFromCodePoint(2097151&this.content):""},we.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},we.prototype.setFromCharData=function(pe){this.fg=pe[Ce.CHAR_DATA_ATTR_INDEX],this.bg=0;var de=!1;if(pe[Ce.CHAR_DATA_CHAR_INDEX].length>2)de=!0;else if(pe[Ce.CHAR_DATA_CHAR_INDEX].length===2){var ge=pe[Ce.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=ge&&ge<=56319){var fe=pe[Ce.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=fe&&fe<=57343?this.content=1024*(ge-55296)+fe-56320+65536|pe[Ce.CHAR_DATA_WIDTH_INDEX]<<22:de=!0}else de=!0}else this.content=pe[Ce.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|pe[Ce.CHAR_DATA_WIDTH_INDEX]<<22;de&&(this.combinedData=pe[Ce.CHAR_DATA_CHAR_INDEX],this.content=2097152|pe[Ce.CHAR_DATA_WIDTH_INDEX]<<22)},we.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},we}(xe.AttributeData);Ie.CellData=be},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.ISoundService=Ie.ISelectionService=Ie.IRenderService=Ie.IMouseService=Ie.ICoreBrowserService=Ie.ICharSizeService=void 0;var Se=Le(14);Ie.ICharSizeService=Se.createDecorator("CharSizeService"),Ie.ICoreBrowserService=Se.createDecorator("CoreBrowserService"),Ie.IMouseService=Se.createDecorator("MouseService"),Ie.IRenderService=Se.createDecorator("RenderService"),Ie.ISelectionService=Se.createDecorator("SelectionService"),Ie.ISoundService=Se.createDecorator("SoundService")},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.ExtendedAttrs=Ie.AttributeData=void 0;var Se=function(){function Me(){this.fg=0,this.bg=0,this.extended=new je}return Me.toColorRGB=function(Ce){return[Ce>>>16&255,Ce>>>8&255,255&Ce]},Me.fromColorRGB=function(Ce){return(255&Ce[0])<<16|(255&Ce[1])<<8|255&Ce[2]},Me.prototype.clone=function(){var Ce=new Me;return Ce.fg=this.fg,Ce.bg=this.bg,Ce.extended=this.extended.clone(),Ce},Me.prototype.isInverse=function(){return 67108864&this.fg},Me.prototype.isBold=function(){return 134217728&this.fg},Me.prototype.isUnderline=function(){return 268435456&this.fg},Me.prototype.isBlink=function(){return 536870912&this.fg},Me.prototype.isInvisible=function(){return 1073741824&this.fg},Me.prototype.isItalic=function(){return 67108864&this.bg},Me.prototype.isDim=function(){return 134217728&this.bg},Me.prototype.getFgColorMode=function(){return 50331648&this.fg},Me.prototype.getBgColorMode=function(){return 50331648&this.bg},Me.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},Me.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},Me.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},Me.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},Me.prototype.isFgDefault=function(){return(50331648&this.fg)==0},Me.prototype.isBgDefault=function(){return(50331648&this.bg)==0},Me.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},Me.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},Me.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},Me.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},Me.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},Me.prototype.getUnderlineColor=function(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()},Me.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},Me.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},Me.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},Me.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},Me.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},Me}();Ie.AttributeData=Se;var je=function(){function Me(Ce,xe){Ce===void 0&&(Ce=0),xe===void 0&&(xe=-1),this.underlineStyle=Ce,this.underlineColor=xe}return Me.prototype.clone=function(){return new Me(this.underlineStyle,this.underlineColor)},Me.prototype.isEmpty=function(){return this.underlineStyle===0},Me}();Ie.ExtendedAttrs=je},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.addDisposableDomListener=void 0,Ie.addDisposableDomListener=function(Se,je,Me,Ce){Se.addEventListener(je,Me,Ce);var xe=!1;return{dispose:function(){xe||(xe=!0,Se.removeEventListener(je,Me,Ce))}}}},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.Utf8ToUtf32=Ie.StringToUtf32=Ie.utf32ToString=Ie.stringFromCodePoint=void 0,Ie.stringFromCodePoint=function(Me){return Me>65535?(Me-=65536,String.fromCharCode(55296+(Me>>10))+String.fromCharCode(Me%1024+56320)):String.fromCharCode(Me)},Ie.utf32ToString=function(Me,Ce,xe){Ce===void 0&&(Ce=0),xe===void 0&&(xe=Me.length);for(var be="",ye=Ce;ye<xe;++ye){var we=Me[ye];we>65535?(we-=65536,be+=String.fromCharCode(55296+(we>>10))+String.fromCharCode(we%1024+56320)):be+=String.fromCharCode(we)}return be};var Se=function(){function Me(){this._interim=0}return Me.prototype.clear=function(){this._interim=0},Me.prototype.decode=function(Ce,xe){var be=Ce.length;if(!be)return 0;var ye=0,we=0;this._interim&&(56320<=(ge=Ce.charCodeAt(we++))&&ge<=57343?xe[ye++]=1024*(this._interim-55296)+ge-56320+65536:(xe[ye++]=this._interim,xe[ye++]=ge),this._interim=0);for(var pe=we;pe<be;++pe){var de=Ce.charCodeAt(pe);if(55296<=de&&de<=56319){if(++pe>=be)return this._interim=de,ye;var ge;56320<=(ge=Ce.charCodeAt(pe))&&ge<=57343?xe[ye++]=1024*(de-55296)+ge-56320+65536:(xe[ye++]=de,xe[ye++]=ge)}else xe[ye++]=de}return ye},Me}();Ie.StringToUtf32=Se;var je=function(){function Me(){this.interim=new Uint8Array(3)}return Me.prototype.clear=function(){this.interim.fill(0)},Me.prototype.decode=function(Ce,xe){var be=Ce.length;if(!be)return 0;var ye,we,pe,de,ge=0,fe=0,ue=0;if(this.interim[0]){var ee=!1,z=this.interim[0];z&=(224&z)==192?31:(240&z)==224?15:7;for(var oe=0,re=void 0;(re=63&this.interim[++oe])&&oe<4;)z<<=6,z|=re;for(var ae=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,le=ae-oe;ue<le;){if(ue>=be)return 0;if((192&(re=Ce[ue++]))!=128){ue--,ee=!0;break}this.interim[oe++]=re,z<<=6,z|=63&re}ee||(ae===2?z<128?ue--:xe[ge++]=z:ae===3?z<2048||z>=55296&&z<=57343||(xe[ge++]=z):z<65536||z>1114111||(xe[ge++]=z)),this.interim.fill(0)}for(var me=be-4,ve=ue;ve<be;){for(;!(!(ve<me)||128&(ye=Ce[ve])||128&(we=Ce[ve+1])||128&(pe=Ce[ve+2])||128&(de=Ce[ve+3]));)xe[ge++]=ye,xe[ge++]=we,xe[ge++]=pe,xe[ge++]=de,ve+=4;if((ye=Ce[ve++])<128)xe[ge++]=ye;else if((224&ye)==192){if(ve>=be)return this.interim[0]=ye,ge;if((192&(we=Ce[ve++]))!=128){ve--;continue}if((fe=(31&ye)<<6|63&we)<128){ve--;continue}xe[ge++]=fe}else if((240&ye)==224){if(ve>=be)return this.interim[0]=ye,ge;if((192&(we=Ce[ve++]))!=128){ve--;continue}if(ve>=be)return this.interim[0]=ye,this.interim[1]=we,ge;if((192&(pe=Ce[ve++]))!=128){ve--;continue}if((fe=(15&ye)<<12|(63&we)<<6|63&pe)<2048||fe>=55296&&fe<=57343)continue;xe[ge++]=fe}else if((248&ye)==240){if(ve>=be)return this.interim[0]=ye,ge;if((192&(we=Ce[ve++]))!=128){ve--;continue}if(ve>=be)return this.interim[0]=ye,this.interim[1]=we,ge;if((192&(pe=Ce[ve++]))!=128){ve--;continue}if(ve>=be)return this.interim[0]=ye,this.interim[1]=we,this.interim[2]=pe,ge;if((192&(de=Ce[ve++]))!=128){ve--;continue}if((fe=(7&ye)<<18|(63&we)<<12|(63&pe)<<6|63&de)<65536||fe>1114111)continue;xe[ge++]=fe}}return ge},Me}();Ie.Utf8ToUtf32=je},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.CHAR_ATLAS_CELL_SPACING=Ie.DIM_OPACITY=Ie.INVERTED_DEFAULT_COLOR=void 0,Ie.INVERTED_DEFAULT_COLOR=257,Ie.DIM_OPACITY=.5,Ie.CHAR_ATLAS_CELL_SPACING=1},function(ln,Ie,Le){"use strict";var Se,je,Me,Ce;function xe(ye){var we=ye.toString(16);return we.length<2?"0"+we:we}function be(ye,we){return ye<we?(we+.05)/(ye+.05):(ye+.05)/(we+.05)}Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.contrastRatio=Ie.toPaddedHex=Ie.rgba=Ie.rgb=Ie.css=Ie.color=Ie.channels=void 0,function(ye){ye.toCss=function(we,pe,de,ge){return ge!==void 0?"#"+xe(we)+xe(pe)+xe(de)+xe(ge):"#"+xe(we)+xe(pe)+xe(de)},ye.toRgba=function(we,pe,de,ge){return ge===void 0&&(ge=255),(we<<24|pe<<16|de<<8|ge)>>>0}}(Se=Ie.channels||(Ie.channels={})),(je=Ie.color||(Ie.color={})).blend=function(ye,we){var pe=(255&we.rgba)/255;if(pe===1)return{css:we.css,rgba:we.rgba};var de=we.rgba>>24&255,ge=we.rgba>>16&255,fe=we.rgba>>8&255,ue=ye.rgba>>24&255,ee=ye.rgba>>16&255,z=ye.rgba>>8&255,oe=ue+Math.round((de-ue)*pe),re=ee+Math.round((ge-ee)*pe),ae=z+Math.round((fe-z)*pe);return{css:Se.toCss(oe,re,ae),rgba:Se.toRgba(oe,re,ae)}},je.isOpaque=function(ye){return(255&ye.rgba)==255},je.ensureContrastRatio=function(ye,we,pe){var de=Ce.ensureContrastRatio(ye.rgba,we.rgba,pe);if(de)return Ce.toColor(de>>24&255,de>>16&255,de>>8&255)},je.opaque=function(ye){var we=(255|ye.rgba)>>>0,pe=Ce.toChannels(we),de=pe[0],ge=pe[1],fe=pe[2];return{css:Se.toCss(de,ge,fe),rgba:we}},je.opacity=function(ye,we){var pe=Math.round(255*we),de=Ce.toChannels(ye.rgba),ge=de[0],fe=de[1],ue=de[2];return{css:Se.toCss(ge,fe,ue,pe),rgba:Se.toRgba(ge,fe,ue,pe)}},(Ie.css||(Ie.css={})).toColor=function(ye){switch(ye.length){case 7:return{css:ye,rgba:(parseInt(ye.slice(1),16)<<8|255)>>>0};case 9:return{css:ye,rgba:parseInt(ye.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(ye){function we(pe,de,ge){var fe=pe/255,ue=de/255,ee=ge/255;return .2126*(fe<=.03928?fe/12.92:Math.pow((fe+.055)/1.055,2.4))+.7152*(ue<=.03928?ue/12.92:Math.pow((ue+.055)/1.055,2.4))+.0722*(ee<=.03928?ee/12.92:Math.pow((ee+.055)/1.055,2.4))}ye.relativeLuminance=function(pe){return we(pe>>16&255,pe>>8&255,255&pe)},ye.relativeLuminance2=we}(Me=Ie.rgb||(Ie.rgb={})),function(ye){function we(de,ge,fe){for(var ue=de>>24&255,ee=de>>16&255,z=de>>8&255,oe=ge>>24&255,re=ge>>16&255,ae=ge>>8&255,le=be(Me.relativeLuminance2(oe,ae,re),Me.relativeLuminance2(ue,ee,z));le<fe&&(oe>0||re>0||ae>0);)oe-=Math.max(0,Math.ceil(.1*oe)),re-=Math.max(0,Math.ceil(.1*re)),ae-=Math.max(0,Math.ceil(.1*ae)),le=be(Me.relativeLuminance2(oe,ae,re),Me.relativeLuminance2(ue,ee,z));return(oe<<24|re<<16|ae<<8|255)>>>0}function pe(de,ge,fe){for(var ue=de>>24&255,ee=de>>16&255,z=de>>8&255,oe=ge>>24&255,re=ge>>16&255,ae=ge>>8&255,le=be(Me.relativeLuminance2(oe,ae,re),Me.relativeLuminance2(ue,ee,z));le<fe&&(oe<255||re<255||ae<255);)oe=Math.min(255,oe+Math.ceil(.1*(255-oe))),re=Math.min(255,re+Math.ceil(.1*(255-re))),ae=Math.min(255,ae+Math.ceil(.1*(255-ae))),le=be(Me.relativeLuminance2(oe,ae,re),Me.relativeLuminance2(ue,ee,z));return(oe<<24|re<<16|ae<<8|255)>>>0}ye.ensureContrastRatio=function(de,ge,fe){var ue=Me.relativeLuminance(de>>8),ee=Me.relativeLuminance(ge>>8);if(be(ue,ee)<fe)return ee<ue?we(de,ge,fe):pe(de,ge,fe)},ye.reduceLuminance=we,ye.increaseLuminance=pe,ye.toChannels=function(de){return[de>>24&255,de>>16&255,de>>8&255,255&de]},ye.toColor=function(de,ge,fe){return{css:Se.toCss(de,ge,fe),rgba:Se.toRgba(de,ge,fe)}}}(Ce=Ie.rgba||(Ie.rgba={})),Ie.toPaddedHex=xe,Ie.contrastRatio=be},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.isLinux=Ie.isWindows=Ie.isIphone=Ie.isIpad=Ie.isMac=Ie.isSafari=Ie.isFirefox=void 0;var Se=typeof navigator=="undefined",je=Se?"node":navigator.userAgent,Me=Se?"node":navigator.platform;function Ce(xe,be){return xe.indexOf(be)>=0}Ie.isFirefox=!!~je.indexOf("Firefox"),Ie.isSafari=/^((?!chrome|android).)*safari/i.test(je),Ie.isMac=Ce(["Macintosh","MacIntel","MacPPC","Mac68K"],Me),Ie.isIpad=Me==="iPad",Ie.isIphone=Me==="iPhone",Ie.isWindows=Ce(["Windows","Win16","Win32","WinCE"],Me),Ie.isLinux=Me.indexOf("Linux")>=0},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.C1=Ie.C0=void 0,function(Se){Se.NUL="\0",Se.SOH="",Se.STX="",Se.ETX="",Se.EOT="",Se.ENQ="",Se.ACK="",Se.BEL="\x07",Se.BS="\b",Se.HT=" ",Se.LF=`
|
|
|
`,Se.VT="\v",Se.FF="\f",Se.CR="\r",Se.SO="",Se.SI="",Se.DLE="",Se.DC1="",Se.DC2="",Se.DC3="",Se.DC4="",Se.NAK="",Se.SYN="",Se.ETB="",Se.CAN="",Se.EM="",Se.SUB="",Se.ESC="\x1B",Se.FS="",Se.GS="",Se.RS="",Se.US="",Se.SP=" ",Se.DEL="\x7F"}(Ie.C0||(Ie.C0={})),function(Se){Se.PAD="\x80",Se.HOP="\x81",Se.BPH="\x82",Se.NBH="\x83",Se.IND="\x84",Se.NEL="\x85",Se.SSA="\x86",Se.ESA="\x87",Se.HTS="\x88",Se.HTJ="\x89",Se.VTS="\x8A",Se.PLD="\x8B",Se.PLU="\x8C",Se.RI="\x8D",Se.SS2="\x8E",Se.SS3="\x8F",Se.DCS="\x90",Se.PU1="\x91",Se.PU2="\x92",Se.STS="\x93",Se.CCH="\x94",Se.MW="\x95",Se.SPA="\x96",Se.EPA="\x97",Se.SOS="\x98",Se.SGCI="\x99",Se.SCI="\x9A",Se.CSI="\x9B",Se.ST="\x9C",Se.OSC="\x9D",Se.PM="\x9E",Se.APC="\x9F"}(Ie.C1||(Ie.C1={}))},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.BaseRenderLayer=void 0;var Se=Le(3),je=Le(9),Me=Le(25),Ce=Le(6),xe=Le(28),be=Le(10),ye=Le(17),we=function(){function pe(de,ge,fe,ue,ee,z,oe,re){this._container=de,this._alpha=ue,this._colors=ee,this._rendererId=z,this._bufferService=oe,this._optionsService=re,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+ge+"-layer"),this._canvas.style.zIndex=fe.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return pe.prototype.dispose=function(){var de;ye.removeElementFromParent(this._canvas),(de=this._charAtlas)===null||de===void 0||de.dispose()},pe.prototype._initCanvas=function(){this._ctx=xe.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},pe.prototype.onOptionsChanged=function(){},pe.prototype.onBlur=function(){},pe.prototype.onFocus=function(){},pe.prototype.onCursorMove=function(){},pe.prototype.onGridChanged=function(de,ge){},pe.prototype.onSelectionChanged=function(de,ge,fe){fe===void 0&&(fe=!1)},pe.prototype.setColors=function(de){this._refreshCharAtlas(de)},pe.prototype._setTransparency=function(de){if(de!==this._alpha){var ge=this._canvas;this._alpha=de,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,ge),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},pe.prototype._refreshCharAtlas=function(de){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=Me.acquireCharAtlas(this._optionsService.options,this._rendererId,de,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},pe.prototype.resize=function(de){this._scaledCellWidth=de.scaledCellWidth,this._scaledCellHeight=de.scaledCellHeight,this._scaledCharWidth=de.scaledCharWidth,this._scaledCharHeight=de.scaledCharHeight,this._scaledCharLeft=de.scaledCharLeft,this._scaledCharTop=de.scaledCharTop,this._canvas.width=de.scaledCanvasWidth,this._canvas.height=de.scaledCanvasHeight,this._canvas.style.width=de.canvasWidth+"px",this._canvas.style.height=de.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},pe.prototype._fillCells=function(de,ge,fe,ue){this._ctx.fillRect(de*this._scaledCellWidth,ge*this._scaledCellHeight,fe*this._scaledCellWidth,ue*this._scaledCellHeight)},pe.prototype._fillBottomLineAtCells=function(de,ge,fe){fe===void 0&&(fe=1),this._ctx.fillRect(de*this._scaledCellWidth,(ge+1)*this._scaledCellHeight-window.devicePixelRatio-1,fe*this._scaledCellWidth,window.devicePixelRatio)},pe.prototype._fillLeftLineAtCell=function(de,ge,fe){this._ctx.fillRect(de*this._scaledCellWidth,ge*this._scaledCellHeight,window.devicePixelRatio*fe,this._scaledCellHeight)},pe.prototype._strokeRectAtCell=function(de,ge,fe,ue){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(de*this._scaledCellWidth+window.devicePixelRatio/2,ge*this._scaledCellHeight+window.devicePixelRatio/2,fe*this._scaledCellWidth-window.devicePixelRatio,ue*this._scaledCellHeight-window.devicePixelRatio)},pe.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},pe.prototype._clearCells=function(de,ge,fe,ue){this._alpha?this._ctx.clearRect(de*this._scaledCellWidth,ge*this._scaledCellHeight,fe*this._scaledCellWidth,ue*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(de*this._scaledCellWidth,ge*this._scaledCellHeight,fe*this._scaledCellWidth,ue*this._scaledCellHeight))},pe.prototype._fillCharTrueColor=function(de,ge,fe){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(fe),this._ctx.fillText(de.getChars(),ge*this._scaledCellWidth+this._scaledCharLeft,fe*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},pe.prototype._drawChars=function(de,ge,fe){var ue,ee,z=this._getContrastColor(de);z||de.isFgRGB()||de.isBgRGB()?this._drawUncachedChars(de,ge,fe,z):(de.isInverse()?(ue=de.isBgDefault()?je.INVERTED_DEFAULT_COLOR:de.getBgColor(),ee=de.isFgDefault()?je.INVERTED_DEFAULT_COLOR:de.getFgColor()):(ee=de.isBgDefault()?Se.DEFAULT_COLOR:de.getBgColor(),ue=de.isFgDefault()?Se.DEFAULT_COLOR:de.getFgColor()),ue+=this._optionsService.options.drawBoldTextInBrightColors&&de.isBold()&&ue<8?8:0,this._currentGlyphIdentifier.chars=de.getChars()||Se.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=de.getCode()||Se.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=ee,this._currentGlyphIdentifier.fg=ue,this._currentGlyphIdentifier.bold=!!de.isBold(),this._currentGlyphIdentifier.dim=!!de.isDim(),this._currentGlyphIdentifier.italic=!!de.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,ge*this._scaledCellWidth+this._scaledCharLeft,fe*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(de,ge,fe))},pe.prototype._drawUncachedChars=function(de,ge,fe,ue){if(this._ctx.save(),this._ctx.font=this._getFont(!!de.isBold(),!!de.isItalic()),this._ctx.textBaseline="middle",de.isInverse())if(ue)this._ctx.fillStyle=ue.css;else if(de.isBgDefault())this._ctx.fillStyle=be.color.opaque(this._colors.background).css;else if(de.isBgRGB())this._ctx.fillStyle="rgb("+Ce.AttributeData.toColorRGB(de.getBgColor()).join(",")+")";else{var ee=de.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&de.isBold()&&ee<8&&(ee+=8),this._ctx.fillStyle=this._colors.ansi[ee].css}else if(ue)this._ctx.fillStyle=ue.css;else if(de.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(de.isFgRGB())this._ctx.fillStyle="rgb("+Ce.AttributeData.toColorRGB(de.getFgColor()).join(",")+")";else{var z=de.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&de.isBold()&&z<8&&(z+=8),this._ctx.fillStyle=this._colors.ansi[z].css}this._clipRow(fe),de.isDim()&&(this._ctx.globalAlpha=je.DIM_OPACITY),this._ctx.fillText(de.getChars(),ge*this._scaledCellWidth+this._scaledCharLeft,fe*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},pe.prototype._clipRow=function(de){this._ctx.beginPath(),this._ctx.rect(0,de*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},pe.prototype._getFont=function(de,ge){return(ge?"italic":"")+" "+(de?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},pe.prototype._getContrastColor=function(de){if(this._optionsService.options.minimumContrastRatio!==1){var ge=this._colors.contrastCache.getColor(de.bg,de.fg);if(ge!==void 0)return ge||void 0;var fe=de.getFgColor(),ue=de.getFgColorMode(),ee=de.getBgColor(),z=de.getBgColorMode(),oe=!!de.isInverse(),re=!!de.isInverse();if(oe){var ae=fe;fe=ee,ee=ae;var le=ue;ue=z,z=le}var me=this._resolveBackgroundRgba(z,ee,oe),ve=this._resolveForegroundRgba(ue,fe,oe,re),Pe=be.rgba.ensureContrastRatio(me,ve,this._optionsService.options.minimumContrastRatio);if(Pe){var Ae={css:be.channels.toCss(Pe>>24&255,Pe>>16&255,Pe>>8&255),rgba:Pe};return this._colors.contrastCache.setColor(de.bg,de.fg,Ae),Ae}this._colors.contrastCache.setColor(de.bg,de.fg,null)}},pe.prototype._resolveBackgroundRgba=function(de,ge,fe){switch(de){case 16777216:case 33554432:return this._colors.ansi[ge].rgba;case 50331648:return ge<<8;case 0:default:return fe?this._colors.foreground.rgba:this._colors.background.rgba}},pe.prototype._resolveForegroundRgba=function(de,ge,fe,ue){switch(de){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&ue&&ge<8&&(ge+=8),this._colors.ansi[ge].rgba;case 50331648:return ge<<8;case 0:default:return fe?this._colors.background.rgba:this._colors.foreground.rgba}},pe}();Ie.BaseRenderLayer=we},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.createDecorator=Ie.getServiceDependencies=Ie.serviceRegistry=void 0;function Se(je,Me,Ce){Me.di$target===Me?Me.di$dependencies.push({id:je,index:Ce}):(Me.di$dependencies=[{id:je,index:Ce}],Me.di$target=Me)}Ie.serviceRegistry=new Map,Ie.getServiceDependencies=function(je){return je.di$dependencies||[]},Ie.createDecorator=function(je){if(Ie.serviceRegistry.has(je))return Ie.serviceRegistry.get(je);var Me=function(Ce,xe,be){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Se(Me,Ce,be)};return Me.toString=function(){return je},Ie.serviceRegistry.set(je,Me),Me}},function(ln,Ie,Le){"use strict";function Se(je,Me,Ce,xe){if(Ce===void 0&&(Ce=0),xe===void 0&&(xe=je.length),Ce>=je.length)return je;Ce=(je.length+Ce)%je.length,xe=xe>=je.length?je.length:(je.length+xe)%je.length;for(var be=Ce;be<xe;++be)je[be]=Me;return je}Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.concat=Ie.fillFallback=Ie.fill=void 0,Ie.fill=function(je,Me,Ce,xe){return je.fill?je.fill(Me,Ce,xe):Se(je,Me,Ce,xe)},Ie.fillFallback=Se,Ie.concat=function(je,Me){var Ce=new je.constructor(je.length+Me.length);return Ce.set(je),Ce.set(Me,je.length),Ce}},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.BufferLine=Ie.DEFAULT_ATTR_DATA=void 0;var Se=Le(8),je=Le(3),Me=Le(4),Ce=Le(6);Ie.DEFAULT_ATTR_DATA=Object.freeze(new Ce.AttributeData);var xe=function(){function be(ye,we,pe){pe===void 0&&(pe=!1),this.isWrapped=pe,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*ye);for(var de=we||Me.CellData.fromCharData([0,je.NULL_CELL_CHAR,je.NULL_CELL_WIDTH,je.NULL_CELL_CODE]),ge=0;ge<ye;++ge)this.setCell(ge,de);this.length=ye}return be.prototype.get=function(ye){var we=this._data[3*ye+0],pe=2097151&we;return[this._data[3*ye+1],2097152&we?this._combined[ye]:pe?Se.stringFromCodePoint(pe):"",we>>22,2097152&we?this._combined[ye].charCodeAt(this._combined[ye].length-1):pe]},be.prototype.set=function(ye,we){this._data[3*ye+1]=we[je.CHAR_DATA_ATTR_INDEX],we[je.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[ye]=we[1],this._data[3*ye+0]=2097152|ye|we[je.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*ye+0]=we[je.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|we[je.CHAR_DATA_WIDTH_INDEX]<<22},be.prototype.getWidth=function(ye){return this._data[3*ye+0]>>22},be.prototype.hasWidth=function(ye){return 12582912&this._data[3*ye+0]},be.prototype.getFg=function(ye){return this._data[3*ye+1]},be.prototype.getBg=function(ye){return this._data[3*ye+2]},be.prototype.hasContent=function(ye){return 4194303&this._data[3*ye+0]},be.prototype.getCodePoint=function(ye){var we=this._data[3*ye+0];return 2097152&we?this._combined[ye].charCodeAt(this._combined[ye].length-1):2097151&we},be.prototype.isCombined=function(ye){return 2097152&this._data[3*ye+0]},be.prototype.getString=function(ye){var we=this._data[3*ye+0];return 2097152&we?this._combined[ye]:2097151&we?Se.stringFromCodePoint(2097151&we):""},be.prototype.loadCell=function(ye,we){var pe=3*ye;return we.content=this._data[pe+0],we.fg=this._data[pe+1],we.bg=this._data[pe+2],2097152&we.content&&(we.combinedData=this._combined[ye]),268435456&we.bg&&(we.extended=this._extendedAttrs[ye]),we},be.prototype.setCell=function(ye,we){2097152&we.content&&(this._combined[ye]=we.combinedData),268435456&we.bg&&(this._extendedAttrs[ye]=we.extended),this._data[3*ye+0]=we.content,this._data[3*ye+1]=we.fg,this._data[3*ye+2]=we.bg},be.prototype.setCellFromCodePoint=function(ye,we,pe,de,ge,fe){268435456&ge&&(this._extendedAttrs[ye]=fe),this._data[3*ye+0]=we|pe<<22,this._data[3*ye+1]=de,this._data[3*ye+2]=ge},be.prototype.addCodepointToCell=function(ye,we){var pe=this._data[3*ye+0];2097152&pe?this._combined[ye]+=Se.stringFromCodePoint(we):(2097151&pe?(this._combined[ye]=Se.stringFromCodePoint(2097151&pe)+Se.stringFromCodePoint(we),pe&=-2097152,pe|=2097152):pe=we|1<<22,this._data[3*ye+0]=pe)},be.prototype.insertCells=function(ye,we,pe,de){if((ye%=this.length)&&this.getWidth(ye-1)===2&&this.setCellFromCodePoint(ye-1,0,1,(de==null?void 0:de.fg)||0,(de==null?void 0:de.bg)||0,(de==null?void 0:de.extended)||new Ce.ExtendedAttrs),we<this.length-ye){for(var ge=new Me.CellData,fe=this.length-ye-we-1;fe>=0;--fe)this.setCell(ye+we+fe,this.loadCell(ye+fe,ge));for(fe=0;fe<we;++fe)this.setCell(ye+fe,pe)}else for(fe=ye;fe<this.length;++fe)this.setCell(fe,pe);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(de==null?void 0:de.fg)||0,(de==null?void 0:de.bg)||0,(de==null?void 0:de.extended)||new Ce.ExtendedAttrs)},be.prototype.deleteCells=function(ye,we,pe,de){if(ye%=this.length,we<this.length-ye){for(var ge=new Me.CellData,fe=0;fe<this.length-ye-we;++fe)this.setCell(ye+fe,this.loadCell(ye+we+fe,ge));for(fe=this.length-we;fe<this.length;++fe)this.setCell(fe,pe)}else for(fe=ye;fe<this.length;++fe)this.setCell(fe,pe);ye&&this.getWidth(ye-1)===2&&this.setCellFromCodePoint(ye-1,0,1,(de==null?void 0:de.fg)||0,(de==null?void 0:de.bg)||0,(de==null?void 0:de.extended)||new Ce.ExtendedAttrs),this.getWidth(ye)!==0||this.hasContent(ye)||this.setCellFromCodePoint(ye,0,1,(de==null?void 0:de.fg)||0,(de==null?void 0:de.bg)||0,(de==null?void 0:de.extended)||new Ce.ExtendedAttrs)},be.prototype.replaceCells=function(ye,we,pe,de){for(ye&&this.getWidth(ye-1)===2&&this.setCellFromCodePoint(ye-1,0,1,(de==null?void 0:de.fg)||0,(de==null?void 0:de.bg)||0,(de==null?void 0:de.extended)||new Ce.ExtendedAttrs),we<this.length&&this.getWidth(we-1)===2&&this.setCellFromCodePoint(we,0,1,(de==null?void 0:de.fg)||0,(de==null?void 0:de.bg)||0,(de==null?void 0:de.extended)||new Ce.ExtendedAttrs);ye<we&&ye<this.length;)this.setCell(ye++,pe)},be.prototype.resize=function(ye,we){if(ye!==this.length){if(ye>this.length){var pe=new Uint32Array(3*ye);this.length&&(3*ye<this._data.length?pe.set(this._data.subarray(0,3*ye)):pe.set(this._data)),this._data=pe;for(var de=this.length;de<ye;++de)this.setCell(de,we)}else if(ye){(pe=new Uint32Array(3*ye)).set(this._data.subarray(0,3*ye)),this._data=pe;var ge=Object.keys(this._combined);for(de=0;de<ge.length;de++){var fe=parseInt(ge[de],10);fe>=ye&&delete this._combined[fe]}}else this._data=new Uint32Array(0),this._combined={};this.length=ye}},be.prototype.fill=function(ye){this._combined={},this._extendedAttrs={};for(var we=0;we<this.length;++we)this.setCell(we,ye)},be.prototype.copyFrom=function(ye){for(var we in this.length!==ye.length?this._data=new Uint32Array(ye._data):this._data.set(ye._data),this.length=ye.length,this._combined={},ye._combined)this._combined[we]=ye._combined[we];for(var we in this._extendedAttrs={},ye._extendedAttrs)this._extendedAttrs[we]=ye._extendedAttrs[we];this.isWrapped=ye.isWrapped},be.prototype.clone=function(){var ye=new be(0);for(var we in ye._data=new Uint32Array(this._data),ye.length=this.length,this._combined)ye._combined[we]=this._combined[we];for(var we in this._extendedAttrs)ye._extendedAttrs[we]=this._extendedAttrs[we];return ye.isWrapped=this.isWrapped,ye},be.prototype.getTrimmedLength=function(){for(var ye=this.length-1;ye>=0;--ye)if(4194303&this._data[3*ye+0])return ye+(this._data[3*ye+0]>>22);return 0},be.prototype.copyCellsFrom=function(ye,we,pe,de,ge){var fe=ye._data;if(ge)for(var ue=de-1;ue>=0;ue--)for(var ee=0;ee<3;ee++)this._data[3*(pe+ue)+ee]=fe[3*(we+ue)+ee];else for(ue=0;ue<de;ue++)for(ee=0;ee<3;ee++)this._data[3*(pe+ue)+ee]=fe[3*(we+ue)+ee];var z=Object.keys(ye._combined);for(ee=0;ee<z.length;ee++){var oe=parseInt(z[ee],10);oe>=we&&(this._combined[oe-we+pe]=ye._combined[oe])}},be.prototype.translateToString=function(ye,we,pe){ye===void 0&&(ye=!1),we===void 0&&(we=0),pe===void 0&&(pe=this.length),ye&&(pe=Math.min(pe,this.getTrimmedLength()));for(var de="";we<pe;){var ge=this._data[3*we+0],fe=2097151≥de+=2097152&ge?this._combined[we]:fe?Se.stringFromCodePoint(fe):je.WHITESPACE_CELL_CHAR,we+=ge>>22||1}return de},be}();Ie.BufferLine=xe},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.removeElementFromParent=void 0,Ie.removeElementFromParent=function(){for(var Se,je=[],Me=0;Me<arguments.length;Me++)je[Me]=arguments[Me];for(var Ce=0,xe=je;Ce<xe.length;Ce++){var be=xe[Ce];(Se=be==null?void 0:be.parentElement)===null||Se===void 0||Se.removeChild(be)}}},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.tooMuchOutput=Ie.promptLabel=void 0,Ie.promptLabel="Terminal input",Ie.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(ve,Pe){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ae,De){Ae.__proto__=De}||function(Ae,De){for(var Oe in De)De.hasOwnProperty(Oe)&&(Ae[Oe]=De[Oe])})(ve,Pe)},function(ve,Pe){function Ae(){this.constructor=ve}Se(ve,Pe),ve.prototype=Pe===null?Object.create(Pe):(Ae.prototype=Pe.prototype,new Ae)});Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.InputHandler=Ie.WindowsOptionsReportType=void 0;var Me,Ce=Le(12),xe=Le(20),be=Le(39),ye=Le(2),we=Le(15),pe=Le(8),de=Le(16),ge=Le(0),fe=Le(3),ue=Le(4),ee=Le(6),z=Le(22),oe=Le(24),re={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function ae(ve,Pe){if(ve>24)return Pe.setWinLines||!1;switch(ve){case 1:return!!Pe.restoreWin;case 2:return!!Pe.minimizeWin;case 3:return!!Pe.setWinPosition;case 4:return!!Pe.setWinSizePixels;case 5:return!!Pe.raiseWin;case 6:return!!Pe.lowerWin;case 7:return!!Pe.refreshWin;case 8:return!!Pe.setWinSizeChars;case 9:return!!Pe.maximizeWin;case 10:return!!Pe.fullscreenWin;case 11:return!!Pe.getWinState;case 13:return!!Pe.getWinPosition;case 14:return!!Pe.getWinSizePixels;case 15:return!!Pe.getScreenSizePixels;case 16:return!!Pe.getCellSizePixels;case 18:return!!Pe.getWinSizeChars;case 19:return!!Pe.getScreenSizeChars;case 20:return!!Pe.getIconTitle;case 21:return!!Pe.getWinTitle;case 22:return!!Pe.pushTitle;case 23:return!!Pe.popTitle;case 24:return!!Pe.setWinLines}return!1}(function(ve){ve[ve.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ve[ve.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(Me=Ie.WindowsOptionsReportType||(Ie.WindowsOptionsReportType={}));var le=function(){function ve(Pe,Ae,De,Oe){this._bufferService=Pe,this._coreService=Ae,this._logService=De,this._optionsService=Oe,this._data=new Uint32Array(0)}return ve.prototype.hook=function(Pe){this._data=new Uint32Array(0)},ve.prototype.put=function(Pe,Ae,De){this._data=we.concat(this._data,Pe.subarray(Ae,De))},ve.prototype.unhook=function(Pe){if(Pe){var Ae=pe.utf32ToString(this._data);switch(this._data=new Uint32Array(0),Ae){case'"q':return this._coreService.triggerDataEvent(Ce.C0.ESC+'P1$r0"q'+Ce.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(Ce.C0.ESC+'P1$r61;1"p'+Ce.C0.ESC+"\\");case"r":var De=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(Ce.C0.ESC+"P1$r"+De+Ce.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(Ce.C0.ESC+"P1$r0m"+Ce.C0.ESC+"\\");case" q":var Oe={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return Oe-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(Ce.C0.ESC+"P1$r"+Oe+" q"+Ce.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",Ae),this._coreService.triggerDataEvent(Ce.C0.ESC+"P0$r"+Ce.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},ve}(),me=function(ve){function Pe(Ae,De,Oe,Ze,qe,Xe,mt,pt,Mt){Mt===void 0&&(Mt=new be.EscapeSequenceParser);var at=ve.call(this)||this;at._bufferService=Ae,at._charsetService=De,at._coreService=Oe,at._dirtyRowService=Ze,at._logService=qe,at._optionsService=Xe,at._coreMouseService=mt,at._unicodeService=pt,at._parser=Mt,at._parseBuffer=new Uint32Array(4096),at._stringDecoder=new pe.StringToUtf32,at._utf8Decoder=new pe.Utf8ToUtf32,at._workCell=new ue.CellData,at._windowTitle="",at._iconName="",at._windowTitleStack=[],at._iconNameStack=[],at._curAttrData=de.DEFAULT_ATTR_DATA.clone(),at._eraseAttrDataInternal=de.DEFAULT_ATTR_DATA.clone(),at._onRequestBell=new ge.EventEmitter,at._onRequestRefreshRows=new ge.EventEmitter,at._onRequestReset=new ge.EventEmitter,at._onRequestScroll=new ge.EventEmitter,at._onRequestSyncScrollBar=new ge.EventEmitter,at._onRequestWindowsOptionsReport=new ge.EventEmitter,at._onA11yChar=new ge.EventEmitter,at._onA11yTab=new ge.EventEmitter,at._onCursorMove=new ge.EventEmitter,at._onLineFeed=new ge.EventEmitter,at._onScroll=new ge.EventEmitter,at._onTitleChange=new ge.EventEmitter,at.register(at._parser),at._parser.setCsiHandlerFallback(function(ut,rt){at._logService.debug("Unknown CSI code: ",{identifier:at._parser.identToString(ut),params:rt.toArray()})}),at._parser.setEscHandlerFallback(function(ut){at._logService.debug("Unknown ESC code: ",{identifier:at._parser.identToString(ut)})}),at._parser.setExecuteHandlerFallback(function(ut){at._logService.debug("Unknown EXECUTE code: ",{code:ut})}),at._parser.setOscHandlerFallback(function(ut,rt,ct){at._logService.debug("Unknown OSC code: ",{identifier:ut,action:rt,data:ct})}),at._parser.setDcsHandlerFallback(function(ut,rt,ct){rt==="HOOK"&&(ct=ct.toArray()),at._logService.debug("Unknown DCS code: ",{identifier:at._parser.identToString(ut),action:rt,payload:ct})}),at._parser.setPrintHandler(function(ut,rt,ct){return at.print(ut,rt,ct)}),at._parser.setCsiHandler({final:"@"},function(ut){return at.insertChars(ut)}),at._parser.setCsiHandler({intermediates:" ",final:"@"},function(ut){return at.scrollLeft(ut)}),at._parser.setCsiHandler({final:"A"},function(ut){return at.cursorUp(ut)}),at._parser.setCsiHandler({intermediates:" ",final:"A"},function(ut){return at.scrollRight(ut)}),at._parser.setCsiHandler({final:"B"},function(ut){return at.cursorDown(ut)}),at._parser.setCsiHandler({final:"C"},function(ut){return at.cursorForward(ut)}),at._parser.setCsiHandler({final:"D"},function(ut){return at.cursorBackward(ut)}),at._parser.setCsiHandler({final:"E"},function(ut){return at.cursorNextLine(ut)}),at._parser.setCsiHandler({final:"F"},function(ut){return at.cursorPrecedingLine(ut)}),at._parser.setCsiHandler({final:"G"},function(ut){return at.cursorCharAbsolute(ut)}),at._parser.setCsiHandler({final:"H"},function(ut){return at.cursorPosition(ut)}),at._parser.setCsiHandler({final:"I"},function(ut){return at.cursorForwardTab(ut)}),at._parser.setCsiHandler({final:"J"},function(ut){return at.eraseInDisplay(ut)}),at._parser.setCsiHandler({prefix:"?",final:"J"},function(ut){return at.eraseInDisplay(ut)}),at._parser.setCsiHandler({final:"K"},function(ut){return at.eraseInLine(ut)}),at._parser.setCsiHandler({prefix:"?",final:"K"},function(ut){return at.eraseInLine(ut)}),at._parser.setCsiHandler({final:"L"},function(ut){return at.insertLines(ut)}),at._parser.setCsiHandler({final:"M"},function(ut){return at.deleteLines(ut)}),at._parser.setCsiHandler({final:"P"},function(ut){return at.deleteChars(ut)}),at._parser.setCsiHandler({final:"S"},function(ut){return at.scrollUp(ut)}),at._parser.setCsiHandler({final:"T"},function(ut){return at.scrollDown(ut)}),at._parser.setCsiHandler({final:"X"},function(ut){return at.eraseChars(ut)}),at._parser.setCsiHandler({final:"Z"},function(ut){return at.cursorBackwardTab(ut)}),at._parser.setCsiHandler({final:"`"},function(ut){return at.charPosAbsolute(ut)}),at._parser.setCsiHandler({final:"a"},function(ut){return at.hPositionRelative(ut)}),at._parser.setCsiHandler({final:"b"},function(ut){return at.repeatPrecedingCharacter(ut)}),at._parser.setCsiHandler({final:"c"},function(ut){return at.sendDeviceAttributesPrimary(ut)}),at._parser.setCsiHandler({prefix:">",final:"c"},function(ut){return at.sendDeviceAttributesSecondary(ut)}),at._parser.setCsiHandler({final:"d"},function(ut){return at.linePosAbsolute(ut)}),at._parser.setCsiHandler({final:"e"},function(ut){return at.vPositionRelative(ut)}),at._parser.setCsiHandler({final:"f"},function(ut){return at.hVPosition(ut)}),at._parser.setCsiHandler({final:"g"},function(ut){return at.tabClear(ut)}),at._parser.setCsiHandler({final:"h"},function(ut){return at.setMode(ut)}),at._parser.setCsiHandler({prefix:"?",final:"h"},function(ut){return at.setModePrivate(ut)}),at._parser.setCsiHandler({final:"l"},function(ut){return at.resetMode(ut)}),at._parser.setCsiHandler({prefix:"?",final:"l"},function(ut){return at.resetModePrivate(ut)}),at._parser.setCsiHandler({final:"m"},function(ut){return at.charAttributes(ut)}),at._parser.setCsiHandler({final:"n"},function(ut){return at.deviceStatus(ut)}),at._parser.setCsiHandler({prefix:"?",final:"n"},function(ut){return at.deviceStatusPrivate(ut)}),at._parser.setCsiHandler({intermediates:"!",final:"p"},function(ut){return at.softReset(ut)}),at._parser.setCsiHandler({intermediates:" ",final:"q"},function(ut){return at.setCursorStyle(ut)}),at._parser.setCsiHandler({final:"r"},function(ut){return at.setScrollRegion(ut)}),at._parser.setCsiHandler({final:"s"},function(ut){return at.saveCursor(ut)}),at._parser.setCsiHandler({final:"t"},function(ut){return at.windowOptions(ut)}),at._parser.setCsiHandler({final:"u"},function(ut){return at.restoreCursor(ut)}),at._parser.setCsiHandler({intermediates:"'",final:"}"},function(ut){return at.insertColumns(ut)}),at._parser.setCsiHandler({intermediates:"'",final:"~"},function(ut){return at.deleteColumns(ut)}),at._parser.setExecuteHandler(Ce.C0.BEL,function(){return at.bell()}),at._parser.setExecuteHandler(Ce.C0.LF,function(){return at.lineFeed()}),at._parser.setExecuteHandler(Ce.C0.VT,function(){return at.lineFeed()}),at._parser.setExecuteHandler(Ce.C0.FF,function(){return at.lineFeed()}),at._parser.setExecuteHandler(Ce.C0.CR,function(){return at.carriageReturn()}),at._parser.setExecuteHandler(Ce.C0.BS,function(){return at.backspace()}),at._parser.setExecuteHandler(Ce.C0.HT,function(){return at.tab()}),at._parser.setExecuteHandler(Ce.C0.SO,function(){return at.shiftOut()}),at._parser.setExecuteHandler(Ce.C0.SI,function(){return at.shiftIn()}),at._parser.setExecuteHandler(Ce.C1.IND,function(){return at.index()}),at._parser.setExecuteHandler(Ce.C1.NEL,function(){return at.nextLine()}),at._parser.setExecuteHandler(Ce.C1.HTS,function(){return at.tabSet()}),at._parser.setOscHandler(0,new z.OscHandler(function(ut){at.setTitle(ut),at.setIconName(ut)})),at._parser.setOscHandler(1,new z.OscHandler(function(ut){return at.setIconName(ut)})),at._parser.setOscHandler(2,new z.OscHandler(function(ut){return at.setTitle(ut)})),at._parser.setEscHandler({final:"7"},function(){return at.saveCursor()}),at._parser.setEscHandler({final:"8"},function(){return at.restoreCursor()}),at._parser.setEscHandler({final:"D"},function(){return at.index()}),at._parser.setEscHandler({final:"E"},function(){return at.nextLine()}),at._parser.setEscHandler({final:"H"},function(){return at.tabSet()}),at._parser.setEscHandler({final:"M"},function(){return at.reverseIndex()}),at._parser.setEscHandler({final:"="},function(){return at.keypadApplicationMode()}),at._parser.setEscHandler({final:">"},function(){return at.keypadNumericMode()}),at._parser.setEscHandler({final:"c"},function(){return at.fullReset()}),at._parser.setEscHandler({final:"n"},function(){return at.setgLevel(2)}),at._parser.setEscHandler({final:"o"},function(){return at.setgLevel(3)}),at._parser.setEscHandler({final:"|"},function(){return at.setgLevel(3)}),at._parser.setEscHandler({final:"}"},function(){return at.setgLevel(2)}),at._parser.setEscHandler({final:"~"},function(){return at.setgLevel(1)}),at._parser.setEscHandler({intermediates:"%",final:"@"},function(){return at.selectDefaultCharset()}),at._parser.setEscHandler({intermediates:"%",final:"G"},function(){return at.selectDefaultCharset()});var _t=function(ut){dt._parser.setEscHandler({intermediates:"(",final:ut},function(){return at.selectCharset("("+ut)}),dt._parser.setEscHandler({intermediates:")",final:ut},function(){return at.selectCharset(")"+ut)}),dt._parser.setEscHandler({intermediates:"*",final:ut},function(){return at.selectCharset("*"+ut)}),dt._parser.setEscHandler({intermediates:"+",final:ut},function(){return at.selectCharset("+"+ut)}),dt._parser.setEscHandler({intermediates:"-",final:ut},function(){return at.selectCharset("-"+ut)}),dt._parser.setEscHandler({intermediates:".",final:ut},function(){return at.selectCharset("."+ut)}),dt._parser.setEscHandler({intermediates:"/",final:ut},function(){return at.selectCharset("/"+ut)})},dt=this;for(var Rt in xe.CHARSETS)_t(Rt);return at._parser.setEscHandler({intermediates:"#",final:"8"},function(){return at.screenAlignmentPattern()}),at._parser.setErrorHandler(function(ut){return at._logService.error("Parsing error: ",ut),ut}),at._parser.setDcsHandler({intermediates:"$",final:"q"},new le(at._bufferService,at._coreService,at._logService,at._optionsService)),at}return je(Pe,ve),Object.defineProperty(Pe.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Pe.prototype.dispose=function(){ve.prototype.dispose.call(this)},Pe.prototype.parse=function(Ae){var De=this._bufferService.buffer,Oe=De.x,Ze=De.y;if(this._logService.debug("parsing data",Ae),this._parseBuffer.length<Ae.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(Ae.length,131072))),this._dirtyRowService.clearRange(),Ae.length>131072)for(var qe=0;qe<Ae.length;qe+=131072){var Xe=qe+131072<Ae.length?qe+131072:Ae.length,mt=typeof Ae=="string"?this._stringDecoder.decode(Ae.substring(qe,Xe),this._parseBuffer):this._utf8Decoder.decode(Ae.subarray(qe,Xe),this._parseBuffer);this._parser.parse(this._parseBuffer,mt)}else mt=typeof Ae=="string"?this._stringDecoder.decode(Ae,this._parseBuffer):this._utf8Decoder.decode(Ae,this._parseBuffer),this._parser.parse(this._parseBuffer,mt);(De=this._bufferService.buffer).x===Oe&&De.y===Ze||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},Pe.prototype.print=function(Ae,De,Oe){var Ze,qe,Xe=this._bufferService.buffer,mt=this._charsetService.charset,pt=this._optionsService.options.screenReaderMode,Mt=this._bufferService.cols,at=this._coreService.decPrivateModes.wraparound,_t=this._coreService.modes.insertMode,dt=this._curAttrData,Rt=Xe.lines.get(Xe.ybase+Xe.y);this._dirtyRowService.markDirty(Xe.y),Xe.x&&Oe-De>0&&Rt.getWidth(Xe.x-1)===2&&Rt.setCellFromCodePoint(Xe.x-1,0,1,dt.fg,dt.bg,dt.extended);for(var ut=De;ut<Oe;++ut){if(Ze=Ae[ut],qe=this._unicodeService.wcwidth(Ze),Ze<127&&mt){var rt=mt[String.fromCharCode(Ze)];rt&&(Ze=rt.charCodeAt(0))}if(pt&&this._onA11yChar.fire(pe.stringFromCodePoint(Ze)),qe||!Xe.x){if(Xe.x+qe-1>=Mt){if(at){for(;Xe.x<Mt;)Rt.setCellFromCodePoint(Xe.x++,0,1,dt.fg,dt.bg,dt.extended);Xe.x=0,Xe.y++,Xe.y===Xe.scrollBottom+1?(Xe.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(Xe.y>=this._bufferService.rows&&(Xe.y=this._bufferService.rows-1),Xe.lines.get(Xe.ybase+Xe.y).isWrapped=!0),Rt=Xe.lines.get(Xe.ybase+Xe.y)}else if(Xe.x=Mt-1,qe===2)continue}if(_t&&(Rt.insertCells(Xe.x,qe,Xe.getNullCell(dt),dt),Rt.getWidth(Mt-1)===2&&Rt.setCellFromCodePoint(Mt-1,fe.NULL_CELL_CODE,fe.NULL_CELL_WIDTH,dt.fg,dt.bg,dt.extended)),Rt.setCellFromCodePoint(Xe.x++,Ze,qe,dt.fg,dt.bg,dt.extended),qe>0)for(;--qe;)Rt.setCellFromCodePoint(Xe.x++,0,0,dt.fg,dt.bg,dt.extended)}else Rt.getWidth(Xe.x-1)?Rt.addCodepointToCell(Xe.x-1,Ze):Rt.addCodepointToCell(Xe.x-2,Ze)}Oe-De>0&&(Rt.loadCell(Xe.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),Xe.x<Mt&&Oe-De>0&&Rt.getWidth(Xe.x)===0&&!Rt.hasContent(Xe.x)&&Rt.setCellFromCodePoint(Xe.x,0,1,dt.fg,dt.bg,dt.extended),this._dirtyRowService.markDirty(Xe.y)},Pe.prototype.addCsiHandler=function(Ae,De){var Oe=this;return Ae.final!=="t"||Ae.prefix||Ae.intermediates?this._parser.addCsiHandler(Ae,De):this._parser.addCsiHandler(Ae,function(Ze){return!ae(Ze.params[0],Oe._optionsService.options.windowOptions)||De(Ze)})},Pe.prototype.addDcsHandler=function(Ae,De){return this._parser.addDcsHandler(Ae,new oe.DcsHandler(De))},Pe.prototype.addEscHandler=function(Ae,De){return this._parser.addEscHandler(Ae,De)},Pe.prototype.addOscHandler=function(Ae,De){return this._parser.addOscHandler(Ae,new z.OscHandler(De))},Pe.prototype.bell=function(){this._onRequestBell.fire()},Pe.prototype.lineFeed=function(){var Ae=this._bufferService.buffer;this._dirtyRowService.markDirty(Ae.y),this._optionsService.options.convertEol&&(Ae.x=0),Ae.y++,Ae.y===Ae.scrollBottom+1?(Ae.y--,this._onRequestScroll.fire(this._eraseAttrData())):Ae.y>=this._bufferService.rows&&(Ae.y=this._bufferService.rows-1),Ae.x>=this._bufferService.cols&&Ae.x--,this._dirtyRowService.markDirty(Ae.y),this._onLineFeed.fire()},Pe.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},Pe.prototype.backspace=function(){var Ae,De=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(De.x>0&&De.x--);if(this._restrictCursor(this._bufferService.cols),De.x>0)De.x--;else if(De.x===0&&De.y>De.scrollTop&&De.y<=De.scrollBottom&&(!((Ae=De.lines.get(De.ybase+De.y))===null||Ae===void 0)&&Ae.isWrapped)){De.lines.get(De.ybase+De.y).isWrapped=!1,De.y--,De.x=this._bufferService.cols-1;var Oe=De.lines.get(De.ybase+De.y);Oe.hasWidth(De.x)&&!Oe.hasContent(De.x)&&De.x--}this._restrictCursor()},Pe.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var Ae=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-Ae)}},Pe.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},Pe.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},Pe.prototype._restrictCursor=function(Ae){Ae===void 0&&(Ae=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(Ae,Math.max(0,this._bufferService.buffer.x)),this._bufferService.buffer.y=this._coreService.decPrivateModes.origin?Math.min(this._bufferService.buffer.scrollBottom,Math.max(this._bufferService.buffer.scrollTop,this._bufferService.buffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._bufferService.buffer.y)),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},Pe.prototype._setCursor=function(Ae,De){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=Ae,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+De):(this._bufferService.buffer.x=Ae,this._bufferService.buffer.y=De),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},Pe.prototype._moveCursor=function(Ae,De){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+Ae,this._bufferService.buffer.y+De)},Pe.prototype.cursorUp=function(Ae){var De=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;De>=0?this._moveCursor(0,-Math.min(De,Ae.params[0]||1)):this._moveCursor(0,-(Ae.params[0]||1))},Pe.prototype.cursorDown=function(Ae){var De=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;De>=0?this._moveCursor(0,Math.min(De,Ae.params[0]||1)):this._moveCursor(0,Ae.params[0]||1)},Pe.prototype.cursorForward=function(Ae){this._moveCursor(Ae.params[0]||1,0)},Pe.prototype.cursorBackward=function(Ae){this._moveCursor(-(Ae.params[0]||1),0)},Pe.prototype.cursorNextLine=function(Ae){this.cursorDown(Ae),this._bufferService.buffer.x=0},Pe.prototype.cursorPrecedingLine=function(Ae){this.cursorUp(Ae),this._bufferService.buffer.x=0},Pe.prototype.cursorCharAbsolute=function(Ae){this._setCursor((Ae.params[0]||1)-1,this._bufferService.buffer.y)},Pe.prototype.cursorPosition=function(Ae){this._setCursor(Ae.length>=2?(Ae.params[1]||1)-1:0,(Ae.params[0]||1)-1)},Pe.prototype.charPosAbsolute=function(Ae){this._setCursor((Ae.params[0]||1)-1,this._bufferService.buffer.y)},Pe.prototype.hPositionRelative=function(Ae){this._moveCursor(Ae.params[0]||1,0)},Pe.prototype.linePosAbsolute=function(Ae){this._setCursor(this._bufferService.buffer.x,(Ae.params[0]||1)-1)},Pe.prototype.vPositionRelative=function(Ae){this._moveCursor(0,Ae.params[0]||1)},Pe.prototype.hVPosition=function(Ae){this.cursorPosition(Ae)},Pe.prototype.tabClear=function(Ae){var De=Ae.params[0];De===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:De===3&&(this._bufferService.buffer.tabs={})},Pe.prototype.cursorForwardTab=function(Ae){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var De=Ae.params[0]||1;De--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},Pe.prototype.cursorBackwardTab=function(Ae){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var De=Ae.params[0]||1,Oe=this._bufferService.buffer;De--;)Oe.x=Oe.prevStop()},Pe.prototype._eraseInBufferLine=function(Ae,De,Oe,Ze){Ze===void 0&&(Ze=!1);var qe=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+Ae);qe.replaceCells(De,Oe,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Ze&&(qe.isWrapped=!1)},Pe.prototype._resetBufferLine=function(Ae){var De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+Ae);De.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),De.isWrapped=!1},Pe.prototype.eraseInDisplay=function(Ae){var De;switch(this._restrictCursor(),Ae.params[0]){case 0:for(De=this._bufferService.buffer.y,this._dirtyRowService.markDirty(De),this._eraseInBufferLine(De++,this._bufferService.buffer.x,this._bufferService.cols,this._bufferService.buffer.x===0);De<this._bufferService.rows;De++)this._resetBufferLine(De);this._dirtyRowService.markDirty(De);break;case 1:for(De=this._bufferService.buffer.y,this._dirtyRowService.markDirty(De),this._eraseInBufferLine(De,0,this._bufferService.buffer.x+1,!0),this._bufferService.buffer.x+1>=this._bufferService.cols&&(this._bufferService.buffer.lines.get(De+1).isWrapped=!1);De--;)this._resetBufferLine(De);this._dirtyRowService.markDirty(0);break;case 2:for(De=this._bufferService.rows,this._dirtyRowService.markDirty(De-1);De--;)this._resetBufferLine(De);this._dirtyRowService.markDirty(0);break;case 3:var Oe=this._bufferService.buffer.lines.length-this._bufferService.rows;Oe>0&&(this._bufferService.buffer.lines.trimStart(Oe),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-Oe,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-Oe,0),this._onScroll.fire(0))}},Pe.prototype.eraseInLine=function(Ae){switch(this._restrictCursor(),Ae.params[0]){case 0:this._eraseInBufferLine(this._bufferService.buffer.y,this._bufferService.buffer.x,this._bufferService.cols);break;case 1:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.buffer.x+1);break;case 2:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.cols)}this._dirtyRowService.markDirty(this._bufferService.buffer.y)},Pe.prototype.insertLines=function(Ae){this._restrictCursor();var De=Ae.params[0]||1,Oe=this._bufferService.buffer;if(!(Oe.y>Oe.scrollBottom||Oe.y<Oe.scrollTop)){for(var Ze=Oe.ybase+Oe.y,qe=this._bufferService.rows-1-Oe.scrollBottom,Xe=this._bufferService.rows-1+Oe.ybase-qe+1;De--;)Oe.lines.splice(Xe-1,1),Oe.lines.splice(Ze,0,Oe.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(Oe.y,Oe.scrollBottom),Oe.x=0}},Pe.prototype.deleteLines=function(Ae){this._restrictCursor();var De=Ae.params[0]||1,Oe=this._bufferService.buffer;if(!(Oe.y>Oe.scrollBottom||Oe.y<Oe.scrollTop)){var Ze,qe=Oe.ybase+Oe.y;for(Ze=this._bufferService.rows-1-Oe.scrollBottom,Ze=this._bufferService.rows-1+Oe.ybase-Ze;De--;)Oe.lines.splice(qe,1),Oe.lines.splice(Ze,0,Oe.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(Oe.y,Oe.scrollBottom),Oe.x=0}},Pe.prototype.insertChars=function(Ae){this._restrictCursor();var De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);De&&(De.insertCells(this._bufferService.buffer.x,Ae.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},Pe.prototype.deleteChars=function(Ae){this._restrictCursor();var De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);De&&(De.deleteCells(this._bufferService.buffer.x,Ae.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},Pe.prototype.scrollUp=function(Ae){for(var De=Ae.params[0]||1,Oe=this._bufferService.buffer;De--;)Oe.lines.splice(Oe.ybase+Oe.scrollTop,1),Oe.lines.splice(Oe.ybase+Oe.scrollBottom,0,Oe.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(Oe.scrollTop,Oe.scrollBottom)},Pe.prototype.scrollDown=function(Ae){for(var De=Ae.params[0]||1,Oe=this._bufferService.buffer;De--;)Oe.lines.splice(Oe.ybase+Oe.scrollBottom,1),Oe.lines.splice(Oe.ybase+Oe.scrollTop,0,Oe.getBlankLine(de.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(Oe.scrollTop,Oe.scrollBottom)},Pe.prototype.scrollLeft=function(Ae){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var Oe=Ae.params[0]||1,Ze=De.scrollTop;Ze<=De.scrollBottom;++Ze){var qe=De.lines.get(De.ybase+Ze);qe.deleteCells(0,Oe,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),qe.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},Pe.prototype.scrollRight=function(Ae){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var Oe=Ae.params[0]||1,Ze=De.scrollTop;Ze<=De.scrollBottom;++Ze){var qe=De.lines.get(De.ybase+Ze);qe.insertCells(0,Oe,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),qe.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},Pe.prototype.insertColumns=function(Ae){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var Oe=Ae.params[0]||1,Ze=De.scrollTop;Ze<=De.scrollBottom;++Ze){var qe=this._bufferService.buffer.lines.get(De.ybase+Ze);qe.insertCells(De.x,Oe,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),qe.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},Pe.prototype.deleteColumns=function(Ae){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var Oe=Ae.params[0]||1,Ze=De.scrollTop;Ze<=De.scrollBottom;++Ze){var qe=De.lines.get(De.ybase+Ze);qe.deleteCells(De.x,Oe,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),qe.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},Pe.prototype.eraseChars=function(Ae){this._restrictCursor();var De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);De&&(De.replaceCells(this._bufferService.buffer.x,this._bufferService.buffer.x+(Ae.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},Pe.prototype.repeatPrecedingCharacter=function(Ae){if(this._parser.precedingCodepoint){for(var De=Ae.params[0]||1,Oe=new Uint32Array(De),Ze=0;Ze<De;++Ze)Oe[Ze]=this._parser.precedingCodepoint;this.print(Oe,0,Oe.length)}},Pe.prototype.sendDeviceAttributesPrimary=function(Ae){Ae.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(Ce.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(Ce.C0.ESC+"[?6c"))},Pe.prototype.sendDeviceAttributesSecondary=function(Ae){Ae.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(Ce.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(Ce.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(Ae.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(Ce.C0.ESC+"[>83;40003;0c"))},Pe.prototype._is=function(Ae){return(this._optionsService.options.termName+"").indexOf(Ae)===0},Pe.prototype.setMode=function(Ae){for(var De=0;De<Ae.length;De++)switch(Ae.params[De]){case 4:this._coreService.modes.insertMode=!0}},Pe.prototype.setModePrivate=function(Ae){for(var De=0;De<Ae.length;De++)switch(Ae.params[De]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,xe.DEFAULT_CHARSET),this._charsetService.setgCharset(1,xe.DEFAULT_CHARSET),this._charsetService.setgCharset(2,xe.DEFAULT_CHARSET),this._charsetService.setgCharset(3,xe.DEFAULT_CHARSET);break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0;break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}},Pe.prototype.resetMode=function(Ae){for(var De=0;De<Ae.length;De++)switch(Ae.params[De]){case 4:this._coreService.modes.insertMode=!1}},Pe.prototype.resetModePrivate=function(Ae){for(var De=0;De<Ae.length;De++)switch(Ae.params[De]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),Ae.params[De]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}},Pe.prototype._updateAttrColor=function(Ae,De,Oe,Ze,qe){return De===2?(Ae|=50331648,Ae&=-16777216,Ae|=ee.AttributeData.fromColorRGB([Oe,Ze,qe])):De===5&&(Ae&=-50331904,Ae|=33554432|255&Oe),Ae},Pe.prototype._extractColor=function(Ae,De,Oe){var Ze=[0,0,-1,0,0,0],qe=0,Xe=0;do{if(Ze[Xe+qe]=Ae.params[De+Xe],Ae.hasSubParams(De+Xe)){var mt=Ae.getSubParams(De+Xe),pt=0;do Ze[1]===5&&(qe=1),Ze[Xe+pt+1+qe]=mt[pt];while(++pt<mt.length&&pt+Xe+1+qe<Ze.length);break}if(Ze[1]===5&&Xe+qe>=2||Ze[1]===2&&Xe+qe>=5)break;Ze[1]&&(qe=1)}while(++Xe+De<Ae.length&&Xe+qe<Ze.length);for(pt=2;pt<Ze.length;++pt)Ze[pt]===-1&&(Ze[pt]=0);switch(Ze[0]){case 38:Oe.fg=this._updateAttrColor(Oe.fg,Ze[1],Ze[3],Ze[4],Ze[5]);break;case 48:Oe.bg=this._updateAttrColor(Oe.bg,Ze[1],Ze[3],Ze[4],Ze[5]);break;case 58:Oe.extended=Oe.extended.clone(),Oe.extended.underlineColor=this._updateAttrColor(Oe.extended.underlineColor,Ze[1],Ze[3],Ze[4],Ze[5])}return Xe},Pe.prototype._processUnderline=function(Ae,De){De.extended=De.extended.clone(),(!~Ae||Ae>5)&&(Ae=1),De.extended.underlineStyle=Ae,De.fg|=268435456,Ae===0&&(De.fg&=-268435457),De.updateExtended()},Pe.prototype.charAttributes=function(Ae){if(Ae.length===1&&Ae.params[0]===0)return this._curAttrData.fg=de.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=de.DEFAULT_ATTR_DATA.bg);for(var De,Oe=Ae.length,Ze=this._curAttrData,qe=0;qe<Oe;qe++)(De=Ae.params[qe])>=30&&De<=37?(Ze.fg&=-50331904,Ze.fg|=16777216|De-30):De>=40&&De<=47?(Ze.bg&=-50331904,Ze.bg|=16777216|De-40):De>=90&&De<=97?(Ze.fg&=-50331904,Ze.fg|=16777224|De-90):De>=100&&De<=107?(Ze.bg&=-50331904,Ze.bg|=16777224|De-100):De===0?(Ze.fg=de.DEFAULT_ATTR_DATA.fg,Ze.bg=de.DEFAULT_ATTR_DATA.bg):De===1?Ze.fg|=134217728:De===3?Ze.bg|=67108864:De===4?(Ze.fg|=268435456,this._processUnderline(Ae.hasSubParams(qe)?Ae.getSubParams(qe)[0]:1,Ze)):De===5?Ze.fg|=536870912:De===7?Ze.fg|=67108864:De===8?Ze.fg|=1073741824:De===2?Ze.bg|=134217728:De===21?this._processUnderline(2,Ze):De===22?(Ze.fg&=-134217729,Ze.bg&=-134217729):De===23?Ze.bg&=-67108865:De===24?Ze.fg&=-268435457:De===25?Ze.fg&=-536870913:De===27?Ze.fg&=-67108865:De===28?Ze.fg&=-1073741825:De===39?(Ze.fg&=-67108864,Ze.fg|=16777215&de.DEFAULT_ATTR_DATA.fg):De===49?(Ze.bg&=-67108864,Ze.bg|=16777215&de.DEFAULT_ATTR_DATA.bg):De===38||De===48||De===58?qe+=this._extractColor(Ae,qe,Ze):De===59?(Ze.extended=Ze.extended.clone(),Ze.extended.underlineColor=-1,Ze.updateExtended()):De===100?(Ze.fg&=-67108864,Ze.fg|=16777215&de.DEFAULT_ATTR_DATA.fg,Ze.bg&=-67108864,Ze.bg|=16777215&de.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",De)},Pe.prototype.deviceStatus=function(Ae){switch(Ae.params[0]){case 5:this._coreService.triggerDataEvent(Ce.C0.ESC+"[0n");break;case 6:var De=this._bufferService.buffer.y+1,Oe=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(Ce.C0.ESC+"["+De+";"+Oe+"R")}},Pe.prototype.deviceStatusPrivate=function(Ae){switch(Ae.params[0]){case 6:var De=this._bufferService.buffer.y+1,Oe=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(Ce.C0.ESC+"[?"+De+";"+Oe+"R")}},Pe.prototype.softReset=function(Ae){this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._bufferService.buffer.scrollTop=0,this._bufferService.buffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=de.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._bufferService.buffer.savedX=0,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1},Pe.prototype.setCursorStyle=function(Ae){var De=Ae.params[0]||1;switch(De){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}var Oe=De%2==1;this._optionsService.options.cursorBlink=Oe},Pe.prototype.setScrollRegion=function(Ae){var De,Oe=Ae.params[0]||1;(Ae.length<2||(De=Ae.params[1])>this._bufferService.rows||De===0)&&(De=this._bufferService.rows),De>Oe&&(this._bufferService.buffer.scrollTop=Oe-1,this._bufferService.buffer.scrollBottom=De-1,this._setCursor(0,0))},Pe.prototype.windowOptions=function(Ae){if(ae(Ae.params[0],this._optionsService.options.windowOptions)){var De=Ae.length>1?Ae.params[1]:0;switch(Ae.params[0]){case 14:De!==2&&this._onRequestWindowsOptionsReport.fire(Me.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(Me.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(Ce.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:De!==0&&De!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),De!==0&&De!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:De!==0&&De!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),De!==0&&De!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}}},Pe.prototype.saveCursor=function(Ae){this._bufferService.buffer.savedX=this._bufferService.buffer.x,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase+this._bufferService.buffer.y,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset},Pe.prototype.restoreCursor=function(Ae){this._bufferService.buffer.x=this._bufferService.buffer.savedX||0,this._bufferService.buffer.y=Math.max(this._bufferService.buffer.savedY-this._bufferService.buffer.ybase,0),this._curAttrData.fg=this._bufferService.buffer.savedCurAttrData.fg,this._curAttrData.bg=this._bufferService.buffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._bufferService.buffer.savedCharset&&(this._charsetService.charset=this._bufferService.buffer.savedCharset),this._restrictCursor()},Pe.prototype.setTitle=function(Ae){this._windowTitle=Ae,this._onTitleChange.fire(Ae)},Pe.prototype.setIconName=function(Ae){this._iconName=Ae},Pe.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},Pe.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},Pe.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},Pe.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,xe.DEFAULT_CHARSET)},Pe.prototype.selectCharset=function(Ae){Ae.length===2?Ae[0]!=="/"&&this._charsetService.setgCharset(re[Ae[0]],xe.CHARSETS[Ae[1]]||xe.DEFAULT_CHARSET):this.selectDefaultCharset()},Pe.prototype.index=function(){this._restrictCursor();var Ae=this._bufferService.buffer;this._bufferService.buffer.y++,Ae.y===Ae.scrollBottom+1?(Ae.y--,this._onRequestScroll.fire(this._eraseAttrData())):Ae.y>=this._bufferService.rows&&(Ae.y=this._bufferService.rows-1),this._restrictCursor()},Pe.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},Pe.prototype.reverseIndex=function(){this._restrictCursor();var Ae=this._bufferService.buffer;if(Ae.y===Ae.scrollTop){var De=Ae.scrollBottom-Ae.scrollTop;Ae.lines.shiftElements(Ae.ybase+Ae.y,De,1),Ae.lines.set(Ae.ybase+Ae.y,Ae.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(Ae.scrollTop,Ae.scrollBottom)}else Ae.y--,this._restrictCursor()},Pe.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},Pe.prototype.reset=function(){this._curAttrData=de.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=de.DEFAULT_ATTR_DATA.clone()},Pe.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},Pe.prototype.setgLevel=function(Ae){this._charsetService.setgLevel(Ae)},Pe.prototype.screenAlignmentPattern=function(){var Ae=new ue.CellData;Ae.content=1<<22|69,Ae.fg=this._curAttrData.fg,Ae.bg=this._curAttrData.bg;var De=this._bufferService.buffer;this._setCursor(0,0);for(var Oe=0;Oe<this._bufferService.rows;++Oe){var Ze=De.ybase+De.y+Oe,qe=De.lines.get(Ze);qe&&(qe.fill(Ae),qe.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},Pe}(ye.Disposable);Ie.InputHandler=me},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.DEFAULT_CHARSET=Ie.CHARSETS=void 0,Ie.CHARSETS={},Ie.DEFAULT_CHARSET=Ie.CHARSETS.B,Ie.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},Ie.CHARSETS.A={"#":"\xA3"},Ie.CHARSETS.B=void 0,Ie.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},Ie.CHARSETS.C=Ie.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},Ie.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},Ie.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},Ie.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},Ie.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},Ie.CHARSETS.E=Ie.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},Ie.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},Ie.CHARSETS.H=Ie.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},Ie.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.Params=void 0;var Se=function(){function je(Me,Ce){if(Me===void 0&&(Me=32),Ce===void 0&&(Ce=32),this.maxLength=Me,this.maxSubParamsLength=Ce,Ce>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(Me),this.length=0,this._subParams=new Int32Array(Ce),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(Me),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return je.fromArray=function(Me){var Ce=new je;if(!Me.length)return Ce;for(var xe=Me[0]instanceof Array?1:0;xe<Me.length;++xe){var be=Me[xe];if(be instanceof Array)for(var ye=0;ye<be.length;++ye)Ce.addSubParam(be[ye]);else Ce.addParam(be)}return Ce},je.prototype.clone=function(){var Me=new je(this.maxLength,this.maxSubParamsLength);return Me.params.set(this.params),Me.length=this.length,Me._subParams.set(this._subParams),Me._subParamsLength=this._subParamsLength,Me._subParamsIdx.set(this._subParamsIdx),Me._rejectDigits=this._rejectDigits,Me._rejectSubDigits=this._rejectSubDigits,Me._digitIsSub=this._digitIsSub,Me},je.prototype.toArray=function(){for(var Me=[],Ce=0;Ce<this.length;++Ce){Me.push(this.params[Ce]);var xe=this._subParamsIdx[Ce]>>8,be=255&this._subParamsIdx[Ce];be-xe>0&&Me.push(Array.prototype.slice.call(this._subParams,xe,be))}return Me},je.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},je.prototype.addParam=function(Me){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(Me<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=Me>2147483647?2147483647:Me}},je.prototype.addSubParam=function(Me){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(Me<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=Me>2147483647?2147483647:Me,this._subParamsIdx[this.length-1]++}},je.prototype.hasSubParams=function(Me){return(255&this._subParamsIdx[Me])-(this._subParamsIdx[Me]>>8)>0},je.prototype.getSubParams=function(Me){var Ce=this._subParamsIdx[Me]>>8,xe=255&this._subParamsIdx[Me];return xe-Ce>0?this._subParams.subarray(Ce,xe):null},je.prototype.getSubParamsAll=function(){for(var Me={},Ce=0;Ce<this.length;++Ce){var xe=this._subParamsIdx[Ce]>>8,be=255&this._subParamsIdx[Ce];be-xe>0&&(Me[Ce]=this._subParams.slice(xe,be))}return Me},je.prototype.addDigit=function(Me){var Ce;if(!(this._rejectDigits||!(Ce=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var xe=this._digitIsSub?this._subParams:this.params,be=xe[Ce-1];xe[Ce-1]=~be?Math.min(10*be+Me,2147483647):Me}},je}();Ie.Params=Se},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.OscHandler=Ie.OscParser=void 0;var Se=Le(23),je=Le(8),Me=function(){function xe(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return xe.prototype.addHandler=function(be,ye){this._handlers[be]===void 0&&(this._handlers[be]=[]);var we=this._handlers[be];return we.push(ye),{dispose:function(){var pe=we.indexOf(ye);pe!==-1&&we.splice(pe,1)}}},xe.prototype.setHandler=function(be,ye){this._handlers[be]=[ye]},xe.prototype.clearHandler=function(be){this._handlers[be]&&delete this._handlers[be]},xe.prototype.setHandlerFallback=function(be){this._handlerFb=be},xe.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},xe.prototype.reset=function(){this._state===2&&this.end(!1),this._id=-1,this._state=0},xe.prototype._start=function(){var be=this._handlers[this._id];if(be)for(var ye=be.length-1;ye>=0;ye--)be[ye].start();else this._handlerFb(this._id,"START")},xe.prototype._put=function(be,ye,we){var pe=this._handlers[this._id];if(pe)for(var de=pe.length-1;de>=0;de--)pe[de].put(be,ye,we);else this._handlerFb(this._id,"PUT",je.utf32ToString(be,ye,we))},xe.prototype._end=function(be){var ye=this._handlers[this._id];if(ye){for(var we=ye.length-1;we>=0&&ye[we].end(be)===!1;we--);for(we--;we>=0;we--)ye[we].end(!1)}else this._handlerFb(this._id,"END",be)},xe.prototype.start=function(){this.reset(),this._id=-1,this._state=1},xe.prototype.put=function(be,ye,we){if(this._state!==3){if(this._state===1)for(;ye<we;){var pe=be[ye++];if(pe===59){this._state=2,this._start();break}if(pe<48||57<pe)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+pe-48}this._state===2&&we-ye>0&&this._put(be,ye,we)}},xe.prototype.end=function(be){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(be)),this._id=-1,this._state=0)},xe}();Ie.OscParser=Me;var Ce=function(){function xe(be){this._handler=be,this._data="",this._hitLimit=!1}return xe.prototype.start=function(){this._data="",this._hitLimit=!1},xe.prototype.put=function(be,ye,we){this._hitLimit||(this._data+=je.utf32ToString(be,ye,we),this._data.length>Se.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},xe.prototype.end=function(be){var ye;return this._hitLimit?ye=!1:be&&(ye=this._handler(this._data)),this._data="",this._hitLimit=!1,ye},xe}();Ie.OscHandler=Ce},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.PAYLOAD_LIMIT=void 0,Ie.PAYLOAD_LIMIT=1e7},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.DcsHandler=Ie.DcsParser=void 0;var Se=Le(8),je=Le(21),Me=Le(23),Ce=[],xe=function(){function ye(){this._handlers=Object.create(null),this._active=Ce,this._ident=0,this._handlerFb=function(){}}return ye.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},ye.prototype.addHandler=function(we,pe){this._handlers[we]===void 0&&(this._handlers[we]=[]);var de=this._handlers[we];return de.push(pe),{dispose:function(){var ge=de.indexOf(pe);ge!==-1&&de.splice(ge,1)}}},ye.prototype.setHandler=function(we,pe){this._handlers[we]=[pe]},ye.prototype.clearHandler=function(we){this._handlers[we]&&delete this._handlers[we]},ye.prototype.setHandlerFallback=function(we){this._handlerFb=we},ye.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=Ce,this._ident=0},ye.prototype.hook=function(we,pe){if(this.reset(),this._ident=we,this._active=this._handlers[we]||Ce,this._active.length)for(var de=this._active.length-1;de>=0;de--)this._active[de].hook(pe);else this._handlerFb(this._ident,"HOOK",pe)},ye.prototype.put=function(we,pe,de){if(this._active.length)for(var ge=this._active.length-1;ge>=0;ge--)this._active[ge].put(we,pe,de);else this._handlerFb(this._ident,"PUT",Se.utf32ToString(we,pe,de))},ye.prototype.unhook=function(we){if(this._active.length){for(var pe=this._active.length-1;pe>=0&&this._active[pe].unhook(we)===!1;pe--);for(pe--;pe>=0;pe--)this._active[pe].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",we);this._active=Ce,this._ident=0},ye}();Ie.DcsParser=xe;var be=function(){function ye(we){this._handler=we,this._data="",this._hitLimit=!1}return ye.prototype.hook=function(we){this._params=we.clone(),this._data="",this._hitLimit=!1},ye.prototype.put=function(we,pe,de){this._hitLimit||(this._data+=Se.utf32ToString(we,pe,de),this._data.length>Me.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},ye.prototype.unhook=function(we){var pe;return this._hitLimit?pe=!1:we&&(pe=this._handler(this._data,this._params||new je.Params)),this._params=void 0,this._data="",this._hitLimit=!1,pe},ye}();Ie.DcsHandler=be},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.removeTerminalFromCache=Ie.acquireCharAtlas=void 0;var Se=Le(26),je=Le(43),Me=[];Ie.acquireCharAtlas=function(Ce,xe,be,ye,we){for(var pe=Se.generateConfig(ye,we,Ce,be),de=0;de<Me.length;de++){var ge=(fe=Me[de]).ownedBy.indexOf(xe);if(ge>=0){if(Se.configEquals(fe.config,pe))return fe.atlas;fe.ownedBy.length===1?(fe.atlas.dispose(),Me.splice(de,1)):fe.ownedBy.splice(ge,1);break}}for(de=0;de<Me.length;de++){var fe=Me[de];if(Se.configEquals(fe.config,pe))return fe.ownedBy.push(xe),fe.atlas}var ue={atlas:new je.DynamicCharAtlas(document,pe),config:pe,ownedBy:[xe]};return Me.push(ue),ue.atlas},Ie.removeTerminalFromCache=function(Ce){for(var xe=0;xe<Me.length;xe++){var be=Me[xe].ownedBy.indexOf(Ce);if(be!==-1){Me[xe].ownedBy.length===1?(Me[xe].atlas.dispose(),Me.splice(xe,1)):Me[xe].ownedBy.splice(be,1);break}}}},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.is256Color=Ie.configEquals=Ie.generateConfig=void 0;var Se=Le(3);Ie.generateConfig=function(je,Me,Ce,xe){var be={foreground:xe.foreground,background:xe.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:xe.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:je,scaledCharHeight:Me,fontFamily:Ce.fontFamily,fontSize:Ce.fontSize,fontWeight:Ce.fontWeight,fontWeightBold:Ce.fontWeightBold,allowTransparency:Ce.allowTransparency,colors:be}},Ie.configEquals=function(je,Me){for(var Ce=0;Ce<je.colors.ansi.length;Ce++)if(je.colors.ansi[Ce].rgba!==Me.colors.ansi[Ce].rgba)return!1;return je.devicePixelRatio===Me.devicePixelRatio&&je.fontFamily===Me.fontFamily&&je.fontSize===Me.fontSize&&je.fontWeight===Me.fontWeight&&je.fontWeightBold===Me.fontWeightBold&&je.allowTransparency===Me.allowTransparency&&je.scaledCharWidth===Me.scaledCharWidth&&je.scaledCharHeight===Me.scaledCharHeight&&je.colors.foreground===Me.colors.foreground&&je.colors.background===Me.colors.background},Ie.is256Color=function(je){return je<Se.DEFAULT_COLOR}},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.ColorManager=Ie.DEFAULT_ANSI_COLORS=void 0;var Se=Le(10),je=Le(45),Me=Se.css.toColor("#ffffff"),Ce=Se.css.toColor("#000000"),xe=Se.css.toColor("#ffffff"),be=Se.css.toColor("#000000"),ye={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};Ie.DEFAULT_ANSI_COLORS=function(){for(var pe=[Se.css.toColor("#2e3436"),Se.css.toColor("#cc0000"),Se.css.toColor("#4e9a06"),Se.css.toColor("#c4a000"),Se.css.toColor("#3465a4"),Se.css.toColor("#75507b"),Se.css.toColor("#06989a"),Se.css.toColor("#d3d7cf"),Se.css.toColor("#555753"),Se.css.toColor("#ef2929"),Se.css.toColor("#8ae234"),Se.css.toColor("#fce94f"),Se.css.toColor("#729fcf"),Se.css.toColor("#ad7fa8"),Se.css.toColor("#34e2e2"),Se.css.toColor("#eeeeec")],de=[0,95,135,175,215,255],ge=0;ge<216;ge++){var fe=de[ge/36%6|0],ue=de[ge/6%6|0],ee=de[ge%6];pe.push({css:Se.channels.toCss(fe,ue,ee),rgba:Se.channels.toRgba(fe,ue,ee)})}for(ge=0;ge<24;ge++){var z=8+10*ge;pe.push({css:Se.channels.toCss(z,z,z),rgba:Se.channels.toRgba(z,z,z)})}return pe}();var we=function(){function pe(de,ge){this.allowTransparency=ge;var fe=de.createElement("canvas");fe.width=1,fe.height=1;var ue=fe.getContext("2d");if(!ue)throw new Error("Could not get rendering context");this._ctx=ue,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new je.ColorContrastCache,this.colors={foreground:Me,background:Ce,cursor:xe,cursorAccent:be,selectionTransparent:ye,selectionOpaque:Se.color.blend(Ce,ye),ansi:Ie.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return pe.prototype.onOptionsChange=function(de){de==="minimumContrastRatio"&&this._contrastCache.clear()},pe.prototype.setTheme=function(de){de===void 0&&(de={}),this.colors.foreground=this._parseColor(de.foreground,Me),this.colors.background=this._parseColor(de.background,Ce),this.colors.cursor=this._parseColor(de.cursor,xe,!0),this.colors.cursorAccent=this._parseColor(de.cursorAccent,be,!0),this.colors.selectionTransparent=this._parseColor(de.selection,ye,!0),this.colors.selectionOpaque=Se.color.blend(this.colors.background,this.colors.selectionTransparent),Se.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=Se.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(de.black,Ie.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(de.red,Ie.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(de.green,Ie.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(de.yellow,Ie.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(de.blue,Ie.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(de.magenta,Ie.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(de.cyan,Ie.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(de.white,Ie.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(de.brightBlack,Ie.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(de.brightRed,Ie.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(de.brightGreen,Ie.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(de.brightYellow,Ie.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(de.brightBlue,Ie.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(de.brightMagenta,Ie.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(de.brightCyan,Ie.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(de.brightWhite,Ie.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},pe.prototype._parseColor=function(de,ge,fe){if(fe===void 0&&(fe=this.allowTransparency),de===void 0)return ge;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=de,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+de+" is invalid using fallback "+ge.css),ge;this._ctx.fillRect(0,0,1,1);var ue=this._ctx.getImageData(0,0,1,1).data;if(ue[3]!==255){if(!fe)return console.warn("Color: "+de+" is using transparency, but allowTransparency is false. Using fallback "+ge.css+"."),ge;var ee=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(me){return Number(me)}),z=ee[0],oe=ee[1],re=ee[2],ae=ee[3],le=Math.round(255*ae);return{rgba:Se.channels.toRgba(z,oe,re,le),css:de}}return{css:this._ctx.fillStyle,rgba:Se.channels.toRgba(ue[0],ue[1],ue[2],ue[3])}},pe}();Ie.ColorManager=we},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.throwIfFalsy=void 0,Ie.throwIfFalsy=function(Se){if(!Se)throw new Error("value must not be falsy");return Se}},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(we,pe){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ge){de.__proto__=ge}||function(de,ge){for(var fe in ge)ge.hasOwnProperty(fe)&&(de[fe]=ge[fe])})(we,pe)},function(we,pe){function de(){this.constructor=we}Se(we,pe),we.prototype=pe===null?Object.create(pe):(de.prototype=pe.prototype,new de)});Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.CharacterJoinerRegistry=Ie.JoinedCellData=void 0;var Me=Le(6),Ce=Le(3),xe=Le(4),be=function(we){function pe(de,ge,fe){var ue=we.call(this)||this;return ue.content=0,ue.combinedData="",ue.fg=de.fg,ue.bg=de.bg,ue.combinedData=ge,ue._width=fe,ue}return je(pe,we),pe.prototype.isCombined=function(){return 2097152},pe.prototype.getWidth=function(){return this._width},pe.prototype.getChars=function(){return this.combinedData},pe.prototype.getCode=function(){return 2097151},pe.prototype.setFromCharData=function(de){throw new Error("not implemented")},pe.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},pe}(Me.AttributeData);Ie.JoinedCellData=be;var ye=function(){function we(pe){this._bufferService=pe,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new xe.CellData}return we.prototype.registerCharacterJoiner=function(pe){var de={id:this._nextCharacterJoinerId++,handler:pe};return this._characterJoiners.push(de),de.id},we.prototype.deregisterCharacterJoiner=function(pe){for(var de=0;de<this._characterJoiners.length;de++)if(this._characterJoiners[de].id===pe)return this._characterJoiners.splice(de,1),!0;return!1},we.prototype.getJoinedCharacters=function(pe){if(this._characterJoiners.length===0)return[];var de=this._bufferService.buffer.lines.get(pe);if(!de||de.length===0)return[];for(var ge=[],fe=de.translateToString(!0),ue=0,ee=0,z=0,oe=de.getFg(0),re=de.getBg(0),ae=0;ae<de.getTrimmedLength();ae++)if(de.loadCell(ae,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==oe||this._workCell.bg!==re){if(ae-ue>1)for(var le=this._getJoinedRanges(fe,z,ee,de,ue),me=0;me<le.length;me++)ge.push(le[me]);ue=ae,z=ee,oe=this._workCell.fg,re=this._workCell.bg}ee+=this._workCell.getChars().length||Ce.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-ue>1)for(le=this._getJoinedRanges(fe,z,ee,de,ue),me=0;me<le.length;me++)ge.push(le[me]);return ge},we.prototype._getJoinedRanges=function(pe,de,ge,fe,ue){for(var ee=pe.substring(de,ge),z=this._characterJoiners[0].handler(ee),oe=1;oe<this._characterJoiners.length;oe++)for(var re=this._characterJoiners[oe].handler(ee),ae=0;ae<re.length;ae++)we._mergeRanges(z,re[ae]);return this._stringRangesToCellRanges(z,fe,ue),z},we.prototype._stringRangesToCellRanges=function(pe,de,ge){var fe=0,ue=!1,ee=0,z=pe[fe];if(z){for(var oe=ge;oe<this._bufferService.cols;oe++){var re=de.getWidth(oe),ae=de.getString(oe).length||Ce.WHITESPACE_CELL_CHAR.length;if(re!==0){if(!ue&&z[0]<=ee&&(z[0]=oe,ue=!0),z[1]<=ee){if(z[1]=oe,!(z=pe[++fe]))break;z[0]<=ee?(z[0]=oe,ue=!0):ue=!1}ee+=ae}}z&&(z[1]=this._bufferService.cols)}},we._mergeRanges=function(pe,de){for(var ge=!1,fe=0;fe<pe.length;fe++){var ue=pe[fe];if(ge){if(de[1]<=ue[0])return pe[fe-1][1]=de[1],pe;if(de[1]<=ue[1])return pe[fe-1][1]=Math.max(de[1],ue[1]),pe.splice(fe,1),pe;pe.splice(fe,1),fe--}else{if(de[1]<=ue[0])return pe.splice(fe,0,de),pe;if(de[1]<=ue[1])return ue[0]=Math.min(de[0],ue[0]),pe;de[0]<ue[1]&&(ue[0]=Math.min(de[0],ue[0]),ge=!0)}}return ge?pe[pe.length-1][1]=de[1]:pe.push(de),pe},we}();Ie.CharacterJoinerRegistry=ye},function(ln,Ie,Le){"use strict";function Se(je,Me){var Ce=Me.getBoundingClientRect();return[je.clientX-Ce.left,je.clientY-Ce.top]}Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.getRawByteCoords=Ie.getCoords=Ie.getCoordsRelativeToElement=void 0,Ie.getCoordsRelativeToElement=Se,Ie.getCoords=function(je,Me,Ce,xe,be,ye,we,pe){if(be){var de=Se(je,Me);if(de)return de[0]=Math.ceil((de[0]+(pe?ye/2:0))/ye),de[1]=Math.ceil(de[1]/we),de[0]=Math.min(Math.max(de[0],1),Ce+(pe?1:0)),de[1]=Math.min(Math.max(de[1],1),xe),de}},Ie.getRawByteCoords=function(je){if(je)return{x:je[0]+32,y:je[1]+32}}},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.RenderDebouncer=void 0;var Se=function(){function je(Me){this._renderCallback=Me}return je.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},je.prototype.refresh=function(Me,Ce,xe){var be=this;this._rowCount=xe,Me=Me!==void 0?Me:0,Ce=Ce!==void 0?Ce:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,Me):Me,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,Ce):Ce,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return be._innerRefresh()}))},je.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var Me=Math.max(this._rowStart,0),Ce=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(Me,Ce)}},je}();Ie.RenderDebouncer=Se},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(Ce,xe){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(be,ye){be.__proto__=ye}||function(be,ye){for(var we in ye)ye.hasOwnProperty(we)&&(be[we]=ye[we])})(Ce,xe)},function(Ce,xe){function be(){this.constructor=Ce}Se(Ce,xe),Ce.prototype=xe===null?Object.create(xe):(be.prototype=xe.prototype,new be)});Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.ScreenDprMonitor=void 0;var Me=function(Ce){function xe(){var be=Ce!==null&&Ce.apply(this,arguments)||this;return be._currentDevicePixelRatio=window.devicePixelRatio,be}return je(xe,Ce),xe.prototype.setListener=function(be){var ye=this;this._listener&&this.clearListener(),this._listener=be,this._outerListener=function(){ye._listener&&(ye._listener(window.devicePixelRatio,ye._currentDevicePixelRatio),ye._updateDpr())},this._updateDpr()},xe.prototype.dispose=function(){Ce.prototype.dispose.call(this),this.clearListener()},xe.prototype._updateDpr=function(){var be;this._outerListener&&((be=this._resolutionMediaMatchList)===null||be===void 0||be.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},xe.prototype.clearListener=function(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)},xe}(Le(2).Disposable);Ie.ScreenDprMonitor=Me},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.clone=void 0,Ie.clone=function Se(je,Me){if(Me===void 0&&(Me=5),typeof je!="object")return je;var Ce=Array.isArray(je)?[]:{};for(var xe in je)Ce[xe]=Me<=1?je[xe]:je[xe]?Se(je[xe],Me-1):je[xe];return Ce}},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.Terminal=void 0;var Se=Le(4),je=Le(35),Me=Le(18),Ce=Le(0),xe=Le(83),be=function(){function fe(ue){this._core=new je.Terminal(ue),this._addonManager=new xe.AddonManager}return fe.prototype._checkProposedApi=function(){if(!this._core.optionsService.options.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")},Object.defineProperty(fe.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new de(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"unicode",{get:function(){return this._checkProposedApi(),new ge(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"buffer",{get:function(){return this._checkProposedApi(),new we(this._core.buffers)},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),fe.prototype.blur=function(){this._core.blur()},fe.prototype.focus=function(){this._core.focus()},fe.prototype.resize=function(ue,ee){this._verifyIntegers(ue,ee),this._core.resize(ue,ee)},fe.prototype.open=function(ue){this._core.open(ue)},fe.prototype.attachCustomKeyEventHandler=function(ue){this._core.attachCustomKeyEventHandler(ue)},fe.prototype.registerLinkMatcher=function(ue,ee,z){return this._checkProposedApi(),this._core.registerLinkMatcher(ue,ee,z)},fe.prototype.deregisterLinkMatcher=function(ue){this._checkProposedApi(),this._core.deregisterLinkMatcher(ue)},fe.prototype.registerLinkProvider=function(ue){return this._checkProposedApi(),this._core.registerLinkProvider(ue)},fe.prototype.registerCharacterJoiner=function(ue){return this._checkProposedApi(),this._core.registerCharacterJoiner(ue)},fe.prototype.deregisterCharacterJoiner=function(ue){this._checkProposedApi(),this._core.deregisterCharacterJoiner(ue)},fe.prototype.registerMarker=function(ue){return this._checkProposedApi(),this._verifyIntegers(ue),this._core.addMarker(ue)},fe.prototype.addMarker=function(ue){return this.registerMarker(ue)},fe.prototype.hasSelection=function(){return this._core.hasSelection()},fe.prototype.select=function(ue,ee,z){this._verifyIntegers(ue,ee,z),this._core.select(ue,ee,z)},fe.prototype.getSelection=function(){return this._core.getSelection()},fe.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},fe.prototype.clearSelection=function(){this._core.clearSelection()},fe.prototype.selectAll=function(){this._core.selectAll()},fe.prototype.selectLines=function(ue,ee){this._verifyIntegers(ue,ee),this._core.selectLines(ue,ee)},fe.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},fe.prototype.scrollLines=function(ue){this._verifyIntegers(ue),this._core.scrollLines(ue)},fe.prototype.scrollPages=function(ue){this._verifyIntegers(ue),this._core.scrollPages(ue)},fe.prototype.scrollToTop=function(){this._core.scrollToTop()},fe.prototype.scrollToBottom=function(){this._core.scrollToBottom()},fe.prototype.scrollToLine=function(ue){this._verifyIntegers(ue),this._core.scrollToLine(ue)},fe.prototype.clear=function(){this._core.clear()},fe.prototype.write=function(ue,ee){this._core.write(ue,ee)},fe.prototype.writeUtf8=function(ue,ee){this._core.write(ue,ee)},fe.prototype.writeln=function(ue,ee){this._core.write(ue),this._core.write(`\r
|
|
|
`,ee)},fe.prototype.paste=function(ue){this._core.paste(ue)},fe.prototype.getOption=function(ue){return this._core.optionsService.getOption(ue)},fe.prototype.setOption=function(ue,ee){this._core.optionsService.setOption(ue,ee)},fe.prototype.refresh=function(ue,ee){this._verifyIntegers(ue,ee),this._core.refresh(ue,ee)},fe.prototype.reset=function(){this._core.reset()},fe.prototype.loadAddon=function(ue){return this._addonManager.loadAddon(this,ue)},Object.defineProperty(fe,"strings",{get:function(){return Me},enumerable:!1,configurable:!0}),fe.prototype._verifyIntegers=function(){for(var ue=[],ee=0;ee<arguments.length;ee++)ue[ee]=arguments[ee];for(var z=0,oe=ue;z<oe.length;z++){var re=oe[z];if(re===1/0||isNaN(re)||re%1!=0)throw new Error("This API only accepts integers")}},fe}();Ie.Terminal=be;var ye=function(){function fe(ue,ee){this._buffer=ue,this.type=ee}return fe.prototype.init=function(ue){return this._buffer=ue,this},Object.defineProperty(fe.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),fe.prototype.getLine=function(ue){var ee=this._buffer.lines.get(ue);if(ee)return new pe(ee)},fe.prototype.getNullCell=function(){return new Se.CellData},fe}(),we=function(){function fe(ue){var ee=this;this._buffers=ue,this._onBufferChange=new Ce.EventEmitter,this._normal=new ye(this._buffers.normal,"normal"),this._alternate=new ye(this._buffers.alt,"alternate"),this._buffers.onBufferActivate(function(){return ee._onBufferChange.fire(ee.active)})}return Object.defineProperty(fe.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"active",{get:function(){if(this._buffers.active===this._buffers.normal)return this.normal;if(this._buffers.active===this._buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"normal",{get:function(){return this._normal.init(this._buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"alternate",{get:function(){return this._alternate.init(this._buffers.alt)},enumerable:!1,configurable:!0}),fe}(),pe=function(){function fe(ue){this._line=ue}return Object.defineProperty(fe.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),fe.prototype.getCell=function(ue,ee){if(!(ue<0||ue>=this._line.length))return ee?(this._line.loadCell(ue,ee),ee):this._line.loadCell(ue,new Se.CellData)},fe.prototype.translateToString=function(ue,ee,z){return this._line.translateToString(ue,ee,z)},fe}(),de=function(){function fe(ue){this._core=ue}return fe.prototype.registerCsiHandler=function(ue,ee){return this._core.addCsiHandler(ue,function(z){return ee(z.toArray())})},fe.prototype.addCsiHandler=function(ue,ee){return this.registerCsiHandler(ue,ee)},fe.prototype.registerDcsHandler=function(ue,ee){return this._core.addDcsHandler(ue,function(z,oe){return ee(z,oe.toArray())})},fe.prototype.addDcsHandler=function(ue,ee){return this.registerDcsHandler(ue,ee)},fe.prototype.registerEscHandler=function(ue,ee){return this._core.addEscHandler(ue,ee)},fe.prototype.addEscHandler=function(ue,ee){return this.registerEscHandler(ue,ee)},fe.prototype.registerOscHandler=function(ue,ee){return this._core.addOscHandler(ue,ee)},fe.prototype.addOscHandler=function(ue,ee){return this.registerOscHandler(ue,ee)},fe}(),ge=function(){function fe(ue){this._core=ue}return fe.prototype.register=function(ue){this._core.unicodeService.register(ue)},Object.defineProperty(fe.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(ue){this._core.unicodeService.activeVersion=ue},enumerable:!1,configurable:!0}),fe}()},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(Mt,at){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_t,dt){_t.__proto__=dt}||function(_t,dt){for(var Rt in dt)dt.hasOwnProperty(Rt)&&(_t[Rt]=dt[Rt])})(Mt,at)},function(Mt,at){function _t(){this.constructor=Mt}Se(Mt,at),Mt.prototype=at===null?Object.create(at):(_t.prototype=at.prototype,new _t)});Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.Terminal=void 0;var Me=Le(36),Ce=Le(37),xe=Le(38),be=Le(12),ye=Le(19),we=Le(40),pe=Le(50),de=Le(51),ge=Le(11),fe=Le(7),ue=Le(18),ee=Le(54),z=Le(55),oe=Le(56),re=Le(57),ae=Le(59),le=Le(0),me=Le(16),ve=Le(27),Pe=Le(60),Ae=Le(5),De=Le(61),Oe=Le(62),Ze=Le(63),qe=Le(64),Xe=Le(65),mt=typeof window!="undefined"?window.document:null,pt=function(Mt){function at(_t){_t===void 0&&(_t={});var dt=Mt.call(this,_t)||this;return dt.browser=ge,dt._keyDownHandled=!1,dt._onCursorMove=new le.EventEmitter,dt._onKey=new le.EventEmitter,dt._onRender=new le.EventEmitter,dt._onSelectionChange=new le.EventEmitter,dt._onTitleChange=new le.EventEmitter,dt._onFocus=new le.EventEmitter,dt._onBlur=new le.EventEmitter,dt._onA11yCharEmitter=new le.EventEmitter,dt._onA11yTabEmitter=new le.EventEmitter,dt._setup(),dt.linkifier=dt._instantiationService.createInstance(pe.Linkifier),dt.linkifier2=dt.register(dt._instantiationService.createInstance(Ze.Linkifier2)),dt.register(dt._inputHandler.onRequestBell(function(){return dt.bell()})),dt.register(dt._inputHandler.onRequestRefreshRows(function(Rt,ut){return dt.refresh(Rt,ut)})),dt.register(dt._inputHandler.onRequestReset(function(){return dt.reset()})),dt.register(dt._inputHandler.onRequestScroll(function(Rt,ut){return dt.scroll(Rt,ut||void 0)})),dt.register(dt._inputHandler.onRequestWindowsOptionsReport(function(Rt){return dt._reportWindowsOptions(Rt)})),dt.register(le.forwardEvent(dt._inputHandler.onCursorMove,dt._onCursorMove)),dt.register(le.forwardEvent(dt._inputHandler.onTitleChange,dt._onTitleChange)),dt.register(le.forwardEvent(dt._inputHandler.onA11yChar,dt._onA11yCharEmitter)),dt.register(le.forwardEvent(dt._inputHandler.onA11yTab,dt._onA11yTabEmitter)),dt.register(dt._bufferService.onResize(function(Rt){return dt._afterResize(Rt.cols,Rt.rows)})),dt}return je(at,Mt),Object.defineProperty(at.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),at.prototype.dispose=function(){var _t,dt,Rt;this._isDisposed||(Mt.prototype.dispose.call(this),(_t=this._renderService)===null||_t===void 0||_t.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(Rt=(dt=this.element)===null||dt===void 0?void 0:dt.parentNode)===null||Rt===void 0||Rt.removeChild(this.element))},at.prototype._setup=function(){Mt.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(at.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),at.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},at.prototype._updateOptions=function(_t){var dt,Rt,ut,rt;switch(Mt.prototype._updateOptions.call(this,_t),_t){case"fontFamily":case"fontSize":(dt=this._renderService)===null||dt===void 0||dt.clear(),(Rt=this._charSizeService)===null||Rt===void 0||Rt.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":this._renderService&&(this._renderService.clear(),this._renderService.onResize(this.cols,this.rows),this.refresh(0,this.rows-1));break;case"rendererType":this._renderService&&(this._renderService.setRenderer(this._createRenderer()),this._renderService.onResize(this.cols,this.rows));break;case"scrollback":(ut=this.viewport)===null||ut===void 0||ut.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new oe.AccessibilityManager(this,this._renderService)):((rt=this._accessibilityManager)===null||rt===void 0||rt.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},at.prototype._onTextAreaFocus=function(_t){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(be.C0.ESC+"[I"),this.updateCursorStyle(_t),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},at.prototype.blur=function(){var _t;return(_t=this.textarea)===null||_t===void 0?void 0:_t.blur()},at.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(be.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},at.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var _t=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),dt=this._bufferService.buffer.y*_t,Rt=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=Rt+"px",this.textarea.style.top=dt+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=_t+"px",this.textarea.style.lineHeight=_t+"px",this.textarea.style.zIndex="-5"}},at.prototype._initGlobal=function(){var _t=this;this._bindKeys(),this.register(fe.addDisposableDomListener(this.element,"copy",function(Rt){_t.hasSelection()&&xe.copyHandler(Rt,_t._selectionService)}));var dt=function(Rt){return xe.handlePasteEvent(Rt,_t.textarea,_t._coreService)};this.register(fe.addDisposableDomListener(this.textarea,"paste",dt)),this.register(fe.addDisposableDomListener(this.element,"paste",dt)),ge.isFirefox?this.register(fe.addDisposableDomListener(this.element,"mousedown",function(Rt){Rt.button===2&&xe.rightClickHandler(Rt,_t.textarea,_t.screenElement,_t._selectionService,_t.options.rightClickSelectsWord)})):this.register(fe.addDisposableDomListener(this.element,"contextmenu",function(Rt){xe.rightClickHandler(Rt,_t.textarea,_t.screenElement,_t._selectionService,_t.options.rightClickSelectsWord)})),ge.isLinux&&this.register(fe.addDisposableDomListener(this.element,"auxclick",function(Rt){Rt.button===1&&xe.moveTextAreaUnderMouseCursor(Rt,_t.textarea,_t.screenElement)}))},at.prototype._bindKeys=function(){var _t=this;this.register(fe.addDisposableDomListener(this.textarea,"keyup",function(dt){return _t._keyUp(dt)},!0)),this.register(fe.addDisposableDomListener(this.textarea,"keydown",function(dt){return _t._keyDown(dt)},!0)),this.register(fe.addDisposableDomListener(this.textarea,"keypress",function(dt){return _t._keyPress(dt)},!0)),this.register(fe.addDisposableDomListener(this.textarea,"compositionstart",function(){return _t._compositionHelper.compositionstart()})),this.register(fe.addDisposableDomListener(this.textarea,"compositionupdate",function(dt){return _t._compositionHelper.compositionupdate(dt)})),this.register(fe.addDisposableDomListener(this.textarea,"compositionend",function(){return _t._compositionHelper.compositionend()})),this.register(this.onRender(function(){return _t._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(dt){return _t._queueLinkification(dt.start,dt.end)}))},at.prototype.open=function(_t){var dt=this;if(!_t)throw new Error("Terminal requires a parent element.");mt.body.contains(_t)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=_t.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),_t.appendChild(this.element);var Rt=mt.createDocumentFragment();this._viewportElement=mt.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),Rt.appendChild(this._viewportElement),this._viewportScrollArea=mt.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=mt.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=mt.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),Rt.appendChild(this.screenElement),this.textarea=mt.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",ue.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.register(fe.addDisposableDomListener(this.textarea,"focus",function(ct){return dt._onTextAreaFocus(ct)})),this.register(fe.addDisposableDomListener(this.textarea,"blur",function(){return dt._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var ut=this._instantiationService.createInstance(qe.CoreBrowserService,this.textarea);this._instantiationService.setService(Ae.ICoreBrowserService,ut),this._charSizeService=this._instantiationService.createInstance(De.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(Ae.ICharSizeService,this._charSizeService),this._compositionView=mt.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(Me.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(Rt),this._theme=this.options.theme||this._theme,this._colorManager=new ve.ColorManager(mt,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(ct){return dt._colorManager.onOptionsChange(ct)})),this._colorManager.setTheme(this._theme);var rt=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(Pe.RenderService,rt,this.rows,this.screenElement)),this._instantiationService.setService(Ae.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(ct){return dt._onRender.fire(ct)})),this.onResize(function(ct){return dt._renderService.resize(ct.cols,ct.rows)}),this._soundService=this._instantiationService.createInstance(ee.SoundService),this._instantiationService.setService(Ae.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(Oe.MouseService),this._instantiationService.setService(Ae.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(Ce.Viewport,function(ct,yt){return dt.scrollLines(ct,yt)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return dt.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){dt._renderService.onCursorMove(),dt._syncTextArea()})),this.register(this.onResize(function(){return dt._renderService.onResize(dt.cols,dt.rows)})),this.register(this.onBlur(function(){return dt._renderService.onBlur()})),this.register(this.onFocus(function(){return dt._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return dt.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(de.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(Ae.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(ct){return dt.scrollLines(ct.amount,ct.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return dt._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(ct){return dt._renderService.onSelectionChanged(ct.start,ct.end,ct.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(ct){dt.textarea.value=ct,dt.textarea.focus(),dt.textarea.select()})),this.register(this.onScroll(function(){dt.viewport.syncScrollArea(),dt._selectionService.refresh()})),this.register(fe.addDisposableDomListener(this._viewportElement,"scroll",function(){return dt._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(z.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return dt._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.element,this._mouseService,this._renderService),this.register(fe.addDisposableDomListener(this.element,"mousedown",function(ct){return dt._selectionService.onMouseDown(ct)})),this._coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new oe.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},at.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(we.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(re.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},at.prototype._setTheme=function(_t){var dt,Rt,ut;this._theme=_t,(dt=this._colorManager)===null||dt===void 0||dt.setTheme(_t),(Rt=this._renderService)===null||Rt===void 0||Rt.setColors(this._colorManager.colors),(ut=this.viewport)===null||ut===void 0||ut.onThemeChange(this._colorManager.colors)},at.prototype.bindMouse=function(){var _t=this,dt=this,Rt=this.element;function ut(Ut){var zt,dn,Ft=dt._mouseService.getRawByteCoords(Ut,dt.screenElement,dt.cols,dt.rows);if(!Ft)return!1;switch(Ut.overrideType||Ut.type){case"mousemove":dn=32,Ut.buttons===void 0?(zt=3,Ut.button!==void 0&&(zt=Ut.button<3?Ut.button:3)):zt=1&Ut.buttons?0:4&Ut.buttons?1:2&Ut.buttons?2:3;break;case"mouseup":dn=0,zt=Ut.button<3?Ut.button:3;break;case"mousedown":dn=1,zt=Ut.button<3?Ut.button:3;break;case"wheel":Ut.deltaY!==0&&(dn=Ut.deltaY<0?0:1),zt=4;break;default:return!1}return!(dn===void 0||zt===void 0||zt>4)&&dt._coreMouseService.triggerMouseEvent({col:Ft.x-33,row:Ft.y-33,button:zt,action:dn,ctrl:Ut.ctrlKey,alt:Ut.altKey,shift:Ut.shiftKey})}var rt={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ct=function(Ut){return ut(Ut),Ut.buttons||(_t._document.removeEventListener("mouseup",rt.mouseup),rt.mousedrag&&_t._document.removeEventListener("mousemove",rt.mousedrag)),_t.cancel(Ut)},yt=function(Ut){return ut(Ut),Ut.preventDefault(),_t.cancel(Ut)},wt=function(Ut){Ut.buttons&&ut(Ut)},xt=function(Ut){Ut.buttons||ut(Ut)};this.register(this._coreMouseService.onProtocolChange(function(Ut){Ut?(_t.optionsService.options.logLevel==="debug"&&_t._logService.debug("Binding to mouse events:",_t._coreMouseService.explainEvents(Ut)),_t.element.classList.add("enable-mouse-events"),_t._selectionService.disable()):(_t._logService.debug("Unbinding from mouse events."),_t.element.classList.remove("enable-mouse-events"),_t._selectionService.enable()),8&Ut?rt.mousemove||(Rt.addEventListener("mousemove",xt),rt.mousemove=xt):(Rt.removeEventListener("mousemove",rt.mousemove),rt.mousemove=null),16&Ut?rt.wheel||(Rt.addEventListener("wheel",yt,{passive:!1}),rt.wheel=yt):(Rt.removeEventListener("wheel",rt.wheel),rt.wheel=null),2&Ut?rt.mouseup||(rt.mouseup=ct):(_t._document.removeEventListener("mouseup",rt.mouseup),rt.mouseup=null),4&Ut?rt.mousedrag||(rt.mousedrag=wt):(_t._document.removeEventListener("mousemove",rt.mousedrag),rt.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(fe.addDisposableDomListener(Rt,"mousedown",function(Ut){if(Ut.preventDefault(),_t.focus(),_t._coreMouseService.areMouseEventsActive&&!_t._selectionService.shouldForceSelection(Ut))return ut(Ut),rt.mouseup&&_t._document.addEventListener("mouseup",rt.mouseup),rt.mousedrag&&_t._document.addEventListener("mousemove",rt.mousedrag),_t.cancel(Ut)})),this.register(fe.addDisposableDomListener(Rt,"wheel",function(Ut){if(!rt.wheel){if(!_t.buffer.hasScrollback){var zt=_t.viewport.getLinesScrolled(Ut);if(zt===0)return;for(var dn=be.C0.ESC+(_t._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Ut.deltaY<0?"A":"B"),Ft="",Dt=0;Dt<Math.abs(zt);Dt++)Ft+=dn;_t._coreService.triggerDataEvent(Ft,!0)}}},{passive:!0})),this.register(fe.addDisposableDomListener(Rt,"wheel",function(Ut){if(!rt.wheel)return _t.viewport.onWheel(Ut)?void 0:_t.cancel(Ut)},{passive:!1})),this.register(fe.addDisposableDomListener(Rt,"touchstart",function(Ut){if(!_t._coreMouseService.areMouseEventsActive)return _t.viewport.onTouchStart(Ut),_t.cancel(Ut)},{passive:!0})),this.register(fe.addDisposableDomListener(Rt,"touchmove",function(Ut){if(!_t._coreMouseService.areMouseEventsActive)return _t.viewport.onTouchMove(Ut)?void 0:_t.cancel(Ut)},{passive:!1}))},at.prototype.refresh=function(_t,dt){var Rt;(Rt=this._renderService)===null||Rt===void 0||Rt.refreshRows(_t,dt)},at.prototype._queueLinkification=function(_t,dt){var Rt;(Rt=this.linkifier)===null||Rt===void 0||Rt.linkifyRows(_t,dt)},at.prototype.updateCursorStyle=function(_t){this._selectionService&&this._selectionService.shouldColumnSelect(_t)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},at.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},at.prototype.scrollLines=function(_t,dt){Mt.prototype.scrollLines.call(this,_t,dt),this.refresh(0,this.rows-1)},at.prototype.paste=function(_t){xe.paste(_t,this.textarea,this._coreService)},at.prototype.attachCustomKeyEventHandler=function(_t){this._customKeyEventHandler=_t},at.prototype.registerLinkMatcher=function(_t,dt,Rt){var ut=this.linkifier.registerLinkMatcher(_t,dt,Rt);return this.refresh(0,this.rows-1),ut},at.prototype.deregisterLinkMatcher=function(_t){this.linkifier.deregisterLinkMatcher(_t)&&this.refresh(0,this.rows-1)},at.prototype.registerLinkProvider=function(_t){return this.linkifier2.registerLinkProvider(_t)},at.prototype.registerCharacterJoiner=function(_t){var dt=this._renderService.registerCharacterJoiner(_t);return this.refresh(0,this.rows-1),dt},at.prototype.deregisterCharacterJoiner=function(_t){this._renderService.deregisterCharacterJoiner(_t)&&this.refresh(0,this.rows-1)},Object.defineProperty(at.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),at.prototype.addMarker=function(_t){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+_t)},at.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},at.prototype.select=function(_t,dt,Rt){this._selectionService.setSelection(_t,dt,Rt)},at.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},at.prototype.getSelectionPosition=function(){if(this._selectionService&&this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},at.prototype.clearSelection=function(){var _t;(_t=this._selectionService)===null||_t===void 0||_t.clearSelection()},at.prototype.selectAll=function(){var _t;(_t=this._selectionService)===null||_t===void 0||_t.selectAll()},at.prototype.selectLines=function(_t,dt){var Rt;(Rt=this._selectionService)===null||Rt===void 0||Rt.selectLines(_t,dt)},at.prototype._keyDown=function(_t){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(_t)===!1)return!1;if(!this._compositionHelper.keydown(_t))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var dt=ae.evaluateKeyboardEvent(_t,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(_t),dt.type===3||dt.type===2){var Rt=this.rows-1;return this.scrollLines(dt.type===2?-Rt:Rt),this.cancel(_t,!0)}return dt.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,_t)||(dt.cancel&&this.cancel(_t,!0),!dt.key||(dt.key!==be.C0.ETX&&dt.key!==be.C0.CR||(this.textarea.value=""),this._onKey.fire({key:dt.key,domEvent:_t}),this._showCursor(),this._coreService.triggerDataEvent(dt.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(_t,!0)))},at.prototype._isThirdLevelShift=function(_t,dt){var Rt=_t.isMac&&!this.options.macOptionIsMeta&&dt.altKey&&!dt.ctrlKey&&!dt.metaKey||_t.isWindows&&dt.altKey&&dt.ctrlKey&&!dt.metaKey;return dt.type==="keypress"?Rt:Rt&&(!dt.keyCode||dt.keyCode>47)},at.prototype._keyUp=function(_t){this._customKeyEventHandler&&this._customKeyEventHandler(_t)===!1||(function(dt){return dt.keyCode===16||dt.keyCode===17||dt.keyCode===18}(_t)||this.focus(),this.updateCursorStyle(_t))},at.prototype._keyPress=function(_t){var dt;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(_t)===!1)return!1;if(this.cancel(_t),_t.charCode)dt=_t.charCode;else if(_t.which===null||_t.which===void 0)dt=_t.keyCode;else{if(_t.which===0||_t.charCode===0)return!1;dt=_t.which}return!(!dt||(_t.altKey||_t.ctrlKey||_t.metaKey)&&!this._isThirdLevelShift(this.browser,_t))&&(dt=String.fromCharCode(dt),this._onKey.fire({key:dt,domEvent:_t}),this._showCursor(),this._coreService.triggerDataEvent(dt,!0),!0)},at.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},at.prototype.resize=function(_t,dt){_t!==this.cols||dt!==this.rows?Mt.prototype.resize.call(this,_t,dt):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},at.prototype._afterResize=function(_t,dt){var Rt,ut;(Rt=this._charSizeService)===null||Rt===void 0||Rt.measure(),(ut=this.viewport)===null||ut===void 0||ut.syncScrollArea(!0)},at.prototype.clear=function(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var _t=1;_t<this.rows;_t++)this.buffer.lines.push(this.buffer.getBlankLine(me.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},at.prototype.reset=function(){var _t,dt;this.options.rows=this.rows,this.options.cols=this.cols;var Rt=this._customKeyEventHandler;this._setup(),Mt.prototype.reset.call(this),(_t=this._selectionService)===null||_t===void 0||_t.reset(),this._customKeyEventHandler=Rt,this.refresh(0,this.rows-1),(dt=this.viewport)===null||dt===void 0||dt.syncScrollArea()},at.prototype._reportWindowsOptions=function(_t){if(this._renderService)switch(_t){case ye.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var dt=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),Rt=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(be.C0.ESC+"[4;"+Rt+";"+dt+"t");break;case ye.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var ut=this._renderService.dimensions.scaledCellWidth.toFixed(0),rt=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(be.C0.ESC+"[6;"+rt+";"+ut+"t")}},at.prototype.cancel=function(_t,dt){if(this.options.cancelEvents||dt)return _t.preventDefault(),_t.stopPropagation(),!1},at.prototype._visualBell=function(){return!1},at.prototype._soundBell=function(){return this.options.bellStyle==="sound"},at}(Xe.CoreTerminal);Ie.Terminal=pt},function(ln,Ie,Le){"use strict";var Se=this&&this.__decorate||function(be,ye,we,pe){var de,ge=arguments.length,fe=ge<3?ye:pe===null?pe=Object.getOwnPropertyDescriptor(ye,we):pe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")fe=Reflect.decorate(be,ye,we,pe);else for(var ue=be.length-1;ue>=0;ue--)(de=be[ue])&&(fe=(ge<3?de(fe):ge>3?de(ye,we,fe):de(ye,we))||fe);return ge>3&&fe&&Object.defineProperty(ye,we,fe),fe},je=this&&this.__param||function(be,ye){return function(we,pe){ye(we,pe,be)}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.CompositionHelper=void 0;var Me=Le(5),Ce=Le(1),xe=function(){function be(ye,we,pe,de,ge,fe){this._textarea=ye,this._compositionView=we,this._bufferService=pe,this._optionsService=de,this._charSizeService=ge,this._coreService=fe,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0}}return Object.defineProperty(be.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),be.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},be.prototype.compositionupdate=function(ye){var we=this;this._compositionView.textContent=ye.data,this.updateCompositionElements(),setTimeout(function(){we._compositionPosition.end=we._textarea.value.length},0)},be.prototype.compositionend=function(){this._finalizeComposition(!0)},be.prototype.keydown=function(ye){if(this._isComposing||this._isSendingComposition){if(ye.keyCode===229||ye.keyCode===16||ye.keyCode===17||ye.keyCode===18)return!1;this._finalizeComposition(!1)}return ye.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},be.prototype._finalizeComposition=function(ye){var we=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,ye){var pe={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(we._isSendingComposition){we._isSendingComposition=!1;var ge=void 0;ge=we._isComposing?we._textarea.value.substring(pe.start,pe.end):we._textarea.value.substring(pe.start),we._coreService.triggerDataEvent(ge,!0)}},0)}else{this._isSendingComposition=!1;var de=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(de,!0)}},be.prototype._handleAnyTextareaChanges=function(){var ye=this,we=this._textarea.value;setTimeout(function(){if(!ye._isComposing){var pe=ye._textarea.value.replace(we,"");pe.length>0&&ye._coreService.triggerDataEvent(pe,!0)}},0)},be.prototype.updateCompositionElements=function(ye){var we=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var pe=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),de=this._bufferService.buffer.y*pe,ge=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=ge+"px",this._compositionView.style.top=de+"px",this._compositionView.style.height=pe+"px",this._compositionView.style.lineHeight=pe+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var fe=this._compositionView.getBoundingClientRect();this._textarea.style.left=ge+"px",this._textarea.style.top=de+"px",this._textarea.style.width=fe.width+"px",this._textarea.style.height=fe.height+"px",this._textarea.style.lineHeight=fe.height+"px"}ye||setTimeout(function(){return we.updateCompositionElements(!0)},0)}},be=Se([je(2,Ce.IBufferService),je(3,Ce.IOptionsService),je(4,Me.ICharSizeService),je(5,Ce.ICoreService)],be)}();Ie.CompositionHelper=xe},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(de,ge){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,ue){fe.__proto__=ue}||function(fe,ue){for(var ee in ue)ue.hasOwnProperty(ee)&&(fe[ee]=ue[ee])})(de,ge)},function(de,ge){function fe(){this.constructor=de}Se(de,ge),de.prototype=ge===null?Object.create(ge):(fe.prototype=ge.prototype,new fe)}),Me=this&&this.__decorate||function(de,ge,fe,ue){var ee,z=arguments.length,oe=z<3?ge:ue===null?ue=Object.getOwnPropertyDescriptor(ge,fe):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(de,ge,fe,ue);else for(var re=de.length-1;re>=0;re--)(ee=de[re])&&(oe=(z<3?ee(oe):z>3?ee(ge,fe,oe):ee(ge,fe))||oe);return z>3&&oe&&Object.defineProperty(ge,fe,oe),oe},Ce=this&&this.__param||function(de,ge){return function(fe,ue){ge(fe,ue,de)}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.Viewport=void 0;var xe=Le(2),be=Le(7),ye=Le(5),we=Le(1),pe=function(de){function ge(fe,ue,ee,z,oe,re,ae){var le=de.call(this)||this;return le._scrollLines=fe,le._viewportElement=ue,le._scrollArea=ee,le._bufferService=z,le._optionsService=oe,le._charSizeService=re,le._renderService=ae,le.scrollBarWidth=0,le._currentRowHeight=0,le._lastRecordedBufferLength=0,le._lastRecordedViewportHeight=0,le._lastRecordedBufferHeight=0,le._lastTouchY=0,le._lastScrollTop=0,le._wheelPartialScroll=0,le._refreshAnimationFrame=null,le._ignoreNextScrollEvent=!1,le.scrollBarWidth=le._viewportElement.offsetWidth-le._scrollArea.offsetWidth||15,le.register(be.addDisposableDomListener(le._viewportElement,"scroll",le._onScroll.bind(le))),setTimeout(function(){return le.syncScrollArea()},0),le}return je(ge,de),ge.prototype.onThemeChange=function(fe){this._viewportElement.style.backgroundColor=fe.background.css},ge.prototype._refresh=function(fe){var ue=this;if(fe)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return ue._innerRefresh()}))},ge.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var fe=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==fe&&(this._lastRecordedBufferHeight=fe,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var ue=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==ue&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=ue),this._refreshAnimationFrame=null},ge.prototype.syncScrollArea=function(fe){if(fe===void 0&&(fe=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(fe);if(this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight){var ue=this._bufferService.buffer.ydisp*this._currentRowHeight;this._lastScrollTop===ue&&this._lastScrollTop===this._viewportElement.scrollTop&&this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio===this._currentRowHeight||this._refresh(fe)}else this._refresh(fe)},ge.prototype._onScroll=function(fe){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent)if(this._ignoreNextScrollEvent)this._ignoreNextScrollEvent=!1;else{var ue=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(ue,!0)}},ge.prototype._bubbleScroll=function(fe,ue){var ee=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(ue<0&&this._viewportElement.scrollTop!==0||ue>0&&ee<this._lastRecordedBufferHeight)||(fe.cancelable&&fe.preventDefault(),!1)},ge.prototype.onWheel=function(fe){var ue=this._getPixelsScrolled(fe);return ue!==0&&(this._viewportElement.scrollTop+=ue,this._bubbleScroll(fe,ue))},ge.prototype._getPixelsScrolled=function(fe){if(fe.deltaY===0)return 0;var ue=this._applyScrollModifier(fe.deltaY,fe);return fe.deltaMode===WheelEvent.DOM_DELTA_LINE?ue*=this._currentRowHeight:fe.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(ue*=this._currentRowHeight*this._bufferService.rows),ue},ge.prototype.getLinesScrolled=function(fe){if(fe.deltaY===0)return 0;var ue=this._applyScrollModifier(fe.deltaY,fe);return fe.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(ue/=this._currentRowHeight+0,this._wheelPartialScroll+=ue,ue=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):fe.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(ue*=this._bufferService.rows),ue},ge.prototype._applyScrollModifier=function(fe,ue){var ee=this._optionsService.options.fastScrollModifier;return ee==="alt"&&ue.altKey||ee==="ctrl"&&ue.ctrlKey||ee==="shift"&&ue.shiftKey?fe*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:fe*this._optionsService.options.scrollSensitivity},ge.prototype.onTouchStart=function(fe){this._lastTouchY=fe.touches[0].pageY},ge.prototype.onTouchMove=function(fe){var ue=this._lastTouchY-fe.touches[0].pageY;return this._lastTouchY=fe.touches[0].pageY,ue!==0&&(this._viewportElement.scrollTop+=ue,this._bubbleScroll(fe,ue))},ge=Me([Ce(3,we.IBufferService),Ce(4,we.IOptionsService),Ce(5,ye.ICharSizeService),Ce(6,ye.IRenderService)],ge)}(xe.Disposable);Ie.Viewport=pe},function(ln,Ie,Le){"use strict";function Se(xe){return xe.replace(/\r?\n/g,"\r")}function je(xe,be){return be?"\x1B[200~"+xe+"\x1B[201~":xe}function Me(xe,be,ye){xe=je(xe=Se(xe),ye.decPrivateModes.bracketedPasteMode),ye.triggerDataEvent(xe,!0),be.value=""}function Ce(xe,be,ye){var we=ye.getBoundingClientRect(),pe=xe.clientX-we.left-10,de=xe.clientY-we.top-10;be.style.width="20px",be.style.height="20px",be.style.left=pe+"px",be.style.top=de+"px",be.style.zIndex="1000",be.focus()}Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.rightClickHandler=Ie.moveTextAreaUnderMouseCursor=Ie.paste=Ie.handlePasteEvent=Ie.copyHandler=Ie.bracketTextForPaste=Ie.prepareTextForTerminal=void 0,Ie.prepareTextForTerminal=Se,Ie.bracketTextForPaste=je,Ie.copyHandler=function(xe,be){xe.clipboardData&&xe.clipboardData.setData("text/plain",be.selectionText),xe.preventDefault()},Ie.handlePasteEvent=function(xe,be,ye){xe.stopPropagation(),xe.clipboardData&&Me(xe.clipboardData.getData("text/plain"),be,ye)},Ie.paste=Me,Ie.moveTextAreaUnderMouseCursor=Ce,Ie.rightClickHandler=function(xe,be,ye,we,pe){Ce(xe,be,ye),pe&&!we.isClickInSelection(xe)&&we.selectWordAtCursor(xe),be.value=we.selectionText,be.select()}},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(de,ge){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,ue){fe.__proto__=ue}||function(fe,ue){for(var ee in ue)ue.hasOwnProperty(ee)&&(fe[ee]=ue[ee])})(de,ge)},function(de,ge){function fe(){this.constructor=de}Se(de,ge),de.prototype=ge===null?Object.create(ge):(fe.prototype=ge.prototype,new fe)});Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.EscapeSequenceParser=Ie.VT500_TRANSITION_TABLE=Ie.TransitionTable=void 0;var Me=Le(2),Ce=Le(15),xe=Le(21),be=Le(22),ye=Le(24),we=function(){function de(ge){this.table=new Uint8Array(ge)}return de.prototype.setDefault=function(ge,fe){Ce.fill(this.table,ge<<4|fe)},de.prototype.add=function(ge,fe,ue,ee){this.table[fe<<8|ge]=ue<<4|ee},de.prototype.addMany=function(ge,fe,ue,ee){for(var z=0;z<ge.length;z++)this.table[fe<<8|ge[z]]=ue<<4|ee},de}();Ie.TransitionTable=we,Ie.VT500_TRANSITION_TABLE=function(){var de=new we(4095),ge=Array.apply(null,Array(256)).map(function(re,ae){return ae}),fe=function(re,ae){return ge.slice(re,ae)},ue=fe(32,127),ee=fe(0,24);ee.push(25),ee.push.apply(ee,fe(28,32));var z,oe=fe(0,14);for(z in de.setDefault(1,0),de.addMany(ue,0,2,0),oe)de.addMany([24,26,153,154],z,3,0),de.addMany(fe(128,144),z,3,0),de.addMany(fe(144,152),z,3,0),de.add(156,z,0,0),de.add(27,z,11,1),de.add(157,z,4,8),de.addMany([152,158,159],z,0,7),de.add(155,z,11,3),de.add(144,z,11,9);return de.addMany(ee,0,3,0),de.addMany(ee,1,3,1),de.add(127,1,0,1),de.addMany(ee,8,0,8),de.addMany(ee,3,3,3),de.add(127,3,0,3),de.addMany(ee,4,3,4),de.add(127,4,0,4),de.addMany(ee,6,3,6),de.addMany(ee,5,3,5),de.add(127,5,0,5),de.addMany(ee,2,3,2),de.add(127,2,0,2),de.add(93,1,4,8),de.addMany(ue,8,5,8),de.add(127,8,5,8),de.addMany([156,27,24,26,7],8,6,0),de.addMany(fe(28,32),8,0,8),de.addMany([88,94,95],1,0,7),de.addMany(ue,7,0,7),de.addMany(ee,7,0,7),de.add(156,7,0,0),de.add(127,7,0,7),de.add(91,1,11,3),de.addMany(fe(64,127),3,7,0),de.addMany(fe(48,60),3,8,4),de.addMany([60,61,62,63],3,9,4),de.addMany(fe(48,60),4,8,4),de.addMany(fe(64,127),4,7,0),de.addMany([60,61,62,63],4,0,6),de.addMany(fe(32,64),6,0,6),de.add(127,6,0,6),de.addMany(fe(64,127),6,0,0),de.addMany(fe(32,48),3,9,5),de.addMany(fe(32,48),5,9,5),de.addMany(fe(48,64),5,0,6),de.addMany(fe(64,127),5,7,0),de.addMany(fe(32,48),4,9,5),de.addMany(fe(32,48),1,9,2),de.addMany(fe(32,48),2,9,2),de.addMany(fe(48,127),2,10,0),de.addMany(fe(48,80),1,10,0),de.addMany(fe(81,88),1,10,0),de.addMany([89,90,92],1,10,0),de.addMany(fe(96,127),1,10,0),de.add(80,1,11,9),de.addMany(ee,9,0,9),de.add(127,9,0,9),de.addMany(fe(28,32),9,0,9),de.addMany(fe(32,48),9,9,12),de.addMany(fe(48,60),9,8,10),de.addMany([60,61,62,63],9,9,10),de.addMany(ee,11,0,11),de.addMany(fe(32,128),11,0,11),de.addMany(fe(28,32),11,0,11),de.addMany(ee,10,0,10),de.add(127,10,0,10),de.addMany(fe(28,32),10,0,10),de.addMany(fe(48,60),10,8,10),de.addMany([60,61,62,63],10,0,11),de.addMany(fe(32,48),10,9,12),de.addMany(ee,12,0,12),de.add(127,12,0,12),de.addMany(fe(28,32),12,0,12),de.addMany(fe(32,48),12,9,12),de.addMany(fe(48,64),12,0,11),de.addMany(fe(64,127),12,12,13),de.addMany(fe(64,127),10,12,13),de.addMany(fe(64,127),9,12,13),de.addMany(ee,13,13,13),de.addMany(ue,13,13,13),de.add(127,13,0,13),de.addMany([27,156,24,26],13,14,0),de.add(160,0,2,0),de.add(160,8,5,8),de.add(160,6,0,6),de.add(160,11,0,11),de.add(160,13,13,13),de}();var pe=function(de){function ge(fe){fe===void 0&&(fe=Ie.VT500_TRANSITION_TABLE);var ue=de.call(this)||this;return ue._transitions=fe,ue.initialState=0,ue.currentState=ue.initialState,ue._params=new xe.Params,ue._params.addParam(0),ue._collect=0,ue.precedingCodepoint=0,ue._printHandlerFb=function(ee,z,oe){},ue._executeHandlerFb=function(ee){},ue._csiHandlerFb=function(ee,z){},ue._escHandlerFb=function(ee){},ue._errorHandlerFb=function(ee){return ee},ue._printHandler=ue._printHandlerFb,ue._executeHandlers=Object.create(null),ue._csiHandlers=Object.create(null),ue._escHandlers=Object.create(null),ue._oscParser=new be.OscParser,ue._dcsParser=new ye.DcsParser,ue._errorHandler=ue._errorHandlerFb,ue.setEscHandler({final:"\\"},function(){}),ue}return je(ge,de),ge.prototype._identifier=function(fe,ue){ue===void 0&&(ue=[64,126]);var ee=0;if(fe.prefix){if(fe.prefix.length>1)throw new Error("only one byte as prefix supported");if((ee=fe.prefix.charCodeAt(0))&&60>ee||ee>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(fe.intermediates){if(fe.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var z=0;z<fe.intermediates.length;++z){var oe=fe.intermediates.charCodeAt(z);if(32>oe||oe>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");ee<<=8,ee|=oe}}if(fe.final.length!==1)throw new Error("final must be a single byte");var re=fe.final.charCodeAt(0);if(ue[0]>re||re>ue[1])throw new Error("final must be in range "+ue[0]+" .. "+ue[1]);return ee<<=8,ee|=re},ge.prototype.identToString=function(fe){for(var ue=[];fe;)ue.push(String.fromCharCode(255&fe)),fe>>=8;return ue.reverse().join("")},ge.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},ge.prototype.setPrintHandler=function(fe){this._printHandler=fe},ge.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},ge.prototype.addEscHandler=function(fe,ue){var ee=this._identifier(fe,[48,126]);this._escHandlers[ee]===void 0&&(this._escHandlers[ee]=[]);var z=this._escHandlers[ee];return z.push(ue),{dispose:function(){var oe=z.indexOf(ue);oe!==-1&&z.splice(oe,1)}}},ge.prototype.setEscHandler=function(fe,ue){this._escHandlers[this._identifier(fe,[48,126])]=[ue]},ge.prototype.clearEscHandler=function(fe){this._escHandlers[this._identifier(fe,[48,126])]&&delete this._escHandlers[this._identifier(fe,[48,126])]},ge.prototype.setEscHandlerFallback=function(fe){this._escHandlerFb=fe},ge.prototype.setExecuteHandler=function(fe,ue){this._executeHandlers[fe.charCodeAt(0)]=ue},ge.prototype.clearExecuteHandler=function(fe){this._executeHandlers[fe.charCodeAt(0)]&&delete this._executeHandlers[fe.charCodeAt(0)]},ge.prototype.setExecuteHandlerFallback=function(fe){this._executeHandlerFb=fe},ge.prototype.addCsiHandler=function(fe,ue){var ee=this._identifier(fe);this._csiHandlers[ee]===void 0&&(this._csiHandlers[ee]=[]);var z=this._csiHandlers[ee];return z.push(ue),{dispose:function(){var oe=z.indexOf(ue);oe!==-1&&z.splice(oe,1)}}},ge.prototype.setCsiHandler=function(fe,ue){this._csiHandlers[this._identifier(fe)]=[ue]},ge.prototype.clearCsiHandler=function(fe){this._csiHandlers[this._identifier(fe)]&&delete this._csiHandlers[this._identifier(fe)]},ge.prototype.setCsiHandlerFallback=function(fe){this._csiHandlerFb=fe},ge.prototype.addDcsHandler=function(fe,ue){return this._dcsParser.addHandler(this._identifier(fe),ue)},ge.prototype.setDcsHandler=function(fe,ue){this._dcsParser.setHandler(this._identifier(fe),ue)},ge.prototype.clearDcsHandler=function(fe){this._dcsParser.clearHandler(this._identifier(fe))},ge.prototype.setDcsHandlerFallback=function(fe){this._dcsParser.setHandlerFallback(fe)},ge.prototype.addOscHandler=function(fe,ue){return this._oscParser.addHandler(fe,ue)},ge.prototype.setOscHandler=function(fe,ue){this._oscParser.setHandler(fe,ue)},ge.prototype.clearOscHandler=function(fe){this._oscParser.clearHandler(fe)},ge.prototype.setOscHandlerFallback=function(fe){this._oscParser.setHandlerFallback(fe)},ge.prototype.setErrorHandler=function(fe){this._errorHandler=fe},ge.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},ge.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0},ge.prototype.parse=function(fe,ue){for(var ee=0,z=0,oe=this.currentState,re=this._oscParser,ae=this._dcsParser,le=this._collect,me=this._params,ve=this._transitions.table,Pe=0;Pe<ue;++Pe){switch((z=ve[oe<<8|((ee=fe[Pe])<160?ee:160)])>>4){case 2:for(var Ae=Pe+1;;++Ae){if(Ae>=ue||(ee=fe[Ae])<32||ee>126&&ee<160){this._printHandler(fe,Pe,Ae),Pe=Ae-1;break}if(++Ae>=ue||(ee=fe[Ae])<32||ee>126&&ee<160){this._printHandler(fe,Pe,Ae),Pe=Ae-1;break}if(++Ae>=ue||(ee=fe[Ae])<32||ee>126&&ee<160){this._printHandler(fe,Pe,Ae),Pe=Ae-1;break}if(++Ae>=ue||(ee=fe[Ae])<32||ee>126&&ee<160){this._printHandler(fe,Pe,Ae),Pe=Ae-1;break}}break;case 3:this._executeHandlers[ee]?this._executeHandlers[ee]():this._executeHandlerFb(ee),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:Pe,code:ee,currentState:oe,collect:le,params:me,abort:!1}).abort)return;break;case 7:for(var De=this._csiHandlers[le<<8|ee],Oe=De?De.length-1:-1;Oe>=0&&De[Oe](me)===!1;Oe--);Oe<0&&this._csiHandlerFb(le<<8|ee,me),this.precedingCodepoint=0;break;case 8:do switch(ee){case 59:me.addParam(0);break;case 58:me.addSubParam(-1);break;default:me.addDigit(ee-48)}while(++Pe<ue&&(ee=fe[Pe])>47&&ee<60);Pe--;break;case 9:le<<=8,le|=ee;break;case 10:for(var Ze=this._escHandlers[le<<8|ee],qe=Ze?Ze.length-1:-1;qe>=0&&Ze[qe]()===!1;qe--);qe<0&&this._escHandlerFb(le<<8|ee),this.precedingCodepoint=0;break;case 11:me.reset(),me.addParam(0),le=0;break;case 12:ae.hook(le<<8|ee,me);break;case 13:for(var Xe=Pe+1;;++Xe)if(Xe>=ue||(ee=fe[Xe])===24||ee===26||ee===27||ee>127&&ee<160){ae.put(fe,Pe,Xe),Pe=Xe-1;break}break;case 14:ae.unhook(ee!==24&&ee!==26),ee===27&&(z|=1),me.reset(),me.addParam(0),le=0,this.precedingCodepoint=0;break;case 4:re.start();break;case 5:for(var mt=Pe+1;;mt++)if(mt>=ue||(ee=fe[mt])<32||ee>127&&ee<=159){re.put(fe,Pe,mt),Pe=mt-1;break}break;case 6:re.end(ee!==24&&ee!==26),ee===27&&(z|=1),me.reset(),me.addParam(0),le=0,this.precedingCodepoint=0}oe=15&z}this._collect=le,this.currentState=oe},ge}(Me.Disposable);Ie.EscapeSequenceParser=pe},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(re,ae){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,me){le.__proto__=me}||function(le,me){for(var ve in me)me.hasOwnProperty(ve)&&(le[ve]=me[ve])})(re,ae)},function(re,ae){function le(){this.constructor=re}Se(re,ae),re.prototype=ae===null?Object.create(ae):(le.prototype=ae.prototype,new le)}),Me=this&&this.__decorate||function(re,ae,le,me){var ve,Pe=arguments.length,Ae=Pe<3?ae:me===null?me=Object.getOwnPropertyDescriptor(ae,le):me;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ae=Reflect.decorate(re,ae,le,me);else for(var De=re.length-1;De>=0;De--)(ve=re[De])&&(Ae=(Pe<3?ve(Ae):Pe>3?ve(ae,le,Ae):ve(ae,le))||Ae);return Pe>3&&Ae&&Object.defineProperty(ae,le,Ae),Ae},Ce=this&&this.__param||function(re,ae){return function(le,me){ae(le,me,re)}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.Renderer=void 0;var xe=Le(41),be=Le(47),ye=Le(48),we=Le(49),pe=Le(29),de=Le(2),ge=Le(5),fe=Le(1),ue=Le(25),ee=Le(0),z=1,oe=function(re){function ae(le,me,ve,Pe,Ae,De,Oe,Ze,qe){var Xe=re.call(this)||this;Xe._colors=le,Xe._screenElement=me,Xe._bufferService=Ae,Xe._charSizeService=De,Xe._optionsService=Oe,Xe._id=z++,Xe._onRequestRedraw=new ee.EventEmitter;var mt=Xe._optionsService.options.allowTransparency;return Xe._characterJoinerRegistry=new pe.CharacterJoinerRegistry(Xe._bufferService),Xe._renderLayers=[new xe.TextRenderLayer(Xe._screenElement,0,Xe._colors,Xe._characterJoinerRegistry,mt,Xe._id,Xe._bufferService,Oe),new be.SelectionRenderLayer(Xe._screenElement,1,Xe._colors,Xe._id,Xe._bufferService,Oe),new we.LinkRenderLayer(Xe._screenElement,2,Xe._colors,Xe._id,ve,Pe,Xe._bufferService,Oe),new ye.CursorRenderLayer(Xe._screenElement,3,Xe._colors,Xe._id,Xe._onRequestRedraw,Xe._bufferService,Oe,Ze,qe)],Xe.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},Xe._devicePixelRatio=window.devicePixelRatio,Xe._updateDimensions(),Xe.onOptionsChanged(),Xe}return je(ae,re),Object.defineProperty(ae.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),ae.prototype.dispose=function(){for(var le=0,me=this._renderLayers;le<me.length;le++)me[le].dispose();re.prototype.dispose.call(this),ue.removeTerminalFromCache(this._id)},ae.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},ae.prototype.setColors=function(le){this._colors=le;for(var me=0,ve=this._renderLayers;me<ve.length;me++){var Pe=ve[me];Pe.setColors(this._colors),Pe.reset()}},ae.prototype.onResize=function(le,me){this._updateDimensions();for(var ve=0,Pe=this._renderLayers;ve<Pe.length;ve++)Pe[ve].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},ae.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},ae.prototype.onBlur=function(){this._runOperation(function(le){return le.onBlur()})},ae.prototype.onFocus=function(){this._runOperation(function(le){return le.onFocus()})},ae.prototype.onSelectionChanged=function(le,me,ve){ve===void 0&&(ve=!1),this._runOperation(function(Pe){return Pe.onSelectionChanged(le,me,ve)})},ae.prototype.onCursorMove=function(){this._runOperation(function(le){return le.onCursorMove()})},ae.prototype.onOptionsChanged=function(){this._runOperation(function(le){return le.onOptionsChanged()})},ae.prototype.clear=function(){this._runOperation(function(le){return le.reset()})},ae.prototype._runOperation=function(le){for(var me=0,ve=this._renderLayers;me<ve.length;me++)le(ve[me])},ae.prototype.renderRows=function(le,me){for(var ve=0,Pe=this._renderLayers;ve<Pe.length;ve++)Pe[ve].onGridChanged(le,me)},ae.prototype._updateDimensions=function(){this._charSizeService.hasValidSize&&(this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharTop=this._optionsService.options.lineHeight===1?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._optionsService.options.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._bufferService.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._bufferService.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols)},ae.prototype.registerCharacterJoiner=function(le){return this._characterJoinerRegistry.registerCharacterJoiner(le)},ae.prototype.deregisterCharacterJoiner=function(le){return this._characterJoinerRegistry.deregisterCharacterJoiner(le)},ae=Me([Ce(4,fe.IBufferService),Ce(5,ge.ICharSizeService),Ce(6,fe.IOptionsService),Ce(7,fe.ICoreService),Ce(8,ge.ICoreBrowserService)],ae)}(de.Disposable);Ie.Renderer=oe},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(de,ge){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,ue){fe.__proto__=ue}||function(fe,ue){for(var ee in ue)ue.hasOwnProperty(ee)&&(fe[ee]=ue[ee])})(de,ge)},function(de,ge){function fe(){this.constructor=de}Se(de,ge),de.prototype=ge===null?Object.create(ge):(fe.prototype=ge.prototype,new fe)});Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.TextRenderLayer=void 0;var Me=Le(42),Ce=Le(13),xe=Le(6),be=Le(3),ye=Le(29),we=Le(4),pe=function(de){function ge(fe,ue,ee,z,oe,re,ae,le){var me=de.call(this,fe,"text",ue,oe,ee,re,ae,le)||this;return me._characterWidth=0,me._characterFont="",me._characterOverlapCache={},me._workCell=new we.CellData,me._state=new Me.GridCache,me._characterJoinerRegistry=z,me}return je(ge,de),ge.prototype.resize=function(fe){de.prototype.resize.call(this,fe);var ue=this._getFont(!1,!1);this._characterWidth===fe.scaledCharWidth&&this._characterFont===ue||(this._characterWidth=fe.scaledCharWidth,this._characterFont=ue,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},ge.prototype.reset=function(){this._state.clear(),this._clearAll()},ge.prototype._forEachCell=function(fe,ue,ee,z){for(var oe=fe;oe<=ue;oe++)for(var re=oe+this._bufferService.buffer.ydisp,ae=this._bufferService.buffer.lines.get(re),le=ee?ee.getJoinedCharacters(re):[],me=0;me<this._bufferService.cols;me++){ae.loadCell(me,this._workCell);var ve=this._workCell,Pe=!1,Ae=me;if(ve.getWidth()!==0){if(le.length>0&&me===le[0][0]){Pe=!0;var De=le.shift();ve=new ye.JoinedCellData(this._workCell,ae.translateToString(!0,De[0],De[1]),De[1]-De[0]),Ae=De[1]-1}!Pe&&this._isOverlapping(ve)&&Ae<ae.length-1&&ae.getCodePoint(Ae+1)===be.NULL_CELL_CODE&&(ve.content&=-12582913,ve.content|=2<<22),z(ve,me,oe),me=Ae}}},ge.prototype._drawBackground=function(fe,ue){var ee=this,z=this._ctx,oe=this._bufferService.cols,re=0,ae=0,le=null;z.save(),this._forEachCell(fe,ue,null,function(me,ve,Pe){var Ae=null;me.isInverse()?Ae=me.isFgDefault()?ee._colors.foreground.css:me.isFgRGB()?"rgb("+xe.AttributeData.toColorRGB(me.getFgColor()).join(",")+")":ee._colors.ansi[me.getFgColor()].css:me.isBgRGB()?Ae="rgb("+xe.AttributeData.toColorRGB(me.getBgColor()).join(",")+")":me.isBgPalette()&&(Ae=ee._colors.ansi[me.getBgColor()].css),le===null&&(re=ve,ae=Pe),Pe!==ae?(z.fillStyle=le||"",ee._fillCells(re,ae,oe-re,1),re=ve,ae=Pe):le!==Ae&&(z.fillStyle=le||"",ee._fillCells(re,ae,ve-re,1),re=ve,ae=Pe),le=Ae}),le!==null&&(z.fillStyle=le,this._fillCells(re,ae,oe-re,1)),z.restore()},ge.prototype._drawForeground=function(fe,ue){var ee=this;this._forEachCell(fe,ue,this._characterJoinerRegistry,function(z,oe,re){if(!z.isInvisible()&&(ee._drawChars(z,oe,re),z.isUnderline())){if(ee._ctx.save(),z.isInverse())if(z.isBgDefault())ee._ctx.fillStyle=ee._colors.background.css;else if(z.isBgRGB())ee._ctx.fillStyle="rgb("+xe.AttributeData.toColorRGB(z.getBgColor()).join(",")+")";else{var ae=z.getBgColor();ee._optionsService.options.drawBoldTextInBrightColors&&z.isBold()&&ae<8&&(ae+=8),ee._ctx.fillStyle=ee._colors.ansi[ae].css}else if(z.isFgDefault())ee._ctx.fillStyle=ee._colors.foreground.css;else if(z.isFgRGB())ee._ctx.fillStyle="rgb("+xe.AttributeData.toColorRGB(z.getFgColor()).join(",")+")";else{var le=z.getFgColor();ee._optionsService.options.drawBoldTextInBrightColors&&z.isBold()&&le<8&&(le+=8),ee._ctx.fillStyle=ee._colors.ansi[le].css}ee._fillBottomLineAtCells(oe,re,z.getWidth()),ee._ctx.restore()}})},ge.prototype.onGridChanged=function(fe,ue){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,fe,this._bufferService.cols,ue-fe+1),this._drawBackground(fe,ue),this._drawForeground(fe,ue))},ge.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},ge.prototype._isOverlapping=function(fe){if(fe.getWidth()!==1||fe.getCode()<256)return!1;var ue=fe.getChars();if(this._characterOverlapCache.hasOwnProperty(ue))return this._characterOverlapCache[ue];this._ctx.save(),this._ctx.font=this._characterFont;var ee=Math.floor(this._ctx.measureText(ue).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[ue]=ee,ee},ge}(Ce.BaseRenderLayer);Ie.TextRenderLayer=pe},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.GridCache=void 0;var Se=function(){function je(){this.cache=[]}return je.prototype.resize=function(Me,Ce){for(var xe=0;xe<Me;xe++){this.cache.length<=xe&&this.cache.push([]);for(var be=this.cache[xe].length;be<Ce;be++)this.cache[xe].push(void 0);this.cache[xe].length=Ce}this.cache.length=Me},je.prototype.clear=function(){for(var Me=0;Me<this.cache.length;Me++)for(var Ce=0;Ce<this.cache[Me].length;Ce++)this.cache[Me][Ce]=void 0},je}();Ie.GridCache=Se},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(ee,z){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(oe,re){oe.__proto__=re}||function(oe,re){for(var ae in re)re.hasOwnProperty(ae)&&(oe[ae]=re[ae])})(ee,z)},function(ee,z){function oe(){this.constructor=ee}Se(ee,z),ee.prototype=z===null?Object.create(z):(oe.prototype=z.prototype,new oe)});Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.NoneCharAtlas=Ie.DynamicCharAtlas=Ie.getGlyphCacheKey=void 0;var Me=Le(9),Ce=Le(44),xe=Le(27),be=Le(46),ye=Le(11),we=Le(28),pe=Le(10),de={css:"rgba(0, 0, 0, 0)",rgba:0};function ge(ee){return ee.code<<21|ee.bg<<12|ee.fg<<3|(ee.bold?0:4)+(ee.dim?0:2)+(ee.italic?0:1)}Ie.getGlyphCacheKey=ge;var fe=function(ee){function z(oe,re){var ae=ee.call(this)||this;ae._config=re,ae._drawToCacheCount=0,ae._glyphsWaitingOnBitmap=[],ae._bitmapCommitTimeout=null,ae._bitmap=null,ae._cacheCanvas=oe.createElement("canvas"),ae._cacheCanvas.width=1024,ae._cacheCanvas.height=1024,ae._cacheCtx=we.throwIfFalsy(ae._cacheCanvas.getContext("2d",{alpha:!0}));var le=oe.createElement("canvas");le.width=ae._config.scaledCharWidth,le.height=ae._config.scaledCharHeight,ae._tmpCtx=we.throwIfFalsy(le.getContext("2d",{alpha:ae._config.allowTransparency})),ae._width=Math.floor(1024/ae._config.scaledCharWidth),ae._height=Math.floor(1024/ae._config.scaledCharHeight);var me=ae._width*ae._height;return ae._cacheMap=new be.LRUMap(me),ae._cacheMap.prealloc(me),ae}return je(z,ee),z.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},z.prototype.beginFrame=function(){this._drawToCacheCount=0},z.prototype.draw=function(oe,re,ae,le){if(re.code===32)return!0;if(!this._canCache(re))return!1;var me=ge(re),ve=this._cacheMap.get(me);if(ve!=null)return this._drawFromCache(oe,ve,ae,le),!0;if(this._drawToCacheCount<100){var Pe=void 0;Pe=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var Ae=this._drawToCache(re,Pe);return this._cacheMap.set(me,Ae),this._drawFromCache(oe,Ae,ae,le),!0}return!1},z.prototype._canCache=function(oe){return oe.code<256},z.prototype._toCoordinateX=function(oe){return oe%this._width*this._config.scaledCharWidth},z.prototype._toCoordinateY=function(oe){return Math.floor(oe/this._width)*this._config.scaledCharHeight},z.prototype._drawFromCache=function(oe,re,ae,le){if(!re.isEmpty){var me=this._toCoordinateX(re.index),ve=this._toCoordinateY(re.index);oe.drawImage(re.inBitmap?this._bitmap:this._cacheCanvas,me,ve,this._config.scaledCharWidth,this._config.scaledCharHeight,ae,le,this._config.scaledCharWidth,this._config.scaledCharHeight)}},z.prototype._getColorFromAnsiIndex=function(oe){return oe<this._config.colors.ansi.length?this._config.colors.ansi[oe]:xe.DEFAULT_ANSI_COLORS[oe]},z.prototype._getBackgroundColor=function(oe){return this._config.allowTransparency?de:oe.bg===Me.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:oe.bg<256?this._getColorFromAnsiIndex(oe.bg):this._config.colors.background},z.prototype._getForegroundColor=function(oe){return oe.fg===Me.INVERTED_DEFAULT_COLOR?pe.color.opaque(this._config.colors.background):oe.fg<256?this._getColorFromAnsiIndex(oe.fg):this._config.colors.foreground},z.prototype._drawToCache=function(oe,re){this._drawToCacheCount++,this._tmpCtx.save();var ae=this._getBackgroundColor(oe);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=ae.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var le=oe.bold?this._config.fontWeightBold:this._config.fontWeight,me=oe.italic?"italic":"";this._tmpCtx.font=me+" "+le+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline="middle",this._tmpCtx.fillStyle=this._getForegroundColor(oe).css,oe.dim&&(this._tmpCtx.globalAlpha=Me.DIM_OPACITY),this._tmpCtx.fillText(oe.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var ve=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),Pe=!1;this._config.allowTransparency||(Pe=function(Ze,qe){for(var Xe=!0,mt=qe.rgba>>>24,pt=qe.rgba>>>16&255,Mt=qe.rgba>>>8&255,at=0;at<Ze.data.length;at+=4)Ze.data[at]===mt&&Ze.data[at+1]===pt&&Ze.data[at+2]===Mt?Ze.data[at+3]=0:Xe=!1;return Xe}(ve,ae));var Ae=this._toCoordinateX(re),De=this._toCoordinateY(re);this._cacheCtx.putImageData(ve,Ae,De);var Oe={index:re,isEmpty:Pe,inBitmap:!1};return this._addGlyphToBitmap(Oe),Oe},z.prototype._addGlyphToBitmap=function(oe){var re=this;!("createImageBitmap"in window)||ye.isFirefox||ye.isSafari||(this._glyphsWaitingOnBitmap.push(oe),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return re._generateBitmap()},100)))},z.prototype._generateBitmap=function(){var oe=this,re=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(ae){oe._bitmap=ae;for(var le=0;le<re.length;le++)re[le].inBitmap=!0}),this._bitmapCommitTimeout=null},z}(Ce.BaseCharAtlas);Ie.DynamicCharAtlas=fe;var ue=function(ee){function z(oe,re){return ee.call(this)||this}return je(z,ee),z.prototype.draw=function(oe,re,ae,le){return!1},z}(Ce.BaseCharAtlas);Ie.NoneCharAtlas=ue},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.BaseCharAtlas=void 0;var Se=function(){function je(){this._didWarmUp=!1}return je.prototype.dispose=function(){},je.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},je.prototype._doWarmUp=function(){},je.prototype.beginFrame=function(){},je}();Ie.BaseCharAtlas=Se},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.ColorContrastCache=void 0;var Se=function(){function je(){this._color={},this._rgba={}}return je.prototype.clear=function(){this._color={},this._rgba={}},je.prototype.setCss=function(Me,Ce,xe){this._rgba[Me]||(this._rgba[Me]={}),this._rgba[Me][Ce]=xe},je.prototype.getCss=function(Me,Ce){return this._rgba[Me]?this._rgba[Me][Ce]:void 0},je.prototype.setColor=function(Me,Ce,xe){this._color[Me]||(this._color[Me]={}),this._color[Me][Ce]=xe},je.prototype.getColor=function(Me,Ce){return this._color[Me]?this._color[Me][Ce]:void 0},je}();Ie.ColorContrastCache=Se},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.LRUMap=void 0;var Se=function(){function je(Me){this.capacity=Me,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return je.prototype._unlinkNode=function(Me){var Ce=Me.prev,xe=Me.next;Me===this._head&&(this._head=xe),Me===this._tail&&(this._tail=Ce),Ce!==null&&(Ce.next=xe),xe!==null&&(xe.prev=Ce)},je.prototype._appendNode=function(Me){var Ce=this._tail;Ce!==null&&(Ce.next=Me),Me.prev=Ce,Me.next=null,this._tail=Me,this._head===null&&(this._head=Me)},je.prototype.prealloc=function(Me){for(var Ce=this._nodePool,xe=0;xe<Me;xe++)Ce.push({prev:null,next:null,key:null,value:null})},je.prototype.get=function(Me){var Ce=this._map[Me];return Ce!==void 0?(this._unlinkNode(Ce),this._appendNode(Ce),Ce.value):null},je.prototype.peekValue=function(Me){var Ce=this._map[Me];return Ce!==void 0?Ce.value:null},je.prototype.peek=function(){var Me=this._head;return Me===null?null:Me.value},je.prototype.set=function(Me,Ce){var xe=this._map[Me];if(xe!==void 0)xe=this._map[Me],this._unlinkNode(xe),xe.value=Ce;else if(this.size>=this.capacity)xe=this._head,this._unlinkNode(xe),delete this._map[xe.key],xe.key=Me,xe.value=Ce,this._map[Me]=xe;else{var be=this._nodePool;be.length>0?((xe=be.pop()).key=Me,xe.value=Ce):xe={prev:null,next:null,key:Me,value:Ce},this._map[Me]=xe,this.size++}this._appendNode(xe)},je}();Ie.LRUMap=Se},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(Ce,xe){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(be,ye){be.__proto__=ye}||function(be,ye){for(var we in ye)ye.hasOwnProperty(we)&&(be[we]=ye[we])})(Ce,xe)},function(Ce,xe){function be(){this.constructor=Ce}Se(Ce,xe),Ce.prototype=xe===null?Object.create(xe):(be.prototype=xe.prototype,new be)});Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.SelectionRenderLayer=void 0;var Me=function(Ce){function xe(be,ye,we,pe,de,ge){var fe=Ce.call(this,be,"selection",ye,!0,we,pe,de,ge)||this;return fe._clearState(),fe}return je(xe,Ce),xe.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},xe.prototype.resize=function(be){Ce.prototype.resize.call(this,be),this._clearState()},xe.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},xe.prototype.onSelectionChanged=function(be,ye,we){if(this._didStateChange(be,ye,we,this._bufferService.buffer.ydisp))if(this._clearAll(),be&&ye){var pe=be[1]-this._bufferService.buffer.ydisp,de=ye[1]-this._bufferService.buffer.ydisp,ge=Math.max(pe,0),fe=Math.min(de,this._bufferService.rows-1);if(!(ge>=this._bufferService.rows||fe<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,we){var ue=be[0],ee=ye[0]-ue,z=fe-ge+1;this._fillCells(ue,ge,ee,z)}else{ue=pe===ge?be[0]:0;var oe=ge===fe?ye[0]:this._bufferService.cols;this._fillCells(ue,ge,oe-ue,1);var re=Math.max(fe-ge-1,0);if(this._fillCells(0,ge+1,this._bufferService.cols,re),ge!==fe){var ae=de===fe?ye[0]:this._bufferService.cols;this._fillCells(0,fe,ae,1)}}this._state.start=[be[0],be[1]],this._state.end=[ye[0],ye[1]],this._state.columnSelectMode=we,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},xe.prototype._didStateChange=function(be,ye,we,pe){return!this._areCoordinatesEqual(be,this._state.start)||!this._areCoordinatesEqual(ye,this._state.end)||we!==this._state.columnSelectMode||pe!==this._state.ydisp},xe.prototype._areCoordinatesEqual=function(be,ye){return!(!be||!ye)&&be[0]===ye[0]&&be[1]===ye[1]},xe}(Le(13).BaseRenderLayer);Ie.SelectionRenderLayer=Me},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(ye,we){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(pe,de){pe.__proto__=de}||function(pe,de){for(var ge in de)de.hasOwnProperty(ge)&&(pe[ge]=de[ge])})(ye,we)},function(ye,we){function pe(){this.constructor=ye}Se(ye,we),ye.prototype=we===null?Object.create(we):(pe.prototype=we.prototype,new pe)});Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.CursorRenderLayer=void 0;var Me=Le(13),Ce=Le(4),xe=function(ye){function we(pe,de,ge,fe,ue,ee,z,oe,re){var ae=ye.call(this,pe,"cursor",de,!0,ge,fe,ee,z)||this;return ae._onRequestRedraw=ue,ae._coreService=oe,ae._coreBrowserService=re,ae._cell=new Ce.CellData,ae._state={x:0,y:0,isFocused:!1,style:"",width:0},ae._cursorRenderers={bar:ae._renderBarCursor.bind(ae),block:ae._renderBlockCursor.bind(ae),underline:ae._renderUnderlineCursor.bind(ae)},ae}return je(we,ye),we.prototype.resize=function(pe){ye.prototype.resize.call(this,pe),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},we.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},we.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},we.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},we.prototype.onOptionsChanged=function(){var pe,de=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new be(this._coreBrowserService.isFocused,function(){de._render(!0)})):((pe=this._cursorBlinkStateManager)===null||pe===void 0||pe.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},we.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},we.prototype.onGridChanged=function(pe,de){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},we.prototype._render=function(pe){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var de=this._bufferService.buffer.ybase+this._bufferService.buffer.y,ge=de-this._bufferService.buffer.ydisp;if(ge<0||ge>=this._bufferService.rows)this._clearCursor();else{var fe=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(de).loadCell(fe,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var ue=this._optionsService.options.cursorStyle;return ue&&ue!=="block"?this._cursorRenderers[ue](fe,ge,this._cell):this._renderBlurCursor(fe,ge,this._cell),this._ctx.restore(),this._state.x=fe,this._state.y=ge,this._state.isFocused=!1,this._state.style=ue,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===fe&&this._state.y===ge&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.options.cursorStyle||"block"](fe,ge,this._cell),this._ctx.restore(),this._state.x=fe,this._state.y=ge,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},we.prototype._clearCursor=function(){this._state&&(this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},we.prototype._renderBarCursor=function(pe,de,ge){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(pe,de,this._optionsService.options.cursorWidth),this._ctx.restore()},we.prototype._renderBlockCursor=function(pe,de,ge){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(pe,de,ge.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(ge,pe,de),this._ctx.restore()},we.prototype._renderUnderlineCursor=function(pe,de,ge){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(pe,de),this._ctx.restore()},we.prototype._renderBlurCursor=function(pe,de,ge){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(pe,de,ge.getWidth(),1),this._ctx.restore()},we}(Me.BaseRenderLayer);Ie.CursorRenderLayer=xe;var be=function(){function ye(we,pe){this._renderCallback=pe,this.isCursorVisible=!0,we&&this._restartInterval()}return Object.defineProperty(ye.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),ye.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},ye.prototype.restartBlinkAnimation=function(){var we=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){we._renderCallback(),we._animationFrame=void 0})))},ye.prototype._restartInterval=function(we){var pe=this;we===void 0&&(we=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout(function(){if(pe._animationTimeRestarted){var de=600-(Date.now()-pe._animationTimeRestarted);if(pe._animationTimeRestarted=void 0,de>0)return void pe._restartInterval(de)}pe.isCursorVisible=!1,pe._animationFrame=window.requestAnimationFrame(function(){pe._renderCallback(),pe._animationFrame=void 0}),pe._blinkInterval=window.setInterval(function(){if(pe._animationTimeRestarted){var ge=600-(Date.now()-pe._animationTimeRestarted);return pe._animationTimeRestarted=void 0,void pe._restartInterval(ge)}pe.isCursorVisible=!pe.isCursorVisible,pe._animationFrame=window.requestAnimationFrame(function(){pe._renderCallback(),pe._animationFrame=void 0})},600)},we)},ye.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},ye.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},ye}()},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(ye,we){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(pe,de){pe.__proto__=de}||function(pe,de){for(var ge in de)de.hasOwnProperty(ge)&&(pe[ge]=de[ge])})(ye,we)},function(ye,we){function pe(){this.constructor=ye}Se(ye,we),ye.prototype=we===null?Object.create(we):(pe.prototype=we.prototype,new pe)});Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.LinkRenderLayer=void 0;var Me=Le(13),Ce=Le(9),xe=Le(26),be=function(ye){function we(pe,de,ge,fe,ue,ee,z,oe){var re=ye.call(this,pe,"link",de,!0,ge,fe,z,oe)||this;return ue.onShowLinkUnderline(function(ae){return re._onShowLinkUnderline(ae)}),ue.onHideLinkUnderline(function(ae){return re._onHideLinkUnderline(ae)}),ee.onShowLinkUnderline(function(ae){return re._onShowLinkUnderline(ae)}),ee.onHideLinkUnderline(function(ae){return re._onHideLinkUnderline(ae)}),re}return je(we,ye),we.prototype.resize=function(pe){ye.prototype.resize.call(this,pe),this._state=void 0},we.prototype.reset=function(){this._clearCurrentLink()},we.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var pe=this._state.y2-this._state.y1-1;pe>0&&this._clearCells(0,this._state.y1+1,this._state.cols,pe),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},we.prototype._onShowLinkUnderline=function(pe){if(pe.fg===Ce.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:pe.fg&&xe.is256Color(pe.fg)?this._ctx.fillStyle=this._colors.ansi[pe.fg].css:this._ctx.fillStyle=this._colors.foreground.css,pe.y1===pe.y2)this._fillBottomLineAtCells(pe.x1,pe.y1,pe.x2-pe.x1);else{this._fillBottomLineAtCells(pe.x1,pe.y1,pe.cols-pe.x1);for(var de=pe.y1+1;de<pe.y2;de++)this._fillBottomLineAtCells(0,de,pe.cols);this._fillBottomLineAtCells(0,pe.y2,pe.x2)}this._state=pe},we.prototype._onHideLinkUnderline=function(pe){this._clearCurrentLink()},we}(Me.BaseRenderLayer);Ie.LinkRenderLayer=be},function(ln,Ie,Le){"use strict";var Se=this&&this.__decorate||function(ye,we,pe,de){var ge,fe=arguments.length,ue=fe<3?we:de===null?de=Object.getOwnPropertyDescriptor(we,pe):de;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ue=Reflect.decorate(ye,we,pe,de);else for(var ee=ye.length-1;ee>=0;ee--)(ge=ye[ee])&&(ue=(fe<3?ge(ue):fe>3?ge(we,pe,ue):ge(we,pe))||ue);return fe>3&&ue&&Object.defineProperty(we,pe,ue),ue},je=this&&this.__param||function(ye,we){return function(pe,de){we(pe,de,ye)}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.MouseZone=Ie.Linkifier=void 0;var Me=Le(0),Ce=Le(1),xe=function(){function ye(we,pe,de){this._bufferService=we,this._logService=pe,this._unicodeService=de,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new Me.EventEmitter,this._onHideLinkUnderline=new Me.EventEmitter,this._onLinkTooltip=new Me.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(ye.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),ye.prototype.attachToDom=function(we,pe){this._element=we,this._mouseZoneManager=pe},ye.prototype.linkifyRows=function(we,pe){var de=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=we,this._rowsToLinkify.end=pe):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,we),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,pe)),this._mouseZoneManager.clearAll(we,pe),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return de._linkifyRows()},ye._timeBeforeLatency))},ye.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var we=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var pe=we.ydisp+this._rowsToLinkify.start;if(!(pe>=we.lines.length)){for(var de=we.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,ge=Math.ceil(2e3/this._bufferService.cols),fe=this._bufferService.buffer.iterator(!1,pe,de,ge,ge);fe.hasNext();)for(var ue=fe.next(),ee=0;ee<this._linkMatchers.length;ee++)this._doLinkifyRow(ue.range.first,ue.content,this._linkMatchers[ee]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},ye.prototype.registerLinkMatcher=function(we,pe,de){if(de===void 0&&(de={}),!pe)throw new Error("handler must be defined");var ge={id:this._nextLinkMatcherId++,regex:we,handler:pe,matchIndex:de.matchIndex,validationCallback:de.validationCallback,hoverTooltipCallback:de.tooltipCallback,hoverLeaveCallback:de.leaveCallback,willLinkActivate:de.willLinkActivate,priority:de.priority||0};return this._addLinkMatcherToList(ge),ge.id},ye.prototype._addLinkMatcherToList=function(we){if(this._linkMatchers.length!==0){for(var pe=this._linkMatchers.length-1;pe>=0;pe--)if(we.priority<=this._linkMatchers[pe].priority)return void this._linkMatchers.splice(pe+1,0,we);this._linkMatchers.splice(0,0,we)}else this._linkMatchers.push(we)},ye.prototype.deregisterLinkMatcher=function(we){for(var pe=0;pe<this._linkMatchers.length;pe++)if(this._linkMatchers[pe].id===we)return this._linkMatchers.splice(pe,1),!0;return!1},ye.prototype._doLinkifyRow=function(we,pe,de){for(var ge,fe=this,ue=new RegExp(de.regex.source,(de.regex.flags||"")+"g"),ee=-1,z=function(){var re=ge[typeof de.matchIndex!="number"?0:de.matchIndex];if(!re)return oe._logService.debug("match found without corresponding matchIndex",ge,de),"break";if(ee=pe.indexOf(re,ee+1),ue.lastIndex=ee+re.length,ee<0)return"break";var ae=oe._bufferService.buffer.stringIndexToBufferIndex(we,ee);if(ae[0]<0)return"break";var le=oe._bufferService.buffer.lines.get(ae[0]);if(!le)return"break";var me=le.getFg(ae[1]),ve=me?me>>9&511:void 0;de.validationCallback?de.validationCallback(re,function(Pe){fe._rowsTimeoutId||Pe&&fe._addLink(ae[1],ae[0]-fe._bufferService.buffer.ydisp,re,de,ve)}):oe._addLink(ae[1],ae[0]-oe._bufferService.buffer.ydisp,re,de,ve)},oe=this;(ge=ue.exec(pe))!==null&&z()!=="break";);},ye.prototype._addLink=function(we,pe,de,ge,fe){var ue=this;if(this._mouseZoneManager&&this._element){var ee=this._unicodeService.getStringCellWidth(de),z=we%this._bufferService.cols,oe=pe+Math.floor(we/this._bufferService.cols),re=(z+ee)%this._bufferService.cols,ae=oe+Math.floor((z+ee)/this._bufferService.cols);re===0&&(re=this._bufferService.cols,ae--),this._mouseZoneManager.add(new be(z+1,oe+1,re+1,ae+1,function(le){if(ge.handler)return ge.handler(le,de);var me=window.open();me?(me.opener=null,me.location.href=de):console.warn("Opening link blocked as opener could not be cleared")},function(){ue._onShowLinkUnderline.fire(ue._createLinkHoverEvent(z,oe,re,ae,fe)),ue._element.classList.add("xterm-cursor-pointer")},function(le){ue._onLinkTooltip.fire(ue._createLinkHoverEvent(z,oe,re,ae,fe)),ge.hoverTooltipCallback&&ge.hoverTooltipCallback(le,de,{start:{x:z,y:oe},end:{x:re,y:ae}})},function(){ue._onHideLinkUnderline.fire(ue._createLinkHoverEvent(z,oe,re,ae,fe)),ue._element.classList.remove("xterm-cursor-pointer"),ge.hoverLeaveCallback&&ge.hoverLeaveCallback()},function(le){return!ge.willLinkActivate||ge.willLinkActivate(le,de)}))}},ye.prototype._createLinkHoverEvent=function(we,pe,de,ge,fe){return{x1:we,y1:pe,x2:de,y2:ge,cols:this._bufferService.cols,fg:fe}},ye._timeBeforeLatency=200,ye=Se([je(0,Ce.IBufferService),je(1,Ce.ILogService),je(2,Ce.IUnicodeService)],ye)}();Ie.Linkifier=xe;var be=function(ye,we,pe,de,ge,fe,ue,ee,z){this.x1=ye,this.y1=we,this.x2=pe,this.y2=de,this.clickCallback=ge,this.hoverCallback=fe,this.tooltipCallback=ue,this.leaveCallback=ee,this.willLinkActivate=z};Ie.MouseZone=be},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(re,ae){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,me){le.__proto__=me}||function(le,me){for(var ve in me)me.hasOwnProperty(ve)&&(le[ve]=me[ve])})(re,ae)},function(re,ae){function le(){this.constructor=re}Se(re,ae),re.prototype=ae===null?Object.create(ae):(le.prototype=ae.prototype,new le)}),Me=this&&this.__decorate||function(re,ae,le,me){var ve,Pe=arguments.length,Ae=Pe<3?ae:me===null?me=Object.getOwnPropertyDescriptor(ae,le):me;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ae=Reflect.decorate(re,ae,le,me);else for(var De=re.length-1;De>=0;De--)(ve=re[De])&&(Ae=(Pe<3?ve(Ae):Pe>3?ve(ae,le,Ae):ve(ae,le))||Ae);return Pe>3&&Ae&&Object.defineProperty(ae,le,Ae),Ae},Ce=this&&this.__param||function(re,ae){return function(le,me){ae(le,me,re)}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.SelectionService=void 0;var xe=Le(11),be=Le(52),ye=Le(4),we=Le(0),pe=Le(5),de=Le(1),ge=Le(30),fe=Le(53),ue=Le(2),ee="\xA0",z=new RegExp(ee,"g"),oe=function(re){function ae(le,me,ve,Pe,Ae,De,Oe){var Ze=re.call(this)||this;return Ze._element=le,Ze._screenElement=me,Ze._bufferService=ve,Ze._coreService=Pe,Ze._mouseService=Ae,Ze._optionsService=De,Ze._renderService=Oe,Ze._dragScrollAmount=0,Ze._enabled=!0,Ze._workCell=new ye.CellData,Ze._mouseDownTimeStamp=0,Ze._onLinuxMouseSelection=Ze.register(new we.EventEmitter),Ze._onRedrawRequest=Ze.register(new we.EventEmitter),Ze._onSelectionChange=Ze.register(new we.EventEmitter),Ze._onRequestScrollLines=Ze.register(new we.EventEmitter),Ze._mouseMoveListener=function(qe){return Ze._onMouseMove(qe)},Ze._mouseUpListener=function(qe){return Ze._onMouseUp(qe)},Ze._coreService.onUserInput(function(){Ze.hasSelection&&Ze.clearSelection()}),Ze._trimListener=Ze._bufferService.buffer.lines.onTrim(function(qe){return Ze._onTrim(qe)}),Ze.register(Ze._bufferService.buffers.onBufferActivate(function(qe){return Ze._onBufferActivate(qe)})),Ze.enable(),Ze._model=new be.SelectionModel(Ze._bufferService),Ze._activeSelectionMode=0,Ze}return je(ae,re),Object.defineProperty(ae.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),ae.prototype.dispose=function(){this._removeMouseDownListeners()},ae.prototype.reset=function(){this.clearSelection()},ae.prototype.disable=function(){this.clearSelection(),this._enabled=!1},ae.prototype.enable=function(){this._enabled=!0},Object.defineProperty(ae.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"hasSelection",{get:function(){var le=this._model.finalSelectionStart,me=this._model.finalSelectionEnd;return!(!le||!me)&&(le[0]!==me[0]||le[1]!==me[1])},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"selectionText",{get:function(){var le=this._model.finalSelectionStart,me=this._model.finalSelectionEnd;if(!le||!me)return"";var ve=this._bufferService.buffer,Pe=[];if(this._activeSelectionMode===3){if(le[0]===me[0])return"";for(var Ae=le[1];Ae<=me[1];Ae++){var De=ve.translateBufferLineToString(Ae,!0,le[0],me[0]);Pe.push(De)}}else{var Oe=le[1]===me[1]?me[0]:void 0;for(Pe.push(ve.translateBufferLineToString(le[1],!0,le[0],Oe)),Ae=le[1]+1;Ae<=me[1]-1;Ae++){var Ze=ve.lines.get(Ae);De=ve.translateBufferLineToString(Ae,!0),Ze&&Ze.isWrapped?Pe[Pe.length-1]+=De:Pe.push(De)}le[1]!==me[1]&&(Ze=ve.lines.get(me[1]),De=ve.translateBufferLineToString(me[1],!0,0,me[0]),Ze&&Ze.isWrapped?Pe[Pe.length-1]+=De:Pe.push(De))}return Pe.map(function(qe){return qe.replace(z," ")}).join(xe.isWindows?`\r
|
|
|
`:`
|
|
|
`)},enumerable:!1,configurable:!0}),ae.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},ae.prototype.refresh=function(le){var me=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return me._refresh()})),xe.isLinux&&le&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},ae.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},ae.prototype.isClickInSelection=function(le){var me=this._getMouseBufferCoords(le),ve=this._model.finalSelectionStart,Pe=this._model.finalSelectionEnd;return!!(ve&&Pe&&me)&&this._areCoordsInSelection(me,ve,Pe)},ae.prototype._areCoordsInSelection=function(le,me,ve){return le[1]>me[1]&&le[1]<ve[1]||me[1]===ve[1]&&le[1]===me[1]&&le[0]>=me[0]&&le[0]<ve[0]||me[1]<ve[1]&&le[1]===ve[1]&&le[0]<ve[0]||me[1]<ve[1]&&le[1]===me[1]&&le[0]>=me[0]},ae.prototype.selectWordAtCursor=function(le){var me=this._getMouseBufferCoords(le);me&&(this._selectWordAt(me,!1),this._model.selectionEnd=void 0,this.refresh(!0))},ae.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},ae.prototype.selectLines=function(le,me){this._model.clearSelection(),le=Math.max(le,0),me=Math.min(me,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,le],this._model.selectionEnd=[this._bufferService.cols,me],this.refresh(),this._onSelectionChange.fire()},ae.prototype._onTrim=function(le){this._model.onTrim(le)&&this.refresh()},ae.prototype._getMouseBufferCoords=function(le){var me=this._mouseService.getCoords(le,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(me)return me[0]--,me[1]--,me[1]+=this._bufferService.buffer.ydisp,me},ae.prototype._getMouseEventScrollAmount=function(le){var me=ge.getCoordsRelativeToElement(le,this._screenElement)[1],ve=this._renderService.dimensions.canvasHeight;return me>=0&&me<=ve?0:(me>ve&&(me-=ve),me=Math.min(Math.max(me,-50),50),(me/=50)/Math.abs(me)+Math.round(14*me))},ae.prototype.shouldForceSelection=function(le){return xe.isMac?le.altKey&&this._optionsService.options.macOptionClickForcesSelection:le.shiftKey},ae.prototype.onMouseDown=function(le){if(this._mouseDownTimeStamp=le.timeStamp,(le.button!==2||!this.hasSelection)&&le.button===0){if(!this._enabled){if(!this.shouldForceSelection(le))return;le.stopPropagation()}le.preventDefault(),this._dragScrollAmount=0,this._enabled&&le.shiftKey?this._onIncrementalClick(le):le.detail===1?this._onSingleClick(le):le.detail===2?this._onDoubleClick(le):le.detail===3&&this._onTripleClick(le),this._addMouseDownListeners(),this.refresh(!0)}},ae.prototype._addMouseDownListeners=function(){var le=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return le._dragScroll()},50)},ae.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},ae.prototype._onIncrementalClick=function(le){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(le))},ae.prototype._onSingleClick=function(le){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(le)?3:0,this._model.selectionStart=this._getMouseBufferCoords(le),this._model.selectionStart){this._model.selectionEnd=void 0;var me=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);me&&me.length!==this._model.selectionStart[0]&&me.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},ae.prototype._onDoubleClick=function(le){var me=this._getMouseBufferCoords(le);me&&(this._activeSelectionMode=1,this._selectWordAt(me,!0))},ae.prototype._onTripleClick=function(le){var me=this._getMouseBufferCoords(le);me&&(this._activeSelectionMode=2,this._selectLineAt(me[1]))},ae.prototype.shouldColumnSelect=function(le){return le.altKey&&!(xe.isMac&&this._optionsService.options.macOptionClickForcesSelection)},ae.prototype._onMouseMove=function(le){if(le.stopImmediatePropagation(),this._model.selectionStart){var me=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(le),this._model.selectionEnd){this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(le),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var ve=this._bufferService.buffer;if(this._model.selectionEnd[1]<ve.lines.length){var Pe=ve.lines.get(this._model.selectionEnd[1]);Pe&&Pe.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}me&&me[0]===this._model.selectionEnd[0]&&me[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},ae.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var le=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(le.ydisp+this._bufferService.rows,le.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=le.ydisp),this.refresh()}},ae.prototype._onMouseUp=function(le){var me=le.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&me<500&&le.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var ve=this._mouseService.getCoords(le,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(ve&&ve[0]!==void 0&&ve[1]!==void 0){var Pe=fe.moveToCellSequence(ve[0]-1,ve[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(Pe,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},ae.prototype._onBufferActivate=function(le){var me=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=le.activeBuffer.lines.onTrim(function(ve){return me._onTrim(ve)})},ae.prototype._convertViewportColToCharacterIndex=function(le,me){for(var ve=me[0],Pe=0;me[0]>=Pe;Pe++){var Ae=le.loadCell(Pe,this._workCell).getChars().length;this._workCell.getWidth()===0?ve--:Ae>1&&me[0]!==Pe&&(ve+=Ae-1)}return ve},ae.prototype.setSelection=function(le,me,ve){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[le,me],this._model.selectionStartLength=ve,this.refresh()},ae.prototype._getWordAt=function(le,me,ve,Pe){if(ve===void 0&&(ve=!0),Pe===void 0&&(Pe=!0),!(le[0]>=this._bufferService.cols)){var Ae=this._bufferService.buffer,De=Ae.lines.get(le[1]);if(De){var Oe=Ae.translateBufferLineToString(le[1],!1),Ze=this._convertViewportColToCharacterIndex(De,le),qe=Ze,Xe=le[0]-Ze,mt=0,pt=0,Mt=0,at=0;if(Oe.charAt(Ze)===" "){for(;Ze>0&&Oe.charAt(Ze-1)===" ";)Ze--;for(;qe<Oe.length&&Oe.charAt(qe+1)===" ";)qe++}else{var _t=le[0],dt=le[0];De.getWidth(_t)===0&&(mt++,_t--),De.getWidth(dt)===2&&(pt++,dt++);var Rt=De.getString(dt).length;for(Rt>1&&(at+=Rt-1,qe+=Rt-1);_t>0&&Ze>0&&!this._isCharWordSeparator(De.loadCell(_t-1,this._workCell));){De.loadCell(_t-1,this._workCell);var ut=this._workCell.getChars().length;this._workCell.getWidth()===0?(mt++,_t--):ut>1&&(Mt+=ut-1,Ze-=ut-1),Ze--,_t--}for(;dt<De.length&&qe+1<Oe.length&&!this._isCharWordSeparator(De.loadCell(dt+1,this._workCell));){De.loadCell(dt+1,this._workCell);var rt=this._workCell.getChars().length;this._workCell.getWidth()===2?(pt++,dt++):rt>1&&(at+=rt-1,qe+=rt-1),qe++,dt++}}qe++;var ct=Ze+Xe-mt+Mt,yt=Math.min(this._bufferService.cols,qe-Ze+mt+pt-Mt-at);if(me||Oe.slice(Ze,qe).trim()!==""){if(ve&&ct===0&&De.getCodePoint(0)!==32){var wt=Ae.lines.get(le[1]-1);if(wt&&De.isWrapped&&wt.getCodePoint(this._bufferService.cols-1)!==32){var xt=this._getWordAt([this._bufferService.cols-1,le[1]-1],!1,!0,!1);if(xt){var Ut=this._bufferService.cols-xt.start;ct-=Ut,yt+=Ut}}}if(Pe&&ct+yt===this._bufferService.cols&&De.getCodePoint(this._bufferService.cols-1)!==32){var zt=Ae.lines.get(le[1]+1);if(zt&&zt.isWrapped&&zt.getCodePoint(0)!==32){var dn=this._getWordAt([0,le[1]+1],!1,!1,!0);dn&&(yt+=dn.length)}}return{start:ct,length:yt}}}}},ae.prototype._selectWordAt=function(le,me){var ve=this._getWordAt(le,me);if(ve){for(;ve.start<0;)ve.start+=this._bufferService.cols,le[1]--;this._model.selectionStart=[ve.start,le[1]],this._model.selectionStartLength=ve.length}},ae.prototype._selectToWordAt=function(le){var me=this._getWordAt(le,!0);if(me){for(var ve=le[1];me.start<0;)me.start+=this._bufferService.cols,ve--;if(!this._model.areSelectionValuesReversed())for(;me.start+me.length>this._bufferService.cols;)me.length-=this._bufferService.cols,ve++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?me.start:me.start+me.length,ve]}},ae.prototype._isCharWordSeparator=function(le){return le.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(le.getChars())>=0},ae.prototype._selectLineAt=function(le){var me=this._bufferService.buffer.getWrappedRangeForLine(le);this._model.selectionStart=[0,me.first],this._model.selectionEnd=[this._bufferService.cols,me.last],this._model.selectionStartLength=0},ae=Me([Ce(2,de.IBufferService),Ce(3,de.ICoreService),Ce(4,pe.IMouseService),Ce(5,de.IOptionsService),Ce(6,pe.IRenderService)],ae)}(ue.Disposable);Ie.SelectionService=oe},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.SelectionModel=void 0;var Se=function(){function je(Me){this._bufferService=Me,this.isSelectAllActive=!1,this.selectionStartLength=0}return je.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(je.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(je.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){var Me=this.selectionStart[0]+this.selectionStartLength;return Me>this._bufferService.cols?[Me%this._bufferService.cols,this.selectionStart[1]+Math.floor(Me/this._bufferService.cols)]:[Me,this.selectionStart[1]]}return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd}},enumerable:!1,configurable:!0}),je.prototype.areSelectionValuesReversed=function(){var Me=this.selectionStart,Ce=this.selectionEnd;return!(!Me||!Ce)&&(Me[1]>Ce[1]||Me[1]===Ce[1]&&Me[0]>Ce[0])},je.prototype.onTrim=function(Me){return this.selectionStart&&(this.selectionStart[1]-=Me),this.selectionEnd&&(this.selectionEnd[1]-=Me),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},je}();Ie.SelectionModel=Se},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.moveToCellSequence=void 0;var Se=Le(12);function je(we,pe,de,ge){var fe=we-Me(de,we),ue=pe-Me(de,pe);return ye(Math.abs(fe-ue)-function(ee,z,oe){for(var re=0,ae=ee-Me(oe,ee),le=z-Me(oe,z),me=0;me<Math.abs(ae-le);me++){var ve=Ce(ee,z)==="A"?-1:1,Pe=oe.buffer.lines.get(ae+ve*me);Pe&&Pe.isWrapped&&re++}return re}(we,pe,de),be(Ce(we,pe),ge))}function Me(we,pe){for(var de=0,ge=we.buffer.lines.get(pe),fe=ge&&ge.isWrapped;fe&&pe>=0&&pe<we.rows;)de++,fe=(ge=we.buffer.lines.get(--pe))&&ge.isWrapped;return de}function Ce(we,pe){return we>pe?"A":"B"}function xe(we,pe,de,ge,fe,ue){for(var ee=we,z=pe,oe="";ee!==de||z!==ge;)ee+=fe?1:-1,fe&&ee>ue.cols-1?(oe+=ue.buffer.translateBufferLineToString(z,!1,we,ee),ee=0,we=0,z++):!fe&&ee<0&&(oe+=ue.buffer.translateBufferLineToString(z,!1,0,we+1),we=ee=ue.cols-1,z--);return oe+ue.buffer.translateBufferLineToString(z,!1,we,ee)}function be(we,pe){var de=pe?"O":"[";return Se.C0.ESC+de+we}function ye(we,pe){we=Math.floor(we);for(var de="",ge=0;ge<we;ge++)de+=pe;return de}Ie.moveToCellSequence=function(we,pe,de,ge){var fe,ue=de.buffer.x,ee=de.buffer.y;if(!de.buffer.hasScrollback)return function(oe,re,ae,le,me,ve){return je(re,le,me,ve).length===0?"":ye(xe(oe,re,oe,re-Me(me,re),!1,me).length,be("D",ve))}(ue,ee,0,pe,de,ge)+je(ee,pe,de,ge)+function(oe,re,ae,le,me,ve){var Pe;Pe=je(re,le,me,ve).length>0?le-Me(me,le):re;var Ae=le,De=function(Oe,Ze,qe,Xe,mt,pt){var Mt;return Mt=je(qe,Xe,mt,pt).length>0?Xe-Me(mt,Xe):Ze,Oe<qe&&Mt<=Xe||Oe>=qe&&Mt<Xe?"C":"D"}(oe,re,ae,le,me,ve);return ye(xe(oe,Pe,ae,Ae,De==="C",me).length,be(De,ve))}(ue,ee,we,pe,de,ge);if(ee===pe)return fe=ue>we?"D":"C",ye(Math.abs(ue-we),be(fe,ge));fe=ee>pe?"D":"C";var z=Math.abs(ee-pe);return ye(function(oe,re){return re.cols-oe}(ee>pe?we:ue,de)+(z-1)*de.cols+1+((ee>pe?ue:we)-1),be(fe,ge))}},function(ln,Ie,Le){"use strict";var Se=this&&this.__decorate||function(xe,be,ye,we){var pe,de=arguments.length,ge=de<3?be:we===null?we=Object.getOwnPropertyDescriptor(be,ye):we;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ge=Reflect.decorate(xe,be,ye,we);else for(var fe=xe.length-1;fe>=0;fe--)(pe=xe[fe])&&(ge=(de<3?pe(ge):de>3?pe(be,ye,ge):pe(be,ye))||ge);return de>3&&ge&&Object.defineProperty(be,ye,ge),ge},je=this&&this.__param||function(xe,be){return function(ye,we){be(ye,we,xe)}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.SoundService=void 0;var Me=Le(1),Ce=function(){function xe(be){this._optionsService=be}return Object.defineProperty(xe,"audioContext",{get:function(){if(!xe._audioContext){var be=window.AudioContext||window.webkitAudioContext;if(!be)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;xe._audioContext=new be}return xe._audioContext},enumerable:!1,configurable:!0}),xe.prototype.playBellSound=function(){var be=xe.audioContext;if(be){var ye=be.createBufferSource();be.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(we){ye.buffer=we,ye.connect(be.destination),ye.start(0)})}},xe.prototype._base64ToArrayBuffer=function(be){for(var ye=window.atob(be),we=ye.length,pe=new Uint8Array(we),de=0;de<we;de++)pe[de]=ye.charCodeAt(de);return pe.buffer},xe.prototype._removeMimeType=function(be){return be.split(",")[1]},xe=Se([je(0,Me.IOptionsService)],xe)}();Ie.SoundService=Ce},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(de,ge){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,ue){fe.__proto__=ue}||function(fe,ue){for(var ee in ue)ue.hasOwnProperty(ee)&&(fe[ee]=ue[ee])})(de,ge)},function(de,ge){function fe(){this.constructor=de}Se(de,ge),de.prototype=ge===null?Object.create(ge):(fe.prototype=ge.prototype,new fe)}),Me=this&&this.__decorate||function(de,ge,fe,ue){var ee,z=arguments.length,oe=z<3?ge:ue===null?ue=Object.getOwnPropertyDescriptor(ge,fe):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(de,ge,fe,ue);else for(var re=de.length-1;re>=0;re--)(ee=de[re])&&(oe=(z<3?ee(oe):z>3?ee(ge,fe,oe):ee(ge,fe))||oe);return z>3&&oe&&Object.defineProperty(ge,fe,oe),oe},Ce=this&&this.__param||function(de,ge){return function(fe,ue){ge(fe,ue,de)}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.MouseZoneManager=void 0;var xe=Le(2),be=Le(7),ye=Le(5),we=Le(1),pe=function(de){function ge(fe,ue,ee,z,oe,re){var ae=de.call(this)||this;return ae._element=fe,ae._screenElement=ue,ae._bufferService=ee,ae._mouseService=z,ae._selectionService=oe,ae._optionsService=re,ae._zones=[],ae._areZonesActive=!1,ae._lastHoverCoords=[void 0,void 0],ae._initialSelectionLength=0,ae.register(be.addDisposableDomListener(ae._element,"mousedown",function(le){return ae._onMouseDown(le)})),ae._mouseMoveListener=function(le){return ae._onMouseMove(le)},ae._mouseLeaveListener=function(le){return ae._onMouseLeave(le)},ae._clickListener=function(le){return ae._onClick(le)},ae}return je(ge,de),ge.prototype.dispose=function(){de.prototype.dispose.call(this),this._deactivate()},ge.prototype.add=function(fe){this._zones.push(fe),this._zones.length===1&&this._activate()},ge.prototype.clearAll=function(fe,ue){if(this._zones.length!==0){fe&&ue||(fe=0,ue=this._bufferService.rows-1);for(var ee=0;ee<this._zones.length;ee++){var z=this._zones[ee];(z.y1>fe&&z.y1<=ue+1||z.y2>fe&&z.y2<=ue+1||z.y1<fe&&z.y2>ue+1)&&(this._currentZone&&this._currentZone===z&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(ee--,1))}this._zones.length===0&&this._deactivate()}},ge.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},ge.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},ge.prototype._onMouseMove=function(fe){this._lastHoverCoords[0]===fe.pageX&&this._lastHoverCoords[1]===fe.pageY||(this._onHover(fe),this._lastHoverCoords=[fe.pageX,fe.pageY])},ge.prototype._onHover=function(fe){var ue=this,ee=this._findZoneEventAt(fe);ee!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),ee&&(this._currentZone=ee,ee.hoverCallback&&ee.hoverCallback(fe),this._tooltipTimeout=window.setTimeout(function(){return ue._onTooltip(fe)},this._optionsService.options.linkTooltipHoverDuration)))},ge.prototype._onTooltip=function(fe){this._tooltipTimeout=void 0;var ue=this._findZoneEventAt(fe);ue&&ue.tooltipCallback&&ue.tooltipCallback(fe)},ge.prototype._onMouseDown=function(fe){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var ue=this._findZoneEventAt(fe);ue!=null&&ue.willLinkActivate(fe)&&(fe.preventDefault(),fe.stopImmediatePropagation())}},ge.prototype._onMouseLeave=function(fe){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},ge.prototype._onClick=function(fe){var ue=this._findZoneEventAt(fe),ee=this._getSelectionLength();ue&&ee===this._initialSelectionLength&&(ue.clickCallback(fe),fe.preventDefault(),fe.stopImmediatePropagation())},ge.prototype._getSelectionLength=function(){var fe=this._selectionService.selectionText;return fe?fe.length:0},ge.prototype._findZoneEventAt=function(fe){var ue=this._mouseService.getCoords(fe,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(ue)for(var ee=ue[0],z=ue[1],oe=0;oe<this._zones.length;oe++){var re=this._zones[oe];if(re.y1===re.y2){if(z===re.y1&&ee>=re.x1&&ee<re.x2)return re}else if(z===re.y1&&ee>=re.x1||z===re.y2&&ee<re.x2||z>re.y1&&z<re.y2)return re}},ge=Me([Ce(2,we.IBufferService),Ce(3,ye.IMouseService),Ce(4,ye.ISelectionService),Ce(5,we.IOptionsService)],ge)}(xe.Disposable);Ie.MouseZoneManager=pe},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(ge,fe){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ue,ee){ue.__proto__=ee}||function(ue,ee){for(var z in ee)ee.hasOwnProperty(z)&&(ue[z]=ee[z])})(ge,fe)},function(ge,fe){function ue(){this.constructor=ge}Se(ge,fe),ge.prototype=fe===null?Object.create(fe):(ue.prototype=fe.prototype,new ue)});Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.AccessibilityManager=void 0;var Me=Le(18),Ce=Le(11),xe=Le(31),be=Le(7),ye=Le(2),we=Le(32),pe=Le(17),de=function(ge){function fe(ue,ee){var z=ge.call(this)||this;z._terminal=ue,z._renderService=ee,z._liveRegionLineCount=0,z._charsToConsume=[],z._charsToAnnounce="",z._accessibilityTreeRoot=document.createElement("div"),z._accessibilityTreeRoot.classList.add("xterm-accessibility"),z._rowContainer=document.createElement("div"),z._rowContainer.classList.add("xterm-accessibility-tree"),z._rowContainer.setAttribute("role","list"),z._rowElements=[];for(var oe=0;oe<z._terminal.rows;oe++)z._rowElements[oe]=z._createAccessibilityTreeNode(),z._rowContainer.appendChild(z._rowElements[oe]);if(z._topBoundaryFocusListener=function(re){return z._onBoundaryFocus(re,0)},z._bottomBoundaryFocusListener=function(re){return z._onBoundaryFocus(re,1)},z._rowElements[0].addEventListener("focus",z._topBoundaryFocusListener),z._rowElements[z._rowElements.length-1].addEventListener("focus",z._bottomBoundaryFocusListener),z._refreshRowsDimensions(),z._accessibilityTreeRoot.appendChild(z._rowContainer),z._renderRowsDebouncer=new xe.RenderDebouncer(z._renderRows.bind(z)),z._refreshRows(),z._liveRegion=document.createElement("div"),z._liveRegion.classList.add("live-region"),z._liveRegion.setAttribute("aria-live","assertive"),z._accessibilityTreeRoot.appendChild(z._liveRegion),!z._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return z._terminal.element.insertAdjacentElement("afterbegin",z._accessibilityTreeRoot),z.register(z._renderRowsDebouncer),z.register(z._terminal.onResize(function(re){return z._onResize(re.rows)})),z.register(z._terminal.onRender(function(re){return z._refreshRows(re.start,re.end)})),z.register(z._terminal.onScroll(function(){return z._refreshRows()})),z.register(z._terminal.onA11yChar(function(re){return z._onChar(re)})),z.register(z._terminal.onLineFeed(function(){return z._onChar(`
|
|
|
`)})),z.register(z._terminal.onA11yTab(function(re){return z._onTab(re)})),z.register(z._terminal.onKey(function(re){return z._onKey(re.key)})),z.register(z._terminal.onBlur(function(){return z._clearLiveRegion()})),z.register(z._renderService.onDimensionsChange(function(){return z._refreshRowsDimensions()})),z._screenDprMonitor=new we.ScreenDprMonitor,z.register(z._screenDprMonitor),z._screenDprMonitor.setListener(function(){return z._refreshRowsDimensions()}),z.register(be.addDisposableDomListener(window,"resize",function(){return z._refreshRowsDimensions()})),z}return je(fe,ge),fe.prototype.dispose=function(){ge.prototype.dispose.call(this),pe.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},fe.prototype._onBoundaryFocus=function(ue,ee){var z=ue.target,oe=this._rowElements[ee===0?1:this._rowElements.length-2];if(z.getAttribute("aria-posinset")!==(ee===0?"1":""+this._terminal.buffer.lines.length)&&ue.relatedTarget===oe){var re,ae;if(ee===0?(re=z,ae=this._rowElements.pop(),this._rowContainer.removeChild(ae)):(re=this._rowElements.shift(),ae=z,this._rowContainer.removeChild(re)),re.removeEventListener("focus",this._topBoundaryFocusListener),ae.removeEventListener("focus",this._bottomBoundaryFocusListener),ee===0){var le=this._createAccessibilityTreeNode();this._rowElements.unshift(le),this._rowContainer.insertAdjacentElement("afterbegin",le)}else le=this._createAccessibilityTreeNode(),this._rowElements.push(le),this._rowContainer.appendChild(le);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(ee===0?-1:1),this._rowElements[ee===0?1:this._rowElements.length-2].focus(),ue.preventDefault(),ue.stopImmediatePropagation()}},fe.prototype._onResize=function(ue){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var ee=this._rowContainer.children.length;ee<this._terminal.rows;ee++)this._rowElements[ee]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[ee]);for(;this._rowElements.length>ue;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},fe.prototype._createAccessibilityTreeNode=function(){var ue=document.createElement("div");return ue.setAttribute("role","listitem"),ue.tabIndex=-1,this._refreshRowDimensions(ue),ue},fe.prototype._onTab=function(ue){for(var ee=0;ee<ue;ee++)this._onChar(" ")},fe.prototype._onChar=function(ue){var ee=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==ue&&(this._charsToAnnounce+=ue):this._charsToAnnounce+=ue,ue===`
|
|
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=Me.tooMuchOutput)),Ce.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){ee._accessibilityTreeRoot.appendChild(ee._liveRegion)},0))},fe.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,Ce.isMac&&pe.removeElementFromParent(this._liveRegion)},fe.prototype._onKey=function(ue){this._clearLiveRegion(),this._charsToConsume.push(ue)},fe.prototype._refreshRows=function(ue,ee){this._renderRowsDebouncer.refresh(ue,ee,this._terminal.rows)},fe.prototype._renderRows=function(ue,ee){for(var z=this._terminal.buffer,oe=z.lines.length.toString(),re=ue;re<=ee;re++){var ae=z.translateBufferLineToString(z.ydisp+re,!0),le=(z.ydisp+re+1).toString(),me=this._rowElements[re];me&&(ae.length===0?me.innerHTML=" ":me.textContent=ae,me.setAttribute("aria-posinset",le),me.setAttribute("aria-setsize",oe))}this._announceCharacters()},fe.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var ue=0;ue<this._terminal.rows;ue++)this._refreshRowDimensions(this._rowElements[ue])}},fe.prototype._refreshRowDimensions=function(ue){ue.style.height=this._renderService.dimensions.actualCellHeight+"px"},fe.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},fe}(ye.Disposable);Ie.AccessibilityManager=de},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(z,oe){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(re,ae){re.__proto__=ae}||function(re,ae){for(var le in ae)ae.hasOwnProperty(le)&&(re[le]=ae[le])})(z,oe)},function(z,oe){function re(){this.constructor=z}Se(z,oe),z.prototype=oe===null?Object.create(oe):(re.prototype=oe.prototype,new re)}),Me=this&&this.__decorate||function(z,oe,re,ae){var le,me=arguments.length,ve=me<3?oe:ae===null?ae=Object.getOwnPropertyDescriptor(oe,re):ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(z,oe,re,ae);else for(var Pe=z.length-1;Pe>=0;Pe--)(le=z[Pe])&&(ve=(me<3?le(ve):me>3?le(oe,re,ve):le(oe,re))||ve);return me>3&&ve&&Object.defineProperty(oe,re,ve),ve},Ce=this&&this.__param||function(z,oe){return function(re,ae){oe(re,ae,z)}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.DomRenderer=void 0;var xe=Le(58),be=Le(9),ye=Le(2),we=Le(5),pe=Le(1),de=Le(0),ge=Le(10),fe=Le(17),ue=1,ee=function(z){function oe(re,ae,le,me,ve,Pe,Ae,De,Oe){var Ze=z.call(this)||this;return Ze._colors=re,Ze._element=ae,Ze._screenElement=le,Ze._viewportElement=me,Ze._linkifier=ve,Ze._linkifier2=Pe,Ze._charSizeService=Ae,Ze._optionsService=De,Ze._bufferService=Oe,Ze._terminalClass=ue++,Ze._rowElements=[],Ze._rowContainer=document.createElement("div"),Ze._rowContainer.classList.add("xterm-rows"),Ze._rowContainer.style.lineHeight="normal",Ze._rowContainer.setAttribute("aria-hidden","true"),Ze._refreshRowElements(Ze._bufferService.cols,Ze._bufferService.rows),Ze._selectionContainer=document.createElement("div"),Ze._selectionContainer.classList.add("xterm-selection"),Ze._selectionContainer.setAttribute("aria-hidden","true"),Ze.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},Ze._updateDimensions(),Ze._injectCss(),Ze._rowFactory=new xe.DomRendererRowFactory(document,Ze._optionsService,Ze._colors),Ze._element.classList.add("xterm-dom-renderer-owner-"+Ze._terminalClass),Ze._screenElement.appendChild(Ze._rowContainer),Ze._screenElement.appendChild(Ze._selectionContainer),Ze._linkifier.onShowLinkUnderline(function(qe){return Ze._onLinkHover(qe)}),Ze._linkifier.onHideLinkUnderline(function(qe){return Ze._onLinkLeave(qe)}),Ze._linkifier2.onShowLinkUnderline(function(qe){return Ze._onLinkHover(qe)}),Ze._linkifier2.onHideLinkUnderline(function(qe){return Ze._onLinkLeave(qe)}),Ze}return je(oe,z),Object.defineProperty(oe.prototype,"onRequestRedraw",{get:function(){return new de.EventEmitter().event},enumerable:!1,configurable:!0}),oe.prototype.dispose=function(){this._element.classList.remove("xterm-dom-renderer-owner-"+this._terminalClass),fe.removeElementFromParent(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),z.prototype.dispose.call(this)},oe.prototype._updateDimensions=function(){this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;for(var re=0,ae=this._rowElements;re<ae.length;re++){var le=ae[re];le.style.width=this.dimensions.canvasWidth+"px",le.style.height=this.dimensions.actualCellHeight+"px",le.style.lineHeight=this.dimensions.actualCellHeight+"px",le.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var me=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=me,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},oe.prototype.setColors=function(re){this._colors=re,this._injectCss()},oe.prototype._injectCss=function(){var re=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var ae=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";ae+=this._terminalSelector+" span:not(."+xe.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+xe.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+xe.ITALIC_CLASS+" { font-style: italic;}",ae+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",ae+="@keyframes blink_block_"+this._terminalClass+" { 0% { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+"; } 50% { background-color: "+this._colors.cursorAccent.css+"; color: "+this._colors.cursor.css+"; }}",ae+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+xe.CURSOR_CLASS+"."+xe.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+xe.CURSOR_CLASS+"."+xe.CURSOR_BLINK_CLASS+":not(."+xe.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+xe.CURSOR_CLASS+"."+xe.CURSOR_BLINK_CLASS+"."+xe.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+xe.CURSOR_CLASS+"."+xe.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+xe.CURSOR_CLASS+"."+xe.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+xe.CURSOR_CLASS+"."+xe.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",ae+=this._terminalSelector+" .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}"+this._terminalSelector+" .xterm-selection div { position: absolute; background-color: "+this._colors.selectionTransparent.css+";}",this._colors.ansi.forEach(function(le,me){ae+=re._terminalSelector+" .xterm-fg-"+me+" { color: "+le.css+"; }"+re._terminalSelector+" .xterm-bg-"+me+" { background-color: "+le.css+"; }"}),ae+=this._terminalSelector+" .xterm-fg-"+be.INVERTED_DEFAULT_COLOR+" { color: "+ge.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+be.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.innerHTML=ae},oe.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},oe.prototype._refreshRowElements=function(re,ae){for(var le=this._rowElements.length;le<=ae;le++){var me=document.createElement("div");this._rowContainer.appendChild(me),this._rowElements.push(me)}for(;this._rowElements.length>ae;)this._rowContainer.removeChild(this._rowElements.pop())},oe.prototype.onResize=function(re,ae){this._refreshRowElements(re,ae),this._updateDimensions()},oe.prototype.onCharSizeChanged=function(){this._updateDimensions()},oe.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},oe.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},oe.prototype.onSelectionChanged=function(re,ae,le){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(re&&ae){var me=re[1]-this._bufferService.buffer.ydisp,ve=ae[1]-this._bufferService.buffer.ydisp,Pe=Math.max(me,0),Ae=Math.min(ve,this._bufferService.rows-1);if(!(Pe>=this._bufferService.rows||Ae<0)){var De=document.createDocumentFragment();if(le)De.appendChild(this._createSelectionElement(Pe,re[0],ae[0],Ae-Pe+1));else{var Oe=me===Pe?re[0]:0,Ze=Pe===Ae?ae[0]:this._bufferService.cols;De.appendChild(this._createSelectionElement(Pe,Oe,Ze));var qe=Ae-Pe-1;if(De.appendChild(this._createSelectionElement(Pe+1,0,this._bufferService.cols,qe)),Pe!==Ae){var Xe=ve===Ae?ae[0]:this._bufferService.cols;De.appendChild(this._createSelectionElement(Ae,0,Xe))}}this._selectionContainer.appendChild(De)}}},oe.prototype._createSelectionElement=function(re,ae,le,me){me===void 0&&(me=1);var ve=document.createElement("div");return ve.style.height=me*this.dimensions.actualCellHeight+"px",ve.style.top=re*this.dimensions.actualCellHeight+"px",ve.style.left=ae*this.dimensions.actualCellWidth+"px",ve.style.width=this.dimensions.actualCellWidth*(le-ae)+"px",ve},oe.prototype.onCursorMove=function(){},oe.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},oe.prototype.clear=function(){for(var re=0,ae=this._rowElements;re<ae.length;re++)ae[re].innerHTML=""},oe.prototype.renderRows=function(re,ae){for(var le=this._bufferService.buffer.ybase+this._bufferService.buffer.y,me=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),ve=this._optionsService.options.cursorBlink,Pe=re;Pe<=ae;Pe++){var Ae=this._rowElements[Pe];Ae.innerHTML="";var De=Pe+this._bufferService.buffer.ydisp,Oe=this._bufferService.buffer.lines.get(De),Ze=this._optionsService.options.cursorStyle;Ae.appendChild(this._rowFactory.createRow(Oe,De===le,Ze,me,ve,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(oe.prototype,"_terminalSelector",{get:function(){return".xterm-dom-renderer-owner-"+this._terminalClass},enumerable:!1,configurable:!0}),oe.prototype.registerCharacterJoiner=function(re){return-1},oe.prototype.deregisterCharacterJoiner=function(re){return!1},oe.prototype._onLinkHover=function(re){this._setCellUnderline(re.x1,re.x2,re.y1,re.y2,re.cols,!0)},oe.prototype._onLinkLeave=function(re){this._setCellUnderline(re.x1,re.x2,re.y1,re.y2,re.cols,!1)},oe.prototype._setCellUnderline=function(re,ae,le,me,ve,Pe){for(;re!==ae||le!==me;){var Ae=this._rowElements[le];if(!Ae)return;var De=Ae.children[re];De&&(De.style.textDecoration=Pe?"underline":"none"),++re>=ve&&(re=0,le++)}},oe=Me([Ce(6,we.ICharSizeService),Ce(7,pe.IOptionsService),Ce(8,pe.IBufferService)],oe)}(ye.Disposable);Ie.DomRenderer=ee},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.DomRendererRowFactory=Ie.CURSOR_STYLE_UNDERLINE_CLASS=Ie.CURSOR_STYLE_BAR_CLASS=Ie.CURSOR_STYLE_BLOCK_CLASS=Ie.CURSOR_BLINK_CLASS=Ie.CURSOR_CLASS=Ie.UNDERLINE_CLASS=Ie.ITALIC_CLASS=Ie.DIM_CLASS=Ie.BOLD_CLASS=void 0;var Se=Le(9),je=Le(3),Me=Le(4),Ce=Le(10);Ie.BOLD_CLASS="xterm-bold",Ie.DIM_CLASS="xterm-dim",Ie.ITALIC_CLASS="xterm-italic",Ie.UNDERLINE_CLASS="xterm-underline",Ie.CURSOR_CLASS="xterm-cursor",Ie.CURSOR_BLINK_CLASS="xterm-cursor-blink",Ie.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",Ie.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",Ie.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var xe=function(){function ye(we,pe,de){this._document=we,this._optionsService=pe,this._colors=de,this._workCell=new Me.CellData}return ye.prototype.setColors=function(we){this._colors=we},ye.prototype.createRow=function(we,pe,de,ge,fe,ue,ee){for(var z=this._document.createDocumentFragment(),oe=0,re=Math.min(we.length,ee)-1;re>=0;re--)if(we.loadCell(re,this._workCell).getCode()!==je.NULL_CELL_CODE||pe&&re===ge){oe=re+1;break}for(re=0;re<oe;re++){we.loadCell(re,this._workCell);var ae=this._workCell.getWidth();if(ae!==0){var le=this._document.createElement("span");if(ae>1&&(le.style.width=ue*ae+"px"),pe&&re===ge)switch(le.classList.add(Ie.CURSOR_CLASS),fe&&le.classList.add(Ie.CURSOR_BLINK_CLASS),de){case"bar":le.classList.add(Ie.CURSOR_STYLE_BAR_CLASS);break;case"underline":le.classList.add(Ie.CURSOR_STYLE_UNDERLINE_CLASS);break;default:le.classList.add(Ie.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&le.classList.add(Ie.BOLD_CLASS),this._workCell.isItalic()&&le.classList.add(Ie.ITALIC_CLASS),this._workCell.isDim()&&le.classList.add(Ie.DIM_CLASS),this._workCell.isUnderline()&&le.classList.add(Ie.UNDERLINE_CLASS),this._workCell.isInvisible()?le.textContent=je.WHITESPACE_CELL_CHAR:le.textContent=this._workCell.getChars()||je.WHITESPACE_CELL_CHAR;var me=this._workCell.getFgColor(),ve=this._workCell.getFgColorMode(),Pe=this._workCell.getBgColor(),Ae=this._workCell.getBgColorMode(),De=!!this._workCell.isInverse();if(De){var Oe=me;me=Pe,Pe=Oe;var Ze=ve;ve=Ae,Ae=Ze}switch(ve){case 16777216:case 33554432:this._workCell.isBold()&&me<8&&this._optionsService.options.drawBoldTextInBrightColors&&(me+=8),this._applyMinimumContrast(le,this._colors.background,this._colors.ansi[me])||le.classList.add("xterm-fg-"+me);break;case 50331648:var qe=Ce.rgba.toColor(me>>16&255,me>>8&255,255&me);this._applyMinimumContrast(le,this._colors.background,qe)||this._addStyle(le,"color:#"+be(me.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(le,this._colors.background,this._colors.foreground)||De&&le.classList.add("xterm-fg-"+Se.INVERTED_DEFAULT_COLOR)}switch(Ae){case 16777216:case 33554432:le.classList.add("xterm-bg-"+Pe);break;case 50331648:this._addStyle(le,"background-color:#"+be(Pe.toString(16),"0",6));break;case 0:default:De&&le.classList.add("xterm-bg-"+Se.INVERTED_DEFAULT_COLOR)}z.appendChild(le)}}return z},ye.prototype._applyMinimumContrast=function(we,pe,de){if(this._optionsService.options.minimumContrastRatio===1)return!1;var ge=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return ge===void 0&&(ge=Ce.color.ensureContrastRatio(pe,de,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,ge!=null?ge:null)),!!ge&&(this._addStyle(we,"color:"+ge.css),!0)},ye.prototype._addStyle=function(we,pe){we.setAttribute("style",""+(we.getAttribute("style")||"")+pe+";")},ye}();function be(ye,we,pe){for(;ye.length<pe;)ye=we+ye;return ye}Ie.DomRendererRowFactory=xe},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.evaluateKeyboardEvent=void 0;var Se=Le(12),je={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};Ie.evaluateKeyboardEvent=function(Me,Ce,xe,be){var ye={type:0,cancel:!1,key:void 0},we=(Me.shiftKey?1:0)|(Me.altKey?2:0)|(Me.ctrlKey?4:0)|(Me.metaKey?8:0);switch(Me.keyCode){case 0:Me.key==="UIKeyInputUpArrow"?ye.key=Ce?Se.C0.ESC+"OA":Se.C0.ESC+"[A":Me.key==="UIKeyInputLeftArrow"?ye.key=Ce?Se.C0.ESC+"OD":Se.C0.ESC+"[D":Me.key==="UIKeyInputRightArrow"?ye.key=Ce?Se.C0.ESC+"OC":Se.C0.ESC+"[C":Me.key==="UIKeyInputDownArrow"&&(ye.key=Ce?Se.C0.ESC+"OB":Se.C0.ESC+"[B");break;case 8:if(Me.shiftKey){ye.key=Se.C0.BS;break}if(Me.altKey){ye.key=Se.C0.ESC+Se.C0.DEL;break}ye.key=Se.C0.DEL;break;case 9:if(Me.shiftKey){ye.key=Se.C0.ESC+"[Z";break}ye.key=Se.C0.HT,ye.cancel=!0;break;case 13:ye.key=Me.altKey?Se.C0.ESC+Se.C0.CR:Se.C0.CR,ye.cancel=!0;break;case 27:ye.key=Se.C0.ESC,Me.altKey&&(ye.key=Se.C0.ESC+Se.C0.ESC),ye.cancel=!0;break;case 37:if(Me.metaKey)break;we?(ye.key=Se.C0.ESC+"[1;"+(we+1)+"D",ye.key===Se.C0.ESC+"[1;3D"&&(ye.key=Se.C0.ESC+(xe?"b":"[1;5D"))):ye.key=Ce?Se.C0.ESC+"OD":Se.C0.ESC+"[D";break;case 39:if(Me.metaKey)break;we?(ye.key=Se.C0.ESC+"[1;"+(we+1)+"C",ye.key===Se.C0.ESC+"[1;3C"&&(ye.key=Se.C0.ESC+(xe?"f":"[1;5C"))):ye.key=Ce?Se.C0.ESC+"OC":Se.C0.ESC+"[C";break;case 38:if(Me.metaKey)break;we?(ye.key=Se.C0.ESC+"[1;"+(we+1)+"A",xe||ye.key!==Se.C0.ESC+"[1;3A"||(ye.key=Se.C0.ESC+"[1;5A")):ye.key=Ce?Se.C0.ESC+"OA":Se.C0.ESC+"[A";break;case 40:if(Me.metaKey)break;we?(ye.key=Se.C0.ESC+"[1;"+(we+1)+"B",xe||ye.key!==Se.C0.ESC+"[1;3B"||(ye.key=Se.C0.ESC+"[1;5B")):ye.key=Ce?Se.C0.ESC+"OB":Se.C0.ESC+"[B";break;case 45:Me.shiftKey||Me.ctrlKey||(ye.key=Se.C0.ESC+"[2~");break;case 46:ye.key=we?Se.C0.ESC+"[3;"+(we+1)+"~":Se.C0.ESC+"[3~";break;case 36:ye.key=we?Se.C0.ESC+"[1;"+(we+1)+"H":Ce?Se.C0.ESC+"OH":Se.C0.ESC+"[H";break;case 35:ye.key=we?Se.C0.ESC+"[1;"+(we+1)+"F":Ce?Se.C0.ESC+"OF":Se.C0.ESC+"[F";break;case 33:Me.shiftKey?ye.type=2:ye.key=Se.C0.ESC+"[5~";break;case 34:Me.shiftKey?ye.type=3:ye.key=Se.C0.ESC+"[6~";break;case 112:ye.key=we?Se.C0.ESC+"[1;"+(we+1)+"P":Se.C0.ESC+"OP";break;case 113:ye.key=we?Se.C0.ESC+"[1;"+(we+1)+"Q":Se.C0.ESC+"OQ";break;case 114:ye.key=we?Se.C0.ESC+"[1;"+(we+1)+"R":Se.C0.ESC+"OR";break;case 115:ye.key=we?Se.C0.ESC+"[1;"+(we+1)+"S":Se.C0.ESC+"OS";break;case 116:ye.key=we?Se.C0.ESC+"[15;"+(we+1)+"~":Se.C0.ESC+"[15~";break;case 117:ye.key=we?Se.C0.ESC+"[17;"+(we+1)+"~":Se.C0.ESC+"[17~";break;case 118:ye.key=we?Se.C0.ESC+"[18;"+(we+1)+"~":Se.C0.ESC+"[18~";break;case 119:ye.key=we?Se.C0.ESC+"[19;"+(we+1)+"~":Se.C0.ESC+"[19~";break;case 120:ye.key=we?Se.C0.ESC+"[20;"+(we+1)+"~":Se.C0.ESC+"[20~";break;case 121:ye.key=we?Se.C0.ESC+"[21;"+(we+1)+"~":Se.C0.ESC+"[21~";break;case 122:ye.key=we?Se.C0.ESC+"[23;"+(we+1)+"~":Se.C0.ESC+"[23~";break;case 123:ye.key=we?Se.C0.ESC+"[24;"+(we+1)+"~":Se.C0.ESC+"[24~";break;default:if(!Me.ctrlKey||Me.shiftKey||Me.altKey||Me.metaKey)if(xe&&!be||!Me.altKey||Me.metaKey)xe&&!Me.altKey&&!Me.ctrlKey&&Me.metaKey?Me.keyCode===65&&(ye.type=1):Me.key&&!Me.ctrlKey&&!Me.altKey&&!Me.metaKey&&Me.keyCode>=48&&Me.key.length===1?ye.key=Me.key:Me.key&&Me.ctrlKey&&Me.key==="_"&&(ye.key=Se.C0.US);else{var pe=je[Me.keyCode],de=pe&&pe[Me.shiftKey?1:0];if(de)ye.key=Se.C0.ESC+de;else if(Me.keyCode>=65&&Me.keyCode<=90){var ge=Me.ctrlKey?Me.keyCode-64:Me.keyCode+32;ye.key=Se.C0.ESC+String.fromCharCode(ge)}}else Me.keyCode>=65&&Me.keyCode<=90?ye.key=String.fromCharCode(Me.keyCode-64):Me.keyCode===32?ye.key=Se.C0.NUL:Me.keyCode>=51&&Me.keyCode<=55?ye.key=String.fromCharCode(Me.keyCode-51+27):Me.keyCode===56?ye.key=Se.C0.DEL:Me.keyCode===219?ye.key=Se.C0.ESC:Me.keyCode===220?ye.key=Se.C0.FS:Me.keyCode===221&&(ye.key=Se.C0.GS)}return ye}},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(ue,ee){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,oe){z.__proto__=oe}||function(z,oe){for(var re in oe)oe.hasOwnProperty(re)&&(z[re]=oe[re])})(ue,ee)},function(ue,ee){function z(){this.constructor=ue}Se(ue,ee),ue.prototype=ee===null?Object.create(ee):(z.prototype=ee.prototype,new z)}),Me=this&&this.__decorate||function(ue,ee,z,oe){var re,ae=arguments.length,le=ae<3?ee:oe===null?oe=Object.getOwnPropertyDescriptor(ee,z):oe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")le=Reflect.decorate(ue,ee,z,oe);else for(var me=ue.length-1;me>=0;me--)(re=ue[me])&&(le=(ae<3?re(le):ae>3?re(ee,z,le):re(ee,z))||le);return ae>3&&le&&Object.defineProperty(ee,z,le),le},Ce=this&&this.__param||function(ue,ee){return function(z,oe){ee(z,oe,ue)}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.RenderService=void 0;var xe=Le(31),be=Le(0),ye=Le(2),we=Le(32),pe=Le(7),de=Le(1),ge=Le(5),fe=function(ue){function ee(z,oe,re,ae,le,me){var ve=ue.call(this)||this;if(ve._renderer=z,ve._rowCount=oe,ve._isPaused=!1,ve._needsFullRefresh=!1,ve._isNextRenderRedrawOnly=!0,ve._needsSelectionRefresh=!1,ve._canvasWidth=0,ve._canvasHeight=0,ve._selectionState={start:void 0,end:void 0,columnSelectMode:!1},ve._onDimensionsChange=new be.EventEmitter,ve._onRender=new be.EventEmitter,ve._onRefreshRequest=new be.EventEmitter,ve.register({dispose:function(){return ve._renderer.dispose()}}),ve._renderDebouncer=new xe.RenderDebouncer(function(Ae,De){return ve._renderRows(Ae,De)}),ve.register(ve._renderDebouncer),ve._screenDprMonitor=new we.ScreenDprMonitor,ve._screenDprMonitor.setListener(function(){return ve.onDevicePixelRatioChange()}),ve.register(ve._screenDprMonitor),ve.register(me.onResize(function(Ae){return ve._fullRefresh()})),ve.register(ae.onOptionChange(function(){return ve._renderer.onOptionsChanged()})),ve.register(le.onCharSizeChange(function(){return ve.onCharSizeChanged()})),ve._renderer.onRequestRedraw(function(Ae){return ve.refreshRows(Ae.start,Ae.end,!0)}),ve.register(pe.addDisposableDomListener(window,"resize",function(){return ve.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var Pe=new IntersectionObserver(function(Ae){return ve._onIntersectionChange(Ae[Ae.length-1])},{threshold:0});Pe.observe(re),ve.register({dispose:function(){return Pe.disconnect()}})}return ve}return je(ee,ue),Object.defineProperty(ee.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),ee.prototype._onIntersectionChange=function(z){this._isPaused=z.intersectionRatio===0,!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},ee.prototype.refreshRows=function(z,oe,re){re===void 0&&(re=!1),this._isPaused?this._needsFullRefresh=!0:(re||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(z,oe,this._rowCount))},ee.prototype._renderRows=function(z,oe){this._renderer.renderRows(z,oe),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:z,end:oe}),this._isNextRenderRedrawOnly=!0},ee.prototype.resize=function(z,oe){this._rowCount=oe,this._fireOnCanvasResize()},ee.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},ee.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},ee.prototype.dispose=function(){ue.prototype.dispose.call(this)},ee.prototype.setRenderer=function(z){var oe=this;this._renderer.dispose(),this._renderer=z,this._renderer.onRequestRedraw(function(re){return oe.refreshRows(re.start,re.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},ee.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},ee.prototype.setColors=function(z){this._renderer.setColors(z),this._fullRefresh()},ee.prototype.onDevicePixelRatioChange=function(){this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},ee.prototype.onResize=function(z,oe){this._renderer.onResize(z,oe),this._fullRefresh()},ee.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},ee.prototype.onBlur=function(){this._renderer.onBlur()},ee.prototype.onFocus=function(){this._renderer.onFocus()},ee.prototype.onSelectionChanged=function(z,oe,re){this._selectionState.start=z,this._selectionState.end=oe,this._selectionState.columnSelectMode=re,this._renderer.onSelectionChanged(z,oe,re)},ee.prototype.onCursorMove=function(){this._renderer.onCursorMove()},ee.prototype.clear=function(){this._renderer.clear()},ee.prototype.registerCharacterJoiner=function(z){return this._renderer.registerCharacterJoiner(z)},ee.prototype.deregisterCharacterJoiner=function(z){return this._renderer.deregisterCharacterJoiner(z)},ee=Me([Ce(3,de.IOptionsService),Ce(4,ge.ICharSizeService),Ce(5,de.IBufferService)],ee)}(ye.Disposable);Ie.RenderService=fe},function(ln,Ie,Le){"use strict";var Se=this&&this.__decorate||function(ye,we,pe,de){var ge,fe=arguments.length,ue=fe<3?we:de===null?de=Object.getOwnPropertyDescriptor(we,pe):de;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ue=Reflect.decorate(ye,we,pe,de);else for(var ee=ye.length-1;ee>=0;ee--)(ge=ye[ee])&&(ue=(fe<3?ge(ue):fe>3?ge(we,pe,ue):ge(we,pe))||ue);return fe>3&&ue&&Object.defineProperty(we,pe,ue),ue},je=this&&this.__param||function(ye,we){return function(pe,de){we(pe,de,ye)}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.CharSizeService=void 0;var Me=Le(1),Ce=Le(0),xe=function(){function ye(we,pe,de){this._optionsService=de,this.width=0,this.height=0,this._onCharSizeChange=new Ce.EventEmitter,this._measureStrategy=new be(we,pe,this._optionsService)}return Object.defineProperty(ye.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),ye.prototype.measure=function(){var we=this._measureStrategy.measure();we.width===this.width&&we.height===this.height||(this.width=we.width,this.height=we.height,this._onCharSizeChange.fire())},ye=Se([je(2,Me.IOptionsService)],ye)}();Ie.CharSizeService=xe;var be=function(){function ye(we,pe,de){this._document=we,this._parentElement=pe,this._optionsService=de,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return ye.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var we=this._measureElement.getBoundingClientRect();return we.width!==0&&we.height!==0&&(this._result.width=we.width,this._result.height=Math.ceil(we.height)),this._result},ye}()},function(ln,Ie,Le){"use strict";var Se=this&&this.__decorate||function(be,ye,we,pe){var de,ge=arguments.length,fe=ge<3?ye:pe===null?pe=Object.getOwnPropertyDescriptor(ye,we):pe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")fe=Reflect.decorate(be,ye,we,pe);else for(var ue=be.length-1;ue>=0;ue--)(de=be[ue])&&(fe=(ge<3?de(fe):ge>3?de(ye,we,fe):de(ye,we))||fe);return ge>3&&fe&&Object.defineProperty(ye,we,fe),fe},je=this&&this.__param||function(be,ye){return function(we,pe){ye(we,pe,be)}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.MouseService=void 0;var Me=Le(5),Ce=Le(30),xe=function(){function be(ye,we){this._renderService=ye,this._charSizeService=we}return be.prototype.getCoords=function(ye,we,pe,de,ge){return Ce.getCoords(ye,we,pe,de,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,ge)},be.prototype.getRawByteCoords=function(ye,we,pe,de){var ge=this.getCoords(ye,we,pe,de);return Ce.getRawByteCoords(ge)},be=Se([je(0,Me.IRenderService),je(1,Me.ICharSizeService)],be)}();Ie.MouseService=xe},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(de,ge){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,ue){fe.__proto__=ue}||function(fe,ue){for(var ee in ue)ue.hasOwnProperty(ee)&&(fe[ee]=ue[ee])})(de,ge)},function(de,ge){function fe(){this.constructor=de}Se(de,ge),de.prototype=ge===null?Object.create(ge):(fe.prototype=ge.prototype,new fe)}),Me=this&&this.__decorate||function(de,ge,fe,ue){var ee,z=arguments.length,oe=z<3?ge:ue===null?ue=Object.getOwnPropertyDescriptor(ge,fe):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(de,ge,fe,ue);else for(var re=de.length-1;re>=0;re--)(ee=de[re])&&(oe=(z<3?ee(oe):z>3?ee(ge,fe,oe):ee(ge,fe))||oe);return z>3&&oe&&Object.defineProperty(ge,fe,oe),oe},Ce=this&&this.__param||function(de,ge){return function(fe,ue){ge(fe,ue,de)}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.Linkifier2=void 0;var xe=Le(1),be=Le(0),ye=Le(2),we=Le(7),pe=function(de){function ge(fe){var ue=de.call(this)||this;return ue._bufferService=fe,ue._linkProviders=[],ue._linkCacheDisposables=[],ue._isMouseOut=!0,ue._activeLine=-1,ue._onShowLinkUnderline=ue.register(new be.EventEmitter),ue._onHideLinkUnderline=ue.register(new be.EventEmitter),ue.register(ye.getDisposeArrayDisposable(ue._linkCacheDisposables)),ue}return je(ge,de),Object.defineProperty(ge.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),ge.prototype.registerLinkProvider=function(fe){var ue=this;return this._linkProviders.push(fe),{dispose:function(){var ee=ue._linkProviders.indexOf(fe);ee!==-1&&ue._linkProviders.splice(ee,1)}}},ge.prototype.attachToDom=function(fe,ue,ee){var z=this;this._element=fe,this._mouseService=ue,this._renderService=ee,this.register(we.addDisposableDomListener(this._element,"mouseleave",function(){z._isMouseOut=!0,z._clearCurrentLink()})),this.register(we.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(we.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},ge.prototype._onMouseMove=function(fe){if(this._lastMouseEvent=fe,this._element&&this._mouseService){var ue=this._positionFromMouseEvent(fe,this._element,this._mouseService);if(ue){this._isMouseOut=!1;for(var ee=fe.composedPath(),z=0;z<ee.length;z++){var oe=ee[z];if(oe.classList.contains("xterm"))break;if(oe.classList.contains("xterm-hover"))return}this._lastBufferCell&&ue.x===this._lastBufferCell.x&&ue.y===this._lastBufferCell.y||(this._onHover(ue),this._lastBufferCell=ue)}}},ge.prototype._onHover=function(fe){if(this._activeLine!==fe.y)return this._clearCurrentLink(),void this._askForLink(fe,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,fe)||(this._clearCurrentLink(),this._askForLink(fe,!0))},ge.prototype._askForLink=function(fe,ue){var ee=this;this._activeProviderReplies&&ue||(this._activeProviderReplies=new Map,this._activeLine=fe.y);var z=!1;this._linkProviders.forEach(function(oe,re){var ae;ue?!((ae=ee._activeProviderReplies)===null||ae===void 0)&&ae.get(re)&&(z=ee._checkLinkProviderResult(re,fe,z)):oe.provideLinks(fe.y,function(le){var me,ve;if(!ee._isMouseOut){var Pe=le==null?void 0:le.map(function(Ae){return{link:Ae}});(me=ee._activeProviderReplies)===null||me===void 0||me.set(re,Pe),z=ee._checkLinkProviderResult(re,fe,z),((ve=ee._activeProviderReplies)===null||ve===void 0?void 0:ve.size)===ee._linkProviders.length&&ee._removeIntersectingLinks(fe.y,ee._activeProviderReplies)}})})},ge.prototype._removeIntersectingLinks=function(fe,ue){for(var ee=new Set,z=0;z<ue.size;z++){var oe=ue.get(z);if(oe)for(var re=0;re<oe.length;re++)for(var ae=oe[re],le=ae.link.range.start.y<fe?0:ae.link.range.start.x,me=ae.link.range.end.y>fe?this._bufferService.cols:ae.link.range.end.x,ve=le;ve<=me;ve++){if(ee.has(ve)){oe.splice(re--,1);break}ee.add(ve)}}},ge.prototype._checkLinkProviderResult=function(fe,ue,ee){var z,oe=this;if(!this._activeProviderReplies)return ee;for(var re=this._activeProviderReplies.get(fe),ae=!1,le=0;le<fe;le++)this._activeProviderReplies.has(le)&&!this._activeProviderReplies.get(le)||(ae=!0);if(!ae&&re){var me=re.find(function(Pe){return oe._linkAtPosition(Pe.link,ue)});me&&(ee=!0,this._handleNewLink(me))}if(this._activeProviderReplies.size===this._linkProviders.length&&!ee)for(le=0;le<this._activeProviderReplies.size;le++){var ve=(z=this._activeProviderReplies.get(le))===null||z===void 0?void 0:z.find(function(Pe){return oe._linkAtPosition(Pe.link,ue)});if(ve){ee=!0,this._handleNewLink(ve);break}}return ee},ge.prototype._onClick=function(fe){if(this._element&&this._mouseService&&this._currentLink){var ue=this._positionFromMouseEvent(fe,this._element,this._mouseService);ue&&this._linkAtPosition(this._currentLink.link,ue)&&this._currentLink.link.activate(fe,this._currentLink.link.text)}},ge.prototype._clearCurrentLink=function(fe,ue){this._element&&this._currentLink&&this._lastMouseEvent&&(!fe||!ue||this._currentLink.link.range.start.y>=fe&&this._currentLink.link.range.end.y<=ue)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,ye.disposeArray(this._linkCacheDisposables))},ge.prototype._handleNewLink=function(fe){var ue=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var ee=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);ee&&this._linkAtPosition(fe.link,ee)&&(this._currentLink=fe,this._currentLink.state={decorations:{underline:fe.link.decorations===void 0||fe.link.decorations.underline,pointerCursor:fe.link.decorations===void 0||fe.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,fe.link,this._lastMouseEvent),fe.link.decorations={},Object.defineProperties(fe.link.decorations,{pointerCursor:{get:function(){var z,oe;return(oe=(z=ue._currentLink)===null||z===void 0?void 0:z.state)===null||oe===void 0?void 0:oe.decorations.pointerCursor},set:function(z){var oe,re;!((oe=ue._currentLink)===null||oe===void 0)&&oe.state&&ue._currentLink.state.decorations.pointerCursor!==z&&(ue._currentLink.state.decorations.pointerCursor=z,ue._currentLink.state.isHovered&&((re=ue._element)===null||re===void 0||re.classList.toggle("xterm-cursor-pointer",z)))}},underline:{get:function(){var z,oe;return(oe=(z=ue._currentLink)===null||z===void 0?void 0:z.state)===null||oe===void 0?void 0:oe.decorations.underline},set:function(z){var oe,re,ae;!((oe=ue._currentLink)===null||oe===void 0)&&oe.state&&((ae=(re=ue._currentLink)===null||re===void 0?void 0:re.state)===null||ae===void 0?void 0:ae.decorations.underline)!==z&&(ue._currentLink.state.decorations.underline=z,ue._currentLink.state.isHovered&&ue._fireUnderlineEvent(fe.link,z))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(z){var oe=z.start===0?0:z.start+1+ue._bufferService.buffer.ydisp;ue._clearCurrentLink(oe,z.end+1+ue._bufferService.buffer.ydisp)})))}},ge.prototype._linkHover=function(fe,ue,ee){var z;!((z=this._currentLink)===null||z===void 0)&&z.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(ue,!0),this._currentLink.state.decorations.pointerCursor&&fe.classList.add("xterm-cursor-pointer")),ue.hover&&ue.hover(ee,ue.text)},ge.prototype._fireUnderlineEvent=function(fe,ue){var ee=fe.range,z=this._bufferService.buffer.ydisp,oe=this._createLinkUnderlineEvent(ee.start.x-1,ee.start.y-z-1,ee.end.x,ee.end.y-z-1,void 0);(ue?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(oe)},ge.prototype._linkLeave=function(fe,ue,ee){var z;!((z=this._currentLink)===null||z===void 0)&&z.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(ue,!1),this._currentLink.state.decorations.pointerCursor&&fe.classList.remove("xterm-cursor-pointer")),ue.leave&&ue.leave(ee,ue.text)},ge.prototype._linkAtPosition=function(fe,ue){var ee=fe.range.start.y===fe.range.end.y,z=fe.range.start.y<ue.y,oe=fe.range.end.y>ue.y;return(ee&&fe.range.start.x<=ue.x&&fe.range.end.x>=ue.x||z&&fe.range.end.x>=ue.x||oe&&fe.range.start.x<=ue.x||z&&oe)&&fe.range.start.y<=ue.y&&fe.range.end.y>=ue.y},ge.prototype._positionFromMouseEvent=function(fe,ue,ee){var z=ee.getCoords(fe,ue,this._bufferService.cols,this._bufferService.rows);if(z)return{x:z[0],y:z[1]+this._bufferService.buffer.ydisp}},ge.prototype._createLinkUnderlineEvent=function(fe,ue,ee,z,oe){return{x1:fe,y1:ue,x2:ee,y2:z,cols:this._bufferService.cols,fg:oe}},ge=Me([Ce(0,xe.IBufferService)],ge)}(ye.Disposable);Ie.Linkifier2=pe},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.CoreBrowserService=void 0;var Se=function(){function je(Me){this._textarea=Me}return Object.defineProperty(je.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),je}();Ie.CoreBrowserService=Se},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(le,me){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ve,Pe){ve.__proto__=Pe}||function(ve,Pe){for(var Ae in Pe)Pe.hasOwnProperty(Ae)&&(ve[Ae]=Pe[Ae])})(le,me)},function(le,me){function ve(){this.constructor=le}Se(le,me),le.prototype=me===null?Object.create(me):(ve.prototype=me.prototype,new ve)});Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.CoreTerminal=void 0;var Me=Le(2),Ce=Le(1),xe=Le(66),be=Le(67),ye=Le(68),we=Le(74),pe=Le(75),de=Le(0),ge=Le(76),fe=Le(77),ue=Le(78),ee=Le(80),z=Le(81),oe=Le(19),re=Le(82),ae=function(le){function me(ve){var Pe=le.call(this)||this;return Pe._onBinary=new de.EventEmitter,Pe._onData=new de.EventEmitter,Pe._onLineFeed=new de.EventEmitter,Pe._onResize=new de.EventEmitter,Pe._onScroll=new de.EventEmitter,Pe._instantiationService=new xe.InstantiationService,Pe.optionsService=new we.OptionsService(ve),Pe._instantiationService.setService(Ce.IOptionsService,Pe.optionsService),Pe._bufferService=Pe.register(Pe._instantiationService.createInstance(ye.BufferService)),Pe._instantiationService.setService(Ce.IBufferService,Pe._bufferService),Pe._logService=Pe._instantiationService.createInstance(be.LogService),Pe._instantiationService.setService(Ce.ILogService,Pe._logService),Pe._coreService=Pe.register(Pe._instantiationService.createInstance(pe.CoreService,function(){return Pe.scrollToBottom()})),Pe._instantiationService.setService(Ce.ICoreService,Pe._coreService),Pe._coreMouseService=Pe._instantiationService.createInstance(ge.CoreMouseService),Pe._instantiationService.setService(Ce.ICoreMouseService,Pe._coreMouseService),Pe._dirtyRowService=Pe._instantiationService.createInstance(fe.DirtyRowService),Pe._instantiationService.setService(Ce.IDirtyRowService,Pe._dirtyRowService),Pe.unicodeService=Pe._instantiationService.createInstance(ue.UnicodeService),Pe._instantiationService.setService(Ce.IUnicodeService,Pe.unicodeService),Pe._charsetService=Pe._instantiationService.createInstance(ee.CharsetService),Pe._instantiationService.setService(Ce.ICharsetService,Pe._charsetService),Pe._inputHandler=new oe.InputHandler(Pe._bufferService,Pe._charsetService,Pe._coreService,Pe._dirtyRowService,Pe._logService,Pe.optionsService,Pe._coreMouseService,Pe.unicodeService),Pe.register(de.forwardEvent(Pe._inputHandler.onLineFeed,Pe._onLineFeed)),Pe.register(Pe._inputHandler),Pe.register(de.forwardEvent(Pe._bufferService.onResize,Pe._onResize)),Pe.register(de.forwardEvent(Pe._coreService.onData,Pe._onData)),Pe.register(de.forwardEvent(Pe._coreService.onBinary,Pe._onBinary)),Pe.register(Pe.optionsService.onOptionChange(function(Ae){return Pe._updateOptions(Ae)})),Pe._writeBuffer=new re.WriteBuffer(function(Ae){return Pe._inputHandler.parse(Ae)}),Pe}return je(me,le),Object.defineProperty(me.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),me.prototype.dispose=function(){var ve;this._isDisposed||(le.prototype.dispose.call(this),(ve=this._windowsMode)===null||ve===void 0||ve.dispose(),this._windowsMode=void 0)},me.prototype.write=function(ve,Pe){this._writeBuffer.write(ve,Pe)},me.prototype.writeSync=function(ve){this._writeBuffer.writeSync(ve)},me.prototype.resize=function(ve,Pe){isNaN(ve)||isNaN(Pe)||(ve=Math.max(ve,ye.MINIMUM_COLS),Pe=Math.max(Pe,ye.MINIMUM_ROWS),this._bufferService.resize(ve,Pe))},me.prototype.scroll=function(ve,Pe){Pe===void 0&&(Pe=!1);var Ae,De=this._bufferService.buffer;(Ae=this._cachedBlankLine)&&Ae.length===this.cols&&Ae.getFg(0)===ve.fg&&Ae.getBg(0)===ve.bg||(Ae=De.getBlankLine(ve,Pe),this._cachedBlankLine=Ae),Ae.isWrapped=Pe;var Oe=De.ybase+De.scrollTop,Ze=De.ybase+De.scrollBottom;if(De.scrollTop===0){var qe=De.lines.isFull;Ze===De.lines.length-1?qe?De.lines.recycle().copyFrom(Ae):De.lines.push(Ae.clone()):De.lines.splice(Ze+1,0,Ae.clone()),qe?this._bufferService.isUserScrolling&&(De.ydisp=Math.max(De.ydisp-1,0)):(De.ybase++,this._bufferService.isUserScrolling||De.ydisp++)}else{var Xe=Ze-Oe+1;De.lines.shiftElements(Oe+1,Xe-1,-1),De.lines.set(Ze,Ae.clone())}this._bufferService.isUserScrolling||(De.ydisp=De.ybase),this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom),this._onScroll.fire(De.ydisp)},me.prototype.scrollLines=function(ve,Pe){var Ae=this._bufferService.buffer;if(ve<0){if(Ae.ydisp===0)return;this._bufferService.isUserScrolling=!0}else ve+Ae.ydisp>=Ae.ybase&&(this._bufferService.isUserScrolling=!1);var De=Ae.ydisp;Ae.ydisp=Math.max(Math.min(Ae.ydisp+ve,Ae.ybase),0),De!==Ae.ydisp&&(Pe||this._onScroll.fire(Ae.ydisp))},me.prototype.scrollPages=function(ve){this.scrollLines(ve*(this.rows-1))},me.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},me.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},me.prototype.scrollToLine=function(ve){var Pe=ve-this._bufferService.buffer.ydisp;Pe!==0&&this.scrollLines(Pe)},me.prototype.addEscHandler=function(ve,Pe){return this._inputHandler.addEscHandler(ve,Pe)},me.prototype.addDcsHandler=function(ve,Pe){return this._inputHandler.addDcsHandler(ve,Pe)},me.prototype.addCsiHandler=function(ve,Pe){return this._inputHandler.addCsiHandler(ve,Pe)},me.prototype.addOscHandler=function(ve,Pe){return this._inputHandler.addOscHandler(ve,Pe)},me.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},me.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},me.prototype._updateOptions=function(ve){var Pe;switch(ve){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((Pe=this._windowsMode)===null||Pe===void 0||Pe.dispose(),this._windowsMode=void 0)}},me.prototype._enableWindowsMode=function(){var ve=this;if(!this._windowsMode){var Pe=[];Pe.push(this.onLineFeed(z.updateWindowsModeWrappedState.bind(null,this._bufferService))),Pe.push(this.addCsiHandler({final:"H"},function(){return z.updateWindowsModeWrappedState(ve._bufferService),!1})),this._windowsMode={dispose:function(){for(var Ae=0,De=Pe;Ae<De.length;Ae++)De[Ae].dispose()}}}},me}(Me.Disposable);Ie.CoreTerminal=ae},function(ln,Ie,Le){"use strict";var Se=this&&this.__spreadArrays||function(){for(var be=0,ye=0,we=arguments.length;ye<we;ye++)be+=arguments[ye].length;var pe=Array(be),de=0;for(ye=0;ye<we;ye++)for(var ge=arguments[ye],fe=0,ue=ge.length;fe<ue;fe++,de++)pe[de]=ge[fe];return pe};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.InstantiationService=Ie.ServiceCollection=void 0;var je=Le(1),Me=Le(14),Ce=function(){function be(){for(var ye=[],we=0;we<arguments.length;we++)ye[we]=arguments[we];this._entries=new Map;for(var pe=0,de=ye;pe<de.length;pe++){var ge=de[pe],fe=ge[0],ue=ge[1];this.set(fe,ue)}}return be.prototype.set=function(ye,we){var pe=this._entries.get(ye);return this._entries.set(ye,we),pe},be.prototype.forEach=function(ye){this._entries.forEach(function(we,pe){return ye(pe,we)})},be.prototype.has=function(ye){return this._entries.has(ye)},be.prototype.get=function(ye){return this._entries.get(ye)},be}();Ie.ServiceCollection=Ce;var xe=function(){function be(){this._services=new Ce,this._services.set(je.IInstantiationService,this)}return be.prototype.setService=function(ye,we){this._services.set(ye,we)},be.prototype.getService=function(ye){return this._services.get(ye)},be.prototype.createInstance=function(ye){for(var we=[],pe=1;pe<arguments.length;pe++)we[pe-1]=arguments[pe];for(var de=Me.getServiceDependencies(ye).sort(function(re,ae){return re.index-ae.index}),ge=[],fe=0,ue=de;fe<ue.length;fe++){var ee=ue[fe],z=this._services.get(ee.id);if(!z)throw new Error("[createInstance] "+ye.name+" depends on UNKNOWN service "+ee.id+".");ge.push(z)}var oe=de.length>0?de[0].index:we.length;if(we.length!==oe)throw new Error("[createInstance] First service dependency of "+ye.name+" at position "+(oe+1)+" conflicts with "+we.length+" static arguments");return new(ye.bind.apply(ye,Se([void 0],Se(we,ge))))},be}();Ie.InstantiationService=xe},function(ln,Ie,Le){"use strict";var Se=this&&this.__decorate||function(we,pe,de,ge){var fe,ue=arguments.length,ee=ue<3?pe:ge===null?ge=Object.getOwnPropertyDescriptor(pe,de):ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ee=Reflect.decorate(we,pe,de,ge);else for(var z=we.length-1;z>=0;z--)(fe=we[z])&&(ee=(ue<3?fe(ee):ue>3?fe(pe,de,ee):fe(pe,de))||ee);return ue>3&&ee&&Object.defineProperty(pe,de,ee),ee},je=this&&this.__param||function(we,pe){return function(de,ge){pe(de,ge,we)}},Me=this&&this.__spreadArrays||function(){for(var we=0,pe=0,de=arguments.length;pe<de;pe++)we+=arguments[pe].length;var ge=Array(we),fe=0;for(pe=0;pe<de;pe++)for(var ue=arguments[pe],ee=0,z=ue.length;ee<z;ee++,fe++)ge[fe]=ue[ee];return ge};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.LogService=Ie.LogLevel=void 0;var Ce,xe=Le(1);(function(we){we[we.DEBUG=0]="DEBUG",we[we.INFO=1]="INFO",we[we.WARN=2]="WARN",we[we.ERROR=3]="ERROR",we[we.OFF=4]="OFF"})(Ce=Ie.LogLevel||(Ie.LogLevel={}));var be={debug:Ce.DEBUG,info:Ce.INFO,warn:Ce.WARN,error:Ce.ERROR,off:Ce.OFF},ye=function(){function we(pe){var de=this;this._optionsService=pe,this._updateLogLevel(),this._optionsService.onOptionChange(function(ge){ge==="logLevel"&&de._updateLogLevel()})}return we.prototype._updateLogLevel=function(){this._logLevel=be[this._optionsService.options.logLevel]},we.prototype._evalLazyOptionalParams=function(pe){for(var de=0;de<pe.length;de++)typeof pe[de]=="function"&&(pe[de]=pe[de]())},we.prototype._log=function(pe,de,ge){this._evalLazyOptionalParams(ge),pe.call.apply(pe,Me([console,"xterm.js: "+de],ge))},we.prototype.debug=function(pe){for(var de=[],ge=1;ge<arguments.length;ge++)de[ge-1]=arguments[ge];this._logLevel<=Ce.DEBUG&&this._log(console.log,pe,de)},we.prototype.info=function(pe){for(var de=[],ge=1;ge<arguments.length;ge++)de[ge-1]=arguments[ge];this._logLevel<=Ce.INFO&&this._log(console.info,pe,de)},we.prototype.warn=function(pe){for(var de=[],ge=1;ge<arguments.length;ge++)de[ge-1]=arguments[ge];this._logLevel<=Ce.WARN&&this._log(console.warn,pe,de)},we.prototype.error=function(pe){for(var de=[],ge=1;ge<arguments.length;ge++)de[ge-1]=arguments[ge];this._logLevel<=Ce.ERROR&&this._log(console.error,pe,de)},we=Se([je(0,xe.IOptionsService)],we)}();Ie.LogService=ye},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(de,ge){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,ue){fe.__proto__=ue}||function(fe,ue){for(var ee in ue)ue.hasOwnProperty(ee)&&(fe[ee]=ue[ee])})(de,ge)},function(de,ge){function fe(){this.constructor=de}Se(de,ge),de.prototype=ge===null?Object.create(ge):(fe.prototype=ge.prototype,new fe)}),Me=this&&this.__decorate||function(de,ge,fe,ue){var ee,z=arguments.length,oe=z<3?ge:ue===null?ue=Object.getOwnPropertyDescriptor(ge,fe):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(de,ge,fe,ue);else for(var re=de.length-1;re>=0;re--)(ee=de[re])&&(oe=(z<3?ee(oe):z>3?ee(ge,fe,oe):ee(ge,fe))||oe);return z>3&&oe&&Object.defineProperty(ge,fe,oe),oe},Ce=this&&this.__param||function(de,ge){return function(fe,ue){ge(fe,ue,de)}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.BufferService=Ie.MINIMUM_ROWS=Ie.MINIMUM_COLS=void 0;var xe=Le(1),be=Le(69),ye=Le(0),we=Le(2);Ie.MINIMUM_COLS=2,Ie.MINIMUM_ROWS=1;var pe=function(de){function ge(fe){var ue=de.call(this)||this;return ue._optionsService=fe,ue.isUserScrolling=!1,ue._onResize=new ye.EventEmitter,ue.cols=Math.max(fe.options.cols,Ie.MINIMUM_COLS),ue.rows=Math.max(fe.options.rows,Ie.MINIMUM_ROWS),ue.buffers=new be.BufferSet(fe,ue),ue}return je(ge,de),Object.defineProperty(ge.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),ge.prototype.dispose=function(){de.prototype.dispose.call(this),this.buffers.dispose()},ge.prototype.resize=function(fe,ue){this.cols=fe,this.rows=ue,this.buffers.resize(fe,ue),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:fe,rows:ue})},ge.prototype.reset=function(){this.buffers.dispose(),this.buffers=new be.BufferSet(this._optionsService,this),this.isUserScrolling=!1},ge=Me([Ce(0,xe.IOptionsService)],ge)}(we.Disposable);Ie.BufferService=pe},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(be,ye){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(we,pe){we.__proto__=pe}||function(we,pe){for(var de in pe)pe.hasOwnProperty(de)&&(we[de]=pe[de])})(be,ye)},function(be,ye){function we(){this.constructor=be}Se(be,ye),be.prototype=ye===null?Object.create(ye):(we.prototype=ye.prototype,new we)});Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.BufferSet=void 0;var Me=Le(70),Ce=Le(0),xe=function(be){function ye(we,pe){var de=be.call(this)||this;return de._onBufferActivate=de.register(new Ce.EventEmitter),de._normal=new Me.Buffer(!0,we,pe),de._normal.fillViewportRows(),de._alt=new Me.Buffer(!1,we,pe),de._activeBuffer=de._normal,de.setupTabStops(),de}return je(ye,be),Object.defineProperty(ye.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),ye.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},ye.prototype.activateAltBuffer=function(we){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(we),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))},ye.prototype.resize=function(we,pe){this._normal.resize(we,pe),this._alt.resize(we,pe)},ye.prototype.setupTabStops=function(we){this._normal.setupTabStops(we),this._alt.setupTabStops(we)},ye}(Le(2).Disposable);Ie.BufferSet=xe},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.BufferStringIterator=Ie.Buffer=Ie.MAX_BUFFER_SIZE=void 0;var Se=Le(71),je=Le(16),Me=Le(4),Ce=Le(3),xe=Le(72),be=Le(73),ye=Le(20),we=Le(6);Ie.MAX_BUFFER_SIZE=4294967295;var pe=function(){function ge(fe,ue,ee){this._hasScrollback=fe,this._optionsService=ue,this._bufferService=ee,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=je.DEFAULT_ATTR_DATA.clone(),this.savedCharset=ye.DEFAULT_CHARSET,this.markers=[],this._nullCell=Me.CellData.fromCharData([0,Ce.NULL_CELL_CHAR,Ce.NULL_CELL_WIDTH,Ce.NULL_CELL_CODE]),this._whitespaceCell=Me.CellData.fromCharData([0,Ce.WHITESPACE_CELL_CHAR,Ce.WHITESPACE_CELL_WIDTH,Ce.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new Se.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return ge.prototype.getNullCell=function(fe){return fe?(this._nullCell.fg=fe.fg,this._nullCell.bg=fe.bg,this._nullCell.extended=fe.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new we.ExtendedAttrs),this._nullCell},ge.prototype.getWhitespaceCell=function(fe){return fe?(this._whitespaceCell.fg=fe.fg,this._whitespaceCell.bg=fe.bg,this._whitespaceCell.extended=fe.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new we.ExtendedAttrs),this._whitespaceCell},ge.prototype.getBlankLine=function(fe,ue){return new je.BufferLine(this._bufferService.cols,this.getNullCell(fe),ue)},Object.defineProperty(ge.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"isCursorInViewport",{get:function(){var fe=this.ybase+this.y-this.ydisp;return fe>=0&&fe<this._rows},enumerable:!1,configurable:!0}),ge.prototype._getCorrectBufferLength=function(fe){if(!this._hasScrollback)return fe;var ue=fe+this._optionsService.options.scrollback;return ue>Ie.MAX_BUFFER_SIZE?Ie.MAX_BUFFER_SIZE:ue},ge.prototype.fillViewportRows=function(fe){if(this.lines.length===0){fe===void 0&&(fe=je.DEFAULT_ATTR_DATA);for(var ue=this._rows;ue--;)this.lines.push(this.getBlankLine(fe))}},ge.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new Se.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},ge.prototype.resize=function(fe,ue){var ee=this.getNullCell(je.DEFAULT_ATTR_DATA),z=this._getCorrectBufferLength(ue);if(z>this.lines.maxLength&&(this.lines.maxLength=z),this.lines.length>0){if(this._cols<fe)for(var oe=0;oe<this.lines.length;oe++)this.lines.get(oe).resize(fe,ee);var re=0;if(this._rows<ue)for(var ae=this._rows;ae<ue;ae++)this.lines.length<ue+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new je.BufferLine(fe,ee)):this.ybase>0&&this.lines.length<=this.ybase+this.y+re+1?(this.ybase--,re++,this.ydisp>0&&this.ydisp--):this.lines.push(new je.BufferLine(fe,ee)));else for(ae=this._rows;ae>ue;ae--)this.lines.length>ue+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(z<this.lines.maxLength){var le=this.lines.length-z;le>0&&(this.lines.trimStart(le),this.ybase=Math.max(this.ybase-le,0),this.ydisp=Math.max(this.ydisp-le,0),this.savedY=Math.max(this.savedY-le,0)),this.lines.maxLength=z}this.x=Math.min(this.x,fe-1),this.y=Math.min(this.y,ue-1),re&&(this.y+=re),this.savedX=Math.min(this.savedX,fe-1),this.scrollTop=0}if(this.scrollBottom=ue-1,this._isReflowEnabled&&(this._reflow(fe,ue),this._cols>fe))for(oe=0;oe<this.lines.length;oe++)this.lines.get(oe).resize(fe,ee);this._cols=fe,this._rows=ue},Object.defineProperty(ge.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),ge.prototype._reflow=function(fe,ue){this._cols!==fe&&(fe>this._cols?this._reflowLarger(fe,ue):this._reflowSmaller(fe,ue))},ge.prototype._reflowLarger=function(fe,ue){var ee=xe.reflowLargerGetLinesToRemove(this.lines,this._cols,fe,this.ybase+this.y,this.getNullCell(je.DEFAULT_ATTR_DATA));if(ee.length>0){var z=xe.reflowLargerCreateNewLayout(this.lines,ee);xe.reflowLargerApplyNewLayout(this.lines,z.layout),this._reflowLargerAdjustViewport(fe,ue,z.countRemoved)}},ge.prototype._reflowLargerAdjustViewport=function(fe,ue,ee){for(var z=this.getNullCell(je.DEFAULT_ATTR_DATA),oe=ee;oe-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<ue&&this.lines.push(new je.BufferLine(fe,z))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-ee,0)},ge.prototype._reflowSmaller=function(fe,ue){for(var ee=this.getNullCell(je.DEFAULT_ATTR_DATA),z=[],oe=0,re=this.lines.length-1;re>=0;re--){var ae=this.lines.get(re);if(!(!ae||!ae.isWrapped&&ae.getTrimmedLength()<=fe)){for(var le=[ae];ae.isWrapped&&re>0;)ae=this.lines.get(--re),le.unshift(ae);var me=this.ybase+this.y;if(!(me>=re&&me<re+le.length)){var ve=le[le.length-1].getTrimmedLength(),Pe=xe.reflowSmallerGetNewLineLengths(le,this._cols,fe),Ae=Pe.length-le.length,De=void 0;De=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+Ae):Math.max(0,this.lines.length-this.lines.maxLength+Ae);for(var Oe=[],Ze=0;Ze<Ae;Ze++){var qe=this.getBlankLine(je.DEFAULT_ATTR_DATA,!0);Oe.push(qe)}Oe.length>0&&(z.push({start:re+le.length+oe,newLines:Oe}),oe+=Oe.length),le.push.apply(le,Oe);var Xe=Pe.length-1,mt=Pe[Xe];mt===0&&(mt=Pe[--Xe]);for(var pt=le.length-Ae-1,Mt=ve;pt>=0;){var at=Math.min(Mt,mt);if(le[Xe].copyCellsFrom(le[pt],Mt-at,mt-at,at,!0),(mt-=at)===0&&(mt=Pe[--Xe]),(Mt-=at)===0){pt--;var _t=Math.max(pt,0);Mt=xe.getWrappedLineTrimmedLength(le,_t,this._cols)}}for(Ze=0;Ze<le.length;Ze++)Pe[Ze]<fe&&le[Ze].setCell(Pe[Ze],ee);for(var dt=Ae-De;dt-- >0;)this.ybase===0?this.y<ue-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+oe)-ue&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+Ae,this.ybase+ue-1)}}}if(z.length>0){var Rt=[],ut=[];for(Ze=0;Ze<this.lines.length;Ze++)ut.push(this.lines.get(Ze));var rt=this.lines.length,ct=rt-1,yt=0,wt=z[yt];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+oe);var xt=0;for(Ze=Math.min(this.lines.maxLength-1,rt+oe-1);Ze>=0;Ze--)if(wt&&wt.start>ct+xt){for(var Ut=wt.newLines.length-1;Ut>=0;Ut--)this.lines.set(Ze--,wt.newLines[Ut]);Ze++,Rt.push({index:ct+1,amount:wt.newLines.length}),xt+=wt.newLines.length,wt=z[++yt]}else this.lines.set(Ze,ut[ct--]);var zt=0;for(Ze=Rt.length-1;Ze>=0;Ze--)Rt[Ze].index+=zt,this.lines.onInsertEmitter.fire(Rt[Ze]),zt+=Rt[Ze].amount;var dn=Math.max(0,rt+oe-this.lines.maxLength);dn>0&&this.lines.onTrimEmitter.fire(dn)}},ge.prototype.stringIndexToBufferIndex=function(fe,ue,ee){for(ee===void 0&&(ee=!1);ue;){var z=this.lines.get(fe);if(!z)return[-1,-1];for(var oe=ee?z.getTrimmedLength():z.length,re=0;re<oe;++re)if(z.get(re)[Ce.CHAR_DATA_WIDTH_INDEX]&&(ue-=z.get(re)[Ce.CHAR_DATA_CHAR_INDEX].length||1),ue<0)return[fe,re];fe++}return[fe,0]},ge.prototype.translateBufferLineToString=function(fe,ue,ee,z){ee===void 0&&(ee=0);var oe=this.lines.get(fe);return oe?oe.translateToString(ue,ee,z):""},ge.prototype.getWrappedRangeForLine=function(fe){for(var ue=fe,ee=fe;ue>0&&this.lines.get(ue).isWrapped;)ue--;for(;ee+1<this.lines.length&&this.lines.get(ee+1).isWrapped;)ee++;return{first:ue,last:ee}},ge.prototype.setupTabStops=function(fe){for(fe!=null?this.tabs[fe]||(fe=this.prevStop(fe)):(this.tabs={},fe=0);fe<this._cols;fe+=this._optionsService.options.tabStopWidth)this.tabs[fe]=!0},ge.prototype.prevStop=function(fe){for(fe==null&&(fe=this.x);!this.tabs[--fe]&&fe>0;);return fe>=this._cols?this._cols-1:fe<0?0:fe},ge.prototype.nextStop=function(fe){for(fe==null&&(fe=this.x);!this.tabs[++fe]&&fe<this._cols;);return fe>=this._cols?this._cols-1:fe<0?0:fe},ge.prototype.addMarker=function(fe){var ue=this,ee=new be.Marker(fe);return this.markers.push(ee),ee.register(this.lines.onTrim(function(z){ee.line-=z,ee.line<0&&ee.dispose()})),ee.register(this.lines.onInsert(function(z){ee.line>=z.index&&(ee.line+=z.amount)})),ee.register(this.lines.onDelete(function(z){ee.line>=z.index&&ee.line<z.index+z.amount&&ee.dispose(),ee.line>z.index&&(ee.line-=z.amount)})),ee.register(ee.onDispose(function(){return ue._removeMarker(ee)})),ee},ge.prototype._removeMarker=function(fe){this.markers.splice(this.markers.indexOf(fe),1)},ge.prototype.iterator=function(fe,ue,ee,z,oe){return new de(this,fe,ue,ee,z,oe)},ge}();Ie.Buffer=pe;var de=function(){function ge(fe,ue,ee,z,oe,re){ee===void 0&&(ee=0),z===void 0&&(z=fe.lines.length),oe===void 0&&(oe=0),re===void 0&&(re=0),this._buffer=fe,this._trimRight=ue,this._startIndex=ee,this._endIndex=z,this._startOverscan=oe,this._endOverscan=re,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return ge.prototype.hasNext=function(){return this._current<this._endIndex},ge.prototype.next=function(){var fe=this._buffer.getWrappedRangeForLine(this._current);fe.first<this._startIndex-this._startOverscan&&(fe.first=this._startIndex-this._startOverscan),fe.last>this._endIndex+this._endOverscan&&(fe.last=this._endIndex+this._endOverscan),fe.first=Math.max(fe.first,0),fe.last=Math.min(fe.last,this._buffer.lines.length);for(var ue="",ee=fe.first;ee<=fe.last;++ee)ue+=this._buffer.translateBufferLineToString(ee,this._trimRight);return this._current=fe.last+1,{range:fe,content:ue}},ge}();Ie.BufferStringIterator=de},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.CircularList=void 0;var Se=Le(0),je=function(){function Me(Ce){this._maxLength=Ce,this.onDeleteEmitter=new Se.EventEmitter,this.onInsertEmitter=new Se.EventEmitter,this.onTrimEmitter=new Se.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(Me.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(Me.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(Me.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(Me.prototype,"maxLength",{get:function(){return this._maxLength},set:function(Ce){if(this._maxLength!==Ce){for(var xe=new Array(Ce),be=0;be<Math.min(Ce,this.length);be++)xe[be]=this._array[this._getCyclicIndex(be)];this._array=xe,this._maxLength=Ce,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(Me.prototype,"length",{get:function(){return this._length},set:function(Ce){if(Ce>this._length)for(var xe=this._length;xe<Ce;xe++)this._array[xe]=void 0;this._length=Ce},enumerable:!1,configurable:!0}),Me.prototype.get=function(Ce){return this._array[this._getCyclicIndex(Ce)]},Me.prototype.set=function(Ce,xe){this._array[this._getCyclicIndex(Ce)]=xe},Me.prototype.push=function(Ce){this._array[this._getCyclicIndex(this._length)]=Ce,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},Me.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(Me.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),Me.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},Me.prototype.splice=function(Ce,xe){for(var be=[],ye=2;ye<arguments.length;ye++)be[ye-2]=arguments[ye];if(xe){for(var we=Ce;we<this._length-xe;we++)this._array[this._getCyclicIndex(we)]=this._array[this._getCyclicIndex(we+xe)];this._length-=xe}for(we=this._length-1;we>=Ce;we--)this._array[this._getCyclicIndex(we+be.length)]=this._array[this._getCyclicIndex(we)];for(we=0;we<be.length;we++)this._array[this._getCyclicIndex(Ce+we)]=be[we];if(this._length+be.length>this._maxLength){var pe=this._length+be.length-this._maxLength;this._startIndex+=pe,this._length=this._maxLength,this.onTrimEmitter.fire(pe)}else this._length+=be.length},Me.prototype.trimStart=function(Ce){Ce>this._length&&(Ce=this._length),this._startIndex+=Ce,this._length-=Ce,this.onTrimEmitter.fire(Ce)},Me.prototype.shiftElements=function(Ce,xe,be){if(!(xe<=0)){if(Ce<0||Ce>=this._length)throw new Error("start argument out of range");if(Ce+be<0)throw new Error("Cannot shift elements in list beyond index 0");if(be>0){for(var ye=xe-1;ye>=0;ye--)this.set(Ce+ye+be,this.get(Ce+ye));var we=Ce+xe+be-this._length;if(we>0)for(this._length+=we;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(ye=0;ye<xe;ye++)this.set(Ce+ye+be,this.get(Ce+ye))}},Me.prototype._getCyclicIndex=function(Ce){return(this._startIndex+Ce)%this._maxLength},Me}();Ie.CircularList=je},function(ln,Ie,Le){"use strict";function Se(je,Me,Ce){if(Me===je.length-1)return je[Me].getTrimmedLength();var xe=!je[Me].hasContent(Ce-1)&&je[Me].getWidth(Ce-1)===1,be=je[Me+1].getWidth(0)===2;return xe&&be?Ce-1:Ce}Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.getWrappedLineTrimmedLength=Ie.reflowSmallerGetNewLineLengths=Ie.reflowLargerApplyNewLayout=Ie.reflowLargerCreateNewLayout=Ie.reflowLargerGetLinesToRemove=void 0,Ie.reflowLargerGetLinesToRemove=function(je,Me,Ce,xe,be){for(var ye=[],we=0;we<je.length-1;we++){var pe=we,de=je.get(++pe);if(de.isWrapped){for(var ge=[je.get(we)];pe<je.length&&de.isWrapped;)ge.push(de),de=je.get(++pe);if(xe>=we&&xe<pe)we+=ge.length-1;else{for(var fe=0,ue=Se(ge,fe,Me),ee=1,z=0;ee<ge.length;){var oe=Se(ge,ee,Me),re=oe-z,ae=Ce-ue,le=Math.min(re,ae);ge[fe].copyCellsFrom(ge[ee],z,ue,le,!1),(ue+=le)===Ce&&(fe++,ue=0),(z+=le)===oe&&(ee++,z=0),ue===0&&fe!==0&&ge[fe-1].getWidth(Ce-1)===2&&(ge[fe].copyCellsFrom(ge[fe-1],Ce-1,ue++,1,!1),ge[fe-1].setCell(Ce-1,be))}ge[fe].replaceCells(ue,Ce,be);for(var me=0,ve=ge.length-1;ve>0&&(ve>fe||ge[ve].getTrimmedLength()===0);ve--)me++;me>0&&(ye.push(we+ge.length-me),ye.push(me)),we+=ge.length-1}}}return ye},Ie.reflowLargerCreateNewLayout=function(je,Me){for(var Ce=[],xe=0,be=Me[xe],ye=0,we=0;we<je.length;we++)if(be===we){var pe=Me[++xe];je.onDeleteEmitter.fire({index:we-ye,amount:pe}),we+=pe-1,ye+=pe,be=Me[++xe]}else Ce.push(we);return{layout:Ce,countRemoved:ye}},Ie.reflowLargerApplyNewLayout=function(je,Me){for(var Ce=[],xe=0;xe<Me.length;xe++)Ce.push(je.get(Me[xe]));for(xe=0;xe<Ce.length;xe++)je.set(xe,Ce[xe]);je.length=Me.length},Ie.reflowSmallerGetNewLineLengths=function(je,Me,Ce){for(var xe=[],be=je.map(function(ue,ee){return Se(je,ee,Me)}).reduce(function(ue,ee){return ue+ee}),ye=0,we=0,pe=0;pe<be;){if(be-pe<Ce){xe.push(be-pe);break}ye+=Ce;var de=Se(je,we,Me);ye>de&&(ye-=de,we++);var ge=je[we].getWidth(ye-1)===2;ge&&ye--;var fe=ge?Ce-1:Ce;xe.push(fe),pe+=fe}return xe},Ie.getWrappedLineTrimmedLength=Se},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(xe,be){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ye,we){ye.__proto__=we}||function(ye,we){for(var pe in we)we.hasOwnProperty(pe)&&(ye[pe]=we[pe])})(xe,be)},function(xe,be){function ye(){this.constructor=xe}Se(xe,be),xe.prototype=be===null?Object.create(be):(ye.prototype=be.prototype,new ye)});Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.Marker=void 0;var Me=Le(0),Ce=function(xe){function be(ye){var we=xe.call(this)||this;return we.line=ye,we._id=be._nextId++,we.isDisposed=!1,we._onDispose=new Me.EventEmitter,we}return je(be,xe),Object.defineProperty(be.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),be.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},be._nextId=1,be}(Le(2).Disposable);Ie.Marker=Ce},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.OptionsService=Ie.DEFAULT_OPTIONS=Ie.DEFAULT_BELL_SOUND=void 0;var Se=Le(0),je=Le(11),Me=Le(33);Ie.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",Ie.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:Ie.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:je.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var Ce=["cols","rows"],xe=function(){function be(ye){this._onOptionChange=new Se.EventEmitter,this.options=Me.clone(Ie.DEFAULT_OPTIONS);for(var we=0,pe=Object.keys(ye);we<pe.length;we++){var de=pe[we];if(de in this.options){var ge=ye[de];this.options[de]=ge}}}return Object.defineProperty(be.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),be.prototype.setOption=function(ye,we){if(!(ye in Ie.DEFAULT_OPTIONS))throw new Error('No option with key "'+ye+'"');if(Ce.indexOf(ye)!==-1)throw new Error('Option "'+ye+'" can only be set in the constructor');this.options[ye]!==we&&(we=this._sanitizeAndValidateOption(ye,we),this.options[ye]!==we&&(this.options[ye]=we,this._onOptionChange.fire(ye)))},be.prototype._sanitizeAndValidateOption=function(ye,we){switch(ye){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":we||(we=Ie.DEFAULT_OPTIONS[ye]);break;case"cursorWidth":we=Math.floor(we);case"lineHeight":case"tabStopWidth":if(we<1)throw new Error(ye+" cannot be less than 1, value: "+we);break;case"minimumContrastRatio":we=Math.max(1,Math.min(21,Math.round(10*we)/10));break;case"scrollback":if((we=Math.min(we,4294967295))<0)throw new Error(ye+" cannot be less than 0, value: "+we);break;case"fastScrollSensitivity":case"scrollSensitivity":if(we<=0)throw new Error(ye+" cannot be less than or equal to 0, value: "+we)}return we},be.prototype.getOption=function(ye){if(!(ye in Ie.DEFAULT_OPTIONS))throw new Error('No option with key "'+ye+'"');return this.options[ye]},be}();Ie.OptionsService=xe},function(ln,Ie,Le){"use strict";var Se,je=this&&this.__extends||(Se=function(fe,ue){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ee,z){ee.__proto__=z}||function(ee,z){for(var oe in z)z.hasOwnProperty(oe)&&(ee[oe]=z[oe])})(fe,ue)},function(fe,ue){function ee(){this.constructor=fe}Se(fe,ue),fe.prototype=ue===null?Object.create(ue):(ee.prototype=ue.prototype,new ee)}),Me=this&&this.__decorate||function(fe,ue,ee,z){var oe,re=arguments.length,ae=re<3?ue:z===null?z=Object.getOwnPropertyDescriptor(ue,ee):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ae=Reflect.decorate(fe,ue,ee,z);else for(var le=fe.length-1;le>=0;le--)(oe=fe[le])&&(ae=(re<3?oe(ae):re>3?oe(ue,ee,ae):oe(ue,ee))||ae);return re>3&&ae&&Object.defineProperty(ue,ee,ae),ae},Ce=this&&this.__param||function(fe,ue){return function(ee,z){ue(ee,z,fe)}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.CoreService=void 0;var xe=Le(1),be=Le(0),ye=Le(33),we=Le(2),pe=Object.freeze({insertMode:!1}),de=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),ge=function(fe){function ue(ee,z,oe,re){var ae=fe.call(this)||this;return ae._bufferService=z,ae._logService=oe,ae._optionsService=re,ae.isCursorInitialized=!1,ae.isCursorHidden=!1,ae._onData=ae.register(new be.EventEmitter),ae._onUserInput=ae.register(new be.EventEmitter),ae._onBinary=ae.register(new be.EventEmitter),ae._scrollToBottom=ee,ae.register({dispose:function(){return ae._scrollToBottom=void 0}}),ae.modes=ye.clone(pe),ae.decPrivateModes=ye.clone(de),ae}return je(ue,fe),Object.defineProperty(ue.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),ue.prototype.reset=function(){this.modes=ye.clone(pe),this.decPrivateModes=ye.clone(de)},ue.prototype.triggerDataEvent=function(ee,z){if(z===void 0&&(z=!1),!this._optionsService.options.disableStdin){var oe=this._bufferService.buffer;oe.ybase!==oe.ydisp&&this._scrollToBottom(),z&&this._onUserInput.fire(),this._logService.debug('sending data "'+ee+'"',function(){return ee.split("").map(function(re){return re.charCodeAt(0)})}),this._onData.fire(ee)}},ue.prototype.triggerBinaryEvent=function(ee){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+ee+'"',function(){return ee.split("").map(function(z){return z.charCodeAt(0)})}),this._onBinary.fire(ee))},ue=Me([Ce(1,xe.IBufferService),Ce(2,xe.ILogService),Ce(3,xe.IOptionsService)],ue)}(we.Disposable);Ie.CoreService=ge},function(ln,Ie,Le){"use strict";var Se=this&&this.__decorate||function(de,ge,fe,ue){var ee,z=arguments.length,oe=z<3?ge:ue===null?ue=Object.getOwnPropertyDescriptor(ge,fe):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(de,ge,fe,ue);else for(var re=de.length-1;re>=0;re--)(ee=de[re])&&(oe=(z<3?ee(oe):z>3?ee(ge,fe,oe):ee(ge,fe))||oe);return z>3&&oe&&Object.defineProperty(ge,fe,oe),oe},je=this&&this.__param||function(de,ge){return function(fe,ue){ge(fe,ue,de)}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.CoreMouseService=void 0;var Me=Le(1),Ce=Le(0),xe={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(de){return de.button!==4&&de.action===1&&(de.ctrl=!1,de.alt=!1,de.shift=!1,!0)}},VT200:{events:19,restrict:function(de){return de.action!==32}},DRAG:{events:23,restrict:function(de){return de.action!==32||de.button!==3}},ANY:{events:31,restrict:function(de){return!0}}};function be(de,ge){var fe=(de.ctrl?16:0)|(de.shift?4:0)|(de.alt?8:0);return de.button===4?(fe|=64,fe|=de.action):(fe|=3&de.button,4&de.button&&(fe|=64),8&de.button&&(fe|=128),de.action===32?fe|=32:de.action!==0||ge||(fe|=3)),fe}var ye=String.fromCharCode,we={DEFAULT:function(de){var ge=[be(de,!1)+32,de.col+32,de.row+32];return ge[0]>255||ge[1]>255||ge[2]>255?"":"\x1B[M"+ye(ge[0])+ye(ge[1])+ye(ge[2])},SGR:function(de){var ge=de.action===0&&de.button!==4?"m":"M";return"\x1B[<"+be(de,!0)+";"+de.col+";"+de.row+ge}},pe=function(){function de(ge,fe){this._bufferService=ge,this._coreService=fe,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new Ce.EventEmitter,this._lastEvent=null;for(var ue=0,ee=Object.keys(xe);ue<ee.length;ue++){var z=ee[ue];this.addProtocol(z,xe[z])}for(var oe=0,re=Object.keys(we);oe<re.length;oe++){var ae=re[oe];this.addEncoding(ae,we[ae])}this.reset()}return de.prototype.addProtocol=function(ge,fe){this._protocols[ge]=fe},de.prototype.addEncoding=function(ge,fe){this._encodings[ge]=fe},Object.defineProperty(de.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(ge){if(!this._protocols[ge])throw new Error('unknown protocol "'+ge+'"');this._activeProtocol=ge,this._onProtocolChange.fire(this._protocols[ge].events)},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(ge){if(!this._encodings[ge])throw new Error('unknown encoding "'+ge+'"');this._activeEncoding=ge},enumerable:!1,configurable:!0}),de.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(de.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),de.prototype.triggerMouseEvent=function(ge){if(ge.col<0||ge.col>=this._bufferService.cols||ge.row<0||ge.row>=this._bufferService.rows||ge.button===4&&ge.action===32||ge.button===3&&ge.action!==32||ge.button!==4&&(ge.action===2||ge.action===3)||(ge.col++,ge.row++,ge.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,ge))||!this._protocols[this._activeProtocol].restrict(ge))return!1;var fe=this._encodings[this._activeEncoding](ge);return fe&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(fe):this._coreService.triggerDataEvent(fe,!0)),this._lastEvent=ge,!0},de.prototype.explainEvents=function(ge){return{down:!!(1&ge),up:!!(2&ge),drag:!!(4&ge),move:!!(8&ge),wheel:!!(16&ge)}},de.prototype._compareEvents=function(ge,fe){return ge.col===fe.col&&ge.row===fe.row&&ge.button===fe.button&&ge.action===fe.action&&ge.ctrl===fe.ctrl&&ge.alt===fe.alt&&ge.shift===fe.shift},de=Se([je(0,Me.IBufferService),je(1,Me.ICoreService)],de)}();Ie.CoreMouseService=pe},function(ln,Ie,Le){"use strict";var Se=this&&this.__decorate||function(xe,be,ye,we){var pe,de=arguments.length,ge=de<3?be:we===null?we=Object.getOwnPropertyDescriptor(be,ye):we;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ge=Reflect.decorate(xe,be,ye,we);else for(var fe=xe.length-1;fe>=0;fe--)(pe=xe[fe])&&(ge=(de<3?pe(ge):de>3?pe(be,ye,ge):pe(be,ye))||ge);return de>3&&ge&&Object.defineProperty(be,ye,ge),ge},je=this&&this.__param||function(xe,be){return function(ye,we){be(ye,we,xe)}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.DirtyRowService=void 0;var Me=Le(1),Ce=function(){function xe(be){this._bufferService=be,this.clearRange()}return Object.defineProperty(xe.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(xe.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),xe.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},xe.prototype.markDirty=function(be){be<this._start?this._start=be:be>this._end&&(this._end=be)},xe.prototype.markRangeDirty=function(be,ye){if(be>ye){var we=be;be=ye,ye=we}be<this._start&&(this._start=be),ye>this._end&&(this._end=ye)},xe.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},xe=Se([je(0,Me.IBufferService)],xe)}();Ie.DirtyRowService=Ce},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.UnicodeService=void 0;var Se=Le(0),je=Le(79),Me=function(){function Ce(){this._providers=Object.create(null),this._active="",this._onChange=new Se.EventEmitter;var xe=new je.UnicodeV6;this.register(xe),this._active=xe.version,this._activeProvider=xe}return Object.defineProperty(Ce.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"activeVersion",{get:function(){return this._active},set:function(xe){if(!this._providers[xe])throw new Error('unknown Unicode version "'+xe+'"');this._active=xe,this._activeProvider=this._providers[xe],this._onChange.fire(xe)},enumerable:!1,configurable:!0}),Ce.prototype.register=function(xe){this._providers[xe.version]=xe},Ce.prototype.wcwidth=function(xe){return this._activeProvider.wcwidth(xe)},Ce.prototype.getStringCellWidth=function(xe){for(var be=0,ye=xe.length,we=0;we<ye;++we){var pe=xe.charCodeAt(we);if(55296<=pe&&pe<=56319){if(++we>=ye)return be+this.wcwidth(pe);var de=xe.charCodeAt(we);56320<=de&&de<=57343?pe=1024*(pe-55296)+de-56320+65536:be+=this.wcwidth(de)}be+=this.wcwidth(pe)}return be},Ce}();Ie.UnicodeService=Me},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.UnicodeV6=void 0;var Se,je=Le(15),Me=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],Ce=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],xe=function(){function be(){if(this.version="6",!Se){Se=new Uint8Array(65536),je.fill(Se,1),Se[0]=0,je.fill(Se,0,1,32),je.fill(Se,0,127,160),je.fill(Se,2,4352,4448),Se[9001]=2,Se[9002]=2,je.fill(Se,2,11904,42192),Se[12351]=1,je.fill(Se,2,44032,55204),je.fill(Se,2,63744,64256),je.fill(Se,2,65040,65050),je.fill(Se,2,65072,65136),je.fill(Se,2,65280,65377),je.fill(Se,2,65504,65511);for(var ye=0;ye<Me.length;++ye)je.fill(Se,0,Me[ye][0],Me[ye][1]+1)}}return be.prototype.wcwidth=function(ye){return ye<32?0:ye<127?1:ye<65536?Se[ye]:function(we,pe){var de,ge=0,fe=pe.length-1;if(we<pe[0][0]||we>pe[fe][1])return!1;for(;fe>=ge;)if(we>pe[de=ge+fe>>1][1])ge=de+1;else{if(!(we<pe[de][0]))return!0;fe=de-1}return!1}(ye,Ce)?0:ye>=131072&&ye<=196605||ye>=196608&&ye<=262141?2:1},be}();Ie.UnicodeV6=xe},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.CharsetService=void 0;var Se=function(){function je(){this.glevel=0,this._charsets=[]}return je.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},je.prototype.setgLevel=function(Me){this.glevel=Me,this.charset=this._charsets[Me]},je.prototype.setgCharset=function(Me,Ce){this._charsets[Me]=Ce,this.glevel===Me&&(this.charset=Ce)},je}();Ie.CharsetService=Se},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.updateWindowsModeWrappedState=void 0;var Se=Le(3);Ie.updateWindowsModeWrappedState=function(je){var Me=je.buffer.lines.get(je.buffer.ybase+je.buffer.y-1),Ce=Me==null?void 0:Me.get(je.cols-1),xe=je.buffer.lines.get(je.buffer.ybase+je.buffer.y);xe&&Ce&&(xe.isWrapped=Ce[Se.CHAR_DATA_CODE_INDEX]!==Se.NULL_CELL_CODE&&Ce[Se.CHAR_DATA_CODE_INDEX]!==Se.WHITESPACE_CELL_CODE)}},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.WriteBuffer=void 0;var Se=function(){function je(Me){this._action=Me,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return je.prototype.writeSync=function(Me){if(this._writeBuffer.length){for(var Ce=this._bufferOffset;Ce<this._writeBuffer.length;++Ce){var xe=this._writeBuffer[Ce],be=this._callbacks[Ce];this._action(xe),be&&be()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(Me)},je.prototype.write=function(Me,Ce){var xe=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return xe._innerWrite()})),this._pendingData+=Me.length,this._writeBuffer.push(Me),this._callbacks.push(Ce)},je.prototype._innerWrite=function(){for(var Me=this,Ce=Date.now();this._writeBuffer.length>this._bufferOffset;){var xe=this._writeBuffer[this._bufferOffset],be=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(xe),this._pendingData-=xe.length,be&&be(),Date.now()-Ce>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(function(){return Me._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},je}();Ie.WriteBuffer=Se},function(ln,Ie,Le){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.AddonManager=void 0;var Se=function(){function je(){this._addons=[]}return je.prototype.dispose=function(){for(var Me=this._addons.length-1;Me>=0;Me--)this._addons[Me].instance.dispose()},je.prototype.loadAddon=function(Me,Ce){var xe=this,be={instance:Ce,dispose:Ce.dispose,isDisposed:!1};this._addons.push(be),Ce.dispose=function(){return xe._wrappedAddonDispose(be)},Ce.activate(Me)},je.prototype._wrappedAddonDispose=function(Me){if(!Me.isDisposed){for(var Ce=-1,xe=0;xe<this._addons.length;xe++)if(this._addons[xe]===Me){Ce=xe;break}if(Ce===-1)throw new Error("Could not dispose an addon that has not been loaded");Me.isDisposed=!0,Me.dispose.apply(Me.instance),this._addons.splice(Ce,1)}},je}();Ie.AddonManager=Se}])})},93314:function(xn){"use strict";xn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},62522:function(xn){"use strict";xn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUYAAABYCAYAAACJfF6vAAAAAXNSR0IArs4c6QAAIABJREFUeF7sXQe4FcXZfmd2T7n90jtYsFGModkVUGNJ7BVTVIxdI5ii/iYmxkRjEhV7ohF7wQaxBqOIxgqCQSkWUKRIv72csjvzP9/M7p7ZPefce8EGhOOD95wt0+ed9yvzDcO2z7YW2NYCm00LNL19cQ/H4j/nEt+vKK38LhtyVWazKdz/UEHY/1Bdt1V1Wwts1i3QMGviGRLyJgAVVFCb4YiykZNe2KwLvZUWbhswbqUdu61aW1YL1L0z4TrG8Cuz1IyxOytH3njOllWTraO024Bx6+jHbbXYglugcfaEC4TErZEqNAN4q2rUpEO24KptsUXfBoxbbNdtK/jW0AINsyfsC2CGlIgzBgGJaRzi9jKeeo2NuDO7NdRxS6zDNmDcEnttW5k32xYYP3XZFADfA6QFsKWTj+2/e7HCyld+azeU1S8AsDOAjxnEGZWjbn7z26rc+H8u/yWEPMti9kV3HdN7+rdVjs0h323AuDn0wrYybDUtMH7a8lsh5QW6Qqxl8rH9yopVrmHWhLMl8HcAL1UK93i21y0N30ZD/Hj66rJYKjMZAid5+T82+dj+J38bZdlc8twGjJtLT2wrx1bRAmc+tWy8ZLhb4yJWTz6mf69CFSO2WF9av5QxLG1w2CH99rmx9dtogDP/uXygFHIqgCG6zOyhxkzf0x4/ibnfRnk2lzy3WGBsmDXhTSkxFAxSAksB9jFneIFZztMVw25Zt7k08Jcpx7p9d6lAPD5BMHkKY/K33V9e8MSXSe+berf+zYmdEZO3VpZUnf6/5od35tTloyTkO15bz5t8bP89CrV7/bsTvg+B+2yOoWUjJq36pvomms/4aStugxTne6A4td/RfU+4ijHxbZVnc8l3SwbGP0ng0gIN6TDgXhv896Wjbli+uTT0xpZj7ZihR0gmJwPoocmH/E33GQv+sLHpfBvP18+eOBFS3sAYplWOnHTst1GGbyvPs5/5oqvjOGphZmBP3X1sv+MLAuOsCVM4w2sVIyfd9m2V1c93/D+XHQWBS7Kl8e8/cGhPsob/z3+2WGCsnz3hcEg8X7QHpUwxxi6uHDXpzi2tl2tG7z4ky8UcAHG/7BJ4vueM+d/fEupSN2viSwzyIAbMqxw1qSBj2hLqsallPGPqshYGlDCGP959TP9fR9ORn1yUaKy1llQ4bCf2LYnQm1q3/5X3tlhgbPrg4h6ilR0NoBJgO0vIsQB2zBuEUl5WvedN121JHbruoKHXCSlNZ986Bjat+4wPztgS6tEwa8JqSUyXyb9VjbzpvC2hzF9lGcdPXbYSQG8p+ZH3HNf32WjaTbMvPsQFP7xq5I2XfJX5bkvrq2uBLRYYC4on7168JxPsCgkcGdxnEFzKMRWjbnrtq2u2rzeltWOHPCKBU1QuDNNjrOXkzi99Wv/15vrVpV4/awL539mc48qKEZOu/upS3jJSGj91+ceA3D4Vk90f/sGA2mip62dPuF5IPNBp1KT/bhk1+t8r5VYFjH73Ncye8CspEbBECTxVPWpSQV3P5tjla8cOeVMCezNgJUtnd+v2xkeNm2M5i5WpbtaEJgaUMc4urxxx45+2pLJ/FWU9Y+qyxUz5MPY7uFB6DbMn/LNy5CSSdrZ9NtMW2CqBUT52otWwXZ80AMtr9wVVoyZpd4TN/LNu/916iZhFRiMLjP22x8sf/H4zL3Je8RpmT3xfSjlUQl5fPeqmX2xp5f+y5R0/bdkqJnDF3cf1J+NZ6FP3/mWdrHT69xUjb7zoy+az7f2vrwW2SmCsfeOCATxmf0ZOWV7TPV01avNfoSXA144d8iSAY6jcUoq9er6y0Hf9+PpGwVeccv27E2+DkOcD7M2qUTfSlrf/mc/oV6S9Q92KVY1Z9H/8pH55vom170w8llbryj1vJN/BbZ/NtAW2SmBsmD3xH1LKM/02t5j8XvnIm/69mfaBKtYXhwwZYbns94A83Ctn4/L6RJcRc+Zscftl62dPHAUp/8gku/1/DQDGP7XiO5KJI+85tn9B16r6WRNulen0b6r3vyNP97g5j89vs2xrxgw5jjGc0W3G/KMYIL+Jsmx1wNjwzoS9JZNvBGyR4f6qkZNO+yYa88vksWbskPcBDDXSeKrHjPlbjF70y9R9a3p3/NSlxyezpdNvP6l7U6F61c+e+EjVyBvHbWqdT3/mi10t1zlTSowF5E4ASwJYx4A5kvEn7L59HrlzBNviFtNi7bF27ODnJZhPFu5Yt1pMGLJw4dcevHfrA8bZE5+QUvqAslzEsHun706q29SB+E29t3bMkMslwzWUH62KEjisx4z5L37d+cvHYKEbZYlyoMJuqXFjpby8NCvczjEeY04qYYML2+ash+uyOMAtBlYGLsshEQNYDC6LcUtWA7Ic4EwIxjizOJjkAsxidJGJCsncwVLCBhhnknFIFWiBQzAOFuiDAbrHyKddswPJpNADlUkwSbsyBJikLWt0X0gmXMaRhbBWMmmtEKBnJHkjuABzIaUEE6SpqBdSNoOLLIfMgCHrZuM1YI4DLh3Eso4U1hqb7nGRzXJHCJltTJSiEYl0Fk5jFp+iBWdDMIaCW+bOfnpl/zuP6rOsUL81vTtxqCvkiVWjJl25Kf3q7cMm9yde7H0GLHGZnHjvMQOe2ZQ8Nrd31o4dulJC9vbLxYAVYHig+8vz/+/rLOtWBYzyldOTDWXVtBE/Ro3GGT+hYuQNpLPb7D9LDt6hqlyUUrTmnTjDn7q9PP/6YoWWr8BGBVhtLUqTtSXlJYmycgi7Ck4sASa7u+lYGWDFmO30hcNLYKE7wBOMsTgYejLJ4hDclpIiRYsqSG4ziVJIZlFUGElgxRnBkCLeGp0UYOuP1MidGzxaujGvqVdzjxf5bqCftyKY+UTTMB7JS89/1pezKO/Q+8wvT2TI0yoU3DMKHVSU6iUlY3AkAS1nrWDCYWA1krEWMAWiDgTWSMgUlzIlpFwvuJuyZXwFIFKIpzOOK1en+x1xmpVe+4ps/M+MkuSGJnRCC4YXB9lo/585bfmVUsqrAKxnDA8I4AMmmC0hhzOGEwB00esH9Zz8e1m834RbjmBkhNxiP6vHDrmCAaZaYi1n1v7dXp738ddZqa0KGGvfmrAdt/CZbjBWXzlyRRfGHt88N8MT9wFY7Us7VKRSg7O9GlsqYGdLIXgP1121I+OpXnDRHdyuZpbsxJjVSQpWCclKmJQ9pFBglpRSJomAqWmv0MDXwtDcMJAp+BGFq2KQYsJQ9Huh3/41Dzl1HxSARq93FHCZMFbovWLXjCnhI6AHZBpqc5/QbR/sdENFytce7Ppp5upEeekSRurhP+Lb/ug3Y2jpNxKly94hMktAm5IMKTCWAU9+zJCth4y3CCHXcJlOwyIWm21yXb4STDaCZ1rSPLH2Bvu2C/YQ//7znuL6Fd0WoIVdpTKXJz42P15hV10Mhis1c1f1md0Fy8b9fPG+q+OVxNSBRhc8ZsHiApylwUorIRprIMuTiv8z4cKVaV0hYUGIVkiXQ4hmSLcesu/2EIsBpDdApnpDDv8CEoMhscBodl0mfwR8KZ0gzZF1Ywf/SoKRzSDOwY/rNuP9uUYXfy1ftypglO9eWtUgUrXekrmyetSkvl9FqylxE4ivWwfLcsFdC6LbWjUog832xOLqllaXV9t2SUZaXTi3ezAZJ5GzJ3N5FzDeFRI9mc07A6ySwA2CE0urUF5FUiQhpS0J49RQ9yjYV1GB/4U08hFws6p1troPRLIcidUfdbxcHqAGOA6pYqZIiQyYbAVjDYDbCMbXCVc0AW7dYj4ocV/ZFUeu4X1I90gagvoRLf+87uQNl7/tSrdFZLJpIeBK+geImJWQkkHINIRwmCsAkYgxtyVLugomShgTMt0kZQLSlRAiDVkhITYkId1WyGoBIco1aKYciIGdIeesgmzsBbluIeSJj+s58k0ZTTreuG0/uVUBI1W1ftYE2mM8jCRAy2Kjyobd+O6mNNZvfwv+i8HlXbK1sifSvNrm8c7cinWyLd6VMbu7xa1qzqxO4LyLBOvCGKohUQnBysBo7Y0OB4PB+ZjnPRPmOLq0Siw1eifKrfw6mbxHsxdTxM3VPPe+yZY01zF5nS61foamIf2NDpIoI/OoapBZsbL65TPYROid/HLk6rOxvDZXyxxiFqqr10u6zY26FypYobbVdfV5ajgvP21SmTbvtD9Klr0HKxUOuZjPbr20aLiwMP+lnggUr6Fcw6QszUtxZ8mlmBffW1eDMTky/Urr8al76rq4XzRKiRop3TrhoEYKd42Q7jrhOGuyWacWqUxNS1OmkWWd1kw6kxbSW/yTQCKblK02kwkJ0ZxlMiGYcAUTMgaZtJtcR0JUuhCuC+E4EM0JuCs6w1UAOQgSV+XkmU2Zk9/kO1sdMDbOnnCClOwByeRKKXF39ahJ10YbVOno0n0rG+viXUsEujPBezLGegsXfTh4HyZZDylkD0antUlUMrBySXrLnOwUiKlqSHrj0pdkc0o5z4ziI1wIMQpN9RBihpV6vknGm4hRNAugTOkE1axStooc8nldHczuQmKsLm8Ah+qL94JWOOZLoAaaUTVDeftlNhE+QCC/jB6squS9awFa5Z4JkMtEMm8FYVRnszlVmbz6UTtoSVbZYAKVQyQ7PwFdB7NP9QoVXAuht7d6+Te9l0nFp1rRu57pviPc8i4o+Wx2MBT9quaqXAB28/oqVy4Fxt7w0gpg0gl7+aqsGZ4qGY9/lVDsWV1osi/tkX0Luzrz0N39Akm0YKCz0APPQEpxwVhKSlnPGKsTUtRIR9RIIdesRo+113e6uef2rR988qMVv56damiuyWRaW9GUTrkMrisgkjakEGUiVmFlU2sbnLIyOCGAfBxkSAsj+TeJeB3Ma6sDxkL1llMGHipS1rGMyb6Q6A3BukOgE5R+jmkLnz+PNvsuM2tYiMN0sOc3y8c2k/q0KZZvXBndss5o3XEUkkvnwG74OsKEtl2e9+L74v7yCWji1Xk9/oOWB3F0y30dGgkEwv8uOQ5TSnVMkCGZ2eLCxiszNnMaIOUGIeU615Fr4IgFaz9fMzXT4NZx28rYaSuTSDRkurXAmROHO5w051sAc9zqgdF9aKffs1b+a9J3RyHFJx8B2QgTigAvFVkymEqUaxVK1385yLRAS0eIhrYCe/YTM02TpAQkMELeTHDPk30NohGQqUh5FJnymZXHMXxx3rc2q+YxlvsgiUi5i+UR1ClCBAtaS6IEt+CKF1ZehfI18CJEJs2yRtQVfhbm2hgdNAER9wh5MfsSpSHjpWjdaS+wdAtKF7+dI+9RYlxkrQus/GZbRHDQJ9rm+Izaghp4Nf5ZejreSB4GlykbjPpcWvcz7JhZGGh9cgO+sE7mxqrrsDA+PHj/qOZ7cWTLg6GeUTRD4LP1S9b9JF3XsiZt8VSpY7c2JxozdiMyS5fCGT0T7ubOGrdqYEw/OmC3WGNinnClct+Jgk1uAhSnCG2Sh0KT9Ute+6bza7e4aoR4ui0PGUMLRQhoDEjx5LyNrU8gxptIv7GJtFsp/4G2EjbvheRn7+VcSc2F0v8uyqqR2mE4eUKh5KM3wFPk7/31VCSaarFcNvAemJM8EKutvqiUdTiq6T7wwu6YRVtwXmJv3F15OVK8DF3dL3DN+h/n1Yu63kk7Tyx/f8WfrCRrjgurWTK7pU42prEOmcGD4JiGyw531zf44FYNjM7kHU9mGf6oJN9eY7T4SuygnX32Za7GhUZ7VEHvqxA9lhcARjsd6LOOfKJg6AWV+42hIywg4gfF7cDMIEW+0h+a7eB9z12LgEGR0RFisKbay9N1hfSSAV0LJ+abdvKXq+KNp97xgDpfS9WeiBvpUJ/+muYnkxrr9SCY9CH2JrUeN795cu3XOmh/iJIKJJbMhVW3us1nzaIEY2MTMFTXMLy05I+x3JXAf9Nf3DyJQOmnTcU5vWKMv5fLjsOUygsRlyncsvqIXN2M14SUi5fPXXluvJQ1Omm3IcOtxngy0WyvrEv3BTLYzHWNWzUwtt65ww/jLn9QEDCaKBiwEV1909Jn8KO8GRoeqznbrX6wLXTK3StkVzRFvVw6+fBTeK5EmYtZp0JMJ1zW8DQKrwy5t3NukhD+hhPaz+IHL9ItEF1L/PIWneO0QYU2uXhGg8A6X2BUBj0YEn/1GxE4D4msyhwkhVYle3qA0Dv+4qDsTLRhxtXpcRI5zYKYsGMODbNvc22Q7bUzrOZa8Ib1hlwabqFC7VK4x8Iek+EeD/VSpA/yx3d0/CkzDQG9t6rnl8m7YtiZaqweuLf6Uvyg8T7skpkXeC+YI4tJ+fnn81b83OWsgUlrQ0yI2qxrN6WbmlpTnZAefifoCJICy/03SAvbyGqrBUbyPUxt6D8+LmJ3amAsNk2LgYffatH32gLAQgAZGi5eosWms5mnDzXR8hXLn7zSPF922sCilD2FaG9RGMkfJpX9wfrtDayaC1m3RN23xlwDlHSFXP8R5Nt/Arjt7XjRrDywDkdTi2KMlQAffhHQZWeIF84DpAO+ywmQiQrPckxT2N/5VoCf1X8KufQlr55ha63GM822Wbch4PtcCvHGNZDrFxVHcMq1/wHgIy4E3CzEa78Daj/xDMvR/or2abElAUBJN10WNw1k/LCaxSCxEE60u7y0IaIXXZK83il2v1Ce7aUV6XAhVi6dv/pKxniNbcu1krs16Ra7wSpraUqvRurxx+FcRdrIzfSzVQLjF8/0LpULM/0qZfx7JeXJmzVe+G4o+X57bfdNeJDkGsznN20xCZ+NRlmFv6eOtgSHffWizLNt2DbSregH65C/ALESiDf/AvH5zHzGyyy1DdkHTJNr5IRDT0Sk3W+H3Qq+y5GQzevh3rs/2K7HwDpIez+JFy6E/PRfHt8mNkZfuQJKxcyyzWFcDpVGgg0aB2vMH3VaC5+EePkXsE57A6wy2BbbZreIT56DeOF8nZ/6FBjK8QpYp/8HLF6uvI3dx44BBM1F3WdR4ZvtdgKsg3V8Y+fRo4F1tJ2DGJX/fI6r+e/7eftSR2jZES6scc+BdR8M8fnrcKf9UJW3raU1l4MpqvsuWDSQuUd8zZEYxnuz4Uy5xmSLhcZVWxDsv5v/np9DWPKSQqxa/uHqaxnnG6SUqzmz1ieYqM3EE42OW9f64C3IbgPGb3BV+OLvKE0vLqt0m53ybj26HF7WKXGzIB//Dn/aY4TRhIo8b8UB2rJMcQzShlNvshP40B+CJavgzv0H0LwmkmAhRuc9YieA8t5qosMmj9sqsEQ5ECsFq9oOfMRZGmhWzgGaVwP0fKwcLFain7dLIT5+FuKNP3lMqwAL8EY+6z4U9slTlbjs/udPkB9OhfWj6WAl2u1DNq7SaRA75RYYidWKqVqQGz6B+9gP9G+FWTofk1cRteSH3gq+sz7fy33tj5CpGlU3PvgUINkJ4oOHgHSt1o1W7wA2+ESwRKVidO67t0O8c6PO23TXNFtTuOD7/Rp8+E91Hm/8GfLd2zSr9T4KchTZlWC7nwbrIL0t17n/IMiaxV7ZuUeFiwwiagdKhPpaJe5lIBzYp78K1nVniMX/gvvPM2kLe2EQz0s60jcl3WDtcwmQqoNMNwKpWv03XQ+01kDWL1eLInNaIZ1WQDiA6xi6QlKH5FQfG8n/iigsik0qBibE6s8/WnujZfO1rovVUsq1Nhc1djbe4LgNLdsNQGZzNsBsVYyRxOc1s5Bsaiov4yzbqUvP6sPKqkomuT4wBh6x5rocFbLDQyb8pM8Pciu0b7jweaOaaDQhTnocvO9IiA+fhvPCxZ4uDUD1AMTO1MfPZB86CnLVewGoqGAwBZTnvkKe9d0H9okPKZFZkmjmZIBsi/7nZsG676Ymslj9AeTaBWBOC2SmFcg0AdlGyEwKsuYTyDV01Ehupc/l6Rl8mAV73D/BegyBbK2Dc/d+sI67D7z3cD3xnbQCAaqnEt/pn3TAynuoeso18+E8eoTB5nLtFtL22iWwTnkesnk1xMuXQ9Z+ohYT6+C/gg08FHBaIeY/Cla9Hfh2YyEzjRCLnoCYdw/QsAygxUehdAH6511jJZ1hETjFyyBXzIb4/FXwXY/yyu2V381CiixYWXewLgP14vLpTA0+6z+EePcOSGJqGuVDIE8AZB9xK1i/vVR5Vds4aUgnpVgzXWexUsjapZBLXoTMpnR/ZBohs9Q3zQqAZZ23xT+AzVw+Kt8uuyB22nRISnvtIr0gJjuBlXWB3LAEYtFUWPv+XAGiyjvTAmQaIFMaRClPd/Ydqj455pj/zWSNftNG4c+fEwFLVg72YclJCrl2xeK1t0DytczCSjCsdaS7oYzH62W8saXvjUizbaJ0sZXlq70uT4S1ZgCSLXVl5Yg51V26Vx9eVpW8MQDG3Lje9IwLEUR/BBFK0mTlcdhH3wk+YB/F3sS7d4OVdVK6OVT0gjX0FK2PW/8J7ZEGEhUaTKaekQcmoYLacbBEJ0iaWG5Ki4WK7nCgtDPi57wDWDbcWXdCLHgCiJcCsSRYvBIgYGhaBbn8zQLOf0YuUsA64ApYo87VmNO4GuK/98PaXx9a6L76B4gPHlQTk0RPWAnIT54D67ITrCNuV6DhPD0ekkT56I6fvJkmgdJuQOt6NaH5/leC9dhdM8QuO4OVds4VjAw0NZ9Ctm7Q4LvybYi3/wzJSDTNbW1U4rHPIGlFIda472UqTfHW9bAO+A34sNM73P/is9fgPDEOMPz/Qi+rRXAK+Hb7dTjN6IPurL/BfY0izhmBQCJmJdZ7BGKnPglZsxTZe8eqvuc7HAL7uLvUGHMeP1UvTKQ+GHsVeN8Reux9+gpYCY29LhAeMLZb0I2nk3lJMinWLl+y/jYKSk9nF4HJNSIrakqteJ1b1tjctxLp/1nGKB8bPBCuHAQpi8aPa7eTog/45jO1rBuj1XVBLlmZjGOJtBt3Um4ZHGdEMmH9lHbG+5+8Po9cMBlgVKj10yjozWAnED/jZQVQSnSNWGwL1pNAzVvh5cq5cB4bFwBjSOw0zSjVA2Af9hc1AVi8RInRsElUToDFEjnQI0bnZgE3o1lMthViyb/hvnylLpsPHqbMQNvKuuyK2OkvBEYN2VqD7B3DwYefDZaogniboqE5YBX9YJ/5uqqW89y5kKvngX/nNCXquXNuU2JbSBzxK+Qp9iSBunpAX6DwhtYxD4JvN0axaLF0plI38O+OV/VQrE1kYe14OFj3QSAdo/PcOQCPhZSFwRY7SlYIFYZRZa1CM3LwwaeCb7e/Bm0Sa0lHyWkxs8Gq+oFV9dELQs2nqlxixbtwFePXuswQ41UXBPiw8WBdd1GirFJfWDEwuwSs1x5gSTIm6Y9ib9TGavGkfPW0cF67HuLtSYEDkKnH87+zHQ5C7IR7FMATawSxQiphSTXEp6/CeeInavFDNoXY+JfAuuwAZ/rlcOdOzhmolH7T15WEtQPqqsf88vWI+Xp5s28LmhKlrFu3vOH5eNKqY3G7JlZi11rxWGOs1G7hiVjGSjBhKck+7Nmw0XgQfYGpEBkL2GkffqmwZF+LKK222z465M9w5cVqj7HpEqbcIjyBxHfV8xCo0IAwLZ0+EwjSMxuFGBhZn10JmRWQGQGRykJkSM/yDXy4hfhPZ6pJIVtrwUq7gFX2gkw1wJ17H9Bap9lOayPsH9wAVlIF57Ub4M6ZrEUwEktVDNZ2PiVdYA0frydGlpgjibQEABQrinR8HmWykmBq4nMNnrEyuO/cCqSKn8Kq2p/biJ3zpmKxxApJj5W9bQ8l9lm7/wjW3hfCfeV3kGs/QOzsWWoyOdN/AT5gP7AdD4Xzr4shl7wQ7LQMgYmBKvaJT4GVddWTlvJ4+FDYR98Lvv1BEIunQ3zwAFDWA/b3rldA4D5/gWLJfNg54AP2V7pS59lzizNs4cA66DrwPqNUu0rhQrxzG8RHTytWb+09AeKDRz0Rlqk2tPf7Jaz9LlEDNHPLd4GWdZ6xyke2In2j+s3XK2rDGuszArEfPQEWU0Fu1Mf98F9wpp2r+4PAkwA5VqbGi0xt0NHjinz4bkcjdvStECvmwvn3FWCl3cAHHwtryLFwFz4N8eGziB11qxKjlZhN8X/XLAQavoBM1UEseRli0TPhyCTtjbUvcV86AulaB3aJDavMhl1qgyUssBhX/2B5BjvfDchD17Z8gUO+JV5TBTu2qAdyOEKBh++AvXBi3e17VGRY9iIwdgwDSE9Cr3wEiSeYFHd0n7mwYKT1rwcYH9h1nJT8YSMoV0GfsHC7FytKIe4U2UDviSAaGAVEVkJkXIi0A2Q1MJq6k0JOLB0dA4XSCd4lJiZcMDcDa9+JsMdeDtm4Bumbh+UsiVIgfv5b4J0GwPnPJDiveae8+vvvPKZVzFxEYiMxFPvAn2uWSOxDKdU99kkskUDTyWgdFgR4lx1VEdN3HQK5blFBCddnDFR+a+S5kM3rEDvmFpVG5ubdwfvvA/u4fyiwdT98Fu7L/4f4+f9VE9B58TLw7Q4E3/lwBfDOi5dCLHzUK1euxXILn0Rs/Fs5dtZSg+zfvwP76HvAdzhYMyLSmxK7SlJgcAoBS0HYaZktA7MTEB8RMBJjzG1xC/WrcBA75gHwHccG3ZN94VeQn0xH7IdTFaMia7vzxGkQa96nOOCwD7wc1t4XqD5M37wH0Oody+I78kf87fP0cb5es6IX4uOfA6vonjesss9eCnfu/XpBUM+TTloTJ27nC1YaDHSfxw67GrJuBdyPXlDMnPUdAWvHMXDnPgCxej5iR1wHsfQNuHMfBMq6qrbjuxwG3nMwnNdvgfPqtR4wdnzaB0+amxk6YIqRjkRrTVYBokX/SmzwhAUe46qeKq57QF4L2vQjiuNCMyJsc881NgVrZ2hdgL83zWbHA6xroflNIr4Q7gk9Zy56O3pfFW3D2xdV2sK2K/e+obbhrUs6WXGMEILIOErHAAAgAElEQVQNqBx1w10dBQzzOfnQoGkyI8Pn5vpwvykJtvdOIJ5JFTSOVisFjKkcMLaXxJe/T8Cko+4TxtnDfozYkddDppuRuW0fSIv0g+VAohLxo28G6zwAYvm7EJ+/qXVp8XKIms/hzrymbT0j8cLv/hix718H6WaQuedoyJYNSomvxGYCRkFHfngiavchSJw9XQPj5CMhV7Ud41NLt5rxxM94GtLJIPvYaYidcDdYvBRi1ftwnrkQrKInYqdM8RjjZRDzH4F99GTwgQcpcMw8cITyGwxEt0gDWwf+BqzrrkqsJQNP5o6hiNH7Ox4Cd+49cF75NVjlAMTPelOD8x17KAOCfdhNsIacAPHhM8g+d64WcYM5Y0weSQB/IVjvYbB2OlTlnn1mAsSCJ2GNOg/2mMu16JhqQPaJ8RCfv4HYIX+ANepM1YbpG4dqXa5qD49ntDVIfANQsjPi46eBd90RYsV/wXsP1Zb9T9+AtcO+yviSuf8UiOUUsFYdzKD/UsT0eDGNk1SMnA8+RvUBklVg8QogSeqUcjjvPUxCP+wxl8KZfQ/ceY9p4F/2NuzRl8P6zgnITr8S7ux/dNAi/uVng3AkUrUOrFILdmkMPGnBImCMW+A2qRMIGDsC0JsOHHXTObKk4Sz+yYCxST1e/uDSgsDYOHviLULKC82bDJhROWrSQZvSRPKBXQ6Dw6YJgUTeqlogQf+ZYnmZ99v8TqsvRdPMEjBqUZoYY6H0o8wv90yuI/LZYW4zYTRNThNw2KlK56P+VfcHq+6riTuJyaQLa2cciGWzkL77CCXqFdt0Rm1kDToa8RPuUCKi+8E0rTMk0VfpHMuV0UWJcMpFpwQsUaqB8f4TFBDnPiHhRF32daykx0uc85LKI33zSFijLwPvNRSZR05F4uyZYCWVQTKZB4+F/GK2Knfs2Mlw339YibrayTxaaa0/IVUQ2+4AxE56BLK1HpnbCRj/AT7we5Ak7jev1+JmdX8tCtct021JTChRAZes/c94wFhk4JCVn5X2QuICHZIzO+0CBagkVtt7XajAUTZ+gezTF0N89h/YR/wF9vAfK/AiYITTkktZScse8EaiuvnAycp7In7a4+DdBkLWLkfm4TOQuOAllUbmiYtgDT0G1i4HQbbUIn3PCZBfzM9593AGnsgBY0hOKusK3mUn5c4k0y1K9UBSAS2MSncqXMQOvRr23ucg+8pfwUo7wd7zTGSmTYC16+Gwdj0Umacugjv/iSKRIwsqsUKt2pakVGh+CUcgVedqxkjidIkHjDELzGOMxXCxmERXDEuimKAKzlm2cRZ/MvURO8WrCHVmA4USlJAlYJjEXPmX7jMXri40fJhii9xaAYo9aH6krK18vroru+qqDii+8pN279v1IubImzuiNivo8UpJRtlzm3KsjreXY4wColUDY9SFOn+y5gNEGDz8X4WQTReS7/p9JE65O3iNDAbMd3amePHL5yg9I4m/1sAD1XNi+Xtw3rxNsUrli9ZSqwHAlF9yKQbfeL+9YB90GcgVhXXdAcyy4Mx9HLJ+mU4r06z0m7HRExUIuO89BueNWyDrV+jJrvwNCwCW0Y0K3PuM0MYh8pGzbCXeypoliP/4SfBee0B89qpya3HnP6aNEF0GQjathnSaQ04nofbWMrtus377IDZuigLCzK0EjHeB73QoxLK34C6aBlbSBfYBv1LGF2fG75Uu1tr9VPA+w+Au+iecZ84L+eapRI3thWoZq+yLxLlvaWB86ly4BNhUAgLmIScp0VoxbikQG/corJ0OVm2Yvml3lZ+pw1KqIaVCNJmpNsCwXsOQOPUesMqeCujTdx2tdrskJ+q8Mw+fBffzt5G8aAZYeTcNjg+cAbGEDFgcFLmdE40INq7nwIrv9n3Ej7lZq06U6oDGOY1t7RLkLn9P6Y7t4eOQefYyWP33hLX7sUg/MA72AZfAGjASaWKp5IIUDK6oySTXL21PPH+QROdMGM6IC6TqXc0YCRiTNniSxGjNGEFHqpljMIquHWZD5qDV/aPdStkvNzwcmwUmf+JKcWfPLgvnsMfhytGj7XprQ//qlz8g61rRD2ucM+E44eIeOgNcG6XYUgb5Ghjuqhw56Y22Xm7vnnvPznfCwVlqS6y5KBWw7oUw0A/p5CtUI3UPdY25eitgJJc6ATframDMeCdJRhi5and1zQSIIp0dvBs5vCkoF9Mg1XMI0LIesrUB9l5nIbbv2Sr97L9+j+ysycp1Bs0bEDvkN4gdcJG65372JpxX/gJ36dtaFCbLYRBsthDhot0lxD457GE/RPwHeveI8/5UOHMeUVZQsorb+5yjxTgp4cx/VgMiufvEyuG88w+4S8idxq+AHz3Hm5jCQfz4v4F16g/33fthj/kleOf+yL78JwUa8cOv0oD79l1w/vNnZfW2Rp4Fe8xlkKveR2bKOL0FzmyfCA4r6bHfnoj/8CllrU3fMhixo++EtfNhcN+7D9kXL1dW4sS570BmWpB9bgJYshL23heDVfeDu3Aask+fF1Y7KCdrhY66X0lHWdEfifP0MM48+VOIj2m3Dj3iwP7BLeB9hmuDFG1R7KH9QGXTeqRu2UNbtf0Atyq8qpd+kI/eTxXb+1y9UMUSui73joNY+jZ47+8g+bOXVXbpyePgfvIy+Pb7ITH+UTA7rnSp2eeuRvY/f8uJ0iRSGztz/Ca0Bh4CRscjrPwv4if/A7xzP2Rn3gixar7yOLCGjYM95Eikp5yL2P4XgvcegtTNByB+8p3gPXZF6u+HQ6x8L5h50V0weSzNuJD/rIdaoWgo+pruZgaXGGODgE1MUTFGW4vSpGMkw4vaiu4fuFbA2u/TGdN7wpzDxrz3iZUqji7A/fysj0//Mnuxg+Eq5/2iDNmGDBtx51d2Jq2krXlryl8RjhyV7+cQgVUTGf1o0d4Yz9vLHwHZoGECxkjiNAGjA6QzoUVSRxQxNMn6FI0gzmA09mJQypBsEyGhweomgNIuiB/1V9hDj1RMIjP9j0qsip94q9qJ0HrtborRWbsdgfhRfwKr0lvgRN0KiKWzkH3tZsg1C4MA3N44038qeiNJohkBrEWGFy/Qge+a47nlKCfibAoyTY7dzcqxWzuC0/e00kHRJCkgSOvqxkpQ8qt5ynKenf5HWMNOVuIhiWlUvviJf4M96Ailn8s89CPIbDOs7fZD7NCrVFu7i19B5vGf0GF6hm+e15IGQPIdRiN+ysMK+NI3D0HsyNtg7XI43PfuR/ZflyoxOnHeO5DZFoiPXoQ15JigO5y5DyA7/Vdg3m4OXRfj+AhvceGdBiJxzqsaGJ8gYHzeD+etfDVjB+efZOrMfRDZ5y4J3Jo0kCr1sbJeB2OZRNjD/ojYfufoR9JNECs+gFyzCJJYe2ln2KN+qO5lX/orBInOrQ2wdjsUsf1+Grh0Zd9+COkpF4KXeuqWaLxK10H8Rw/CHnwEUveeivhxN4BX9oQz7ymIlfPgLnoB9sjTwAeMgjN3CuJHXwekm9B67RAkfz4LvKoXWm/YE3LDZ4EVMjqcQ9ZJv74eMQlNR/90yGKRpbz+VTpGAkYlSlvgSQMYycikHCh8v82INUcNdgMFQ9gQsckYZaWvnOM95tQdwC5YV9DaHEGdoj/b0Xp1NJniz7XevdMOiayc5Qp0UZn5QTr9KClm/UNHcuYmUl5gAq+hAv9h3/1HWfgIFCPAqBo6V8agHP71cFSynAnbfC8qeUSov5oEe56O2H7nKh0PsYv0Uz+H885kWLsdhuQZjypdUMs1g8G67QS56gOgvCeSP31KDVy1Y6XuC7TesJdiACFA9McCsZqBo/VuidYGSNoO5oGe2u2gdqF4/oEkT5COjqzWtnYLYdKBILHY1/3lKYf0BXvoMUiMu0ul1fLXkUj+5EHwnrsh+/odyDz3f0p8jR9yBZz50xTzSZz9HJzXb1NuKLF9ztELwtQL4c5/MvChCw00+pGoQOLM6WCdt1dVFcvegVizSIE3+Q6SzyUZqqzvjPO2txEI/UHrGxtWI/3YjyHXfeT5J1KCBYYyjyFxyiPg2+mzT2T9SmSe/xXkZ68q/RwZf2KjL/UAima6C3fFbLiz71QGGO1W5qVN45ZEaXKKpbHgT9ZkJ5T87FWgtBqp+36ExFHXgnffqc2J4342G86cx5E4/jrd55O+pxzplfHFrIb/3XGUCG71+y7SUy5A/Khr1KJFxh3JY8i+eA3cRc+p7ZKJs/6pnpOuA+fNu5B98x+KyZJhT0kk/sfre/UnSjSKld58zhw7/nej7ASM6UapdYtKlPZ1jCROkyit9alF9YzGfAt8iw0cDaauAZqWjVomxZ7s3E8/+bLI9bUDIxXQuX1H8iF6gjxBQt64QekLLQkGapkoEXonPLOVhEMOvWR8oX8kSqfDBDgiUbfbfnkrqxeJL9pwNMFLLvgXWFlnOB88B9Z1R/BOfZCZfg3E8jkouejfevfFuiXg3QciM/MWiDUfIXnyrQqAMtP/BPez1yE+fyeY5OGy5n5R2rH9zgNL0j5pMq5UALQThYwvcdobnQTI2Vs5EpO/nPZvdBZNR2rySdq/0fuE6kcjULhInvcvWNuNgvv5u2i9ZYya+Fb/YZBNG+DMI7CzdNrxUmVp5VU9VWqpxy6E1W+4EtPJpUc7ufvCldHUUiDxw4dg7UqGlkY1YWlrmwIv2srmLwwBpyWLU1w7S7uO3iMsXDhv3AbnndsVTciBmEpF/Zc49m8hlhnUuXGNcnshVqe2zSlLvrc9UKE0bRZIAyIDd8V7cOdP1fVQHg++OJ1rQWvH0aqdnQ+no+SC6eCd+mtH73gy5Mfov+F+9Bpabz0C9t5nQCz7L8SqBVpCiOsAEXkfK4bSKxaq3VNKd632p3O0/HkkxLpPtIph6NGIfe9y8OreSsep+j1RCrFyPlIPnQGxfknIt7TYwO/I/MifEzo18zrFJ0g1SdjEFAkck1bIXYcCJwWxNc2zfkIFi+KCeTN8jzZDAfKH9gWfPtLupO7AA98IMFI5sjdvfxOAnwUBPyMNaVazrXLnkZxIWymrNLnrBMBIq+TXUc3IEKKgCANGqd7m1X2R/NFdSg/XesuhyrhQdqk+CCnz4l8R/94vlOWz5c97IXHsn2EP+h5Ewxq0Xr+vUsq397H6D0fJRS+qx8joQqxDMUjSlZHxJdUImW5Q+6RlayMSx/wR9q4Hwf3kdbT+jazeOd+/PIpCi/n2+8EefjLcj2fCeW8KEifehtieWiQs9hH1q9Dy51F6H7Cn38ub5T4zJ3eFk25HbOQpSE25UDGf5Kn/AO+1a3tVz92ntr1xL22sCoy5xuiQLuLH/x32d46HWL1IuUbZI37UQReRXDbpx86ES47RKlQj7RPXfoehcajiOHr0R9FK2tViwR52EpKn3KwSa73xEIiWWu1mk01BrP7QA3CPkZKlPmYwX1+soeBrvQajdOJrehFReuKEyq/56sGKxpZe8h+wCu2qR+MoNXmcWoSTZzzkAWUD0lMugrPgaWXo+SY+tLakm0SOLXqMkZy7lbuOdxQ6laXQnI6SU7/MhXBCJcXY3dZFn+poIV/B5+tAjILFkn/vXSpSiXdcIYeoBwosTb6Pc4frFVm61Pj0GCMpf2UrsQsyAhRgLcbxoL7A5OupcirksPycC1yWn6L/LlmDS3/xhlrds7MeRfqRs1UorbLfLVKTsvX2YxA/+mpYfYYi+940pKddirLLZumdMPNfQCsNau98rvyjMnWFrZ6DUfpLvR0v9fBFELWfKdZAaShXHfJzI3ZF3xNlsHY6UCnr3c/nomXSgYox6pS0+5H5Ca4Qg1LRc7jaoZI4+Vbw/t/V7h4UtcXbbkgiqVy3BOl/XQuxZkFuEVLJ5tLWUWw8h1zyv+09FPEDL0DqYTJQ0WTlsLbfG9aAEWDlxB7bXAIhm2uQfeV6r4za4T8YV1638e33QfywK5C69xQV4Yj3GwVr6NHgXQbobZvEeok9q10oxIJt75/e1kdMtvX2AzWLVZsHSJQ29ZjeOPaNMV4ZVPbky7rXaUiedKOSCJqu3A2yaa0qIvO2uAftTu+ppjbkW6/tyOUoccx1iB9wLrJznoCz6EUkx92m+pDGS/aNu8F33A/x0efDefdxpJ/9DWQTHbolQe5DJec8Cd5zF6QeOAvu/GfUTp5ceF9/IvpNZ/aXP0V1LMyctGzuS89d1d9yM4SMoHSagzK+EFv0RWmbaUd2ZZXOjbzo3PfVZ8EjxlyPQofF2GKeYiPYZZ8W39bVYVDRD35jwEiZNV/Xb0Qixl93BWhTbwc/hci9iYi5+8qNQjFGjzUq44tpHY1mGV2XzJN7zYlpPtdGsel8j/OegT1wb8imGqQeOh9IlMDabk/ER+ugDK33nq4mSsn4+zWjvPFg8H7fRfKkG9Qq33Lb0RBLXvPdsyP2SQ/gO/VH+ZXzNA44eqeLzFIg1FbtlEx/lb9bg2KmVp/dwXsMhLtqEVr+NDLHGINN3/4uhNxADwtGXhBcK+HhlTezVVQdan9COo+FFhxR5gzwtoTSrKB3yBldJeHFqNT+MLl9owHAhhcpVRAF3JH+MIcGgR3lYerWaPX0YzIqZmvMArKSKpDSoio5XetAHb7xxRCjA5OngYYhC6NE/IDzkTj2GrWQNF0xEGjx521kTBOKBm46EcUbAeOJNyO+7+lovf+ncOY8BmvnMUiefBN41+08RKMtjwJoqVPO8MQslThN/ygqUHUvZP59PZx5Uw3G3PbCk4OHqDhb7Hd4LhG7TjVD6xb9fwmufBjVzhfl4to+/OgnpDpjO899jzY7WDybzboHlfxq+X86CCgdeqz9knUomY4/lP1Lvz9IsCuUz6H3WiHY8Z0WfEujryA2VxDTwqwajtgiGV8IGGm/NDl4k1U6cCQwGVKYlIcPlw+vf9EhlA8furS83zCUnj8VrLQarfefDWunAxDf+0ehxmm5/Vg4H81E2S9ehfvpW0i/+Fe1wpeMuw2Ztx+A++mb2o3BeMuEBHWnpBolZz4MpBqQnnEzxOfvqhBgjMKRKUtw7qPmfef+yulcttRBNHwRWODNsz18C6F5Ho5ieKZ1sJBjqcGW8vqz4Nwzw3x7NTPdYPIKX0TU8t1ofC8DD1uD1T6MxSrVQrAfPO9bYNUFj1P5MX2D8kWsqH5Zi4E3xckkR3irBLL2cyNqQ35sygAqC5WbMSROuR3pJ3+hw4mprVVxZd22B+4D1nV7ZcBj5bQNkBz8adtk+Py3ltuPg/vRyx778+Ubz5JfcKzlH6fgPxaMEc9dR6fmzxndzrRmppoZrCRXOkZb7XrxQDGWE6VDwytvjfOIQEAnfTlHP8j1PJkU++WyiR1HoI49+Y0Do7yhb4mTBVmptUj9ZT6RiWcaX1zSBRnAGMqmEAn9MuXI+QuBd+qL2N6nI/381bCHnYjS8fcoVkeg5Lz7BFLTLtfmTRLjyMjgR+GhkdSRiDx+OUmUVaPDi5i9UeUvhFi5vavmfA8tH1HSRg+aLgOh0WQ2cqTBDWlUgTO5SxlO04GwZu4aK4ZqJuKFQLUdRtTGbd/xOCiHiooSnEgTRtgQEhdoIL9Z1QFaHsFVeftRf1QjFuk9o5DF9EyKAXtxPGkskFqAouwkCJRpF1aVMmw5C6d7W0U3aqDohzdhvvjAaCu2yLUPY0IDo7JKk7/mpqKP1yycs8X1aB3W7dL1/pkRm1C5wq9satG+VAFar+m1vw02wxHKzVN93J12h6juDN7UCL58MVgTiQHGwAhNDDMsj/+YjsRMrDEkSmc0Y2yrooUE87YEhsKCvOeKpAaSACNLaawEvKKH2gusDCJkfS0AfoXwJupkWIi1RjtBY4tmeUEZjUEdGt8+WQsxKd1KodPjvIzz5kYAbsaREb5jut/aClC07kmLvl5PBCDoiUeBGO31kgeIXnVCTK/QPG1v3hbtrzZHsdniOaaYl5c/sEJKzvDxaiH+71Ok0O4ZjwkZB05pQ60uQ6QkoaHhA1cUZMwxFTX6mnOh0DgvNFfMNizWbH6VPOcGtDYzaGD0wJGs7krHaACjP9iCAhs5hQoeLoHFIQQThycvX6WtkF/x51sBRqpD5g+97hISP6XGFD37wdljn1zVhID14VzwZfoAJhPY2upInzH6ojQFkWAeMAYJFZtFHen5jjR+W7O0vRlcKP3QCPceaKsORXu0HQbV7vIRKZw3C0K7morm7TVu4HiaS0tH7MpRSK3jy2evHWn6dp8phDBFXsp/tI2p4gN+gZhZ/ltRcA4t+iZItlcJ1fdt9KU5NqLjpNgYb29cRt9r73lflG4hpsgDxmgpUZopcPSt0ib2hbiP0Q7RvlDqacYeif/6i1Pba65Nvf+tAWPT/3XvEUvyBeT4LZNlWq/TpTvcgYOB0jJVH+v9WeDL29zSGKp3IEordx2pwo75wNheX0bHUxSQ/d+FxlZHMLWtMekDf1vMpth4b69eZrmLMQF1XWVOu4C8H74hQiWQO6XP45TaUZ+e9Qvti9SBf5oBfjkiGGY79K6y49DqaJBKz0Ibqlu08MYKWbQN2hjd6p22Ot1IP1eTcII5K6wpFhqJdnR2bQwwFpjpHV0nOzpWollsypgnUbq1hcM2gJHHmLcl0NsrHR34HZTZbQv1TjoztPSPNcs3Ffjae6+jXddeOht9X/62c2Vaxpa4UnYNtUcsDnfEAZBduyuLoPXOTLD1RgAMf39mgV5W4yuwSoeBcaML2MEXOsLDOphU6LGNSndTR7yZowdyoTnq6/iKjRLf7cQDRUVkzH/tVdwHV2U00yCrPXeIURieP/5uqejq5E+s9vLpyP0oEBbpgDb7JdpOHVaiGYy5DY1jR6qxuTxDRvLWZgJG2vHClI7Rimu2GPgxmsBoLp7FFizveQtoyDp8YMW1q8kv6Wv5fGvA2Hx5tzMtjn/QRgJzfKufsRjcAw4FKqqAbAbWay+CNdbled3ltR+NLwpUSzvjlPHFAcsa26C8JizEvtpadTsy/wq93xG86ggT9J8pNHcVczN1qF6PtsmiCrIh32iam/pRybc9SZlA0WQXxepWcCSb9TAy6kgbRvG9LWbcXnp590N0yQsGFzzkHQLVluRfTPlnFFrt1S8wNovN+I1qVzMf73sU3Iv1ayGmGF2bouKvn5ZmjB4okvElrv/5sRiVp5XXNu0x3mh9KZSjI3BxxbXrtPf81/D5VoBR/hY8k+k6Kyvk8KKdX1UNMeZw7XOXSYPNmw2+fKnh8qDfDDWavyVQnRwpINNuDhgLjYaCANEBqtAubTDQvhgKb2xnbhSF3NjEizwfHfX+Y+YsNl7VkWg6kHexBztax0LPFSlTB0qT5w9UrBgdLV6QZ97sMhvUG70daS+zEsXqXiidQqhVbJX1N+60lU575TDua8ZIbjqenjHhidHEGGmn6JexStPeIs4Wzt+wfo8Rd+IrC3oTrV6Hxs5X+VDTJVUHWbb1b0e07WAutx8IOdIwyqRagYZ68E8+BL6gwKXhUmmdl9DbXsmXMeOCF2CMAaLSl+jgLbocR0ZkdJkrsOypSwa78Db06kyDm5El3SxPG2kGluNIx+R7dURi0kfr3N5yba4+HahzUJz2qFlBW2sbM69Q3gX6L+d76aVl0J5wfxRwQ2m3zJvmutKhuRONqGO+ZI4hf9AXpXPGOI2CXHRs5bVfcfaQ1zTGBb9dyYruOzUpxthMjJGAkURpDouMLqRnJMqnfPN1gYJ1MpK9/lm4UygGheOIoytvqKN9jl/551thjM0/r35RCBwSuG8YSBV1ixO7DQV2HxbykmdPPw7W0qwNAJHO1g7etCPEA0Y6+6SDzWb2S+F4dW0v1x1hFOFncr/ChKcjKRWrlF/y/DSieYedSvIdqcPt4TuO+PmGW9Usf87ZN1w/cy4Xw1gzVf128RiY/spYjCxG38yvj48MujTR9tA1Ldxjha621WvF26TYiMj1b+F0275aCAML1ye/1n7KbY1Vc0NE/kiQ5EuD1iYtSivWGCfG6OkXaTugxxgDA5Y3IMwRQ76tCmw95NX5eH6vKkAPe6Pkr7X7f5m4i34rN8ye+EdIwSua669iY+5NfePA2PCziv0si7/qio7vZpc9egGDhgCdOgPNTWDTnyuMCurYFR2sVjNGB5y2zKnWNro5mEkFhoC/9Sg4klA/83GP/fDgnrfA4TH0qV+E4Z9PxYilT8D2z1cJXCgKyJN5oqPvh+kvlx4tM5/zv7crn3qVMV1FzLoGLVWorv5N754aeQbMRN1C/PshhPENB5EjH6M+qN6AjkYsVkkVCHgaKoc3IbRrR1SpaoBX0fhZHVhoCrWzaorotCsA737bh9rdbG+vfyPNG4Y+T7wIrQyFdBNmFGcvwbzjM83dRZF0g6YIPM/DiuGgqAXu5y0URh1VW+XGghKlPWBUbNEAxoAxlpVD7rob0LMPUFau31+zGuxVHdw37xPpRosR/5GHV93UoA812sSPfOxEq2G7Pp8B6McYFnGJn200MNKu2LVjBl8Bxn4CyL7dZywoo814HSkTGR2bL6qY4YKNDnZMmMt9Macmv7M8uVStJN7ECzCPnhF0DKYEhTxS4JjRJ/aZm5t0dv6JKvqXz14KSR76nsSTw6/B2zuMC1WzqmUVjpp3NYau0FGh/dTCGw8NB2gDdHLP5FxhwvPGZzFmljmeZVsUXVoi49D5zbnJmnPtzokq+m5OwR+wIH81VuZgcxIauzz0i8Lz2CHlhzq+SfW5vq7/MrjSu0fXKLykMjoztadFvxN+V8UG8zaEUBGD5veu5drULLpn96ZgNPosOKXX1LvDJJ0RoL8zhbbaI1I9R9cBLumMWf+7vk42ALquvkum0qB3PViMUBlzDSkw6HNjKddXuUnmj6Yw7JutnQtgEu13nz371/2ezrmPm3n74zyXSi4YRM79KuBgxujNjZXoBlpznIWFXHPkewOGROkoY/R8GHsD+/wAABucSURBVFUUPPI6OHEcUKLPIwo+ixYA71LovSJqi9woUWW2OWaVrmrYh44t6AgGFXqmftYECh31YHCP4bmNBsa1Y4dMkcBJfiKJDOtc/foH7cfKAlB7QenRMfCpjg6YnQdI5n5LP/1CBTTX7CiwqR1SZJH29ktzP0hBCIAjPhFmAMzIObf+dP37mIfRlOiC9RXbwaXzgI3P7sufwwmzL0PSMYIGm2gbraxZljAa6g0i5pY5owH8r7YlUZIQZJlDayp0YLkKpapOryegAhw6WUEyRsZ/VzCWVYGzGMvScdCS0z04YCwrmHrWEf67HA4kpcOFpANS6Oh6AkDun3ziez4GJ0To4328+cppFkU6L1Qvg1/Qa9625LxQAR1acY2+iIroqkjGGhME3aLzuCRhKEG3Bk9IySm8AZNCOQ1JAZtLWLQzmUnYELC4pO+SwhPFoP/SM+o3h9SnmUgZk3SN4o8JWAS8+tBvLSVFu98HAX8BC4edCW1Nymd3+fipr5htHx2Lhd6JElx/Yvlp5es4cjhSYPs76RhbmizYcdIvMs8iTTtY9QmByir9vcOB3n1Cc0k+Ow1s/froxq/gGbN/6Ts1rhDih1V3ND+8KcAo559f3tgS/1ACfkEcbmH3jQLGNQcPPh6CPeG12Ycc7JLuMz54oSMFkhNR0pQqf8+VcpdgNSgACgUVgtFOLvSeVyi9dVRvC6SAtQoYTZSN0kNTtDAzD6homEc6PIHPuo3AGzudjoV9Dg50n10al+K0189Bz/qP2m8OXxqKgDUxKwZGgOaCSYpImiHwAkNGgGckZMayZLLKcreXHM11sP+bgUX7RDPCoueYSyDImHRIzUrbplQoNg6a6WFG5iMOU+cwqXv6EpEm9Vtdo3vK95o8U9TZPSpJdd3rBvVXNavnjmi+5z/nNwpBrHnNZIfRhgu3vE4/UMDkwW74bfKAiUYeFN47/nUCRg+RVU/4bpT0HD2j/qqDlbyFnMDUg5zgvtbSqKWDnvU4sGKcHqMlMLWYgC0JVIWkqItxLhBnAjEpBJ0NmGASCehTNeNcihiBrQQSBL5Mg2oArCFcizZStBGD8d3+sGz7iY1LyAdGHxR1dDfPj9H3U917HyCbBdatA0jlVVoKLPaCb5vspxDJMOa0zbC0Nd28e7fJ2Og90w2zJt4pIc8ykPeqqj0n/W6jgHH12CFEMY9gwPPdEqnj2AuL24rpFWrn+rNLf8OA39OsjwzhQPGthVb/E9m4X2ANKdRVKh4jBWAmcZrgROrjU/XHTD0navqiRTh3X+AsZoZhWNp1OJ4cdS3WVO2sUo87zThh1qXY4/NnNbL48CIgWZKtI320YCwNsLS00CoZUi7jadholUBGcmJujBidQ/GiiZ35sQY0sAn0yKaPtaQsXReLT81YVoMXkUmLutSSHqPzJqpQXE+zNw10mv7RZJacUWPpe/4z6j0tDWnA01oHDZ7+tZwUl2tQxbsM8KUSEcE0G9UvQ0hSz+lh1LMeYG8sUwyNqQhomkCn2sADPaYDIPpDgwRq4ssKgujQQ2/I+HIitVYAlKo1KLShHlZ+7RmtbNRaOuiPar3gPXVqLEG757/uxaZQ95nWClCHqzw8xqrst8RSIYidyhiXMsEEkkyKJHNRYgkkpZRJLmWJbJX9KdyiytyD5lwFw+ojv9JRBUtunvhVy7VsWJTOCdO5J3OGHOF6xhdijN4/Yosq5okPjF7SbUNuIRkgjCBaXyKvq7yr9bIIuLT5s37Wxb8G2NXGQ29Ujlx5IGOPuxsFjGvGDFnLGLrEhLNjp5kfLu1oIRrPiA9iFp+VldB7/Tbp0/6K5QORYoykY8ySHESEK9fdZtaFiCjdN3MK5eqHCvRC+pEaK4Mknh3xa8wdmgsvtseiKRjzn+tQ0lqraQjN/Z1j9yLGUwQy68p3Kuve/EmTJhpCcpoPNJ3ImOfp3bgHWEpbpvV4ssJJ71LlusfV27HJTZa1wtPzqbWAJAoveoTS21GaaocfAZQPah7AabDTQMaZSz7xckPlrmUPDf7bOQctvfHRoeueXk7vkXJbPavCxitKqQBSKXO4vu9SUCB/xvjPqUb0LBIUstG7bxn3Ff7471Ei3kd/s9RpBRszTOhAP/N5oldueNYH91XN1X1trfF/e3VkLleHNyjAI9BS36mzci2pAFA/o6LvUsQ3RpK2pQBTarDTayp1sgJDyodkdQW66h61jMUYl8wR4MpQS897ek71vgZogliS8VVa6rr3jA+uTLCY/DhzjmKlvjHIDzfJPUUqFc4LY0lo68Uh1opYb6dRVKKOEreO9kk2zZBJaaOLb3ghl2S180XHPw6oTi5NM/eOdr/uVovJtHDdfarvyc5tr4xS/taun1X/R8bwS0Pp8BG33f0rht2idtNsHDCOHUKHEn/aY8YHHQ4ZJk9EvKE8/qoA2ysnc0UUq1Hx1kSnQqgW7T2/JbwDi7QBRusa1bZC5oVlUs95Da7S0AnpPdakqyC2SX+9397ZUvq+vmakoL772+AW7XQEnj/oWqQT+iD6ZKoOw+Y/gt0Wv4AeNYsE286etLz7qOTbA04btrjb6BGjP7nxsX0+u2uRMhkxRpFGKWsFaASQJP4qwCMxWDJlT+qdbbnEYWzeukTiX8rsQUyPnieW6AGpAlHJSFkm6JvUpgR11f+uAM8DRmoZx7Jw28iXftMQ7zWcSTc7aMOLt5308c/+TXilwMsDKfW+B2gK2ChXPz6SoANJlQtFbkT7z3MPTP1QkfSO953AMhxBMjesbbI6ej/NwxjMgU/66uhE8J91BRi9T799TWxagJn3FVgLMFdIRmV3XeoC/WE+2HrMkNLzQdTi9A79ttSSRGBqS+8aMU+PUVIa5IFhWSo6GCdIVODnSjpFlERzbkmLCSa5YpuOBk0Swwm7lDFIU1Ddk3RPA6syJtEt6m7pIGEtzVzu6TZzZ197veF3ivJz9XXYEezRyK1BS8Xp9b4zLpVTNt1XbLZAfGCzD2ieNDfQ6sKU+ExitHbVocp6+kWz13wdfyEcCDqjDWOM9z4H/tvQlN6n3+PwTpMrDJH1syY8Rqaf4K7EJzHGDyoddUOw93qjgHH1mCGLOLC++yvz928Plf37tT+J/55x/IYOVwuAxHdmLbIomKuUD0SFvGECNud9UX+IzamtgdqfUekaSX5R2OOdc+Qw7c7jgV14t4ZWAPqBW4N+8VvK+xvs9PJ/A2go74nnxlyLxQNGh5pHhWZQTDCn9ko6jWsunrnPry3XcTgnzkZ6QEYSSMAg9TUlXYlymdmx0nEuWZOIn5/lzLE0eGrA84Dvk96Hdtll3YtrbQ+k6D49p80KZEohxSXtGtBgR3/p923DX/5VTbzvsVTomGj9+IhPr75kZN1Ta+i3gywVSHWJ7ernY2TXNT5kdTA3XobuW/khZ0LPuvnM0NcKk/Uia9i5VLoZIEumJe8T5KUKlitUNmU8Q+n4t/1n6Lx6Lx3KIks2de+TFWDqMTrNlMCR8rT0NdqUwATNco91kgnLLwsBsaWBVz8H5nDJYtqur8BTid2UJgGra3HvpIHgGgEkKVGUSOyCu0zqZyg9BgJPrhwS6LuUlgJaYXHhyJLYisxNkkptgqH/3R/kAUKaSmddgdA88Pex+xMwoBSeyT4ATg2WCjg1+IPYoioggSKBIQGjJ0YrWuwFGgmxUcM7KIotUTwohj1KGcHl9dX3ZH/RFj7J9y/r1JROnS8kjmMMq1wbP+r03Ul15jsbBYxrxg6+k2xJPWbM92Kqtw2PG35of8+22LOOgDrmJzSbom5vCjULMEn/utFBeRY3490cu/NZo+fTqEDSi1Sv5FWv7N4qpWUq739B6ED9UACSBggGZaBONtQgBJif9dkHb3znLHzaZz8IP+S/l50t0mu7NS15+ZCPr31mQO27tcRpCbwc4UrLUjpFQeOLmI4StMBElkH2TbdOdCwsqk2WPgtXAx39s+k+gJk7/GyHFC+3f7DkqkXSAk0ZGXc0YKnfHgBJi6nrpByOW5DXj/jPFQ3xnqdR8eKyZeapSy64eOem15tM5XHCZjLlX/AOpUiQzdr/JIFkDLI1BSTt8HV1LcbU8Tv0DDlntJAY29rquInCLhZEUIjAm6PLShPpKyN0Co1ZRq3gfYg+0VeiCyXeX5YFS9LZONGh6j9E17OS0X16znyQ2eG8MmlweiZtaxClpiCPMDVGfFW2C0bvBddtSQDHFAgToFkaGDUYx4xrksG/t7LHWNaaPDnbecM1TufGLwgYHQJJR/IYPaP1iJyAkyiYSyCZlqUla9NTpEQ8b1umyRBDQYINQIwCZh6g5vSH1MOv7nUJRvz3PpS2bvAS0fNHhQTzWKFmiNroooFT6x8UgG0M8kTBw3w3gpqW0pCIEzo96E5rG53avrsxxcOaMYP3BWOvS5sP7fni+/PbSrruVOzALfutrIvuPqaZUnHBkHLG7jU/bYU5eahaPGcFjL7oS6xRue94Ry6TPKpYYthXJADFAmwwaCDtHOf1fg5D1WDwixN5P2uXYE3nndGa7Cw+Hjj60qrWxYtHLpvyBTFAy4bIusTamAKtWIyipGUVoMU8NihdNe0lTaS+TnrKChsnu3bCIWAjgJMeCMks5F9Hz/nrOfOO+FWXzNqsjwxKXZ9lssR7rhlAaYxJ9TcO9feGnV6/qCXW5bK4aH7gwiWHX97FWRoo/GQcsjwJKTOQDSTzpyFLyY3H+2Rb4TZ31uA2cANcDIbEib5xO2/h6ajSaJPHc6FjyfEY+OLVsJMOeIyAxAfRJrBupWA1JWANLng1gLo6fb5fUIAqgHnMk5M7bOTTnAYrBzkmA82kyi4H+Q4wNBOE608L+QrEJeMecLY6GlRpgaAYJ6VxsJQjWToGVuKClSzvcyRrLbkWahWQNbKq4YzmLms/JLAlIM4yybNZcALYhB1j/neWFaWJdZkZkqzbxuQJ1Fc+MSkCgGqO+tvO6BkFoDkUNcH23UGn4vkD/4B95/4NY9/8c7ASBrxCsUmyQHvH5xAYWp5u0TtRN9qYphTtz/eQ378xx5Q6IDy8cj3DyLcKtdmss2/XKSBV1SZ9NgoYKYe1Y4e8CIaa7i/PP6VYjqtORLfSGJ/pSDYoqLDBqtR7oZbwfCV8tZ/RsXmWk+hqYbLMYJXzwJEU/8pQ4jl8EyB6orYyisg4Ym4vMJRA8Do49uqANKoiFANKowzR4Cn6t7E7QQE7c5vL+V4yzuticQgCKwK1uIAgpiLJM86CTNIZ7zaTIgNJrCpZwoRIM9lLNu1puTi4pqriavJHKEtByjiTFOO8ItEgp+xyz4CPq0bfd8Vr2x9YlYAkp9LqZI651dDvUv2b1vfOLZC0XIkWSNEMefegx3ocvvCkNT0qIft28t4j09poOGxMDgg3aYRtwS+RYWPxzxC3O+dA0a4CsxrCIMnLwKgd/aquawLr4f2gezWtYJ1LIOkvnX9Y1wryRVAjhZeCNabBqlClQDW2rO8vmMsvzzWbXO12qxmbqmioYXEwAtbyOJTvAgFrmktO7NgSoqykxn1Pu/gYjR5gm/7iy0DGj9DX4BkjDQLM1kQ1VncehLcHn44Ptz9UZdB9w4c47/HDQqKgr3P3nbiVvtJnkL6Bx2eMJiaYUldUujTHUPSd6Pjy9Y1MLnFSYv9uT2HVpgzBjQbGdWN230VAvMcYO637jA8eL5Rp3SnsSRfsuA5FWtmUUrfzjm+dVuzQY4+kdyRuoxmlbl07vSOYzC2wbuJzSN4cBkQTBA2wDAFn9LrPcv3JwZBNlcQGpWKx+pJSJmRKg1pZBRfEUirjdVIkIKtLIDes1y917ge5dh3glkLuWo8rHeCJmnIolu5UhrUS13xnye8E7GGXvTLgyHRnyMEAFiwEUp0gh/eCfHwhZLdBtN0IAlfpU1a+hmb/n0nSJyzeeVwMvwPDwgijHJT7PVOtMcCcVWAUTmpBLRgG6eZK1ITfsxvBSpcNIWdlpfNVHy4fkXssUL52vAWsphzM8sC1IQNWjWpkRLqsc0v6EylREurcEMAV6CKfTNAtg00GPz0gmnzow/i0dy6gS2mqBmc+cyK61S1WcykXvIQMODpwr69L9A06PmhGycTXNXAsJmd2elSO2ZT0NxoYKZO1Y4eeLiFvZVwc1v2lhfqAY+Oz4URcyRi7SslY5smQHruLxppV/WGIy37DmWKAfz94zPui/pisUeXpxcnzxWpKyDsFU62IVCa3AjzVP1RuaddDJlfoa9oRTRt7DVk5d2qeN4qiwOmnaFy3ORYtT8qR2RLIHmWQTi2kU5EDp/RqSAIxerXxY0iaRDMPzBVt3y/wQKw3cifeX+V7LepynvnUso/AsGDysf1zk2lTRsO2d76xFigo9nsjr/bgoYOzQr5vFMa17MyQLpmPCYUwZ2cNpslasERP/Z3GUB+wN7MSOpRfCB1zkysqhkafDc05rwD0zufdR+DOI55UV8pa1+P0F09Drw2eNi0kDXoqJ0/fqOaOZ2wJVGL+6Yv+tI+gUO5YHC8tE7wjPeTPf/XXn5IeaxSQ13d7DG0aYop1+CYBIyW2ZuyQ3wH4OYCf9Jgxf6qZQe0xqJZxzIRk3/GP9NA+w74C10DBApYU9VxQUx8BTZ7j93rOzh9OO6oj0SuaYoq+8THVByxLmiX6CCC5BojVEWLmUNoExADho02pfcT88EjaNU+XmQaCzdHsuji+8xD8+/GFYCcOgsRVADXe7/KHbx6Tk+ehk+vg9/ZduKhQJ/7kqRU720x8BMamTj6m33Hf2MzeltHX2gJrxw5ZLoG+QSZMXt3j5QVXmplGwXXdcdg/buFZR6IiEJl9pAvp78OGFOM83WDs5nlqQOLB0XcikW3CoXOvQ0XLGm/06kmiR32uRFqjpOenvu7r6M0a5EzRsrknZKoLwLNg8QawkvXKouWtFQHSezOr6L5ZJaVrr5IPbVvuX/kIPBls47prk4FRgeOYIbcBOE8yXNNDzP8dm5nTR607ChU8jjMZMCKI4rBxZdvkp42AyH6P+b3n15e5dbseL6VNqmCHlS3/J4vXu8qpWrvA5FTw+iySnGomNwpC5TOh3hsT5DG0hkvc3eVJLNjUyjhn4xjCWPsuhBYfP70zpi07g0lMBvDS5GP7H7Kp+Wx7b/NqgTVjhrwFhr38UjHgje4z5u/XXinXHYVdEMNPLaB3ofhV5txgMUXlgp040WGvniXPeXJkJP9JY0ulvzVSbRNVPmOhkpGXrN4PRN60yoEu9/GO7VYX1C4kmoQ1u54opXEYNs/CLl85h8WaOrDH1khcO5z8lzv4x/+3d7WxTZVR+Dn9WBk4BjLWDdmmyBC2zg9C4g+/YIUpxAxKVIjGIKUgiBKJP4zEECDRxBh/kCEJbN0w/jAGYkdggsC6KUJUVJB1w8wfaiewdW5B0cDW9R7z9mN00G39uGs3ec/P3vOec97nNufe956vybUYkIIzHHY3uexY2G/l7VxQvFkheh+MCwro1dyGpi8Tkzjyqz0Lix5lRXMy4ON4V46zOeLb2MhbMryGXht2XmNsz7RDxFBuIWutexcYGwH8WG3JH7Qj+vCaJMdoQsBjNp1lxoNhNnUbnS4Ru/nfUffCGZm9yngHAY+H5eKLfV7TMy+6s6H5VLI3ndAbY8hYj7n4KWaqgnhKEY4R086pzqajo/Ej/y+LZxom9o5rBAefxoQyY73reLKBj1afdy0+01di0COytdZ9HAzRzaKz2pLnT42SNLYR4Geh9XSZPARkMOMKCK1E+Cq73rVlbO9saOuDgd1dIPF/7qeuNEU3b3LjuahLkNXASBXHKAzxzC+6gzUa0ZVikz/7HvwbgQ5B4c97DPgu74vmiG88Yi0XFaW1G1GY29AS95EzGjDaF5aUaBSuYKA/tKFVaE5WY9PP0axPNg/bMKeP8LK+Eq8PpntNrdvFjGJxbJmQNn5SxZIpIuVQkkRgTCIgSiH/LDV9qADrb2yATxqdzeJtMmmkmmMMWdxuLplB4PVgrAaQFfqdwJdEWhgBfzHoKqCkgWkSCCLl6z4Rp0g36HMyjpwdkZGIHWbTWQw8mgjT/s02XJ8SS5egpN0ZkcxrwzZinNHZMUjLcsBa2+YGc57/AUPaR2qW3XU6mTZKXRIBtREQzrGz1HSCgfBUm+U3B3nV1hsuT3XHGBL+6/y7x2VQxpNM/JgCiNrqB4JVVAP3w+gE+DS0dMrX11szrbE1rijScCB1mIv3gGld2FNIYdZsyGlo2jvc2lRcF8cpbyZa9T24nz4WtRSRyepwi5TIQOcK0KZqS15FKuyVOiUCaiLQZS4u6lPIFQrcMqEup971tJo6hpI1Yo4xktKuxTMn9vWMm8qKL12rV7qv6HxdhTH0dEwEFM8Ck5UJ9qAD+VYL2pLlPO9MROZIru2x4RkwrAY7lgylx+po2wZQAUi5zhpNXU359MMjaZeULREIIbC61r0CjPVareatqvLp38SDzKX5s7J02rSlYCXdpyiHc8PaGd4UgOoyOl39J9B4dMWyJqmOMRbD1ObtNM+exay1KMyNOQ0twaESamtRRx6/BoP3Gs4zY7vBjrhatqtjiZQiERgcAavDLYZQlfm/4hB9YF+WJ/obRk2dpXPm+qA5RoFKSXHiqTc6m/oDL+1m0xlizAtc47+NzubMqIUnyHjbOMYEcUrq8l4b9hBhpY6QS3v9zWgkSQRGHQJWh1t89vI7NQKO2y35wklGTZ5SU2N4IJSAq41TXJOf2w9fMFAqar8DrTQZJ4wNrqTl6UrHGPVtTA6jdy22M2MrAe/oq/B2crRKLRKB2BGwOtzioS16WAi6XG3JnxaLlI5Sk+iJ4m9PxODNOsKp9sv8U3YWilmnEbOlZgTliT7nZVn1TSdikZ8Ir3SMiaCn4lp+ERO8BohKolUEdOv6cC/tiz9zX0XTpCiJQEQErI62VoALQxcV+B7aZ7nnXLRweUpNFxiY7XeMGlomBjURaVcCLKaQ3hh/ybzV2NAcPpslWhVx80nHGDd06izkddB7FYiB1TsAFPilEjamVWK3OhqkFInAyCCw5qB7NyvYECbdXm3Jt0WrLdiMpmYI/otEeCO73vVptDLV4pOOUS0kY5TjXYs3WfGXfC0CBb7TBOmTtCo8H6M4yS4RSDoCLx1qK9T4+Dw40Pzc39Bcy3M/Ki+IulCjw1zygsh7DpY/iubevzPoay376to7cMTU0hI+CSNpe5SOMWlQD1TktaGOcUsqzg/6HjwxVN5iisyVaiUCERFYc/CPVayw3T9AQxDzgerlBTcGTY1R3KRjTNGN67NhnQLsCakn4KguHSuoArKkL0X3RKqNDwGrw11GoPcU4gM1S/Pe7R+dG5+4UbFKOsYU3QZ+BTneXlxk4DIBO/RVqByNTTdSBI9UKxFIKQLSMaYQ/t7VeFj/D76n/ZGn5aXQNKlaInBbI/Af7NFDa4Ye3CIAAAAASUVORK5CYII="},16722:function(xn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return ye}});const Le=we=>typeof we=="object"&&we!=null&&we.nodeType===1,Se=(we,pe)=>(!pe||we!=="hidden")&&we!=="visible"&&we!=="clip",je=(we,pe)=>{if(we.clientHeight<we.scrollHeight||we.clientWidth<we.scrollWidth){const de=getComputedStyle(we,null);return Se(de.overflowY,pe)||Se(de.overflowX,pe)||(ge=>{const fe=(ue=>{if(!ue.ownerDocument||!ue.ownerDocument.defaultView)return null;try{return ue.ownerDocument.defaultView.frameElement}catch(ee){return null}})(ge);return!!fe&&(fe.clientHeight<ge.scrollHeight||fe.clientWidth<ge.scrollWidth)})(we)}return!1},Me=(we,pe,de,ge,fe,ue,ee,z)=>ue<we&&ee>pe||ue>we&&ee<pe?0:ue<=we&&z<=de||ee>=pe&&z>=de?ue-we-ge:ee>pe&&z<de||ue<we&&z>de?ee-pe+fe:0,Ce=we=>{const pe=we.parentElement;return pe==null?we.getRootNode().host||null:pe},xe=(we,pe)=>{var de,ge,fe,ue;if(typeof document=="undefined")return[];const{scrollMode:ee,block:z,inline:oe,boundary:re,skipOverflowHiddenElements:ae}=pe,le=typeof re=="function"?re:wt=>wt!==re;if(!Le(we))throw new TypeError("Invalid target");const me=document.scrollingElement||document.documentElement,ve=[];let Pe=we;for(;Le(Pe)&&le(Pe);){if(Pe=Ce(Pe),Pe===me){ve.push(Pe);break}Pe!=null&&Pe===document.body&&je(Pe)&&!je(document.documentElement)||Pe!=null&&je(Pe,ae)&&ve.push(Pe)}const Ae=(ge=(de=window.visualViewport)==null?void 0:de.width)!=null?ge:innerWidth,De=(ue=(fe=window.visualViewport)==null?void 0:fe.height)!=null?ue:innerHeight,{scrollX:Oe,scrollY:Ze}=window,{height:qe,width:Xe,top:mt,right:pt,bottom:Mt,left:at}=we.getBoundingClientRect(),{top:_t,right:dt,bottom:Rt,left:ut}=(wt=>{const xt=window.getComputedStyle(wt);return{top:parseFloat(xt.scrollMarginTop)||0,right:parseFloat(xt.scrollMarginRight)||0,bottom:parseFloat(xt.scrollMarginBottom)||0,left:parseFloat(xt.scrollMarginLeft)||0}})(we);let rt=z==="start"||z==="nearest"?mt-_t:z==="end"?Mt+Rt:mt+qe/2-_t+Rt,ct=oe==="center"?at+Xe/2-ut+dt:oe==="end"?pt+dt:at-ut;const yt=[];for(let wt=0;wt<ve.length;wt++){const xt=ve[wt],{height:Ut,width:zt,top:dn,right:Ft,bottom:Dt,left:Qt}=xt.getBoundingClientRect();if(ee==="if-needed"&&mt>=0&&at>=0&&Mt<=De&&pt<=Ae&&(xt===me&&!je(xt)||mt>=dn&&Mt<=Dt&&at>=Qt&&pt<=Ft))return yt;const Yt=getComputedStyle(xt),Jt=parseInt(Yt.borderLeftWidth,10),lt=parseInt(Yt.borderTopWidth,10),Ue=parseInt(Yt.borderRightWidth,10),Be=parseInt(Yt.borderBottomWidth,10);let tt=0,ht=0;const et="offsetWidth"in xt?xt.offsetWidth-xt.clientWidth-Jt-Ue:0,Ve="offsetHeight"in xt?xt.offsetHeight-xt.clientHeight-lt-Be:0,Re="offsetWidth"in xt?xt.offsetWidth===0?0:zt/xt.offsetWidth:0,ze="offsetHeight"in xt?xt.offsetHeight===0?0:Ut/xt.offsetHeight:0;if(me===xt)tt=z==="start"?rt:z==="end"?rt-De:z==="nearest"?Me(Ze,Ze+De,De,lt,Be,Ze+rt,Ze+rt+qe,qe):rt-De/2,ht=oe==="start"?ct:oe==="center"?ct-Ae/2:oe==="end"?ct-Ae:Me(Oe,Oe+Ae,Ae,Jt,Ue,Oe+ct,Oe+ct+Xe,Xe),tt=Math.max(0,tt+Ze),ht=Math.max(0,ht+Oe);else{tt=z==="start"?rt-dn-lt:z==="end"?rt-Dt+Be+Ve:z==="nearest"?Me(dn,Dt,Ut,lt,Be+Ve,rt,rt+qe,qe):rt-(dn+Ut/2)+Ve/2,ht=oe==="start"?ct-Qt-Jt:oe==="center"?ct-(Qt+zt/2)+et/2:oe==="end"?ct-Ft+Ue+et:Me(Qt,Ft,zt,Jt,Ue+et,ct,ct+Xe,Xe);const{scrollLeft:it,scrollTop:Ke}=xt;tt=ze===0?0:Math.max(0,Math.min(Ke+tt/ze,xt.scrollHeight-Ut/ze+Ve)),ht=Re===0?0:Math.max(0,Math.min(it+ht/Re,xt.scrollWidth-zt/Re+et)),rt+=Ke-tt,ct+=it-ht}yt.push({el:xt,top:tt,left:ht})}return yt},be=we=>we===!1?{block:"end",inline:"nearest"}:(pe=>pe===Object(pe)&&Object.keys(pe).length!==0)(we)?we:{block:"start",inline:"nearest"};function ye(we,pe){if(!we.isConnected||!(fe=>{let ue=fe;for(;ue&&ue.parentNode;){if(ue.parentNode===document)return!0;ue=ue.parentNode instanceof ShadowRoot?ue.parentNode.host:ue.parentNode}return!1})(we))return;const de=(fe=>{const ue=window.getComputedStyle(fe);return{top:parseFloat(ue.scrollMarginTop)||0,right:parseFloat(ue.scrollMarginRight)||0,bottom:parseFloat(ue.scrollMarginBottom)||0,left:parseFloat(ue.scrollMarginLeft)||0}})(we);if((fe=>typeof fe=="object"&&typeof fe.behavior=="function")(pe))return pe.behavior(xe(we,pe));const ge=typeof pe=="boolean"||pe==null?void 0:pe.behavior;for(const{el:fe,top:ue,left:ee}of xe(we,be(pe))){const z=ue-de.top+de.bottom,oe=ee-de.left+de.right;fe.scroll({top:z,left:oe,behavior:ge})}}}}]);
|