|
|
(self.webpackChunk=self.webpackChunk||[]).push([[7460],{28575:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return be}});var Le=De(87462),ye=De(67294),Fe={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},Me=Fe,Ee=De(17207),me=function(we,ge){return ye.createElement(Ee.Z,(0,Le.Z)({},we,{ref:ge,icon:Me}))},be=ye.forwardRef(me)},53555:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return be}});var Le=De(87462),ye=De(67294),Fe={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=Fe,Ee=De(17207),me=function(we,ge){return ye.createElement(Ee.Z,(0,Le.Z)({},we,{ref:ge,icon:Me}))},be=ye.forwardRef(me)},32693:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return be}});var Le=De(87462),ye=De(67294),Fe={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=Fe,Ee=De(17207),me=function(we,ge){return ye.createElement(Ee.Z,(0,Le.Z)({},we,{ref:ge,icon:Me}))},be=ye.forwardRef(me)},71749:function(){"use strict"},30483:function(){"use strict"},71736:function(_n,hn){"use strict";hn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},77969:function(_n,hn){"use strict";hn.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"}},12867:function(){"use strict"},22707:function(_n,hn,De){"use strict";var Le=De(67294),ye=Object.defineProperty,Fe=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,me=(we,ge,he)=>ge in we?ye(we,ge,{enumerable:!0,configurable:!0,writable:!0,value:he}):we[ge]=he,be=(we,ge)=>{for(var he in ge||(ge={}))Me.call(ge,he)&&me(we,he,ge[he]);if(Fe)for(var he of Fe(ge))Ee.call(ge,he)&&me(we,he,ge[he]);return we};const ve=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"})));hn.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBmaWxsLW9wYWNpdHk9Ii4wMSIgZmlsbD0iI0ZGRiIgZD0iTTAgMGgzMHYzMEgweiIvPjxwYXRoIGQ9Ik02Ljg2NiAyNi45MjhoLTEuMjhhMi41NjEgMi41NjEgMCAwIDEtMi41NjItMi41NjFWNS41ODVhMi41NjEgMi41NjEgMCAwIDEgMi41NjEtMi41NmgxLjI4djQuMjY4YTIuNTYxIDIuNTYxIDAgMCAwIDIuNTYyIDIuNTZoMy44NDJhMi41NjEgMi41NjEgMCAwIDAgMi41Ni0yLjU2VjMuMDI0aDIuOTE1bDguMTg0IDguMTg0djEzLjE1OWEyLjU2MSAyLjU2MSAwIDAgMS0yLjU2MSAyLjU2MWgtMS4yOHYtNS45NzZjMC0uOTQzLS43NjUtMS43MDctMS43MDgtMS43MDdIOC41NzNjLS45NDMgMC0xLjcwNy43NjQtMS43MDcgMS43MDd2NS45NzZaIiBmaWxsPSIjQjZEMEZDIi8+PHBhdGggZD0iTTguNTczIDMuMDI0aDUuNTV2NC4yNjlhLjg1NC44NTQgMCAwIDEtLjg1NC44NTNIOS40MjdhLjg1NC44NTQgMCAwIDEtLjg1NC0uODUzVjMuMDI0Wk04LjU3MyAyNi45Mjh2LTUuOTc2SDIxLjM4djUuOTc2eiIgZmlsbD0iIzE4OTBGRiIvPjwvZz48L3N2Zz4="},8861:function(_n,hn,De){"use strict";var Le=De(67294),ye=Object.defineProperty,Fe=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,me=(we,ge,he)=>ge in we?ye(we,ge,{enumerable:!0,configurable:!0,writable:!0,value:he}):we[ge]=he,be=(we,ge)=>{for(var he in ge||(ge={}))Me.call(ge,he)&&me(we,he,ge[he]);if(Fe)for(var he of Fe(ge))Ee.call(ge,he)&&me(we,he,ge[he]);return we};const ve=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"})));hn.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMzAgMTVjMCA4LjI4NC02LjcxNiAxNS0xNSAxNS04LjI4NCAwLTE1LTYuNzE2LTE1LTE1QzAgNi43MTYgNi43MTYgMCAxNSAwYzguMjg0IDAgMTUgNi43MTYgMTUgMTVaIiBmaWxsPSIjQkFGRkYwIi8+PHBhdGggZD0iTTI1LjUgMTVjMCA1LjgtNC43IDEwLjUtMTAuNSAxMC41UzQuNSAyMC44IDQuNSAxNSA5LjIgNC41IDE1IDQuNSAyNS41IDkuMiAyNS41IDE1WiIgZmlsbD0iIzQ0RDdCNiIvPjxwYXRoIGQ9Ik0xMy41IDlhMS41IDEuNSAwIDAgMSAxLjUgMS41djQuMzc5bDMuNTYgMy41NmExLjUgMS41IDAgMCAxLTIuMTIgMi4xMjJsLTQtNEExLjUgMS41IDAgMCAxIDEyIDE1LjV2LTVBMS41IDEuNSAwIDAgMSAxMy41IDlaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg=="},18023:function(){"use strict";function _n(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(_n.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(_n.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(_n.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(_n.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 _n))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 hn=[];function De(ue,ee){var z=hn.pop();return z===void 0?new go.Point(ue,ee):(z.x=ue,z.y=ee,z)}function Le(){var ue=hn.pop();return ue===void 0?new go.Point:ue}function ye(ue){hn.push(ue)}function Fe(ue,ee,z,oe,ie,se,le,Se,pe){pe||(pe=new go.Point);var Ce=ue-z,Ae=ie-le,Oe=NaN,Re=NaN;if(Ce===0)if(Ae===0)ue===z&&(Oe=ue,Re=ee);else{var We=(se-Se)/Ae,$e=se-We*ie;Oe=ue,Re=We*Oe+$e}else if(Ae===0){var Je=(ee-oe)/Ce,pt=ee-Je*ue;Oe=ie,Re=Je*Oe+pt}else{var Je=(ee-oe)/Ce,We=(se-Se)/Ae,pt=ee-Je*ue,$e=se-We*ie;Oe=($e-pt)/(Je-We),Re=Je*Oe+pt}return pe.x=Oe,pe.y=Re,pe}function Me(ue,ee,z,oe,ie,se,le,Se,pe,Ce,Ae,Oe,Re,We){var $e=1-pe,Je=pe,pt=ue*$e+z*Je,St=ee*$e+oe*Je,Mt=z*$e+ie*Je,ct=oe*$e+se*Je,wt=ie*$e+le*Je,ft=se*$e+Se*Je,$t=pt*$e+Mt*Je,st=St*$e+ct*Je,et=Mt*$e+wt*Je,lt=ct*$e+ft*Je,dt=$t*$e+et*Je,bt=st*$e+lt*Je;Ce.x=pt,Ce.y=St,Ae.x=$t,Ae.y=st,Oe.x=dt,Oe.y=bt,Re.x=et,Re.y=lt,We.x=wt,We.y=ft}var Ee=new go.Spot(.156,.156),me=new go.Spot(.844,.844),be=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new _n("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 ie=oe*be,se=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-ie,0,ee,ie)).add(new go.PathSegment(go.PathSegment.Line,ee,z-oe)).add(new go.PathSegment(go.PathSegment.Bezier,ee-oe,z,ee,z-ie,ee-ie,z)).add(new go.PathSegment(go.PathSegment.Line,oe,z)).add(new go.PathSegment(go.PathSegment.Bezier,0,z-oe,ie,z,0,z-ie)).add(new go.PathSegment(go.PathSegment.Line,0,oe)).add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,ie,ie,0).close()));return ie>1&&(se.spot1=new go.Spot(0,0,ie,ie),se.spot2=new go.Spot(1,1,-ie,-ie)),se}),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,ie=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 ie.spot1=Ee,ie.spot2=me,ie.defaultStretch=go.GraphObject.Uniform,ie}),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 _n("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 ie=Math.abs(oe)*ee;if(oe===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=ee,se.endY=z,se}else{var se=new go.Geometry;return oe>0?se.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee-ie,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())):se.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee-ie,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,ie,z).close())),ie<ee/2&&se.setSpots(ie/ee,0,(ee-ie)/ee,1),se}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new _n("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 ie=Math.abs(oe);if(oe===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=ee,se.endY=z,se}else{var se=new go.Geometry;return oe>0?se.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee-ie,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())):se.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee-ie,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,ie,z).close())),ie<ee/2&&se.setSpots(ie/ee,0,(ee-ie)/ee,1),se}}),go.Shape.setFigureParameter("Trapezoid1",0,new _n("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 ie=Math.abs(oe)*ee;if(oe===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=ee,se.endY=z,se}else{var se=new go.Geometry;return oe>0?se.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,ee-ie,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())):se.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee-ie,z)).add(new go.PathSegment(go.PathSegment.Line,ie,z).close())),ie<ee/2&&se.setSpots(ie/ee,0,(ee-ie)/ee,1),se}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new _n("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 ie=Math.abs(oe);if(oe===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=ee,se.endY=z,se}else{var se=new go.Geometry;return oe>0?se.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,ee-ie,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())):se.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee-ie,z)).add(new go.PathSegment(go.PathSegment.Line,ie,z).close())),ie<ee/2&&se.setSpots(ie/ee,0,(ee-ie)/ee,1),se}}),go.Shape.setFigureParameter("ManualOperation",0,new _n("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 ie=Math.abs(oe);if(oe===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=ee,se.endY=z,se}else{var se=new go.Geometry;return oe>0?se.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee-ie,z)).add(new go.PathSegment(go.PathSegment.Line,ie,z).close())):se.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,ee-ie,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())),ie<ee/2&&se.setSpots(ie/ee,0,(ee-ie)/ee,1),se}});var ve=[];function we(){var ue=ve.pop();return ue===void 0?[]:ue}function ge(ue){ue.length=0,ve.push(ue)}function he(ue){for(var ee=we(),z=.5,oe=.5,ie=Math.PI*1.5,se=0,le=0;le<ue;le++)se=2*Math.PI/ue*le+ie,ee[le]=new go.Point(oe+z*Math.cos(se),oe+z*Math.sin(se));return ee.push(ee[0]),ee}function xe(ue){var ee=fe(ue),z=we();z[0]=ee[0];for(var oe=1,ie=1;oe<ee.length;oe+=2,ie+=3)z[ie]=ee[oe],z[ie+1]=ee[oe],z[ie+2]=ee[oe+1];return ge(ee),z}function fe(ue){for(var ee=he(ue),z=we(),oe=Math.floor(ee.length/2),ie=ee.length-1,se=ue%2===0?2:1,le=0;le<ie;le++){var Se=ee[le],pe=ee[le+1],Ce=ee[(oe+le-1)%ie],Ae=ee[(oe+le+se)%ie];z[le*2]=Se,z[le*2+1]=Fe(Se.x,Se.y,Ce.x,Ce.y,pe.x,pe.y,Ae.x,Ae.y,new go.Point)}return z[z.length]=z[0],ge(ee),z}go.Shape.defineFigureGenerator("Pentagon",function(ue,ee,z){var oe=he(5),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(se);for(var le=1;le<5;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),ge(oe),ie.spot1=new go.Spot(.2,.22),ie.spot2=new go.Spot(.8,.9),ie}),go.Shape.defineFigureGenerator("Hexagon",function(ue,ee,z){var oe=he(6),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(se);for(var le=1;le<6;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),ge(oe),ie.spot1=new go.Spot(.07,.25),ie.spot2=new go.Spot(.93,.75),ie}),go.Shape.defineFigureGenerator("Heptagon",function(ue,ee,z){var oe=he(7),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(se);for(var le=1;le<7;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),ge(oe),ie.spot1=new go.Spot(.2,.15),ie.spot2=new go.Spot(.8,.85),ie}),go.Shape.defineFigureGenerator("Octagon",function(ue,ee,z){var oe=he(8),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(se);for(var le=1;le<8;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),ge(oe),ie.spot1=new go.Spot(.15,.15),ie.spot2=new go.Spot(.85,.85),ie}),go.Shape.defineFigureGenerator("Nonagon",function(ue,ee,z){var oe=he(9),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(se);for(var le=1;le<9;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),ge(oe),ie.spot1=new go.Spot(.17,.13),ie.spot2=new go.Spot(.82,.82),ie}),go.Shape.defineFigureGenerator("Decagon",function(ue,ee,z){var oe=he(10),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(se);for(var le=1;le<10;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),ge(oe),ie.spot1=new go.Spot(.16,.16),ie.spot2=new go.Spot(.84,.84),ie}),go.Shape.defineFigureGenerator("Dodecagon",function(ue,ee,z){var oe=he(12),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(se);for(var le=1;le<12;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),ge(oe),ie.spot1=new go.Spot(.16,.16),ie.spot2=new go.Spot(.84,.84),ie}),go.Shape.defineFigureGenerator("FivePointedStar",function(ue,ee,z){var oe=fe(5),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(se);for(var le=1;le<10;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),ge(oe),ie.spot1=new go.Spot(.266,.333),ie.spot2=new go.Spot(.733,.733),ie}),go.Shape.defineFigureGenerator("SixPointedStar",function(ue,ee,z){var oe=fe(6),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(se);for(var le=1;le<12;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),ge(oe),ie.spot1=new go.Spot(.17,.25),ie.spot2=new go.Spot(.83,.75),ie}),go.Shape.defineFigureGenerator("SevenPointedStar",function(ue,ee,z){var oe=fe(7),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(se);for(var le=1;le<14;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),ge(oe),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.666),ie}),go.Shape.defineFigureGenerator("EightPointedStar",function(ue,ee,z){var oe=fe(8),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(se);for(var le=1;le<16;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),ge(oe),ie.spot1=new go.Spot(.25,.25),ie.spot2=new go.Spot(.75,.75),ie}),go.Shape.defineFigureGenerator("NinePointedStar",function(ue,ee,z){var oe=fe(9),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(se);for(var le=1;le<18;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),ge(oe),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.666),ie}),go.Shape.defineFigureGenerator("TenPointedStar",function(ue,ee,z){var oe=fe(10),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(se);for(var le=1;le<20;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),ge(oe),ie.spot1=new go.Spot(.281,.261),ie.spot2=new go.Spot(.723,.748),ie}),go.Shape.defineFigureGenerator("FivePointedBurst",function(ue,ee,z){var oe=xe(5),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(se);for(var le=1;le<oe.length;le+=3)se.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 se.segments.last().close(),ge(oe),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("SixPointedBurst",function(ue,ee,z){var oe=xe(6),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(se);for(var le=1;le<oe.length;le+=3)se.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 se.segments.last().close(),ge(oe),ie.spot1=new go.Spot(.17,.222),ie.spot2=new go.Spot(.833,.777),ie}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(ue,ee,z){var oe=xe(7),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(se);for(var le=1;le<oe.length;le+=3)se.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 se.segments.last().close(),ge(oe),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("EightPointedBurst",function(ue,ee,z){var oe=xe(8),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(se);for(var le=1;le<oe.length;le+=3)se.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 se.segments.last().close(),ge(oe),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("NinePointedBurst",function(ue,ee,z){var oe=xe(9),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(se);for(var le=1;le<oe.length;le+=3)se.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 se.segments.last().close(),ge(oe),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("TenPointedBurst",function(ue,ee,z){var oe=xe(10),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(se);for(var le=1;le<oe.length;le+=3)se.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 se.segments.last().close(),ge(oe),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.setFigureParameter("FramedRectangle",0,new _n("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new _n("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(ue,ee,z){var oe=ue?ue.parameter1:NaN,ie=ue?ue.parameter2:NaN;isNaN(oe)&&(oe=8),isNaN(ie)&&(ie=8);var se=new go.Geometry,le=new go.PathFigure(0,0,!0);return se.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&&ie<z/2&&(le.add(new go.PathSegment(go.PathSegment.Move,oe,ie)),le.add(new go.PathSegment(go.PathSegment.Line,oe,z-ie)),le.add(new go.PathSegment(go.PathSegment.Line,ee-oe,z-ie)),le.add(new go.PathSegment(go.PathSegment.Line,ee-oe,ie).close())),se.setSpots(0,0,1,1,oe,ie,-oe,-ie),se}),go.Shape.setFigureParameter("Ring",0,new _n("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=8);var ie=ee/2,se=new go.Geometry,le=new go.PathFigure(ee,ee/2,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Arc,0,360,ie,ie,ie,ie).close());var Se=Math.max(ie-oe,0);return Se>0&&(le.add(new go.PathSegment(go.PathSegment.Move,ee/2+Se,ee/2)),le.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ie,ie,Se,Se).close())),se.spot1=Ee,se.spot2=me,se.defaultStretch=go.GraphObject.Uniform,se}),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 _n("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new _n("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(ue,ee,z){var oe=ue?ue.parameter1:NaN,ie=ue?ue.parameter2:NaN;isNaN(oe)&&(oe=0),isNaN(ie)&&(ie=315);var se=oe%360;se<0&&(se+=360);var le=ie%360,Se=Math.min(ee,z)/2;return new go.Geometry().add(new go.PathFigure(Se,Se).add(new go.PathSegment(go.PathSegment.Arc,se,le,Se,Se,Se,Se).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(ue,ee,z){var oe=be/Math.SQRT2*.5,ie=Math.SQRT2/2,se=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(ee,z,!0).add(new go.PathSegment(go.PathSegment.Bezier,ie*ee,se*z,ee,(1-oe)*z,(ie+oe)*ee,(se+oe)*z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close()))}),go.Shape.setFigureParameter("ThickCross",0,new _n("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=30);var ie=Math.min(oe,ee)/2,se=ee/2,le=z/2;return new go.Geometry().add(new go.PathFigure(se-ie,0,!0).add(new go.PathSegment(go.PathSegment.Line,se+ie,0)).add(new go.PathSegment(go.PathSegment.Line,se+ie,le-ie)).add(new go.PathSegment(go.PathSegment.Line,ee,le-ie)).add(new go.PathSegment(go.PathSegment.Line,ee,le+ie)).add(new go.PathSegment(go.PathSegment.Line,se+ie,le+ie)).add(new go.PathSegment(go.PathSegment.Line,se+ie,z)).add(new go.PathSegment(go.PathSegment.Line,se-ie,z)).add(new go.PathSegment(go.PathSegment.Line,se-ie,le+ie)).add(new go.PathSegment(go.PathSegment.Line,0,le+ie)).add(new go.PathSegment(go.PathSegment.Line,0,le-ie)).add(new go.PathSegment(go.PathSegment.Line,se-ie,le-ie).close()))}),go.Shape.setFigureParameter("ThinCross",0,new _n("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=10);var ie=Math.min(oe,ee)/2,se=ee/2,le=z/2;return new go.Geometry().add(new go.PathFigure(se-ie,0,!0).add(new go.PathSegment(go.PathSegment.Line,se+ie,0)).add(new go.PathSegment(go.PathSegment.Line,se+ie,le-ie)).add(new go.PathSegment(go.PathSegment.Line,ee,le-ie)).add(new go.PathSegment(go.PathSegment.Line,ee,le+ie)).add(new go.PathSegment(go.PathSegment.Line,se+ie,le+ie)).add(new go.PathSegment(go.PathSegment.Line,se+ie,z)).add(new go.PathSegment(go.PathSegment.Line,se-ie,z)).add(new go.PathSegment(go.PathSegment.Line,se-ie,le+ie)).add(new go.PathSegment(go.PathSegment.Line,0,le+ie)).add(new go.PathSegment(go.PathSegment.Line,0,le-ie)).add(new go.PathSegment(go.PathSegment.Line,se-ie,le-ie).close()))}),go.Shape.setFigureParameter("ThickX",0,new _n("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 ie=new go.Geometry(go.Geometry.Rectangle);return ie.startX=0,ie.startY=0,ie.endX=ee,ie.endY=z,ie}else{var se=ee/2,le=z/2,Se=Math.atan2(z,ee),pe=oe-Math.min(Math.cos(Se)*oe/2,se),Ce=oe-Math.min(Math.sin(Se)*oe/2,le),ie=new go.Geometry,Ae=new go.PathFigure(pe,0,!0);return ie.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,se,.2*z)),Ae.add(new go.PathSegment(go.PathSegment.Line,ee-pe,0)),Ae.add(new go.PathSegment(go.PathSegment.Line,ee,Ce)),Ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,le)),Ae.add(new go.PathSegment(go.PathSegment.Line,ee,z-Ce)),Ae.add(new go.PathSegment(go.PathSegment.Line,ee-pe,z)),Ae.add(new go.PathSegment(go.PathSegment.Line,se,.8*z)),Ae.add(new go.PathSegment(go.PathSegment.Line,pe,z)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,z-Ce)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*ee,le)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,Ce).close()),ie}}),go.Shape.setFigureParameter("ThinX",0,new _n("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=10);var ie=new go.Geometry,se=new go.PathFigure(.1*ee,0,!0);return ie.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.4*z)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ee,0)),se.add(new go.PathSegment(go.PathSegment.Line,ee,.1*z)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.5*z)),se.add(new go.PathSegment(go.PathSegment.Line,ee,.9*z)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ee,z)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.6*z)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ee,z)),se.add(new go.PathSegment(go.PathSegment.Line,0,.9*z)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.5*z)),se.add(new go.PathSegment(go.PathSegment.Line,0,.1*z).close()),ie}),go.Shape.setFigureParameter("SquareIBeam",0,new _n("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.2);var ie=new go.Geometry,se=new go.PathFigure(0,0,!0);return ie.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ee,0)),se.add(new go.PathSegment(go.PathSegment.Line,ee,oe*z)),se.add(new go.PathSegment(go.PathSegment.Line,(.5+oe/2)*ee,oe*z)),se.add(new go.PathSegment(go.PathSegment.Line,(.5+oe/2)*ee,(1-oe)*z)),se.add(new go.PathSegment(go.PathSegment.Line,ee,(1-oe)*z)),se.add(new go.PathSegment(go.PathSegment.Line,ee,z)),se.add(new go.PathSegment(go.PathSegment.Line,0,z)),se.add(new go.PathSegment(go.PathSegment.Line,0,(1-oe)*z)),se.add(new go.PathSegment(go.PathSegment.Line,(.5-oe/2)*ee,(1-oe)*z)),se.add(new go.PathSegment(go.PathSegment.Line,(.5-oe/2)*ee,oe*z)),se.add(new go.PathSegment(go.PathSegment.Line,0,oe*z).close()),ie}),go.Shape.setFigureParameter("RoundedIBeam",0,new _n("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.5);var ie=new go.Geometry,se=new go.PathFigure(0,0,!0);return ie.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ee,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,ee,z,Math.abs(1-oe)*ee,.25*z,Math.abs(1-oe)*ee,.75*z)),se.add(new go.PathSegment(go.PathSegment.Line,0,z)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,0,oe*ee,.75*z,oe*ee,.25*z).close()),ie}),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,ie=new go.PathFigure(.4*ee,.6*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.15*ee,z,.5*ee,.75*z,.45*ee,.95*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.6*ee,.6*z,.55*ee,.95*z,.5*ee,.75*z));var se=.2,le=.3,Se=0,pe=se*be;return ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*ee,(.5+se+Se)*z,(.5-se+le)*ee,(.5+pe+Se)*z,(.5-pe+le)*ee,(.5+se+Se)*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+le)*ee,(.5+Se)*z,(.5+pe+le)*ee,(.5+se+Se)*z,(.5+se+le)*ee,(.5+pe+Se)*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*ee,(.5-se+Se)*z,(1-.5+se+le)*ee,(.5-pe+Se)*z,(.5+pe+le)*ee,(.5-se+Se)*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.65*ee,.36771243*z,(.5-pe+le)*ee,(.5-se+Se)*z,(.5-se+le+.05)*ee,(.5-pe+Se-.02)*z)),se=.2,le=0,Se=-.3,pe=se*be,ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+le)*ee,(.5+Se)*z,(.5+pe+le)*ee,(.5+se+Se)*z,(.5+se+le)*ee,(.5+pe+Se)*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*ee,(.5-se+Se)*z,(1-.5+se+le)*ee,(.5-pe+Se)*z,(.5+pe+le)*ee,(.5-se+Se)*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+le)*ee,(.5+Se)*z,(.5-pe+le)*ee,(.5-se+Se)*z,(.5-se+le)*ee,(.5-pe+Se)*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-pe+le)*ee,(.5+se+Se)*z,(.5-se+le)*ee,(.5+pe+Se)*z,(.5-pe+le)*ee,(.5+se+Se)*z)),se=.2,le=-.3,Se=0,pe=se*be,ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*ee,(.5-se+Se)*z,(1-.5+se+le-.05)*ee,(.5-pe+Se-.02)*z,(.5+pe+le)*ee,(.5-se+Se)*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+le)*ee,(.5+Se)*z,(.5-pe+le)*ee,(.5-se+Se)*z,(.5-se+le)*ee,(.5-pe+Se)*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*ee,(.5+se+Se)*z,(.5-se+le)*ee,(.5+pe+Se)*z,(.5-pe+le)*ee,(.5+se+Se)*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*ee,.6*z,(.5+pe+le)*ee,(.5+se+Se)*z,(.5+se+le)*ee,(.5+pe+Se)*z).close()),oe.setSpots(.06,.33,.93,.68),oe}),go.Shape.defineFigureGenerator("YinYang",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(ee*.5,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,ee*.5,ee*.5,ee*.5,ee*.5)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,-180,ee*.5,ee*.75,ee*.25,ee*.25)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,180,ee*.5,ee*.25,ee*.25,ee*.25));var se=.1,le=.5,Se=.25;return ie.add(new go.PathSegment(go.PathSegment.Move,(le+se)*ee,Se*z)),ie.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ee*le,z*Se,se*ee,se*ee).close()),ie=new go.PathFigure(ee*.5,0,!1),oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,-180,ee*.5,ee*.5,ee*.5,ee*.5)),Se=.75,ie=new go.PathFigure((le+se)*ee,Se*z,!0),oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,0,360,ee*le,z*Se,se*ee,se*ee).close()),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("Peace",function(ue,ee,z){var oe=.8535533905932737,ie=.5*ee,se=.5*z;return new go.Geometry().add(new go.PathFigure(ie,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,ie,se,ie,se)).add(new go.PathSegment(go.PathSegment.Line,ie,z)).add(new go.PathSegment(go.PathSegment.Move,ie,se)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*ee,oe*z)).add(new go.PathSegment(go.PathSegment.Move,ie,se)).add(new go.PathSegment(go.PathSegment.Line,oe*ee,oe*z)))}),go.Shape.defineFigureGenerator("NotAllowed",function(ue,ee,z){var oe=new go.Geometry,ie=be*.5,se=.5,le=.5,Se=.5,pe=new go.PathFigure(le*ee,(Se-se)*z);oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*ee,Se*z,(le-ie)*ee,(Se-se)*z,(le-se)*ee,(Se-ie)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se+se)*z,(le-se)*ee,(Se+ie)*z,(le-ie)*ee,(Se+se)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*ee,Se*z,(le+ie)*ee,(Se+se)*z,(le+se)*ee,(Se+ie)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se-se)*z,(le+se)*ee,(Se-ie)*z,(le+ie)*ee,(Se-se)*z)),se=.4,ie=be*.4;var Ce=Le(),Ae=Le(),Oe=Le(),Re=Le();Me(le,Se-se,le+ie,Se-se,le+se,Se-ie,le+se,Se,.42,Ce,Ae,Oe,Re,Re);var We=Le(),$e=Le(),Je=Le();Me(le,Se-se,le+ie,Se-se,le+se,Se-ie,le+se,Se,.58,Re,Re,Je,We,$e);var pt=Le(),St=Le(),Mt=Le();Me(le,Se+se,le-ie,Se+se,le-se,Se+ie,le-se,Se,.42,pt,St,Mt,Re,Re);var ct=Le(),wt=Le(),ft=Le();return Me(le,Se+se,le-ie,Se+se,le-se,Se+ie,le-se,Se,.58,Re,Re,ft,ct,wt),pe.add(new go.PathSegment(go.PathSegment.Move,ft.x*ee,ft.y*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*ee,Se*z,ct.x*ee,ct.y*z,wt.x*ee,wt.y*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se-se)*z,(le-se)*ee,(Se-ie)*z,(le-ie)*ee,(Se-se)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,Oe.x*ee,Oe.y*z,Ce.x*ee,Ce.y*z,Ae.x*ee,Ae.y*z)),pe.add(new go.PathSegment(go.PathSegment.Line,ft.x*ee,ft.y*z).close()),pe.add(new go.PathSegment(go.PathSegment.Move,Mt.x*ee,Mt.y*z)),pe.add(new go.PathSegment(go.PathSegment.Line,Je.x*ee,Je.y*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*ee,Se*z,We.x*ee,We.y*z,$e.x*ee,$e.y*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se+se)*z,(le+se)*ee,(Se+ie)*z,(le+ie)*ee,(Se+se)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,Mt.x*ee,Mt.y*z,pt.x*ee,pt.y*z,St.x*ee,St.y*z).close()),ye(Ce),ye(Ae),ye(Oe),ye(Re),ye(We),ye($e),ye(Je),ye(pt),ye(St),ye(Mt),ye(ct),ye(wt),ye(ft),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 _n("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 ie=(ee-oe)/2,se=ie+oe;return new go.Geometry().add(new go.PathFigure(se,.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,ie,.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,ie=be*.4,se=.4,le=.5,Se=.5,pe=Le(),Ce=Le(),Ae=Le(),Oe=Le(),Re=new go.PathFigure((le-se)*ee,Se*z,!1);oe.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se-se)*z,(le-se)*ee,(Se-ie)*z,(le-ie)*ee,(Se-se)*z)),Me(le,Se-se,le+ie,Se-se,le+se,Se-ie,le+se,Se,.44,Ae,Oe,Ce,pe,pe),Re.add(new go.PathSegment(go.PathSegment.Bezier,Ce.x*ee,Ce.y*z,Ae.x*ee,Ae.y*z,Oe.x*ee,Oe.y*z));var We=De(Ce.x,Ce.y);Me(le,Se-se,le+ie,Se-se,le+se,Se-ie,le+se,Se,.56,pe,pe,Ce,Ae,Oe);var $e=De(Ce.x,Ce.y);Re.add(new go.PathSegment(go.PathSegment.Line,(We.x*.1+.95*.9)*ee,We.y*.1*z)),Re.add(new go.PathSegment(go.PathSegment.Line,.85*ee,We.y*.1*z)),Re.add(new go.PathSegment(go.PathSegment.Line,.85*ee,0)),Re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),Re.add(new go.PathSegment(go.PathSegment.Line,ee,.15*z)),Re.add(new go.PathSegment(go.PathSegment.Line,($e.x*.1+.9)*ee,.15*z)),Re.add(new go.PathSegment(go.PathSegment.Line,($e.x*.1+.9)*ee,($e.y*.1+.05*.9)*z)),Re.add(new go.PathSegment(go.PathSegment.Line,$e.x*ee,$e.y*z)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*ee,Se*z,Ae.x*ee,Ae.y*z,Oe.x*ee,Oe.y*z)),Re.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se+se)*z,(le+se)*ee,(Se+ie)*z,(le+ie)*ee,(Se+se)*z)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*ee,Se*z,(le-ie)*ee,(Se+se)*z,(le-se)*ee,(Se+ie)*z)),se=.35,ie=be*.35;var Je=new go.PathFigure(le*ee,(Se-se)*z,!1);oe.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*ee,Se*z,(le-ie)*ee,(Se-se)*z,(le-se)*ee,(Se-ie)*z)),Je.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se+se)*z,(le-se)*ee,(Se+ie)*z,(le-ie)*ee,(Se+se)*z)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*ee,Se*z,(le+ie)*ee,(Se+se)*z,(le+se)*ee,(Se+ie)*z)),Je.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se-se)*z,(le+se)*ee,(Se-ie)*z,(le+ie)*ee,(Se-se)*z));var pt=new go.PathFigure((le-se)*ee,Se*z,!1);return oe.add(pt),ye(pe),ye(Ce),ye(Ae),ye(Oe),ye(We),ye($e),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,ie=.375,se=0,le=-.125,Se=ie*be,pe=new go.PathFigure((.525+se)*ee,(.5+ie+le)*z,!1);oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+se)*ee,(.5+le)*z,(.5+Se+se)*ee,(.5+ie+le)*z,(.5+ie+se)*ee,(.5+Se+le)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+se)*ee,(.5-ie+le)*z,(1-.5+ie+se)*ee,(.5-Se+le)*z,(.5+Se+se)*ee,(.5-ie+le)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+se)*ee,(.5+le)*z,(.5-Se+se)*ee,(.5-ie+le)*z,(.5-ie+se)*ee,(.5-Se+le)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(.475+se)*ee,(.5+ie+le)*z,(.5-ie+se)*ee,(.5+Se+le)*z,(.5-Se+se)*ee,(.5+ie+le)*z)),pe.add(new go.PathSegment(go.PathSegment.Line,.475*ee,.85*z)),pe.add(new go.PathSegment(go.PathSegment.Line,.425*ee,.85*z)),pe.add(new go.PathSegment(go.PathSegment.Line,.425*ee,.9*z)),pe.add(new go.PathSegment(go.PathSegment.Line,.475*ee,.9*z)),pe.add(new go.PathSegment(go.PathSegment.Line,.475*ee,z)),pe.add(new go.PathSegment(go.PathSegment.Line,.525*ee,z)),pe.add(new go.PathSegment(go.PathSegment.Line,.525*ee,.9*z)),pe.add(new go.PathSegment(go.PathSegment.Line,.575*ee,.9*z)),pe.add(new go.PathSegment(go.PathSegment.Line,.575*ee,.85*z)),pe.add(new go.PathSegment(go.PathSegment.Line,.525*ee,.85*z).close()),ie=.325,se=0,le=-.125,Se=ie*be;var pe=new go.PathFigure((1-.5+ie+se)*ee,(.5+le)*z,!1);oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+se)*ee,(.5+ie+le)*z,(.5+ie+se)*ee,(.5+Se+le)*z,(.5+Se+se)*ee,(.5+ie+le)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+se)*ee,(.5+le)*z,(.5-Se+se)*ee,(.5+ie+le)*z,(.5-ie+se)*ee,(.5+Se+le)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+se)*ee,(.5-ie+le)*z,(.5-ie+se)*ee,(.5-Se+le)*z,(.5-Se+se)*ee,(.5-ie+le)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+se)*ee,(.5+le)*z,(.5+Se+se)*ee,(.5-ie+le)*z,(1-.5+ie+se)*ee,(.5-Se+le)*z));var pe=new go.PathFigure((.525+se)*ee,(.5+ie+le)*z,!1);return oe.add(pe),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 _n("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new _n("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=ue?ue.parameter2:NaN;isNaN(ie)&&(ie=.3);var se=(1-oe)*ee,le=(.5-ie/2)*z,Se=(.5+ie/2)*z,pe=new go.Geometry,Ce=new go.PathFigure(0,le,!0);pe.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Line,se,le)),Ce.add(new go.PathSegment(go.PathSegment.Line,se,0)),Ce.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),Ce.add(new go.PathSegment(go.PathSegment.Line,se,z)),Ce.add(new go.PathSegment(go.PathSegment.Line,se,Se)),Ce.add(new go.PathSegment(go.PathSegment.Line,0,Se).close()),pe.spot1=new go.Spot(0,le/z);var Ae=Fe(0,Se/z,1,Se/z,se/ee,1,1,.5,Le());return pe.spot2=new go.Spot(Ae.x,Ae.y),ye(Ae),pe}),go.Shape.setFigureParameter("Arrow2",0,new _n("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new _n("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 ie=ue?ue.parameter2:NaN;isNaN(ie)&&(ie=30),ie=Math.min(ie,z/2);var se=ee-oe,le=(z-ie)/2,Se=le+ie,pe=new go.Geometry,Ce=new go.PathFigure(0,le,!0);pe.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Line,se,le)),Ce.add(new go.PathSegment(go.PathSegment.Line,se,0)),Ce.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),Ce.add(new go.PathSegment(go.PathSegment.Line,se,z)),Ce.add(new go.PathSegment(go.PathSegment.Line,se,Se)),Ce.add(new go.PathSegment(go.PathSegment.Line,0,Se).close()),pe.spot1=new go.Spot(0,le/z);var Ae=Fe(0,Se/z,1,Se/z,se/ee,1,1,.5,Le());return pe.spot2=new go.Spot(Ae.x,Ae.y),ye(Ae),pe}),go.Shape.defineFigureGenerator("Chevron",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.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,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.3*ee,.214*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,1*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*ee,1*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*ee,.786*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,1*z).close()),oe}),go.Shape.setFigureParameter("DoubleEndArrow",0,new _n("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=(.5-oe/2)*z,se=(.5+oe/2)*z,le=new go.Geometry,Se=new go.PathFigure(ee,.5*z,!0);le.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ee,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.3*ee,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.3*ee,z)),Se.add(new go.PathSegment(go.PathSegment.Line,0,.5*z)),Se.add(new go.PathSegment(go.PathSegment.Line,.3*ee,0)),Se.add(new go.PathSegment(go.PathSegment.Line,.3*ee,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ee,0).close());var pe=Fe(0,.5,.3,0,0,ie/z,.1,ie/z,Le());return le.spot1=new go.Spot(pe.x,pe.y),pe=Fe(.7,1,1,.5,0,se/z,1,se/z,pe),le.spot2=new go.Spot(pe.x,pe.y),ye(pe),le}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new _n("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new _n("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=40);var ie=ue?ue.parameter2:NaN;isNaN(ie)&&(ie=100);var se=(z-oe)/2,le=se+oe,Se=(z-ie)/2,pe=Se+ie;(oe>z||ie>z)&&(ie>oe?(oe=oe*z/ie,se=(z-oe)/2,le=se+oe,Se=0,pe=z):(se=0,le=z,Se=0,pe=z));var Ce=new go.Geometry,Ae=new go.PathFigure(ee,.5*z,!0);Ce.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,pe)),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,pe)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,.5*z)),Ae.add(new go.PathSegment(go.PathSegment.Line,.3*ee,Se)),Ae.add(new go.PathSegment(go.PathSegment.Line,.3*ee,se)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,se)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,Se).close());var Oe=Fe(0,.5,.3,Se/z,0,se/z,1,se/z,Le());return Ce.spot1=new go.Spot(Oe.x,Oe.y),Oe=Fe(.7,pe/z,1,.5,0,le/z,1,le/z,Oe),Ce.spot2=new go.Spot(Oe.x,Oe.y),ye(Oe),Ce}),go.Shape.setFigureParameter("IBeamArrow",0,new _n("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=(.5-oe/2)*z,se=(.5+oe/2)*z,le=new go.Geometry,Se=new go.PathFigure(ee,.5*z,!0);le.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ee,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*ee,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*ee,z)),Se.add(new go.PathSegment(go.PathSegment.Line,0,z)),Se.add(new go.PathSegment(go.PathSegment.Line,0,0)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*ee,0)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*ee,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ee,0).close()),le.spot1=new go.Spot(0,ie/z);var pe=Fe(.7,1,1,.5,0,se/z,1,se/z,Le());return le.spot2=new go.Spot(pe.x,pe.y),ye(pe),le}),go.Shape.setFigureParameter("IBeamArrow2",0,new _n("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new _n("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=40);var ie=ue?ue.parameter2:NaN;isNaN(ie)&&(ie=100);var se=(z-oe)/2,le=se+oe,Se=(z-ie)/2,pe=Se+ie;(oe>z||ie>z)&&(ie>oe?(oe=oe*z/ie,se=(z-oe)/2,le=se+oe,Se=0,pe=z):(se=0,le=z,Se=0,pe=z));var Ce=new go.Geometry,Ae=new go.PathFigure(ee,.5*z,!0);Ce.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,pe)),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,pe)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,pe)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,Se)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*ee,Se)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*ee,se)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,se)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,Se).close()),Ce.spot1=new go.Spot(0,se/z);var Oe=Fe(.7,pe/z,1,.5,0,le/z,1,le/z,Le());return Ce.spot2=new go.Spot(Oe.x,Oe.y),ye(Oe),Ce}),go.Shape.setFigureParameter("Pointer",0,new _n("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.1);var ie=new go.Geometry,se=new go.PathFigure(ee,.5*z,!0);ie.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,z)),se.add(new go.PathSegment(go.PathSegment.Line,oe*ee,.5*z)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),ie.spot1=new go.Spot(oe,.35);var le=Fe(.2,.65,1,.65,0,1,1,.5,Le());return ie.spot2=new go.Spot(le.x,le.y),ye(le),ie}),go.Shape.setFigureParameter("RoundedPointer",0,new _n("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=new go.Geometry,se=new go.PathFigure(ee,.5*z,!0);ie.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,z)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,0,oe*ee,.75*z,oe*ee,.25*z).close()),ie.spot1=new go.Spot(oe,.35);var le=Fe(0,.65,1,.65,0,1,1,.5,Le());return ie.spot2=new go.Spot(le.x,le.y),ye(le),ie}),go.Shape.setFigureParameter("SplitEndArrow",0,new _n("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.4);var ie=(.5-oe/2)*z,se=(.5+oe/2)*z,le=new go.Geometry,Se=new go.PathFigure(ee,.5*z,!0);le.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ee,se)),Se.add(new go.PathSegment(go.PathSegment.Line,0,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.5*z)),Se.add(new go.PathSegment(go.PathSegment.Line,0,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ee,0).close()),le.spot1=new go.Spot(.2,.3);var pe=Fe(.7,1,1,.5,0,se/z,1,se/z,Le());return le.spot2=new go.Spot(pe.x,pe.y),ye(pe),le}),go.Shape.setFigureParameter("SplitEndArrow2",0,new _n("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=50);var ie=(z-oe)/2,se=ie+oe;oe>z&&(ie=0,se=z);var le=new go.Geometry,Se=new go.PathFigure(ee,.5*z,!0);le.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ee,se)),Se.add(new go.PathSegment(go.PathSegment.Line,0,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.5*z)),Se.add(new go.PathSegment(go.PathSegment.Line,0,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ee,0).close()),le.spot1=new go.Spot(.2,ie/z);var pe=Fe(.7,1,1,.5,0,se/z,1,se/z,Le());return le.spot2=new go.Spot(pe.x,pe.y),ye(pe),le}),go.Shape.setFigureParameter("SquareArrow",0,new _n("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.7);var ie=new go.Geometry,se=new go.PathFigure(ee,.5*z,!0);return ie.add(se),se.add(new go.PathSegment(go.PathSegment.Line,oe*ee,z)),se.add(new go.PathSegment(go.PathSegment.Line,0,z)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,oe*ee,0).close()),ie.spot1=go.Spot.TopLeft,ie.spot2=new go.Spot(oe,1),ie}),go.Shape.defineFigureGenerator("Cone1",function(ue,ee,z){var oe=new go.Geometry,ie=be*.5,se=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+se)*z,(.5+ie)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*z,(.5-ie)*ee,z,0,(.9+se)*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,ie=new go.PathFigure(0,.9*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,ee,.9*z,(1-.85/.9)*ee,z,.85/.9*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.9*z).close());var se=new go.PathFigure(0,.9*z,!1);return oe.add(se),se.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,ie=new go.PathFigure(.5*ee,z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.85*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.15*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.15*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.85*z).close());var se=new go.PathFigure(.5*ee,z,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.3*z)),se.add(new go.PathSegment(go.PathSegment.Line,0,.15*z)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.3*z)),se.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,ie=new go.PathFigure(0,.3*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.7*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*ee,0).close());var se=new go.PathFigure(0,.3*z,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.3*z)),se.add(new go.PathSegment(go.PathSegment.Line,ee,0)),se.add(new go.PathSegment(go.PathSegment.Move,.7*ee,.3*z)),se.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 ie=new go.Geometry,se=be*.5,le=new go.PathFigure(0,oe,!0);ie.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,0,be*oe,(.5-se)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,1*ee,oe,(.5+se)*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+se)*ee,1*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,z-oe,(.5-se)*ee,1*z,0,z-be*oe)),le.add(new go.PathSegment(go.PathSegment.Line,0,oe));var Se=new go.PathFigure(ee,oe,!1);return ie.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,2*oe,1*ee,2*oe-be*oe,(.5+se)*ee,2*oe)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,oe,(.5-se)*ee,2*oe,0,2*oe-be*oe)),ie.spot1=new go.Spot(0,0,0,2*oe),ie.spot2=new go.Spot(1,1),ie}),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 ie=new go.Geometry,se=be*.5,le=new go.PathFigure(0,z-oe,!0);ie.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-se)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,oe,(.5+se)*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+se)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,z-oe,(.5-se)*ee,z,0,z-be*oe));var Se=new go.PathFigure(0,z-oe,!1);return ie.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z-2*oe,0,z-oe-be*oe,(.5-se)*ee,z-2*oe)),Se.add(new go.PathSegment(go.PathSegment.Bezier,ee,z-oe,(.5+se)*ee,z-2*oe,ee,z-oe-be*oe)),ie.spot1=new go.Spot(0,0),ie.spot2=new go.Spot(1,1,0,-2*oe),ie}),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 ie=new go.Geometry,se=be*.5,le=new go.PathFigure(oe,0,!0);ie.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-se)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee-oe,z,ee,(.5+se)*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+se)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,(.5-se)*z,be*oe,0));var Se=new go.PathFigure(oe,0,!1);return ie.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,2*oe,.5*z,oe+be*oe,0,2*oe,(.5-se)*z)),Se.add(new go.PathSegment(go.PathSegment.Bezier,oe,z,2*oe,(.5+se)*z,oe+be*oe,z)),ie.spot1=new go.Spot(0,0,2*oe,0),ie.spot2=new go.Spot(1,1),ie}),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 ie=new go.Geometry,se=be*.5,le=new go.PathFigure(ee-oe,0,!0);ie.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,ee-be*oe,0,ee,(.5-se)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee-oe,z,ee,(.5+se)*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+se)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,(.5-se)*z,be*oe,0)),le.add(new go.PathSegment(go.PathSegment.Line,ee-oe,0));var Se=new go.PathFigure(ee-oe,0,!1);return ie.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,ee-2*oe,.5*z,ee-oe-be*oe,0,ee-2*oe,(.5-se)*z)),Se.add(new go.PathSegment(go.PathSegment.Bezier,ee-oe,z,ee-2*oe,(.5+se)*z,ee-oe-be*oe,z)),ie.spot1=new go.Spot(0,0),ie.spot2=new go.Spot(1,1,-2*oe,0),ie}),go.Shape.defineFigureGenerator("Prism1",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.25*ee,.25*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var se=new go.PathFigure(.25*ee,.25*z,!1);return oe.add(se),se.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,ie=new go.PathFigure(0,.25*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.75*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var se=new go.PathFigure(0,z,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.25*ee,.5*z)),se.add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)),se.add(new go.PathSegment(go.PathSegment.Move,0,.25*z)),se.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,ie=new go.PathFigure(.5*ee,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.75*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*z).close());var se=new go.PathFigure(.5*ee,0,!1);return oe.add(se),se.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,ie=new go.PathFigure(.5*ee,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.85*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.85*z).close());var se=new go.PathFigure(.5*ee,0,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.7*z)),se.add(new go.PathSegment(go.PathSegment.Line,0,.85*z)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.7*z)),se.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,ie=.2,se=.1,le=be*ie,Se=be*se,pe=.5,Ce=.1,Ae=new go.PathFigure(pe*ee,(Ce+se)*z,!0);oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(pe-ie)*ee,Ce*z,(pe-le)*ee,(Ce+se)*z,(pe-ie)*ee,(Ce+Se)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,pe*ee,(Ce-se)*z,(pe-ie)*ee,(Ce-Se)*z,(pe-le)*ee,(Ce-se)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(pe+ie)*ee,Ce*z,(pe+le)*ee,(Ce-se)*z,(pe+ie)*ee,(Ce-Se)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,pe*ee,(Ce+se)*z,(pe+ie)*ee,(Ce+Se)*z,(pe+le)*ee,(Ce+se)*z));var Oe=.05,Re=be*Oe;pe=.05,Ce=.25;var We=new go.PathFigure(.5*ee,.2*z,!0);return oe.add(We),We.add(new go.PathSegment(go.PathSegment.Line,.95*ee,.2*z)),pe=.95,Ce=.25,We.add(new go.PathSegment(go.PathSegment.Bezier,(pe+Oe)*ee,Ce*z,(pe+Re)*ee,(Ce-Oe)*z,(pe+Oe)*ee,(Ce-Re)*z)),We.add(new go.PathSegment(go.PathSegment.Line,ee,.6*z)),We.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.6*z)),We.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.35*z)),Oe=.025,Re=be*Oe,pe=.825,Ce=.35,We.add(new go.PathSegment(go.PathSegment.Bezier,pe*ee,(Ce-Oe)*z,(pe+Oe)*ee,(Ce-Re)*z,(pe+Re)*ee,(Ce-Oe)*z)),We.add(new go.PathSegment(go.PathSegment.Bezier,(pe-Oe)*ee,Ce*z,(pe-Re)*ee,(Ce-Oe)*z,(pe-Oe)*ee,(Ce-Re)*z)),We.add(new go.PathSegment(go.PathSegment.Line,.8*ee,z)),We.add(new go.PathSegment(go.PathSegment.Line,.55*ee,z)),We.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.7*z)),Oe=.05,Re=be*Oe,pe=.5,Ce=.7,We.add(new go.PathSegment(go.PathSegment.Bezier,pe*ee,(Ce-Oe)*z,(pe+Oe)*ee,(Ce-Re)*z,(pe+Re)*ee,(Ce-Oe)*z)),We.add(new go.PathSegment(go.PathSegment.Bezier,(pe-Oe)*ee,Ce*z,(pe-Re)*ee,(Ce-Oe)*z,(pe-Oe)*ee,(Ce-Re)*z)),We.add(new go.PathSegment(go.PathSegment.Line,.45*ee,z)),We.add(new go.PathSegment(go.PathSegment.Line,.2*ee,z)),We.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.35*z)),Oe=.025,Re=be*Oe,pe=.175,Ce=.35,We.add(new go.PathSegment(go.PathSegment.Bezier,pe*ee,(Ce-Oe)*z,(pe+Oe)*ee,(Ce-Re)*z,(pe+Re)*ee,(Ce-Oe)*z)),We.add(new go.PathSegment(go.PathSegment.Bezier,(pe-Oe)*ee,Ce*z,(pe-Re)*ee,(Ce-Oe)*z,(pe-Oe)*ee,(Ce-Re)*z)),We.add(new go.PathSegment(go.PathSegment.Line,.15*ee,.6*z)),We.add(new go.PathSegment(go.PathSegment.Line,0,.6*z)),We.add(new go.PathSegment(go.PathSegment.Line,0,.25*z)),Oe=.05,Re=be*Oe,pe=.05,Ce=.25,We.add(new go.PathSegment(go.PathSegment.Bezier,pe*ee,(Ce-Oe)*z,(pe-Oe)*ee,(Ce-Re)*z,(pe-Re)*ee,(Ce-Oe)*z)),We.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 _n("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.2);var ie=new go.Geometry,se=new go.PathFigure(ee,0,!0);return ie.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ee,z)),se.add(new go.PathSegment(go.PathSegment.Line,0,z)),se.add(new go.PathSegment(go.PathSegment.Line,0,oe*z)),se.add(new go.PathSegment(go.PathSegment.Line,oe*ee,0).close()),ie.spot1=new go.Spot(0,oe),ie.spot2=go.Spot.BottomRight,ie}),go.Shape.defineFigureGenerator("Collate",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.5*ee,.5*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z));var se=new go.PathFigure(.5*ee,.5*z,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ee,z)),se.add(new go.PathSegment(go.PathSegment.Line,0,z)),se.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,ie=ue?ue.parameter1:NaN;isNaN(ie)&&(ie=.1);var se=new go.PathFigure(0,0,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ee,0)),se.add(new go.PathSegment(go.PathSegment.Line,ee,z)),se.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var le=new go.PathFigure(0,ie*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,ie*z)),le.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,(1-ie)*z)),oe}),go.Shape.defineFigureGenerator("Database",function(ue,ee,z){var oe=new go.Geometry,ie=be*.5,se=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+se)*z,(.5+ie)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*z,(.5-ie)*ee,z,0,(.9+se)*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-se)*z,(.5-ie)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,.1*z,(.5+ie)*ee,0,ee,(.1-se)*z));var Se=new go.PathFigure(ee,.1*z,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.2*z,ee,(.1+se)*z,(.5+ie)*ee,.2*z)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*z,(.5-ie)*ee,.2*z,0,(.1+se)*z)),Se.add(new go.PathSegment(go.PathSegment.Move,ee,.2*z)),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.3*z,ee,(.2+se)*z,(.5+ie)*ee,.3*z)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*z,(.5-ie)*ee,.3*z,0,(.2+se)*z)),Se.add(new go.PathSegment(go.PathSegment.Move,ee,.3*z)),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.4*z,ee,(.3+se)*z,(.5+ie)*ee,.4*z)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*z,(.5-ie)*ee,.4*z,0,(.3+se)*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,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*ee,z,ee,0,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.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,ie=be*.5,se=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+se)*z,(.5+ie)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*z,(.5-ie)*ee,z,0,(.9+se)*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-se)*z,(.5-ie)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,.1*z,(.5+ie)*ee,0,ee,(.1-se)*z));var Se=new go.PathFigure(ee,.1*z,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.2*z,ee,(.1+se)*z,(.5+ie)*ee,.2*z)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*z,(.5-ie)*ee,.2*z,0,(.1+se)*z)),Se.add(new go.PathSegment(go.PathSegment.Move,ee,.2*z)),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.3*z,ee,(.2+se)*z,(.5+ie)*ee,.3*z)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*z,(.5-ie)*ee,.3*z,0,(.2+se)*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,ie=new go.PathFigure(.25*ee,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*ee,z,ee,0,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*ee,z)),ie.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,ie=ue?ue.parameter1:NaN;isNaN(ie)?ie=.2:ie<.15&&(ie=.15);var se=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-se)*z,(.2-se)*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+se)*ee,0,ee,(.2-se)*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+se)*z,(.8+se)*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-se)*ee,z,0,(.8+se)*z)),le.add(new go.PathSegment(go.PathSegment.Line,0,.2*z));var Se=new go.PathFigure(0,ie*z,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ee,ie*z)),oe}),go.Shape.defineFigureGenerator("DividedProcess",function(ue,ee,z){var oe=new go.Geometry,ie=ue?ue.parameter1:NaN;(isNaN(ie)||ie<.1)&&(ie=.1);var se=new go.PathFigure(0,0,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ee,0)),se.add(new go.PathSegment(go.PathSegment.Line,ee,z)),se.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var le=new go.PathFigure(0,ie*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,ie*z)),oe}),go.Shape.defineFigureGenerator("Document",function(ue,ee,z){var oe=new go.Geometry;z=z/.8;var ie=new go.PathFigure(0,.7*z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.7*z)),ie.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,ie=ue?ue.parameter1:NaN;(isNaN(ie)||ie<.2)&&(ie=.2);var se=new go.PathFigure(0,0,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ee,0)),se.add(new go.PathSegment(go.PathSegment.Line,ee,z)),se.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var le=new go.PathFigure(ie*ee,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,ie*z)),le.add(new go.PathSegment(go.PathSegment.Move,ee,ie*z)),le.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*z)),le.add(new go.PathSegment(go.PathSegment.Line,ie*ee,z)),le.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,(1-ie)*z)),oe}),go.Shape.defineFigureGenerator("ExternalProcess",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.5*ee,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*z).close());var se=new go.PathFigure(.1*ee,.4*z,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.6*z)),se.add(new go.PathSegment(go.PathSegment.Move,.9*ee,.6*z)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.4*z)),se.add(new go.PathSegment(go.PathSegment.Move,.6*ee,.1*z)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.1*z)),se.add(new go.PathSegment(go.PathSegment.Move,.4*ee,.9*z)),se.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,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var se=new go.PathFigure(.75*ee,0,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.25*z)),se.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,ie=new go.PathFigure(ee,.5*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z));var se=new go.PathFigure(ee,.5*z,!1);oe.add(se),se.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,ie=ue?ue.parameter1:NaN,se=ue?ue.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(se)&&(se=.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 Se=new go.PathFigure(ie*ee,0,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ie*ee,z)),Se.add(new go.PathSegment(go.PathSegment.Move,0,se*z)),Se.add(new go.PathSegment(go.PathSegment.Line,ee,se*z)),oe}),go.Shape.defineFigureGenerator("Junction",function(ue,ee,z){var oe=new go.Geometry,ie=1/Math.SQRT2,se=(1-1/Math.SQRT2)/2,le=be*.5,Se=.5,pe=new go.PathFigure(ee,Se*z,!0);oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,Se*ee,z,ee,(Se+le)*z,(Se+le)*ee,z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,Se*z,(Se-le)*ee,z,0,(Se+le)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,Se*ee,0,0,(Se-le)*z,(Se-le)*ee,0)),pe.add(new go.PathSegment(go.PathSegment.Bezier,ee,Se*z,(Se+le)*ee,0,ee,(Se-le)*z));var Ce=new go.PathFigure((se+ie)*ee,(se+ie)*z,!1);return oe.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Line,se*ee,se*z)),Ce.add(new go.PathSegment(go.PathSegment.Move,se*ee,(se+ie)*z)),Ce.add(new go.PathSegment(go.PathSegment.Line,(se+ie)*ee,se*z)),oe}),go.Shape.defineFigureGenerator("LinedDocument",function(ue,ee,z){var oe=new go.Geometry;z=z/.8;var ie=new go.PathFigure(0,.7*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.7*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*z,.5*ee,.4*z,.5*ee,z).close());var se=new go.PathFigure(.1*ee,0,!1);return oe.add(se),se.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,ie=new go.PathFigure(0,z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)),ie.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,ie=be*.5,se=.5,le=new go.PathFigure(.5*ee,z,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,0,se*z,(se-ie)*ee,z,0,(se+ie)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,se*ee,0,0,(se-ie)*z,(se-ie)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,se*z,(se+ie)*ee,0,ee,(se-ie)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,(se+.1)*ee,.9*z,ee,(se+ie)*z,(se+ie)*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,ie=new go.PathFigure(ee,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.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,ie=ue?ue.parameter1:NaN;isNaN(ie)&&(ie=.7);var se=new go.PathFigure(0,0,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ee,0)),se.add(new go.PathSegment(go.PathSegment.Line,ie*ee,.5*z)),se.add(new go.PathSegment(go.PathSegment.Line,ee,z)),se.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,ie=ue?ue.parameter1:NaN;isNaN(ie)&&(ie=.25);var se=new go.PathFigure(0,0,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ee,ie*z)),se.add(new go.PathSegment(go.PathSegment.Line,ee,0)),se.add(new go.PathSegment(go.PathSegment.Line,ee,z)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ee,(1-ie)*z)),se.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe}),go.Shape.defineFigureGenerator("MicroformRecording",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.25*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.15*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.85*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.75*z)),ie.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 ie=new go.PathFigure(ee,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*ee,.44*z,.96*ee,.47*z,.93*ee,.45*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.54*z,.86*ee,.57*z,.83*ee,.55*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.7*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*z,.4*ee,.4*z,.4*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.1*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.1*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*ee,0).close());var se=new go.PathFigure(.1*ee,.2*z,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.2*z)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.54*z)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.1*z)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.1*z)),se.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,ie=new go.PathFigure(.1*ee,.1*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.1*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.9*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.9*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.2*z).close());var se=new go.PathFigure(.2*ee,.1*z,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.1*z)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.8*z)),se.add(new go.PathSegment(go.PathSegment.Move,.1*ee,.2*z)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.2*z)),se.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,ie=ue?ue.parameter1:NaN;isNaN(ie)&&(ie=.1);var se=1-ie,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 Se=new go.PathFigure(.5*ie*ee,ie*z,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,(1-.5*ie)*ee,ie*z)),oe}),go.Shape.defineFigureGenerator("OffPageConnector",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,z)),ie.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,ie=be*.5,se=.5,le=new go.PathFigure(ee,se*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,se*ee,z,ee,(se+ie)*z,(se+ie)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,se*z,(se-ie)*ee,z,0,(se+ie)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,se*ee,0,0,(se-ie)*z,(se-ie)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,se*z,(se+ie)*ee,0,ee,(se-ie)*z));var Se=new go.PathFigure(ee,.5*z,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,0,.5*z)),Se.add(new go.PathSegment(go.PathSegment.Move,.5*ee,z)),Se.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 ie=new go.PathFigure(0,.7*z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.3*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,ee,.3*z,.5*ee,.6*z,.5*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.7*z)),ie.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,ie=ue?ue.parameter1:NaN,se=ue?ue.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(se)&&(se=.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-se)*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,ie=ue?ue.parameter1:NaN,se=ue?ue.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(se)&&(se=.3);var le=new go.PathFigure(0,0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,(1-se)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),le.add(new go.PathSegment(go.PathSegment.Line,(1-se)*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,ie=ue?ue.parameter1:NaN;isNaN(ie)&&(ie=.1);var se=new go.PathFigure(0,0,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ee,0)),se.add(new go.PathSegment(go.PathSegment.Line,ee,z)),se.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var le=new go.PathFigure((1-ie)*ee,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Move,ie*ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,ie*ee,z)),oe}),go.Shape.defineFigureGenerator("Process",function(ue,ee,z){var oe=new go.Geometry,ie=ue?ue.parameter1:NaN;isNaN(ie)&&(ie=.1);var se=new go.PathFigure(0,0,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ee,0)),se.add(new go.PathSegment(go.PathSegment.Line,ee,z)),se.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var le=new go.PathFigure(ie*ee,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ie*ee,z)),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("Sort",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.5*ee,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*z).close());var se=new go.PathFigure(0,.5*z,!1);return oe.add(se),se.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,ie=ue?ue.parameter1:NaN;isNaN(ie)&&(ie=.25);var se=new go.PathFigure(ie*ee,0,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*ee,.5*z,.25*ee,.5*z)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*ee,.5*z,.25*ee,.5*z));var le=new go.PathFigure(ie*ee,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ie*ee,z)),le.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*ee,z)),oe.spot1=new go.Spot(ie,0),oe.spot2=new go.Spot(1-ie,1),oe}),go.Shape.defineFigureGenerator("Terminator",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.25*ee,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*ee,.5*z,.25*ee,.5*z)),ie.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,ie=ue?ue.parameter1:NaN;isNaN(ie)&&(ie=.1);var se=new go.PathFigure(0,0,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ee,0)),se.add(new go.PathSegment(go.PathSegment.Line,ee,z)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ee,(1-ie)*z)),se.add(new go.PathSegment(go.PathSegment.Line,0,(1-ie)*z).close()),oe.spot1=go.Spot.TopLeft,oe}),go.Shape.defineFigureGenerator("AndGate",function(ue,ee,z){var oe=new go.Geometry,ie=be*.5,se=new go.PathFigure(0,0,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,(.5+ie)*ee,0,ee,(.5-ie)*z)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,ee,(.5+ie)*z,(.5+ie)*ee,z)),se.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,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.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,ie=be*.5,se=.5,le=new go.PathFigure(ee,se*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,se*ee,z,ee,(se+ie)*z,(se+ie)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,se*z,(se-ie)*ee,z,0,(se+ie)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,se*ee,0,0,(se-ie)*z,(se-ie)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,se*z,(se+ie)*ee,0,ee,(se-ie)*z));var Se=new go.PathFigure(ee,se*z,!1);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ee,se*z));var pe=new go.PathFigure(.8*ee,.75*z,!1);return oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.25*z)),pe.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.25*z)),pe.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.75*z)),pe.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.75*z)),pe.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.25*z)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.25*z)),pe.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,ie=new go.PathFigure(.5*ee,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.4*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.3*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.4*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*ee,z)),oe}),go.Shape.defineFigureGenerator("Inverter",function(ue,ee,z){var oe=new go.Geometry,ie=be*.1,se=.1,le=.9,Se=.5,pe=new go.PathFigure(.8*ee,.5*z,!0);oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,0,z)),pe.add(new go.PathSegment(go.PathSegment.Line,0,0)),pe.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.5*z));var Ce=new go.PathFigure((le+se)*ee,Se*z,!0);return oe.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se+se)*z,(le+se)*ee,(Se+ie)*z,(le+ie)*ee,(Se+se)*z)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*ee,Se*z,(le-ie)*ee,(Se+se)*z,(le-se)*ee,(Se+ie)*z)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se-se)*z,(le-se)*ee,(Se-ie)*z,(le-ie)*ee,(Se-se)*z)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*ee,Se*z,(le+ie)*ee,(Se-se)*z,(le+se)*ee,(Se-ie)*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,ie=be*.5,se=be*.4,le=be*.1,Se=.1,pe=.9,Ce=.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+se)*z,(.4+ie)*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+ie)*ee,0,.8*ee,(.5-se)*z));var Oe=new go.PathFigure((pe+Se)*ee,Ce*z,!0);return oe.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,pe*ee,(Ce+Se)*z,(pe+Se)*ee,(Ce+le)*z,(pe+le)*ee,(Ce+Se)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(pe-Se)*ee,Ce*z,(pe-le)*ee,(Ce+Se)*z,(pe-Se)*ee,(Ce+le)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,pe*ee,(Ce-Se)*z,(pe-Se)*ee,(Ce-le)*z,(pe-le)*ee,(Ce-Se)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(pe+Se)*ee,Ce*z,(pe+le)*ee,(Ce-Se)*z,(pe+Se)*ee,(Ce-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,ie=.5,se=be*ie,le=0,Se=.5,pe=new go.PathFigure(.8*ee,.5*z,!0);oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,z,.7*ee,(Se+se)*z,(le+se)*ee,(Se+ie)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ee,.75*z,.25*ee,.25*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.5*z,(le+se)*ee,(Se-ie)*z,.7*ee,(Se-se)*z)),ie=.1,se=be*.1,le=.9,Se=.5;var Ce=new go.PathFigure((le-ie)*ee,Se*z,!0);return oe.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se-ie)*z,(le-ie)*ee,(Se-se)*z,(le-se)*ee,(Se-ie)*z)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(le+ie)*ee,Se*z,(le+se)*ee,(Se-ie)*z,(le+ie)*ee,(Se-se)*z)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se+ie)*z,(le+ie)*ee,(Se+se)*z,(le+se)*ee,(Se+ie)*z)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(le-ie)*ee,Se*z,(le-se)*ee,(Se+ie)*z,(le-ie)*ee,(Se+se)*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,ie=.5,se=be*ie,le=0,Se=.5,pe=new go.PathFigure(0,0,!0);return oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,(le+se+se)*ee,(Se-ie)*z,.8*ee,(Se-se)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,z,.8*ee,(Se+se)*z,(le+se+se)*ee,(Se+ie)*z)),pe.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,ie=.5,se=be*ie,le=.2,Se=.5,pe=new go.PathFigure(.1*ee,0,!1);oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,.1*ee,z,.35*ee,.25*z,.35*ee,.75*z));var Ce=new go.PathFigure(.8*ee,.5*z,!0);oe.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,.2*ee,z,.7*ee,(Se+se)*z,(le+se)*ee,(Se+ie)*z)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,.2*ee,0,.45*ee,.75*z,.45*ee,.25*z)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.5*z,(le+se)*ee,(Se-ie)*z,.7*ee,(Se-se)*z)),ie=.1,se=be*.1,le=.9,Se=.5;var Ae=new go.PathFigure((le-ie)*ee,Se*z,!0);return oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se-ie)*z,(le-ie)*ee,(Se-se)*z,(le-se)*ee,(Se-ie)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(le+ie)*ee,Se*z,(le+se)*ee,(Se-ie)*z,(le+ie)*ee,(Se-se)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se+ie)*z,(le+ie)*ee,(Se+se)*z,(le+se)*ee,(Se+ie)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(le-ie)*ee,Se*z,(le-se)*ee,(Se+ie)*z,(le-ie)*ee,(Se+se)*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,ie=.5,se=be*ie,le=.2,Se=.5,pe=new go.PathFigure(.1*ee,0,!1);oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,.1*ee,z,.35*ee,.25*z,.35*ee,.75*z));var Ce=new go.PathFigure(.2*ee,0,!0);return oe.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,(le+se)*ee,(Se-ie)*z,.9*ee,(Se-se)*z)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,.2*ee,z,.9*ee,(Se+se)*z,(le+se)*ee,(Se+ie)*z)),Ce.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,ie=new go.PathFigure(0,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Move,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),oe}),go.Shape.defineFigureGenerator("Resistor",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,.5*z,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.1*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*ee,z)),ie.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,ie=be*.1,se=.1,le=.1,Se=.5,pe=new go.PathFigure((le-ie*.5)*ee,z,!1);return oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*ee,0,(le-ie)*ee,z,(le-se)*ee,0)),le=.3,pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,z,(le+se)*ee,0,(le+ie)*ee,z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*ee,0,(le-ie)*ee,z,(le-se)*ee,0)),le=.5,pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,z,(le+se)*ee,0,(le+ie)*ee,z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*ee,0,(le-ie)*ee,z,(le-se)*ee,0)),le=.7,pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,z,(le+se)*ee,0,(le+ie)*ee,z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*ee,0,(le-ie)*ee,z,(le-se)*ee,0)),le=.9,pe.add(new go.PathSegment(go.PathSegment.Bezier,(le+ie*.5)*ee,z,(le+se)*ee,0,(le+ie)*ee,z)),oe}),go.Shape.defineFigureGenerator("ACvoltageSource",function(ue,ee,z){var oe=new go.Geometry,ie=be*.5,se=.5,le=.5,Se=.5,pe=new go.PathFigure((le-se)*ee,Se*z,!1);return oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se-se)*z,(le-se)*ee,(Se-ie)*z,(le-ie)*ee,(Se-se)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*ee,Se*z,(le+ie)*ee,(Se-se)*z,(le+se)*ee,(Se-ie)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se+se)*z,(le+se)*ee,(Se+ie)*z,(le+ie)*ee,(Se+se)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*ee,Se*z,(le-ie)*ee,(Se+se)*z,(le-se)*ee,(Se+ie)*z)),pe.add(new go.PathSegment(go.PathSegment.Move,(le-se+.1)*ee,Se*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(le+se-.1)*ee,Se*z,le*ee,(Se-se)*z,le*ee,(Se+se)*z)),oe}),go.Shape.defineFigureGenerator("DCvoltageSource",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,.75*z,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*z)),ie.add(new go.PathSegment(go.PathSegment.Move,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),oe}),go.Shape.defineFigureGenerator("Diode",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(ee,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.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,ie=ee,se=z;ee=ee*.38,z=z*.6;var le=be*.8,Se=.8,pe=0,Ce=.5,Ae=(ie-ee)/2,Oe=(se-z)/2,Re=new go.PathFigure(pe*ee+Ae,(Ce+Se)*z+Oe,!0);oe.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,(pe-Se)*ee+Ae,Ce*z+Oe,(pe-le)*ee+Ae,(Ce+Se)*z+Oe,(pe-Se)*ee+Ae,(Ce+le)*z+Oe)),Re.add(new go.PathSegment(go.PathSegment.Bezier,pe*ee+Ae,(Ce-Se)*z+Oe,(pe-Se)*ee+Ae,(Ce-le)*z+Oe,(pe-le)*ee+Ae,(Ce-Se)*z+Oe)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(pe-Se+le*.5)*ee+Ae,Ce*z+Oe,pe*ee+Ae,(Ce-Se)*z+Oe,(pe-Se+le*.5)*ee+Ae,(Ce-le)*z+Oe)),Re.add(new go.PathSegment(go.PathSegment.Bezier,pe*ee+Ae,(Ce+Se)*z+Oe,(pe-Se+le*.5)*ee+Ae,(Ce+le)*z+Oe,pe*ee+Ae,(Ce+Se)*z+Oe).close()),le=be*.4,Se=.4,pe=.2,Ce=.5;var We=new go.PathFigure(pe*ee+Ae,(Ce+Se)*z+Oe,!0);oe.add(We),We.add(new go.PathSegment(go.PathSegment.Bezier,(pe-Se)*ee+Ae,Ce*z+Oe,(pe-le)*ee+Ae,(Ce+Se)*z+Oe,(pe-Se)*ee+Ae,(Ce+le)*z+Oe)),We.add(new go.PathSegment(go.PathSegment.Bezier,pe*ee+Ae,(Ce-Se)*z+Oe,(pe-Se)*ee+Ae,(Ce-le)*z+Oe,(pe-le)*ee+Ae,(Ce-Se)*z+Oe)),We.add(new go.PathSegment(go.PathSegment.Bezier,(pe-Se+le*.5)*ee+Ae,Ce*z+Oe,pe*ee+Ae,(Ce-Se)*z+Oe,(pe-Se+le*.5)*ee+Ae,(Ce-le)*z+Oe)),We.add(new go.PathSegment(go.PathSegment.Bezier,pe*ee+Ae,(Ce+Se)*z+Oe,(pe-Se+le*.5)*ee+Ae,(Ce+le)*z+Oe,pe*ee+Ae,(Ce+Se)*z+Oe).close()),le=be*.2,Se=.2,pe=.5,Ce=.5;var $e=new go.PathFigure((pe-Se)*ee+Ae,Ce*z+Oe,!0);oe.add($e),$e.add(new go.PathSegment(go.PathSegment.Bezier,pe*ee+Ae,(Ce-Se)*z+Oe,(pe-Se)*ee+Ae,(Ce-le)*z+Oe,(pe-le)*ee+Ae,(Ce-Se)*z+Oe)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(pe+Se)*ee+Ae,Ce*z+Oe,(pe+le)*ee+Ae,(Ce-Se)*z+Oe,(pe+Se)*ee+Ae,(Ce-le)*z+Oe)),$e.add(new go.PathSegment(go.PathSegment.Bezier,pe*ee+Ae,(Ce+Se)*z+Oe,(pe+Se)*ee+Ae,(Ce+le)*z+Oe,(pe+le)*ee+Ae,(Ce+Se)*z+Oe)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(pe-Se)*ee+Ae,Ce*z+Oe,(pe-le)*ee+Ae,(Ce+Se)*z+Oe,(pe-Se)*ee+Ae,(Ce+le)*z+Oe)),le=be*.4,Se=.4,pe=.8,Ce=.5;var Je=new go.PathFigure(pe*ee+Ae,(Ce-Se)*z+Oe,!0);oe.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,(pe+Se)*ee+Ae,Ce*z+Oe,(pe+le)*ee+Ae,(Ce-Se)*z+Oe,(pe+Se)*ee+Ae,(Ce-le)*z+Oe)),Je.add(new go.PathSegment(go.PathSegment.Bezier,pe*ee+Ae,(Ce+Se)*z+Oe,(pe+Se)*ee+Ae,(Ce+le)*z+Oe,(pe+le)*ee+Ae,(Ce+Se)*z+Oe)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(pe+Se-le*.5)*ee+Ae,Ce*z+Oe,pe*ee+Ae,(Ce+Se)*z+Oe,(pe+Se-le*.5)*ee+Ae,(Ce+le)*z+Oe)),Je.add(new go.PathSegment(go.PathSegment.Bezier,pe*ee+Ae,(Ce-Se)*z+Oe,(pe+Se-le*.5)*ee+Ae,(Ce-le)*z+Oe,pe*ee+Ae,(Ce-Se)*z+Oe).close()),le=be*.8,Se=.8,pe=1,Ce=.5;var pt=new go.PathFigure(pe*ee+Ae,(Ce-Se)*z+Oe,!0);return oe.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,(pe+Se)*ee+Ae,Ce*z+Oe,(pe+le)*ee+Ae,(Ce-Se)*z+Oe,(pe+Se)*ee+Ae,(Ce-le)*z+Oe)),pt.add(new go.PathSegment(go.PathSegment.Bezier,pe*ee+Ae,(Ce+Se)*z+Oe,(pe+Se)*ee+Ae,(Ce+le)*z+Oe,(pe+le)*ee+Ae,(Ce+Se)*z+Oe)),pt.add(new go.PathSegment(go.PathSegment.Bezier,(pe+Se-le*.5)*ee+Ae,Ce*z+Oe,pe*ee+Ae,(Ce+Se)*z+Oe,(pe+Se-le*.5)*ee+Ae,(Ce+le)*z+Oe)),pt.add(new go.PathSegment(go.PathSegment.Bezier,pe*ee+Ae,(Ce-Se)*z+Oe,(pe+Se-le*.5)*ee+Ae,(Ce-le)*z+Oe,pe*ee+Ae,(Ce-Se)*z+Oe).close()),oe}),go.Shape.defineFigureGenerator("Email",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var se=new go.PathFigure(0,0,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.6*z)),se.add(new go.PathSegment(go.PathSegment.Line,ee,0)),se.add(new go.PathSegment(go.PathSegment.Move,0,z)),se.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.54*z)),se.add(new go.PathSegment(go.PathSegment.Move,ee,z)),se.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,ie=new go.PathFigure(.35*ee,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.65*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.4*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*ee,.4*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*ee,0).close());var se=new go.PathFigure(.1*ee,z,!0,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.4*ee,z)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.6*z)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.6*z)),se.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 Se=new go.PathFigure(0,.5*z,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),Se.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.5*z)),Se.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.4*z)),Se.add(new go.PathSegment(go.PathSegment.Move,.75*ee,.5*z)),Se.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.6*z)),Se.add(new go.PathSegment(go.PathSegment.Move,.25*ee,.5*z)),Se.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,ie=be*.4,se=.4,le=.5,Se=.5,pe=Le(),Ce=Le(),Ae=Le(),Oe=Le();Me(le,Se-se,le+ie,Se-se,le+se,Se-ie,le+se,Se,.5,pe,pe,Ce,Ae,Oe);var Re=De(Ce.x,Ce.y),We=new go.PathFigure(Ce.x*ee,Ce.y*z,!0);oe.add(We),We.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*ee,Se*z,Ae.x*ee,Ae.y*z,Oe.x*ee,Oe.y*z)),We.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se+se)*z,(le+se)*ee,(Se+ie)*z,(le+ie)*ee,(Se+se)*z)),We.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*ee,Se*z,(le-ie)*ee,(Se+se)*z,(le-se)*ee,(Se+ie)*z)),Me(le-se,Se,le-se,Se-ie,le-ie,Se-se,le,Se-se,.5,Ae,Oe,Ce,pe,pe),We.add(new go.PathSegment(go.PathSegment.Bezier,Ce.x*ee,Ce.y*z,Ae.x*ee,Ae.y*z,Oe.x*ee,Oe.y*z)),ie=be*.3,se=.3,Me(le-se,Se,le-se,Se-ie,le-ie,Se-se,le,Se-se,.5,Ae,Oe,Ce,pe,pe),We.add(new go.PathSegment(go.PathSegment.Line,Ce.x*ee,Ce.y*z)),We.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*ee,Se*z,Oe.x*ee,Oe.y*z,Ae.x*ee,Ae.y*z)),We.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se+se)*z,(le-se)*ee,(Se+ie)*z,(le-ie)*ee,(Se+se)*z)),We.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*ee,Se*z,(le+ie)*ee,(Se+se)*z,(le+se)*ee,(Se+ie)*z)),Me(le,Se-se,le+ie,Se-se,le+se,Se-ie,le+se,Se,.5,pe,pe,Ce,Ae,Oe),We.add(new go.PathSegment(go.PathSegment.Bezier,Ce.x*ee,Ce.y*z,Oe.x*ee,Oe.y*z,Ae.x*ee,Ae.y*z).close());var We=new go.PathFigure(.45*ee,0,!0);return oe.add(We),We.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.5*z)),We.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.5*z)),We.add(new go.PathSegment(go.PathSegment.Line,.55*ee,0).close()),ye(pe),ye(Ce),ye(Ae),ye(Oe),ye(Re),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,ie=new go.PathFigure(0,z/2,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,180,360,ee/2,z/2,ee/2,z/2));function se(le,Se,pe){le.add(new go.PathSegment(go.PathSegment.Move,(.3+Se)*ee,(.8+pe)*z)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+Se)*ee,(.5+pe)*z)),le.add(new go.PathSegment(go.PathSegment.Line,(.1+Se)*ee,(.5+pe)*z)),le.add(new go.PathSegment(go.PathSegment.Line,(.3+Se)*ee,(.8+pe)*z).close())}return se(ie,0,0),se(ie,.4,0),se(ie,.2,-.3),oe}),go.Shape.defineFigureGenerator("IrritationHazard",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.2*ee,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.3*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.7*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*ee,.5*z)),ie.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,ie=new go.PathFigure(.37*ee,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.11*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.77*ee,.04*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*ee,.49*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.37*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.63*ee,.86*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.77*ee,.91*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.34*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.34*ee,.78*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.44*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.56*z)),ie.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,ie=new go.PathFigure(.1*ee,z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.29*ee,0,-.25*ee,.63*z,.45*ee,.44*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.51*ee,.42*z,.48*ee,.17*z,.54*ee,.35*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.59*ee,.18*z,.59*ee,.29*z,.58*ee,.28*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*ee,.6*z,.8*ee,.34*z,.88*ee,.43*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.88*ee,.31*z,.87*ee,.48*z,.88*ee,.43*z)),ie.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,ie=.5,se=0,le=0,Se=ie*be,pe=.4*Math.SQRT2/2+.5,Ce=.5-.5*Math.SQRT2/2,Ae=1,Oe=.5,Re=.5,We=0,$e=new go.PathFigure(pe*ee,(1-Ce)*z,!1);return oe.add($e),$e.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ee,Oe*z,Ae*ee,.7*z,Ae*ee,Oe*z)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(Re+se)*ee,(We+se)*z,(.5+ie+se)*ee,(.5-Se+se)*z,(.5+Se+se)*ee,(.5-ie+se)*z)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+se)*ee,(.5+le)*z,(.5-Se+se)*ee,(.5-ie+le)*z,(.5-ie+se)*ee,(.5-Se+le)*z)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(.35+se)*ee,.9*z,(.5-ie+se)*ee,(.5+Se+le)*z,(.5-Se+se)*ee,.9*z)),$e.add(new go.PathSegment(go.PathSegment.Move,(.25+se)*ee,.8*z)),$e.add(new go.PathSegment(go.PathSegment.Line,(.35+se)*ee,.9*z)),$e.add(new go.PathSegment(go.PathSegment.Line,(.2+se)*ee,.95*z)),oe}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Move,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),oe}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Move,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),oe}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);oe.add(ie);var se=new go.PathFigure(ee,z,!1);oe.add(se);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,ie=new go.PathFigure(0,.5*z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),ie.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,ie=new go.PathFigure(0,.2*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*z).close());var ie=new go.PathFigure(0,.2*z,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.2*z)),oe}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.7*ee,z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.3*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*ee,0,.6*ee,.5*z,0,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*ee,z,.4*ee,.5*z,ee,.5*z).close());var se=new go.PathFigure(.45*ee,.73*z,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.73*z)),se.add(new go.PathSegment(go.PathSegment.Move,.38*ee,.5*z)),se.add(new go.PathSegment(go.PathSegment.Line,.63*ee,.5*z)),se.add(new go.PathSegment(go.PathSegment.Move,.31*ee,.27*z)),se.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,ie=new go.PathFigure(0,0,!1);oe.add(ie);var se=new go.PathFigure(.335*ee,(1-.555)*z,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.335*ee,(1-.405)*z)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ee,(1-.405)*z)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ee,(1-.555)*z)),se.add(new go.PathSegment(go.PathSegment.Bezier,ee,.68*z,(1-.12)*ee,.46*z,(1-.02)*ee,.54*z)),se.add(new go.PathSegment(go.PathSegment.Line,ee,z)),se.add(new go.PathSegment(go.PathSegment.Line,0,z)),se.add(new go.PathSegment(go.PathSegment.Line,0,.68*z)),se.add(new go.PathSegment(go.PathSegment.Bezier,.335*ee,(1-.555)*z,.02*ee,.54*z,.12*ee,.46*z)),se.add(new go.PathSegment(go.PathSegment.Line,.365*ee,(1-.595)*z));var le=.5-.285,Se=.5,pe=le,Ce=Math.PI/4,Ae=4*(1-Math.cos(Ce))/(3*Math.sin(Ce)),Oe=Ae*.5,Re=le,We=le,$e=Ae*Re,Je=Ae*We;se.add(new go.PathSegment(go.PathSegment.Bezier,(Se-Re)*ee,pe*z,(Se-($e+Re)/2)*ee,(pe+(We+Je)/2)*z,(Se-Re)*ee,(pe+Je)*z)),se.add(new go.PathSegment(go.PathSegment.Bezier,Se*ee,(pe-We)*z,(Se-Re)*ee,(pe-Je)*z,(Se-$e)*ee,(pe-We)*z)),se.add(new go.PathSegment(go.PathSegment.Bezier,(Se+Re)*ee,pe*z,(Se+$e)*ee,(pe-We)*z,(Se+Re)*ee,(pe-Je)*z)),se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*ee,(1-.595)*z,(Se+Re)*ee,(pe+Je)*z,(Se+($e+Re)/2)*ee,(pe+(We+Je)/2)*z)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*ee,(1-.595)*z)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ee,(1-.555)*z)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ee,(1-.405)*z)),se.add(new go.PathSegment(go.PathSegment.Line,.335*ee,(1-.405)*z));var pt=new go.PathFigure(.2*ee,z,!1);oe.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.8*z));var St=new go.PathFigure(.8*ee,z,!1);return oe.add(St),St.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,ie=new go.PathFigure(.1*ee,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.9*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*ee,z).close());var se=new go.PathFigure(.2*ee,.2*z,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.2*z)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.4*z)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.4*z)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.6*z)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.6*z)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.8*z)),se.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,ie=new go.PathFigure(0,z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.33*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*ee,z)),ie.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,ie=new go.PathFigure(0,0,!1);oe.add(ie);var se=new go.PathFigure(ee,z,!1);oe.add(se);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,ie=new go.PathFigure(.05*ee,z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1*ee,.8*z,0,z,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.1*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.55*ee,.1*z,.5*ee,0,.5*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.95*ee,.9*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*ee,z,ee,z,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*ee,z));var se=.05;return ie.add(new go.PathSegment(go.PathSegment.Move,(.5-se)*ee,.875*z)),ie.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*ee,.875*z,se*ee,se*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.75*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.325*z,.575*ee,.725*z,.625*ee,.375*z)),ie.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,ie=new go.PathFigure(.45*ee,.95*z,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.95*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.185*ee,.85*z,.17*ee,.95*z,.15*ee,.9*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.235*ee,.75*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*ee,.625*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*ee,.65*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.275*ee,.45*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*ee,.45*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*ee,.575*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1875*ee,.95*z,0,.675*z,0,.7*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.45*ee,.95*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.775*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.22*ee,.775*z));var se=new go.PathFigure(.475*ee,.2*z,!1);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.4*z)),se.add(new go.PathSegment(go.PathSegment.Line,.225*ee,.3*z)),se.add(new go.PathSegment(go.PathSegment.Line,.275*ee,.175*z)),se.add(new go.PathSegment(go.PathSegment.Line,.325*ee,.05*z)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*ee,.05*z,.35*ee,0,.375*ee,0)),se.add(new go.PathSegment(go.PathSegment.Line,.575*ee,.375*z)),se.add(new go.PathSegment(go.PathSegment.Line,.525*ee,.4*z)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.475*z)),se.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.315*z)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.32*z)),se.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.05*z)),se.add(new go.PathSegment(go.PathSegment.Bezier,.575*ee,0,.65*ee,.05*z,.625*ee,0)),se.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,ie=.5,se=be*.5,le=new go.PathFigure(ee,ie*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,ie*ee,z,ee,(ie+se)*z,(ie+se)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,ie*z,(ie-se)*ee,z,0,(ie+se)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,ie*ee,0,0,(ie-se)*z,(ie-se)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,ie*z,(ie+se)*ee,0,ee,(ie-se)*z));var Se=new go.PathFigure(ie*ee,0,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ie*ee,.15*z)),Se.add(new go.PathSegment(go.PathSegment.Move,ie*ee,z)),Se.add(new go.PathSegment(go.PathSegment.Line,ie*ee,.85*z)),Se.add(new go.PathSegment(go.PathSegment.Move,0,ie*z)),Se.add(new go.PathSegment(go.PathSegment.Line,.15*ee,ie*z)),Se.add(new go.PathSegment(go.PathSegment.Move,ee,ie*z)),Se.add(new go.PathSegment(go.PathSegment.Line,.85*ee,ie*z)),Se.add(new go.PathSegment(go.PathSegment.Move,ie*ee,ie*z)),Se.add(new go.PathSegment(go.PathSegment.Line,.58*ee,.1*z)),Se.add(new go.PathSegment(go.PathSegment.Move,ie*ee,ie*z)),Se.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,ie=new go.PathFigure(0,.15*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.15*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var se=new go.PathFigure(0,.15*z,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ee,0)),se.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,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var se=new go.PathFigure(0,.2*z,!1);oe.add(se),se.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,ie=new go.PathFigure(ee,z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z).close());var se=new go.PathFigure(0,.2*z,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.2*z)),se.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.4*z)),se.add(new go.PathSegment(go.PathSegment.Line,0,.4*z)),se.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,ie=new go.PathFigure(.15*ee,.6*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.15*ee,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*ee,.6*z));var se=new go.PathFigure(.15*ee,.6*z,!1);return oe.add(se),se.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,ie=new go.PathFigure(ee,z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*ee,.33*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*ee,.33*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.33*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z).close()),oe}),go.Shape.defineFigureGenerator("Workcell",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.4*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*ee,.4*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe}),go.Shape.defineFigureGenerator("Supermarket",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.33*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.33*z)),ie.add(new go.PathSegment(go.PathSegment.Move,ee,.33*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.66*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.66*z)),ie.add(new go.PathSegment(go.PathSegment.Move,ee,.66*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),oe}),go.Shape.defineFigureGenerator("TruckShipment",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.6*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var se=new go.PathFigure(ee,.8*z,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ee,.4*z)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.4*z)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.8*z)),se.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z).close());var le=.1,Se=be*.1,pe=.2,Ce=.9,Ae=new go.PathFigure((pe-le)*ee,Ce*z,!0);oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,pe*ee,(Ce-le)*z,(pe-le)*ee,(Ce-Se)*z,(pe-Se)*ee,(Ce-le)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(pe+le)*ee,Ce*z,(pe+Se)*ee,(Ce-le)*z,(pe+le)*ee,(Ce-Se)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,pe*ee,(Ce+le)*z,(pe+le)*ee,(Ce+Se)*z,(pe+Se)*ee,(Ce+le)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(pe-le)*ee,Ce*z,(pe-Se)*ee,(Ce+le)*z,(pe-le)*ee,(Ce+Se)*z).close()),le=.1,Se=be*.1,pe=.8,Ce=.9;var Oe=new go.PathFigure((pe-le)*ee,Ce*z,!0);return oe.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,pe*ee,(Ce-le)*z,(pe-le)*ee,(Ce-Se)*z,(pe-Se)*ee,(Ce-le)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(pe+le)*ee,Ce*z,(pe+Se)*ee,(Ce-le)*z,(pe+le)*ee,(Ce-Se)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,pe*ee,(Ce+le)*z,(pe+le)*ee,(Ce+Se)*z,(pe+Se)*ee,(Ce+le)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(pe-le)*ee,Ce*z,(pe-Se)*ee,(Ce+le)*z,(pe-le)*ee,(Ce+Se)*z).close()),oe}),go.Shape.defineFigureGenerator("KanbanPost",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.2*ee,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,z)),oe}),go.Shape.defineFigureGenerator("Forklift",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0));var se=new go.PathFigure(0,.5*z,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.8*z)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),se.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 Se=new go.PathFigure(.5*ee,.7*z,!1);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ee,.7*z));var pe=.1,Ce=be*.1,Ae=.1,Oe=.9,Re=new go.PathFigure((Ae-pe)*ee,Oe*z,!0);oe.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ee,(Oe-pe)*z,(Ae-pe)*ee,(Oe-Ce)*z,(Ae-Ce)*ee,(Oe-pe)*z)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+pe)*ee,Oe*z,(Ae+Ce)*ee,(Oe-pe)*z,(Ae+pe)*ee,(Oe-Ce)*z)),Re.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ee,(Oe+pe)*z,(Ae+pe)*ee,(Oe+Ce)*z,(Ae+Ce)*ee,(Oe+pe)*z)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-pe)*ee,Oe*z,(Ae-Ce)*ee,(Oe+pe)*z,(Ae-pe)*ee,(Oe+Ce)*z)),pe=.1,Ce=be*.1,Ae=.4,Oe=.9;var We=new go.PathFigure((Ae-pe)*ee,Oe*z,!0);return oe.add(We),We.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ee,(Oe-pe)*z,(Ae-pe)*ee,(Oe-Ce)*z,(Ae-Ce)*ee,(Oe-pe)*z)),We.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+pe)*ee,Oe*z,(Ae+Ce)*ee,(Oe-pe)*z,(Ae+pe)*ee,(Oe-Ce)*z)),We.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ee,(Oe+pe)*z,(Ae+pe)*ee,(Oe+Ce)*z,(Ae+Ce)*ee,(Oe+pe)*z)),We.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-pe)*ee,Oe*z,(Ae-Ce)*ee,(Oe+pe)*z,(Ae-pe)*ee,(Oe+Ce)*z)),oe}),go.Shape.defineFigureGenerator("RailShipment",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.1*ee,.4*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.4*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.9*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.9*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.4*z).close());var se=new go.PathFigure(.45*ee,.7*z,!1);oe.add(se),se.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,Oe=be*.05,Re=.175,We=.95,Se=new go.PathFigure((Re-Ae)*ee,We*z,!0);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,Re*ee,(We-Ae)*z,(Re-Ae)*ee,(We-Oe)*z,(Re-Oe)*ee,(We-Ae)*z)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(Re+Ae)*ee,We*z,(Re+Oe)*ee,(We-Ae)*z,(Re+Ae)*ee,(We-Oe)*z)),Se.add(new go.PathSegment(go.PathSegment.Bezier,Re*ee,(We+Ae)*z,(Re+Ae)*ee,(We+Oe)*z,(Re+Oe)*ee,(We+Ae)*z)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(Re-Ae)*ee,We*z,(Re-Oe)*ee,(We+Ae)*z,(Re-Ae)*ee,(We+Oe)*z));var Ae=.05,Oe=be*.05,Re=.375,We=.95,pe=new go.PathFigure((Re-Ae)*ee,We*z,!0);oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,Re*ee,(We-Ae)*z,(Re-Ae)*ee,(We-Oe)*z,(Re-Oe)*ee,(We-Ae)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(Re+Ae)*ee,We*z,(Re+Oe)*ee,(We-Ae)*z,(Re+Ae)*ee,(We-Oe)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,Re*ee,(We+Ae)*z,(Re+Ae)*ee,(We+Oe)*z,(Re+Oe)*ee,(We+Ae)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(Re-Ae)*ee,We*z,(Re-Oe)*ee,(We+Ae)*z,(Re-Ae)*ee,(We+Oe)*z));var Ae=.05,Oe=be*.05,Re=.625,We=.95,Ce=new go.PathFigure((Re-Ae)*ee,We*z,!0);oe.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,Re*ee,(We-Ae)*z,(Re-Ae)*ee,(We-Oe)*z,(Re-Oe)*ee,(We-Ae)*z)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(Re+Ae)*ee,We*z,(Re+Oe)*ee,(We-Ae)*z,(Re+Ae)*ee,(We-Oe)*z)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,Re*ee,(We+Ae)*z,(Re+Ae)*ee,(We+Oe)*z,(Re+Oe)*ee,(We+Ae)*z)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(Re-Ae)*ee,We*z,(Re-Oe)*ee,(We+Ae)*z,(Re-Ae)*ee,(We+Oe)*z));var Ae=.05,Oe=be*.05,Re=.825,We=.95,$e=new go.PathFigure((Re-Ae)*ee,We*z,!0);oe.add($e),$e.add(new go.PathSegment(go.PathSegment.Bezier,Re*ee,(We-Ae)*z,(Re-Ae)*ee,(We-Oe)*z,(Re-Oe)*ee,(We-Ae)*z)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(Re+Ae)*ee,We*z,(Re+Oe)*ee,(We-Ae)*z,(Re+Ae)*ee,(We-Oe)*z)),$e.add(new go.PathSegment(go.PathSegment.Bezier,Re*ee,(We+Ae)*z,(Re+Ae)*ee,(We+Oe)*z,(Re+Oe)*ee,(We+Ae)*z)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(Re-Ae)*ee,We*z,(Re-Oe)*ee,(We+Ae)*z,(Re-Ae)*ee,(We+Oe)*z).close());var Je=new go.PathFigure(0,z,!1);return oe.add(Je),Je.add(new go.PathSegment(go.PathSegment.Line,ee,z).close()),oe}),go.Shape.defineFigureGenerator("Warehouse",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var se=new go.PathFigure(0,.2*z,!1);oe.add(se),se.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 Se=.05,pe=be*.05,Ce=.35,Ae=.775,Oe=new go.PathFigure((Ce-Se)*ee,Ae*z,!0);return oe.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ee,(Ae-Se)*z,(Ce-Se)*ee,(Ae-pe)*z,(Ce-pe)*ee,(Ae-Se)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ce+Se)*ee,Ae*z,(Ce+pe)*ee,(Ae-Se)*z,(Ce+Se)*ee,(Ae-pe)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ee,(Ae+Se)*z,(Ce+Se)*ee,(Ae+pe)*z,(Ce+pe)*ee,(Ae+Se)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ce-Se)*ee,Ae*z,(Ce-pe)*ee,(Ae+Se)*z,(Ce-Se)*ee,(Ae+pe)*z).close()),oe}),go.Shape.defineFigureGenerator("ControlCenter",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Move,.1*ee,.8*z)),ie.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,ie=new go.PathFigure(0,.75*z,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.75*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*z)),oe}),go.Shape.defineFigureGenerator("Bookmark",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.4*z)),ie.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,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.4*z)),ie.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,ie=new go.PathFigure(.5*ee,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,.75*ee,0,ee,.25*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,ee,.75*z,.75*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*z,.25*ee,z,0,.75*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,0,.25*z,.25*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,.15*ee,.25*z,.15*ee,.75*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,.85*ee,.75*z,.85*ee,.25*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.1675*ee,.15*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8325*ee,.15*z,.35*ee,.3*z,.65*ee,.3*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.1675*ee,.85*z)),ie.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,ie=new go.PathFigure(0,.25*z,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*ee,.25*z,.1*ee,0,.2*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*ee,.25*z,.425*ee,.5*z,.575*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,ee,.25*z,.8*ee,0,.9*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.75*z)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.25*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*ee,.75*z,.1*ee,.5*z,.2*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*ee,.75*z,.425*ee,z,.575*ee,z)),ie.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,ie=.3,se=be*.3,le=.5,Se=.7,pe=new go.PathFigure((le-ie)*ee,Se*z,!0);oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se-ie)*z,(le-ie)*ee,(Se-se)*z,(le-se)*ee,(Se-ie)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(le+ie)*ee,Se*z,(le+se)*ee,(Se-ie)*z,(le+ie)*ee,(Se-se)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se+ie)*z,(le+ie)*ee,(Se+se)*z,(le+se)*ee,(Se+ie)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(le-ie)*ee,Se*z,(le-se)*ee,(Se+ie)*z,(le-ie)*ee,(Se+se)*z));var Ce=new go.PathFigure(0,.7*z,!1);return oe.add(Ce),Ce.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,ie=new go.PathFigure(.5*ee,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.65*z,.65*ee,.3*z,.65*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,.35*ee,.5*z,.35*ee,.3*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.65*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,z,.3*ee,.6*z,.1*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.65*z,.2*ee,z,.35*ee,.95*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.65*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,ee,z,.7*ee,.6*z,.9*ee,.8*z)),ie.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,ie=new go.PathFigure(ee,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.4*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*z,0,.075*z,0,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*ee,z,0,z,.4*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.4*z,.8*ee,z,.85*ee,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.4*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),oe}),go.Shape.defineFigureGenerator("Battery",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.1*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.1*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Move,.4*ee,.1*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.1*z));var se=new go.PathFigure(0,.6*z,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Move,0,.4*z)),se.add(new go.PathSegment(go.PathSegment.Line,ee,.4*z)),oe}),go.Shape.defineFigureGenerator("Delete",function(ue,ee,z){var oe=new go.Geometry,ie=.5,se=be*.5,le=.5,Se=.5,pe=new go.PathFigure((le-ie)*ee,Se*z,!0);oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se-ie)*z,(le-ie)*ee,(Se-se)*z,(le-se)*ee,(Se-ie)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(le+ie)*ee,Se*z,(le+se)*ee,(Se-ie)*z,(le+ie)*ee,(Se-se)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se+ie)*z,(le+ie)*ee,(Se+se)*z,(le+se)*ee,(Se+ie)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(le-ie)*ee,Se*z,(le-se)*ee,(Se+ie)*z,(le-ie)*ee,(Se+se)*z));var Ce=new go.PathFigure(.15*ee,.5*z,!1);return oe.add(Ce),Ce.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,ie=new go.PathFigure(0,.1*z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.1*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.1*z,.15*ee,0,.35*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,ee,.1*z,.65*ee,.2*z,.85*ee,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.5*z,.85*ee,.6*z,.65*ee,.6*z)),ie.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,ie=.5,se=be*.5,le=.5,Se=.5,pe=new go.PathFigure((le-ie)*ee,Se*z,!1);oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se-ie)*z,(le-ie)*ee,(Se-se)*z,(le-se)*ee,(Se-ie)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(le+ie)*ee,Se*z,(le+se)*ee,(Se-ie)*z,(le+ie)*ee,(Se-se)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se+ie)*z,(le+ie)*ee,(Se+se)*z,(le+se)*ee,(Se+ie)*z)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(le-ie)*ee,Se*z,(le-se)*ee,(Se+ie)*z,(le-ie)*ee,(Se+se)*z).close()),ie=.05,se=be*.05,le=.5,Se=.8;var Ce=new go.PathFigure((le-ie)*ee,Se*z,!1);return oe.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se-ie)*z,(le-ie)*ee,(Se-se)*z,(le-se)*ee,(Se-ie)*z)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(le+ie)*ee,Se*z,(le+se)*ee,(Se-ie)*z,(le+ie)*ee,(Se-se)*z)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(Se+ie)*z,(le+ie)*ee,(Se+se)*z,(le+se)*ee,(Se+ie)*z)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(le-ie)*ee,Se*z,(le-se)*ee,(Se+ie)*z,(le-ie)*ee,(Se+se)*z).close()),Ce.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.7*z)),Ce.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.2*z,.75*ee,.475*z,.75*ee,.225*z)),Ce.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,ie=new go.PathFigure(0,.5*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*z));var se=new go.PathFigure(.2*ee,.5*z,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.5*z)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.3*z)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.3*z,.25*ee,0,.75*ee,0)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.5*z)),se.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,ie=new go.PathFigure(0,.5*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*z));var se=new go.PathFigure(.2*ee,.5*z,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.5*z)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.3*z)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.3*z,.25*ee,0,.75*ee,0)),se.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,ie=new go.PathFigure(0,.5*z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1*ee,.3*z,0,.375*z,.05*ee,.325*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.45*ee,.075*z,.3*ee,.225*z,.4*ee,.175*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.525*ee,.075*z,.46*ee,.05*z,.525*ee,.05*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*ee,.4*z,.525*ee,.275*z,.475*ee,.325*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.4*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*ee,.55*z,ee,.4*z,ee,.55*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.425*ee,.55*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.55*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.6*ee,.7*z,.675*ee,.55*z,.675*ee,.7*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.7*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.575*ee,.7*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.575*ee,.85*z,.65*ee,.7*z,.65*ee,.85*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.85*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.525*ee,.85*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.535*ee,z,.61*ee,.85*z,.61*ee,z)),ie.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,ie=new go.PathFigure(0,.2*z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.25*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),ie.add(new go.PathSegment(go.PathSegment.Move,.25*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Move,.75*ee,0)),ie.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,ie=new go.PathFigure(0,z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z*.7)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z*.7).close());var se=new go.PathFigure(0,z*.6,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ee,.6*z)),se.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,ie=new go.PathFigure(ee*1,z*1,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*ee,z*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*ee,z*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*ee,z*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ee,z*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ee,z*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ee,z*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z*.85).close());var se=new go.PathFigure(.126*ee,.85*z,!1);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.126*ee,.45*z)),se.add(new go.PathSegment(go.PathSegment.Line,.322*ee,.45*z)),se.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 Se=new go.PathFigure(.678*ee,.85*z,!1);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,.678*ee,.45*z)),Se.add(new go.PathSegment(go.PathSegment.Line,.874*ee,.45*z)),Se.add(new go.PathSegment(go.PathSegment.Line,.874*ee,.85*z).close());var pe=new go.PathFigure(.5*ee,.1*z,!1);return oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*ee,.3*z)),pe.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,ie=new go.PathFigure(0,z*1,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.2,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.2,z*.8)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.8)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.6)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*.6)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*.4)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*.4)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*.2)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.2)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.15)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.15)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.35,z*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.35,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.15,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.15,z*.95)),ie.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,ie=new go.PathFigure(0,z*1,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.184,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.184,z*(1-.184)).close());var se=new go.PathFigure(ee*.204,z,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ee*.204,z*(1-.184))),se.add(new go.PathSegment(go.PathSegment.Line,ee*.388,z*(1-.184*2))),se.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 Se=new go.PathFigure(ee*.612,z,!0);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ee*.612,z*(1-.184*3))),Se.add(new go.PathSegment(go.PathSegment.Line,ee*.796,z*(1-.184*4))),Se.add(new go.PathSegment(go.PathSegment.Line,ee*.796,z*1).close());var pe=new go.PathFigure(ee*.816,z,!0);return oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ee*.816,z*(1-.184*4))),pe.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*(1-.184*5))),pe.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,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.3,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.3,0).close());var se=new go.PathFigure(ee*.055,.07*z,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ee*.245,z*.07)),se.add(new go.PathSegment(go.PathSegment.Line,ee*.245,z*.1)),se.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 Se=new go.PathFigure(ee*.055,.18*z,!0);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ee*.245,z*.18)),Se.add(new go.PathSegment(go.PathSegment.Line,ee*.245,z*.21)),Se.add(new go.PathSegment(go.PathSegment.Line,ee*.055,z*.21).close());var pe=new go.PathFigure(ee*1,0,!0);return oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ee*.4,0)),pe.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.65)),pe.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,ie=new go.PathFigure(.55*ee,z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.7*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.475*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.35*ee,.525*z,0,.4*z,.225*ee,.45*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.475*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*ee,.35*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.325*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.325*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.1*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*ee,.2*z,.975*ee,0,ee,.08*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.45*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.95*z)),ie.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,ie=new go.PathFigure(ee*1,z*.5,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.9,.4*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.5,.4*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.5,.35*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.45,.35*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.3,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.15,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.35*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.65*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.15,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.3,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.45,.65*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.5,.65*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.5,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.6,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.65,.55*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.7,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.75,.55*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.8,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.85,.575*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.9,.6*z).close()),ie.add(new go.PathSegment(go.PathSegment.Move,.17*ee,.425*z)),ie.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,ie=new go.PathFigure(0,0,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,ee*0,ee*.3,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.08,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.08,z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*1),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*1),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*2),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*2),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*3),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*3),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*4),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*4),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*5),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*5),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*6),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*6),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*7),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*7),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*8),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*8),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*9),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*9),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*10),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*10),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*11),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*11),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*12),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*12),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*13),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*13),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*14),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*14),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*15),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*15),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1));var se=new go.PathFigure(0,0,!1);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*0)),se.add(new go.PathSegment(go.PathSegment.Arc,270,-180,ee*1,ee*.3,ee*.055)),se.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 Se=new go.PathFigure(ee*(.11+.24133333*1+.028*1),z*.1,!1);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*2+.028*1),z*.1)),Se.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*2+.028*1),z*.8)),Se.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*1+.028*1),z*.8).close());var pe=new go.PathFigure(ee*(.11+.24133333*2+.028*2),z*.1,!1);return oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*3+.028*2),z*.1)),pe.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*3+.028*2),z*.8)),pe.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,ie=8,se=ie*be,le=new go.PathFigure(ie,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-ie)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee-ie,z,ee,z-se,ee-se,z)),le.add(new go.PathSegment(go.PathSegment.Line,ie,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,z-ie,se,z,0,z-se)),le.add(new go.PathSegment(go.PathSegment.Line,0,ie)),le.add(new go.PathSegment(go.PathSegment.Bezier,ie,0,0,se,se,0).close());var Se=new go.PathFigure(ee*.83,0,!1);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ee*.83,z*.3)),Se.add(new go.PathSegment(go.PathSegment.Line,ee*.17,z*.3)),Se.add(new go.PathSegment(go.PathSegment.Line,ee*.17,z*0).close());var pe=new go.PathFigure(ee*.83,z*1,!1);oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ee*.83,z*.5)),pe.add(new go.PathSegment(go.PathSegment.Line,ee*.17,z*.5)),pe.add(new go.PathSegment(go.PathSegment.Line,ee*.17,z*1).close());var Ce=new go.PathFigure(ee*.78,z*.05,!1);return oe.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*.05)),Ce.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*.25)),Ce.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 ie=oe*be,se=z*.8,le=new go.Geometry,Se=new go.PathFigure(oe,0,!0);return le.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ee-oe,0)),Se.add(new go.PathSegment(go.PathSegment.Bezier,ee,oe,ee-ie,0,ee,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,ee,se-oe)),Se.add(new go.PathSegment(go.PathSegment.Bezier,ee-oe,se,ee,se-ie,ee-ie,se)),Se.add(new go.PathSegment(go.PathSegment.Line,ee*.7,se)),Se.add(new go.PathSegment(go.PathSegment.Line,ee*.7,z)),Se.add(new go.PathSegment(go.PathSegment.Line,ee*.55,se)),Se.add(new go.PathSegment(go.PathSegment.Line,oe,se)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,se-oe,ie,se,0,se-ie)),Se.add(new go.PathSegment(go.PathSegment.Line,0,oe)),Se.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,ie,ie,0).close()),ie>1?(le.spot1=new go.Spot(0,0,ie,ie),le.spot2=new go.Spot(1,.8,-ie,-ie)):(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,ie=new go.PathFigure(ee*0,z*.45,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.25,z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.3,z*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.3,z*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.65,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.2,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.2,z*.45).close());var se=new go.PathFigure(ee*1,z*.55,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*1)),se.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ee*.7,z*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ee*.7,z*.1)),se.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.1)),se.add(new go.PathSegment(go.PathSegment.Line,ee*.35,z*0)),se.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*0)),se.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,ie=new go.PathFigure(ee*0,z*.1,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*0,z*.9).close());var se=new go.PathFigure(ee*.1,z*.2,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ee*.1,z*.25)),se.add(new go.PathSegment(go.PathSegment.Line,ee*.22,z*.285)),se.add(new go.PathSegment(go.PathSegment.Line,ee*.1,z*.32)),se.add(new go.PathSegment(go.PathSegment.Line,ee*.1,z*.37)),se.add(new go.PathSegment(go.PathSegment.Line,ee*.275,z*.32)),se.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,ie=15,se=ie*be,le=new go.PathFigure(ee*.62,z*.475,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,z-ie)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee-ie,z,ee,z-se,ee-se,z)),le.add(new go.PathSegment(go.PathSegment.Line,ie,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,z-ie,se,z,0,z-se)),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()),se>1?(oe.spot1=new go.Spot(0,0,se,se),oe.spot2=new go.Spot(1,1,-se,-se)):(oe.spot1=go.Spot.TopLeft,oe.spot2=go.Spot.BottomRight),oe}),go.Shape.defineFigureGenerator("Download",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(ee*0,z*1,!0);oe.add(ie);var se=.1/.3;ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.755,z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.93,z*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.64,z*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.61,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.39,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.36,z*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.07,z*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.755),z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.8),z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*0,z*(1-se)).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,ie=new go.PathFigure(ee*0,z*1,!0);oe.add(ie);var se=.1/.3;return ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.755,z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.93,z*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.64,z*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.61,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.39,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.36,z*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.07,z*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.755),z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.8),z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*0,z*(1-se)).close()),oe}),go.Shape.defineFigureGenerator("Upload",function(ue,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(ee*0,z*1,!0);oe.add(ie);var se=.1/.3;ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.755,z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.93,z*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.64,z*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.61,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.39,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.36,z*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.07,z*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.755),z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.8),z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*0,z*(1-se)).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,ie=new go.PathFigure(ee*.15,z*0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.85,z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.7,z*1)),ie.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,ie=new go.PathFigure(ee*.15,z*0,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.85,z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.7,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.3,z*1).close());var se=new go.PathFigure(ee*.235,z*.28,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ee*.765,z*.28)),se.add(new go.PathSegment(go.PathSegment.Line,ee*.655,z*.97)),se.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,ie=new go.PathFigure(ee*.5,z*0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.65,z*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.5)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.65)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.65,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.35,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.45,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.45,z*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.25,z*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.25,z*.65)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*0,z*.5)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.25,z*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.25,z*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.45,z*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.45,z*.25)),ie.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")},61016:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var _n={},hn="5.0",De={},Le=null,ye=!1,Fe=!1,Me=null,Ee=!1,me=null,be=null,ve=0;ve<arguments.length;ve++){var we=arguments[ve];if(we!==null)switch(typeof we){case"number":hn=we.toFixed(1);break;case"string":we.match(new RegExp("^[0-9]\\.[0-9]+$"))?hn=we:Me=we;break;case"object":typeof we.is3D!="undefined"?Le=we:De=we;break;case"boolean":ye=we,Fe=!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},De.material_id!==void 0&&!Fe&&(ye=!0)),Me!==null&&De.id===void 0&&(De.id=Me);var ge="",he="",xe=!1,fe=null,ue=null,ee=null,z=!1,oe=null,ie=null,se=null,le=null,Se=null;De.height!==void 0&&(De.height=Math.round(De.height)),De.width!==void 0&&(De.width=Math.round(De.width));var pe=function(yt){return parseFloat(yt)>4?parseFloat(yt):5};_n.setHTML5Codebase=function(yt,Vt){be=yt,lt(yt,Vt)},_n.setJavaCodebase=_n.setJavaCodebaseVersion=_n.isCompiledInstalled=_n.setPreCompiledScriptPath=_n.setPreCompiledResourcePath=function(){},_n.setHTML5CodebaseVersion=function(yt,Vt){var Kt=parseFloat(yt);if(Kt!==NaN&&Kt<5){console.log("The GeoGebra HTML5 codebase version "+Kt+" is deprecated. Using version latest instead.");return}me=yt,et(yt,Vt)},_n.getHTML5CodebaseVersion=function(){return ue},_n.getParameters=function(){return De},_n.setFontsCSSURL=function(yt){le=yt},_n.setGiacJSURL=function(yt){},_n.setJNLPFile=function(yt){ge=yt},_n.setJNLPBaseDir=function(yt){},_n.inject=function(){function yt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Vt="auto",Kt=De.id,gn,Gt=!1,Dt=0;Dt<arguments.length;Dt++){var on=arguments[Dt];typeof on=="string"?(on=on.toLowerCase(),on.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Vt=on:Kt=arguments[Dt]):typeof on=="boolean"?Gt=on:on instanceof HTMLElement&&(gn=on)}Jt();function Jt(){if(!Ee){setTimeout(Jt,200);return}Vt=$t(Vt);var jt=gn||document.getElementById(Kt);if(!jt){console.log("possibly bug on ajax loading? ");return}if(_n.removeExistingApplet(jt,!1),De.width===void 0&&jt.clientWidth&&(De.width=jt.clientWidth),De.height===void 0&&jt.clientHeight&&(De.height=jt.clientHeight),!(De.width&&De.height)&&Vt==="html5"&&(delete De.width,delete De.height),fe=Vt,Vt==="screenshot")St(jt,De);else{var ut=!1;De.hasOwnProperty("playButton")&&De.playButton||De.hasOwnProperty("clickToLoad")&&De.clickToLoad?ut=!0:De.hasOwnProperty("playButtonAutoDecide")&&De.playButtonAutoDecide&&(ut=(!Ce()||yt())&&Ae()),ut?(fe="screenshot",ct(jt,De,Gt,Vt)):pt(jt,De,Gt)}}};function Ce(){try{return window.self!==window.top}catch(yt){return!0}}function Ae(){return De.hasOwnProperty("screenshotGenerator")&&De.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}_n.getViews=function(){return Le},_n.isJavaInstalled=function(){return!1};var Oe=function(yt){var Vt=function(Dt){var on=JSON.parse(Dt),Jt=function(ze){return ze.type=="G"||ze.type=="E"},jt=on.elements?on.elements.filter(Jt)[0]:on;if(!jt||!jt.url){Kt();return}De.fileName=jt.url,Re(jt.settings||{}),Le.is3D=!0;var ut="https://www.geogebra.org/images/";_n.setPreviewImage(oe||jt.previewUrl,ut+"GeoGebra_loading.png",ut+"applet_play.png"),yt()},Kt=function(){De.onError&&De.onError(),dt("Error: Fetching material (id "+De.material_id+") failed.",De)},gn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Gt="/materials/"+De.material_id+"?scope=basic";We("https://"+gn+"/api/proxy.php?path="+encodeURIComponent(Gt),Vt,Kt)};function Re(yt){var Vt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Kt){yt[Kt]=!!yt[Kt]}),Vt.forEach(function(Kt){De[Kt]===void 0&&yt[Kt]!==void 0&&(De[Kt]=yt[Kt])}),De.showToolBarHelp===void 0&&(De.showToolBarHelp=De.showToolBar)}function We(yt,Vt,Kt){var gn=new XMLHttpRequest;gn.open("GET",yt),gn.onload=function(){Vt(gn.responseText)},gn.onerror=Kt,gn.send()}_n.isHTML5Installed=function(){return!0},_n.getLoadedAppletType=function(){return fe},_n.setPreviewImage=function(yt,Vt,Kt){oe=yt,ie=Vt,se=Kt},_n.removeExistingApplet=function(yt,Vt){var Kt;typeof yt=="string"&&(yt=document.getElementById(yt)),fe=null;var gn=null;for(Kt=0;Kt<yt.childNodes.length;Kt++){var Gt=yt.childNodes[Kt],Dt=Gt.className;Dt==="applet_screenshot"?Vt?(Gt.style.display="block",fe="screenshot"):Gt.style.display="none":Dt!=="applet_scaler prerender"&&(yt.removeChild(Gt),gn=Dt&&Dt.indexOf("appletParameters")!=-1?Gt.id:null,Kt--)}var on=De.id!==void 0?De.id:gn,Jt=window[on];Jt&&typeof Jt.getBase64=="function"&&(Jt.remove(),window[on]=null)},_n.refreshHitPoints=function(){if(pe(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var yt=_n.getAppletObject();return yt&&typeof yt.recalculateEnvironments=="function"?(yt.recalculateEnvironments(),!0):!1},_n.startAnimation=function(){var yt=_n.getAppletObject();return yt&&typeof yt.startAnimation=="function"?(yt.startAnimation(),!0):!1},_n.stopAnimation=function(){var yt=_n.getAppletObject();return yt&&typeof yt.stopAnimation=="function"?(yt.stopAnimation(),!0):!1},_n.getAppletObject=function(){var yt=De.id!==void 0?De.id:"ggbApplet";return window[yt]},_n.resize=function(){};var $e=function(yt,Vt,Kt){var gn=document.createElement("param");gn.setAttribute("name",Vt),gn.setAttribute("value",Kt),yt.appendChild(gn)},Je=function(yt){return yt&&yt!=="false"},pt=function(yt,Vt,Kt){pe(ue)<=4.2&&(Kt=!0);var gn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ue||ggbHTML5LoadedCodebaseIsWebSimple&&!z)&&(gn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Gt=document.createElement("div");Gt.classList.add("appletParameters","notranslate");var Dt=Vt.width,on=Vt.height;if(Vt.disableAutoScale=Vt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Vt.disableAutoScale,Vt.width!==void 0)if(pe(ue)<=4.4)Je(Vt.showToolBar)&&(Vt.height-=7),Je(Vt.showAlgebraInput)&&(Vt.height-=37),Vt.width<605&&Je(Vt.showToolBar)&&(Vt.width=605,Dt=605);else{var Jt=100;(Je(Vt.showToolBar)||Je(Vt.showMenuBar))&&(Vt.hasOwnProperty("customToolBar")&&(Vt.customToolbar=Vt.customToolBar),Jt=Je(Vt.showMenuBar)?245:155),Dt<Jt&&(Vt.width=Jt,Dt=Jt)}Gt.style.border="none",Gt.style.display="inline-block";for(var jt in Vt)Vt.hasOwnProperty(jt)&&jt!=="appletOnLoad"&&Gt.setAttribute("data-param-"+jt,Vt[jt]);le&&Gt.setAttribute("data-param-fontscssurl",le),_n.resize=function(){GGBAppletUtils.responsiveResize(yt,Vt)},window.addEventListener("resize",function(mt){_n.resize()});var ut=typeof Vt.appletOnLoad=="function"?Vt.appletOnLoad:function(){};if(!Kt&&Vt.width!==void 0){Vt.hasOwnProperty("showSplash")||Gt.setAttribute("data-param-showSplash","false");var ze=yt.querySelector(".applet_scaler.prerender"),je=ze!==null;if(je)var it=ze.querySelector(".ggb_preview");else{var it=ft(Dt,on,Vt.borderColor,!1);ze=document.createElement("div"),ze.className="applet_scaler",ze.style.position="relative",ze.style.display="block",ze.style.width=Dt+"px",ze.style.height=on+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ze,"66%"),pe(ue)>=5?(Vt.appletOnLoad=function(mt){var Rt=yt.querySelector(".ggb_preview");Rt&&Rt.parentNode.removeChild(Rt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ze),window.GGBT_wsf_view&&$(window).trigger("resize"),ut(mt)},je||ze.appendChild(it)):Gt.appendChild(it),ze.appendChild(Gt),je||yt.appendChild(ze),setTimeout(function(){_n.resize()},1)}else{var ht=document.createElement("div");ht.className="applet_scaler",ht.style.position="relative",ht.style.display="block",ht.appendChild(Gt),yt.appendChild(ht),Vt.appletOnLoad=function(mt){_n.resize(),ut(mt)}}function nt(mt,Rt){Rt&&typeof Rt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(mt,Rt.appletOnLoad):renderGGBElement(mt),dt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Rt)}function Ke(mt,Rt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:mt,params:Rt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(vn){nt(vn.article,vn.params)}),html5AppletsToProcess=null)},pe(ue)<5&&(mt.className+=" geogebraweb")):nt(mt,Rt)}if(gn){scriptLoadStarted=!0;for(var Be=0;Be<Gt.childNodes.length;Be++){var Ue=Gt.childNodes[Be].tagName;Ue==="TABLE"&&(Gt.removeChild(Gt.childNodes[Be]),Be--)}if(ggbHTML5LoadedScript!==null){var rt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');rt!=null&&rt.parentNode.removeChild(rt)}var Ze=document.createElement("script"),Xe=function(){Ke(Gt,Vt)};Ze.src=he+ee,ggbHTML5LoadedCodebaseIsWebSimple=z,ggbHTML5LoadedCodebaseVersion=ue,ggbHTML5LoadedScript=Ze.src,dt("GeoGebra HTML5 codebase loaded: '"+he+"'.",Vt),!be&&(!me||me=="5.0")?(z?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Xe()):he.requirejs?__webpack_require__.e(12).then(function(){var mt=[__webpack_require__(12)];Xe.apply(null,mt)}.bind(this)).catch(__webpack_require__.oe):(Ze.onload=Xe,yt.appendChild(Ze))}else Ke(Gt,Vt);Vt.height=on,Vt.width=Dt},St=function(yt,Vt,Kt){var gn=ft(Vt.width,Vt.height,Vt.borderColor,Kt),Gt=document.createElement("div");Gt.style.position="relative",Gt.style.display="block",Gt.style.width=Vt.width+"px",Gt.style.height=Vt.height+"px",Gt.className="applet_screenshot applet_scaler"+(Kt?" applet_screenshot_play":""),Gt.appendChild(gn);var Dt=GGBAppletUtils.getScale(Vt,yt,Kt);Kt?(yt.appendChild(wt()),window.GGBT_wsf_view||(yt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Gt,"66%"),yt.appendChild(Gt),Dt!==1&&!isNaN(Dt)&&(GGBAppletUtils.scaleElement(Gt,Dt),Gt.style.width=Vt.width+"px",Gt.style.height=Vt.height+"px",Gt.parentNode.style.width=Vt.width*Dt+"px",Gt.parentNode.style.height=Vt.height*Dt+"px"),_n.resize=function(){Mt(yt,gn,Gt,Kt)},window.addEventListener("resize",function(on){_n.resize()}),_n.resize()};function Mt(yt,Vt,Kt,gn){if(yt.contains(Vt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(yt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(yt)}var Gt=GGBAppletUtils.getScale(De,yt,gn);Kt.parentNode!==null&&(!isNaN(Gt)&&Gt!==1?(GGBAppletUtils.scaleElement(Kt,Gt),Kt.parentNode.style.width=De.width*Gt+"px",Kt.parentNode.style.height=De.height*Gt+"px"):(GGBAppletUtils.scaleElement(Kt,1),Kt.parentNode.style.width=De.width+"px",Kt.parentNode.style.height=De.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(yt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}_n.onExitFullscreen=function(yt,Vt){Vt.appendChild(yt)};var ct=function(yt,Vt,Kt,gn){St(yt,Vt,!0);for(var Gt=function(){var Jt=[];for(on=0;on<yt.childNodes.length;on++)Jt.push(yt.childNodes[on]);if(window.GGBT_wsf_view){var jt=window.GGBT_wsf_view.renderFullScreen(yt,Vt.id),ut=document.getElementById("fullscreencontainer"),ze=jQuery(yt).find(".fullscreencontent");ze.length>0?(jt.remove(),ze.attr("id","fullscreencontent").show(),jQuery(ut).append(ze),window.dispatchEvent(new Event("resize"))):pt(jt,Vt,!1),window.GGBT_wsf_view.launchFullScreen(ut)}else fe=gn,pt(yt,Vt,!1);if(!window.GGBT_wsf_view)for(on=0;on<Jt.length;on++)yt.removeChild(Jt[on])},Dt=yt.getElementsByClassName("ggb_preview_play"),on=0;on<Dt.length;on++)Dt[on].addEventListener("click",Gt,!1),Dt[on].addEventListener("ontouchstart",Gt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(yt),Ae()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},wt=function(){var yt=document.createElement("div");if(yt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Vt='.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");}',Kt=document.createElement("style");Kt.styleSheet?Kt.styleSheet.cssText=Vt:Kt.appendChild(document.createTextNode(Vt)),document.getElementsByTagName("head")[0].appendChild(Kt)}return yt},ft=function(yt,Vt,Kt,gn){var Gt=document.createElement("div");Gt.className="ggb_preview",Gt.style.position="absolute",Gt.style.zIndex="90",Gt.style.width=yt-2+"px",Gt.style.height=Vt-2+"px",Gt.style.top="0px",Gt.style.left="0px",Gt.style.overflow="hidden",Gt.style.backgroundColor="white";var Dt="lightgrey";Kt!==void 0&&(Kt==="none"?Dt="transparent":Dt=Kt),Gt.style.border="1px solid "+Dt;var on=document.createElement("img");if(on.style.position="relative",on.style.zIndex="1000",on.style.top="-1px",on.style.left="-1px",oe!==null&&on.setAttribute("src",oe),on.style.opacity=.7,ie!==null){var Jt,jt,ut;if(!gn){Jt=document.createElement("img"),Jt.style.position="absolute",Jt.style.zIndex="1001",Jt.style.opacity=1,on.style.opacity=.3,jt=360,jt>yt/4*3&&(jt=yt/4*3),ut=jt/5.8,Jt.setAttribute("src",ie),Jt.setAttribute("width",jt),Jt.setAttribute("height",ut);var ze=(yt-jt)/2,je=(Vt-ut)/2;Jt.style.left=ze+"px",Jt.style.top=je+"px",Gt.appendChild(Jt)}}return Gt.appendChild(on),Gt},$t=function(yt){return yt=yt.toLowerCase(),yt==="html5"||yt==="screenshot"?yt:"html5"},st=["web","webSimple","web3d","tablet","tablet3d","phone"],et=function(yt,Vt){if(ue=yt,Vt){lt(ue,!0);return}var Kt=!ye;if(Kt){var gn=pe(ue);!isNaN(gn)&&gn<4.4&&(Kt=!1)}var Gt,Dt;window.location.protocol.substr(0,4)==="http"?Gt=window.location.protocol:Gt="http:";var on=ue.indexOf("//");on>0?Dt=ue:on===0?Dt=Gt+ue:Dt="https://www.geogebra.org/apps/5.2.814.0/";for(var Jt in st)if(ue.slice(st[Jt].length*-1)===st[Jt]||ue.slice((st[Jt].length+1)*-1)===st[Jt]+"/"){lt(Dt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Kt&&!Le.is3D&&!Le.AV&&!Le.SV&&!Le.CV&&!Le.EV2&&!Le.CP&&!Le.PC&&!Le.DA&&!Le.FI&&!Le.PV&&!Je(De.showToolBar)&&!Je(De.showMenuBar)&&!Je(De.showAlgebraInput)&&!Je(De.enableRightClick)&&(!De.appName||De.appName=="classic")?Dt+="webSimple/":Dt+="web3d/",lt(Dt,!1)},lt=function(yt,Vt){if(yt.requirejs){he=yt;return}yt.slice(-1)!=="/"&&(yt+="/"),he=yt,Vt===null&&(Vt=yt.indexOf("http")===-1),xe=Vt,ee="web.nocache.js",z=!1;var Kt=he.split("/");Kt.length>1&&(!Vt&&Kt[Kt.length-2]==="webSimple"?(ee="webSimple.nocache.js",z=!0):st.indexOf(Kt[Kt.length-2])>=0&&(ee=Kt[Kt.length-2]+".nocache.js")),Kt=yt.split("/"),ue=Kt[Kt.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 gn=parseFloat(ue);gn!==NaN&&gn<5&&yt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+gn+" is deprecated. Using version latest instead."),et("5.0",Vt))},dt=function(yt,Vt){window.console&&window.console.log&&(!Vt||typeof Vt.showLogging=="undefined"||Vt.showLogging&&Vt.showLogging!=="false")&&console.log(yt)};De.material_id!==void 0?Oe(bt):bt();function bt(){var yt=hn;me!==null?yt=me:parseFloat(yt)<5&&(yt="5.0"),et(yt,!1),be!==null&<(be,xe),Ee=!0}return _n},GGBAppletUtils=function(){"use strict";function _n(){return window.GGBT_wsf_edit!==void 0}function hn(Ee,me){me!=1?(Ee.style.transformOrigin="0% 0% 0px",Ee.style.webkitTransformOrigin="0% 0% 0px",Ee.style.transform="scale("+me+","+me+")",Ee.style.webkitTransform="scale("+me+","+me+")",Ee.style.maxWidth="initial",Ee.querySelector(".ggb_preview")!==null&&(Ee.querySelector(".ggb_preview").style.maxWidth="initial"),Ee.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Ee.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Ee.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Ee.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Ee.style.transform="none",Ee.style.webkitTransform="none")}function De(Ee,me,be,ve,we,ge){var he=null;if(ge!=null&&ge!="")for(var xe=Ee.parentNode;xe!=null;)if((" "+xe.className+" ").indexOf(" "+ge+" ")>-1){he=xe;break}else xe=xe.parentNode;var fe=0,ue=0,ee=0,z=0,oe=0,ie=0,se=0;if(he)fe=he.offsetWidth,ue=Math.max(ve?he.offsetWidth:0,he.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),Ee){var le=Ee.getBoundingClientRect();le.left>0&&le.left<=fe&&(we===void 0||!we)&&(document.dir==="rtl"?(oe=fe-le.width-le.left,ie=ee<=480?10:30):(ie=le.left,oe=ee<=480?10:30),z=ie+oe)}if(Ee&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Se=Ee.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(z=40,se=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(z=0,se=40)}}return Ee&&((be===void 0||!be)&&me>0&&me+z<fe?fe=me:fe-=z,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(be===void 0||!be)&&(ue-=se)),{width:fe,height:ue}}function Le(Ee,me,be,ve,we){if(Ee.isScreenshoGenerator)return 1;var ge=ve!==void 0&&ve,he=Ee.noScaleMargin!=null&&Ee.noScaleMargin,xe=function(Se){return Se&&Se!=="false"},fe=xe(Ee.autoHeight),ue=De(me,Ee.width,be,fe,ge&&window.GGBT_wsf_view||he,we),ee=parseInt(ue.width),z=Ee.width,oe=Ee.height;if(z===void 0){var ie=me.querySelector(".appletParameters");ie&&(z=ie.offsetWidth,oe=ie.offsetHeight)}var se=ee/z,le=ge?1:ue.height/oe;return be!==void 0&&!be&&(se=Math.min(1,se),le=Math.min(1,le)),Math.min(se,le)}function ye(Ee,me,be){var ve=1,we,ge=!1;if(Ee.hasOwnProperty("allowUpscale")&&(ge=Ee.allowUpscale),Ee.hasOwnProperty("scale")&&(ve=parseFloat(Ee.scale),(isNaN(ve)||ve===null||ve===0)&&(ve=1),ve>1&&(ge=!0)),me&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ge=!0),!(Ee.hasOwnProperty("disableAutoScale")&&Ee.disableAutoScale))we=Le(Ee,me,ge,be,Ee.scaleContainerClass);else return ve;return ge&&(!Ee.hasOwnProperty("scale")||ve===1)?we:Math.min(ve,we)}function Fe(Ee){var me=Math.min(window.innerWidth,document.documentElement.clientWidth),be=Math.min(window.innerHeight,document.documentElement.clientHeight),ve=Ee.getBoundingClientRect(),we=(me-ve.width)/2,ge=(be-ve.height)/2;ge<0&&(ge=0),Ee.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(we<40?Ee.style.left="40px":Ee.style.left=we+"px",Ee.style.top=ge+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ge<40?Ee.style.top="40px":Ee.style.top=ge+"px",Ee.style.left=we+"px")}function Me(Ee,me){var be=Ee.querySelector(".appletParameters");if(be){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(me.id!==be.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Ee)}if(be.parentElement&&/fullscreen/.test(be.parentElement.className))return;var ve=ye(me,Ee);_n()&&be.setAttribute("data-param-scale",ve);for(var we=null,ge=0;ge<Ee.childNodes.length;ge++)if(Ee.childNodes[ge].className!==void 0&&Ee.childNodes[ge].className.match(/^applet_scaler/)){we=Ee.childNodes[ge];break}if(we!==null&&we.querySelector(".noscale")!==null)return;var he=me.id!==void 0?me.id:"ggbApplet",xe=window[he];(xe==null||!xe.recalculateEnvironments)&&we!==null&&!we.className.match(/fullscreen/)&&(we.parentNode.style.transform="",!isNaN(ve)&&ve!==1?(we.parentNode.style.width=me.width*ve+"px",we.parentNode.style.height=me.height*ve+"px",hn(we,ve)):(hn(we,1),we.parentNode.style.width=me.width+"px",we.parentNode.style.height=me.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Fe(Ee),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(be).parents(".content-added-content"))}}return{responsiveResize:Me,isFlexibleWorksheetEditor:_n,positionCenter:Fe,getScale:ye,scaleElement:hn}}();__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 _n=n.location.search;return _n.indexOf(J)!=-1||_n.indexOf(K)!=-1}function q(_n,hn){}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(_n){var hn=s[L].bindings;s[L].bindings=function(){for(var De=hn?hn():{},Le=_n[webModule.__softPermutationId],ye=O;ye<Le.length;ye++){var Fe=Le[ye];De[Fe[O]]=Fe[P]}return De}};var t;function u(){return v(),t}function v(){if(!t){var _n=o.createElement(Q);if(_n.id=L,_n.style.cssText=R+S,_n.tabIndex=-1,o.body.appendChild(_n),t=_n.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var hn=document.compatMode==U?V:W;t.write(hn+X),t.close()}}}function w(_n){function hn(Le){function ye(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Fe=ye();if(Fe){Le();return}function Me(){if(!Fe){if(!ye())return;Fe=!0,Le(),o.removeEventListener&&o.removeEventListener(Z,Me,!1),Ee&&clearInterval(Ee)}}o.addEventListener&&o.addEventListener(Z,Me,!1);var Ee=setInterval(function(){Me()},$)}function De(Le){var ye=u(),Fe=ye.body,Me=ye.createElement(_);Me.language=ab,Me.crossOrigin=W,Me.src=Le,webModule.__errFn&&(Me.onerror=function(){webModule.__errFn(L,new Error(bb+Le))}),Fe.appendChild(Me)}hn(function(){De(_n)})}webModule.__startLoadingFragment=function(_n){return C(_n)},webModule.__installRunAsyncCode=function(_n){var hn=u(),De=hn.body,Le=hn.createElement(_);Le.language=ab,Le.text=_n,De.appendChild(Le),De.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(_n){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(_n){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(_n){var hn=c[_n];return hn==null?null:hn},r=d,webModule.__errFn=e}function B(){function _n(Ee){var me=Ee.lastIndexOf(rb);me==-1&&(me=Ee.length);var be=Ee.indexOf(sb);be==-1&&(be=Ee.length);var ve=Ee.lastIndexOf(tb,Math.min(be,me));return ve>=O?Ee.substring(O,ve+P):W}function hn(Ee){if(!Ee.match(/^\w+:\/\//)){var me=o.createElement(ub);me.src=Ee+vb,Ee=_n(me.src)}return Ee}function De(){var Ee=__gwt_getMetaProperty(wb);return Ee!=null?Ee:W}function Le(){for(var Ee=o.getElementsByTagName(_),me=O;me<Ee.length;++me)if(Ee[me].src.indexOf(xb)!=-1)return _n(Ee[me].src);return W}function ye(){var Ee=o.getElementsByTagName(yb);return Ee.length>O?Ee[Ee.length-P].href:W}function Fe(){var Ee=o.location;return Ee.href==Ee.protocol+zb+Ee.host+Ee.pathname+Ee.search+Ee.hash}var Me=De();return Me==W&&(Me=Le()),Me==W&&(Me=ye()),Me==W&&Fe()&&(Me=_n(o.location.href)),Me=hn(Me),Me}function C(_n){return _n.match(/^\//)||_n.match(/^[a-zA-Z]+:\/\//)?_n:webModule.__moduleBase+_n}function D(){var _n=[],hn=O,De=[],Le=[];function ye(Ee){var me=Le[Ee](),be=De[Ee];if(me in be)return me;var ve=[];for(var we in be)ve[be[we]]=we;throw r&&r(Ee,ve,me),null}if(__gwt_isKnownPropertyValue=function(Ee,me){return me in De[Ee]},webModule.__getPropMap=function(){var Ee={};for(var me in De)De.hasOwnProperty(me)&&(Ee[me]=ye(me));return Ee},webModule.__computePropValue=ye,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Fe;try{Fe=Cb;var Me=Fe.indexOf(Db);Me!=-1&&(hn=parseInt(Fe.substring(Me+P),$),Fe=Fe.substring(O,Me))}catch(Ee){}return webModule.__softPermutationId=hn,C(Fe+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},15476:function(_n,hn,De){"use strict";De.d(hn,{Ax:function(){return Me},Ds:function(){return Ee},KI:function(){return be},SI:function(){return Fe},f1:function(){return ye}});var Le=De(11320);function ye(ve){let we=!0;if(ve.length>0){for(let ge=0;ge<ve.length;ge++)if(ve[ge].compile_success==0||!ve[ge].compile_success){we=!1;break}}else we=!1;return we}function Fe(ve,we=""){let ge=[];for(let he=0;he<ve.length;he++){let xe=ve[he],fe=we?`${we}/${xe.name}`:`${xe.name}`;ge.push({title:xe.name,type:xe.type,isLeaf:xe.type!=="tree",key:fe})}return ge}function Me(ve,we,ge){for(let he=0;he<ve.length;he++){let xe=ve[he];if(xe.key===we){xe.children=ge;break}xe.children&&Me(xe.children,we,ge)}return ve}function Ee(ve,we,ge){let he;return function(){let xe=this,fe=arguments,ue=function(){he=null,ge||ve.apply(xe,fe)},ee=ge&&!he;clearTimeout(he),he=setTimeout(ue,we),ee&&ve.apply(xe,fe)}}const me=!0,be=Le.Z.API_SERVER},63205:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return he}});var Le=De(67294),ye={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Fe=De(94184),Me=De.n(Fe),Ee=De(74330),me=De(15979),be=De(33170),ve=De(28706),we=(xe,fe,ue)=>new Promise((ee,z)=>{var oe=le=>{try{se(ue.next(le))}catch(Se){z(Se)}},ie=le=>{try{se(ue.throw(le))}catch(Se){z(Se)}},se=le=>le.done?ee(le.value):Promise.resolve(le.value).then(oe,ie);se((ue=ue.apply(xe,fe)).next())}),he=({data:xe,className:fe,fullWidth:ue,style:ee={},onClose:z,onOk:oe,showFullTools:ie,noAssociationId:se})=>{const le=(0,Le.useRef)(null),Se=(0,Le.useRef)(null),pe=(0,Le.useRef)(null),Ce=(0,Le.useRef)(null),[Ae,Oe]=(0,Le.useState)(!1),[Re,We]=(0,Le.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,Le.useEffect)(()=>(pe.current||(pe.current=document.createElement("style"),document.head.appendChild(pe.current)),xe!=null&&xe.visible?(document.body.setAttribute("data-custom","y-hidden"),pe.current.innerHTML=" html { overflow-y: hidden; }",xe!=null&&xe.src&&$e()):(document.body.removeAttribute("data-custom"),pe.current&&(document.head.removeChild(pe.current),pe.current=null)),()=>{document.body.removeAttribute("data-custom"),pe.current&&(document.head.removeChild(pe.current),pe.current=null)}),[xe==null?void 0:xe.visible]);const $e=()=>we(void 0,null,function*(){Oe(!0),We("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Mt=yield(0,ve.ZJ)(xe==null?void 0:xe.src);le.current.src="",le.current.src=Mt,le.current.onload=function(){St()},Oe(!1),We("")}),Je=Mt=>we(void 0,null,function*(){Oe(!0),We("\u6B63\u5728\u4FDD\u5B58\u4E2D");const ct=yield(0,be.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:xe.title,file:Mt.dataUrl}});ct!=null&&ct.id&&!se?(yield(0,be.ZP)(`/api/attachments/${xe.id}/add_subitem.json`,{method:"post",body:{subitem_id:ct==null?void 0:ct.id,settings:JSON.stringify(Mt.state)}})).status===0&&oe():ct!=null&&ct.id&&oe(ct),Oe(!1),We("")}),pt=()=>{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(wt=>{const ft=document.querySelector(wt.name);ft&&ft.setAttribute("title",wt.title)})},St=()=>{Se.current=new me.hP(le.current),Se.current.targetRoot=Ce.current,Se.current.addEventListener("render",Je),Se.current.addEventListener("beforeclose",z),ie&&(Se.current.availableMarkerTypes=Se.current.ALL_MARKER_TYPES,Se.current.uiStyleSettings.redoButtonVisible=!0,Se.current.uiStyleSettings.notesButtonVisible=!0,Se.current.uiStyleSettings.zoomButtonVisible=!0,Se.current.uiStyleSettings.zoomOutButtonVisible=!0,Se.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Se.current.uiStyleSettings,Se.current.show(),xe!=null&&xe.snapshotData&&Se.current.restoreState(xe.snapshotData),setTimeout(()=>{window.scrollTo(0,0),pt()},300)};return Le.createElement(Le.Fragment,null,(xe==null?void 0:xe.visible)&&Le.createElement(Ee.Z,{spinning:Ae,tip:Re,style:{position:"absolute",width:"100vw"}},Le.createElement("div",{ref:Ce,className:Me()(ye.imageDimensions,fe,ue?ye.fullWidth:""),style:ee},Le.createElement("img",{className:ye.img,ref:le}))))}},36527:function(_n,hn,De){"use strict";var Le=De(67294),ye=De(71230),Fe=De(15746),Me=De(55238),Ee=De(85804),me=De(65226),be=De(71736),ve=De(84279),we=De(67294);const ge=(0,Le.forwardRef)(({callback:he,showSaveButton:xe,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}`}]}]}],ie=Se=>{ee.current.setValue(ee.current.getValue()+" "+Se.value+" ")},se=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:we.createElement(ye.Z,{className:be.Z.lists,gutter:[10,10]},z.map((Se,pe)=>we.createElement(Fe.Z,{flex:"110px",className:be.Z.item},we.createElement("div",null,we.createElement(me.Z,{value:`$$${Se.value}$$`}),Se.name),we.createElement("div",{className:be.Z.children},Se.children.map((Ce,Ae)=>we.createElement("div",{key:Ae},we.createElement("h1",null,Ce.name),we.createElement(ye.Z,{gutter:[10,10]},Ce.data.map((Oe,Re)=>we.createElement(Fe.Z,{key:Re,onClick:()=>ie(Oe),className:be.Z.diamond},we.createElement(me.Z,{value:"`$$"+Oe.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:we.createElement(ye.Z,{className:be.Z.lists,gutter:[10,10]},oe.map((Se,pe)=>we.createElement(Fe.Z,{flex:"110px",className:be.Z.item},we.createElement("div",null,we.createElement(me.Z,{value:"`$$"+Se.value+"$$`"}),Se.name),we.createElement("div",{className:be.Z.children},Se.children.map((Ce,Ae)=>we.createElement("div",{key:Ae},Ce.name&&we.createElement("h1",null,Ce.name),we.createElement(ye.Z,{gutter:[10,10]},Ce.data.map((Oe,Re)=>we.createElement(Fe.Z,{key:Re,onClick:()=>ie(Oe),className:be.Z.diamond},we.createElement(me.Z,{value:"`$$"+Oe.value+"$$`"}))))))))))}],le=()=>{var Se=document.createElement("div");Se.innerHTML=ee.current.getValue();var pe=Se.innerText;return he&&he(pe),pe};return(0,Le.useImperativeHandle)(ue,()=>({getData:le})),we.createElement("div",{className:be.Z.mathWrap},we.createElement(Me.default,{defaultActiveKey:"1",items:se}),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||""),xe&&we.createElement("div",{className:be.Z.button},we.createElement(Ee.ZP,{size:"large",onClick:le,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});hn.Z=ge},26194:function(_n,hn,De){"use strict";var Le=De(67294),ye=De(4977),Fe=De(85804),Me=Object.defineProperty,Ee=Object.defineProperties,me=Object.getOwnPropertyDescriptors,be=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,ge=(ue,ee,z)=>ee in ue?Me(ue,ee,{enumerable:!0,configurable:!0,writable:!0,value:z}):ue[ee]=z,he=(ue,ee)=>{for(var z in ee||(ee={}))ve.call(ee,z)&&ge(ue,z,ee[z]);if(be)for(var z of be(ee))we.call(ee,z)&&ge(ue,z,ee[z]);return ue},xe=(ue,ee)=>Ee(ue,me(ee));const fe=({img:ue,buttonProps:ee={},styles:z={},customText:oe,ButtonText:ie,ButtonClick:se,Buttonclass:le,ButtonTwo:Se,imgStyles:pe,loading:Ce=!1,className:Ae=""})=>Le.createElement("section",{className:`tc animated fadeIn ${Ae}`,style:he({color:"#999",margin:"100px auto",visibility:Ce?"hidden":"visible"},z)},Le.createElement("img",{src:ue||ye,style:xe(he({},pe),{pointerEvents:"none",userSelect:"none"})}),Le.createElement("p",{className:"mt20 font14"},oe||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),ie&&Le.createElement(Fe.ZP,he({className:le,onClick:se},ee),ie),Se&&Se);hn.Z=fe},20819:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return le}});var Le=De(67294),ye={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Fe=De(85804),Me=De(30153),Ee=De(36295),me=De(83062),be=De(28706),ve=De(15835),we=De(26194),ge=De(11320),he=De(66540),xe=De(67294),fe=Object.defineProperty,ue=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,oe=(Se,pe,Ce)=>pe in Se?fe(Se,pe,{enumerable:!0,configurable:!0,writable:!0,value:Ce}):Se[pe]=Ce,ie=(Se,pe)=>{for(var Ce in pe||(pe={}))ee.call(pe,Ce)&&oe(Se,Ce,pe[Ce]);if(ue)for(var Ce of ue(pe))z.call(pe,Ce)&&oe(Se,Ce,pe[Ce]);return Se},se=(Se,pe,Ce)=>new Promise((Ae,Oe)=>{var Re=Je=>{try{$e(Ce.next(Je))}catch(pt){Oe(pt)}},We=Je=>{try{$e(Ce.throw(Je))}catch(pt){Oe(pt)}},$e=Je=>Je.done?Ae(Je.value):Promise.resolve(Je.value).then(Re,We);$e((Ce=Ce.apply(Se,pe)).next())}),le=({editOffice:Se="view",data:pe,issaver:Ce,onSaver:Ae,theme:Oe,type:Re,filename:We,monacoEditor:$e,className:Je,style:pt,close:St,onClose:Mt,hasMask:ct,disabledDownload:wt,onImgDimensions:ft,showNodata:$t,recordInfo:st})=>{const[et,lt]=(0,Le.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[dt,bt]=(0,Le.useState)(""),[yt,Vt]=(0,Le.useState)(),Kt=window.ENV==="build"?"/react/build":"",gn=location.host.startsWith("localhost")?ge.Z.PROXY_SERVER:ge.Z.API_SERVER,Dt=10*(1024*1024),on=(0,Le.useRef)();pe!=null&&pe.startsWith("/api")&&Re!=="txt"&&(pe=ge.Z.API_SERVER+pe);const Jt=it=>it.substring(it.lastIndexOf("/")+1).split(".").pop();We&&$e&&($e.filename=We),(0,Le.useEffect)(()=>{var it,ht;const nt=(ht=(it=document.cookie)==null?void 0:it.replace(/\s/g,""))==null?void 0:ht.split(";");nt==null||nt.map(Ke=>{let Be=Ke.split("=");Be[0]==="_educoder_session"&&bt(Be[1])})},[]),(0,Le.useEffect)(()=>{Re==="office"&&(pe.indexOf("bigfilescdn.")>-1||pe.indexOf("bigfiles1")>-1?Vt({url:pe,fileType:Jt(pe),model:pe.indexOf("model=edit")?"edit":"view"}):ut())},[Re,pe]);function jt(it){return se(this,null,function*(){it.data.type==="pdfdata"&&(Ae(it.data.data),window.removeEventListener("message",jt,!1)),console.log("mess---:",it.data)})}const ut=()=>se(void 0,null,function*(){console.log("data:",pe);let it=pe;pe.startsWith("http")||(it=location.origin+it);let ht=new URL(it).pathname.split("/").pop();const nt=yield(0,ve.gJ)({attachment_id:ht});nt.url=gn+nt.url,Vt(nt)}),ze=()=>{if(pe.startsWith("http")||pe.startsWith("blob:")){je();return}(0,be.Sv)(We||"educoder",pe,We)},je=()=>{st&&(0,he.fc)({id:st==null?void 0:st.id,watch_type:1,course_id:st==null?void 0:st.course_id}),(0,be.Nd)(We||"educoder",decodeURIComponent(pe))};return xe.createElement("div",{style:ie({},pt||{}),className:`${ct&&ye.bgBlack} ${Re?ye.wrp:"hide"}`},St&&xe.createElement("div",{className:ye.close,ref:on},!!ft&&xe.createElement(me.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>on.current},xe.createElement("span",{onClick:()=>{Mt(),ft()}},xe.createElement("i",{className:"icon-yulanpizhu"}))),!wt&&xe.createElement(me.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>on.current},xe.createElement("span",{onClick:je},xe.createElement("i",{className:"icon-quxiaozhiding"}))),Ce&&xe.createElement(me.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>on.current},xe.createElement("span",{className:"",onClick:()=>{const it=document.getElementById("pdfiframe");window.addEventListener("message",jt,!1),setTimeout(()=>{it.contentWindow.postMessage("getData","*")},300)}},xe.createElement("i",{className:"icon-baocun"}))),xe.createElement(me.Z,{title:"\u5173\u95ED",getPopupContainer:()=>on.current},xe.createElement("span",{className:"",onClick:()=>{Mt()}},xe.createElement("i",{className:"icon-guanbi1"})))),xe.createElement("div",{className:`${ye[Je]} ${Je} ${ye.monaco} ${Re==="txt"?"show":"hide"}`},Re==="txt"&&xe.createElement(xe.Fragment,null,xe.createElement(Ee.ZP,ie({},$e)))),Re==="audio"&&xe.createElement("audio",{src:`${(pe==null?void 0:pe.indexOf("http://"))>-1||(pe==null?void 0:pe.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${pe}`,autoPlay:!0}),Re==="video"&&xe.createElement(xe.Fragment,null,(pe==null?void 0:pe.indexOf("http"))>-1?xe.createElement("video",{controls:!0,src:`${pe}`,autoPlay:!0}):xe.createElement("video",{controls:!0,src:`data:video/mp4;base64,${pe}`,autoPlay:!0})),Re==="office"&&yt&&xe.createElement("iframe",{src:`${Kt}/office.html?key=${yt.key}&url=${btoa(yt.url)}&callbackUrl=${gn+(yt.callbackUrl||"")}&fileType=${yt.fileType}&title=${yt.title||""}&model=${Se}&officeServer=${ge.Z.ONLYOFFICE}&disabledDownload=${!!wt}`}),Re==="html"&&xe.createElement("iframe",{src:pe+"&disposition=inline"}),Re==="pdf"&&xe.createElement("iframe",{id:"pdfiframe",src:`${Kt}/js/pdfview/index.html?filename=${We||"educoder.pdf"}&url=${encodeURIComponent(pe)}&disabledDownload=${!!wt}&model=${Se}`}),Re==="image"&&xe.createElement("img",{src:`${(pe==null?void 0:pe.indexOf("http://"))>-1||(pe==null?void 0:pe.indexOf("https://"))>-1?"":"data:image/png;base64,"}${pe}`}),(Re==="other"||Re==="download")&&xe.createElement(xe.Fragment,null,$t?xe.createElement(we.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:xe.createElement(Fe.ZP,{icon:xe.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:ze,disabled:wt},"\u4E0B\u8F7D")}):xe.createElement(Fe.ZP,{type:"primary",size:"middle",onClick:ze,disabled:wt},xe.createElement(Me.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},65226:function(_n,hn,De){"use strict";De.d(hn,{z:function(){return Re},Z:function(){return We}});var Le=De(67294),ye=De(81897),Fe=De(51161),Me=De(11771),Ee=De(67631),me=De.n(Ee),be=De(11320),ve=De(28706),we=De(20527),ge=De(25934),he=De(20819),xe=De(67294),ue=({html:$e})=>{const Je=(0,Le.useRef)(null),pt=(0,Le.useRef)(null),St=`.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 Mt=Je.current.attachShadow({mode:"open"});pt.current=document.createElement("div"),pt.current.className="markdown-body",pt.current.innerHTML=$e,Mt.appendChild(pt.current);const ct=document.createElement("style");return ct.textContent=St,Mt.appendChild(ct),()=>{Mt.innerHTML=""}},[]),(0,Le.useEffect)(()=>{pt.current&&(pt.current.innerHTML=$e)},[$e]),xe.createElement("div",{ref:Je})};function ee($e){const Je=["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"],pt=new RegExp(`\\b(${Je.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return $e.replace(pt,"").trim()}var z=Object.defineProperty,oe=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,le=($e,Je,pt)=>Je in $e?z($e,Je,{enumerable:!0,configurable:!0,writable:!0,value:pt}):$e[Je]=pt,Se=($e,Je)=>{for(var pt in Je||(Je={}))ie.call(Je,pt)&&le($e,pt,Je[pt]);if(oe)for(var pt of oe(Je))se.call(Je,pt)&&le($e,pt,Je[pt]);return $e};const pe="@\u2581\u2581@",Ce="@\u2581@",Ae=/<pre[^>]*>/g;function Oe($e){let Je=document.createElement("div");return Je.innerHTML=$e,Je.childNodes.length===0?"":Je.childNodes[0].nodeValue}const Re=($e,Je)=>{$e=$e||"";const pt=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,St=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Mt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ct=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Je?$e.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(pt,(wt,ft,$t,st,et,lt,dt)=>{const bt=ft||st||lt,yt=$t||et||dt||"?";return be.Z.API_SERVER+"/api/attachments/"+bt+yt+"&t="+(0,ve.Jn)(bt,Date.now())+(wt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):($e=$e.replace(ct,(wt,ft,$t,st,et,lt,dt)=>{const bt=ft||st||lt,yt=$t||et||dt||"?";return be.Z.API_SERVER+"/attachments/download/"+bt+yt+"&t="+(0,ve.Jn)(bt,Date.now())+(wt.indexOf(")")>-1?")":"&")}).replace(pt,(wt,ft,$t,st,et,lt,dt)=>{const bt=ft||st||lt,yt=$t||et||dt||"?";return be.Z.API_SERVER+"/api/attachments/"+bt+yt+"&t="+(0,ve.Jn)(bt,Date.now())+(wt.indexOf(")")>-1?")":"&")}).replace(St,(wt,ft,$t,st,et)=>{const lt=ft||st,dt=$t||et||"";return'"'+be.Z.API_SERVER+"/api/attachments/"+lt+dt+lt+dt+"&t="+(0,ve.Jn)(lt,Date.now())}).replace(Mt,(wt,ft,$t,st,et)=>{const lt=ft||st,dt=$t||et||"";return"("+be.Z.API_SERVER+"/files/uploads/"+lt+dt+lt+dt+"&t="+(0,ve.Jn)(lt,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,`
|
|
|
`),$e)};var We=({value:$e="",className:Je,showTextOnly:pt,showLines:St,style:Mt={},stylesPrev:ct={},highlightKeywords:wt,showProgramFill:ft,isProgramFill:$t,disabledFill:st=!1,programFillValue:et,onFillChange:lt=yt=>{},onFillBlur:dt=()=>{},onFillFocus:bt=()=>{}})=>{let yt=ee(String($e||""));const[Vt,Kt]=(0,Le.useState)(""),[gn,Gt]=(0,Le.useState)("office"),[Dt,on]=(0,Le.useState)([]),Jt=(0,Le.useRef)("a"+(0,ge.Z)()),jt={},ut=mt=>/<style[\s\S]*?>/i.test(mt||""),ze=(mt,Rt,vn)=>{const An=document.createElement(mt===Ce?"input":"textarea");An.style.width="100%",An.style.height=mt===Ce?"40px":"151px",An.rows=5,An.spellcheck=!1,An.name="edu-program-fill",An.placeholder="\u8BF7\u8F93\u5165",An.dataset.id=Rt;const Mn=Object.keys(jt).length;return jt[Mn]=An,`<span class="edu-program-fill-wrap ${mt===Ce?"":"show"}" style="width:${mt===Ce?"600px":"100%"}" title=${vn||""}><span>${An.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function je(mt){return mt=mt.replace(/!\[.*?\]\(.*?\)/g,""),mt=mt.replace(/\[.*?\]\(.*?\)/g,""),mt=mt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),mt=mt.replace(/<embed.*?>/g,""),mt=mt.replace(/<img.*?>/g,""),mt=mt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),mt=mt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),mt=mt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),mt=mt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),mt}const it=mt=>!pt&&ut(yt)?mt:mt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Rt,vn){let An=vn.replace(/(\n|\r)/g,"").split("}"),Mn=[];return An.map(hi=>{hi!=""&&Mn.push(`.${Jt.current} ${hi}`)}),`<style>${Mn.join("}")}</style>`}),ht=(0,Le.useMemo)(()=>{try{const An=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Mn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,hi=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,mi=/\(\/attachments\/download\//g;yt=yt.replace(mi,"("+be.Z.API_SERVER+"/attachments/download/").replace(An,"("+be.Z.API_SERVER+"/api/attachments/").replace(Mn,'"'+be.Z.API_SERVER+"/api/attachments/").replace(hi,'"'+be.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(An){}if(ft){let An=-1;return yt=yt.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(Mn,hi,mi){var si;return++An,ze(Mn,An,(si=et==null?void 0:et[An])==null?void 0:si.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${it(yt||"")}</pre>`}let mt=it(yt);mt=(0,Fe.ZP)(mt);const Rt=(0,Fe.ez)();yt.match(/\[TOC\]/)&&(mt=mt.replace("<p>[TOC]</p>",(0,Fe.Qv)()),(0,Fe.Iy)()),mt=mt.replace(/(__special_katext_id_\d+__)/g,(An,Mn)=>{const{type:hi,expression:mi}=Rt[Mn];return(0,we.renderToString)(Oe(mi)||"",{displayMode:hi==="block",throwOnError:!1,output:"html"})}),mt=mt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Fe.AL)();const vn=document.createElement("div");if(vn.innerHTML=mt,pt)return vn.innerText;if(wt){const An=wt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Ue(vn,An),vn.innerHTML}return setTimeout(()=>Xe(),500),vn.innerHTML},[yt,wt]);(0,Le.useEffect)(()=>{rt.current&&rt.current.querySelectorAll(["input","textarea"]).forEach(Rt=>{Rt.oninput=nt,Rt.onblur=Ke,Rt.onfocus=Be})},[Dt]),(0,Le.useEffect)(()=>{var mt,Rt,vn,An,Mn;if(et!=null&&et.length)try{const hi=rt.current.querySelectorAll(".edu-program-fill-score"),mi=rt.current.querySelectorAll('[name="edu-program-fill"]');for(const[si,Cn]of mi.entries())Cn.value=((mt=et==null?void 0:et[si])==null?void 0:mt.value)||"",((Rt=et==null?void 0:et[si])==null?void 0:Rt.type)==="warning"?Cn.className="program-fill-warning":((vn=et==null?void 0:et[si])==null?void 0:vn.type)==="success"?Cn.className="program-fill-success":Cn.className="";for(const[si,Cn]of hi.entries())Cn.innerHTML=(An=et==null?void 0:et[si])!=null&&An.score?`${(Mn=et==null?void 0:et[si])==null?void 0:Mn.score}\u5206`:"";on(et)}catch(hi){console.log(hi,"error")}},[et]);const nt=mt=>{Dt[mt.target.dataset.id]=Dt[mt.target.dataset.id]||{},Dt[mt.target.dataset.id].value=mt.target.value,on([...Dt]),lt(Dt,mt.target.dataset.id)},Ke=mt=>{Dt[mt.target.dataset.id]=Dt[mt.target.dataset.id]||{},Dt[mt.target.dataset.id].value=mt.target.value,on([...Dt]),dt(Dt,mt.target.dataset.id)},Be=mt=>{Dt[mt.target.dataset.id]=Dt[mt.target.dataset.id]||{},Dt[mt.target.dataset.id].value=mt.target.value,on([...Dt]),bt(Dt,mt.target.dataset.id)};function Ue(mt,Rt){return mt.childNodes.forEach(vn=>{var An;if(vn.childNodes.length>0)Ue(vn,Rt);else if(vn.nodeName!=="IMG")if(vn.innerHTML)vn.innerHTML=(An=vn.innerHTML)==null?void 0:An.replace(new RegExp(Rt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Mn=document.createElement("span");Mn.innerHTML=vn.textContent.replace(new RegExp(Rt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),vn.replaceWith(Mn)}})}const rt=(0,Le.useRef)();Fe.jb.WebkitLineClamp=St,St&&(Mt=Se(Se({},Mt),Fe.jb));function Ze(mt){let Rt=mt.target;if(Rt.tagName.toUpperCase()==="A"){let vn=Rt.getAttribute("href");if(vn.indexOf("office")>-1)mt.preventDefault(),Kt(vn),Gt("office");else if(vn.indexOf("application/pdf")>-1)mt.preventDefault(),Kt(vn),Gt("pdf");else if(vn.indexOf("text/html")>-1)mt.preventDefault(),Kt(vn),Gt("html");else if(vn.startsWith("#")){mt.preventDefault();let An=document.getElementById(vn.replace("#",""));An&&An.scrollIntoView(!0)}}}const Xe=()=>{var mt;const Rt=(mt=rt.current)==null?void 0:mt.querySelectorAll("video");Rt==null||Rt.forEach(vn=>{if(vn.oncontextmenu=()=>!1,vn.src.indexOf(".m3u8")>-1&&!vn.canPlayType("application/vnd.apple.mpegurl")){if(me().isSupported()){var An=new(me());An.loadSource(vn.src),An.attachMedia(vn)}}})};return(0,Le.useEffect)(()=>{if(rt.current&&ht&&ht.match(Ae)&&window.PR.prettyPrint(),rt.current)return rt.current.addEventListener("click",Ze),()=>{var mt;(mt=rt.current)==null||mt.removeEventListener("click",Ze),(0,Fe.AL)(),(0,Fe.Iy)()}},[ht,rt.current,Ze]),(0,Le.useEffect)(()=>{var mt;const Rt=vn=>{vn.preventDefault(),vn.clipboardData.setData("text",window.getSelection().toString())};return(mt=rt.current)==null||mt.addEventListener("copy",Rt),()=>{var vn;(vn=rt.current)==null||vn.removeEventListener("copy",Rt)}},[rt.current]),Le.createElement(Le.Fragment,null,pt&&Le.createElement("div",{ref:rt},ht),!pt&&!ut(ht)&&Le.createElement("div",{ref:rt,style:Se({},Mt),className:`${Je||""} ${st?"disabled-fill":""} markdown-body ${Jt.current}`,dangerouslySetInnerHTML:{__html:ht}}),!pt&&ut(ht)&&Le.createElement(ue,{html:ht}),Le.createElement(he.Z,{close:!0,data:Vt,type:Vt!=null&&Vt.length?gn:"",style:Se({},ct),onClose:()=>Kt("")}))}},7621:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return Me}});var Le=De(35973),ye={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},Fe=De(67294),Me=({message:Ee,className:me,children:be,style:ve={}})=>Fe.createElement("div",{className:`custom-spinner ${ye.idsRingWrapper} ${me}`},Fe.createElement("div",{className:ye.ldsRing},Fe.createElement("div",null),Fe.createElement("div",null),Fe.createElement("div",null),Fe.createElement("div",null)),Ee?Fe.createElement("p",{style:ve},Ee):null,be,Fe.createElement(Le.Outlet,null))},60076:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return Me}});var Le=De(67294),ye=De(33054),Fe=De(67294),Me=({defaultX:Ee="40%",leftChild:me,rightChild:be,className:ve,hideResize:we=!1})=>{const[ge,he]=(0,Le.useState)(Ee),xe=(0,Le.useRef)();function fe(){xe.current=!0}(0,Le.useEffect)(()=>{function z(ie){xe.current&&(ye.Z.publish("resize-move-bar",ie),he(ie.pageX))}function oe(){xe.current=!1}return window.addEventListener("mousemove",z),window.addEventListener("mouseup",oe),()=>{window.removeEventListener("mousemove",z),window.removeEventListener("mouseup",oe)}},[]);const ue=typeof ge=="number"&&ge!==.01?`${ge}px`:Ee,ee=`calc(100% - ${we?"0px":"4px"} - ${ue})`;return Fe.createElement("div",{className:`split-panel-container ${ve}`},Fe.createElement("section",{style:{width:ue,display:ge===.01?"none":""}},me),Fe.createElement("section",{className:"resize-x-bar",onMouseDown:fe},Fe.createElement("a",{className:"btn-resize"},Fe.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},Fe.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"})))),Fe.createElement("section",{style:{width:ee}},be))}},38658:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return me}});var Le=De(67294),ye={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_"},Fe=De(94184),Me=De.n(Fe),me=({className:be,style:ve={},leftNode:we,leftTitle:ge="\u81EA\u6D4B\u8F93\u5165",rightNode:he,rightTitle:xe="\u8FD0\u884C\u7ED3\u679C"})=>Le.createElement("div",{className:Me()(ye.result,be),style:ve},Le.createElement("div",{className:ye.left},Le.createElement("div",{className:ye.title},Le.createElement("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),Le.createElement("span",null,ge)),Le.createElement("div",{className:ye.leftNode},we)),Le.createElement("div",{className:ye.right},Le.createElement("div",{className:ye.title},Le.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),Le.createElement("span",null,xe)),Le.createElement("div",{className:ye.rightNode},he)))},88508:function(_n,hn,De){"use strict";var Le=De(67294);const ye=Me=>String(Me).length===1?`0${Me}`:Me,Fe=({className:Me="",onChange:Ee,defaultValue:me=0})=>{const[be,ve]=(0,Le.useState)(me);(0,Le.useEffect)(()=>{const xe=setTimeout(()=>{ve(be+1e3)},1e3);return Ee(be+1e3),()=>{clearInterval(xe)}},[be]);const we=parseInt(be/(60*6e4))||"00",ge=parseInt(be%(60*6e4)/6e4)||"00",he=parseInt(be%6e4/1e3)||"00";return Le.createElement("div",{className:Me},ye(we),":",ye(ge),":",ye(he))};hn.Z=Fe},6104:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return z}});var Le=De(67294),ye=De(2453),Fe=De(85418),Me=De(24577),Ee=De(67631),me=De.n(Ee),be=De(52262),ve=De(74855),we=De(51959),ge={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"},he=(oe,ie,se)=>new Promise((le,Se)=>{var pe=Oe=>{try{Ae(se.next(Oe))}catch(Re){Se(Re)}},Ce=Oe=>{try{Ae(se.throw(Oe))}catch(Re){Se(Re)}},Ae=Oe=>Oe.done?le(Oe.value):Promise.resolve(Oe.value).then(pe,Ce);Ae((se=se.apply(oe,ie)).next())});function xe(oe){if(isNaN(oe))return{minutes:"00",seconds:"00"};const ie=new Date(oe*1e3).toISOString().substr(11,8);return{hour:ie.substr(0,2),minutes:ie.substr(3,2),seconds:ie.substr(6,2)}}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2}});function fe(oe,ie){return oe-ie}function ue(oe){oe.sort(fe);let ie=0;for(let se=0;se<oe.length-1;se++){let le=Math.abs(oe[se+1]-oe[se]);le<21&&(ie+=le)}return ie}const ee=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;var z=(0,Le.forwardRef)(({allow_skip:oe,src:ie,toLog:se,videoId:le,logWatchHistory:Se,courseId:pe=null,startTime:Ce,handlePause:Ae=()=>{},handlePlay:Oe=()=>{},handlePlayEnded:Re=()=>{},autoPlay:We=!1,onPlayEnded:$e=()=>{},isShowWaterMark:Je=!0},pt)=>{var St;ie=ie==null?void 0:ie.replace("http://","https://");const ct=((St=ie==null?void 0:ie.split("."))==null?void 0:St.pop())==="flv",wt=(0,Le.useRef)(),ft=(0,Le.useRef)(),$t=(0,Le.useRef)(),st=(0,Le.useRef)(),et=(0,Le.useRef)(),lt=(0,Le.useRef)(),dt=(0,Le.useRef)(),bt=(0,Le.useRef)(),yt=(0,Le.useRef)(),Vt=(0,Le.useRef)(),Kt=(0,Le.useRef)(),gn=(0,Le.useRef)(),Gt=(0,Le.useRef)(),Dt=(0,Le.useRef)(),on=navigator.userAgent.toLowerCase().match(ee),Jt=on?on[0]:"pc",jt=(0,Le.useRef)(!1),ut=(0,be.eY)();let ze=0,je=0,it=0,ht=null,nt=!1,Ke=20,Be=1,Ue=!1,rt=!1,Ze=[];(0,Le.useImperativeHandle)(pt,()=>({getLastUpdatedTime:()=>wt.current.currentTime,getDuration:()=>wt.current.duration})),ye.ZP.config({maxCount:1,getContainer:()=>$t.current});const Xe=(0,Le.useCallback)((mi,si=!1)=>{let Cn={point:wt.current.currentTime};ht?(Cn.log_id=ht,Cn.watch_duration=ue(Ze),Cn.total_duration=je):(pe?(Cn.video_id=parseInt(le,10),Cn.course_id=pe):Cn.video_id=le,Cn.duration=ze,Cn.device=Jt),si&&(Cn.ed="1");function Ki(){return he(this,null,function*(){Ue=!0,ht=yield Se==null?void 0:Se(Cn),Ue=!1,mi&&mi()})}Ki()},[le,pe]);(0,Le.useEffect)(()=>{wt.current&&(st.current.style.display="none",et.current.style.display="block"),ye.ZP.destroy();let mi=null;return Me.Z.isSupported&&ct&&ie&&(ie==null?void 0:ie.indexOf(".m3u8"))<0?(mi=Me.Z.createPlayer({type:"flv",volume:.8,cors:!0,url:ie,muted:!1}),wt.current&&(mi.attachMediaElement(wt.current),mi.load())):wt.current.setAttribute("src",ie),Rt(),()=>{mi&&(mi.unload(),mi.pause(),mi.destroy(),mi=null)}},[wt,ct,ie]);function mt(){wt.current.paused?(st.current.style.display="none",et.current.style.display="block"):(st.current.style.display="block",et.current.style.display="none")}function Rt(){Kt.current.style.display="none",Gt.current.style.display="none",gn.current.style.display="none",wt.current.muted||wt.current.volume===0?Kt.current.style.display="block":wt.current.volume>0&&wt.current.volume<=.5?Gt.current.style.display="block":gn.current.style.display="block"}(0,Le.useEffect)(()=>{const mi=document.getElementById("play"),si=document.querySelectorAll(".playback-icons use");function Cn(){Oe(),Ce&&!jt.current&&(wt.current.currentTime=Ce),jt.current=!0,Ze.push(wt.current.currentTime),nt||(nt=!0,se&&Xe())}function Ki(){return he(this,null,function*(){mt(),Ze.push(wt.current.currentTime),se&&Xe(()=>{ht=null,it=0,nt=!1,Ue=!1,rt=!1,Ze=[],je=0,Be=1},!0),$e()})}function Yn(){lt.current.value=Math.round(wt.current.currentTime),dt.current.value=Math.round(wt.current.currentTime)}function Qi(){const or=xe(Math.round(wt.current.currentTime));yt.current.innerText=`${or.hour>0?or.hour+":":""}${or.minutes}:${or.seconds}`,yt.current.setAttribute("datetime",`${or.hour>0?" "+or.hour+" ":""}${or.minutes}m ${or.seconds}s`)}function vr(){var or,kn,qe,Tn,In,zi,Gi;const Vi=Math.round((or=wt.current)==null?void 0:or.duration);(qe=(kn=lt.current)==null?void 0:kn.setAttribute)==null||qe.call(kn,"max",Vi),(In=(Tn=dt.current)==null?void 0:Tn.setAttribute)==null||In.call(Tn,"max",Vi);const Zi=xe(Vi);bt.current&&(bt.current.innerText=`${Zi.hour>0?Zi.hour+":":""}${Zi.minutes}:${Zi.seconds}`,(Gi=(zi=bt.current).setAttribute)==null||Gi.call(zi,"datetime",`${Zi.hour>0?" "+Zi.hour+" ":""}${Zi.minutes}m ${Zi.seconds}s`))}function Dr(){try{const or=Math.round(wt.current.duration);lt.current.setAttribute("max",or),dt.current.setAttribute("max",or);const kn=xe(or);bt.current.innerText=`${kn.hour>0?kn.hour+":":""}${kn.minutes}:${kn.seconds}`,bt.current.setAttribute("datetime",`${kn.hour>0?" "+kn.hour+" ":""}${kn.minutes}m ${kn.seconds}s`),Yn(),Qi();const{width:qe,height:Tn,x:In,y:zi}=ft.current.getBoundingClientRect();if(In<0||zi<0,!rt){let Gi=wt.current.currentTime,Vi=Gi-it;Math.abs(Vi)<10?(je+=Math.abs(Vi),it=Gi,Ue||je-Be*Ke>=0&&(Be++,Ze.push(it),se&&Xe())):(it=Gi,se&&Xe())}}catch(or){console.log("videoplaying:",or)}}function Ci(){rt=!0}function kr(){wt.current.playing&&Ze.push(wt.current.currentTime,it),it=wt.current.currentTime,rt=!1}function vo(){ze=wt.current.duration,ze<=20&&(Ke=ze/3),wt.current.addEventListener("play",Cn)}function qo(or){or.preventDefault(),(0,we.vp)()?(wt.current.style.width="100%",wt.current.style.height="100%"):wt.current.style.cssText=""}function Do(){Ae()}function Oo(or){if(!oe){ye.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");return}const kn=or.target.dataset.seek?or.target.dataset.seek:or.target.value;wt.current.currentTime=kn,dt.current.value=kn,lt.current.value=kn}function Cr(or){const kn=Math.round(or.offsetX/or.target.clientWidth*parseInt(or.target.getAttribute("max"),10));lt.current.setAttribute("data-seek",kn);const qe=xe(kn);Vt.current.textContent=`${qe.hour>0?qe.hour+":":""}${qe.minutes}:${qe.seconds}`;const Tn=wt.current.getBoundingClientRect();Vt.current.style.left=`${or.pageX-Tn.left}px`}function jo(or){switch(or.code){case"Space":or.preventDefault(),Mn();break;case"ArrowRight":if(or.preventDefault(),!oe){ye.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(wt.current.currentTime>=wt.current.duration)break;wt.current.currentTime=parseInt(wt.current.currentTime)+5,Yn();break;case"ArrowLeft":if(or.preventDefault(),!oe){ye.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(wt.current.currentTime===0)break;wt.current.currentTime=parseInt(wt.current.currentTime)-5,Yn();break;case"ArrowUp":or.preventDefault(),wt.current.volume<1&&(wt.current.volume=(parseInt(wt.current.volume*10)+1)/10);break;case"ArrowDown":or.preventDefault(),wt.current.volume>0&&(wt.current.volume=(parseInt(wt.current.volume*10)-1)/10);break}}return $t.current.addEventListener((0,we.gH)(),qo),wt.current.addEventListener("canplay",vo),wt.current.addEventListener("ended",Ki),wt.current.addEventListener("seeking",Ci),wt.current.addEventListener("seeked",kr),wt.current.addEventListener("loadedmetadata",vr),lt.current.addEventListener("mousemove",Cr),lt.current.addEventListener("input",Oo),wt.current.addEventListener("timeupdate",Dr),wt.current.addEventListener("pause",Do),wt.current.addEventListener("volumechange",Rt),document.addEventListener("keydown",jo),()=>{var or,kn,qe,Tn,In,zi,Gi,Vi,Zi,qr,sn,He;(or=wt.current)==null||or.removeEventListener("canplay",vo),(kn=wt.current)==null||kn.removeEventListener("play",Cn),(qe=wt.current)==null||qe.removeEventListener("ended",Ki),(Tn=wt.current)==null||Tn.removeEventListener("seeking",Ci),(In=wt.current)==null||In.removeEventListener("seeked",kr),(zi=lt.current)==null||zi.removeEventListener("mousemove",Cr),(Gi=lt.current)==null||Gi.removeEventListener("input",Oo),(Vi=wt.current)==null||Vi.removeEventListener("timeupdate",Dr),(Zi=wt.current)==null||Zi.removeEventListener("pause",Do),(qr=wt.current)==null||qr.removeEventListener("loadedmetadata",vr),(sn=wt.current)==null||sn.removeEventListener("volumechange",Rt),document.removeEventListener("keydown",jo),(He=wt.current)!=null&&He.playing&&(Ze.push(it,wt.current.currentTime),se&&Xe())}},[wt,ie]),(0,Le.useEffect)(()=>{if(wt.current.onended=()=>{Re(wt)},wt.current.oncontextmenu=()=>!1,(ie==null?void 0:ie.indexOf(".m3u8"))>-1){if(wt.current.canPlayType("application/vnd.apple.mpegurl"))wt.current.src=ie;else if(me().isSupported()){var mi=new(me());mi.loadSource(ie),mi.attachMedia(wt.current)}}},[ie]);const[vn,An]=(0,Le.useState)(1),Mn=()=>{wt.current.paused||wt.current.ended?wt.current.play():wt.current.pause(),mt()};function hi(){wt.current.muted=!wt.current.muted,wt.current.muted?(Dt.current.setAttribute("data-volume",volume.value),Dt.current.value=0):Dt.current.value=Dt.current.dataset.volume}return Le.createElement("div",{style:{position:"relative"},ref:$t},Le.createElement("div",{ref:ft,className:`${ge.watermark} animated_alternate animate__animated_10s animate__infinite animate__stepstart ${ge.animate__loop}`},Je&&ut?ut.login:" "),Le.createElement("div",{className:ge.container},Le.createElement("div",{className:ge["video-container"],id:"video-container"},Le.createElement("div",{className:ge["playback-animation"],id:"playback-animation"},Le.createElement("svg",{className:ge["playback-icons"]},Le.createElement("use",{className:"hidden",href:"#play-icon"}),Le.createElement("use",{href:"#pause"}))),Le.createElement("video",{className:ge.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:wt,autoPlay:We}),Le.createElement("div",{className:`${ge["video-controls"]} `,id:"video-controls"},Le.createElement("div",{className:ge["bottom-controls"]},Le.createElement("div",{className:ge["left-controls"]},Le.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:Mn},Le.createElement("svg",{className:ge["playback-icons"]},Le.createElement("use",{ref:et,href:"#play-icon"}),Le.createElement("use",{ref:st,style:{display:"none"},href:"#pause"}))),Le.createElement("div",{className:ge.time},Le.createElement("time",{id:"time-elapsed",ref:yt},"00:00"),Le.createElement("span",null," / "),Le.createElement("time",{id:"duration",ref:bt},"00:00"))),Le.createElement("div",{className:ge["right-controls"]},oe&&Le.createElement(Fe.Z,{placement:"top",overlayClassName:ge.rateOverlay,getPopupContainer:mi=>mi.parentNode,menu:{items:[{key:"1",label:Le.createElement("span",{onClick:()=>{An(1),wt.current.playbackRate=1}},"1.0x")},{key:"2",label:Le.createElement("span",{onClick:()=>{An(1.5),wt.current.playbackRate=1.5}},"1.5x")},{key:"3",label:Le.createElement("span",{onClick:()=>{An(2),wt.current.playbackRate=2}},"2.0x")}]}},Le.createElement("div",{className:`${ge.controlText} mr5`},"\u500D\u901F")),Le.createElement(ve.CopyToClipboard,{text:ie,onCopy:()=>ye.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:ge["volume-controls"]},Le.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:ge["volume-button"],id:"volume-button",onClick:hi},Le.createElement("i",{ref:Kt,className:"icon-a-bianzu8 iconfont",style:{fontSize:"14px",color:"white"}}),Le.createElement("i",{ref:Gt,className:"icon-shengyinkaibeifen iconfont",style:{fontSize:"14px",color:"white"}}),Le.createElement("i",{ref:gn,className:"icon-shengyinkai iconfont",style:{fontSize:"14px",color:"white"}})),Le.createElement("input",{className:ge.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:Dt,style:{display:"none"},onClick:Rt})),Le.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:ge["fullscreen-button"],onClick:()=>{(0,we.vp)()?(0,we.BU)():(0,we.Dj)($t.current)}},Le.createElement("i",{className:"icon-fangda1 iconfont",style:{fontSize:"12px",color:"white"}})))),Le.createElement("div",{className:ge["video-progress"]},Le.createElement("progress",{ref:dt,value:"0",min:"0"}),Le.createElement("input",{className:ge.seek,ref:lt,value:"0",min:"0",type:"range",step:"1"}),Le.createElement("div",{className:ge["seek-tooltip"],ref:Vt,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"})))))})},71865:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return Me}});var Le=De(67294),ye=De(33054),Fe=De(30264),Me=()=>{const[Ee,me]=(0,Le.useState)(""),[be,ve]=(0,Le.useState)(0);let[we,ge]=(0,Le.useState)(),[he,xe]=(0,Le.useState)();const[fe,ue]=(0,Le.useState)(!1),ee=(0,Le.useRef)("");(0,Le.useEffect)(()=>ye.Z.subscribe("preview-image",Re=>{me(Re),console.log(Ce.current),document.body.style.overflow="hidden"}),[]),(0,Le.useEffect)(()=>(document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z)}),[]),(0,Le.useEffect)(()=>{ee.current=Ee},[Ee]);function z(Oe){Oe.keyCode==27&&ee.current&&oe()}function oe(){document.body.style.overflow="auto",ge(void 0),xe(void 0),ve(0),me("")}function ie(){ve(be+90)}function se(){we=Ce.current.width*1.1,he=Ce.current.height*1.1,xe(he),ge(we)}function le(){we=Ce.current.width/1.1,he=Ce.current.height/1.1,xe(he),ge(we)}const Se=(0,Le.useRef)(),pe=(0,Le.useRef)(),Ce=(0,Le.useRef)(),Ae=Oe=>{(Oe.nativeEvent.target===Se.current||Oe.nativeEvent.target===pe.current)&&oe()};return Le.createElement(Le.Fragment,null,Ee?Le.createElement("div",null,Le.createElement("div",{className:"preview-wrp-group",ref:pe},Le.createElement(Fe.Z,{className:"image-preview",src:Ee,style:{display:"none"},preview:{visible:!0,src:Ee,onVisibleChange:Oe=>{me("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},57444:function(_n,hn,De){"use strict";De.d(hn,{h:function(){return Se}});var Le=De(67294),ye=De(88044),Fe=De(91773),Me=De(85804),Ee=De(4631),me=De.n(Ee),be=De(71749),ve=De(30483),we=Object.defineProperty,ge=Object.defineProperties,he=Object.getOwnPropertyDescriptors,xe=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable,ee=(pe,Ce,Ae)=>Ce in pe?we(pe,Ce,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):pe[Ce]=Ae,z=(pe,Ce)=>{for(var Ae in Ce||(Ce={}))fe.call(Ce,Ae)&&ee(pe,Ae,Ce[Ae]);if(xe)for(var Ae of xe(Ce))ue.call(Ce,Ae)&&ee(pe,Ae,Ce[Ae]);return pe},oe=(pe,Ce)=>ge(pe,he(Ce));const ie=ye.default.Option,se={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"]};hn.Z=({callback:pe,onCancel:Ce})=>{const[Ae,Oe]=(0,Le.useState)("python");function Re($e){Oe(le[$e][1])}function We($e){pe($e)}return Le.createElement(Fe.default,oe(z({},se),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:We,style:{width:500}}),Le.createElement(Fe.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},Le.createElement(ye.default,{getPopupContainer:$e=>$e.parentNode,onChange:Re},Object.keys(le).map($e=>Le.createElement(ie,{key:$e,value:$e},le[$e][0])))),Le.createElement(Fe.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},Le.createElement(Se,{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:Ce},"\u53D6\u6D88")))};function Se({value:pe,onChange:Ce,mode:Ae,options:Oe={}}){const Re=(0,Le.useRef)(),[We,$e]=(0,Le.useState)();return(0,Le.useEffect)(()=>{if(We){let Je=function(pt){const St=pt.getValue();Ce&&Ce(St)};return We.on("change",Je),()=>{We.off("change",Je)}}},[We,Ce]),(0,Le.useEffect)(()=>{We&&We.setOption("mode",Ae)},[We,Ae]),(0,Le.useEffect)(()=>{We&&(pe!==We.getValue()||pe==="")&&setTimeout(()=>{We.setValue(pe||"")},300)},[We,pe]),(0,Le.useEffect)(()=>{if(Re.current&&!We){const Je=me().fromTextArea(Re.current,z({mode:Ae,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Oe));$e(Je)}},[Re.current,We]),Le.createElement("div",{className:"my-codemirror-container"},Le.createElement("textarea",{ref:Re}))}},35567:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return qr}});var Le=De(67294),ye=De(4631),Fe=De.n(ye),Me=De(91033),Ee=De(71749),me=De(57341),be=De(82801),ve=De(88386),we=De(49047),ge=De(80785),he=De(65226),xe=({value:sn="",className:He,showTextOnly:Ve,showLines:ot,style:Lt={}})=>{const At=(0,Le.useMemo)(()=>"",[sn]);return Le.createElement(Le.Fragment,null,Le.createElement("div",{dangerouslySetInnerHTML:{__html:At}}))},fe=Object.defineProperty,ue=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,z=Object.getOwnPropertySymbols,oe=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable,se=(sn,He,Ve)=>He in sn?fe(sn,He,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):sn[He]=Ve,le=(sn,He)=>{for(var Ve in He||(He={}))oe.call(He,Ve)&&se(sn,Ve,He[Ve]);if(z)for(var Ve of z(He))ie.call(He,Ve)&&se(sn,Ve,He[Ve]);return sn},Se=(sn,He)=>ue(sn,ee(He));let pe=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u516C\u5F0F",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"md-iconfont icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function Ce({onActionCallback:sn,title:He,icon:Ve,actionName:ot,className:Lt="",children:At}){function an(){sn(ot)}return Le.createElement("a",{title:He,className:Lt,onClick:an},Le.createElement("i",{className:`${Ve}`}),At)}var Ae=({watch:sn,showNullButton:He,showNullProgramButton:Ve,onActionCallback:ot,fullScreen:Lt,insertTemp:At,hidetoolBar:an,extraUse:Ot})=>{const xn=[...pe,{title:`${sn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${sn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return Le.createElement("ul",{className:"markdown-toolbar-container"},!an&&xn.map((Zn,wi)=>Le.createElement("li",{key:wi},Zn.actionName?Le.createElement(Ce,Se(le({},Zn),{onActionCallback:ot})):Le.createElement("span",{className:"v-line"}))),He?Le.createElement("li",null,Le.createElement(Ce,{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,Ve?Le.createElement(Le.Fragment,null,Le.createElement("li",null,Le.createElement(Ce,{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(Ce,{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,At&&Le.createElement("li",null,Le.createElement(Ce,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${At}`,onActionCallback:ot},Le.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Ot&&Le.createElement("li",null,Ot),Le.createElement("li",{className:"btn-full-screen"},Le.createElement(Ce,{icon:`${Lt?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Lt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:ot})))},Oe=De(76621),Re=De(91773),We=De(28802),$e=De(85804),Je=Object.defineProperty,pt=Object.defineProperties,St=Object.getOwnPropertyDescriptors,Mt=Object.getOwnPropertySymbols,ct=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable,ft=(sn,He,Ve)=>He in sn?Je(sn,He,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):sn[He]=Ve,$t=(sn,He)=>{for(var Ve in He||(He={}))ct.call(He,Ve)&&ft(sn,Ve,He[Ve]);if(Mt)for(var Ve of Mt(He))wt.call(He,Ve)&&ft(sn,Ve,He[Ve]);return sn},st=(sn,He)=>pt(sn,St(He));const et={labelCol:{span:4},wrapperCol:{span:20}};var lt=({callback:sn,onCancel:He})=>{function Ve(ot){sn(ot)}return Le.createElement(Re.default,st($t({},et),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ve,style:{width:500}}),Le.createElement(Re.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},Le.createElement(We.default,null)),Le.createElement(Re.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},Le.createElement(We.default,null)),Le.createElement("div",{className:"flex-container flex-end"},Le.createElement($e.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Le.createElement($e.ZP,{type:"ghost",onClick:He},"\u53D6\u6D88")))},dt=De(57444),bt=De(70859),yt=De(62844),Vt=De(71230),Kt=De(63205),gn=De(67294),Gt=({callback:sn,onCancel:He})=>{const Ve=document.createElement("canvas"),ot=Ve.getContext("2d");Ve.width=1e3,Ve.height=800,ot.fillStyle="#ffffff",ot.fillRect(0,0,Ve.width,Ve.height);const Lt=Ve.toDataURL("image/png");return gn.createElement(yt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},gn.createElement(Vt.Z,{style:{height:"100vh"}},gn.createElement(Kt.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Lt,visible:!0,title:String(Date.now())},onOk:At=>{sn({src:At.url})},onClose:He})))},Dt=De(23495);function on(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(on,go.CommandHandler),on.prototype.canAlignSelection=function(){var sn=this.diagram;return!(sn===null||sn.isReadOnly||sn.isModelReadOnly||sn.selection.count<2)},on.prototype.alignLeft=function(){var sn=this.diagram;sn.startTransaction("aligning left");var He=1/0;sn.selection.each(function(Ve){Ve instanceof go.Link||(He=Math.min(Ve.position.x,He))}),sn.selection.each(function(Ve){Ve instanceof go.Link||Ve.move(new go.Point(He,Ve.position.y))}),sn.commitTransaction("aligning left")},on.prototype.alignRight=function(){var sn=this.diagram;sn.startTransaction("aligning right");var He=-1/0;sn.selection.each(function(Ve){if(!(Ve instanceof go.Link)){var ot=Ve.actualBounds.x+Ve.actualBounds.width;He=Math.max(ot,He)}}),sn.selection.each(function(Ve){Ve instanceof go.Link||Ve.move(new go.Point(He-Ve.actualBounds.width,Ve.position.y))}),sn.commitTransaction("aligning right")},on.prototype.alignTop=function(){var sn=this.diagram;sn.startTransaction("alignTop");var He=1/0;sn.selection.each(function(Ve){Ve instanceof go.Link||(He=Math.min(Ve.position.y,He))}),sn.selection.each(function(Ve){Ve instanceof go.Link||Ve.move(new go.Point(Ve.position.x,He))}),sn.commitTransaction("alignTop")},on.prototype.alignBottom=function(){var sn=this.diagram;sn.startTransaction("aligning bottom");var He=-1/0;sn.selection.each(function(Ve){if(!(Ve instanceof go.Link)){var ot=Ve.actualBounds.y+Ve.actualBounds.height;He=Math.max(ot,He)}}),sn.selection.each(function(Ve){Ve instanceof go.Link||Ve.move(new go.Point(Ve.actualBounds.x,He-Ve.actualBounds.height))}),sn.commitTransaction("aligning bottom")},on.prototype.alignCenterX=function(){var sn=this.diagram,He=sn.selection.first();if(He){sn.startTransaction("aligning Center X");var Ve=He.actualBounds.x+He.actualBounds.width/2;sn.selection.each(function(ot){ot instanceof go.Link||ot.move(new go.Point(Ve-ot.actualBounds.width/2,ot.actualBounds.y))}),sn.commitTransaction("aligning Center X")}},on.prototype.alignCenterY=function(){var sn=this.diagram,He=sn.selection.first();if(He){sn.startTransaction("aligning Center Y");var Ve=He.actualBounds.y+He.actualBounds.height/2;sn.selection.each(function(ot){ot instanceof go.Link||ot.move(new go.Point(ot.actualBounds.x,Ve-ot.actualBounds.height/2))}),sn.commitTransaction("aligning Center Y")}},on.prototype.alignColumn=function(sn){var He=this.diagram;He.startTransaction("align Column"),sn===void 0&&(sn=0),sn=parseFloat(sn);var Ve=new Array;He.selection.each(function(Ot){Ot instanceof go.Link||Ve.push(Ot)});for(var ot=0;ot<Ve.length-1;ot++){var Lt=Ve[ot],At=Lt.actualBounds.y+Lt.actualBounds.height+sn,an=Ve[ot+1];an.move(new go.Point(Lt.actualBounds.x,At))}He.commitTransaction("align Column")},on.prototype.alignRow=function(sn){sn===void 0&&(sn=0),sn=parseFloat(sn);var He=this.diagram;He.startTransaction("align Row");var Ve=new Array;He.selection.each(function(Ot){Ot instanceof go.Link||Ve.push(Ot)});for(var ot=0;ot<Ve.length-1;ot++){var Lt=Ve[ot],At=Lt.actualBounds.x+Lt.actualBounds.width+sn,an=Ve[ot+1];an.move(new go.Point(At,Lt.actualBounds.y))}He.commitTransaction("align Row")},on.prototype.canRotate=function(sn){var He=this.diagram;return!(He===null||He.isReadOnly||He.isModelReadOnly||He.selection.count<1)},on.prototype.rotate=function(sn){sn===void 0&&(sn=90);var He=this.diagram;He.startTransaction("rotate "+sn.toString());var He=this.diagram;He.selection.each(function(Ve){Ve instanceof go.Link||Ve instanceof go.Group||(Ve.angle+=sn)}),He.commitTransaction("rotate "+sn.toString())},on.prototype.pullToFront=function(){var sn=this.diagram;sn.startTransaction("pullToFront");var He=new go.Map;sn.selection.each(function(Ve){He.set(Ve.layer,0)}),He.iteratorKeys.each(function(Ve){var ot=0;Ve.parts.each(function(Lt){if(!Lt.isSelected){var At=Lt.zOrder;isNaN(At)?Lt.zOrder=0:ot=Math.max(ot,At)}}),He.set(Ve,ot)}),sn.selection.each(function(Ve){on._assignZOrder(Ve,He.get(Ve.layer)+1)}),sn.commitTransaction("pullToFront")},on.prototype.pushToBack=function(){var sn=this.diagram;sn.startTransaction("pushToBack");var He=new go.Map;sn.selection.each(function(Ve){He.set(Ve.layer,0)}),He.iteratorKeys.each(function(Ve){var ot=0;Ve.parts.each(function(Lt){if(!Lt.isSelected){var At=Lt.zOrder;isNaN(At)?Lt.zOrder=0:ot=Math.min(ot,At)}}),He.set(Ve,ot)}),sn.selection.each(function(Ve){on._assignZOrder(Ve,He.get(Ve.layer)-1-on._findGroupDepth(Ve))}),sn.commitTransaction("pushToBack")},on._assignZOrder=function(sn,He,Ve){Ve===void 0&&(Ve=sn),sn.layer===Ve.layer&&(sn.zOrder=He),sn instanceof go.Group&&sn.memberParts.each(function(ot){on._assignZOrder(ot,He+1,Ve)})},on._findGroupDepth=function(sn){if(sn instanceof go.Group){var He=0;return sn.memberParts.each(function(Ve){He=Math.max(He,on._findGroupDepth(Ve))}),He+1}else return 0},on.prototype.doKeyDown=function(){var sn=this.diagram;if(sn!==null){var He=sn.lastInput;if(He.key==="Up"||He.key==="Down"||He.key==="Left"||He.key==="Right"){var Ve=this.arrowKeyBehavior;if(Ve==="none")return;if(Ve==="select"){this._arrowKeySelect();return}else if(Ve==="move"){this._arrowKeyMove();return}else if(Ve==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},on.prototype._getAllParts=function(){var sn=new Array;return this.diagram.nodes.each(function(He){sn.push(He)}),this.diagram.parts.each(function(He){sn.push(He)}),sn},on.prototype._arrowKeyMove=function(){var sn=this.diagram,He=sn.lastInput,Ve=0,ot=0;if(He.control||He.meta)Ve=1,ot=1;else if(sn.grid!==null){var Lt=sn.grid.gridCellSize;ot=Lt.width,Ve=Lt.height}sn.startTransaction("arrowKeyMove"),sn.selection.each(function(At){He.key==="Up"?At.move(new go.Point(At.actualBounds.x,At.actualBounds.y-Ve)):He.key==="Down"?At.move(new go.Point(At.actualBounds.x,At.actualBounds.y+Ve)):He.key==="Left"?At.move(new go.Point(At.actualBounds.x-ot,At.actualBounds.y)):He.key==="Right"&&At.move(new go.Point(At.actualBounds.x+ot,At.actualBounds.y))}),sn.commitTransaction("arrowKeyMove")},on.prototype._arrowKeySelect=function(){var sn=this.diagram,He=sn.lastInput,Ve=null;He.key==="Up"?Ve=this._findNearestPartTowards(270):He.key==="Down"?Ve=this._findNearestPartTowards(90):He.key==="Left"?Ve=this._findNearestPartTowards(180):He.key==="Right"&&(Ve=this._findNearestPartTowards(0)),Ve!==null&&(He.shift?Ve.isSelected=!0:He.control||He.meta?Ve.isSelected=!Ve.isSelected:sn.select(Ve))},on.prototype._findNearestPartTowards=function(sn){var He=this.diagram.selection.first();if(He===null)return null;for(var Ve=He.actualBounds.center,ot=this._getAllParts(),Lt=1/0,At=He,an=0;an<ot.length;an++){var Ot=ot[an];if(Ot!==He&&Ot.canSelect()){var xn=Ot.actualBounds.center,Zn=Ve.directionPoint(xn),wi=this._angleCloseness(Zn,sn);if(wi<=45){var Bn=Ve.distanceSquaredPoint(xn);Bn*=1+Math.sin(wi*Math.PI/180),Bn<Lt&&(Lt=Bn,At=Ot)}}}return At},on.prototype._angleCloseness=function(sn,He){return Math.min(Math.abs(He-sn),Math.min(Math.abs(He+360-sn),Math.abs(He-360-sn)))},on.prototype._arrowKeyTree=function(){var sn=this.diagram,He=sn.selection.first();if(He instanceof go.Node){var Ve=sn.lastInput;if(Ve.key==="Right"){if(!He.isTreeLeaf)if(!He.isTreeExpanded)sn.commandHandler.canExpandTree(He)&&sn.commandHandler.expandTree(He);else{var ot=this._sortTreeChildrenByY(He).first();ot!==null&&sn.select(ot)}}else if(Ve.key==="Left")if(!He.isTreeLeaf&&He.isTreeExpanded)sn.commandHandler.canCollapseTree(He)&&sn.commandHandler.collapseTree(He);else{var Lt=He.findTreeParentNode();Lt!==null&&sn.select(Lt)}else if(Ve.key==="Up"){var Lt=He.findTreeParentNode();if(Lt!==null){var At=this._sortTreeChildrenByY(Lt),an=At.indexOf(He);if(an>0){for(var Ot=At.elt(an-1);Ot!==null&&Ot.isTreeExpanded&&!Ot.isTreeLeaf;){var xn=this._sortTreeChildrenByY(Ot);Ot=xn.last()}Ot!==null&&sn.select(Ot)}else sn.select(Lt)}}else if(Ve.key==="Down")if(He.isTreeExpanded&&!He.isTreeLeaf){var ot=this._sortTreeChildrenByY(He).first();ot!==null&&sn.select(ot)}else for(;He!==null;){var Lt=He.findTreeParentNode();if(Lt===null)break;var At=this._sortTreeChildrenByY(Lt),an=At.indexOf(He);if(an<At.length-1){sn.select(At.elt(an+1));break}else He=Lt}var Zn=sn.selection.first();Zn!==null&&sn.scrollToRect(Zn.actualBounds)}},on.prototype._sortTreeChildrenByY=function(sn){var He=new go.List().addAll(sn.findTreeChildrenNodes());return He.sort(function(Ve,ot){var Lt=Ve.location,At=ot.location;return Lt.y<At.y?-1:Lt.y>At.y?1:Lt.x<At.x?-1:Lt.x>At.x?1:0}),He},on.prototype.copyToClipboard=function(sn){go.CommandHandler.prototype.copyToClipboard.call(this,sn),this._lastPasteOffset.set(this.pasteOffset)},on.prototype.pasteFromClipboard=function(){var sn=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(sn,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),sn},Object.defineProperty(on.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(sn){if(sn!=="move"&&sn!=="select"&&sn!=="scroll"&&sn!=="tree"&&sn!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+sn);this._arrowKeyBehavior=sn}}),Object.defineProperty(on.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(sn){if(!(sn instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+sn);this._pasteOffset.set(sn)}});var Jt=on,jt=De(18023),ut=De(15746),ze=De(33170),je={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},it=De(52262),ht=De(67294),nt=(sn,He,Ve)=>new Promise((ot,Lt)=>{var At=xn=>{try{Ot(Ve.next(xn))}catch(Zn){Lt(Zn)}},an=xn=>{try{Ot(Ve.throw(xn))}catch(Zn){Lt(Zn)}},Ot=xn=>xn.done?ot(xn.value):Promise.resolve(xn.value).then(At,an);Ot((Ve=Ve.apply(sn,He)).next())});function Ke({onCancel:sn,callback:He}){let Ve=(0,Le.useRef)(),ot=(0,Le.useRef)(),Lt=(0,Le.useRef)(),At=(0,Le.useRef)(!1);const an=(0,Le.useRef)(!1),[Ot,xn]=(0,Le.useState)(0);function Zn(){const Bn=Dt.bx.make,rn={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"};Ve.current=new Dt.S0(ot.current,{padding:20,grid:Bn(Dt.s_,"Grid",Bn(Dt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Bn(Dt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:dn=>{var gr=dn.diagram.commandHandler.addTopLevelParts(dn.diagram.selection,!0);gr||dn.diagram.currentTool.doCancel()},commandHandler:Bn(Jt),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:dn=>{var gr=dn.subject;gr.location=gr.location.copy().snapToGridPoint(dn.diagram.grid.gridOrigin,dn.diagram.grid.gridCellSize),setTimeout(()=>{dn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:dn=>{var gr=dn.subject;setTimeout(()=>{dn.diagram.commandHandler.editTextBlock()})},LinkRelinked:dn=>{var gr=dn.parameter.part;gr.invalidateConnectedLinks();var Zr=dn.subject;dn.diagram.toolManager.linkingTool.isForwards?Zr.toNode.invalidateConnectedLinks():Zr.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Ve.current.nodeTemplate=Bn(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),Bn(Dt.bn,{name:"SHAPE",fill:rn.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")),Bn(Dt.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Bn(Dt.al,{margin:1,textAlign:"center",overflow:Dt.al.OverflowEllipsis,editable:!0},new Dt.KX("text").makeTwoWay(),new Dt.KX("stroke","color"))),Ve.current.nodeTemplate.toolTip=Bn("ToolTip",Bn(Dt.s_,"Vertical",{maxSize:new Dt.$u(200,NaN)},Bn(Dt.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Dt.KX("text")),Bn(Dt.al,{font:"10pt sans-serif",textAlign:"center"},new Dt.KX("text","details"))));function Fn(dn,gr){var Zr=($i,yo)=>{$i.handled=!0,$i.diagram.model.commit(Rr=>{var uo=yo.part.adornedPart,to=new Dt.E9().setRectSpot(uo.actualBounds,dn);to.subtract(uo.location),to.scale(2,2),to.x+=Math.sign(to.x)*130,to.y+=Math.sign(to.y)*130,to.add(uo.location),to.snapToGridPoint($i.diagram.grid.gridOrigin,$i.diagram.grid.gridCellSize);var Yr=Rr.copyNodeData(uo.data);Rr.setGroupKeyForNodeData(Yr,Rr.getGroupKeyForNodeData(uo.data)),Rr.addNodeData(Yr);var Fo={from:uo.key,to:Rr.getKeyForNodeData(Yr)};Rr.addLinkData(Fo);var zn=$i.diagram.findNodeForData(Yr);zn.location=to,$i.diagram.select(zn),setTimeout(()=>{$i.diagram.commandHandler.editTextBlock()},20)})};return Bn(Dt.bn,{figure:gr,alignment:dn,alignmentFocus:dn.opposite(),width:dn.equals(Dt.z6.Top)||dn.equals(Dt.z6.Bottom)?25:18,height:dn.equals(Dt.z6.Top)||dn.equals(Dt.z6.Bottom)?18:25,fill:"orange",stroke:rn.white,strokeWidth:4,mouseEnter:($i,yo)=>yo.fill="dodgerblue",mouseLeave:($i,yo)=>yo.fill="orange",isActionable:!0,click:Zr,contextClick:Zr})}function vi(dn){return Bn(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:(gr,Zr)=>Zr.fill="dodgerblue",mouseLeave:(gr,Zr)=>Zr.fill="orange",click:(gr,Zr)=>{gr.diagram.commandHandler.showContextMenu(Zr.part.adornedPart)}},dn||{})}Ve.current.nodeTemplate.selectionAdornmentTemplate=Bn(Dt.uz,"Spot",Bn(Dt.Vm,{padding:10}),Fn(Dt.z6.Top,"TriangleUp"),Fn(Dt.z6.Left,"TriangleLeft"),Fn(Dt.z6.Right,"TriangleRight"),Fn(Dt.z6.Bottom,"TriangleDown"),vi({alignment:new Dt.z6(.75,0)}));function _i(dn,gr){return(Zr,$i)=>{Zr.handled=!0,Zr.diagram.model.commit(yo=>{yo.set($i.part.adornedPart.data,dn,gr)})}}function cn(dn,gr){return gr||(gr="color"),Bn(Dt.bn,{width:16,height:16,stroke:"lightgray",fill:dn,margin:1,background:"transparent",mouseEnter:(Zr,$i)=>$i.stroke="dodgerblue",mouseLeave:(Zr,$i)=>$i.stroke="lightgray",click:_i(gr,dn),contextClick:_i(gr,dn)})}function qn(){return[Bn("ContextMenuButton",Bn(Dt.s_,"Horizontal",cn(rn.white,"fill"),cn(rn.beige,"fill"),cn(rn.extralightblue,"fill"),cn(rn.extralightred,"fill"))),Bn("ContextMenuButton",Bn(Dt.s_,"Horizontal",cn(rn.lightgray,"fill"),cn(rn.lightgreen,"fill"),cn(rn.lightblue,"fill"),cn(rn.lightred,"fill")))]}function Ii(){return[Bn("ContextMenuButton",Bn(Dt.s_,"Horizontal",cn(rn.black),cn(rn.green),cn(rn.blue),cn(rn.red))),Bn("ContextMenuButton",Bn(Dt.s_,"Horizontal",cn(rn.white),cn(rn.magenta),cn(rn.purple),cn(rn.orange)))]}function lr(dn,gr){return gr||(gr="thickness"),Bn(Dt.bn,"LineH",{width:16,height:16,strokeWidth:dn,margin:1,background:"transparent",mouseEnter:(Zr,$i)=>$i.background="dodgerblue",mouseLeave:(Zr,$i)=>$i.background="transparent",click:_i(gr,dn),contextClick:_i(gr,dn)})}function _r(dn,gr){return gr||(gr="dash"),Bn(Dt.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:dn,margin:1,background:"transparent",mouseEnter:(Zr,$i)=>$i.background="dodgerblue",mouseLeave:(Zr,$i)=>$i.background="transparent",click:_i(gr,dn),contextClick:_i(gr,dn)})}function Ti(){return[Bn("ContextMenuButton",Bn(Dt.s_,"Horizontal",lr(1),lr(2),lr(3),lr(4))),Bn("ContextMenuButton",Bn(Dt.s_,"Horizontal",_r(null),_r([2,4]),_r([4,4])))]}function bi(dn,gr){return gr||(gr="figure"),Bn(Dt.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:dn,margin:1,background:"transparent",mouseEnter:(Zr,$i)=>$i.fill="dodgerblue",mouseLeave:(Zr,$i)=>$i.fill="lightgray",click:_i(gr,dn),contextClick:_i(gr,dn)})}Ve.current.nodeTemplate.contextMenu=Bn("ContextMenu",Bn("ContextMenuButton",Bn(Dt.s_,"Horizontal",bi("Rectangle"),bi("RoundedRectangle"),bi("Ellipse"),bi("Diamond"))),Bn("ContextMenuButton",Bn(Dt.s_,"Horizontal",bi("Parallelogram2"),bi("ManualOperation"),bi("Procedure"),bi("Cylinder1"))),Bn("ContextMenuButton",Bn(Dt.s_,"Horizontal",bi("Terminator"),bi("CreateRequest"),bi("Document"),bi("TriangleDown"))),qn(),Ii(),Ti()),Ve.current.groupTemplate=Bn(Dt.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Dt.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(dn,gr)=>{var Zr=gr.addMembers(gr.diagram.selection,!0);Zr||gr.diagram.currentTool.doCancel()},avoidable:!1},new Dt.KX("location","loc",Dt.E9.parse).makeTwoWay(Dt.E9.stringify),Bn(Dt.s_,"Auto",{name:"BODY"},Bn(Dt.bn,{parameter1:10,fill:rn.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")),Bn(Dt.Vm,{background:"transparent",margin:20})),Bn(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"))),Ve.current.groupTemplate.selectionAdornmentTemplate=Bn(Dt.uz,"Spot",Bn(Dt.s_,"Auto",Bn(Dt.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Bn(Dt.Vm,{margin:1.5})),vi({alignment:Dt.z6.TopRight,alignmentFocus:Dt.z6.BottomRight})),Ve.current.groupTemplate.contextMenu=Bn("ContextMenu",qn(),Ii(),Ti()),Ve.current.linkTemplate=Bn(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",dn=>dn>=1?10:0),new Dt.KX("toShortLength","dir",dn=>dn>=1?10:0),new Dt.KX("points").makeTwoWay(),Bn(Dt.bn,{strokeWidth:2},new Dt.KX("stroke","color"),new Dt.KX("strokeWidth","thickness"),new Dt.KX("strokeDashArray","dash")),Bn(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",dn=>dn===1)),Bn(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",dn=>dn>=1),new Dt.KX("width","thickness",dn=>7+3*dn),new Dt.KX("height","thickness",dn=>7+3*dn),new Dt.KX("segmentOffset","thickness",dn=>new Dt.E9(-15,4+1.5*dn))),Bn(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",dn=>dn===2),new Dt.KX("width","thickness",dn=>7+3*dn),new Dt.KX("height","thickness",dn=>7+3*dn),new Dt.KX("segmentOffset","thickness",dn=>new Dt.E9(-15,4+1.5*dn))),Bn(Dt.al,{alignmentFocus:new Dt.z6(0,1,-4,0),editable:!0},new Dt.KX("text").makeTwoWay(),new Dt.KX("stroke","color"))),Ve.current.linkTemplate.selectionAdornmentTemplate=Bn(Dt.uz,Bn(Dt.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:li(2)},new Dt.KX("pathPattern","thickness",li)),vi({alignmentFocus:new Dt.z6(0,0,-6,-4)}));function li(dn){return Bn(Dt.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(dn+4).toString()+" H3"})}function dr(dn){var gr="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return dn===0?gr="M0 0 M16 16 M0 8 L16 8":dn===2&&(gr="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Bn(Dt.bn,{geometryString:gr,margin:2,background:"transparent",mouseEnter:(Zr,$i)=>$i.background="dodgerblue",mouseLeave:(Zr,$i)=>$i.background="transparent",click:_i("dir",dn),contextClick:_i("dir",dn)})}function jr(dn){var gr=(Zr,$i)=>{Zr.handled=!0,Zr.diagram.model.commit(yo=>{var Rr=$i.part.adornedPart;yo.set(Rr.data,dn?"toSpot":"fromSpot",Dt.z6.stringify(Dt.z6.AllSides)),(dn?Rr.toNode:Rr.fromNode).invalidateConnectedLinks()})};return Bn(Dt.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Zr,$i)=>$i.background="dodgerblue",mouseLeave:(Zr,$i)=>$i.background="transparent",click:gr,contextClick:gr})}function ei(dn,gr){var Zr=0,$i=Dt.z6.RightSide;dn.equals(Dt.z6.Top)?(Zr=270,$i=Dt.z6.TopSide):dn.equals(Dt.z6.Left)?(Zr=180,$i=Dt.z6.LeftSide):dn.equals(Dt.z6.Bottom)&&(Zr=90,$i=Dt.z6.BottomSide),gr||(Zr-=180);var yo=(Rr,uo)=>{Rr.handled=!0,Rr.diagram.model.commit(to=>{var Yr=uo.part.adornedPart;to.set(Yr.data,gr?"toSpot":"fromSpot",Dt.z6.stringify($i)),(gr?Yr.toNode:Yr.fromNode).invalidateConnectedLinks()})};return Bn(Dt.bn,{alignment:dn,alignmentFocus:dn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:Zr,background:"transparent",mouseEnter:(Rr,uo)=>uo.background="dodgerblue",mouseLeave:(Rr,uo)=>uo.background="transparent",click:yo,contextClick:yo})}Ve.current.linkTemplate.contextMenu=Bn("ContextMenu",Ii(),Ti(),Bn("ContextMenuButton",Bn(Dt.s_,"Horizontal",dr(0),dr(1),dr(2))),Bn("ContextMenuButton",Bn(Dt.s_,"Horizontal",Bn(Dt.s_,"Spot",jr(!1),ei(Dt.z6.Top,!1),ei(Dt.z6.Left,!1),ei(Dt.z6.Right,!1),ei(Dt.z6.Bottom,!1)),Bn(Dt.s_,"Spot",{margin:new Dt.Zt(0,0,0,2)},jr(!0),ei(Dt.z6.Top,!0),ei(Dt.z6.Left,!0),ei(Dt.z6.Right,!0),ei(Dt.z6.Bottom,!0)))));const Ui=`{ "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 ws=["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 cs(dn){return console.log("shapeName:",dn),ws.indexOf(dn)>=0}var Io=new Dt.YI(Lt.current,{maxSelectionCount:1,linkTemplate:Bn(Dt.rU,{locationSpot:Dt.z6.Center,selectionAdornmentTemplate:Bn(Dt.uz,"Link",{locationSpot:Dt.z6.Center},Bn(Dt.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Bn(Dt.bn,{toArrow:"Standard",stroke:null}))},{routing:Dt.rU.AvoidsNodes,curve:Dt.rU.JumpOver,corner:5,toShortLength:4},new Dt.KX("points"),Bn(Dt.bn,{isPanelMain:!0,strokeWidth:2}),Bn(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(dn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:dn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Ve.current.addDiagramListener("TextEdited",function(dn){var gr;const Zr=dn.subject.part;var $i=(gr=document.activeElement)==null?void 0:gr.value;typeof $i=="string"&&$i.trim()===""&&Ve.current.model.commit(function(yo){yo.set(Zr.data,"text","\u672A\u547D\u540D"),Ve.current.commandHandler.stopCommand()},"increment")}),Io.nodeTemplate=Bn(Dt.NB,"Auto",{locationSpot:Dt.z6.Center},new Dt.KX("location","location",Dt.E9.parse).makeTwoWay(Dt.E9.stringify),Bn(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")),Bn(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(()=>{Ve.current.grid=Bn(Dt.s_,"Grid",Bn(Dt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Bn(Dt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Ve.current.grid.visible=!0,Ve.current.grid.gridCellStroke="darkgray",Ve.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Ve.current,Ve.current}const wi=()=>nt(this,null,function*(){var Bn,rn=Ve.current.makeImage();const Fn=yield(0,ze.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:rn.src,file_data:JSON.stringify({login:(Bn=(0,it.eY)())==null?void 0:Bn.login,data:JSON.parse(Ve.current.model.toJson())})}});He({src:Fn.url})});return(0,Le.useEffect)(()=>(setTimeout(()=>{Zn()},500),xn(Ot+1),()=>{Ve.current=null}),[]),ht.createElement("div",{ref:an,className:"body-overflow-initial"},ht.createElement(yt.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Ot,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:ht.createElement(Vt.Z,null,ht.createElement(ut.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ht.createElement(ut.Z,{onClick:()=>{var Bn,rn,Fn=Ve.current.selection.first();if(At.current=!At.current,document.activeElement&&Fn){let vi=(rn=(Bn=document.activeElement)==null?void 0:Bn.value)==null?void 0:rn.trim();typeof vi=="string"&&Ve.current.model.commit(function(_i){_i.set(Fn.data,"text",vi||"\u672A\u547D\u540D"),Ve.current.commandHandler.stopCommand()},"increment")}xn(Ot+1)}},ht.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:sn},ht.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:At.current?"none":"block"},className:je.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:je.myPaletteDiv,ref:Lt})),ht.createElement("div",{style:{flex:1,position:"relative"}},ht.createElement("div",{ref:ot,style:{height:"80vh"}}))),ht.createElement("div",{className:"tr"},ht.createElement($e.ZP,{size:"large",onClick:wi,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Be=Ke,Ue=De(98813),rt=De(37720);const Ze=Ue.ZP.Group,Xe={margin:"0 8px"};var mt=({callback:sn,onCancel:He})=>{function Ve(ot){sn(ot)}return Le.createElement(Re.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ve},Le.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},Le.createElement("span",{style:Xe},"\u5355\u5143\u683C\u6570\uFF1A"),Le.createElement("span",{style:Xe},"\u884C\u6570"),Le.createElement(Re.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},Le.createElement(rt.Z,null)),Le.createElement("span",{style:Xe},"\u5217\u6570"),Le.createElement(Re.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},Le.createElement(rt.Z,null))),Le.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},Le.createElement("span",{style:Xe},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),Le.createElement(Re.default.Item,{name:"align"},Le.createElement(Ze,null,Le.createElement(Ue.ZP,{value:"default"},Le.createElement("i",{className:"fa fa-align-justify"})),Le.createElement(Ue.ZP,{value:"left"},Le.createElement("i",{className:"fa fa-align-left"})),Le.createElement(Ue.ZP,{value:"center"},Le.createElement("i",{className:"fa fa-align-center"})),Le.createElement(Ue.ZP,{value:"right"},Le.createElement("i",{className:"fa fa-align-right"}))))),Le.createElement("div",{className:"flex-container flex-end"},Le.createElement($e.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Le.createElement($e.ZP,{type:"ghost",onClick:He},"\u53D6\u6D88")))},Rt=De(59637),vn=De(61016),An=De.n(vn),hi=(0,Le.forwardRef)(({use3d:sn,width:He,height:Ve,callback:ot,showSaveButton:Lt},At)=>{const an=(0,Le.useRef)(),Ot=(0,Le.useRef)(),[xn,Zn]=(0,Le.useState)(!1),wi=(0,Le.useRef)({id:an,appName:"graphing",width:He||1e3,height:Ve||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)(()=>{Ot.current=new(An())(wi.current,!0),window.onload=function(){Ot.current.inject("applet_container")}},[]);const Bn=()=>{var rn=window.ggbApplet.getPNGBase64(1,!0,72);return ot&&ot(rn),rn};return(0,Le.useEffect)(()=>{wi.current.appName=xn?"3D":"graphing",Ot.current.inject("applet_container")},[xn]),(0,Le.useEffect)(()=>{Zn(sn)},[sn]),(0,Le.useImperativeHandle)(At,()=>({getImgData:Bn})),Le.createElement(Le.Fragment,null,Le.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:an}),Le.createElement(Vt.Z,{align:"middle"},Le.createElement(ut.Z,{flex:1},Le.createElement(Rt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:xn,onChange:rn=>Zn(rn)})),Le.createElement(ut.Z,null,Le.createElement($e.ZP,{size:"large",onClick:Bn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),mi=De(36527),si=De(2453);const Cn="link",Ki="upload-image",Yn="add-flowchart",Qi="draw-image",vr="add-flowchart",Dr="code-block",Ci="add-table",kr="------------",vo={default:kr,left:`:${kr}`,center:`:${kr}:`,right:`${kr}:`};var qo=De(99914);function Do(){}let Oo=0;const Cr=1e4,jo="\u2581",or="@\u2581\u2581@",kn="@\u2581@",qe=`
|
|
|
**\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`,Tn=["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 In(sn){return/^\d+$/.test(sn)?`${sn}px`:sn}const Gi=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Vi={[Gi+"-B"]:"bold",[Gi+"-I"]:"italic"},Zi={[Cn]:"\u6DFB\u52A0\u94FE\u63A5",[Dr]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Ki]:"\u6DFB\u52A0\u56FE\u7247",[Qi]:"\u6DFB\u52A0\u753B\u56FE",[Yn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Ci]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var qr=({defaultValue:sn="",onChange:He,width:Ve="100%",height:ot=400,miniToolbar:Lt=!1,isFocus:At=!1,watch:an,insertTemp:Ot,mode:xn="markdown",id:Zn="markdown-editor-id",showResizeBar:wi=!1,noStorage:Bn=!1,showNullButton:rn=!1,showNullProgramButton:Fn=!1,hidetoolBar:vi=!1,fullScreen:_i=!1,onBlur:cn,onCMBeforeChange:qn,onFullScreen:Ii,className:lr="",disablePaste:_r=!1,disabled:Ti=!1,disabledFill:bi=!1,placeholder:li="",values:dr="",extraUse:jr})=>{const[ei,Ui]=(0,Le.useState)(null),[ws,cs]=(0,Le.useState)(sn),[Io,dn]=(0,Le.useState)(an),[gr,Zr]=(0,Le.useState)(_i),[$i,yo]=(0,Le.useState)(""),[Rr,uo]=(0,Le.useState)(0),[to,Yr]=(0,Le.useState)(ot),[Fo,zn]=(0,Le.useState)(!1),[ns,Ut]=(0,Le.useState)(0),[en,jn]=(0,Le.useState)(0),Ft=(0,Le.useRef)(),Yt=(0,Le.useRef)(),nn=(0,Le.useRef)(),yn=(0,Le.useRef)();(0,Le.useEffect)(()=>{const Pi=window.scrollY||window.pageYOffset;cs(dr),ei==null||ei.setValue(dr),window.scrollTo(0,Pi)},[dr]),(0,Le.useEffect)(()=>{Ii==null||Ii(gr)},[gr]),(0,Le.useEffect)(()=>{if(Ft.current){let Pi=function(Di,Sn){var ji;if(_r){Sn.preventDefault();return}const Wi=Sn.clipboardData;if(Wi){const Ur=Wi.types.toString(),Xr=Wi.items;if(Ur==="Files"||Wi.types.indexOf("Files")>-1){if(Sn.preventDefault(),xn=="stex")return;try{let Jr=Xr[1];((ji=Xr[0])==null?void 0:ji.kind)==="file"&&(Jr=Xr[0]);const xo=Jr.getAsFile(),Qo=xo.name.split(".").pop();(0,bt.I)(xo,Wo=>{var _s,As,pn;Wo.id?((_s=xo==null?void 0:xo.type)==null?void 0:_s.indexOf("image"))>-1?ui.replaceSelection(`<img width="100%" src="/api/attachments/${Wo.id}?type=${Wo.content_type})" alt="" />`):((As=xo==null?void 0:xo.type)==null?void 0:As.indexOf("video"))>-1?ui.replaceSelection(`<video width="100%" controls src="/api/attachments/${Wo.id}"></video>`):((pn=xo==null?void 0:xo.type)==null?void 0:pn.indexOf("pdf"))>-1?ui.replaceSelection(`<a href="/api/attachments/${Wo.id}?type=${xo.type}&disposition=inline" target="_blank">${xo.name}</a>`):Tn.includes(Qo)?ui.replaceSelection(`<a href="/api/attachments/${Wo.id}?type=office&disposition=inline" target="_blank">${xo.name}</a>`):ui.replaceSelection(`[${xo.name}](/api/attachments/${Wo.id}?type=${Wo.content_type})`):(Wo==null?void 0:Wo.status)===401&&(document.location.href="/user/login")})}catch(Jr){si.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const ui=Fe().fromTextArea(Ft.current,{mode:xn,lineNumbers:!Lt,lineWrapping:!0,value:sn,autoCloseTags:!0,autoCloseBrackets:!0});return ui.on("keyup",function(Di,Sn){Sn.keyCode===8&&(Di.getValue()==""?ui.setOption("placeholder",li):ui.setOption("placeholder",null))}),ui.on("keydown",function(Di,Sn){if(Sn.keyCode===8){var ji=yi(Di);ji&&Sn.preventDefault()}}),At&&ui.focus(),ui.on("paste",Pi),Ti&&ui.on("beforeChange",function(Di,Sn){(Sn.origin==="paste"||Sn.origin==="+input")&&Sn.cancel()}),Ui(ui),()=>{ui.off("paste",Pi)}}},[]);const Xn=(0,Le.useCallback)(()=>{if(Yt.current)try{}catch(Pi){console.log(Pi,"---- to set md editor body height")}},[to,Yt,gr]);(0,Le.useEffect)(()=>{function Pi(){let ui=new Me.Z(Di=>{for(let Sn of Di)(Sn.target.offsetHeight>0||Sn.target.offsetWidth>0)&&(Xn(),ei.setSize("100%","100%"),ei.refresh())});return ui.observe(Ft.current.parentElement),ui}if(ei){const ui=Pi();return()=>{var Di,Sn;(Di=Ft.current)!=null&&Di.parentElement&&ui.unobserve((Sn=Ft.current)==null?void 0:Sn.parentElement)}}},[ei,Xn]),(0,Le.useEffect)(()=>{if(ei){let Pi=[];for(const[ui,Di]of Object.entries(Vi)){let Sn={[ui]:()=>{gi(Di)}};Pi.push(Sn),ei.addKeyMap(Sn)}return()=>{for(let ui of Pi)ei.removeKeyMap(ui)}}},[ei]),(0,Le.useEffect)(()=>{_i!==gr&&Zr(_i)},[_i]),(0,qo.Z)(()=>{if(!Bn&&Rr>0){let Pi=new Date().getTime(),ui=window.sessionStorage.getItem(Zn);Pi>=Rr+Cr&&(!ui||ui!==ws)&&(window.sessionStorage.setItem(Zn,ws),zn(!0))}},Cr),(0,Le.useEffect)(()=>{dn(an)},[ei,an]),(0,Le.useEffect)(()=>{ei&&At&&ei.focus()},[ei,At]),(0,Le.useEffect)(()=>{if(Io&&ei){let Pi=function(Di){let Sn=Di.target;if(yn.current){let ji=Sn.scrollTop/Sn.scrollHeight;yn.current.scrollTop=yn.current.scrollHeight*ji}};const ui=ei.getScrollerElement();return ui.addEventListener("scroll",Pi),()=>{ui.removeEventListener("scroll",Pi)}}},[ei,Io]),(0,Le.useEffect)(()=>{if(ei&&qn){let Pi=function(ui,Di){qn(ui,Di)};return ei.on("beforeChange",Pi),()=>{ei.off("beforeChange",Pi)}}},[ei,qn]),(0,Le.useEffect)(()=>{if(ei&&cn){let Pi=function(){cn(ei.getValue())};return ei.on("blur",Pi),()=>{ei.off("blur",Pi)}}},[ei,cn]);function yi(Pi,ui){var Di=Pi.getDoc(),Sn=Di.getCursor(),ji=Di.getLine(Sn.line),Wi=ji.charAt(Sn.ch-1),Ur=ji.lastIndexOf("@\u2581@",Sn.ch),Xr=ji.lastIndexOf("@\u2581\u2581@",Sn.ch),Jr=Ur>Xr?Ur:Xr,xo=Ur>Xr?3:4;if(or.indexOf(Wi)===-1)return null;if(console.log("change1:",ui,Pi,ji,Sn,Jr,Ur,Xr,Wi),Jr>=0&&Sn.ch-Jr<5){var Qo=Jr+xo;return Di.replaceRange("",{line:Sn.line,ch:Jr},{line:Sn.line,ch:Qo}),{line:Sn.line,ch:Qo}}return null}(0,Le.useEffect)(()=>{if(ei){let Pi=function(ui,Di){const Sn=ui.getValue();cs(Sn),uo(new Date().getTime()),ui.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),He&&(Fn?He(Sn,zr(Sn)):He(Sn))};return ei.on("change",Pi),()=>{ei.off("change",Pi)}}},[ei,He]),(0,Le.useEffect)(()=>{if(ei)if(sn==null)ei.setValue(""),cs("");else{const Pi=window.scrollY||window.pageYOffset;sn!==ei.getValue()&&(ei.setValue(sn),cs(sn),ei.setCursor(Ti?1:ei.lineCount(),0),window.scrollTo(0,Pi))}},[ei,sn]);const gi=(0,Le.useCallback)(Pi=>{const ui=ei.getCursor(),Di=ei.getSelection();let Sn=Di.split(`
|
|
|
`);switch(Pi){case"bold":return ei.replaceSelection("**"+Di+"**"),Di===""&&ei.setCursor(ui.line,ui.ch+2),ei.focus();case"italic":return ei.replaceSelection("*"+Di+"*"),Di===""&&ei.setCursor(ui.line,ui.ch+1),ei.focus();case"code":return ei.replaceSelection("`"+Di+"`"),Di===""&&ei.setCursor(ui.line,ui.ch+1),ei.focus();case"inline-latex":return yo("inline-latex"),ei.focus();case"latex":return ei.replaceSelection("```latex\n"+Di+"\n```"),ei.setCursor(ui.line+1,Di.length+1),ei.focus();case"line-break":return ei.replaceSelection(`<br/>
|
|
|
`),ei.focus();case"list-ul":return Di===""?ei.replaceSelection("- "+Di):ei.replaceSelection(Sn.map(ji=>ji===""?"":`- ${ji}`).join(`
|
|
|
`)),ei.focus();case"list-ol":return Di===""?ei.replaceSelection("1. "+Di):ei.replaceSelection(Sn.map((ji,Wi)=>ji===""?"":`${Wi+1}. ${ji}`).join(`
|
|
|
`)),ei.focus();case"add-null-ch":return Di===""&&ei.setCursor(ui.line,ui.ch),ei.replaceSelection(jo),ei.focus();case"add-signal":return Di===""&&ei.setCursor(ui.line,ui.ch),ei.replaceSelection(kn),ei.focus();case"add-multiple":return Di===""&&ei.setCursor(ui.line,ui.ch),ei.replaceSelection(or),ei.focus();case"inster-template-1":return Di===""&&ei.setCursor(ui.line,ui.ch),ei.replaceSelection(qe),ei.focus();case"eraser":return ei.setValue(""),ei.focus();case"trigger-watch":return dn(!Io),ei.focus();case"trigger-full-screen":return Zr(!gr),ei.focus();case Cn:yo(Cn);return;case Dr:yo(Dr);return;case Ki:yo(Ki);return;case Qi:yo(Qi);return;case"maths-latex":yo("maths-latex");return;case Yn:yo(Yn);return;case Ci:yo(Ci);return;default:throw new Error}},[ei,Io,gr]),Dn=(0,Le.useCallback)((Pi,ui)=>{var Di,Sn,ji,Wi,Ur,Xr;switch(yo(""),$i){case Cn:const{title:_s,link:As}=Pi;return ei.replaceSelection(`[${_s}](${As})`),ei.focus();case Dr:const{language:pn,content:ss}=Pi;return ei.replaceSelection(["```"+pn,ss,"```"].join(`
|
|
|
`)),ei.focus();case"maths-latex":for(var Jr=atob(Pi),xo=new Uint8Array(Jr.length),Qo=0;Qo<Jr.length;Qo++)xo[Qo]=Jr.charCodeAt(Qo);var Wo=new Blob([xo],{type:"image/png"});(0,bt.I)(Wo,pr=>{pr.id?ei.replaceSelection(``):(pr==null?void 0:pr.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":ei.replaceSelection("`$$"+Pi+"$$`");break;case Ki:case Qi:case vr:const{src:ps,alt:Ts}=Pi,mo=ui,Ns=(ji=(Sn=(Di=mo==null?void 0:mo.name)==null?void 0:Di.split("."))==null?void 0:Sn.pop)==null?void 0:ji.call(Sn);return((Wi=mo==null?void 0:mo.type)==null?void 0:Wi.indexOf("image"))>-1||!(mo!=null&&mo.type)?mo!=null&&mo.align||mo!=null&&mo.width?ei.replaceSelection(`<p style="text-align:${mo.align||"initial"}"><img width="${mo.width?mo.width+"%":"initial"}" src="${ps}" alt="${Ts||""}" /></p>`):ei.replaceSelection(`<img width="100%" src="${ps}" alt="${Ts||""}" />`):((Ur=mo==null?void 0:mo.type)==null?void 0:Ur.indexOf("video"))>-1?ei.replaceSelection(`<video width="100%" controls src="${ps}"></video>`):((Xr=mo==null?void 0:mo.type)==null?void 0:Xr.indexOf("pdf"))>-1?ei.replaceSelection(`<a href="${ps}?type=${mo.type}&disposition=inline" target="_blank">${mo.name}</a>`):Tn.includes(Ns)?ei.replaceSelection(`<a href="${ps}?type=office&disposition=inline" target="_blank">${mo.name}</a>`):ei.replaceSelection(`[${mo.name}](${ps})`),ei.focus();case Ci:const{row:Ss,col:Us,align:fo}=Pi;let Co=`
|
|
|
`;for(let pr=0;pr<Ss;pr++){let Gr=[],po=[];for(let Ro=0;Ro<Us;Ro++)pr===1&&po.push(vo[fo]),Gr.push(" ");pr===1&&(Co+=`| ${po.join(" | ")} |
|
|
|
`),Co+=`| ${Gr.join(Us===1?"":" | ")} |
|
|
|
`}return ei.replaceSelection(Co+`
|
|
|
`),ei.focus();default:throw new Error}},[ei,$i]),vt=(0,Le.useMemo)(()=>{switch($i){case Cn:return Le.createElement(lt,{callback:Dn,onCancel:Sr});case Dr:return Le.createElement(dt.Z,{callback:Dn,onCancel:Sr});case Ki:return Le.createElement(bt.Z,{callback:Dn,onCancel:Sr});case Yn:return Le.createElement(Be,{callback:Dn,onCancel:Sr});case Ci:return Le.createElement(mt,{callback:Dn,onCancel:Sr});case"maths-latex":return Le.createElement(hi,{showSaveButton:!0,callback:Dn});case"inline-latex":return Le.createElement(mi.Z,{showSaveButton:!0,callback:Dn});default:return null}},[$i]);function Sr(){yo("")}(0,Le.useEffect)(()=>{if(nn.current){let Pi=function(Ur){ji=!0,Wi=Ur.pageY},ui=function(){ji=!1},Di=function(Ur){if(ji){let Xr=Ur.pageY-Wi;Xr<0&&(Xr=0),Xr>300&&(Xr=300);let Jr=ot+Xr+"px";Yr(Jr)}},Sn=nn.current,ji=!1,Wi=0;return Sn.addEventListener("mousedown",Pi),document.addEventListener("mousemove",Di),document.addEventListener("mouseup",ui),()=>{Sn.removeEventListener("mousedown",Pi),document.removeEventListener("mousemove",Di),document.removeEventListener("mouseup",ui)}}},[ei,nn]),(0,Le.useEffect)(()=>{Yr(ot)},[ot]);const Er=In(Ve),no=In(to),io={width:Er,height:no},ro=(0,Le.useMemo)(()=>{if(Rr){let Pi=new Date(Rr),ui=Pi.getHours(),Di=Pi.getMinutes(),Sn=Pi.getSeconds();return ui=ui<10?"0"+ui:ui,Di=Di<10?"0"+Di:Di,Sn=Sn<10?"0"+Sn:Sn,`${ui}:${Di}:${Sn}`}return 0},[Rr]),zr=Pi=>{const ui=[];if(Fn){let Di=-1;Pi=Pi.replace(/(@▁▁@|@▁@)/g,function(Sn,ji,Wi){ui.push({multiLine:Sn!==kn})})}return ui};function Go(){window.sessionStorage.removeItem(Zn),zn(!1),uo(0)}function co(){zn(!1),uo(0),ei.setValue(window.sessionStorage.getItem(Zn))}(0,Le.useEffect)(()=>{Zi[$i]&&$i!==Qi&&$i!==Yn&&setTimeout(()=>{const Pi=document.getElementsByClassName("markdown-popup-form")[0],ui=window.innerWidth/2-Pi.offsetWidth/2,Di=window.innerHeight/2-Pi.offsetHeight/2;Ut(ui),jn(Di)},0)},[$i]);const br=Pi=>{Pi.preventDefault();const ui=Pi.clientX-ns,Di=Pi.clientY-en;document.body.onmousemove=Sn=>{let ji=Sn.clientX-ui,Wi=Sn.clientY-Di;const Ur=document.getElementsByClassName("markdown-popup-form")[0],Xr=window.innerWidth-Ur.offsetWidth,Jr=window.innerHeight-Ur.offsetHeight;ji=Math.max(0,Math.min(ji,Xr)),Wi=Math.max(0,Math.min(Wi,Jr)),ir(Sn.clientX,Sn.clientY,ui,Di)&&(Ut(ji),jn(Wi))},document.body.onmouseup=function(){document.body.onmousemove=null}},ir=(Pi,ui,Di,Sn)=>{const ji=document.body.clientHeight,Wi=document.body.clientWidth;return Pi<20&&Di>Pi||Pi>Wi-20&&Di<Pi||ui<20&&Sn>ui||ui>ji-20&&Sn<ui?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return Le.createElement(Le.Fragment,null,Le.createElement("div",{className:"markdown-editor-wrapper",ref:Yt},Le.createElement("div",{className:`markdown-editor-container ${lr} ${Io?"on-preview":""} ${Lt?"mini":""} ${gr?"full-screen":""}`,style:io},Le.createElement(Ae,{insertTemp:Ot,watch:Io,fullScreen:gr,showNullButton:rn,showNullProgramButton:Fn,onActionCallback:gi,hidetoolBar:vi,extraUse:jr}),Le.createElement("div",{className:"markdown-editor-body"},Le.createElement("div",{className:"codemirror-container"},Le.createElement("textarea",{ref:Ft,placeholder:li})),Io?Le.createElement("div",{ref:yn,className:"preview-container"},xn==="stex"&&Le.createElement(xe,{value:ws}),xn!=="stex"&&Le.createElement(he.Z,{disabledFill:bi,showProgramFill:Fn,value:ws})):null))),wi?Le.createElement("a",{ref:nn,className:"editor-resize"}):null,$i===Qi&&Le.createElement(Gt,{callback:Dn,onCancel:Sr}),$i===Yn&&Le.createElement(Be,{callback:Dn,onCancel:Sr}),Le.createElement(Oe.Z,null,Zi[$i]&&$i!==Qi&&$i!==Yn?Le.createElement(yt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:ns,top:en},title:Le.createElement("div",{style:{cursor:"move"},onMouseDown:br},Zi[$i]),open:!0,onCancel:Sr,footer:null,destroyOnClose:!0,width:$i===Yn?"1200px":null,height:$i===Yn?"80vh":null,className:"markdown-popup-form"},vt):null))}},70859:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return Ce},I:function(){return Oe}});var Le=De(91773),ye=De(2453),Fe=De(28802),Me=De(78957),Ee=De(37720),me=De(98813),be=De(85804),ve=De(15476),we=De(67294),ge=De(67294),he=Object.defineProperty,xe=Object.defineProperties,fe=Object.getOwnPropertyDescriptors,ue=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,oe=(Re,We,$e)=>We in Re?he(Re,We,{enumerable:!0,configurable:!0,writable:!0,value:$e}):Re[We]=$e,ie=(Re,We)=>{for(var $e in We||(We={}))ee.call(We,$e)&&oe(Re,$e,We[$e]);if(ue)for(var $e of ue(We))z.call(We,$e)&&oe(Re,$e,We[$e]);return Re},se=(Re,We)=>xe(Re,fe(We));const{useForm:le}=Le.default,Se={width:280,marginRight:10},pe={labelCol:{span:5},wrapperCol:{span:19}};var Ce=({callback:Re,onCancel:We})=>{const[$e]=le();let Je=(0,we.useRef)();function pt(ct){Je.current.width=$e.getFieldValue("width"),Je.current.align=$e.getFieldValue("align"),Re(ct,Je.current)}function St(ct,wt){if(ct.status===-1){ye.ZP.error(ct.message);return}$e.setFieldsValue({src:`/api/attachments/${ct.id}`,type:wt.type})}function Mt(ct){let wt=ct.target.files[0];Je.current=wt,Oe(wt,St)}return ge.createElement(Le.default,se(ie({form:$e},pe),{className:"upload-image-panel",onFinish:pt,style:{width:470,overflow:"hidden"}}),ge.createElement(Le.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},ge.createElement("div",{className:"flex-container"},ge.createElement(Le.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},ge.createElement(Fe.default,{style:Se})),ge.createElement(Ae,{onFileChange:Mt}))),ge.createElement(Le.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},ge.createElement(Fe.default,{style:{width:264}})),ge.createElement(Le.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},ge.createElement(Me.Z,null,ge.createElement(Le.default.Item,{name:"width",style:{margin:0}},ge.createElement(Ee.Z,{style:{width:264}})),ge.createElement("span",{className:"ml8"},"%"))),ge.createElement(Le.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},ge.createElement(me.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"}]})),ge.createElement("aside",null,ge.createElement(Le.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},ge.createElement(be.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ge.createElement(be.ZP,{type:"default",onClick:We},"\u53D6\u6D88"))))};function Ae({onFileChange:Re}){return ge.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",ge.createElement("input",{type:"file",onChange:Re}))}function Oe(Re,We){if(!Re)throw new String("\u6CA1\u6709\u6587\u4EF6");let $e=new FormData;$e.append("editormd-image-file",Re),$e.append("file_param_name","editormd-image-file"),$e.append("byxhr","true");var Je=new window.XMLHttpRequest;Je.withCredentials=!0,Je.addEventListener("load",function(pt){We(JSON.parse(pt.target.responseText),Re)},!1),Je.addEventListener("error",function(pt){console.error(pt)},!1),Je.open("POST",`${ve.KI}/api/attachments.json`),Je.send($e)}},76621:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return Fe}});var Le=De(67294),ye=De(73935);class Fe extends Le.Component{constructor(Ee){super(Ee);const me=window.document;this.node=me.createElement("div"),me.body.appendChild(this.node)}render(){const{children:Ee}=this.props;return(0,ye.createPortal)(Ee,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},36295:function(_n,hn,De){"use strict";De.d(hn,{SV:function(){return Dt},ZP:function(){return Gt}});var Le=De(67294),ye=De(91033);const Fe={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"]},Ee={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(`
|
|
|
`)}]},me={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 ve=De(84204),we=De.n(ve),ge=(on,Jt,jt)=>new Promise((ut,ze)=>{var je=nt=>{try{ht(jt.next(nt))}catch(Ke){ze(Ke)}},it=nt=>{try{ht(jt.throw(nt))}catch(Ke){ze(Ke)}},ht=nt=>nt.done?ut(nt.value):Promise.resolve(nt.value).then(je,it);ht((jt=jt.apply(on,Jt)).next())});const he={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"]}},xe=(on,Jt,jt,ut)=>{const ze=Jt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:jt.lineNumber,endColumn:jt.column});return Array.from(new Set(ze.match(/\b\w{2,}\b/g)||[])).map(it=>({label:it,kind:on.languages.CompletionItemKind.Text,insertText:it,range:ut}))},fe=(on,Jt,jt,ut)=>{on.languages.registerCompletionItemProvider(Jt,{provideCompletionItems(ze,je){const it=ze.getWordUntilPosition(je),ht={startLineNumber:je.lineNumber,endLineNumber:je.lineNumber,startColumn:it.startColumn,endColumn:it.endColumn},nt=ze.getLineContent(je.lineNumber).substring(it.startColumn-2,it.endColumn);return{suggestions:[...xe(on,ze,je,ht),...jt.map(Be=>({label:Be,kind:on.languages.CompletionItemKind.Keyword,documentation:Be,insertText:Be,insertTextRules:on.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ht})),...ut.map(Be=>({label:Be.label,kind:on.languages.CompletionItemKind.Snippet,documentation:Be.content,insertText:nt.startsWith("#")?Be.content.replace(/#/,""):Be.content,insertTextRules:on.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ht}))]}}})};var ue=on=>{he.languages.forEach(Jt=>{on.languages.registerDocumentFormattingEditProvider(Jt,{provideDocumentFormattingEdits(jt){return ge(this,null,function*(){const ut=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:ut}]})}})}),fe(on,"java",Me.keywords,Me.quickKey),fe(on,"cpp",Ee.keywords,Ee.quickKey),fe(on,"c",Fe.keywords,[]),fe(on,"python",me.keywords,me.quickKey),fe(on,"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=(on,Jt,jt)=>Jt in on?z(on,Jt,{enumerable:!0,configurable:!0,writable:!0,value:jt}):on[Jt]=jt,ie=(on,Jt,jt)=>oe(on,typeof Jt!="symbol"?Jt+"":Jt,jt);const se=class mx{constructor(Jt,jt,ut){this.placeholder=Jt,this.editor=jt,this.monaco=ut,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)}};ie(se,"ID","editor.widget.placeholderHint");var Se=se,pe=De(84144),Ce=De(2453),Ae=De(83062),Oe=De(96486),Re=De(33054),We=De(74855),$e=Object.defineProperty,Je=Object.defineProperties,pt=Object.getOwnPropertyDescriptors,St=Object.getOwnPropertySymbols,Mt=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,wt=(on,Jt,jt)=>Jt in on?$e(on,Jt,{enumerable:!0,configurable:!0,writable:!0,value:jt}):on[Jt]=jt,ft=(on,Jt)=>{for(var jt in Jt||(Jt={}))Mt.call(Jt,jt)&&wt(on,jt,Jt[jt]);if(St)for(var jt of St(Jt))ct.call(Jt,jt)&&wt(on,jt,Jt[jt]);return on},$t=(on,Jt)=>Je(on,pt(Jt)),st=(on,Jt)=>{var jt={};for(var ut in on)Mt.call(on,ut)&&Jt.indexOf(ut)<0&&(jt[ut]=on[ut]);if(on!=null&&St)for(var ut of St(on))Jt.indexOf(ut)<0&&ct.call(on,ut)&&(jt[ut]=on[ut]);return jt},et=(on,Jt,jt)=>new Promise((ut,ze)=>{var je=nt=>{try{ht(jt.next(nt))}catch(Ke){ze(Ke)}},it=nt=>{try{ht(jt.throw(nt))}catch(Ke){ze(Ke)}},ht=nt=>nt.done?ut(nt.value):Promise.resolve(nt.value).then(je,it);ht((jt=jt.apply(on,Jt)).next())});function lt(on){return/^\d+$/.test(on)?`${on}px`:on}function dt(){}let bt=!1;const yt={"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 Vt(on=[]){let Jt=on;if(Array.isArray(on)){for(let jt=0;jt<on.length;jt++){let ut=yt[on[jt]];if(ut)return ut}return Jt[0]}return yt[Jt]||Jt}let Kt=null;const gn=()=>et(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(on){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",on)}});var Gt=on=>{var Jt=on,{width:jt="100%",height:ut="100%",value:ze,language:je="javascript",style:it={},options:ht={},overrideServices:nt={},theme:Ke="vs-dark",onEditBlur:Be,isCopy:Ue=!1,onSave:rt,autoHeight:Ze=!1,forbidCopy:Xe=!1,onChange:mt=dt,editorDidMount:Rt=dt,onFocus:vn=dt,onBreakPoint:An=dt,breakPointValue:Mn=[],filename:hi="educoder.txt",errorLine:mi,errorContent:si="",highlightLine:Cn,openBreakPoint:Ki=!1,placeholder:Yn="",showMiniMap:Qi=!0}=Jt,vr=st(Jt,["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 Dr=(0,Le.useRef)(),Ci=(0,Le.useRef)({}),kr=(0,Le.useRef)(),vo=(0,Le.useRef)(),qo=(0,Le.useRef)([]),Do=(0,Le.useRef)(!1),Oo=(0,Le.useRef)(),Cr=(0,Le.useRef)(),jo=(0,Le.useRef)(!1),[or,kn]=(0,Le.useState)(!1);function qe(){let Ot;return Dr.current&&(Ot=new ye.Z(xn=>{for(let Zn of xn)(Zn.target.offsetHeight>0||Zn.target.offsetWidth>0)&&Ci.current.instance.layout()}),Ot.observe(Dr.current)),Ot}function Tn(){Ce.ZP.warning({content:decodeURIComponent(ee),key:"monaco-editor-tip"})}const In=()=>{let Ot=Ci.current.instance;if(ze!=null&&Ot&&or){const xn=Ot.getModel();xn&&ze!==xn.getValue()&&(bt=!0,xn.setValue(ze),Ot.layout(),bt=!1)}};(0,Le.useEffect)(()=>{const Ot=Re.Z.subscribe("formatDocument",xn=>{var Zn;let wi=Ci.current.instance;(Zn=wi==null?void 0:wi.getAction)==null||Zn.call(wi,"editor.action.formatDocument").run()});return window.updateMonacoValue=xn=>{mt(xn)},Ot},[]),(0,Le.useEffect)(()=>{var Ot;let xn=Ci.current.instance;vo.current&&clearTimeout(vo.current),vo.current=setTimeout(()=>{In()},500),ze&&(ze!=null&&ze.length)&&((Ot=xn==null?void 0:xn.updateOptions)==null||Ot.call(xn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(ze.split(/\r\n|\r|\n/g).length))+3,5)}))},[ze,or,Ci.current]),(0,Le.useEffect)(()=>{if(mi&&Ci.current&&Ci.current.instance){let xn=Ci.current.instance;xn.changeViewZones(function(Zn){var wi=document.createElement("div");wi.style.padding="10px 20px",wi.style.width="calc(100% - 20px)",wi.className="my-error-line-wrp",wi.innerHTML=si,Zn.addZone({afterLineNumber:mi||11,heightInLines:3,domNode:wi})});var Ot={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}};xn.addOverlayWidget(Ot),xn.revealPositionInCenter({lineNumber:20,column:1})}},[mi,Ci.current,or]);const zi=(Ot="",xn)=>{if(!Ot||Ot.trim()==="")return!0;const wi=Ci.current.instance.getModel().getLineTokens(xn);let Bn=!1;for(let rn=0;rn<2;rn++)wi.getStandardTokenType(rn)===1&&(Bn=!0);return Bn};(0,Le.useEffect)(()=>{var Ot;const xn=(Ot=Ci.current)==null?void 0:Ot.instance;if(xn&&or&&Xe){const Zn=xn.onDidBlurEditorWidget(()=>{jo.current=!1}),wi=xn.onDidFocusEditorText(()=>{jo.current=!0});return()=>{Zn.dispose(),wi.dispose()}}},[Ci.current,or,Xe]),(0,Le.useEffect)(()=>{var Ot;if((Ot=Ci.current)!=null&&Ot.instance&&or&&Ki){let xn=Ci.current.instance,Zn=xn.getModel();if(!Zn)return;(()=>{var Ti;let bi=[],li=[];const dr=Zn.getAllDecorations();for(let ei of dr)ei.options.className==="highlighted-line"&&(bi.push((Ti=ei==null?void 0:ei.range)==null?void 0:Ti.startLineNumber),li.push(ei==null?void 0:ei.id));if(Cn===bi[0])return;Zn.deltaDecorations(li,[]);const jr=Zn.getLineCount();Cn&&Cn<=jr&&(xn.deltaDecorations([],[{range:new Kt.Range(Cn,1,Cn,Zn.getLineMaxColumn(Cn)),options:{isWholeLine:!0,className:"highlighted-line"}}]),xn.revealLineInCenter(Cn))})();const Bn=(Ti=!1)=>{var bi;let li=[],dr=[];const jr=Zn.getAllDecorations();for(let ei of jr)ei.options.linesDecorationsClassName==="breakpoints-select"&&(li.push((bi=ei==null?void 0:ei.range)==null?void 0:bi.startLineNumber),dr.push(ei==null?void 0:ei.id));if(Ti)return{lines:li,ids:dr};An(li)},rn=Ti=>et(void 0,null,function*(){let bi={range:new Kt.Range(Ti,1,Ti,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Zn.deltaDecorations([],[bi]),Bn()}),Fn=Ti=>et(void 0,null,function*(){let bi=[];const li=xn.getLineDecorations(Ti);for(let dr of li)dr.options.linesDecorationsClassName==="breakpoints-select"&&bi.push(dr.id);yield Zn.deltaDecorations(bi,[]),Bn()}),vi=Ti=>{let bi=xn.getLineDecorations(Ti);for(let li of bi)if(li.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Oe.isEqual)(Mn,Bn(!0).lines)){Zn.deltaDecorations(Bn(!0).ids,[]);const Ti=Mn.map(bi=>({range:new Kt.Range(bi,1,bi,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Zn.deltaDecorations([],Ti)}const _i=xn.onDidChangeModelContent(Ti=>{let bi=xn.getPosition();if(bi){let li=bi.lineNumber;clearTimeout(Cr.current),Cr.current=setTimeout(()=>{zi(Zn.getLineContent(li),li)?Fn(li):vi(li)?(Fn(li),rn(li)):Bn()},100)}}),cn=xn.onMouseDown(Ti=>{var bi,li,dr;if(Ti.target.detail&&((dr=(li=(bi=Ti.target)==null?void 0:bi.element)==null?void 0:li.className)!=null&&dr.includes("line-numbers"))){let jr=Ti.target.position.lineNumber;if(zi(Zn.getLineContent(jr),jr))return;vi(jr)?Fn(jr):rn(jr)}}),qn=Ti=>{let bi={range:new Kt.Range(Ti,1,Ti,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};qo.current=xn.deltaDecorations(qo.current,[bi])},Ii=()=>{qo.current=xn.deltaDecorations(qo.current,[])},lr=xn.onMouseMove(Ti=>{var bi,li,dr;if(Ii(),Ti.target.detail&&((dr=(li=(bi=Ti.target)==null?void 0:bi.element)==null?void 0:li.className)!=null&&dr.includes("line-numbers"))){let jr=Ti.target.position.lineNumber;if(zi(Zn.getLineContent(jr),jr))return;qn(jr)}}),_r=xn.onMouseLeave(()=>{Ii()});return()=>{_i.dispose(),cn.dispose(),lr.dispose(),_r.dispose()}}},[Ci.current,or,Mn,Cn,Ki,je]),(0,Le.useEffect)(()=>{var Ot;(Ot=Ci.current)!=null&&Ot.instance&&Ki&&Ci.current.instance.setPosition({lineNumber:0,column:0})},[Cn]);function Gi(){let Ot=Ci.current.instance;if(Ot){const xn=Ot.getSelection(),Zn=Ci.current.pastePos||{},wi=new Kt.Range(Zn.startLineNumber||xn.endLineNumber,Zn.startColumn||xn.endColumn,Zn.endLineNumber||xn.endLineNumber,Zn.endColumn||xn.endColumn);setTimeout(()=>{Ot.executeEdits("",[{range:wi,text:""}])},300)}}function Vi(Ot){(window.navigator.platform.match("Mac")?Ot.metaKey:Ot.ctrlKey)&&Ot.keyCode==83&&(Ot.preventDefault(),rt())}const Zi=()=>{if(Ze&&Ci.current.instance){const Ot=Ci.current.instance.getContentHeight();At(Ot<ut?ut:Ot)}else At(ut)};function qr(Ot){var xn=document.createEvent("MouseEvents");xn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Ot.dispatchEvent(xn)}const sn=Ot=>{if(!jo.current)return;const{keyCode:xn,ctrlKey:Zn,metaKey:wi,target:Bn,type:rn}=Ot;return(rn==="paste"||(xn===67||xn===86)&&(wi||Zn))&&Bn.nodeName==="TEXTAREA"&&(Tn(),Ot.preventDefault()),!1};function He(Ot,xn){var Zn=window.URL||window.webkitURL||window,wi=new Blob([xn]),Bn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Bn.href=Zn.createObjectURL(wi),Bn.download=Ot,qr(Bn)}(0,Le.useEffect)(()=>{Zi()},[Zi]),(0,Le.useEffect)(()=>{Dr.current&&!or&&Promise.all([De.e(5552),De.e(9651)]).then(De.bind(De,55826)).then(Ot=>{try{Kt=Ot,Ci.current.instance=Kt.editor.create(Dr.current,{value:ze,language:Vt(je),theme:Ke,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Qi||!1}},nt);const xn=Ci.current.instance;let Bn=[...pe.BH._menuItems].find(_i=>_i[0]._debugName=="EditorContext")[1],rn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Fn=(_i,cn)=>{var qn,Ii;let lr=_i._first;do cn.includes((Ii=(qn=lr.element)==null?void 0:qn.command)==null?void 0:Ii.id)&&_i._remove(lr);while(lr=lr.next)};if(Rt(xn,Kt),setTimeout(()=>{Zi(),Ci.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{He(hi||"educoder.txt",xn.getValue())}})},500),Ci.current.subscription=xn.onDidChangeModelContent(_i=>{Do.current?clearTimeout(Oo.current):(Zi(),mt(xn.getValue(),_i)),Oo.current=setTimeout(()=>{Do.current=!1},500)}),window.Monaco||ue(Kt,Vt(je)),Xe&&(Fn(Bn,rn),Dr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",sn),window.removeEventListener("paste",sn),window.addEventListener("keydown",sn),window.addEventListener("paste",sn)),window.Monaco=Kt,Be&&xn.onDidBlurEditorWidget(()=>{Be(xn.getValue())}),vn&&xn.onDidFocusEditorText(()=>{Xe&&gn(),vn(xn.getValue())}),Xe){gn();try{xn.onDidPaste(_i=>{const cn=xn.getSelection(),qn=Ci.current.pastePos||{},Ii=new Kt.Range(qn.startLineNumber||cn.endLineNumber,qn.startColumn||cn.endColumn,qn.endLineNumber||cn.endLineNumber,qn.endColumn||cn.endColumn);xn.executeEdits("",[{range:_i.range,text:""}])})}catch(_i){}}let vi=qe();return Yn&&typeof Yn=="string"&&new Se(Yn,xn,Kt),kn(!0),()=>{const _i=Ci.current.instance;_i.dispose();const cn=_i.getModel();cn&&cn.dispose(),Ci.current.subscription&&Ci.current.subscription.dispose(),vi.unobserve(Dr.current)}}catch(xn){}})},[]),(0,Le.useEffect)(()=>{if(Ci.current.instance&&or)return document.addEventListener("keydown",Vi,!1),()=>{document.removeEventListener("keydown",Vi)}},[rt,or]),(0,Le.useEffect)(()=>{let Ot=Ci.current.instance;if(Ot&&or){let xn=Vt(je);Kt.editor.setModelLanguage(Ot.getModel(),xn)}},[je,or]),(0,Le.useEffect)(()=>{Ci.current.instance&&or&&Kt.editor.setTheme(Ke)},[Ke,or]),(0,Le.useEffect)(()=>{let Ot=Ci.current.instance;kr.current=ht,Ot&&or&&(Ot.updateOptions(ft({},ht)),setTimeout(()=>{Ot.getModel().updateOptions(ft({},ht))},200))},[JSON.stringify(ht),or]),(0,Le.useEffect)(()=>{let Ot=Ci.current.instance;Ot&&or&&Ot.layout()},[jt,ut,or]);const[Ve,ot]=(0,Le.useState)(lt(jt)),[Lt,At]=(0,Le.useState)(lt(ut)),an=$t(ft({},it),{width:Ve,height:Lt,position:"relative"});return Le.createElement("div",{className:"my-monaco-editor",ref:Dr,style:an},Ue&&Le.createElement(We.CopyToClipboard,{text:ze,onCopy:()=>Ce.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:on="100%",height:Jt="100%",original:jt,modified:ut,language:ze,options:je={}}){const it=(0,Le.useRef)(),[ht,nt]=(0,Le.useState)(null);function Ke(Ze){let Xe;return it.current&&(Xe=new ye.Z(mt=>{for(let Rt of mt)(Rt.target.offsetHeight>0||Rt.target.offsetWidth>0)&&Ze.layout()}),Xe.observe(it.current)),Xe}(0,Le.useEffect)(()=>(it.current&&Promise.all([De.e(5552),De.e(9404)]).then(De.bind(De,50048)).then(Ze=>{Kt=Ze;const Xe=Kt.editor.createDiffEditor(it.current,$t(ft({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},je),{wordWrap:!0}));nt(Xe);let mt=Ke(Xe);return()=>{Xe.dispose();const Rt=Xe.getModel();Rt&&Rt.dispose(),mt.unobserve(it.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,Le.useEffect)(()=>{ht&&ht.setModel({original:Kt.editor.createModel(jt,ze),modified:Kt.editor.createModel(ut,ze)})},[jt,ut,ze,ht]);const Be=lt(on),Ue=lt(Jt),rt={width:Be,height:Ue};return Le.createElement("div",{className:"my-diff-editor",ref:it,style:rt})}},21434:function(_n,hn,De){"use strict";var Le=De(12867),ye=De(88044),Fe=De(59637),Me=De(67294);const Ee=ye.default.Option;hn.Z=({isTheoretical:me,onFontSizeChange:be,cmFontSize:ve,cmCodeMode:we,autoFormat:ge,onCodeModeChange:he,onTabToSpace:xe,onAutoFormat:fe,formatDocument:ue,className:ee="",tabToSpace:z,children:oe,code_editor:ie,challenge:se,shixun_environment_id:le,shixun_environments:Se})=>{var pe;const Ce={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"},Ae=(pe=Se==null?void 0:Se.find(Oe=>Oe.shixun_environment_id===le))==null?void 0:pe.program_language;return console.log("----",Ae,Se,le,ie),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(ye.default,{bordered:!1,size:"small",value:we,onChange:he},Me.createElement(Ee,{value:"vs"},"\u767D\u8272\u80CC\u666F"),Me.createElement(Ee,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!me&&Me.createElement(Me.Fragment,null,Me.createElement("div",{className:"file-item"},Me.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),Me.createElement(ye.default,{bordered:!1,size:"small",value:ve,onChange:be},Me.createElement(Ee,{value:12},"12px"),Me.createElement(Ee,{value:14},"14px"),Me.createElement(Ee,{value:16},"16px"),Me.createElement(Ee,{value:18},"18px"),Me.createElement(Ee,{value:20},"20px"),Me.createElement(Ee,{value:22},"22px"))),Me.createElement("div",{className:"file-item"},Me.createElement("b",null,"Tab\u8F6C\u6362"),Me.createElement(Fe.Z,{checked:z,onChange:xe})),Me.createElement("div",{className:"file-item",onClick:ue},Me.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!me&&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),!me&&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,Ce[se==null?void 0:se.difficulty])),Me.createElement("div",{className:"file-item"},Me.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),Me.createElement("span",null,ie==null?void 0:ie.name)),Me.createElement("div",{className:"file-item"},Me.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),Me.createElement("span",null,ie!=null&&ie.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},99914:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return ye}});var Le=De(67294);function ye(Fe,Me){const Ee=(0,Le.useRef)();(0,Le.useEffect)(()=>{Ee.current=Fe}),(0,Le.useEffect)(()=>{function me(){Ee.current()}if(Me!==null){let be=setInterval(me,Me);return()=>clearInterval(be)}},[Me])}},72971:function(_n,hn,De){"use strict";De.d(hn,{Im:function(){return We},ZP:function(){return ct},gZ:function(){return St}});var Le=De(67294),ye=De(28802),Fe=De(85804),Me=De(42922),Ee=De(53978),me=De(94189),be=De(19575),ve=De(7621),we=De(65226),ge=De(28706),he=De(38658),xe=De(12320),fe=De(94184),ue=De.n(fe),ee=De(67294),z=Object.defineProperty,oe=Object.defineProperties,ie=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,le=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,pe=(wt,ft,$t)=>ft in wt?z(wt,ft,{enumerable:!0,configurable:!0,writable:!0,value:$t}):wt[ft]=$t,Ce=(wt,ft)=>{for(var $t in ft||(ft={}))le.call(ft,$t)&&pe(wt,$t,ft[$t]);if(se)for(var $t of se(ft))Se.call(ft,$t)&&pe(wt,$t,ft[$t]);return wt},Ae=(wt,ft)=>oe(wt,ie(ft));const{TextArea:Oe}=ye.default,Re={visible:!1,tabIndex:"0"},We={[me.h.HIDE_COMPILE_STATUS]:"\u6682\u4E0D\u652F\u6301\u67E5\u770B",[me.h.NOMATCH]:"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",[me.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 $e=(wt=>(wt[wt.SET_VISIBLE=0]="SET_VISIBLE",wt[wt.SET_TABINDEX=1]="SET_TABINDEX",wt))($e||{});function Je(wt,ft){switch(ft.type){case 0:return Ae(Ce({},wt),{visible:ft.payload});case 1:return Ae(Ce({},wt),{tabIndex:ft.payload});default:throw new Error}}function pt({value:wt,className:ft}){const[$t,st]=(0,Le.useState)(!1),et=(0,Le.useRef)(),lt=(0,Le.useRef)();return(0,Le.useEffect)(()=>{$t&&(lt.current.reset(),lt.current.write((0,ge.pp)(wt||"")))},[wt,$t]),(0,Le.useEffect)(()=>{var dt,bt,yt,Vt;if(et.current){lt.current=new xe.Terminal({fontSize:14,disableStdin:!0}),lt.current.open(et.current);const Kt=et.current.offsetWidth-14,gn=((Vt=(yt=(bt=(dt=lt.current)==null?void 0:dt._core)==null?void 0:bt._renderService)==null?void 0:yt.dimensions)==null?void 0:Vt.actualCellWidth)||9.5,Gt=Math.ceil(Kt/gn);lt.current.resize(Gt,8),st(!0)}},[]),ee.createElement("div",{ref:et,className:ue()("XtermText-valueRef",ft)})}function St(wt){const{status:ft,error_msg:$t,output:st,input:et,expected_output:lt,is_file:dt,input_file_url:bt,output_file_url:yt,expected_output_file_url:Vt}=wt;let Kt=null;const gn={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(ft){case me.h.NOMATCH:Kt=ee.createElement(ee.Fragment,null,ee.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!dt&&ee.createElement(pt,{className:"mb10",value:et}),dt&&ee.createElement("div",{style:gn},ee.createElement("a",{onClick:()=>(0,ge.LR)(bt,et)},et)),ee.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!dt&&ee.createElement(pt,{className:"mb10",value:st&&be.Base64.decode(st)||""}),dt&&ee.createElement("div",{style:gn},ee.createElement("a",{onClick:()=>(0,ge.LR)(yt,st)},st)),ee.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!dt&&ee.createElement(pt,{className:"mb10",value:lt&&be.Base64.decode(lt)||""}),dt&&ee.createElement("div",{style:gn},ee.createElement("a",{onClick:()=>(0,ge.LR)(Vt,lt)},lt)));break;case me.h.EXECUTEFAILURE:Kt=ee.createElement(ee.Fragment,null,ee.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!dt&&ee.createElement(we.Z,{value:et,style:gn}),dt&&ee.createElement("div",{style:gn},ee.createElement("a",{onClick:()=>(0,ge.LR)(bt,et)},et)),ee.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ee.createElement("pre",{className:"error"},be.Base64.decode($t)));break;case me.h.COMPILEFAILURE:Kt=ee.createElement(ee.Fragment,null,ee.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!dt&&ee.createElement(we.Z,{value:et,style:gn}),dt&&ee.createElement("div",{style:gn},ee.createElement("a",{onClick:()=>(0,ge.LR)(bt,et)},et)),ee.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ee.createElement("pre",{className:"error"},be.Base64.decode($t)));break;case me.h.PODFAILURE:Kt=ee.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case me.h.TIMEOUT:Kt=ee.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return ee.createElement(ee.Fragment,null," ",Kt," ")}function Mt(wt){const{status:ft,error_msg:$t,execute_time:st,output:et,input:lt,expected_output:dt,is_file:bt,input_file_url:yt,output_file_url:Vt,expected_output_file_url:Kt}=wt;let gn=null;switch(ft){case me.h.OK:gn=ee.createElement(ee.Fragment,null,ee.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",st,"\u79D2"),ee.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),ee.createElement("pre",null,be.Base64.decode(et)));break;case me.h.NOMATCH:gn=ee.createElement(ee.Fragment,null,ee.createElement("p",null,"\u8F93\u5165\uFF1A",ee.createElement("pre",null,lt)),ee.createElement("p",null,"\u8F93\u51FA\uFF1A",et&&be.Base64.decode(et)),ee.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",dt&&be.Base64.decode(dt)));break;case me.h.EXECUTEFAILURE:gn=ee.createElement(ee.Fragment,null,ee.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",ee.createElement("pre",null,lt)),ee.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ee.createElement("pre",{className:"error"},be.Base64.decode($t)));break;case me.h.COMPILEFAILURE:gn=ee.createElement(ee.Fragment,null,ee.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",ee.createElement("pre",null,lt)),ee.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ee.createElement("pre",{className:"error"},be.Base64.decode($t)));break;case me.h.PODFAILURE:gn=ee.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case me.h.TIMEOUT:gn=ee.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return ee.createElement(ee.Fragment,null," ",gn," ")}var ct=({id:wt,is_file:ft,input:$t,debuging:st,submitting:et,executingMessage:lt,debugResult:dt,onChangeInput:bt,onDebugCode:yt,onSubmitCode:Vt})=>{const[Kt,gn]=(0,Le.useReducer)(Je,Re),{visible:Gt,tabIndex:Dt}=Kt;(0,Le.useEffect)(()=>{gn({type:0,payload:!1})},[wt]);function on(ze){let je=ze.target.id;gn({type:1,payload:je})}function Jt(){gn({type:0,payload:!Gt})}const jt=(0,Le.useMemo)(()=>{if(dt){const{status:ze}=dt;return ee.createElement(ee.Fragment,null,Mt(dt))}return null},[dt]);function ut(){gn({type:0,payload:!0}),gn({type:1,payload:"1"}),yt()}return ee.createElement("div",{className:"test-case-panel"},ee.createElement("div",{className:`test-case-panel-body ${Gt?"active":""}`},ee.createElement("ul",{className:"s-navs"},ee.createElement("li",null,ee.createElement("a",{className:"active"},"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"))),ee.createElement(he.Z,{leftTitle:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B",rightTitle:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C",style:{height:240},leftNode:ee.createElement(Oe,{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:ft?"":$t,onChange:bt}),rightNode:st?ee.createElement(ve.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):dt?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 ${Gt?"up":""}`,onClick:Jt},Gt?ee.createElement(Me.Z,null):ee.createElement(Ee.Z,null)),ee.createElement("footer",{className:"footer"},ee.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),ee.createElement("div",{className:"flex-container"},ee.createElement(Fe.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),ee.createElement(Fe.ZP,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),ee.createElement(Fe.ZP,{className:"btn-green",type:"ghost",loading:st,onClick:ut},"\u8C03\u8BD5\u4EE3\u7801"),ee.createElement(Fe.ZP,{type:"primary",className:"custom-ant-disabled",loading:et,disabled:et,onClick:()=>{gn({type:0,payload:!1}),Vt()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},11624:function(_n,hn,De){"use strict";De.r(hn),De.d(hn,{default:function(){return Xi}});var Le=De(67294),ye=De(53555),Fe=De(32693),Me=De(35973),Ee=De(55054),me=De(2453),be=De(62844),ve=De(74330),we=De(88044),ge=De(33227),he=De(60076),xe=De(11320),fe=De(55304),ue=De(95012),ee=De(36295),z=De(76621),oe=De(40471),ie=De(21434),se=De(67294),le=Object.defineProperty,Se=Object.defineProperties,pe=Object.getOwnPropertyDescriptors,Ce=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,Re=(kt,Wt,qt)=>Wt in kt?le(kt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):kt[Wt]=qt,We=(kt,Wt)=>{for(var qt in Wt||(Wt={}))Ae.call(Wt,qt)&&Re(kt,qt,Wt[qt]);if(Ce)for(var qt of Ce(Wt))Oe.call(Wt,qt)&&Re(kt,qt,Wt[qt]);return kt},$e=(kt,Wt)=>Se(kt,pe(Wt));const Je={theme:(0,oe.G)("cmCodeMode","vs-dark"),fontSize:(0,oe.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,oe.G)("cmTabToSpace",!0)};var pt=(kt=>(kt[kt.set_font_size=0]="set_font_size",kt[kt.set_theme=1]="set_theme",kt[kt.on_tab_to_space=2]="on_tab_to_space",kt[kt.set_show_editor_setting=3]="set_show_editor_setting",kt))(pt||{});function St(kt,Wt){switch(Wt.type){case 3:return $e(We({},kt),{showEditorSetting:Wt.payload});case 1:return $e(We({},kt),{theme:Wt.payload});case 0:return $e(We({},kt),{fontSize:Wt.payload});case 2:return $e(We({},kt),{tabToSpace:Wt.payload});default:throw new Error}}var Mt=({isLoading:kt,value:Wt,onChange:qt,language:ki,onUpdateCode:pi,ActionBarRender:Qn=Vn=>se.createElement(ct,{onShowCodeSetting:Vn})})=>{const[Vn,Hn]=(0,Le.useReducer)(St,Je),{theme:En,fontSize:ri,showEditorSetting:Yi,tabToSpace:Oi}=Vn,er=(0,Le.useRef)(),Hi=(0,Le.useRef)(),sr={onFontSizeChange:So=>{Hn({type:0,payload:So}),(0,oe.t)("cmFontSize",So)},tabToSpace:Oi,cmFontSize:ri,className:"oj",cmCodeMode:En,onTabToSpace:So=>{Hn({type:2,payload:So}),(0,oe.t)("cmTabToSpace",So)},onCodeModeChange:So=>{Hn({type:1,payload:So}),(0,oe.t)("cmCodeMode",So)}};function tr(){Hn({type:3,payload:!1})}function so(){Hn({type:3,payload:!0})}const Or={value:Wt,language:ki,theme:En,height:"calc(100% - 56px)",options:{fontSize:ri,insertSpaces:Oi},onChange:So=>{qt(So),Hi.current=So,clearTimeout(er.current),er.current=setTimeout(()=>{pi(Hi.current)},1e4)},onEditBlur:So=>{Hi.current&&pi(Hi.current)}};return se.createElement(Le.Fragment,null,se.createElement("div",{className:"code-panel-container"},Qn(so),!kt&&se.createElement(ee.ZP,We({},Or))),se.createElement(z.Z,null,se.createElement(ue.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:Yi,onClose:tr},se.createElement(ie.Z,We({},sr)))))};function ct({onShowCodeSetting:kt}){return se.createElement("div",{className:"action-bar"},se.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),se.createElement("a",{onClick:kt},se.createElement("i",{className:"iconfont icon-shezhi"})))}var wt=De(19575),ft=De(77969),$t=De(72971),st=De(28802),et=De(91773),lt=De(85804);const{TextArea:dt}=st.default,bt=5e3;var yt=({callback:kt,onCancel:Wt,notes:qt})=>{function ki(pi){kt(pi)}return Le.createElement(et.default,{className:"note-form-panel",onFinish:ki,initialValues:{notes:qt}},Le.createElement(et.default.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:bt,message:`\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A${bt}`}]},Le.createElement(dt,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),Le.createElement(et.default.Item,{style:{textAlign:"right"}},Le.createElement(lt.ZP,{type:"ghost",onClick:Wt,style:{marginRight:10}}," \u53D6\u6D88 "),Le.createElement(lt.ZP,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},Vt={"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"},Kt={pagination:"pagination___npPu7",info:"info___aRH6C"},gn=De(57399),Gt=De(14845),Dt=De(3407),on=De(87462),Jt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},jt=Jt,ut=De(17207),ze=function(Wt,qt){return Le.createElement(ut.Z,(0,on.Z)({},Wt,{ref:qt,icon:jt}))},je=Le.forwardRef(ze),it=De(94189),ht=De(28706),nt=De(94699),Ke=De.n(nt);const{Column:Be}=gn.default;var Ue=({submitResult:kt,submitting:Wt,submitRecords:qt,page:ki,onPageChange:pi,topicId:Qn})=>{const{status:Vn,id:Hn,input:En,output:ri,expected_output:Yi,is_file:Oi,input_file_url:er,output_file_url:Hi,expected_output_file_url:sr,error_msg:tr}=kt||{},{records:so,records_count:Or}=qt||{},So=(0,Me.useParams)();function To(){Oi?navigator.clipboard.writeText(wt.Base64.decode(tr)).then(()=>{me.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(wt.Base64.decode(ri)).then(()=>{me.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return Le.createElement(ve.Z,{spinning:Wt,tip:"\u8BC4\u6D4B\u4E2D...",indicator:Le.createElement(Dt.Z,{style:{fontSize:24},spin:!0})},Hn?Le.createElement(Le.Fragment,null,Le.createElement("ul",{className:Kt.info},Le.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",Le.createElement("span",{className:Vn===it.h.OK?"c-green":"c-red"},$t.Im[Vn])),Le.createElement("li",{className:Kt.error},Le.createElement("a",{onClick:To},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",Le.createElement(je,null)," ")),Le.createElement("li",null,Le.createElement(Me.Link,{to:`/problems/${Qn}/record-detail/${Hn}?backId=${So==null?void 0:So.save_identifier}`},"\u663E\u793A\u8BE6\u60C5 > "))),Vn!==it.h.OK?Le.createElement(Le.Fragment,null,Le.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),Le.createElement("pre",null,!Oi&&En,Oi&&Le.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,ht.LR)(er,En)},En)),Le.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),Le.createElement("pre",null,(Vn===4||Vn===5)&&wt.Base64.decode(tr),Vn!=4&&Vn!=5&&(Oi?Le.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,ht.LR)(Hi,ri)},ri):wt.Base64.decode(ri))),Le.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),Le.createElement("pre",null,!Oi&&wt.Base64.decode(Yi),Oi&&Le.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,ht.LR)(sr,Yi)},Yi))):null):null,(so==null?void 0:so.length)>0?Le.createElement(gn.default,{dataSource:so,rowKey:"id",pagination:!1},Le.createElement(Be,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:(nr,Tr)=>Le.createElement("span",null," ",Ke()(nr).format("YYYY-MM-DD HH:mm:ss"))}),Le.createElement(Be,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:(nr,Tr)=>{var Mi;return Le.createElement(Me.Link,{className:nr===0?"c-green":"c-red",to:`/problems/${Qn}/record-detail/${Tr.id}?backId=${So==null?void 0:So.save_identifier}`},(Mi=$t.Im[nr])==null?void 0:Mi.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,Or>15?Le.createElement(Gt.Z,{className:Kt.pagination,current:ki,pageSize:15,total:Or,onChange:pi}):null)},rt=De(26194),Ze=De(66309),Xe=De(78957),mt={desc:"desc___X8_hx",info:"info___C1DPv","commit-info":"commit-info____9yQm"},Rt=De(65226),vn=De(67294);const An={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}};var Mn=({hack:kt,onTriggerPraise:Wt,toDiscuss:qt})=>{const{language:ki,difficulty:pi,time_limit:Qn,username:Vn,user_path:Hn,user_praise:En,comments_count:ri,praises_count:Yi,description:Oi,pass_count:er,submit_count:Hi}=kt,sr=(0,Me.useLocation)();console.log(kt.language,"language");const tr=An[pi];return vn.createElement(vn.Fragment,null,vn.createElement("ul",{className:mt.info},vn.createElement("li",null,"\u96BE\u5EA6\uFF1A",vn.createElement(Ze.default,{color:tr==null?void 0:tr.color},tr==null?void 0:tr.name)),vn.createElement("li",null,"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",vn.createElement("b",null,Qn,"\u79D2"))),vn.createElement(Rt.Z,{value:Oi,className:mt.desc}),vn.createElement("ul",{className:mt["commit-info"]},vn.createElement("li",null,vn.createElement(Xe.Z,{size:4},vn.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",vn.createElement("b",null,er))),vn.createElement("li",null,vn.createElement(Xe.Z,{size:4},vn.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",vn.createElement("b",null,Hi))," "),vn.createElement("li",{style:{flex:"1 0 0"}}),vn.createElement("li",null,vn.createElement(Xe.Z,{size:4},vn.createElement("i",{className:"iconfont icon-huifu1",onClick:qt})," ",vn.createElement("b",null,ri))," ")))},hi=De(33054),mi=Object.defineProperty,si=Object.getOwnPropertySymbols,Cn=Object.prototype.hasOwnProperty,Ki=Object.prototype.propertyIsEnumerable,Yn=(kt,Wt,qt)=>Wt in kt?mi(kt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):kt[Wt]=qt,Qi=(kt,Wt)=>{for(var qt in Wt||(Wt={}))Cn.call(Wt,qt)&&Yn(kt,qt,Wt[qt]);if(si)for(var qt of si(Wt))Ki.call(Wt,qt)&&Yn(kt,qt,Wt[qt]);return kt};const vr=kt=>React.createElement("svg",Qi({width:40,height:40,xmlns:"http://www.w3.org/2000/svg"},kt),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 Dr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjEwMCUiIGlkPSJhIj48c3RvcCBzdG9wLWNvbG9yPSIjRUVGN0ZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0MxRTJGRiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSJ1cmwoI2EpIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHJ4PSI4Ii8+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNMTYuMDU3IDIwLjc4NEg4LjIzOEExLjIyIDEuMjIgMCAwIDAgNyAyMS45NzR2Ni44MTFhMS4yMiAxLjIyIDAgMCAwIDEuMjM4IDEuMTloNy44MTlhMS4yMTMgMS4yMTMgMCAwIDAgMS4yMzgtMS4xOXYtNi44MTFhMS4yMTMgMS4yMTMgMCAwIDAtLjM3Ni0uODQ3IDEuMjAzIDEuMjAzIDAgMCAwLS44NjItLjMzMnYtLjAxWm0tMS4yNSA2Ljc2OUg5LjQyM1YyMy4xMmg1LjM4NHY0LjQzM1oiIGZpbGw9IiM0Q0FDRkYiLz48cGF0aCBkPSJNMTYuMDU3IDEwLjAwNWExLjIyIDEuMjIgMCAwIDEgMS4yMzggMS4xODl2Ni44MTJhMS4yMTMgMS4yMTMgMCAwIDEtLjM3Ni44NDZjLS4yMzIuMjIyLS41NDIuMzQtLjg2Mi4zMzJIOC4yMzhBMS4yMTMgMS4yMTMgMCAwIDEgNyAxOC4wMDV2LTYuODExYTEuMjIgMS4yMiAwIDAgMSAxLjIzOC0xLjE5Wm0tMS4yMzkgMi40MUg5LjQzNHY0LjQwMWg1LjM4NHYtNC40WiIgZmlsbD0iIzk0Q0RGRiIvPjxwYXRoIGQ9Ik0yMC40MTggMTIuNjMyaDExLjE4OWExLjIxMyAxLjIxMyAwIDAgMCAxLjIzOC0xLjE3OSAxLjIyNCAxLjIyNCAwIDAgMC0uMzcxLS44NTcgMS4yMTQgMS4yMTQgMCAwIDAtLjg2Ny0uMzQzSDIwLjQxOGExLjIwMyAxLjIwMyAwIDAgMC0uODY2LjMzNmMtLjIzMy4yMjMtLjM2Ny41My0uMzcyLjg1NC4wMDUuMzIzLjE0LjYzLjM3Mi44NTQuMjMyLjIyMy41NDQuMzQ0Ljg2Ni4zMzVaTTMxLjU3NSAxNi4wMjdoLTExLjE5YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTE5LjU1N2MtLjIzNy4zODQtLjIzNy44NyAwIDEuMjU0LjIzOC4zODQuNjcyLjYgMS4xMi41NTdoMTEuMTg5Yy40NDguMDQzLjg4Mi0uMTczIDEuMTE5LS41NTcuMjM3LS4zODQuMjM3LS44NyAwLTEuMjU0YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTItLjU1N1pNMzEuNTc1IDIxLjU5NWgtMTEuMTlhMS4xODMgMS4xODMgMCAwIDAtMS4xMTkuNTU3Yy0uMjM3LjM4NC0uMjM3Ljg3IDAgMS4yNTQuMjM4LjM4NC42NzIuNiAxLjEyLjU1N2gxMS4xODljLjQ0OC4wNDMuODgyLS4xNzMgMS4xMTktLjU1Ny4yMzctLjM4NC4yMzctLjg3IDAtMS4yNTRhMS4xODMgMS4xODMgMCAwIDAtMS4xMi0uNTU3Wk0zMS41NzUgMjcuMTYzaC0xMS4xOWExLjE4MyAxLjE4MyAwIDAgMC0xLjExOS41NTdjLS4yMzcuMzg0LS4yMzcuODcgMCAxLjI1NC4yMzguMzg0LjY3Mi42IDEuMTIuNTU3aDExLjE4OWMuNDQ4LjA0My44ODItLjE3MyAxLjExOS0uNTU3LjIzNy0uMzg0LjIzNy0uODcgMC0xLjI1NGExLjE4MyAxLjE4MyAwIDAgMC0xLjEyLS41NTdaIiBmaWxsPSIjMTg5MEZGIi8+PC9nPjwvZz48L3N2Zz4=",Ci=De(33170);function kr(kt){return(0,Ci.U2)("comments.json",kt)}function vo(kt){return(0,Ci.v_)(`/discusses/${kt}/plus.json`,{container_type:"Discuss",type:1})}function qo(kt){return(0,Ci.v_)("comments/reply.json",kt)}function Do(kt){return(0,Ci.v_)("comments.json",kt)}function Oo(kt){return(0,Ci.v_)(`comments/${kt==null?void 0:kt.id}/hidden.json`,kt)}function Cr(kt){return(0,Ci.IV)(`comments/${kt==null?void 0:kt.id}.json`)}var jo=De(93989),or=De(52262);function kn({author:kt}){return Le.createElement("a",{href:`/users/${kt.login}`,target:"_blank"},Le.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:`${xe.Z.IMG_SERVER}/images/${kt.image_url}`,width:"50"}))}function qe({data:kt,index:Wt,parentDiscussIndex:qt,user:ki,onSetActionType:pi}){const{author:Qn,can_delete:Vn,content:Hn,id:En,time:ri}=kt;function Yi(){pi({id:En,index:Wt,type:"delete-discuss",parentDiscussIndex:qt,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}const Oi=ki.admin||Vn||Qn.user_id===ki.user_id;return Le.createElement("div",{className:"discuss-item-container second-discuss "},Le.createElement(kn,{author:Qn}),Le.createElement("section",null,Le.createElement("div",{className:"discuss-info"},Le.createElement("a",{href:`/users/${Qn.login}`,target:"_blank"},Qn.name),Le.createElement("span",{className:"grey"},ri),Le.createElement("div",{className:"btn-group",style:{marginBottom:0}},Oi?Le.createElement("a",{onClick:Yi,title:"\u5220\u9664"},Le.createElement("i",{className:"iconfont icon-shanchu"})):null)),Le.createElement(Rt.Z,{className:"discuss-content",value:Hn})))}var Tn=({user:kt,data:Wt,index:qt,onPlusDiscuss:ki,onSetActionType:pi,activeDiscussIndex:Qn,onReplyDiscuss:Vn,onSetActiveDiscussIndex:Hn})=>{const{content:En,children:ri,hidden:Yi,id:Oi,praise_count:er,time:Hi,user_praise:sr,can_delete:tr,author:so}=Wt;console.log(tr&&(!ri||ri.length==0),"children22");function Or(){Hn(Oi)}function So(){ki(Oi,!sr,qt)}function To(){pi({id:Oi,index:qt,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function nr(){pi({id:Oi,index:qt,params:{hidden:Yi?"0":"1"},type:"hidden-discuss",message:Yi?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}const Tr=kt.admin||kt.user_id===so.user_id;return Le.createElement("div",{className:"discuss-item-container",key:Oi},Le.createElement(kn,{author:so}),Le.createElement("section",null,Le.createElement("div",{className:"discuss-info"},Le.createElement("a",{href:`/users/${so.login}`,target:"_blank"}," ",so.name," "),Le.createElement("span",{className:"grey"},Hi)),Le.createElement(Rt.Z,{className:"discuss-content",value:En}),ri&&ri.length>0?Le.createElement("div",{className:"reply-discuss-container"},ri.map((Mi,Vr)=>Le.createElement(qe,{key:Mi.id,data:Mi,index:Vr,user:kt,onSetActionType:pi,parentDiscussIndex:qt}))):null,Le.createElement("div",{className:"btn-group"},(0,or.Ny)()?Le.createElement("a",{onClick:nr,title:Yi?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},Le.createElement("i",{className:Yi?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,tr&&(!ri||ri.length==0)?Le.createElement("a",{onClick:To,title:"\u5220\u9664"},Le.createElement("i",{className:"iconfont icon-shanchu"})):null,Le.createElement("a",{onClick:Or,title:"\u56DE\u590D"}," ",Le.createElement("i",{className:"iconfont icon-huifu1"})," "),Le.createElement("a",{onClick:So,className:sr?"c-orange":""},Le.createElement("i",{className:sr?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),Le.createElement("span",null,er||""))),Le.createElement(jo.Z,{id:Oi,activeDiscussIndex:Qn,onReplyDiscuss:Vn})))},In=De(71865),zi=De(35567),Gi=(kt,Wt,qt)=>new Promise((ki,pi)=>{var Qn=En=>{try{Hn(qt.next(En))}catch(ri){pi(ri)}},Vn=En=>{try{Hn(qt.throw(En))}catch(ri){pi(ri)}},Hn=En=>En.done?ki(En.value):Promise.resolve(En.value).then(Qn,Vn);Hn((qt=qt.apply(kt,Wt)).next())}),Vi=({user_praise:kt,praise_count:Wt,praisePlus:qt,onCreateDiscuss:ki,discuss_count:pi})=>{const[Qn,Vn]=(0,Le.useState)(!1),[Hn,En]=(0,Le.useState)("");function ri(Hi){En(Hi)}function Yi(){Vn(!0)}function Oi(){Vn(!1)}function er(){return Gi(this,null,function*(){ki(Hn),En(""),Vn(!1)})}return Le.createElement("div",{className:`dis-input-editor-container ${Qn?"active":""} `},Le.createElement("div",{className:Qn?"text-area hide":"text-area"},Le.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:Yi}),Le.createElement("a",{style:{alignItems:"center"}}," ",Le.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",pi," "),Le.createElement("a",{className:"c-light-black",onClick:qt,style:{alignItems:"center"},title:kt?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},Le.createElement("i",{className:`mr3 ${kt?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"} `}),Wt?Le.createElement("span",null,Wt):"")),Qn?Le.createElement("div",{className:"input-mask",onClick:Oi}):null,Le.createElement("div",{className:Qn?"md-container":"md-container hide"},Le.createElement(zi.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:Hn,height:240,onChange:ri}),Le.createElement("div",{className:"tip-container",onClick:Oi},Le.createElement("a",{className:"btn-send",onClick:er}," \u53D1\u9001 "))))},Zi=Object.defineProperty,qr=Object.defineProperties,sn=Object.getOwnPropertyDescriptors,He=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,ot=Object.prototype.propertyIsEnumerable,Lt=(kt,Wt,qt)=>Wt in kt?Zi(kt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):kt[Wt]=qt,At=(kt,Wt)=>{for(var qt in Wt||(Wt={}))Ve.call(Wt,qt)&&Lt(kt,qt,Wt[qt]);if(He)for(var qt of He(Wt))ot.call(Wt,qt)&&Lt(kt,qt,Wt[qt]);return kt},an=(kt,Wt)=>qr(kt,sn(Wt)),Ot=(kt,Wt,qt)=>new Promise((ki,pi)=>{var Qn=En=>{try{Hn(qt.next(En))}catch(ri){pi(ri)}},Vn=En=>{try{Hn(qt.throw(En))}catch(ri){pi(ri)}},Hn=En=>En.done?ki(En.value):Promise.resolve(En.value).then(Qn,Vn);Hn((qt=qt.apply(kt,Wt)).next())});const xn={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null};var Zn=(kt=>(kt[kt.GET_DISCUSSES=0]="GET_DISCUSSES",kt[kt.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",kt[kt.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",kt[kt.PLUS_DISCUSS=3]="PLUS_DISCUSS",kt[kt.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",kt[kt.SET_PAGE=5]="SET_PAGE",kt[kt.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING",kt))(Zn||{});function wi(kt,Wt){switch(Wt.type){case 6:return an(At({},kt),{loading:!0});case 0:return At(At({},kt),Wt.payload);case 1:return At(At({},kt),Wt.payload);case 4:return At(At({},kt),Wt.payload);case 3:return At(At({},kt),Wt.payload);case 5:return At(At({},kt),Wt.payload);case 2:return At(At({},kt),Wt.payload);default:throw new Error}}var Bn=({user:kt,identifier:Wt,hack:qt,onTriggerPraise:ki,setDiscussTotal:pi})=>{const[Qn,Vn]=(0,Le.useReducer)(wi,xn),{loading:Hn,page:En,data:ri,count:Yi,actionType:Oi,activeDiscussIndex:er}=Qn;console.log("---",Qn);const Hi=(0,Le.useCallback)(()=>Ot(void 0,null,function*(){Vn({type:6});const Mi=yield kr({container_type:"Practice",container_identifier:Wt,limit:10,page:En}),{comments:Vr,disscuss_count:Lr}=Mi;Vn({type:0,payload:{data:Vr,count:Lr,loading:!1}}),pi(Lr)}),[En,Wt]);(0,Le.useEffect)(()=>{Hi()},[Wt,En]);function sr(Mi){Vn({type:5,payload:{page:Mi}})}function tr(Mi){Vn({type:4,payload:{actionType:Mi}})}function so(Mi){Vn(er===Mi?{type:2,payload:{activeDiscussIndex:null}}:{type:2,payload:{activeDiscussIndex:Mi}})}function Or(Mi,Vr,Lr){return Ot(this,null,function*(){try{const hr=yield vo(Mi);ri[Lr].user_praise=Vr,ri[Lr].praise_count=hr.praise_count,Vn({type:3,payload:{data:[...ri]}})}catch(hr){console.log(hr)}})}function So(){return Ot(this,null,function*(){const{id:Mi,params:Vr,type:Lr,index:hr,parentDiscussIndex:wo}=Oi;Lr==="hidden-discuss"&&(console.log(Vr,"params"),yield Oo(At({id:Mi,container_type:"Practice",container_identifier:Wt},Vr)),wo?ri[wo].children[hr].hidden=Vr.hidden==1:ri[hr].hidden=Vr.hidden==1,Vn({type:4,payload:{actionType:null,data:[...ri]}})),Lr==="delete-discuss"&&(yield Cr({id:Mi,container_type:"Practice",container_identifier:Wt}),Vn({type:4,payload:{actionType:null}}),yield Hi())})}function To(){Vn({type:4,payload:{actionType:null}})}function nr(Mi,Vr){return Ot(this,null,function*(){try{yield qo({container_type:"Practice",container_identifier:Wt,comments:{content:Vr,parent_id:Mi}}),Hi()}catch(Lr){console.log(Lr)}})}function Tr(Mi){return Ot(this,null,function*(){Vn({type:6}),yield Do({comments:{content:Mi},container_type:"Practice",container_identifier:Wt}),Hi()})}return Le.createElement(Le.Fragment,null,Le.createElement("div",{className:"discuss-panel"},ri.length===0?Le.createElement(rt.Z,null):Le.createElement(ve.Z,{spinning:Hn},ri.map((Mi,Vr)=>Le.createElement(Tn,{onReplyDiscuss:nr,onPlusDiscuss:Or,onSetActiveDiscussIndex:so,onSetActionType:tr,data:Mi,index:Vr,user:kt,activeDiscussIndex:er}))),Yi>10?Le.createElement("div",{className:"pagination-container mt10 mb10"},Le.createElement(Gt.Z,{showQuickJumper:!0,onChange:sr,current:En,total:Yi,showTotal:Mi=>Le.createElement("span",{style:{color:"#656F87"}},"\u5171",Le.createElement("span",{className:"c-light-primary"},Mi),"\u6761\u6570\u636E")})):null),Le.createElement(Vi,{user_praise:qt.user_praise,praise_count:qt.praises_count,praisePlus:ki,discuss_count:qt.comments_count,onCreateDiscuss:Tr}),Le.createElement(z.Z,null,Le.createElement(be.default,{centered:!0,title:"\u63D0\u793A",open:!!Oi,onOk:So,onCancel:To},Le.createElement("p",null,Oi?Oi.message:"")),Le.createElement(In.Z,null)))},rn={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"},Fn={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"},vi=Object.defineProperty,_i=Object.getOwnPropertySymbols,cn=Object.prototype.hasOwnProperty,qn=Object.prototype.propertyIsEnumerable,Ii=(kt,Wt,qt)=>Wt in kt?vi(kt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):kt[Wt]=qt,lr=(kt,Wt)=>{for(var qt in Wt||(Wt={}))cn.call(Wt,qt)&&Ii(kt,qt,Wt[qt]);if(_i)for(var qt of _i(Wt))qn.call(Wt,qt)&&Ii(kt,qt,Wt[qt]);return kt};const _r=kt=>React.createElement("svg",lr({width:12,height:10,xmlns:"http://www.w3.org/2000/svg"},kt),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 Ti="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExIDBhMSAxIDAgMCAxIDEgMXY4YTEgMSAwIDAgMS0xIDFIMWExIDEgMCAwIDEtMS0xVjFhMSAxIDAgMCAxIDEtMWgxMFpNNC40IDIuNGEuNC40IDAgMCAwLS40LjR2NC40YS40LjQgMCAwIDAgLjY0LjMybDIuNzItMi4wNGEuNi42IDAgMCAwIDAtLjk2TDQuNjQgMi40OGEuNC40IDAgMCAwLS4yNC0uMDhaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",bi=Object.defineProperty,li=Object.getOwnPropertySymbols,dr=Object.prototype.hasOwnProperty,jr=Object.prototype.propertyIsEnumerable,ei=(kt,Wt,qt)=>Wt in kt?bi(kt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):kt[Wt]=qt,Ui=(kt,Wt)=>{for(var qt in Wt||(Wt={}))dr.call(Wt,qt)&&ei(kt,qt,Wt[qt]);if(li)for(var qt of li(Wt))jr.call(Wt,qt)&&ei(kt,qt,Wt[qt]);return kt};const ws=kt=>React.createElement("svg",Ui({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},kt),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 cs="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjOTk5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQ0NDIi8+PC9nPjwvc3ZnPg==",Io=Object.defineProperty,dn=Object.getOwnPropertySymbols,gr=Object.prototype.hasOwnProperty,Zr=Object.prototype.propertyIsEnumerable,$i=(kt,Wt,qt)=>Wt in kt?Io(kt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):kt[Wt]=qt,yo=(kt,Wt)=>{for(var qt in Wt||(Wt={}))gr.call(Wt,qt)&&$i(kt,qt,Wt[qt]);if(dn)for(var qt of dn(Wt))Zr.call(Wt,qt)&&$i(kt,qt,Wt[qt]);return kt};const Rr=kt=>React.createElement("svg",yo({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},kt),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 uo="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjMDE1MmQ5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQjZEMEZDIi8+PC9nPjwvc3ZnPg==",to=Object.defineProperty,Yr=Object.getOwnPropertySymbols,Fo=Object.prototype.hasOwnProperty,zn=Object.prototype.propertyIsEnumerable,ns=(kt,Wt,qt)=>Wt in kt?to(kt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):kt[Wt]=qt,Ut=(kt,Wt)=>{for(var qt in Wt||(Wt={}))Fo.call(Wt,qt)&&ns(kt,qt,Wt[qt]);if(Yr)for(var qt of Yr(Wt))zn.call(Wt,qt)&&ns(kt,qt,Wt[qt]);return kt};const en=kt=>React.createElement("svg",Ut({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},kt),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 jn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNC43MTcuMDFoOC44NGMxLjU3MSAwIDIuMzU3Ljc3NyAyLjM1NyAyLjMzMnY1LjI1YzAgMS41NTYtLjc4NiAyLjMzNC0yLjM1NyAyLjMzNGgtOC44NGMtMS41NzIgMC0yLjM1Ny0uNzc4LTIuMzU3LTIuMzM0di01LjI1QzIuMzYuNzg3IDMuMTQ1LjAxIDQuNzE3LjAxWiIgZmlsbD0iIzk5OSIvPjxwYXRoIGQ9Ik0yLjM2IDIuMzQyaDguODRhMi4zNyAyLjM3IDAgMCAxIDEuNjY2LjY4NGMuNDQyLjQzNy42OSAxLjAzLjY5IDEuNjV2NS4yNWMwIDEuMjg4LTEuMDU1IDIuMzMzLTIuMzU3IDIuMzMzSDcuOTRsLTEuMTYgMS4xNTMtMS4xNjctMS4xNTNIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NXYtNS4yNWMwLS42Mi4yNDgtMS4yMTMuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4NFoiIGZpbGw9IiNCNkQwRkMiLz48cGF0aCBkPSJNMi4zNiAyLjkyNmg4Ljg0YzEuMzAxIDAgMi4zNTcgMS4wNDQgMi4zNTcgMi4zMzN2NS4yNWMwIC42MTktLjI0OSAxLjIxMi0uNjkgMS42NWEyLjM3IDIuMzcgMCAwIDEtMS42NjguNjgzSDcuOTRsLTEuMTYgMS4xNTQtMS4xNjctMS4xNTRIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NVY1LjI2YzAtLjYxOS4yNDgtMS4yMTIuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4M1oiIGZpbGw9IiNDQ0MiLz48cGF0aCBkPSJNMy41MzggNS44NDJoNi40ODNjLjM5MyAwIC41ODkuMTk1LjU4OS41ODQgMCAuMzg5LS4xOTYuNTgzLS41OS41ODNIMy41MzljLS4zOTMgMC0uNTktLjE5NC0uNTktLjU4MyAwLS4zOS4xOTctLjU4NC41OS0uNTg0Wk0zLjUzOCA4Ljc2aDQuNzE1Yy4zOTMgMCAuNTkuMTk0LjU5LjU4MiAwIC4zOS0uMTk3LjU4NC0uNTkuNTg0SDMuNTM4Yy0uMzkzIDAtLjU5LS4xOTUtLjU5LS41ODQgMC0uMzg4LjE5Ny0uNTgzLjU5LS41ODNaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==",Ft=Object.defineProperty,Yt=Object.getOwnPropertySymbols,nn=Object.prototype.hasOwnProperty,yn=Object.prototype.propertyIsEnumerable,Xn=(kt,Wt,qt)=>Wt in kt?Ft(kt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):kt[Wt]=qt,yi=(kt,Wt)=>{for(var qt in Wt||(Wt={}))nn.call(Wt,qt)&&Xn(kt,qt,Wt[qt]);if(Yt)for(var qt of Yt(Wt))yn.call(Wt,qt)&&Xn(kt,qt,Wt[qt]);return kt};const gi=kt=>React.createElement("svg",yi({width:16,height:12,xmlns:"http://www.w3.org/2000/svg"},kt),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 Dn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNy45NjUgMTEuOTYxQzIuNTkzIDExLjk2MSAwIDYuOTI2IDAgNS45ODEgMCA1LjAzNSAyLjYyMyAwIDcuOTY1IDBzNy45NjUgNC45ODQgNy45NjUgNS45OGMwIC45OTctMi41OTMgNS45ODEtNy45NjUgNS45ODFabTAtMi4yMDhjMS4yOTYgMCAyLjQ5NC0uNzIgMy4xNDItMS44ODZhMy45MDIgMy45MDIgMCAwIDAgMC0zLjc3M2MtLjY0OC0xLjE2Ny0xLjg0Ni0xLjg4Ni0zLjE0Mi0xLjg4Ni0yLjAwNCAwLTMuNjI5IDEuNjktMy42MjkgMy43NzNzMS42MjUgMy43NzIgMy42MjkgMy43NzJaIiBmaWxsPSIjQ0NDIi8+PHBhdGggZD0iTTcuOTY1IDguMjhjLTEuMjIyIDAtMi4yMTMtMS4wMjktMi4yMTMtMi4zIDAtMS4yNy45OTEtMi4zIDIuMjEzLTIuM3MyLjIxMiAxLjAzIDIuMjEyIDIuM2MwIDEuMjcxLS45OSAyLjMtMi4yMTIgMi4zWiIgZmlsbD0iIzk5OSIvPjwvZz48L3N2Zz4=",Sr=({style:kt={},onClick:Wt,onAssist:qt,onHide:ki,data:pi,active:Qn,showLine:Vn})=>Le.createElement(Le.Fragment,null,Le.createElement("div",{className:Qn===(pi==null?void 0:pi.id)?`${Fn.list} ${Fn.active}`:Fn.list,style:kt,onClick:()=>Wt(pi)},(pi==null?void 0:pi.video)&&Le.createElement("div",{className:Fn.left},Le.createElement("img",{src:pi==null?void 0:pi.video_cover}),Le.createElement("div",null,Le.createElement("img",{src:Ti}),Le.createElement("span",null,pi==null?void 0:pi.video_duration)),Le.createElement("div",{className:Fn.mask})),Le.createElement("div",{className:Fn.right},Le.createElement("div",{className:Fn.name},Le.createElement("img",{src:xe.Z.IMG_SERVER+"/images/"+(pi==null?void 0:pi.image_url),width:30,height:30}),Le.createElement("div",{title:pi==null?void 0:pi.name,className:Fn.title},pi==null?void 0:pi.name),(pi==null?void 0:pi.is_authority)&&Le.createElement("div",{className:Fn.b},"\u5B98\u65B9"),(pi==null?void 0:pi.is_excellent)&&Le.createElement("div",{className:Fn.a},"\u7CBE\u9009")),Le.createElement("div",{className:Fn.des},Le.createElement(Rt.Z,{showLines:2,showTextOnly:!0,value:(pi==null?void 0:pi.content)||"\u6682\u65E0\u5185\u5BB9"})),Le.createElement("div",{className:Fn.tag},Le.createElement("span",{className:"current",onClick:Hn=>{Hn.stopPropagation(),qt(pi)}},Le.createElement("img",{src:pi!=null&&pi.user_liker?uo:cs}),Le.createElement("span",{style:{color:pi!=null&&pi.user_liker?"#0152d9":"#656f87"}},pi==null?void 0:pi.praises_count)),Le.createElement("span",null,Le.createElement("img",{src:jn}),Le.createElement("span",null,pi==null?void 0:pi.discusses_count)),Le.createElement("span",null,Le.createElement("img",{src:Dn}),Le.createElement("span",null,pi==null?void 0:pi.viewed_count)),(0,or.Ny)()&&Le.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:Hn=>{Hn.stopPropagation(),ki(pi)}},pi!=null&&pi.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),Vn&&Le.createElement("div",{className:Fn.line})),Er={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"},no=De(83062),io=De(62263),ro=Object.defineProperty,zr=Object.getOwnPropertySymbols,Go=Object.prototype.hasOwnProperty,co=Object.prototype.propertyIsEnumerable,br=(kt,Wt,qt)=>Wt in kt?ro(kt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):kt[Wt]=qt,ir=(kt,Wt)=>{for(var qt in Wt||(Wt={}))Go.call(Wt,qt)&&br(kt,qt,Wt[qt]);if(zr)for(var qt of zr(Wt))co.call(Wt,qt)&&br(kt,qt,Wt[qt]);return kt};const Pi=kt=>React.createElement("svg",ir({width:32,height:30,xmlns:"http://www.w3.org/2000/svg"},kt),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 ui="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNiAwQzEuMTc1IDAgLjc2OC4xNy40NjguNDc0QTEuNjMgMS42MyAwIDAgMCAwIDEuNjIydjMuMjQzaDMuMjM3TDcuMzc4IDBIMS42Wm03Ljg3NiAwTDUuMzM4IDQuODY1aDUuOUwxNS4zNzEgMEg5LjQ3NlptNy45OTggMC00LjEzNyA0Ljg2NWg1Ljg5NkwyMy4zNzIgMGgtNS44OThabTggMC00LjEzOCA0Ljg2NWg2LjY2VjEuNjIyYTEuNjI5IDEuNjI5IDAgMCAwLS40NjctMS4xNDhBMS41ODUgMS41ODUgMCAwIDAgMjYuMzk3IDBoLS45MjRaTTAgNi40ODd2MTcuODM3YzAgLjQzLjE2Ny44NDQuNDY4IDEuMTQ4LjMuMzA1LjcwNy40NzUgMS4xMzIuNDc0aDE4LjYxYTYuNTE1IDYuNTE1IDAgMCAxIDEuNjUyLTYuMjE4IDYuMzEgNi4zMSAwIDAgMSA2LjEzNC0xLjY3NVY2LjQ4N0gwWm0xMS45OTggNS42NzUgNi40IDQuMDU2LTYuNCA0LjA1NXYtOC4xMVptMTQuMzk5IDYuNDg3Yy0zLjA5Mi4wMDItNS41OTcgMi41NDQtNS41OTUgNS42NzguMDAxIDMuMTM0IDIuNTA4IDUuNjc0IDUuNiA1LjY3M0MyOS40OTQgMzAgMzIgMjcuNDU4IDMyIDI0LjMyNGMwLTEuNTA2LS41OS0yLjk1LTEuNjQxLTQuMDE0YTUuNTYxIDUuNTYxIDAgMCAwLTMuOTYyLTEuNjYxWm0wIDIuMDI3Yy4yMi4wMDMuNDI4LjEuNTc0LjI2Ni42NjMuNiAxLjMyNyAxLjM1MiAxLjk5IDIuMDAyYS44LjggMCAwIDEgMCAxLjE0Ljc4OC43ODggMCAwIDEtMS4xMjUgMGwtLjYzOC0uNjQ2djMuNzI0YS44MTQuODE0IDAgMCAxLS4zOTIuNzI0Ljc5Ljc5IDAgMCAxLS44MTUgMCAuODE0LjgxNCAwIDAgMS0uMzkyLS43MjR2LTMuNzI0bC0uNjM3LjY0NmEuNzkuNzkgMCAwIDEtLjc3My4yMTUuODAzLjgwMyAwIDAgMS0uNTY3LS41NzUuODE2LjgxNiAwIDAgMSAuMjEyLS43ODNjLjY1MS0uNjY0IDEuMzMzLTEuMzg4IDEuOTktMi4wMDJhLjc3OC43NzggMCAwIDEgLjU3NS0uMjY2bC0uMDAyLjAwM1oiIGZpbGw9IiMwMTUyZDkiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",Di=Object.defineProperty,Sn=Object.getOwnPropertySymbols,ji=Object.prototype.hasOwnProperty,Wi=Object.prototype.propertyIsEnumerable,Ur=(kt,Wt,qt)=>Wt in kt?Di(kt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):kt[Wt]=qt,Xr=(kt,Wt)=>{for(var qt in Wt||(Wt={}))ji.call(Wt,qt)&&Ur(kt,qt,Wt[qt]);if(Sn)for(var qt of Sn(Wt))Wi.call(Wt,qt)&&Ur(kt,qt,Wt[qt]);return kt};const Jr=kt=>React.createElement("svg",Xr({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},kt),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 xo="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1IDBjOC4yODUgMCAxNSA2LjcxNyAxNSAxNSAwIDguMjg1LTYuNzE1IDE1LTE1IDE1LTguMjgzIDAtMTUtNi43MTUtMTUtMTVDMCA2LjcxNyA2LjcxNyAwIDE1IDBabTEwLjA0MSA3LjV2LjAxYTQ3LjkzNCA0Ny45MzQgMCAwIDAtMTEuMjMyIDkuMzg2bC00LjM3Mi0zLjN2LS4wMDJMNy41IDE1LjA4bDcuNTUzIDcuNDJBNDQuNjI1IDQ0LjYyNSAwIDAgMSAyNS41IDguNTVsLS40NTktMS4wNVoiIGZpbGw9IiM0NEQ3QjYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",Qo=Object.defineProperty,Wo=Object.getOwnPropertySymbols,_s=Object.prototype.hasOwnProperty,As=Object.prototype.propertyIsEnumerable,pn=(kt,Wt,qt)=>Wt in kt?Qo(kt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):kt[Wt]=qt,ss=(kt,Wt)=>{for(var qt in Wt||(Wt={}))_s.call(Wt,qt)&&pn(kt,qt,Wt[qt]);if(Wo)for(var qt of Wo(Wt))As.call(Wt,qt)&&pn(kt,qt,Wt[qt]);return kt};const ps=kt=>React.createElement("svg",ss({xmlns:"http://www.w3.org/2000/svg",width:20,height:20},kt),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 Ts="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZmlsbD0iI0FGQkFDQiIgZD0iTTkuOTkuMDJDNC40ODIuMDIuMDIgNC40ODIuMDIgOS45OWMwIDUuNTA2IDQuNDYzIDkuOTcgOS45NyA5Ljk3IDUuNTA2IDAgOS45Ny00LjQ2NCA5Ljk3LTkuOTcgMC01LjUwNy00LjQ2NC05Ljk3LTkuOTctOS45N1ptMS42MzYgMTMuNjljLS43NDQgMS4xOS0xLjQ4OCAyLjA4My0yLjgyNyAyLjA4My0uODkzLS4xNDktMS4xOS0uNzQ0LTEuMDQyLTEuNDg4bDEuNjM3LTUuNTA2YzAtLjE0OSAwLS4yOTgtLjE0OS0uMjk4LS4xNDggMC0uNDQ2IDAtLjU5NS4yOThsLTEuMDQyIDEuMTl2LS43NDRjLjc0NS0xLjE5IDEuOTM1LTIuMDgzIDIuODI4LTIuMDgzLjc0NC4xNDkgMS4xOS43NDQgMS4wNDIgMS40ODhMOS44NCAxNC4zMDVjMCAuMTQ5IDAgLjI5OC4xNDguMjk4LjE1IDAgLjQ0Ny0uMTUuNTk2LS4yOThsMS4wNDEtMS4zNHYuNzQ1Wm0tLjI5Ny03LjI5MmMtLjU5NiAwLTEuMTktLjQ0Ni0xLjE5LTEuMTkgMC0uNzQ1LjQ0Ni0xLjE5MSAxLjE5LTEuMTkxLjU5NSAwIDEuMTkuNDQ2IDEuMTkgMS4xOSAwIC43NDUtLjU5NSAxLjE5MS0xLjE5IDEuMTkxWiIvPjwvc3ZnPg==",mo=Object.defineProperty,Ns=Object.getOwnPropertySymbols,Ss=Object.prototype.hasOwnProperty,Us=Object.prototype.propertyIsEnumerable,fo=(kt,Wt,qt)=>Wt in kt?mo(kt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):kt[Wt]=qt,Co=(kt,Wt)=>{for(var qt in Wt||(Wt={}))Ss.call(Wt,qt)&&fo(kt,qt,Wt[qt]);if(Ns)for(var qt of Ns(Wt))Us.call(Wt,qt)&&fo(kt,qt,Wt[qt]);return kt},pr=(kt,Wt,qt)=>new Promise((ki,pi)=>{var Qn=En=>{try{Hn(qt.next(En))}catch(ri){pi(ri)}},Vn=En=>{try{Hn(qt.throw(En))}catch(ri){pi(ri)}},Hn=En=>En.done?ki(En.value):Promise.resolve(En.value).then(Qn,Vn);Hn((qt=qt.apply(kt,Wt)).next())});const Gr=(kt,Wt)=>{var qt,ki,pi;const{uploadInfo:Qn={}}=Wt.payload;switch(Wt.type){case"addVideo":return{videoList:[...kt.videoList,{name:Qn.file.name,size:Qn.file.size,type:Qn.file.type,fileHash:Qn.fileHash,state:Qn.state,video_id:Qn.videoId,attachment_id:"",article_id:-1,loaded:0,title:""}]};case"removeVideo":return{videoList:kt.videoList.filter(Vn=>Vn.name!==Wt.payload.name)};case"replaceVideo":return{videoList:Wt.payload};case"removeAll":return[];case"updateProgress":return{videoList:kt.videoList.map(Vn=>Vn.name===Wt.payload.uploadInfo.file.name?Co(Co({},Vn),{loaded:Wt.payload.progressPercent,video_id:Qn.videoId,fileHash:Qn.fileHash}):Vn)};case"updateTitle":return{videoList:(qt=kt.videoList)==null?void 0:qt.map(Vn=>Vn.name===Wt.payload.item.name?Co(Co({},Vn),{title:Wt.payload.title}):Vn)};case"updateImg":return{videoList:(ki=kt.videoList)==null?void 0:ki.map(Vn=>Vn.name===Wt.payload.item.name?Co(Co({},Vn),{attachment_id:Wt.payload.attachment_id}):Vn)};case"updateImg":return{videoList:(pi=kt.videoList)==null?void 0:pi.map(Vn=>Vn.name===Wt.payload.item.name?Co(Co({},Vn),{attachment_id:Wt.payload.attachment_id}):Vn)};default:return[]}};var Ro=({onClose:kt,onOk:Wt,identifier:qt,active:ki})=>{var pi,Qn;const[Vn]=et.default.useForm(),[Hn,En]=(0,Le.useState)({}),[ri,Yi]=(0,Le.useState)(!1),[Oi,er]=(0,Le.useState)(!1),[Hi,sr]=(0,Le.useReducer)(Gr,{videoList:[]}),tr=(0,or.eY)(),so=(0,Me.useParams)(),Or=(0,Le.useRef)();(0,Le.useEffect)(()=>{ki&&So()},[ki]);const So=()=>pr(void 0,null,function*(){var eo,Bo,Ri,$s,_o,Rs,ua,Cs,_l,ho;const Uo=yield(0,ge.M3)(qt,{active:ki});if((Uo==null?void 0:Uo.status)===0){const es={name:(eo=Uo==null?void 0:Uo.data)==null?void 0:eo.name,content:(Bo=Uo==null?void 0:Uo.data)==null?void 0:Bo.content};Vn.setFieldsValue(es),En(es),($s=(Ri=Uo==null?void 0:Uo.data)==null?void 0:Ri.videos)!=null&&$s[0]&&sr({type:"replaceVideo",payload:[{video_id:(ua=(Rs=(_o=Uo==null?void 0:Uo.data)==null?void 0:_o.videos)==null?void 0:Rs[0])==null?void 0:ua.video_id,name:(ho=(_l=(Cs=Uo==null?void 0:Uo.data)==null?void 0:Cs.videos)==null?void 0:_l[0])==null?void 0:ho.title,loaded:100}]})}}),To=(eo,Bo)=>{En(Co({},Bo))},nr=eo=>pr(void 0,null,function*(){const Bo={videos:Hi.videoList,articles:eo};er(!0);let Ri;ki?(Bo.active=ki,Ri=yield(0,ge.gu)(qt,Bo)):Ri=yield(0,ge.bx)(qt,Bo),(Ri==null?void 0:Ri.status)===0&&(console.log(ki||(Ri==null?void 0:Ri.id),44),Wt(ki||(Ri==null?void 0:Ri.id))),er(!1)}),Tr=()=>{const eo=document.getElementById("fileUpload");eo.value=""},Mi=eo=>{var Bo='{"Vod":{}}';if(Yi(!0),Or.current){Or.current.addFile(eo,null,null,null,Bo);return}(0,io.o)(tr==null?void 0:tr.login,"",{create:!Or,addFileSuccess:Ri=>{sr({type:"addVideo",payload:{uploadInfo:Ri}})},onUploadProgress:(Ri,$s,_o)=>{const Rs=Math.ceil(_o*100);sr({type:"updateProgress",payload:{uploadInfo:Ri,progressPercent:Rs}}),Tr()},onUploadFailed:Ri=>{me.ZP.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:Ri=>{Yi(!1)},onUploadSucceed:Ri=>{Yi(!1)},onUploadError:Ri=>{Yi(!1)},gotUploader:Ri=>{Ri.addFile(eo,null,null,null,Bo),Or.current=Ri}})},Vr=eo=>{var Bo;const $s=eo.target.files[0];if(!$s){Tr();return}let _o=$s.name.toLowerCase();if(_o&&_o.indexOf(".avi")==-1&&_o.indexOf(".flv")==-1&&_o.indexOf(".f4v")==-1&&_o.indexOf(".m4v")==-1&&_o.indexOf(".mov")==-1&&_o.indexOf(".mp4")==-1&&_o.indexOf(".rmvb")==-1&&_o.indexOf(".swf")==-1&&_o.indexOf(".webm")==-1&&_o.indexOf(".wmv")==-1){me.ZP.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),Tr();return}if($s.size>1024*1024*1024){me.ZP.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC71024M"),Tr();return}if((Bo=Hi.videoList)!=null&&Bo.find(Rs=>Rs.name===$s.name)){me.ZP.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),Tr();return}Mi($s)},Lr=(eo,Bo)=>{be.default.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:Le.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",Bo?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:()=>{Tr(),sr({type:"removeVideo",payload:{name:eo}})}})},hr=()=>Le.createElement("label",{htmlFor:"fileUpload",className:Er.main},Le.createElement("img",{src:ui,alt:""}),Le.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891")),wo=eo=>Le.createElement("div",{className:Er.mainLoading},Le.createElement("div",{className:Er.proWarp},Le.createElement("div",{className:Er.pro},Le.createElement("div",{style:{width:eo}})),Le.createElement("span",null,eo||0,"%")),Le.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),Le.createElement("div",{className:Er.tip},Le.createElement(no.Z,{getPopupContainer:Bo=>Bo.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:Ts,alt:""})))),rr=eo=>Le.createElement("div",{className:Er.mainSucceed},Le.createElement("img",{src:xo,alt:""}),Le.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),Le.createElement("div",{className:Er.tip},Le.createElement(no.Z,{getPopupContainer:Bo=>Bo.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:Ts,alt:""}))),Le.createElement("div",{className:Er.del,onClick:()=>Lr(eo.name,eo.loaded==100)},Le.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891")),$o=()=>{var eo;return Le.createElement(Le.Fragment,null,(eo=Hi.videoList)==null?void 0:eo.map((Bo,Ri)=>Le.createElement(Le.Fragment,{key:Ri},Bo.loaded==100?rr(Bo):wo(Bo.loaded))))},ko=()=>{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:kt})},Ao=(pi=Hi.videoList)==null?void 0:pi.length;return Le.createElement("div",{className:Er.listForm},Le.createElement("header",null,ki?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),Le.createElement("section",{className:Er.scroll,id:"sss"},Le.createElement("div",{className:Er.formWrap}," ",Le.createElement(et.default,{form:Vn,scrollToFirstError:!0,layout:"vertical",onValuesChange:To,onFinish:nr},Le.createElement(et.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(st.default,{bordered:!1,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26",suffix:`${((Qn=Hn.name)==null?void 0:Qn.length)||0}/60`})),Le.createElement(et.default.Item,{name:"content",label:"\u5185\u5BB9:"},Le.createElement(zi.Z,{defaultValue:Hn.content||"",watch:!0})))),Le.createElement("div",{className:Er.upload},Ao?$o():hr(),Le.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:Vr,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}))),Le.createElement("div",{className:Er.btns},Le.createElement(lt.ZP,{onClick:ko,type:"primary",ghost:!0},"\u5173\u95ED"),Le.createElement(lt.ZP,{loading:Oi,disabled:ri,onClick:()=>Vn.submit(),type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},Ei={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"},ms=De(48054),hs=Object.defineProperty,ds=Object.getOwnPropertySymbols,ia=Object.prototype.hasOwnProperty,ra=Object.prototype.propertyIsEnumerable,di=(kt,Wt,qt)=>Wt in kt?hs(kt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):kt[Wt]=qt,xs=(kt,Wt)=>{for(var qt in Wt||(Wt={}))ia.call(Wt,qt)&&di(kt,qt,Wt[qt]);if(ds)for(var qt of ds(Wt))ra.call(Wt,qt)&&di(kt,qt,Wt[qt]);return kt};const Ls=kt=>React.createElement("svg",xs({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:15,height:16},kt),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 ga="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNNi4zODUuMjU3Yy42MTYtLjM0MyAxLjYxNi0uMzQyIDIuMjMgMGw1LjI3IDIuOTRDMTQuNTAxIDMuNTM4IDE1IDQuMzggMTUgNS4wNzF2NS44NTZjMCAuNjkyLS41MDEgMS41MzMtMS4xMTUgMS44NzZsLTUuMjcgMi45MzljLS42MTYuMzQzLTEuNjE2LjM0Mi0yLjIzIDBsLTUuMjctMi45NEMuNDk5IDEyLjQ2MiAwIDExLjYyMiAwIDEwLjkyOVY1LjA3MkMwIDQuMzguNTAxIDMuNTQgMS4xMTUgMy4xOTZabTEuNDIzIDMuODE3Yy0uMTY5LS4zNDEtLjQ0Ni0uMzQxLS42MTUgMEw2LjM4IDUuNzE3Yy0uMTY5LjM0MS0uNjE2LjY2NS0uOTk0LjcybC0xLjgyLjI2NGMtLjM3OC4wNTUtLjQ2NC4zMTctLjE5LjU4M2wxLjMxNyAxLjI3OGMuMjczLjI2Ni40NDQuNzkuMzggMS4xNjVsLS4zMSAxLjgwNmMtLjA2Ni4zNzYuMTU4LjUzOC40OTYuMzZsMS42MjgtLjg1M2MuMzM4LS4xNzcuODktLjE3NyAxLjIzIDBsMS42MjcuODUzYy4zMzcuMTc3LjU2MS4wMTUuNDk3LS4zNmwtLjMxLTEuODA2Yy0uMDY1LS4zNzUuMTA1LS44OTkuMzc5LTEuMTY1bDEuMzE2LTEuMjc4Yy4yNzQtLjI2Ni4xODgtLjUyOS0uMTktLjU4M2wtMS44MTktLjI2NGMtLjM3Ny0uMDU0LS44MjUtLjM3OC0uOTk0LS43MloiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48dXNlIGZpbGw9IiM4REM5RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI2EiLz48Y2lyY2xlIGN4PSItMS41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLTIuNSIgY3k9Ii00LjUiIHI9IjEyLjUiIGZpbGw9IiNFRUY3RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgbWFzaz0idXJsKCNiKSIvPjwvZz48L3N2Zz4=",vs=Object.defineProperty,oa=Object.getOwnPropertySymbols,Hr=Object.prototype.hasOwnProperty,Xa=Object.prototype.propertyIsEnumerable,Hs=(kt,Wt,qt)=>Wt in kt?vs(kt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):kt[Wt]=qt,Ks=(kt,Wt)=>{for(var qt in Wt||(Wt={}))Hr.call(Wt,qt)&&Hs(kt,qt,Wt[qt]);if(oa)for(var qt of oa(Wt))Xa.call(Wt,qt)&&Hs(kt,qt,Wt[qt]);return kt};const ka=kt=>React.createElement("svg",Ks({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},kt),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 Hl="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJtOCAwIDEuODU3IDEuMDczaDIuMTQ2bDEuMDcxIDEuODU0TDE0LjkzMSA0djIuMTQ0TDE2IDhsLTEuMDY5IDEuODU3VjEybC0xLjg1OCAxLjA3Mi0xLjA3MSAxLjg1Nkg5Ljg1N0w4IDE2bC0xLjg1NS0xLjA3M0g0bC0xLjA3Mi0xLjg1NkwxLjA3MiAxMlY5Ljg1N0wwIDhsMS4wNzItMS44NTZWNGwxLjg1Ny0xLjA3MyAxLjA3Mi0xLjg1NGgyLjE0NUw4IDBabTIuOTEgNi4zODVINC43OTZWMTJoMS4yNDZ2LS40NTFoNC4wMjZ2LjQzNWgxLjI0N1Y5LjE5Nkg2LjA0M3YtLjUxNWg0Ljg2NlY2LjM4NVptLS44NCAzLjY4MXYuNjEzSDYuMDQydi0uNjEzaDQuMDI2Wk05LjcwNSA3LjI0di41ODhINi4wNDN2LS41ODhoMy42NjNaTTguNjE1IDRsLTEuNDguMTM3Yy4wNTUuMTMzLjEyLjI4NC4xOTIuNDUzbC4wNzYuMTc1SDR2MS40MjZoMS4xOTV2LS40ODNoNS42MXYuNDgzSDEyVjQuNzY1SDguODgzYy0uMDc4LS4yMy0uMTQ4LS40My0uMjEtLjYwMkw4LjYxNiA0WiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzhEQzlGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9Ii41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLS41IiBjeT0iLTQuNSIgcj0iMTIuNSIgZmlsbD0iI0VFRjdGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PC9nPjwvc3ZnPg==",cu=Object.defineProperty,Ta=Object.getOwnPropertySymbols,al=Object.prototype.hasOwnProperty,fh=Object.prototype.propertyIsEnumerable,kh=(kt,Wt,qt)=>Wt in kt?cu(kt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):kt[Wt]=qt,ph=(kt,Wt)=>{for(var qt in Wt||(Wt={}))al.call(Wt,qt)&&kh(kt,qt,Wt[qt]);if(Ta)for(var qt of Ta(Wt))fh.call(Wt,qt)&&kh(kt,qt,Wt[qt]);return kt};const qh=kt=>React.createElement("svg",ph({width:22,height:20,xmlns:"http://www.w3.org/2000/svg"},kt),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 Ia="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMy41NjYgMTkuMDhWOC4xMzRjMC0uNDQzLS4zMTgtLjgwMi0uNzEtLjgwMkgxLjM0Yy0uNzMgMC0xLjMyMi42Ny0xLjMyMiAxLjQ5NnY5LjU1OGMwIC44MjcuNTkzIDEuNDk2IDEuMzIyIDEuNDk2aDEuNTE1Yy4zOTIgMCAuNzEtLjM2LjcxLS44MDJaIiBmaWxsPSIjQTNEM0ZGIi8+PHBhdGggZD0iTTQuNTg1IDE5LjMwM1Y3LjljMC0uMjYzLjE4OC0uNDk1LjQ1OS0uNTU5Ljk1NS0uMjI5IDMuMTQ3LTEuMDQ5IDQuMDgtMy44NDguNTY3LTIuNDUxIDEuMTgyLTMuNjA3IDMuMDA4LTMuNDY5IDEuODI2LjEzOSAxLjk0OCAxLjgwNCAxLjk0OCAyLjMxMnYzLjkzcy0uMTQ4LjYwMi40NjguNjQ5Yy42MTcuMDQ2IDUuNDI2IDAgNS40MjYgMHMyLjYzOS0uMDQyIDEuOCAzLjAzMWMtLjczIDIuNjczLTIuMTczIDYuOTc0LTIuNTM3IDguMDVhMi4zMjQgMi4zMjQgMCAwIDEtLjMyNC42MjZjLS4zNTMuNDgzLTEuMDk0IDEuMjU4LTIuMjI4IDEuMjU4SDUuMjAxYy0uMzQxLjAwMi0uNjE2LS4yNTctLjYxNi0uNTc3WiIgZmlsbD0iI0ZGRiIvPjwvZz48L3N2Zz4=",za={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"},Tl=De(71230),Al=De(15746),Gl={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"},Pc=(kt,Wt,qt)=>new Promise((ki,pi)=>{var Qn=En=>{try{Hn(qt.next(En))}catch(ri){pi(ri)}},Vn=En=>{try{Hn(qt.throw(En))}catch(ri){pi(ri)}},Hn=En=>En.done?ki(En.value):Promise.resolve(En.value).then(Qn,Vn);Hn((qt=qt.apply(kt,Wt)).next())});const Cc=({id:kt,cb:Wt})=>{const[qt,ki]=(0,Le.useState)("");return Le.createElement("aside",{className:"mt10"},Le.createElement(zi.Z,{defaultValue:qt,id:"writeForumsReviewId",onChange:pi=>{ki(pi)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),Le.createElement(Tl.Z,null,Le.createElement(Al.Z,{flex:"1"}),Le.createElement(Al.Z,null,Le.createElement(lt.ZP,{type:"primary",size:"middle",onClick:()=>Pc(void 0,null,function*(){qt===""?me.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):Wt(kt,qt)})},"\u53D1\u9001"))))},ma=({data:kt})=>{var Wt;return Le.createElement("div",{className:Gl.thirdlyLevelDiscuss},Le.createElement("span",{className:"c-grey-333"},Le.createElement("span",{className:"font 14 c-light-primary"},(Wt=kt==null?void 0:kt.author)==null?void 0:Wt.name),"@",Le.createElement("span",{className:"font 14 c-light-primary"},kt==null?void 0:kt.parent_name),":"),Le.createElement(Rt.Z,{value:kt==null?void 0:kt.content}))},ff=({data:kt,onReplyDiscuss:Wt,thirdlyReply:qt,setThirdlyReply:ki})=>{var pi,Qn,Vn,Hn;const En=(0,or.eY)();return console.log(En,"user"),Le.createElement("div",{className:Gl.list},Le.createElement("img",{src:xe.Z.IMG_SERVER+"/images/"+((pi=kt==null?void 0:kt.author)==null?void 0:pi.image_url)}),Le.createElement("div",{className:Gl.wrap},Le.createElement("div",{className:"font14",style:{marginBottom:6}},Le.createElement("span",{className:"c-grey-333"},(Qn=kt==null?void 0:kt.author)==null?void 0:Qn.name),(En==null?void 0:En.login)!==((Vn=kt==null?void 0:kt.author)==null?void 0:Vn.login)&&Le.createElement("span",{onClick:()=>ki(kt==null?void 0:kt.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(Rt.Z,{value:kt==null?void 0:kt.content}),(Hn=kt==null?void 0:kt.children)==null?void 0:Hn.map(ri=>Le.createElement(ma,{key:ri.id,data:ri})),qt===(kt==null?void 0:kt.id)&&Le.createElement("div",null,Le.createElement(Cc,{id:kt==null?void 0:kt.id,cb:Wt}),Le.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:()=>ki(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:Gl.line})))};var Qh=({data:kt,onReplyDiscuss:Wt,secondReply:qt,setSecondReply:ki,thirdlyReply:pi,setThirdlyReply:Qn,onPlusDiscuss:Vn})=>{var Hn,En,ri,Yi;const[Oi,er]=(0,Le.useState)(!1);return console.log(kt,"data"),Le.createElement("div",{className:Gl.discussItem},Le.createElement("div",{className:Gl.list},Le.createElement("img",{src:xe.Z.IMG_SERVER+"/images/"+((Hn=kt==null?void 0:kt.author)==null?void 0:Hn.image_url)}),Le.createElement("div",{className:Gl.wrap},Le.createElement("div",{className:"font14",style:{marginBottom:6}},Le.createElement("span",{className:"c-grey-333 mr30"},(En=kt==null?void 0:kt.author)==null?void 0:En.name),Le.createElement("span",{className:"c-grey-999"},kt==null?void 0:kt.time)),Le.createElement(Rt.Z,{value:kt==null?void 0:kt.content}),Le.createElement("div",{className:Gl.btns},Le.createElement("div",{onClick:()=>Vn(kt==null?void 0:kt.id),className:kt!=null&&kt.user_praise?"c-light-primary":"c-grey-999"},Le.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),Le.createElement("span",null,kt==null?void 0:kt.praise_count)),Le.createElement("div",{onClick:()=>{var Hi;((Hi=kt==null?void 0:kt.children)==null?void 0:Hi.length)!==0&&(ki(null),er(!Oi))},style:{color:Oi?"#0152d9":"#999999"}},Le.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),Le.createElement("span",null,Oi?"\u6536\u8D77\u8BC4\u8BBA":(ri=kt==null?void 0:kt.children)==null?void 0:ri.length)),Le.createElement("div",{onClick:()=>{er(!1),ki(qt===(kt==null?void 0:kt.id)?null:kt==null?void 0:kt.id)},style:{color:qt===(kt==null?void 0:kt.id)?"#0152d9":"#999999"}},Le.createElement("i",{className:"iconfont icon-huifu3 mr3"}),Le.createElement("span",null,qt===(kt==null?void 0:kt.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),qt===(kt==null?void 0:kt.id)&&Le.createElement(Cc,{id:kt==null?void 0:kt.id,cb:(Hi,sr)=>{Wt(Hi,sr),er(!0)}}),Oi&&Le.createElement("div",{className:Gl.secondLevelDiscuss},(Yi=kt==null?void 0:kt.children)==null?void 0:Yi.map(Hi=>Le.createElement(ff,{thirdlyReply:pi,setThirdlyReply:Qn,key:Hi.id,data:Hi,onReplyDiscuss:Wt}))))))},bu=(kt,Wt,qt)=>new Promise((ki,pi)=>{var Qn=En=>{try{Hn(qt.next(En))}catch(ri){pi(ri)}},Vn=En=>{try{Hn(qt.throw(En))}catch(ri){pi(ri)}},Hn=En=>En.done?ki(En.value):Promise.resolve(En.value).then(Qn,Vn);Hn((qt=qt.apply(kt,Wt)).next())}),Ua=({identifier:kt,active:Wt,onOk:qt})=>{const[ki,pi]=(0,Le.useState)(""),[Qn,Vn]=(0,Le.useState)(1),[Hn,En]=(0,Le.useState)([]),[ri,Yi]=(0,Le.useState)(0),[Oi,er]=(0,Le.useState)(null),[Hi,sr]=(0,Le.useState)(null);(0,Le.useEffect)(()=>{tr(1),Vn(1)},[Wt]);const tr=nr=>bu(void 0,null,function*(){const Tr=yield kr({container_type:"QuestionSolutionArticle",container_identifier:Wt,limit:5,page:nr});Tr!=null&&Tr.comments&&(En((Tr==null?void 0:Tr.comments)||[]),Vn(nr),Yi(Tr==null?void 0:Tr.disscuss_count))}),so=()=>bu(void 0,null,function*(){if(ki===""){me.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");return}const nr=yield Do({comments:{content:ki},container_type:"QuestionSolutionArticle",container_identifier:Wt});nr!=null&&nr.discuss&&(pi(""),tr(Qn),qt())}),Or=(nr,Tr,Mi)=>bu(void 0,null,function*(){const Vr=yield qo({container_type:"QuestionSolutionArticle",container_identifier:Wt,comments:{content:Tr,parent_id:nr}});er(null),sr(null),tr(Qn)}),So=nr=>bu(void 0,null,function*(){const Tr=yield vo(nr);tr(Qn)}),To=nr=>{Vn(nr),tr(nr)};return Le.createElement("div",{className:za.discuss},Le.createElement("aside",{className:za.reply,style:{borderWidth:ri?1:0}},Le.createElement(zi.Z,{defaultValue:ki,id:"writeForumsReviewId",onChange:nr=>{pi(nr)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),Le.createElement(Tl.Z,null,Le.createElement(Al.Z,{flex:"1"}),Le.createElement(Al.Z,null,Le.createElement(lt.ZP,{type:"primary",size:"middle",onClick:()=>so()},"\u53D1\u9001")))),Hn==null?void 0:Hn.map(nr=>Le.createElement(Qh,{secondReply:Oi,setSecondReply:er,thirdlyReply:Hi,setThirdlyReply:sr,key:nr.id,data:nr,onReplyDiscuss:Or,onPlusDiscuss:So})),Le.createElement(Gt.Z,{className:za.pagination,showTotal:nr=>Le.createElement("span",{style:{color:"#656F87"}},"\u5171",Le.createElement("span",{className:"c-light-primary"},nr),"\u6761\u6570\u636E"),current:Qn,onChange:To,total:ri,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},xa=De(6104),Aa=Object.defineProperty,Th=Object.getOwnPropertySymbols,Nl=Object.prototype.hasOwnProperty,Qs=Object.prototype.propertyIsEnumerable,Ah=(kt,Wt,qt)=>Wt in kt?Aa(kt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):kt[Wt]=qt,$h=(kt,Wt)=>{for(var qt in Wt||(Wt={}))Nl.call(Wt,qt)&&Ah(kt,qt,Wt[qt]);if(Th)for(var qt of Th(Wt))Qs.call(Wt,qt)&&Ah(kt,qt,Wt[qt]);return kt},Nh=(kt,Wt,qt)=>new Promise((ki,pi)=>{var Qn=En=>{try{Hn(qt.next(En))}catch(ri){pi(ri)}},Vn=En=>{try{Hn(qt.throw(En))}catch(ri){pi(ri)}},Hn=En=>En.done?ki(En.value):Promise.resolve(En.value).then(Qn,Vn);Hn((qt=qt.apply(kt,Wt)).next())}),ed=({active:kt,identifier:Wt,onAssist:qt,onEdit:ki,onArticlesSkip:pi,onClose:Qn,onOk:Vn,onDelete:Hn,detailsIndex:En,btnShowStatus:ri})=>{var Yi,Oi,er,Hi,sr,tr,so,Or,So,To;const[nr,Tr]=(0,Le.useState)(!0),[Mi,Vr]=(0,Le.useState)({});(0,Le.useEffect)(()=>{kt&&Lr()},[kt,En]);const Lr=(ko=!0)=>Nh(void 0,null,function*(){ko&&Tr(!0);const Ao=yield(0,ge.wO)(Wt,{active:kt});(Ao==null?void 0:Ao.status)===0&&Vr((Ao==null?void 0:Ao.data)||{}),Tr(!1)}),hr=ko=>Nh(void 0,null,function*(){const Ao=yield(0,ge.qe)(Wt,$h({active:kt},ko));(Ao==null?void 0:Ao.status)===0&&(Lr(!1),Vn())}),wo=ko=>Nh(void 0,null,function*(){(yield(0,ge.Rg)(Wt,{active:ko==null?void 0:ko.id})).status===0&&(Lr(!1),Vn())}),rr=ko=>{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:()=>Hn(ko)})},$o=()=>{Lr(!1),Vn()};return Le.createElement("div",{className:Ei.listDetails},Le.createElement(ms.Z,{className:"pt20 pl20 pr20",loading:nr,active:!0,paragraph:{rows:5}},Le.createElement("div",{className:Ei.head},Le.createElement("div",{className:Ei.name},Le.createElement("div",{title:Mi==null?void 0:Mi.name,className:Ei.title},Mi==null?void 0:Mi.name),(Mi==null?void 0:Mi.is_authority)&&Le.createElement("div",{className:Ei.b},"\u5B98\u65B9"),(Mi==null?void 0:Mi.is_excellent)&&Le.createElement("div",{className:Ei.a},"\u7CBE\u9009")),Le.createElement("div",{className:Ei.tag},Le.createElement("img",{src:xe.Z.IMG_SERVER+"/images/"+(Mi==null?void 0:Mi.image_url)}),Le.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},Mi==null?void 0:Mi.username),Le.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",Ke()(Mi==null?void 0:Mi.created_at).format("YYYY-MM-DD")),Le.createElement("span",null,Le.createElement("img",{src:cs}),Le.createElement("span",null,Mi==null?void 0:Mi.praises_count)),Le.createElement("span",null,Le.createElement("img",{src:jn}),Le.createElement("span",null,Mi==null?void 0:Mi.discusses_count)),Le.createElement("span",null,Le.createElement("img",{src:Dn}),Le.createElement("span",null,Mi==null?void 0:Mi.viewed_count)),Le.createElement("div",{className:Ei.btn},((0,or.Ny)()||(Mi==null?void 0:Mi.is_self))&&Le.createElement(Le.Fragment,null,Le.createElement(lt.ZP,{onClick:()=>rr(Mi),type:"primary",ghost:!0},"\u5220\u9664"),Le.createElement(lt.ZP,{onClick:()=>ki(Mi),type:"primary",ghost:!0},"\u7F16\u8F91")),(0,or.Ny)()&&Le.createElement(lt.ZP,{onClick:()=>hr({is_authority:!(Mi!=null&&Mi.is_authority)}),type:"primary"},Le.createElement("img",{src:Hl}),Mi!=null&&Mi.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),(0,or.Ny)()&&Le.createElement(lt.ZP,{onClick:()=>hr({is_excellent:!(Mi!=null&&Mi.is_excellent)}),type:"primary"},Le.createElement("img",{src:ga}),Mi!=null&&Mi.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),Le.createElement("div",{className:Ei.scroll},((Oi=(Yi=Mi==null?void 0:Mi.videos)==null?void 0:Yi[0])==null?void 0:Oi.id)&&Le.createElement("div",{className:Ei.video},Le.createElement(ve.Z,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!((Hi=(er=Mi==null?void 0:Mi.videos)==null?void 0:er[0])!=null&&Hi.transcoded)},Le.createElement(xa.Z,{poster:(tr=(sr=Mi==null?void 0:Mi.videos)==null?void 0:sr[0])==null?void 0:tr.cover_url,src:((Or=(so=Mi==null?void 0:Mi.videos)==null?void 0:so[0])==null?void 0:Or.play_url)||"",videoId:(To=(So=Mi==null?void 0:Mi.videos)==null?void 0:So[0])==null?void 0:To.id,logWatchHistory:()=>{}}))),Le.createElement(Rt.Z,{className:Ei.html,value:(Mi==null?void 0:Mi.content)||""}),Le.createElement("div",{onClick:()=>wo(Mi),className:Ei.g},Le.createElement("img",{className:"mr10",src:(Mi!=null&&Mi.user_liker,Ia)}),Le.createElement("span",null,Mi==null?void 0:Mi.praises_count)),Le.createElement(Ua,{onOk:$o,active:kt,identifier:Wt})),Le.createElement("div",{className:Ei.btns},Le.createElement(lt.ZP,{onClick:()=>Qn(),type:"primary",ghost:!0},"\u5173\u95ED"),ri[0]&&Le.createElement(lt.ZP,{onClick:ko=>pi(ko,"prev"),style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),ri[1]&&Le.createElement(lt.ZP,{onClick:ko=>pi(ko,"next"),style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},tn=Object.defineProperty,Kn=Object.getOwnPropertySymbols,Od=Object.prototype.hasOwnProperty,td=Object.prototype.propertyIsEnumerable,Pu=(kt,Wt,qt)=>Wt in kt?tn(kt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):kt[Wt]=qt,Cu=(kt,Wt)=>{for(var qt in Wt||(Wt={}))Od.call(Wt,qt)&&Pu(kt,qt,Wt[qt]);if(Kn)for(var qt of Kn(Wt))td.call(Wt,qt)&&Pu(kt,qt,Wt[qt]);return kt};const Dh=kt=>React.createElement("svg",Cu({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},kt),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 ec="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNMTMuNzI3IDBDMTQuOTgzIDAgMTYgLjg5NSAxNiAydjEyYzAgMS4xMDUtMS4wMTcgMi0yLjI3MyAySDIuMjczQzEuMDE3IDE2IDAgMTUuMTA1IDAgMTRWMkMwIC44OTUgMS4wMTcgMCAyLjI3MyAwaDExLjQ1NFpNNy40NjQgMTFIMi45NTVjLS4yNjYgMC0uNTEzLjE5LS42NDYuNXMtLjEzMy42OSAwIDFjLjEzMy4zMS4zOC41LjY0Ni41aDQuNTA5Yy40MTEgMCAuNzQ1LS40NDguNzQ1LTFzLS4zMzQtMS0uNzQ1LTFabTQtMy41SDIuOTU1Yy0uNDExIDAtLjc0NS40NDgtLjc0NSAxcy4zMzQgMSAuNzQ1IDFoOC41MDljLjQxMiAwIC43NDYtLjQ0OC43NDYtMXMtLjMzNC0xLS43NDYtMVpNMy43MSAyLjc1YTEuNSAxLjUgMCAxIDAgMCAzIDEuNSAxLjUgMCAwIDAgMC0zWiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzdEQzFGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9IjEuNSIgY3k9Ii41IiByPSIxNi41IiBmaWxsPSIjQTNEM0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiLz48ZWxsaXBzZSBjeD0iMS41IiBjeT0iLS41IiBmaWxsPSIjQzFFMkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48ZWxsaXBzZSBjeD0iLTIuNSIgY3k9Ii00IiBmaWxsPSIjRUVGN0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48L2c+PC9zdmc+",gh=De(28575),Gs=De(33463),Kr=Object.defineProperty,qa=Object.defineProperties,Dl=Object.getOwnPropertyDescriptors,Ds=Object.getOwnPropertySymbols,zo=Object.prototype.hasOwnProperty,la=Object.prototype.propertyIsEnumerable,Qa=(kt,Wt,qt)=>Wt in kt?Kr(kt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):kt[Wt]=qt,is=(kt,Wt)=>{for(var qt in Wt||(Wt={}))zo.call(Wt,qt)&&Qa(kt,qt,Wt[qt]);if(Ds)for(var qt of Ds(Wt))la.call(Wt,qt)&&Qa(kt,qt,Wt[qt]);return kt},wl=(kt,Wt)=>qa(kt,Dl(Wt)),sa=(kt,Wt,qt)=>new Promise((ki,pi)=>{var Qn=En=>{try{Hn(qt.next(En))}catch(ri){pi(ri)}},Vn=En=>{try{Hn(qt.throw(En))}catch(ri){pi(ri)}},Hn=En=>En.done?ki(En.value):Promise.resolve(En.value).then(Qn,Vn);Hn((qt=qt.apply(kt,Wt)).next())}),rs=({identifier:kt,tabStatus:Wt,setFilterListTotal:qt,setListStatus:ki})=>{const pi={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null};let[Qn,Vn]=(0,Le.useState)(is({},pi));const[Hn,En]=(0,Le.useState)(!1),[ri,Yi]=(0,Le.useState)(0),[Oi,er]=(0,Le.useState)(1),[Hi,sr]=(0,Le.useState)(null),[tr,so]=(0,Le.useState)([]),[Or,So]=(0,Le.useState)([!0,!0]),[To,nr]=(0,Le.useState)(0),Tr=(0,Le.useRef)(null);(0,Le.useEffect)(()=>{eo()},[Wt]),(0,Le.useEffect)(()=>{Mi()},[Hi]),(0,Le.useEffect)(()=>{Lr(is({},pi)),eo()},[kt]),(0,Le.useEffect)(()=>(window.addEventListener("resize",Vr),ki(To),()=>{window.removeEventListener("resize",Vr)}),[To]);const Mi=()=>sa(void 0,null,function*(){if(!Hi){So([!0,!0]);return}const ho=[!0,!0],Uo=tr==null?void 0:tr.findIndex(es=>es.id===Hi);Uo===0&&Qn.page===1&&(ho[0]=!1),(Qn.page-1)*Qn.limit+(Uo+1)===Qn.total&&(ho[1]=!1),So(ho)}),Vr=()=>{var ho;if(To){const Uo=window.innerWidth-((ho=Tr.current)==null?void 0:ho.clientWidth);Yi(Uo)}},Lr=ho=>sa(void 0,null,function*(){var Uo,es,Na;En(!0);const ha=yield(0,ge.WH)(kt,ho);return(ha==null?void 0:ha.status)===0&&(so(((Uo=ha==null?void 0:ha.data)==null?void 0:Uo.articles)||[]),Vn(wl(is({},ho),{total:(es=ha==null?void 0:ha.data)==null?void 0:es.articles_count})),qt((Na=ha==null?void 0:ha.data)==null?void 0:Na.articles_count)),En(!1),ha}),hr=()=>{(Qn==null?void 0:Qn.sort_direction)===null?Qn.sort_direction="asc":(Qn==null?void 0:Qn.sort_direction)==="asc"?Qn.sort_direction="desc":(Qn==null?void 0:Qn.sort_direction)==="desc"&&(Qn.sort_direction=null),Qn.page=1,eo(),Vn(is({},Qn)),Lr(Qn)},wo=()=>{Qn.page=1,Qn.search=Qn==null?void 0:Qn.save_search,eo(),Vn(is({},Qn)),Lr(Qn)},rr=()=>{var ho;const Uo=document.getElementsByClassName("btn-resize");Uo[0].style.visibility="hidden";const es=window.innerWidth-((ho=Tr.current)==null?void 0:ho.clientWidth);Yi(es)},$o=()=>{rr(),nr(1)},ko=ho=>{rr(),sr(ho==null?void 0:ho.id),nr(3)},Ao=ho=>{rr(),sr(ho==null?void 0:ho.id),nr(2)},eo=()=>{const ho=document.getElementsByClassName("btn-resize");ho[0].style.visibility="visible",Yi(0),nr(0),sr(null)},Bo=ho=>{nr(3),sr(ho),Qn.page=1,Vn(is({},Qn)),Lr(Qn)},Ri=ho=>{nr(3),sr(ho),Vn(is({},Qn)),Lr(Qn)},$s=ho=>{Vn(is({},Qn)),Lr(Qn)},_o=ho=>sa(void 0,null,function*(){(yield(0,ge.Rg)(kt,{active:ho==null?void 0:ho.id})).status===0&&(Lr(Qn),er(Oi+1))}),Rs=ho=>sa(void 0,null,function*(){(yield(0,ge.rL)(kt,{active:ho==null?void 0:ho.id})).status===0&&(Lr(Qn),er(Oi+1))}),ua=ho=>sa(void 0,null,function*(){(yield(0,ge.de)(kt,{active:ho==null?void 0:ho.id})).status===0&&(eo(),Lr(Qn))}),Cs=ho=>{Qn.page=ho,Vn(is({},Qn)),Lr(Qn)},_l=(ho,Uo)=>sa(void 0,null,function*(){var es,Na,ha,du;const bl=tr==null?void 0:tr.findIndex(Vs=>Vs.id===Hi);if(console.log(bl,Uo,22),Uo==="prev"){if(bl===void 0){me.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(bl===0){if(Qn.page===1){me.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(Qn.page!==1){Qn.page=Qn.page-1,Vn(is({},Qn));const Vs=yield Lr(Qn);if((Vs==null?void 0:Vs.status)===0){const ca=(ha=Vs==null?void 0:Vs.data)==null?void 0:ha.articles[((Na=(es=Vs==null?void 0:Vs.data)==null?void 0:es.articles)==null?void 0:Na.length)-1];sr(ca==null?void 0:ca.id),console.log(ho.target,555)}}}else{const Vs=tr[bl-1];sr(Vs==null?void 0:Vs.id)}}if(Uo==="next"){if(bl===void 0){me.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if((Qn.page-1)*Qn.limit+(bl+1)===Qn.total){me.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(bl+1===Qn.limit){Qn.page=Qn.page+1,Vn(is({},Qn));const Vs=yield Lr(Qn);if((Vs==null?void 0:Vs.status)===0){const ca=(du=Vs==null?void 0:Vs.data)==null?void 0:du.articles[0];sr(ca==null?void 0:ca.id)}}else{const Vs=tr[bl+1];sr(Vs==null?void 0:Vs.id)}}});return Le.createElement("div",{className:rn.wrap,ref:Tr},Le.createElement("div",{className:rn.head},Le.createElement("div",{className:rn.sort,onClick:hr},Le.createElement("span",null,"\u6700\u65B0"),Le.createElement("aside",null,Le.createElement(gh.Z,{style:{color:(Qn==null?void 0:Qn.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),Le.createElement(Gs.Z,{style:{color:(Qn==null?void 0:Qn.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),Le.createElement(st.default.Search,{value:Qn.save_search,className:rn["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:ho=>{Qn.save_search=ho.target.value,Vn(is({},Qn))},onSearch:wo}),Le.createElement("div",{onClick:$o,className:rn.btn},Le.createElement("img",{src:ec}),"\u5199\u9898\u89E3")),Le.createElement("div",{className:rn.listWarp},Le.createElement(ve.Z,{spinning:Hn,className:"mt20"},tr==null?void 0:tr.map((ho,Uo)=>{let es=!0;return Uo+1===tr.length&&Uo!==0&&(es=!1),Le.createElement(Sr,{active:Hi,key:ho.id,data:ho,showLine:es,onClick:ko,onAssist:_o,onHide:Rs})}),(tr==null?void 0:tr.length)===0&&Le.createElement(rt.Z,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),Le.createElement(Gt.Z,{className:rn.pagination,showTotal:ho=>Le.createElement("span",{style:{color:"#656F87"}},"\u5171",Le.createElement("span",{className:"c-light-primary"},ho),"\u6761\u6570\u636E"),total:Qn.total,showSizeChanger:!1,current:Qn==null?void 0:Qn.page,onChange:Cs,hideOnSinglePage:!0,showQuickJumper:!0}),To>0&&Le.createElement("div",{className:rn.fixedRight,style:{width:ri}},To===1&&Le.createElement(Ro,{identifier:kt,onClose:eo,onOk:Bo}),To===2&&Le.createElement(Ro,{active:Hi,identifier:kt,onClose:eo,onOk:Ri}),To===3&&Le.createElement(ed,{btnShowStatus:Or,onArticlesSkip:_l,detailsIndex:Oi,active:Hi,identifier:kt,onClose:eo,onOk:$s,onEdit:Ao,onAssist:_o,onDelete:ua})))},ba={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"},Jo=Object.defineProperty,bs=Object.defineProperties,Os=Object.getOwnPropertyDescriptors,Ws=Object.getOwnPropertySymbols,as=Object.prototype.hasOwnProperty,mh=Object.prototype.propertyIsEnumerable,Fr=(kt,Wt,qt)=>Wt in kt?Jo(kt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):kt[Wt]=qt,Bu=(kt,Wt)=>{for(var qt in Wt||(Wt={}))as.call(Wt,qt)&&Fr(kt,qt,Wt[qt]);if(Ws)for(var qt of Ws(Wt))mh.call(Wt,qt)&&Fr(kt,qt,Wt[qt]);return kt},Ko=(kt,Wt)=>bs(kt,Os(Wt)),Oh=(kt,Wt,qt)=>new Promise((ki,pi)=>{var Qn=En=>{try{Hn(qt.next(En))}catch(ri){pi(ri)}},Vn=En=>{try{Hn(qt.throw(En))}catch(ri){pi(ri)}},Hn=En=>En.done?ki(En.value):Promise.resolve(En.value).then(Qn,Vn);Hn((qt=qt.apply(kt,Wt)).next())}),nc=({visible:kt,onVisible:Wt,value:qt,onChange:ki,setIndex:pi})=>{var Qn;const Vn={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null};let[Hn,En]=(0,Le.useState)(Vn);const[ri,Yi]=(0,Le.useState)([]),[Oi,er]=(0,Le.useState)([]),[Hi,sr]=(0,Le.useState)(!1),tr=(0,Le.useRef)([]),so=(0,Le.useRef)(null),Or=(0,Me.useParams)();(0,Le.useEffect)(()=>(Or!=null&&Or.id&&(so.current=setInterval(()=>{So(30)},3e4)),()=>{clearInterval(so.current)}),[]);const So=rr=>Oh(void 0,null,function*(){const $o=yield(0,ge.uc)(Or==null?void 0:Or.id,{practice_time:rr})});(0,Le.useEffect)(()=>{Lr(Hn),Mi()},[]),(0,Le.useEffect)(()=>(window.addEventListener("click",nr),()=>{window.removeEventListener("click",nr)}),[Or==null?void 0:Or.save_identifier,kt]),(0,Le.useEffect)(()=>{const rr=tr.current.findIndex(Bo=>Bo.identifier===(Or==null?void 0:Or.save_identifier)),$o=tr.current[rr-1],ko=tr.current[rr+1],Ao=document.getElementById("oj-prev"),eo=document.getElementById("oj-next");$o?Ao.style.display="block":Ao.style.display="none",ko?eo.style.display="block":eo.style.display="none"},[Or==null?void 0:Or.save_identifier,tr.current]);const To=(rr,$o)=>{if(rr.id===$o)return rr;for(let ko=0,Ao=rr;Ao=Ao.parentNode;ko++){if(Ao.id===$o)return Ao;if(Ao==document.documentElement)return!1}},nr=rr=>Oh(void 0,null,function*(){!To(rr.target,"oj-drawer")&&kt&&Wt(!1);const $o=tr.current.findIndex(eo=>eo.identifier===(Or==null?void 0:Or.save_identifier)),ko=tr.current[$o-1],Ao=tr.current[$o+1];if(rr.target.id==="oj-prev"){if(!ko||$o===-1){me.ZP.warning("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728");return}rr.target.style.pointerEvents="none",rr.target.style.cursor="not-allowed",yield hr(ko==null?void 0:ko.identifier),pi("0"),setTimeout(()=>{rr.target.style.pointerEvents="auto",rr.target.style.cursor="pointer"},400)}if(rr.target.id==="oj-next"||rr.target.id==="oj-modal-next"){if(!Ao||$o===-1){me.ZP.warning("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728");return}rr.target.style.pointerEvents="none",rr.target.style.cursor="not-allowed",yield hr(Ao==null?void 0:Ao.identifier),pi("0"),setTimeout(()=>{rr.target.style.pointerEvents="auto",rr.target.style.cursor="pointer"},400)}});(0,Le.useEffect)(()=>{ki(Or==null?void 0:Or.save_identifier);const rr=Oi.findIndex($o=>$o.some(ko=>ko.identifier===(Or==null?void 0:Or.save_identifier)));En(rr===-1?Ko(Bu({},Hn),{page:1}):Ko(Bu({},Hn),{page:rr+1}))},[Or==null?void 0:Or.save_identifier,Oi]);const Tr=rr=>{Hn.page=1,Hn.tag_discipline_id=rr,En(Bu({},Hn)),Lr(Hn)},Mi=()=>Oh(void 0,null,function*(){const rr=yield(0,Ci.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});Yi(rr.tag_disciplines||[])}),Vr=rr=>{Hn.page=1,Hn.difficulty=typeof rr=="number"?rr:null,En(Bu({},Hn)),Lr(Hn)},Lr=rr=>Oh(void 0,null,function*(){var $o,ko;sr(!0);const Ao=yield(0,ge.KC)(rr);if(Ao!=null&&Ao.practices_list){for(var eo=($o=Ao==null?void 0:Ao.practices_list)==null?void 0:$o.length,Bo=[],Ri=0;Ri<eo;Ri+=Hn==null?void 0:Hn.per_page)Bo.push((ko=Ao==null?void 0:Ao.practices_list)==null?void 0:ko.slice(Ri,Ri+(Hn==null?void 0:Hn.per_page)));En(Ko(Bu({},Hn),{total:Ao==null?void 0:Ao.practices_count})),tr.current=(Ao==null?void 0:Ao.practices_list)||[],er(Bo)}sr(!1)}),hr=(rr,$o)=>Oh(void 0,null,function*(){const ko=yield(0,Ci.ZP)(`/api/practices/${rr}/start`,{method:"get"});(ko==null?void 0:ko.status)===0&&Me.history.push(`/problems/${ko==null?void 0:ko.identifier}/oj/${rr}`)}),wo=rr=>{Hn.page=rr,En(Bu({},Hn))};return Le.createElement("div",{className:ba.wrap,id:"oj-drawer",style:{left:kt?0:-700}},Le.createElement("div",{className:ba.head},Le.createElement("div",{className:ba.title},"\u9898\u76EE\u5217\u8868"),Le.createElement(st.default.Search,{value:Hn==null?void 0:Hn.save_search,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",style:{width:180,marginLeft:"auto",marginRight:10},onChange:rr=>{Hn.save_search=rr.target.value,En(Bu({},Hn))},onSearch:()=>{Hn.page=1,Hn.search=Hn.save_search,En(Bu({},Hn)),Lr(Hn)}}),Le.createElement(we.default,{value:Hn==null?void 0:Hn.tag_discipline_id,style:{width:210},mode:"multiple",placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,showArrow:!0,getPopupContainer:rr=>rr.parentNode,maxTagTextLength:2,maxTagCount:2,onChange:Tr},ri.map(rr=>Le.createElement(we.default.Option,{key:rr.id,value:rr.id},rr.name))),Le.createElement(we.default,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"\u96BE\u5EA6",getPopupContainer:rr=>rr.parentNode,value:Hn==null?void 0:Hn.difficulty,onChange:Vr},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:ba.content},Le.createElement(ve.Z,{spinning:Hi},(Qn=Oi==null?void 0:Oi[Hn.page-1])==null?void 0:Qn.map(rr=>Le.createElement("div",{key:rr.identifier,className:ba.list,onClick:$o=>hr(rr.identifier,$o)},Le.createElement("i",{style:{visibility:qt===rr.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),Le.createElement("span",{style:{fontWeight:qt===rr.identifier?"bold":400,color:qt===rr.identifier?"#ffffff":"#bac4cd"},title:rr==null?void 0:rr.name},rr.name),(rr==null?void 0:rr.difficulty)===1&&Le.createElement("b",{style:{color:"#2FA34F"}},"\u7B80\u5355"),(rr==null?void 0:rr.difficulty)===2&&Le.createElement("b",{style:{color:"#0152d9"}},"\u9002\u4E2D"),(rr==null?void 0:rr.difficulty)===3&&Le.createElement("b",{style:{color:"#FA6400"}},"\u56F0\u96BE"))))),Le.createElement("div",{className:ba.footer},Le.createElement(Gt.Z,{showTotal:rr=>Le.createElement("span",{style:{color:"#656F87"}},"\u5171",Le.createElement("span",{className:"c-light-primary"},rr),"\u6761\u6570\u636E"),total:Hn.total,pageSize:Hn==null?void 0:Hn.per_page,current:Hn==null?void 0:Hn.page,showSizeChanger:!1,onChange:wo,showQuickJumper:!0,hideOnSinglePage:!0})))},nd=({hack:kt,onTriggerPraise:Wt,topicId:qt,page:ki,onPageChange:pi,user:Qn,submitRecords:Vn,submitting:Hn,submitResult:En})=>{const[ri]=(0,Me.useSearchParams)(),Yi=(0,Me.useLocation)(),[Oi,er]=(0,Le.useState)(ri.get("tab")||"0"),[Hi,sr]=(0,Le.useState)(0),[tr,so]=(0,Le.useState)(0),[Or,So]=(0,Le.useState)(0),[To,nr]=(0,Le.useState)(),[Tr,Mi]=(0,Le.useState)(!1);function Vr(hr){const wo=hr.target.id;if(Oi==="3"&&wo!==Oi&&(tr===1||tr===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:()=>{er(wo)}});return}er(wo)}(0,Le.useEffect)(()=>hi.Z.subscribe("to-commit-info",()=>{er("1")}),[]);function Lr(){er("2")}return Le.createElement("div",{className:Vt["left-panel"]},Le.createElement("ul",{className:`${Vt["s-navs"]} ${Vt["bg-white"]} ${Vt.b1}`},Le.createElement("li",{className:"mr40 current"},Le.createElement("img",{onClick:()=>Mi(!0),src:Dr})),Le.createElement("li",{className:Vt["oj-mr"]},Le.createElement("a",{className:Oi==="0"?Vt.active:"",id:"0",onClick:Vr},"\u4EFB\u52A1\u63CF\u8FF0")),Le.createElement("li",{className:Vt["oj-mr"]},Le.createElement("a",{className:Oi==="3"?Vt.active:"",id:"3",onClick:Vr},"\u9898\u89E3",Or?`(${Or})`:"")),Le.createElement("li",{className:Vt["oj-mr"]},Le.createElement("a",{className:Oi==="2"?Vt.active:"",id:"2",onClick:Vr},"\u8BC4\u8BBA",Hi?`(${Hi})`:"")),Le.createElement("li",null,Le.createElement("a",{className:Oi==="1"?Vt.active:"",id:"1",onClick:Vr},"\u63D0\u4EA4\u8BB0\u5F55"))),Le.createElement("div",{className:`${Vt["tab-panel-body"]} ${Oi==="0"?"":"hide"}`,style:{padding:"0 0 0 16px"}},Le.createElement(Mn,{hack:kt,onTriggerPraise:Wt,toDiscuss:Lr})),Le.createElement("div",{className:`${Vt["tab-panel-body"]} ${Oi==="1"?"":"hide"}`},Vn!=null&&Vn.records_count?Le.createElement(Ue,{page:ki,onPageChange:pi,topicId:qt,submitting:Hn,submitRecords:Vn,submitResult:En}):Le.createElement(rt.Z,null)),Le.createElement("div",{className:`${Vt["tab-panel-body"]} ${Oi==="2"?"":"hide"}`,style:{padding:0}},Le.createElement(Bn,{setDiscussTotal:sr,user:Qn,identifier:kt.identifier,hack:kt,onTriggerPraise:Wt})),Le.createElement("div",{className:`${Vt["tab-panel-body"]} ${Oi==="3"?"":"hide"}`,style:{padding:0}},Le.createElement(rs,{setListStatus:so,setFilterListTotal:So,tabStatus:Oi,identifier:kt.identifier})),Le.createElement(nc,{visible:Tr,setIndex:er,onVisible:hr=>Mi(hr),value:To,onChange:hr=>nr(hr)}))},Ec=De(88508),ju=De(62522),eh=De(22707),us=De(8861),zu=De(96486),_t=De.n(zu),Ht=De(74855),Bt=De(67294),Qt=Object.defineProperty,fn=Object.defineProperties,wn=Object.getOwnPropertyDescriptors,bn=Object.getOwnPropertySymbols,On=Object.prototype.hasOwnProperty,ti=Object.prototype.propertyIsEnumerable,Jn=(kt,Wt,qt)=>Wt in kt?Qt(kt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):kt[Wt]=qt,oi=(kt,Wt)=>{for(var qt in Wt||(Wt={}))On.call(Wt,qt)&&Jn(kt,qt,Wt[qt]);if(bn)for(var qt of bn(Wt))ti.call(Wt,qt)&&Jn(kt,qt,Wt[qt]);return kt},Wn=(kt,Wt)=>fn(kt,wn(Wt)),ci=(kt,Wt)=>{var qt={};for(var ki in kt)On.call(kt,ki)&&Wt.indexOf(ki)<0&&(qt[ki]=kt[ki]);if(kt!=null&&bn)for(var ki of bn(kt))Wt.indexOf(ki)<0&&ti.call(kt,ki)&&(qt[ki]=kt[ki]);return qt},ni=(kt,Wt,qt)=>new Promise((ki,pi)=>{var Qn=En=>{try{Hn(qt.next(En))}catch(ri){pi(ri)}},Vn=En=>{try{Hn(qt.throw(En))}catch(ri){pi(ri)}},Hn=En=>En.done?ki(En.value):Promise.resolve(En.value).then(Qn,Vn);Hn((qt=qt.apply(kt,Wt)).next())});const{Countdown:Ai}=Ee.default,qi={Java:"java",C:"c",Python:"py","C++":"c"};var yr=(kt=>(kt[kt.SET_LOADING=0]="SET_LOADING",kt[kt.GET_DATA=1]="GET_DATA",kt[kt.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",kt[kt.SET_DATA=3]="SET_DATA",kt[kt.SET_DEBUGING=4]="SET_DEBUGING",kt[kt.SET_SUBMITING=5]="SET_SUBMITING",kt[kt.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",kt[kt.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",kt[kt.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",kt[kt.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",kt[kt.SET_PAGE=10]="SET_PAGE",kt[kt.GET_LANGUAGE=11]="GET_LANGUAGE",kt[kt.GET_DRAWER=12]="GET_DRAWER",kt))(yr||{});function Mr(){return new Date().getTime()}const Fi={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 fr(kt,Wt){switch(Wt.type){case 1:return oi(oi({},kt),Wt.payload);case 3:return Wn(oi({},kt),{data:Wt.payload});case 0:return Wn(oi({},kt),{loading:Wt.payload});case 11:return Wn(oi({},kt),{languageList:Wt.payload});case 12:return Wn(oi({},kt),{drawerData:Wt.payload});case 9:return Wn(oi({},kt),{showNote:Wt.payload});case 4:return Wn(oi({},kt),{debuging:Wt.payload});case 5:return Wn(oi({},kt),{submitting:Wt.payload});case 2:return Wn(oi({},kt),{submitRecords:Wt.payload});case 10:return Wn(oi({},kt),{submitRecordPage:Wt.payload});case 6:return Wn(oi({},kt),{executingMessage:Wt.payload});case 7:return oi(oi({},kt),Wt.payload);case 8:return oi(oi({},kt),Wt.payload);default:throw new Error}}var Xi=({children:kt})=>{var Wt,qt,ki,pi;const[Qn,Vn]=(0,Le.useReducer)(fr,Fi),{id:Hn}=(0,Me.useParams)(),En=(0,Me.useLocation)(),[ri]=(0,Me.useSearchParams)(),{languageValue:Yi,languageList:Oi,loading:er,data:Hi,debugResult:sr,submitResult:tr,submitRecords:so,submitRecordPage:Or,showNote:So,debuging:To,submitting:nr,executingMessage:Tr}=Qn,[Mi,Vr]=(0,Le.useState)("#FFF"),[Lr,hr]=(0,Le.useState)(null),[wo,rr]=(0,Le.useState)({}),[$o,ko]=(0,Le.useState)(!1),Ao=(0,Le.useRef)(null),eo=(0,Le.useRef)(null),Bo=Hi==null?void 0:Hi.user,Ri=Hi==null?void 0:Hi.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 Eo;if($o){const Ms=document.getElementById("oj-next"),Pa=document.getElementById("oj-modal-next");((Eo=Ms==null?void 0:Ms.style)==null?void 0:Eo.display)==="none"?Pa.style.display="none":Pa.style.display="block"}},[$o]),(0,Le.useEffect)(()=>{function Eo(){return ni(this,null,function*(){var Ms,Pa,$a;const ea=yield(0,ge.fu)(Hn);if(ea.status===401)document.location.href="/user/login";else{ea.hack=ea.practice,ea.hack.code=wt.Base64.decode((Ms=ea==null?void 0:ea.hack)==null?void 0:Ms.code);const Ha=`${Bo==null?void 0:Bo.login}-language`;localStorage.getItem(Ha)&&(ea.hack.language=localStorage.getItem(Ha)),eo.current=_t().cloneDeep(ea),eo.current.language=(Pa=ea==null?void 0:ea.hack)==null?void 0:Pa.language,Vn({type:1,payload:{loading:!1,data:ea}}),Vn({type:8,payload:{languageValue:($a=ea==null?void 0:ea.hack)==null?void 0:$a.language}})}})}Hn&&Eo()},[Hn]),(0,Le.useEffect)(()=>{Vn({type:8,payload:{debugResult:void 0}}),Rs(),ko(!1)},[Hn]),(0,Le.useEffect)(()=>{clearTimeout(Ao.current)},[Hn]),(0,Le.useEffect)(()=>{_o()},[Hn,Or]);const $s=()=>{window.parent.postMessage("backExercise","*")};function _o(){return ni(this,null,function*(){try{const Eo=yield(0,ge.zO)(Hn,{limit:15,page:Or});Vn({type:2,payload:Eo})}catch(Eo){console.log(Eo)}})}function Rs(){return ni(this,null,function*(){try{const Eo=yield(0,ge.dd)(Hn);Vn({type:11,payload:Eo==null?void 0:Eo.data})}catch(Eo){console.log(Eo)}})}function ua(Eo){Vn({type:10,payload:Eo})}function Cs(Eo){return ni(this,null,function*(){var Ms,Pa,$a;const ea=(($a=(Pa=(Ms=window==null?void 0:window.location)==null?void 0:Ms.pathname)==null?void 0:Pa.split("/"))==null?void 0:$a[2])||Hn;return yield(0,ge.n4)(ea,Eo||{code:wt.Base64.encode(Ri.code),language:Yi})})}function _l(){return ni(this,null,function*(){var Eo;if(!Ri.code||((Eo=Ri.code)==null?void 0:Eo.trim())===""){me.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(!nr){Vn({type:5,payload:!0});try{if(hi.Z.publish("to-commit-info"),(yield Cs()).status===0){let nu=function(){return ni(this,null,function*(){const{status:Kl,data:ys}=yield(0,ge.rX)(Hn,"submit"),ll=Mr()-Ga>(ea*Ha+3)*1e3;if(Kl!==0&&!ll&&setTimeout(nu,1e3),ll){be.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),Vn({type:5,payload:!1});return}if(Kl===0){ys.status===2&&be.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"});const fu=yield(0,ge.zO)(Hn,{limit:15,page:Or});Vn({type:8,payload:Wn(oi({},Qn),{submitResult:ys,submitting:!1,submitRecords:fu})}),(ys==null?void 0:ys.status)===0&&ko(!0)}})},Pa={};if((yield(0,ge.bM)(Hn,Pa)).status===-1&&ri.get("exercisesId")){window.parent.location.href=`/classrooms/${ri.get("coursesId")}/exercise/${ri.get("exercisesId")}/detail`;return}const{time_limit:ea,test_case_size:Ha}=Ri,Ga=Mr();nu()}}catch(Ms){Vn({type:5,payload:!1})}}})}function ho(){return ni(this,null,function*(){var Eo;if(!Ri.code||((Eo=Ri.code)==null?void 0:Eo.trim())===""){me.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}Qn.debuging=!0,Vn({type:4,payload:!0});try{if((yield Cs()).status===0){let Ga=function(){return ni(this,null,function*(){const{status:nu,message:Kl,data:ys}=yield(0,ge.rX)(Hn,"debug"),ll=Mr()-Ha>(Pa+3)*1e3;if(nu!==0&&!ll&&(Vn({type:6,payload:Kl}),setTimeout(Ga,1e3)),ll){be.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Vn({type:4,payload:!1});return}nu===0&&(Vn({type:4,payload:!1}),ys.status===2&&be.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Vn({type:7,payload:Wn(oi({},Qn),{debugResult:ys,debuging:!1})}))})};const{time_limit:Pa}=Ri;let $a={input:encodeURIComponent(Hi.test_case.input)};if((yield(0,ge.MU)(Hn,$a)).status===-1&&ri.get("exercisesId")){window.parent.location.href=`/classrooms/${ri.get("coursesId")}/exercise/${ri.get("exercisesId")}/detail`;return}const Ha=Mr();Ga()}else Vn({type:4,payload:!1})}catch(Ms){console.log(Ms)}finally{}})}function Uo(Eo){var Ms;clearTimeout(Ao.current),Ao.current=setTimeout(()=>{var Pa;Cs({code:wt.Base64.encode(Eo),language:(Pa=eo==null?void 0:eo.current)==null?void 0:Pa.language})},2e3),Vn({type:3,payload:Wn(oi({},eo==null?void 0:eo.current),{hack:Wn(oi({},(Ms=eo==null?void 0:eo.current)==null?void 0:Ms.hack),{code:Eo})})})}function es(Eo){let Ms=Eo.target.value;Vn({type:3,payload:Wn(oi({},Hi),{test_case:{input:Ms}})})}const Na=Eo=>ni(void 0,null,function*(){var Ms;if(Vn({type:0,payload:!0}),(yield Cs()).status===0){Vn({type:8,payload:{languageValue:Eo}}),eo.current.language=Eo;const $a=`${Bo==null?void 0:Bo.login}-language`;localStorage.setItem($a,Eo);const ea=yield(0,ge.dd)(Hn);if(ea.status===0){const Ha=(Ms=ea==null?void 0:ea.data)==null?void 0:Ms.find(Ga=>Ga.language===Eo);Uo(wt.Base64.decode(Ha.code))}}setTimeout(()=>{Vn({type:0,payload:!1})},300)});function ha(){return ni(this,null,function*(){try{const Eo=yield(0,ge.H7)(Hn,{language:Yi});Eo.status===401?Me.history.replace("/login",{from:En.pathname}):(Uo(wt.Base64.decode(Eo.code)),Rs())}catch(Eo){console.log(Eo)}})}function du(){be.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:Bt.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",Bt.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk(){return ni(this,null,function*(){const Eo=yield(0,ge.fi)(Hn,{language:Yi});Eo.status===401?Me.history.replace("/login",{from:En.pathname}):Uo(wt.Base64.decode(Eo.code))})}})}function bl(){Vn({type:9,payload:!0})}function Vs(){Vn({type:9,payload:!1})}function ca(Eo){return ni(this,null,function*(){yield(0,ge.MK)(Hn,Eo),Vn({type:1,payload:{showNote:!1,data:Wn(oi({},Hi),{hack:Wn(oi({},Ri),{notes:Eo.notes})})}})})}const Eu={input:(Wt=Hi==null?void 0:Hi.test_case)==null?void 0:Wt.input,is_file:(qt=Hi==null?void 0:Hi.test_case)==null?void 0:qt.is_file,language:((ki=eo.current)==null?void 0:ki.language)||(Ri==null?void 0:Ri.language),code:Ri==null?void 0:Ri.code,title:"main."+qi[Ri==null?void 0:Ri.language],modify_code:Ri==null?void 0:Ri.modify_code,notes:Ri==null?void 0:Ri.notes,debugResult:sr,debuging:To,submitting:nr,executingMessage:Tr,id:Hn,languageValue:Yi,languageList:Oi,onChangeLanguage:Na,onCancelNote:Vs,onAddNote:ca,showNote:So,onShowNote:bl,onSubmitCode:_l,onChangeCode:Uo,onChangeInput:es,onDebugCode:ho,onResetCode:ha,onSyncCode:du,onUpdateCode:Cs};function Da(){return ni(this,null,function*(){const{praise_count:Eo}=yield(0,ge.vl)(Ri.id,{container_type:"Hack",type:1});let Ms=Wn(oi({},Hi),{hack:Wn(oi({},Ri),{praises_count:Eo,user_praise:!Ri.user_praise})});Vn({type:3,payload:Ms})})}const Wl={topicId:Hn,submitResult:tr,submitRecords:so,submitting:nr,page:Or,onPageChange:ua,hack:Ri,user:Hi==null?void 0:Hi.user,onTriggerPraise:Da};return console.log(Hi,eo==null?void 0:eo.current,"data--------"),Bt.createElement(Bt.Fragment,null,Bt.createElement(ve.Z,{className:"oj-custom-large-spin",size:"large",spinning:er},Hi?Bt.createElement("div",{className:"oj-custom-warp"},Bt.createElement("header",{className:ft.Z.header,style:{minWidth:1200}},Bt.createElement("div",null,Bt.createElement("img",{src:`${xe.Z.IMG_SERVER}/images/${Bo.image_url}`,alt:"user",width:30}),Bt.createElement("span",null,Bo.name)),Bt.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},Bt.createElement("div",null,Ri.name),Bt.createElement(Ec.Z,{onChange:Eo=>{},className:"font12 c-grey-999"})),Bt.createElement(Ht.CopyToClipboard,{text:`${(pi=window.location)==null?void 0:pi.origin}/problems/${Ri.identifier}/share`,onCopy:()=>me.ZP.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")},Bt.createElement("span",{className:ft.Z.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",Bt.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),Ri.edit_privilege?Bt.createElement(Me.Link,{className:ft.Z.btn_back,to:`/problems/${Ri.identifier}/ojedit`,style:{marginRight:10}}," ",Bt.createElement(ye.Z,null)," \u7F16\u8F91"):null,Bt.createElement(Me.Link,{className:ft.Z.btn_back,onClick:()=>{},to:"/problems"}," ",Bt.createElement(Fe.Z,null),"\u9000\u51FA")),Bt.createElement(he.Z,{hideResize:!0,className:"my-problems oj-problems",leftChild:Bt.createElement(nd,oi({},Wl)),rightChild:Bt.createElement(oo,oi({},Eu))})):null),Bt.createElement(be.default,{centered:!0,closable:!1,width:680,footer:null,open:$o,className:"oj-modal"},Bt.createElement("section",{className:"oj-modal-content"},Bt.createElement("div",{className:"oj-modal-head"},Bt.createElement("img",{src:ju,alt:""}),Bt.createElement("i",{onClick:()=>ko(!1),className:"iconfont icon-guanbi1"})),Bt.createElement("aside",null,Bt.createElement("img",{className:"mr30",src:us.Z}),"\u8FD0\u884C\u65F6\u95F4:\xA0",Bt.createElement("span",{style:{color:"#75d6ba",marginRight:100}},tr==null?void 0:tr.execute_time,"s"),"\u4F18\u4E8E",Bt.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(tr==null?void 0:tr.time_better_than)||100,"%"),"\u7684\u7528\u6237"),Bt.createElement("aside",{className:"mb50"},Bt.createElement("img",{src:eh.Z,className:"mr30"}),Bt.createElement("span",{className:"oj-modal-tt"},Bt.createElement("span",null,Bt.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),Bt.createElement("span",{className:"c-light-primary"},tr==null?void 0:tr.execute_memory,"mb")),Bt.createElement("span",null,Bt.createElement("span",null))),"\u4F18\u4E8E",Bt.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(tr==null?void 0:tr.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),Bt.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function Ar({languageValue:kt,languageList:Wt,onChangeLanguage:qt,title:ki,modify_code:pi,onSyncCode:Qn,onShowCodeSetting:Vn,onResetCode:Hn}){const En=(0,Me.useLocation)(),ri=()=>{be.default.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:Bt.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:Hn})};return Bt.createElement("div",{className:"action-bar"},Bt.createElement(we.default,{className:"oj-select",value:kt,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:qt},Wt==null?void 0:Wt.map(Yi=>Bt.createElement(we.default.Option,{key:Yi.language,value:Yi.language},Yi.language))),Bt.createElement("span",null),Bt.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:ri},Bt.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),Bt.createElement("a",{onClick:Vn},Bt.createElement("i",{className:"iconfont icon-shezhi"})))}function oo(kt){var Wt=kt,{id:qt,input:ki,is_file:pi,showNote:Qn,onShowNote:Vn,notes:Hn,onCancelNote:En,onAddNote:ri,debugResult:Yi,language:Oi,debuging:er,submitting:Hi,executingMessage:sr,code:tr,onSubmitCode:so,onDebugCode:Or,onChangeCode:So,onChangeInput:To,onUpdateCode:nr}=Wt,Tr=ci(Wt,["id","input","is_file","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function Mi(Lr){return Bt.createElement(Ar,Wn(oi({},Tr),{onShowCodeSetting:Lr}))}const Vr={id:qt,input:ki,debugResult:Yi,debuging:er,is_file:pi,submitting:Hi,executingMessage:sr,onDebugCode:Or,onChangeCode:So,onSubmitCode:so,onChangeInput:To};return Bt.createElement("div",{className:"right-panel"},Bt.createElement(Mt,{onUpdateCode:()=>{},language:Oi,value:tr,onChange:So,ActionBarRender:Mi}),Bt.createElement("div",{className:`note-form-area ${Qn?"active":""}`},Bt.createElement(yt,{onCancel:En,notes:Hn,callback:ri})),Bt.createElement($t.ZP,oi({},Vr)))}},94189:function(_n,hn,De){"use strict";De.d(hn,{h:function(){return Le}});var Le=(ye=>(ye[ye.NOMATCH=-1]="NOMATCH",ye[ye.OK=0]="OK",ye[ye.TIMEOUT=2]="TIMEOUT",ye[ye.PODFAILURE=3]="PODFAILURE",ye[ye.COMPILEFAILURE=4]="COMPILEFAILURE",ye[ye.EXECUTEFAILURE=5]="EXECUTEFAILURE",ye[ye.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",ye))(Le||{})},33227:function(_n,hn,De){"use strict";De.d(hn,{H7:function(){return we},KC:function(){return ue},M3:function(){return ie},MK:function(){return ve},MU:function(){return Me},Rg:function(){return Se},WH:function(){return ee},X6:function(){return me},bM:function(){return Fe},bx:function(){return z},dd:function(){return xe},de:function(){return Ce},fi:function(){return ge},fu:function(){return ye},gu:function(){return oe},n4:function(){return he},qe:function(){return le},rL:function(){return pe},rX:function(){return be},uc:function(){return Ae},vl:function(){return fe},wO:function(){return se},zO:function(){return Ee}});var Le=De(33170);function ye(Oe){return(0,Le.U2)(`mypractices/${Oe}.json`,{hidePopLogin:!0})}function Fe(Oe,Re){return(0,Le.v_)(`mypractices/${Oe}/code_submit.json`,Re)}function Me(Oe,Re){return(0,Le.v_)(`mypractices/${Oe}/code_debug.json`,Re)}function Ee(Oe,Re){return Re.language&&(Re.language=encodeURIComponent(Re.language)),(0,Le.U2)(`mypractices/${Oe}/submit_records.json`,Re)}function me(Oe){return(0,Le.U2)("mypractices/record_detail.json",{id:Oe})}function be(Oe,Re){return(0,Le.U2)(`mypractices/${Oe}/result.json`,{mode:Re})}function ve(Oe,Re){return(0,Le.v_)(`mypractices/${Oe}/add_notes.json`,Re)}function we(Oe,Re){return(0,Le.v_)(`mypractices/${Oe}/restore_initial_code.json`,Re)}function ge(Oe,Re){return(0,Le.v_)(`mypractices/${Oe}/sync_code.json`,Re)}function he(Oe,Re){return(0,Le.v_)(`mypractices/${Oe}/update_code.json`,Re)}function xe(Oe){return(0,Le.v_)(`mypractices/${Oe}/initial_codes.json`)}function fe(Oe,Re){return(0,Le.v_)(`discusses/${Oe}/plus.json`,Re)}function ue(Oe){return(0,Le.U2)("practices/practices_list.json",Oe)}function ee(Oe,Re){return(0,Le.U2)(`practices/${Oe}/question_solution_articles`,Re)}function z(Oe,Re){return(0,Le.v_)(`practices/${Oe}/question_solution_articles`,Re)}function oe(Oe,Re){return(0,Le.gz)(`practices/${Oe}/question_solution_articles/${Re==null?void 0:Re.active}`,Re)}function ie(Oe,Re){return(0,Le.U2)(`practices/${Oe}/question_solution_articles/${Re==null?void 0:Re.active}/edit`,Re)}function se(Oe,Re){return(0,Le.U2)(`practices/${Oe}/question_solution_articles/${Re==null?void 0:Re.active}`,Re)}function le(Oe,Re){return(0,Le.v_)(`practices/${Oe}/question_solution_articles/${Re==null?void 0:Re.active}/set_authority_or_excellent`,Re)}function Se(Oe,Re){return(0,Le.v_)(`practices/${Oe}/question_solution_articles/${Re==null?void 0:Re.active}/praise_or_treads`,Re)}function pe(Oe,Re){return(0,Le.v_)(`practices/${Oe}/question_solution_articles/${Re==null?void 0:Re.active}/hide`)}function Ce(Oe,Re){return(0,Le.IV)(`practices/${Oe}/question_solution_articles/${Re==null?void 0:Re.active}`,Re)}function Ae(Oe,Re){return(0,Le.v_)(`mypractices/${Oe}/update_practice_time_sum`,Re)}},93989:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return fe}});var Le=De(67294),ye=De(2453),Fe=De(83062),Me=De(74330),Ee=De(71230),me=De(15746),be=De(14845),ve=De(85804),we=De(35567),ge=De(33170),he=De(65226),xe=(ee,z,oe)=>new Promise((ie,se)=>{var le=Ce=>{try{pe(oe.next(Ce))}catch(Ae){se(Ae)}},Se=Ce=>{try{pe(oe.throw(Ce))}catch(Ae){se(Ae)}},pe=Ce=>Ce.done?ie(Ce.value):Promise.resolve(Ce.value).then(le,Se);pe((oe=oe.apply(ee,z)).next())}),fe=({id:ee,activeDiscussIndex:z,onReplyDiscuss:oe,adminOrOperator:ie})=>{const[se,le]=(0,Le.useState)(""),[Se,pe]=(0,Le.useState)(!1);function Ce(Oe){le(Oe)}function Ae(){if(!se){ye.ZP.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}oe(ee,se),le("")}return(0,Le.useEffect)(()=>{z!=ee&&pe(!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:se,id:ee,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:Ce,extraUse:ie&&Le.createElement(Fe.Z,{color:"#fff",open:Se,destroyTooltipOnHide:!0,title:ue({id:ee,isOpen:Se,activeDiscussIndex:z,onChange:Ce,setIsOpen:pe}),overlayStyle:{maxWidth:600}},Le.createElement("a",{title:Se?"\u5173\u95ED\u63A8\u8350":"\u6253\u5F00\u63A8\u8350",onClick:()=>pe(!Se)},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),[ie,se]=(0,Le.useState)([]),[le,Se]=(0,Le.useState)(1);(0,Le.useEffect)(()=>{ee!=null&&ee.isOpen?pe():(Se(1),se([]))},[ee==null?void 0:ee.isOpen]);const pe=()=>xe(void 0,null,function*(){oe(!0);const Ce=yield(0,ge.ZP)(`/api/discusses/${ee==null?void 0:ee.id}/recommend_answer.json`,{method:"get"});(Ce==null?void 0:Ce.status)==0&&se(Ce==null?void 0:Ce.answer),oe(!1)});return Le.createElement(Me.Z,{spinning:z},Le.createElement("div",{style:{color:"#000"}},Le.createElement(he.Z,{className:"font14",style:{maxHeight:500,overflow:"auto"},value:(ie==null?void 0:ie[le-1])||""}),Le.createElement(Ee.Z,{justify:"end",align:"middle"},Le.createElement(me.Z,null,Le.createElement(be.Z,{simple:!0,current:le,pageSize:1,total:(ie==null?void 0:ie.length)||0,onChange:Ce=>{Se(Ce)}})),Le.createElement(me.Z,null,Le.createElement(ve.ZP,{onClick:()=>xe(void 0,null,function*(){ee==null||ee.onChange(ie==null?void 0:ie[le-1]),ee==null||ee.setIsOpen(!1)})},"\u586B\u5165\u6587\u672C\u6846")))))}},62263:function(_n,hn,De){"use strict";De.d(hn,{o:function(){return we}});var Le=De(33170),ye=De(69548),Fe=De.n(ye);let Me="",Ee,me="";function be(ge){ve(ge)}function ve(ge){Ee=new(Fe()).Vod({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:0x6803cbd867207,enableUploadProgress:!1,addFileSuccess:function(he){console.log("addFileSuccess: "+he.file.name),ge.addFileSuccess&&ge.addFileSuccess(he),Ee.startUpload()},onUploadstarted:function(he){const xe=he.file.name;if(he.videoId){var ue=`/api/users/${Me}/video_auths.json`;(0,Le.ZP)(ue,{method:"put",body:{video_id:he.videoId,title:xe,file_name:xe,virtual_classroom_id:me}}).then(ee=>{if(ee.status==-1){ge.onUploadError&&ge.onUploadError(he);return}const z=ee.data;var oe=z.UploadAuth,ie=z.UploadAddress,se=z.VideoId;Ee.setUploadAuthAndAddress(he,oe,ie)}).catch(ee=>{Ee.deleteFile(Ee._curIndex),Ee.nextUpload(),console.log(ee)})}else{var fe=`/api/users/${Me}/video_auths.json`;const ee="";(0,Le.ZP)(fe,{method:"Post",body:{title:ee+xe,file_name:ee+xe,virtual_classroom_id:me}}).then(z=>{if(z){const le=z.data;var oe=le.UploadAuth,ie=le.UploadAddress,se=le.VideoId;Ee.setUploadAuthAndAddress(he,oe,ie,se)}}).catch(z=>{Ee.deleteFile(Ee._curIndex),Ee.nextUpload(),console.log(z)}),console.log("\u6587\u4EF6\u5F00\u59CB\u4E0A\u4F20...")}},onUploadSucceed:function(he){ge.onUploadSucceed&&ge.onUploadSucceed(he),console.log("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F!")},onUploadFailed:function(he,xe,fe){ge.onUploadFailed&&ge.onUploadFailed(he),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(he,xe,fe){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(he,xe,fe){ge.onUploadProgress&&ge.onUploadProgress(he,xe,fe);var ue=Math.ceil(fe*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(he){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var xe=`/api/users/${Me}/video_auths.json`;(0,Le.ZP)(xe,{method:"put",body:{video_id:he.videoId}}).then(fe=>{var ee=fe.data.UploadAuth;Ee.resumeUploadWithAuth(ee)}).catch(fe=>{console.log(fe)})},onUploadEnd:function(he){ge.onUploadEnd&&ge.onUploadEnd(he),console.log("onUploadEnd: uploaded all the files")}}),ge.gotUploader&&ge.gotUploader(Ee)}function we(ge,he,xe){ge&&(Me=ge),he&&(me=he),be(xe)}},51959:function(_n,hn,De){"use strict";De.d(hn,{BU:function(){return ye},Dj:function(){return Le},gH:function(){return Fe},vp:function(){return Me}});function Le(Ee){try{Ee.mozRequestFullScreen?Ee.mozRequestFullScreen():Ee.webkitRequestFullScreen&&Ee.webkitRequestFullScreen()}catch(me){console.log(me,":e")}}function ye(){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 Fe=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function Me(){var Ee=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,me=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",Ee),window.isFullScreen?window.isFullScreen:Ee!=null}},51161:function(_n,hn,De){"use strict";De.d(hn,{AL:function(){return Se},Iy:function(){return he},Qv:function(){return ue},ez:function(){return le},jb:function(){return xe}});var Le=De(47084),ye=De.n(Le),Fe=De(90621),Me=De.n(Fe);let Ee=1;function me(Re,We){const $e=Re.match(/^(\s+)(?:```)/);if($e===null)return We;const Je=$e[1];return We.split(`
|
|
|
`).map(pt=>{const St=pt.match(/^\s+/);if(St===null)return pt;const[Mt]=St;return Mt.length>=Je.length?pt.slice(Je.length):pt}).join(`
|
|
|
`)}let be=[],ve=["<ul>"];const we=new(ye()).Renderer,ge=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function he(){be.length=0,ve=["<ul>"]}const xe={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function fe(Re,We,$e,Je){if(We>=Re.length||Re[We].level<=$e)return We;var pt=Re[We];Je.push("<li><a href='#"+Ee+pt.anchor+"'>"+pt.text+"</a>"),We++;var St=[];return We=fe(Re,We,pt.level,St),St.length>0&&(Je.push("<ul>"),St.forEach(function(Mt){Je.push(Mt)}),Je.push("</ul>")),Je.push("</li>"),We=fe(Re,We,$e,Je),We}function ue(){return fe(be,0,0,ve),ve.push("</ul>"),ve.join("")}const ee={heading(Re){const We=ge.exec(Re);if(Ee+=1,We)return{type:"heading",raw:We[0],depth:We[1].length,text:We[2]}},fences(Re){const We=this.rules.block.fences.exec(Re);if(We){const $e=We[0];let Je=me($e,We[3]||"");const pt=We[2]?We[2].trim():We[2];if(["latex","katex","math"].indexOf(pt)>=0){const St=ie(),Mt=Je;Je=St,se[St]={type:"block",expression:Mt}}return{type:"code",raw:$e,lang:pt,text:Je}}}},z=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let oe=0;const ie=()=>`__special_katext_id_${oe++}__`;let se={};function le(){return se}function Se(){oe=0,se={}}function pe(Re){return Re=Re.replace(z,(We,$e)=>{const Je=ie();return se[Je]={type:"inline",expression:$e},Je}),Re}const Ce=we.listitem;we.listitem=function(Re){return Ce(pe(Re))};const Ae=we.paragraph;we.paragraph=function(Re){return Ae(pe(Re))};const Oe=we.tablecell;we.tablecell=function(Re,We){return Oe(pe(Re),We)},we.code=function(Re,We,$e){const Je=(We||"").match(/\S*/)[0];return Je?["latex","katex","math"].indexOf(Je)>=0?`<p class='editormd-tex'>${Re}</p>`:`<pre class="prettyprint linenums"><code class="language-${We}">${$e?Re:(0,Fe.escape)(Re,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+($e?Re:(0,Fe.escape)(Re,!0))+"</code></pre>"},we.heading=function(Re,We,$e){let Je=this.options.headerPrefix+$e.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return be.push({anchor:Je,level:We,text:Re}),"<h"+We+' id="'+Ee+Je+'">'+Re+"</h"+We+">"},ye().setOptions({silent:!0,gfm:!0,pedantic:!1}),ye().use({tokenizer:ee,renderer:we}),hn.ZP=ye()},40471:function(_n,hn,De){"use strict";De.d(hn,{G:function(){return Ee},t:function(){return Me}});var Le=De(58971),ye=De.n(Le);const Fe=null;function Me(me,be){let ve=ye().get("__ec");ve||(ve={}),ve[me]=be,ye().set("__ec",ve)}function Ee(me,be){let ve=ye().get("__ec");return ve?ve[me]===void 0?be:ve[me]:be}},24577:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return qr}});class Le{static install(){Object.setPrototypeOf=Object.setPrototypeOf||function(He,Ve){return He.__proto__=Ve,He},Object.assign=Object.assign||function(He){if(He==null)throw new TypeError("Cannot convert undefined or null to object");let Ve=Object(He);for(let ot=1;ot<arguments.length;ot++){let Lt=arguments[ot];if(Lt!=null)for(let At in Lt)Lt.hasOwnProperty(At)&&(Ve[At]=Lt[At])}return Ve},typeof self.Promise!="function"&&De(82702).polyfill()}}Le.install();var ye=Le,Fe=De(17187),Me=De.n(Fe);class Ee{static e(He,Ve){(!He||Ee.FORCE_GLOBAL_TAG)&&(He=Ee.GLOBAL_TAG);let ot=`[${He}] > ${Ve}`;Ee.ENABLE_CALLBACK&&Ee.emitter.emit("log","error",ot),Ee.ENABLE_ERROR&&(console.error?console.error(ot):console.warn?console.warn(ot):console.log(ot))}static i(He,Ve){(!He||Ee.FORCE_GLOBAL_TAG)&&(He=Ee.GLOBAL_TAG);let ot=`[${He}] > ${Ve}`;Ee.ENABLE_CALLBACK&&Ee.emitter.emit("log","info",ot),Ee.ENABLE_INFO&&(console.info?console.info(ot):console.log(ot))}static w(He,Ve){(!He||Ee.FORCE_GLOBAL_TAG)&&(He=Ee.GLOBAL_TAG);let ot=`[${He}] > ${Ve}`;Ee.ENABLE_CALLBACK&&Ee.emitter.emit("log","warn",ot),Ee.ENABLE_WARN&&(console.warn?console.warn(ot):console.log(ot))}static d(He,Ve){(!He||Ee.FORCE_GLOBAL_TAG)&&(He=Ee.GLOBAL_TAG);let ot=`[${He}] > ${Ve}`;Ee.ENABLE_CALLBACK&&Ee.emitter.emit("log","debug",ot),Ee.ENABLE_DEBUG&&(console.debug?console.debug(ot):console.log(ot))}static v(He,Ve){(!He||Ee.FORCE_GLOBAL_TAG)&&(He=Ee.GLOBAL_TAG);let ot=`[${He}] > ${Ve}`;Ee.ENABLE_CALLBACK&&Ee.emitter.emit("log","verbose",ot),Ee.ENABLE_VERBOSE&&console.log(ot)}}Ee.GLOBAL_TAG="flv.js",Ee.FORCE_GLOBAL_TAG=!1,Ee.ENABLE_ERROR=!0,Ee.ENABLE_INFO=!0,Ee.ENABLE_WARN=!0,Ee.ENABLE_DEBUG=!0,Ee.ENABLE_VERBOSE=!0,Ee.ENABLE_CALLBACK=!1,Ee.emitter=new(Me());var me=Ee;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(He){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=He,this._totalBytes+=He):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=He,this._totalBytes+=He):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=He,this._totalBytes+=He,this._lastCheckpoint=this._now())}get currentKBps(){this.addBytes(0);let He=(this._now()-this._lastCheckpoint)/1e3;return He==0&&(He=1),this._intervalBytes/He/1024}get lastSecondKBps(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}get averageKBps(){let He=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/He/1024}}var ve=be;class we{constructor(He){this._message=He}get name(){return"RuntimeException"}get message(){return this._message}toString(){return this.name+": "+this.message}}class ge extends we{constructor(He){super(He)}get name(){return"IllegalStateException"}}class he extends we{constructor(He){super(He)}get name(){return"InvalidArgumentException"}}class xe extends we{constructor(He){super(He)}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(He){this._type=He||"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(He){this._onContentLengthKnown=He}get onURLRedirect(){return this._onURLRedirect}set onURLRedirect(He){this._onURLRedirect=He}get onDataArrival(){return this._onDataArrival}set onDataArrival(He){this._onDataArrival=He}get onError(){return this._onError}set onError(He){this._onError=He}get onComplete(){return this._onComplete}set onComplete(He){this._onComplete=He}open(He,Ve){throw new xe("Unimplemented abstract function!")}abort(){throw new xe("Unimplemented abstract function!")}}let z={};function oe(){let sn=self.navigator.userAgent.toLowerCase(),He=/(edge)\/([\w.]+)/.exec(sn)||/(opr)[\/]([\w.]+)/.exec(sn)||/(chrome)[ \/]([\w.]+)/.exec(sn)||/(iemobile)[\/]([\w.]+)/.exec(sn)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(sn)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(sn)||/(webkit)[ \/]([\w.]+)/.exec(sn)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(sn)||/(msie) ([\w.]+)/.exec(sn)||sn.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(sn)||sn.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(sn)||[],Ve=/(ipad)/.exec(sn)||/(ipod)/.exec(sn)||/(windows phone)/.exec(sn)||/(iphone)/.exec(sn)||/(kindle)/.exec(sn)||/(android)/.exec(sn)||/(windows)/.exec(sn)||/(mac)/.exec(sn)||/(linux)/.exec(sn)||/(cros)/.exec(sn)||[],ot={browser:He[5]||He[3]||He[1]||"",version:He[2]||He[4]||"0",majorVersion:He[4]||He[2]||"0",platform:Ve[0]||""},Lt={};if(ot.browser){Lt[ot.browser]=!0;let At=ot.majorVersion.split(".");Lt.version={major:parseInt(ot.majorVersion,10),string:ot.version},At.length>1&&(Lt.version.minor=parseInt(At[1],10)),At.length>2&&(Lt.version.build=parseInt(At[2],10))}if(ot.platform&&(Lt[ot.platform]=!0),(Lt.chrome||Lt.opr||Lt.safari)&&(Lt.webkit=!0),Lt.rv||Lt.iemobile){Lt.rv&&delete Lt.rv;let At="msie";ot.browser=At,Lt[At]=!0}if(Lt.edge){delete Lt.edge;let At="msedge";ot.browser=At,Lt[At]=!0}if(Lt.opr){let At="opera";ot.browser=At,Lt[At]=!0}if(Lt.safari&&Lt.android){let At="android";ot.browser=At,Lt[At]=!0}Lt.name=ot.browser,Lt.platform=ot.platform;for(let At in z)z.hasOwnProperty(At)&&delete z[At];Object.assign(z,Lt)}oe();var ie=z;class se extends ee{static isSupported(){try{let He=ie.msedge&&ie.version.minor>=15048,Ve=ie.msedge?He:!0;return self.fetch&&self.ReadableStream&&Ve}catch(He){return!1}}constructor(He,Ve){super("fetch-stream-loader"),this.TAG="FetchStreamLoader",this._seekHandler=He,this._config=Ve,this._needStash=!0,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),super.destroy()}open(He,Ve){this._dataSource=He,this._range=Ve;let ot=He.url;this._config.reuseRedirectedURL&&He.redirectedURL!=null&&(ot=He.redirectedURL);let Lt=this._seekHandler.getConfig(ot,Ve),At=new self.Headers;if(typeof Lt.headers=="object"){let Ot=Lt.headers;for(let xn in Ot)Ot.hasOwnProperty(xn)&&At.append(xn,Ot[xn])}let an={method:"GET",headers:At,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(let Ot in this._config.headers)At.append(Ot,this._config.headers[Ot]);He.cors===!1&&(an.mode="same-origin"),He.withCredentials&&(an.credentials="include"),He.referrerPolicy&&(an.referrerPolicy=He.referrerPolicy),this._status=fe.kConnecting,self.fetch(Lt.url,an).then(Ot=>{if(this._requestAbort){this._requestAbort=!1,this._status=fe.kIdle;return}if(Ot.ok&&Ot.status>=200&&Ot.status<=299){if(Ot.url!==Lt.url&&this._onURLRedirect){let Zn=this._seekHandler.removeURLParameters(Ot.url);this._onURLRedirect(Zn)}let xn=Ot.headers.get("Content-Length");return xn!=null&&(this._contentLength=parseInt(xn),this._contentLength!==0&&this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)),this._pump.call(this,Ot.body.getReader())}else if(this._status=fe.kError,this._onError)this._onError(ue.HTTP_STATUS_CODE_INVALID,{code:Ot.status,msg:Ot.statusText});else throw new we("FetchStreamLoader: Http code invalid, "+Ot.status+" "+Ot.statusText)}).catch(Ot=>{if(this._status=fe.kError,this._onError)this._onError(ue.EXCEPTION,{code:-1,msg:Ot.message});else throw Ot})}abort(){this._requestAbort=!0}_pump(He){return He.read().then(Ve=>{if(Ve.done)if(this._contentLength!==null&&this._receivedLength<this._contentLength){this._status=fe.kError;let ot=ue.EARLY_EOF,Lt={code:-1,msg:"Fetch stream meet Early-EOF"};if(this._onError)this._onError(ot,Lt);else throw new we(Lt.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,He.cancel();this._status=fe.kBuffering;let ot=Ve.value.buffer,Lt=this._range.from+this._receivedLength;this._receivedLength+=ot.byteLength,this._onDataArrival&&this._onDataArrival(ot,Lt,this._receivedLength),this._pump(He)}}).catch(Ve=>{if(Ve.code===11&&ie.msedge)return;this._status=fe.kError;let ot=0,Lt=null;if((Ve.code===19||Ve.message==="network error")&&(this._contentLength===null||this._contentLength!==null&&this._receivedLength<this._contentLength)?(ot=ue.EARLY_EOF,Lt={code:Ve.code,msg:"Fetch stream meet Early-EOF"}):(ot=ue.EXCEPTION,Lt={code:Ve.code,msg:Ve.message}),this._onError)this._onError(ot,Lt);else throw new we(Lt.msg)})}}var le=se;class Se extends ee{static isSupported(){try{let He=new XMLHttpRequest;return He.open("GET","https://example.com",!0),He.responseType="moz-chunked-arraybuffer",He.responseType==="moz-chunked-arraybuffer"}catch(He){return me.w("MozChunkedLoader",He.message),!1}}constructor(He,Ve){super("xhr-moz-chunked-loader"),this.TAG="MozChunkedLoader",this._seekHandler=He,this._config=Ve,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(He,Ve){this._dataSource=He,this._range=Ve;let ot=He.url;this._config.reuseRedirectedURL&&He.redirectedURL!=null&&(ot=He.redirectedURL);let Lt=this._seekHandler.getConfig(ot,Ve);this._requestURL=Lt.url;let At=this._xhr=new XMLHttpRequest;if(At.open("GET",Lt.url,!0),At.responseType="moz-chunked-arraybuffer",At.onreadystatechange=this._onReadyStateChange.bind(this),At.onprogress=this._onProgress.bind(this),At.onloadend=this._onLoadEnd.bind(this),At.onerror=this._onXhrError.bind(this),He.withCredentials&&(At.withCredentials=!0),typeof Lt.headers=="object"){let an=Lt.headers;for(let Ot in an)an.hasOwnProperty(Ot)&&At.setRequestHeader(Ot,an[Ot])}if(typeof this._config.headers=="object"){let an=this._config.headers;for(let Ot in an)an.hasOwnProperty(Ot)&&At.setRequestHeader(Ot,an[Ot])}this._status=fe.kConnecting,At.send()}abort(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=fe.kComplete}_onReadyStateChange(He){let Ve=He.target;if(Ve.readyState===2){if(Ve.responseURL!=null&&Ve.responseURL!==this._requestURL&&this._onURLRedirect){let ot=this._seekHandler.removeURLParameters(Ve.responseURL);this._onURLRedirect(ot)}if(Ve.status!==0&&(Ve.status<200||Ve.status>299))if(this._status=fe.kError,this._onError)this._onError(ue.HTTP_STATUS_CODE_INVALID,{code:Ve.status,msg:Ve.statusText});else throw new we("MozChunkedLoader: Http code invalid, "+Ve.status+" "+Ve.statusText);else this._status=fe.kBuffering}}_onProgress(He){if(this._status===fe.kError)return;this._contentLength===null&&He.total!==null&&He.total!==0&&(this._contentLength=He.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));let Ve=He.target.response,ot=this._range.from+this._receivedLength;this._receivedLength+=Ve.byteLength,this._onDataArrival&&this._onDataArrival(Ve,ot,this._receivedLength)}_onLoadEnd(He){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(He){this._status=fe.kError;let Ve=0,ot=null;if(this._contentLength&&He.loaded<this._contentLength?(Ve=ue.EARLY_EOF,ot={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(Ve=ue.EXCEPTION,ot={code:-1,msg:He.constructor.name+" "+He.type}),this._onError)this._onError(Ve,ot);else throw new we(ot.msg)}}var pe=Se;class Ce extends null{static isSupported(){try{if(typeof self.MSStream=="undefined"||typeof self.MSStreamReader=="undefined")return!1;let He=new XMLHttpRequest;return He.open("GET","https://example.com",!0),He.responseType="ms-stream",He.responseType==="ms-stream"}catch(He){return Log.w("MSStreamLoader",He.message),!1}}constructor(He,Ve){super("xhr-msstream-loader"),this.TAG="MSStreamLoader",this._seekHandler=He,this._config=Ve,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(He,Ve){this._internalOpen(He,Ve,!1)}_internalOpen(He,Ve,ot){this._dataSource=He,ot?this._currentRange=Ve:this._totalRange=Ve;let Lt=He.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?Lt=this._currentRedirectedURL:He.redirectedURL!=null&&(Lt=He.redirectedURL));let At=this._seekHandler.getConfig(Lt,Ve);this._currentRequestURL=At.url;let an=this._reader=new self.MSStreamReader;an.onprogress=this._msrOnProgress.bind(this),an.onload=this._msrOnLoad.bind(this),an.onerror=this._msrOnError.bind(this);let Ot=this._xhr=new XMLHttpRequest;if(Ot.open("GET",At.url,!0),Ot.responseType="ms-stream",Ot.onreadystatechange=this._xhrOnReadyStateChange.bind(this),Ot.onerror=this._xhrOnError.bind(this),He.withCredentials&&(Ot.withCredentials=!0),typeof At.headers=="object"){let xn=At.headers;for(let Zn in xn)xn.hasOwnProperty(Zn)&&Ot.setRequestHeader(Zn,xn[Zn])}if(typeof this._config.headers=="object"){let xn=this._config.headers;for(let Zn in xn)xn.hasOwnProperty(Zn)&&Ot.setRequestHeader(Zn,xn[Zn])}this._isReconnecting?this._isReconnecting=!1:this._status=LoaderStatus.kConnecting,Ot.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(He){let Ve=He.target;if(Ve.readyState===2)if(Ve.status>=200&&Ve.status<=299){if(this._status=LoaderStatus.kBuffering,Ve.responseURL!=null){let Lt=this._seekHandler.removeURLParameters(Ve.responseURL);Ve.responseURL!==this._currentRequestURL&&Lt!==this._currentRedirectedURL&&(this._currentRedirectedURL=Lt,this._onURLRedirect&&this._onURLRedirect(Lt))}let ot=Ve.getResponseHeader("Content-Length");if(ot!=null&&this._contentLength==null){let Lt=parseInt(ot);Lt>0&&(this._contentLength=Lt,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=LoaderStatus.kError,this._onError)this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:Ve.status,msg:Ve.statusText});else throw new RuntimeException("MSStreamLoader: Http code invalid, "+Ve.status+" "+Ve.statusText);else if(Ve.readyState===3&&Ve.status>=200&&Ve.status<=299){this._status=LoaderStatus.kBuffering;let ot=Ve.response;this._reader.readAsArrayBuffer(ot)}}_xhrOnError(He){this._status=LoaderStatus.kError;let Ve=LoaderErrors.EXCEPTION,ot={code:-1,msg:He.constructor.name+" "+He.type};if(this._onError)this._onError(Ve,ot);else throw new RuntimeException(ot.msg)}_msrOnProgress(He){let ot=He.target.result;if(ot==null){this._doReconnectIfNeeded();return}let Lt=ot.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=ot.byteLength;let At=this._totalRange.from+this._receivedLength;this._receivedLength+=Lt.byteLength,this._onDataArrival&&this._onDataArrival(Lt,At,this._receivedLength),ot.byteLength>=this._bufferLimit&&(Log.v(this.TAG,`MSStream buffer exceeded max size near ${At+Lt.byteLength}, reconnecting...`),this._doReconnectIfNeeded())}_doReconnectIfNeeded(){if(this._contentLength==null||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();let He={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,He,!0)}}_msrOnLoad(He){this._status=LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}_msrOnError(He){this._status=LoaderStatus.kError;let Ve=0,ot=null;if(this._contentLength&&this._receivedLength<this._contentLength?(Ve=LoaderErrors.EARLY_EOF,ot={code:-1,msg:"MSStream meet Early-Eof"}):(Ve=LoaderErrors.EARLY_EOF,ot={code:-1,msg:He.constructor.name+" "+He.type}),this._onError)this._onError(Ve,ot);else throw new RuntimeException(ot.msg)}}var Ae=null;class Oe extends ee{static isSupported(){try{let He=new XMLHttpRequest;return He.open("GET","https://example.com",!0),He.responseType="arraybuffer",He.responseType==="arraybuffer"}catch(He){return me.w("RangeLoader",He.message),!1}}constructor(He,Ve){super("xhr-range-loader"),this.TAG="RangeLoader",this._seekHandler=He,this._config=Ve,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 ve,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(He,Ve){this._dataSource=He,this._range=Ve,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 He=this._currentChunkSizeKB*1024,Ve=this._range.from+this._receivedLength,ot=Ve+He;this._contentLength!=null&&ot-this._range.from>=this._contentLength&&(ot=this._range.from+this._contentLength-1),this._currentRequestRange={from:Ve,to:ot},this._internalOpen(this._dataSource,this._currentRequestRange)}_internalOpen(He,Ve){this._lastTimeLoaded=0;let ot=He.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?ot=this._currentRedirectedURL:He.redirectedURL!=null&&(ot=He.redirectedURL));let Lt=this._seekHandler.getConfig(ot,Ve);this._currentRequestURL=Lt.url;let At=this._xhr=new XMLHttpRequest;if(At.open("GET",Lt.url,!0),At.responseType="arraybuffer",At.onreadystatechange=this._onReadyStateChange.bind(this),At.onprogress=this._onProgress.bind(this),At.onload=this._onLoad.bind(this),At.onerror=this._onXhrError.bind(this),He.withCredentials&&(At.withCredentials=!0),typeof Lt.headers=="object"){let an=Lt.headers;for(let Ot in an)an.hasOwnProperty(Ot)&&At.setRequestHeader(Ot,an[Ot])}if(typeof this._config.headers=="object"){let an=this._config.headers;for(let Ot in an)an.hasOwnProperty(Ot)&&At.setRequestHeader(Ot,an[Ot])}At.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(He){let Ve=He.target;if(Ve.readyState===2){if(Ve.responseURL!=null){let ot=this._seekHandler.removeURLParameters(Ve.responseURL);Ve.responseURL!==this._currentRequestURL&&ot!==this._currentRedirectedURL&&(this._currentRedirectedURL=ot,this._onURLRedirect&&this._onURLRedirect(ot))}if(Ve.status>=200&&Ve.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:Ve.status,msg:Ve.statusText});else throw new we("RangeLoader: Http code invalid, "+Ve.status+" "+Ve.statusText)}}_onProgress(He){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 Lt=He.total;this._internalAbort(),Lt!=null&Lt!==0&&(this._totalLength=Lt)}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 Ve=He.loaded-this._lastTimeLoaded;this._lastTimeLoaded=He.loaded,this._speedSampler.addBytes(Ve)}_normalizeSpeed(He){let Ve=this._chunkSizeKBList,ot=Ve.length-1,Lt=0,At=0,an=ot;if(He<Ve[0])return Ve[0];for(;At<=an;){if(Lt=At+Math.floor((an-At)/2),Lt===ot||He>=Ve[Lt]&&He<Ve[Lt+1])return Ve[Lt];Ve[Lt]<He?At=Lt+1:an=Lt-1}}_onLoad(He){if(this._status===fe.kError)return;if(this._waitForTotalLength){this._waitForTotalLength=!1;return}this._lastTimeLoaded=0;let Ve=this._speedSampler.lastSecondKBps;if(Ve===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(Ve=this._speedSampler.currentKBps)),Ve!==0){let an=this._normalizeSpeed(Ve);this._currentSpeedNormalized!==an&&(this._currentSpeedNormalized=an,this._currentChunkSizeKB=an)}let ot=He.target.response,Lt=this._range.from+this._receivedLength;this._receivedLength+=ot.byteLength;let At=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():At=!0,this._onDataArrival&&this._onDataArrival(ot,Lt,this._receivedLength),At&&(this._status=fe.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}_onXhrError(He){this._status=fe.kError;let Ve=0,ot=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(Ve=ue.EARLY_EOF,ot={code:-1,msg:"RangeLoader meet Early-Eof"}):(Ve=ue.EXCEPTION,ot={code:-1,msg:He.constructor.name+" "+He.type}),this._onError)this._onError(Ve,ot);else throw new we(ot.msg)}}var Re=Oe;class We extends ee{static isSupported(){try{return typeof self.WebSocket!="undefined"}catch(He){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(He){try{let Ve=this._ws=new self.WebSocket(He.url);Ve.binaryType="arraybuffer",Ve.onopen=this._onWebSocketOpen.bind(this),Ve.onclose=this._onWebSocketClose.bind(this),Ve.onmessage=this._onWebSocketMessage.bind(this),Ve.onerror=this._onWebSocketError.bind(this),this._status=fe.kConnecting}catch(Ve){this._status=fe.kError;let ot={code:Ve.code,msg:Ve.message};if(this._onError)this._onError(ue.EXCEPTION,ot);else throw new we(ot.msg)}}abort(){let He=this._ws;He&&(He.readyState===0||He.readyState===1)&&(this._requestAbort=!0,He.close()),this._ws=null,this._status=fe.kComplete}_onWebSocketOpen(He){this._status=fe.kBuffering}_onWebSocketClose(He){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=fe.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}_onWebSocketMessage(He){if(He.data instanceof ArrayBuffer)this._dispatchArrayBuffer(He.data);else if(He.data instanceof Blob){let Ve=new FileReader;Ve.onload=()=>{this._dispatchArrayBuffer(Ve.result)},Ve.readAsArrayBuffer(He.data)}else{this._status=fe.kError;let Ve={code:-1,msg:"Unsupported WebSocket message type: "+He.data.constructor.name};if(this._onError)this._onError(ue.EXCEPTION,Ve);else throw new we(Ve.msg)}}_dispatchArrayBuffer(He){let Ve=He,ot=this._receivedLength;this._receivedLength+=Ve.byteLength,this._onDataArrival&&this._onDataArrival(Ve,ot,this._receivedLength)}_onWebSocketError(He){this._status=fe.kError;let Ve={code:He.code,msg:He.message};if(this._onError)this._onError(ue.EXCEPTION,Ve);else throw new we(Ve.msg)}}var $e=We;class Je{constructor(He){this._zeroStart=He||!1}getConfig(He,Ve){let ot={};if(Ve.from!==0||Ve.to!==-1){let Lt;Ve.to!==-1?Lt=`bytes=${Ve.from.toString()}-${Ve.to.toString()}`:Lt=`bytes=${Ve.from.toString()}-`,ot.Range=Lt}else this._zeroStart&&(ot.Range="bytes=0-");return{url:He,headers:ot}}removeURLParameters(He){return He}}var pt=Je;class St{constructor(He,Ve){this._startName=He,this._endName=Ve}getConfig(He,Ve){let ot=He;if(Ve.from!==0||Ve.to!==-1){let Lt=!0;ot.indexOf("?")===-1&&(ot+="?",Lt=!1),Lt&&(ot+="&"),ot+=`${this._startName}=${Ve.from.toString()}`,Ve.to!==-1&&(ot+=`&${this._endName}=${Ve.to.toString()}`)}return{url:ot,headers:{}}}removeURLParameters(He){let Ve=He.split("?")[0],ot,Lt=He.indexOf("?");Lt!==-1&&(ot=He.substring(Lt+1));let At="";if(ot!=null&&ot.length>0){let an=ot.split("&");for(let Ot=0;Ot<an.length;Ot++){let xn=an[Ot].split("="),Zn=Ot>0;xn[0]!==this._startName&&xn[0]!==this._endName&&(Zn&&(At+="&"),At+=an[Ot])}}return At.length===0?Ve:Ve+"?"+At}}var Mt=St;class ct{constructor(He,Ve,ot){this.TAG="IOController",this._config=Ve,this._extraData=ot,this._stashInitialSize=1024*384,Ve.stashInitialSize!=null&&Ve.stashInitialSize>0&&(this._stashInitialSize=Ve.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,Ve.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=He,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(He.url),this._refTotalLength=He.filesize?He.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new ve,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(He){this._extraData=He}get onDataArrival(){return this._onDataArrival}set onDataArrival(He){this._onDataArrival=He}get onSeeked(){return this._onSeeked}set onSeeked(He){this._onSeeked=He}get onError(){return this._onError}set onError(He){this._onError=He}get onComplete(){return this._onComplete}set onComplete(He){this._onComplete=He}get onRedirect(){return this._onRedirect}set onRedirect(He){this._onRedirect=He}get onRecoveredEarlyEof(){return this._onRecoveredEarlyEof}set onRecoveredEarlyEof(He){this._onRecoveredEarlyEof=He}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===Re?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}get loaderType(){return this._loader.type}_selectSeekHandler(){let He=this._config;if(He.seekType==="range")this._seekHandler=new pt(this._config.rangeLoadZeroStart);else if(He.seekType==="param"){let Ve=He.seekParamStart||"bstart",ot=He.seekParamEnd||"bend";this._seekHandler=new Mt(Ve,ot)}else if(He.seekType==="custom"){if(typeof He.customSeekHandler!="function")throw new he("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new He.customSeekHandler}else throw new he(`Invalid seekType in config: ${He.seekType}`)}_selectLoader(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=$e;else if(le.isSupported())this._loaderClass=le;else if(pe.isSupported())this._loaderClass=pe;else if(Re.isSupported())this._loaderClass=Re;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(He){this._currentRange={from:0,to:-1},He&&(this._currentRange.from=He),this._speedSampler.reset(),He||(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 He=this._resumeFrom;this._resumeFrom=0,this._internalSeek(He,!0)}}seek(He){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(He,!0)}_internalSeek(He,Ve){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(Ve),this._loader.destroy(),this._loader=null;let ot={from:He,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(He){if(!He||typeof He!="string"||He.length===0)throw new he("Url must be a non-empty string!");this._dataSource.url=He}_expandBuffer(He){let Ve=this._stashSize;for(;Ve+1024*1024*1<He;)Ve*=2;if(Ve+=1024*1024*1,Ve===this._bufferSize)return;let ot=new ArrayBuffer(Ve);if(this._stashUsed>0){let Lt=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(ot,0,Ve).set(Lt,0)}this._stashBuffer=ot,this._bufferSize=Ve}_normalizeSpeed(He){let Ve=this._speedNormalizeList,ot=Ve.length-1,Lt=0,At=0,an=ot;if(He<Ve[0])return Ve[0];for(;At<=an;){if(Lt=At+Math.floor((an-At)/2),Lt===ot||He>=Ve[Lt]&&He<Ve[Lt+1])return Ve[Lt];Ve[Lt]<He?At=Lt+1:an=Lt-1}}_adjustStashSize(He){let Ve=0;this._config.isLive||He<512?Ve=He:He>=512&&He<=1024?Ve=Math.floor(He*1.5):Ve=He*2,Ve>8192&&(Ve=8192);let ot=Ve*1024+1024*1024*1;this._bufferSize<ot&&this._expandBuffer(ot),this._stashSize=Ve*1024}_dispatchChunks(He,Ve){return this._currentRange.to=Ve+He.byteLength-1,this._onDataArrival(He,Ve)}_onURLRedirect(He){this._redirectedURL=He,this._onRedirect&&this._onRedirect(He)}_onContentLengthKnown(He){He&&this._fullRequestFlag&&(this._totalLength=He,this._fullRequestFlag=!1)}_onLoaderChunkArrival(He,Ve,ot){if(!this._onDataArrival)throw new ge("IOController: No existing consumer (onDataArrival) callback!");if(this._paused)return;this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(He.byteLength);let Lt=this._speedSampler.lastSecondKBps;if(Lt!==0){let At=this._normalizeSpeed(Lt);this._speedNormalized!==At&&(this._speedNormalized=At,this._adjustStashSize(At))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=Ve),this._stashUsed+He.byteLength<=this._stashSize)new Uint8Array(this._stashBuffer,0,this._stashSize).set(new Uint8Array(He),this._stashUsed),this._stashUsed+=He.byteLength;else{let At=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){let an=this._stashBuffer.slice(0,this._stashUsed),Ot=this._dispatchChunks(an,this._stashByteStart);if(Ot<an.byteLength){if(Ot>0){let xn=new Uint8Array(an,Ot);At.set(xn,0),this._stashUsed=xn.byteLength,this._stashByteStart+=Ot}}else this._stashUsed=0,this._stashByteStart+=Ot;this._stashUsed+He.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+He.byteLength),At=new Uint8Array(this._stashBuffer,0,this._bufferSize)),At.set(new Uint8Array(He),this._stashUsed),this._stashUsed+=He.byteLength}else{let an=this._dispatchChunks(He,Ve);if(an<He.byteLength){let Ot=He.byteLength-an;Ot>this._bufferSize&&(this._expandBuffer(Ot),At=new Uint8Array(this._stashBuffer,0,this._bufferSize)),At.set(new Uint8Array(He,an),0),this._stashUsed+=Ot,this._stashByteStart=Ve+an}}}else if(this._stashUsed===0){let At=this._dispatchChunks(He,Ve);if(At<He.byteLength){let an=He.byteLength-At;an>this._bufferSize&&this._expandBuffer(an),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(He,At),0),this._stashUsed+=an,this._stashByteStart=Ve+At}}else{this._stashUsed+He.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+He.byteLength);let At=new Uint8Array(this._stashBuffer,0,this._bufferSize);At.set(new Uint8Array(He),this._stashUsed),this._stashUsed+=He.byteLength;let an=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(an<this._stashUsed&&an>0){let Ot=new Uint8Array(this._stashBuffer,an);At.set(Ot,0)}this._stashUsed-=an,this._stashByteStart+=an}}_flushStashBuffer(He){if(this._stashUsed>0){let Ve=this._stashBuffer.slice(0,this._stashUsed),ot=this._dispatchChunks(Ve,this._stashByteStart),Lt=Ve.byteLength-ot;if(ot<Ve.byteLength)if(He)me.w(this.TAG,`${Lt} bytes unconsumed data remain when flush buffer, dropped`);else{if(ot>0){let At=new Uint8Array(this._stashBuffer,0,this._bufferSize),an=new Uint8Array(Ve,ot);At.set(an,0),this._stashUsed=an.byteLength,this._stashByteStart+=ot}return 0}return this._stashUsed=0,this._stashByteStart=0,Lt}return 0}_onLoaderComplete(He,Ve){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}_onLoaderError(He,Ve){switch(me.e(this.TAG,`Loader error, code = ${Ve.code}, msg = ${Ve.msg}`),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,He=ue.UNRECOVERABLE_EARLY_EOF),He){case ue.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){let ot=this._currentRange.to+1;ot<this._totalLength&&(me.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(ot,!1));return}He=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(He,Ve);else throw new we("IOException: "+Ve.msg)}}var wt=ct;const ft={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 $t(){return Object.assign({},ft)}class st{static supportMSEH264Playback(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}static supportNetworkStreamIO(){let He=new wt({},$t()),Ve=He.loaderType;return He.destroy(),Ve=="fetch-stream-loader"||Ve=="xhr-moz-chunked-loader"}static getNetworkLoaderTypeName(){let He=new wt({},$t()),Ve=He.loaderType;return He.destroy(),Ve}static supportNativeMediaPlayback(He){st.videoElement==null&&(st.videoElement=window.document.createElement("video"));let Ve=st.videoElement.canPlayType(He);return Ve==="probably"||Ve=="maybe"}static getFeatureList(){let He={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return He.mseFlvPlayback=st.supportMSEH264Playback(),He.networkStreamIO=st.supportNetworkStreamIO(),He.networkLoaderName=st.getNetworkLoaderTypeName(),He.mseLiveFlvPlayback=He.mseFlvPlayback&&He.networkStreamIO,He.nativeMP4H264Playback=st.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),He.nativeWebmVP8Playback=st.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),He.nativeWebmVP9Playback=st.supportNativeMediaPlayback('video/webm; codecs="vp9"'),He}}var et=st,dt={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 bt{static get forceGlobalTag(){return me.FORCE_GLOBAL_TAG}static set forceGlobalTag(He){me.FORCE_GLOBAL_TAG=He,bt._notifyChange()}static get globalTag(){return me.GLOBAL_TAG}static set globalTag(He){me.GLOBAL_TAG=He,bt._notifyChange()}static get enableAll(){return me.ENABLE_VERBOSE&&me.ENABLE_DEBUG&&me.ENABLE_INFO&&me.ENABLE_WARN&&me.ENABLE_ERROR}static set enableAll(He){me.ENABLE_VERBOSE=He,me.ENABLE_DEBUG=He,me.ENABLE_INFO=He,me.ENABLE_WARN=He,me.ENABLE_ERROR=He,bt._notifyChange()}static get enableDebug(){return me.ENABLE_DEBUG}static set enableDebug(He){me.ENABLE_DEBUG=He,bt._notifyChange()}static get enableVerbose(){return me.ENABLE_VERBOSE}static set enableVerbose(He){me.ENABLE_VERBOSE=He,bt._notifyChange()}static get enableInfo(){return me.ENABLE_INFO}static set enableInfo(He){me.ENABLE_INFO=He,bt._notifyChange()}static get enableWarn(){return me.ENABLE_WARN}static set enableWarn(He){me.ENABLE_WARN=He,bt._notifyChange()}static get enableError(){return me.ENABLE_ERROR}static set enableError(He){me.ENABLE_ERROR=He,bt._notifyChange()}static getConfig(){return{globalTag:me.GLOBAL_TAG,forceGlobalTag:me.FORCE_GLOBAL_TAG,enableVerbose:me.ENABLE_VERBOSE,enableDebug:me.ENABLE_DEBUG,enableInfo:me.ENABLE_INFO,enableWarn:me.ENABLE_WARN,enableError:me.ENABLE_ERROR,enableCallback:me.ENABLE_CALLBACK}}static applyConfig(He){me.GLOBAL_TAG=He.globalTag,me.FORCE_GLOBAL_TAG=He.forceGlobalTag,me.ENABLE_VERBOSE=He.enableVerbose,me.ENABLE_DEBUG=He.enableDebug,me.ENABLE_INFO=He.enableInfo,me.ENABLE_WARN=He.enableWarn,me.ENABLE_ERROR=He.enableError,me.ENABLE_CALLBACK=He.enableCallback}static _notifyChange(){let He=bt.emitter;if(He.listenerCount("change")>0){let Ve=bt.getConfig();He.emit("change",Ve)}}static registerListener(He){bt.emitter.addListener("change",He)}static removeListener(He){bt.emitter.removeListener("change",He)}static addLogListener(He){me.emitter.addListener("log",He),me.emitter.listenerCount("log")>0&&(me.ENABLE_CALLBACK=!0,bt._notifyChange())}static removeLogListener(He){me.emitter.removeListener("log",He),me.emitter.listenerCount("log")===0&&(me.ENABLE_CALLBACK=!1,bt._notifyChange())}}bt.emitter=new(Me());var yt=bt;class Vt{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 He=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,Ve=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&&He&&Ve}isSeekable(){return this.hasKeyframesIndex===!0}getNearestKeyframe(He){if(this.keyframesIndex==null)return null;let Ve=this.keyframesIndex,ot=this._search(Ve.times,He);return{index:ot,milliseconds:Ve.times[ot],fileposition:Ve.filepositions[ot]}}_search(He,Ve){let ot=0,Lt=He.length-1,At=0,an=0,Ot=Lt;for(Ve<He[0]&&(ot=0,an=Ot+1);an<=Ot;)if(At=an+Math.floor((Ot-an)/2),At===Lt||Ve>=He[At]&&Ve<He[At+1]){ot=At;break}else He[At]<Ve?an=At+1:Ot=At-1;return ot}}var Kt=Vt;function gn(sn,He,Ve){let ot=sn;if(He+Ve<ot.length){for(;Ve--;)if((ot[++He]&192)!==128)return!1;return!0}else return!1}function Gt(sn){let He=[],Ve=sn,ot=0,Lt=sn.length;for(;ot<Lt;){if(Ve[ot]<128){He.push(String.fromCharCode(Ve[ot])),++ot;continue}else if(!(Ve[ot]<192)){if(Ve[ot]<224){if(gn(Ve,ot,1)){let At=(Ve[ot]&31)<<6|Ve[ot+1]&63;if(At>=128){He.push(String.fromCharCode(At&65535)),ot+=2;continue}}}else if(Ve[ot]<240){if(gn(Ve,ot,2)){let At=(Ve[ot]&15)<<12|(Ve[ot+1]&63)<<6|Ve[ot+2]&63;if(At>=2048&&(At&63488)!==55296){He.push(String.fromCharCode(At&65535)),ot+=3;continue}}}else if(Ve[ot]<248&&gn(Ve,ot,3)){let At=(Ve[ot]&7)<<18|(Ve[ot+1]&63)<<12|(Ve[ot+2]&63)<<6|Ve[ot+3]&63;if(At>65536&&At<1114112){At-=65536,He.push(String.fromCharCode(At>>>10|55296)),He.push(String.fromCharCode(At&1023|56320)),ot+=4;continue}}}He.push("\uFFFD"),++ot}return He.join("")}var Dt=Gt;let on=function(){let sn=new ArrayBuffer(2);return new DataView(sn).setInt16(0,256,!0),new Int16Array(sn)[0]===256}();class Jt{static parseScriptData(He,Ve,ot){let Lt={};try{let At=Jt.parseValue(He,Ve,ot),an=Jt.parseValue(He,Ve+At.size,ot-At.size);Lt[At.data]=an.data}catch(At){me.e("AMF",At.toString())}return Lt}static parseObject(He,Ve,ot){if(ot<3)throw new ge("Data not enough when parse ScriptDataObject");let Lt=Jt.parseString(He,Ve,ot),At=Jt.parseValue(He,Ve+Lt.size,ot-Lt.size),an=At.objectEnd;return{data:{name:Lt.data,value:At.data},size:Lt.size+At.size,objectEnd:an}}static parseVariable(He,Ve,ot){return Jt.parseObject(He,Ve,ot)}static parseString(He,Ve,ot){if(ot<2)throw new ge("Data not enough when parse String");let At=new DataView(He,Ve,ot).getUint16(0,!on),an;return At>0?an=Dt(new Uint8Array(He,Ve+2,At)):an="",{data:an,size:2+At}}static parseLongString(He,Ve,ot){if(ot<4)throw new ge("Data not enough when parse LongString");let At=new DataView(He,Ve,ot).getUint32(0,!on),an;return At>0?an=Dt(new Uint8Array(He,Ve+4,At)):an="",{data:an,size:4+At}}static parseDate(He,Ve,ot){if(ot<10)throw new ge("Data size invalid when parse Date");let Lt=new DataView(He,Ve,ot),At=Lt.getFloat64(0,!on),an=Lt.getInt16(8,!on);return At+=an*60*1e3,{data:new Date(At),size:10}}static parseValue(He,Ve,ot){if(ot<1)throw new ge("Data not enough when parse Value");let Lt=new DataView(He,Ve,ot),At=1,an=Lt.getUint8(0),Ot,xn=!1;try{switch(an){case 0:Ot=Lt.getFloat64(1,!on),At+=8;break;case 1:{Ot=!!Lt.getUint8(1),At+=1;break}case 2:{let Zn=Jt.parseString(He,Ve+1,ot-1);Ot=Zn.data,At+=Zn.size;break}case 3:{Ot={};let Zn=0;for((Lt.getUint32(ot-4,!on)&16777215)===9&&(Zn=3);At<ot-4;){let wi=Jt.parseObject(He,Ve+At,ot-At-Zn);if(wi.objectEnd)break;Ot[wi.data.name]=wi.data.value,At+=wi.size}At<=ot-3&&(Lt.getUint32(At-1,!on)&16777215)===9&&(At+=3);break}case 8:{Ot={},At+=4;let Zn=0;for((Lt.getUint32(ot-4,!on)&16777215)===9&&(Zn=3);At<ot-8;){let wi=Jt.parseVariable(He,Ve+At,ot-At-Zn);if(wi.objectEnd)break;Ot[wi.data.name]=wi.data.value,At+=wi.size}At<=ot-3&&(Lt.getUint32(At-1,!on)&16777215)===9&&(At+=3);break}case 9:Ot=void 0,At=1,xn=!0;break;case 10:{Ot=[];let Zn=Lt.getUint32(1,!on);At+=4;for(let wi=0;wi<Zn;wi++){let Bn=Jt.parseValue(He,Ve+At,ot-At);Ot.push(Bn.data),At+=Bn.size}break}case 11:{let Zn=Jt.parseDate(He,Ve+1,ot-1);Ot=Zn.data,At+=Zn.size;break}case 12:{let Zn=Jt.parseString(He,Ve+1,ot-1);Ot=Zn.data,At+=Zn.size;break}default:At=ot,me.w("AMF","Unsupported AMF value type "+an)}}catch(Zn){me.e("AMF",Zn.toString())}return{data:Ot,size:At,objectEnd:xn}}}var jt=Jt;class ut{constructor(He){this.TAG="ExpGolomb",this._buffer=He,this._buffer_index=0,this._total_bytes=He.byteLength,this._total_bits=He.byteLength*8,this._current_word=0,this._current_word_bits_left=0}destroy(){this._buffer=null}_fillCurrentWord(){let He=this._total_bytes-this._buffer_index;if(He<=0)throw new ge("ExpGolomb: _fillCurrentWord() but no bytes available");let Ve=Math.min(4,He),ot=new Uint8Array(4);ot.set(this._buffer.subarray(this._buffer_index,this._buffer_index+Ve)),this._current_word=new DataView(ot.buffer).getUint32(0,!1),this._buffer_index+=Ve,this._current_word_bits_left=Ve*8}readBits(He){if(He>32)throw new he("ExpGolomb: readBits() bits exceeded max 32bits!");if(He<=this._current_word_bits_left){let an=this._current_word>>>32-He;return this._current_word<<=He,this._current_word_bits_left-=He,an}let Ve=this._current_word_bits_left?this._current_word:0;Ve=Ve>>>32-this._current_word_bits_left;let ot=He-this._current_word_bits_left;this._fillCurrentWord();let Lt=Math.min(ot,this._current_word_bits_left),At=this._current_word>>>32-Lt;return this._current_word<<=Lt,this._current_word_bits_left-=Lt,Ve=Ve<<Lt|At,Ve}readBool(){return this.readBits(1)===1}readByte(){return this.readBits(8)}_skipLeadingZero(){let He;for(He=0;He<this._current_word_bits_left;He++)if(this._current_word&2147483648>>>He)return this._current_word<<=He,this._current_word_bits_left-=He,He;return this._fillCurrentWord(),He+this._skipLeadingZero()}readUEG(){let He=this._skipLeadingZero();return this.readBits(He+1)-1}readSEG(){let He=this.readUEG();return He&1?He+1>>>1:-1*(He>>>1)}}var ze=ut;class je{static _ebsp2rbsp(He){let Ve=He,ot=Ve.byteLength,Lt=new Uint8Array(ot),At=0;for(let an=0;an<ot;an++)an>=2&&Ve[an]===3&&Ve[an-1]===0&&Ve[an-2]===0||(Lt[At]=Ve[an],At++);return new Uint8Array(Lt.buffer,0,At)}static parseSPS(He){let Ve=je._ebsp2rbsp(He),ot=new ze(Ve);ot.readByte();let Lt=ot.readByte();ot.readByte();let At=ot.readByte();ot.readUEG();let an=je.getProfileString(Lt),Ot=je.getLevelString(At),xn=1,Zn=420,wi=[0,420,422,444],Bn=8;if((Lt===100||Lt===110||Lt===122||Lt===244||Lt===44||Lt===83||Lt===86||Lt===118||Lt===128||Lt===138||Lt===144)&&(xn=ot.readUEG(),xn===3&&ot.readBits(1),xn<=3&&(Zn=wi[xn]),Bn=ot.readUEG()+8,ot.readUEG(),ot.readBits(1),ot.readBool())){let yo=xn!==3?8:12;for(let Rr=0;Rr<yo;Rr++)ot.readBool()&&(Rr<6?je._skipScalingList(ot,16):je._skipScalingList(ot,64))}ot.readUEG();let rn=ot.readUEG();if(rn===0)ot.readUEG();else if(rn===1){ot.readBits(1),ot.readSEG(),ot.readSEG();let yo=ot.readUEG();for(let Rr=0;Rr<yo;Rr++)ot.readSEG()}let Fn=ot.readUEG();ot.readBits(1);let vi=ot.readUEG(),_i=ot.readUEG(),cn=ot.readBits(1);cn===0&&ot.readBits(1),ot.readBits(1);let qn=0,Ii=0,lr=0,_r=0;ot.readBool()&&(qn=ot.readUEG(),Ii=ot.readUEG(),lr=ot.readUEG(),_r=ot.readUEG());let bi=1,li=1,dr=0,jr=!0,ei=0,Ui=0;if(ot.readBool()){if(ot.readBool()){let yo=ot.readByte(),Rr=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],uo=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];yo>0&&yo<16?(bi=Rr[yo-1],li=uo[yo-1]):yo===255&&(bi=ot.readByte()<<8|ot.readByte(),li=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 yo=ot.readBits(32),Rr=ot.readBits(32);jr=ot.readBool(),ei=Rr,Ui=yo*2,dr=ei/Ui}}let cs=1;(bi!==1||li!==1)&&(cs=bi/li);let Io=0,dn=0;if(xn===0)Io=1,dn=2-cn;else{let yo=xn===3?1:2,Rr=xn===1?2:1;Io=yo,dn=Rr*(2-cn)}let gr=(vi+1)*16,Zr=(2-cn)*((_i+1)*16);gr-=(qn+Ii)*Io,Zr-=(lr+_r)*dn;let $i=Math.ceil(gr*cs);return ot.destroy(),ot=null,{profile_string:an,level_string:Ot,bit_depth:Bn,ref_frames:Fn,chroma_format:Zn,chroma_format_string:je.getChromaFormatString(Zn),frame_rate:{fixed:jr,fps:dr,fps_den:Ui,fps_num:ei},sar_ratio:{width:bi,height:li},codec_size:{width:gr,height:Zr},present_size:{width:$i,height:Zr}}}static _skipScalingList(He,Ve){let ot=8,Lt=8,At=0;for(let an=0;an<Ve;an++)Lt!==0&&(At=He.readSEG(),Lt=(ot+At+256)%256),ot=Lt===0?ot:Lt}static getProfileString(He){switch(He){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(He){return(He/10).toFixed(1)}static getChromaFormatString(He){switch(He){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}var it=je,nt={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};function Ke(sn){return sn>>>8&255|(sn&255)<<8}function Be(sn){return(sn&4278190080)>>>24|(sn&16711680)>>>8|(sn&65280)<<8|(sn&255)<<24}function Ue(sn,He){return sn[He]<<24|sn[He+1]<<16|sn[He+2]<<8|sn[He+3]}class rt{constructor(He,Ve){this.TAG="FLVDemuxer",this._config=Ve,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=He.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=He.hasAudioTrack,this._hasVideo=He.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new Kt,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(He){let Ve=new Uint8Array(He),ot={match:!1};if(Ve[0]!==70||Ve[1]!==76||Ve[2]!==86||Ve[3]!==1)return ot;let Lt=(Ve[4]&4)>>>2!==0,At=(Ve[4]&1)!==0,an=Ue(Ve,5);return an<9?ot:{match:!0,consumed:an,dataOffset:an,hasAudioTrack:Lt,hasVideoTrack:At}}bindDataSource(He){return He.onDataArrival=this.parseChunks.bind(this),this}get onTrackMetadata(){return this._onTrackMetadata}set onTrackMetadata(He){this._onTrackMetadata=He}get onMediaInfo(){return this._onMediaInfo}set onMediaInfo(He){this._onMediaInfo=He}get onMetaDataArrived(){return this._onMetaDataArrived}set onMetaDataArrived(He){this._onMetaDataArrived=He}get onScriptDataArrived(){return this._onScriptDataArrived}set onScriptDataArrived(He){this._onScriptDataArrived=He}get onError(){return this._onError}set onError(He){this._onError=He}get onDataAvailable(){return this._onDataAvailable}set onDataAvailable(He){this._onDataAvailable=He}get timestampBase(){return this._timestampBase}set timestampBase(He){this._timestampBase=He}get overridedDuration(){return this._duration}set overridedDuration(He){this._durationOverrided=!0,this._duration=He,this._mediaInfo.duration=He}set overridedHasAudio(He){this._hasAudioFlagOverrided=!0,this._hasAudio=He,this._mediaInfo.hasAudio=He}set overridedHasVideo(He){this._hasVideoFlagOverrided=!0,this._hasVideo=He,this._mediaInfo.hasVideo=He}resetMediaInfo(){this._mediaInfo=new Kt}_isInitialMetadataDispatched(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}parseChunks(He,Ve){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new ge("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");let ot=0,Lt=this._littleEndian;if(Ve===0)if(He.byteLength>13)ot=rt.probe(He).dataOffset;else return 0;for(this._firstParse&&(this._firstParse=!1,Ve+ot!==this._dataOffset&&me.w(this.TAG,"First time parsing but chunk byteStart invalid!"),new DataView(He,ot).getUint32(0,!Lt)!==0&&me.w(this.TAG,"PrevTagSize0 !== 0 !!!"),ot+=4);ot<He.byteLength;){this._dispatch=!0;let At=new DataView(He,ot);if(ot+11+4>He.byteLength)break;let an=At.getUint8(0),Ot=At.getUint32(0,!Lt)&16777215;if(ot+11+Ot+4>He.byteLength)break;if(an!==8&&an!==9&&an!==18){me.w(this.TAG,`Unsupported tag type ${an}, skipped`),ot+=11+Ot+4;continue}let xn=At.getUint8(4),Zn=At.getUint8(5),wi=At.getUint8(6),Bn=At.getUint8(7),rn=wi|Zn<<8|xn<<16|Bn<<24;(At.getUint32(7,!Lt)&16777215)!==0&&me.w(this.TAG,"Meet tag which has StreamID != 0!");let vi=ot+11;switch(an){case 8:this._parseAudioData(He,vi,Ot,rn);break;case 9:this._parseVideoData(He,vi,Ot,rn,Ve+ot);break;case 18:this._parseScriptData(He,vi,Ot);break}let _i=At.getUint32(11+Ot,!Lt);_i!==11+Ot&&me.w(this.TAG,`Invalid PrevTagSize ${_i}`),ot+=11+Ot+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),ot}_parseScriptData(He,Ve,ot){let Lt=jt.parseScriptData(He,Ve,ot);if(Lt.hasOwnProperty("onMetaData")){if(Lt.onMetaData==null||typeof Lt.onMetaData!="object"){me.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&me.w(this.TAG,"Found another onMetaData tag!"),this._metadata=Lt;let At=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},At)),typeof At.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=At.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof At.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=At.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof At.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=At.audiodatarate),typeof At.videodatarate=="number"&&(this._mediaInfo.videoDataRate=At.videodatarate),typeof At.width=="number"&&(this._mediaInfo.width=At.width),typeof At.height=="number"&&(this._mediaInfo.height=At.height),typeof At.duration=="number"){if(!this._durationOverrided){let an=Math.floor(At.duration*this._timescale);this._duration=an,this._mediaInfo.duration=an}}else this._mediaInfo.duration=0;if(typeof At.framerate=="number"){let an=Math.floor(At.framerate*1e3);if(an>0){let Ot=an/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=Ot,this._referenceFrameRate.fps_num=an,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=Ot}}if(typeof At.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;let an=At.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(an),At.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=At,me.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(Lt).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},Lt))}_parseKeyframesIndex(He){let Ve=[],ot=[];for(let Lt=1;Lt<He.times.length;Lt++){let At=this._timestampBase+Math.floor(He.times[Lt]*1e3);Ve.push(At),ot.push(He.filepositions[Lt])}return{times:Ve,filepositions:ot}}_parseAudioData(He,Ve,ot,Lt){if(ot<=1){me.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)return;let At=this._littleEndian,Ot=new DataView(He,Ve,ot).getUint8(0),xn=Ot>>>4;if(xn!==2&&xn!==10){this._onError(nt.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+xn);return}let Zn=0,wi=(Ot&12)>>>2;if(wi>=0&&wi<=4)Zn=this._flvSoundRateTable[wi];else{this._onError(nt.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+wi);return}let Bn=(Ot&2)>>>1,rn=Ot&1,Fn=this._audioMetadata,vi=this._audioTrack;if(Fn||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),Fn=this._audioMetadata={},Fn.type="audio",Fn.id=vi.id,Fn.timescale=this._timescale,Fn.duration=this._duration,Fn.audioSampleRate=Zn,Fn.channelCount=rn===0?1:2),xn===10){let _i=this._parseAACAudioData(He,Ve+1,ot-1);if(_i==null)return;if(_i.packetType===0){Fn.config&&me.w(this.TAG,"Found another AudioSpecificConfig!");let cn=_i.data;Fn.audioSampleRate=cn.samplingRate,Fn.channelCount=cn.channelCount,Fn.codec=cn.codec,Fn.originalCodec=cn.originalCodec,Fn.config=cn.config,Fn.refSampleDuration=1024/Fn.audioSampleRate*Fn.timescale,me.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",Fn);let qn=this._mediaInfo;qn.audioCodec=Fn.originalCodec,qn.audioSampleRate=Fn.audioSampleRate,qn.audioChannelCount=Fn.channelCount,qn.hasVideo?qn.videoCodec!=null&&(qn.mimeType='video/x-flv; codecs="'+qn.videoCodec+","+qn.audioCodec+'"'):qn.mimeType='video/x-flv; codecs="'+qn.audioCodec+'"',qn.isComplete()&&this._onMediaInfo(qn)}else if(_i.packetType===1){let cn=this._timestampBase+Lt,qn={unit:_i.data,length:_i.data.byteLength,dts:cn,pts:cn};vi.samples.push(qn),vi.length+=_i.data.length}else me.e(this.TAG,`Flv: Unsupported AAC data type ${_i.packetType}`)}else if(xn===2){if(!Fn.codec){let Ii=this._parseMP3AudioData(He,Ve+1,ot-1,!0);if(Ii==null)return;Fn.audioSampleRate=Ii.samplingRate,Fn.channelCount=Ii.channelCount,Fn.codec=Ii.codec,Fn.originalCodec=Ii.originalCodec,Fn.refSampleDuration=1152/Fn.audioSampleRate*Fn.timescale,me.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",Fn);let lr=this._mediaInfo;lr.audioCodec=Fn.codec,lr.audioSampleRate=Fn.audioSampleRate,lr.audioChannelCount=Fn.channelCount,lr.audioDataRate=Ii.bitRate,lr.hasVideo?lr.videoCodec!=null&&(lr.mimeType='video/x-flv; codecs="'+lr.videoCodec+","+lr.audioCodec+'"'):lr.mimeType='video/x-flv; codecs="'+lr.audioCodec+'"',lr.isComplete()&&this._onMediaInfo(lr)}let _i=this._parseMP3AudioData(He,Ve+1,ot-1,!1);if(_i==null)return;let cn=this._timestampBase+Lt,qn={unit:_i,length:_i.byteLength,dts:cn,pts:cn};vi.samples.push(qn),vi.length+=_i.length}}_parseAACAudioData(He,Ve,ot){if(ot<=1){me.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}let Lt={},At=new Uint8Array(He,Ve,ot);return Lt.packetType=At[0],At[0]===0?Lt.data=this._parseAACAudioSpecificConfig(He,Ve+1,ot-1):Lt.data=At.subarray(1),Lt}_parseAACAudioSpecificConfig(He,Ve,ot){let Lt=new Uint8Array(He,Ve,ot),At=null,an=0,Ot=0,xn=null,Zn=0,wi=null;if(an=Ot=Lt[0]>>>3,Zn=(Lt[0]&7)<<1|Lt[1]>>>7,Zn<0||Zn>=this._mpegSamplingRates.length){this._onError(nt.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}let Bn=this._mpegSamplingRates[Zn],rn=(Lt[1]&120)>>>3;if(rn<0||rn>=8){this._onError(nt.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}an===5&&(wi=(Lt[1]&7)<<1|Lt[2]>>>7,xn=(Lt[2]&124)>>>2);let Fn=self.navigator.userAgent.toLowerCase();return Fn.indexOf("firefox")!==-1?Zn>=6?(an=5,At=new Array(4),wi=Zn-3):(an=2,At=new Array(2),wi=Zn):Fn.indexOf("android")!==-1?(an=2,At=new Array(2),wi=Zn):(an=5,wi=Zn,At=new Array(4),Zn>=6?wi=Zn-3:rn===1&&(an=2,At=new Array(2),wi=Zn)),At[0]=an<<3,At[0]|=(Zn&15)>>>1,At[1]=(Zn&15)<<7,At[1]|=(rn&15)<<3,an===5&&(At[1]|=(wi&15)>>>1,At[2]=(wi&1)<<7,At[2]|=8,At[3]=0),{config:At,samplingRate:Bn,channelCount:rn,codec:"mp4a.40."+an,originalCodec:"mp4a.40."+Ot}}_parseMP3AudioData(He,Ve,ot,Lt){if(ot<4){me.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}let At=this._littleEndian,an=new Uint8Array(He,Ve,ot),Ot=null;if(Lt){if(an[0]!==255)return;let xn=an[1]>>>3&3,Zn=(an[1]&6)>>1,wi=(an[2]&240)>>>4,Bn=(an[2]&12)>>>2,Fn=(an[3]>>>6&3)!==3?2:1,vi=0,_i=0,cn=34,qn="mp3";switch(xn){case 0:vi=this._mpegAudioV25SampleRateTable[Bn];break;case 2:vi=this._mpegAudioV20SampleRateTable[Bn];break;case 3:vi=this._mpegAudioV10SampleRateTable[Bn];break}switch(Zn){case 1:cn=34,wi<this._mpegAudioL3BitRateTable.length&&(_i=this._mpegAudioL3BitRateTable[wi]);break;case 2:cn=33,wi<this._mpegAudioL2BitRateTable.length&&(_i=this._mpegAudioL2BitRateTable[wi]);break;case 3:cn=32,wi<this._mpegAudioL1BitRateTable.length&&(_i=this._mpegAudioL1BitRateTable[wi]);break}Ot={bitRate:_i,samplingRate:vi,channelCount:Fn,codec:qn,originalCodec:qn}}else Ot=an;return Ot}_parseVideoData(He,Ve,ot,Lt,At){if(ot<=1){me.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");return}if(this._hasVideoFlagOverrided===!0&&this._hasVideo===!1)return;let an=new Uint8Array(He,Ve,ot)[0],Ot=(an&240)>>>4,xn=an&15;if(xn!==7){this._onError(nt.CODEC_UNSUPPORTED,`Flv: Unsupported codec in video frame: ${xn}`);return}this._parseAVCVideoPacket(He,Ve+1,ot-1,Lt,At,Ot)}_parseAVCVideoPacket(He,Ve,ot,Lt,At,an){if(ot<4){me.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}let Ot=this._littleEndian,xn=new DataView(He,Ve,ot),Zn=xn.getUint8(0),Bn=(xn.getUint32(0,!Ot)&16777215)<<8>>8;if(Zn===0)this._parseAVCDecoderConfigurationRecord(He,Ve+4,ot-4);else if(Zn===1)this._parseAVCVideoData(He,Ve+4,ot-4,Lt,At,an,Bn);else if(Zn!==2){this._onError(nt.FORMAT_ERROR,`Flv: Invalid video packet type ${Zn}`);return}}_parseAVCDecoderConfigurationRecord(He,Ve,ot){if(ot<7){me.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}let Lt=this._videoMetadata,At=this._videoTrack,an=this._littleEndian,Ot=new DataView(He,Ve,ot);Lt?typeof Lt.avcc!="undefined"&&me.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),Lt=this._videoMetadata={},Lt.type="video",Lt.id=At.id,Lt.timescale=this._timescale,Lt.duration=this._duration);let xn=Ot.getUint8(0),Zn=Ot.getUint8(1),wi=Ot.getUint8(2),Bn=Ot.getUint8(3);if(xn!==1||Zn===0){this._onError(nt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(Ot.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(nt.FORMAT_ERROR,`Flv: Strange NaluLengthSizeMinusOne: ${this._naluLengthSize-1}`);return}let rn=Ot.getUint8(5)&31;if(rn===0){this._onError(nt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else rn>1&&me.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${rn}`);let Fn=6;for(let _i=0;_i<rn;_i++){let cn=Ot.getUint16(Fn,!an);if(Fn+=2,cn===0)continue;let qn=new Uint8Array(He,Ve+Fn,cn);Fn+=cn;let Ii=it.parseSPS(qn);if(_i!==0)continue;Lt.codecWidth=Ii.codec_size.width,Lt.codecHeight=Ii.codec_size.height,Lt.presentWidth=Ii.present_size.width,Lt.presentHeight=Ii.present_size.height,Lt.profile=Ii.profile_string,Lt.level=Ii.level_string,Lt.bitDepth=Ii.bit_depth,Lt.chromaFormat=Ii.chroma_format,Lt.sarRatio=Ii.sar_ratio,Lt.frameRate=Ii.frame_rate,(Ii.frame_rate.fixed===!1||Ii.frame_rate.fps_num===0||Ii.frame_rate.fps_den===0)&&(Lt.frameRate=this._referenceFrameRate);let lr=Lt.frameRate.fps_den,_r=Lt.frameRate.fps_num;Lt.refSampleDuration=Lt.timescale*(lr/_r);let Ti=qn.subarray(1,4),bi="avc1.";for(let dr=0;dr<3;dr++){let jr=Ti[dr].toString(16);jr.length<2&&(jr="0"+jr),bi+=jr}Lt.codec=bi;let li=this._mediaInfo;li.width=Lt.codecWidth,li.height=Lt.codecHeight,li.fps=Lt.frameRate.fps,li.profile=Lt.profile,li.level=Lt.level,li.refFrames=Ii.ref_frames,li.chromaFormat=Ii.chroma_format_string,li.sarNum=Lt.sarRatio.width,li.sarDen=Lt.sarRatio.height,li.videoCodec=bi,li.hasAudio?li.audioCodec!=null&&(li.mimeType='video/x-flv; codecs="'+li.videoCodec+","+li.audioCodec+'"'):li.mimeType='video/x-flv; codecs="'+li.videoCodec+'"',li.isComplete()&&this._onMediaInfo(li)}let vi=Ot.getUint8(Fn);if(vi===0){this._onError(nt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else vi>1&&me.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${vi}`);Fn++;for(let _i=0;_i<vi;_i++){let cn=Ot.getUint16(Fn,!an);Fn+=2,cn!==0&&(Fn+=cn)}Lt.avcc=new Uint8Array(ot),Lt.avcc.set(new Uint8Array(He,Ve,ot),0),me.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",Lt)}_parseAVCVideoData(He,Ve,ot,Lt,At,an,Ot){let xn=this._littleEndian,Zn=new DataView(He,Ve,ot),wi=[],Bn=0,rn=0;const Fn=this._naluLengthSize;let vi=this._timestampBase+Lt,_i=an===1;for(;rn<ot;){if(rn+4>=ot){me.w(this.TAG,`Malformed Nalu near timestamp ${vi}, offset = ${rn}, dataSize = ${ot}`);break}let cn=Zn.getUint32(rn,!xn);if(Fn===3&&(cn>>>=8),cn>ot-Fn){me.w(this.TAG,`Malformed Nalus near timestamp ${vi}, NaluSize > DataSize!`);return}let qn=Zn.getUint8(rn+Fn)&31;qn===5&&(_i=!0);let Ii=new Uint8Array(He,Ve+rn,Fn+cn),lr={type:qn,data:Ii};wi.push(lr),Bn+=Ii.byteLength,rn+=Fn+cn}if(wi.length){let cn=this._videoTrack,qn={units:wi,length:Bn,isKeyframe:_i,dts:vi,cts:Ot,pts:vi+Ot};_i&&(qn.fileposition=At),cn.samples.push(qn),cn.length+=Bn}}}var Ze=rt;class Xe{static init(){Xe.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 Ve in Xe.types)Xe.types.hasOwnProperty(Ve)&&(Xe.types[Ve]=[Ve.charCodeAt(0),Ve.charCodeAt(1),Ve.charCodeAt(2),Ve.charCodeAt(3)]);let He=Xe.constants={};He.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),He.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),He.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),He.STSC=He.STCO=He.STTS,He.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),He.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]),He.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]),He.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),He.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),He.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(He){let Ve=8,ot=null,Lt=Array.prototype.slice.call(arguments,1),At=Lt.length;for(let Ot=0;Ot<At;Ot++)Ve+=Lt[Ot].byteLength;ot=new Uint8Array(Ve),ot[0]=Ve>>>24&255,ot[1]=Ve>>>16&255,ot[2]=Ve>>>8&255,ot[3]=Ve&255,ot.set(He,4);let an=8;for(let Ot=0;Ot<At;Ot++)ot.set(Lt[Ot],an),an+=Lt[Ot].byteLength;return ot}static generateInitSegment(He){let Ve=Xe.box(Xe.types.ftyp,Xe.constants.FTYP),ot=Xe.moov(He),Lt=new Uint8Array(Ve.byteLength+ot.byteLength);return Lt.set(Ve,0),Lt.set(ot,Ve.byteLength),Lt}static moov(He){let Ve=Xe.mvhd(He.timescale,He.duration),ot=Xe.trak(He),Lt=Xe.mvex(He);return Xe.box(Xe.types.moov,Ve,ot,Lt)}static mvhd(He,Ve){return Xe.box(Xe.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,He>>>24&255,He>>>16&255,He>>>8&255,He&255,Ve>>>24&255,Ve>>>16&255,Ve>>>8&255,Ve&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(He){return Xe.box(Xe.types.trak,Xe.tkhd(He),Xe.mdia(He))}static tkhd(He){let Ve=He.id,ot=He.duration,Lt=He.presentWidth,At=He.presentHeight;return Xe.box(Xe.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,Ve>>>24&255,Ve>>>16&255,Ve>>>8&255,Ve&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,Lt>>>8&255,Lt&255,0,0,At>>>8&255,At&255,0,0]))}static mdia(He){return Xe.box(Xe.types.mdia,Xe.mdhd(He),Xe.hdlr(He),Xe.minf(He))}static mdhd(He){let Ve=He.timescale,ot=He.duration;return Xe.box(Xe.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,Ve>>>24&255,Ve>>>16&255,Ve>>>8&255,Ve&255,ot>>>24&255,ot>>>16&255,ot>>>8&255,ot&255,85,196,0,0]))}static hdlr(He){let Ve=null;return He.type==="audio"?Ve=Xe.constants.HDLR_AUDIO:Ve=Xe.constants.HDLR_VIDEO,Xe.box(Xe.types.hdlr,Ve)}static minf(He){let Ve=null;return He.type==="audio"?Ve=Xe.box(Xe.types.smhd,Xe.constants.SMHD):Ve=Xe.box(Xe.types.vmhd,Xe.constants.VMHD),Xe.box(Xe.types.minf,Ve,Xe.dinf(),Xe.stbl(He))}static dinf(){return Xe.box(Xe.types.dinf,Xe.box(Xe.types.dref,Xe.constants.DREF))}static stbl(He){return Xe.box(Xe.types.stbl,Xe.stsd(He),Xe.box(Xe.types.stts,Xe.constants.STTS),Xe.box(Xe.types.stsc,Xe.constants.STSC),Xe.box(Xe.types.stsz,Xe.constants.STSZ),Xe.box(Xe.types.stco,Xe.constants.STCO))}static stsd(He){return He.type==="audio"?He.codec==="mp3"?Xe.box(Xe.types.stsd,Xe.constants.STSD_PREFIX,Xe.mp3(He)):Xe.box(Xe.types.stsd,Xe.constants.STSD_PREFIX,Xe.mp4a(He)):Xe.box(Xe.types.stsd,Xe.constants.STSD_PREFIX,Xe.avc1(He))}static mp3(He){let Ve=He.channelCount,ot=He.audioSampleRate,Lt=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,Ve,0,16,0,0,0,0,ot>>>8&255,ot&255,0,0]);return Xe.box(Xe.types[".mp3"],Lt)}static mp4a(He){let Ve=He.channelCount,ot=He.audioSampleRate,Lt=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,Ve,0,16,0,0,0,0,ot>>>8&255,ot&255,0,0]);return Xe.box(Xe.types.mp4a,Lt,Xe.esds(He))}static esds(He){let Ve=He.config||[],ot=Ve.length,Lt=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(Ve).concat([6,1,2]));return Xe.box(Xe.types.esds,Lt)}static avc1(He){let Ve=He.avcc,ot=He.codecWidth,Lt=He.codecHeight,At=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,Lt>>>8&255,Lt&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 Xe.box(Xe.types.avc1,At,Xe.box(Xe.types.avcC,Ve))}static mvex(He){return Xe.box(Xe.types.mvex,Xe.trex(He))}static trex(He){let Ve=He.id,ot=new Uint8Array([0,0,0,0,Ve>>>24&255,Ve>>>16&255,Ve>>>8&255,Ve&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return Xe.box(Xe.types.trex,ot)}static moof(He,Ve){return Xe.box(Xe.types.moof,Xe.mfhd(He.sequenceNumber),Xe.traf(He,Ve))}static mfhd(He){let Ve=new Uint8Array([0,0,0,0,He>>>24&255,He>>>16&255,He>>>8&255,He&255]);return Xe.box(Xe.types.mfhd,Ve)}static traf(He,Ve){let ot=He.id,Lt=Xe.box(Xe.types.tfhd,new Uint8Array([0,0,0,0,ot>>>24&255,ot>>>16&255,ot>>>8&255,ot&255])),At=Xe.box(Xe.types.tfdt,new Uint8Array([0,0,0,0,Ve>>>24&255,Ve>>>16&255,Ve>>>8&255,Ve&255])),an=Xe.sdtp(He),Ot=Xe.trun(He,an.byteLength+16+16+8+16+8+8);return Xe.box(Xe.types.traf,Lt,At,Ot,an)}static sdtp(He){let Ve=He.samples||[],ot=Ve.length,Lt=new Uint8Array(4+ot);for(let At=0;At<ot;At++){let an=Ve[At].flags;Lt[At+4]=an.isLeading<<6|an.dependsOn<<4|an.isDependedOn<<2|an.hasRedundancy}return Xe.box(Xe.types.sdtp,Lt)}static trun(He,Ve){let ot=He.samples||[],Lt=ot.length,At=12+16*Lt,an=new Uint8Array(At);Ve+=8+At,an.set([0,0,15,1,Lt>>>24&255,Lt>>>16&255,Lt>>>8&255,Lt&255,Ve>>>24&255,Ve>>>16&255,Ve>>>8&255,Ve&255],0);for(let Ot=0;Ot<Lt;Ot++){let xn=ot[Ot].duration,Zn=ot[Ot].size,wi=ot[Ot].flags,Bn=ot[Ot].cts;an.set([xn>>>24&255,xn>>>16&255,xn>>>8&255,xn&255,Zn>>>24&255,Zn>>>16&255,Zn>>>8&255,Zn&255,wi.isLeading<<2|wi.dependsOn,wi.isDependedOn<<6|wi.hasRedundancy<<4|wi.isNonSync,0,0,Bn>>>24&255,Bn>>>16&255,Bn>>>8&255,Bn&255],12+16*Ot)}return Xe.box(Xe.types.trun,an)}static mdat(He){return Xe.box(Xe.types.mdat,He)}}Xe.init();var mt=Xe;class Rt{static getSilentFrame(He,Ve){if(He==="mp4a.40.2"){if(Ve===1)return new Uint8Array([0,200,0,128,35,128]);if(Ve===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(Ve===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(Ve===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(Ve===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(Ve===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(Ve===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(Ve===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(Ve===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 vn=Rt;class An{constructor(He,Ve,ot,Lt,At){this.dts=He,this.pts=Ve,this.duration=ot,this.originalDts=Lt,this.isSyncPoint=At,this.fileposition=null}}class Mn{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(He){He.isSyncPoint=!0,this.syncPoints.push(He)}}class hi{constructor(){this._list=[]}clear(){this._list=[]}appendArray(He){let Ve=this._list;He.length!==0&&(Ve.length>0&&He[0].originalDts<Ve[Ve.length-1].originalDts&&this.clear(),Array.prototype.push.apply(Ve,He))}getLastSyncPointBeforeDts(He){if(this._list.length==0)return null;let Ve=this._list,ot=0,Lt=Ve.length-1,At=0,an=0,Ot=Lt;for(He<Ve[0].dts&&(ot=0,an=Ot+1);an<=Ot;)if(At=an+Math.floor((Ot-an)/2),At===Lt||He>=Ve[At].dts&&He<Ve[At+1].dts){ot=At;break}else Ve[At].dts<He?an=At+1:Ot=At-1;return this._list[ot]}}class mi{constructor(He){this._type=He,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(He){let Ve=this._list;if(Ve.length===0)return-2;let ot=Ve.length-1,Lt=0,At=0,an=ot,Ot=0;if(He<Ve[0].originalBeginDts)return Ot=-1,Ot;for(;At<=an;)if(Lt=At+Math.floor((an-At)/2),Lt===ot||He>Ve[Lt].lastSample.originalDts&&He<Ve[Lt+1].originalBeginDts){Ot=Lt;break}else Ve[Lt].originalBeginDts<He?At=Lt+1:an=Lt-1;return Ot}_searchNearestSegmentAfter(He){return this._searchNearestSegmentBefore(He)+1}append(He){let Ve=this._list,ot=He,Lt=this._lastAppendLocation,At=0;Lt!==-1&&Lt<Ve.length&&ot.originalBeginDts>=Ve[Lt].lastSample.originalDts&&(Lt===Ve.length-1||Lt<Ve.length-1&&ot.originalBeginDts<Ve[Lt+1].originalBeginDts)?At=Lt+1:Ve.length>0&&(At=this._searchNearestSegmentBefore(ot.originalBeginDts)+1),this._lastAppendLocation=At,this._list.splice(At,0,ot)}getLastSegmentBefore(He){let Ve=this._searchNearestSegmentBefore(He);return Ve>=0?this._list[Ve]:null}getLastSampleBefore(He){let Ve=this.getLastSegmentBefore(He);return Ve!=null?Ve.lastSample:null}getLastSyncPointBefore(He){let Ve=this._searchNearestSegmentBefore(He),ot=this._list[Ve].syncPoints;for(;ot.length===0&&Ve>0;)Ve--,ot=this._list[Ve].syncPoints;return ot.length>0?ot[ot.length-1]:null}}class si{constructor(He){this.TAG="MP4Remuxer",this._config=He,this._isLive=He.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 mi("audio"),this._videoSegmentInfoList=new mi("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(ie.chrome&&(ie.version.major<50||ie.version.major===50&&ie.version.build<2661)),this._fillSilentAfterSeek=ie.msedge||ie.msie,this._mp3UseMpegAudio=!ie.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(He){return He.onDataAvailable=this.remux.bind(this),He.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}get onInitSegment(){return this._onInitSegment}set onInitSegment(He){this._onInitSegment=He}get onMediaSegment(){return this._onMediaSegment}set onMediaSegment(He){this._onMediaSegment=He}insertDiscontinuity(){this._audioNextDts=this._videoNextDts=void 0}seek(He){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}remux(He,Ve){if(!this._onMediaSegment)throw new ge("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(He,Ve),this._remuxVideo(Ve),this._remuxAudio(He)}_onTrackMetadataReceived(He,Ve){let ot=null,Lt="mp4",At=Ve.codec;if(He==="audio")this._audioMeta=Ve,Ve.codec==="mp3"&&this._mp3UseMpegAudio?(Lt="mpeg",At="",ot=new Uint8Array):ot=mt.generateInitSegment(Ve);else if(He==="video")this._videoMeta=Ve,ot=mt.generateInitSegment(Ve);else return;if(!this._onInitSegment)throw new ge("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(He,{type:He,data:ot.buffer,codec:At,container:`${He}/${Lt}`,mediaDuration:Ve.duration})}_calculateDtsBase(He,Ve){this._dtsBaseInited||(He.samples&&He.samples.length&&(this._audioDtsBase=He.samples[0].dts),Ve.samples&&Ve.samples.length&&(this._videoDtsBase=Ve.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}flushStashedSamples(){let He=this._videoStashedLastSample,Ve=this._audioStashedLastSample,ot={type:"video",id:1,sequenceNumber:0,samples:[],length:0};He!=null&&(ot.samples.push(He),ot.length=He.length);let Lt={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};Ve!=null&&(Lt.samples.push(Ve),Lt.length=Ve.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(ot,!0),this._remuxAudio(Lt,!0)}_remuxAudio(He,Ve){if(this._audioMeta==null)return;let ot=He,Lt=ot.samples,At,an=-1,Ot=-1,xn=-1,Zn=this._audioMeta.refSampleDuration,wi=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,Bn=this._dtsBaseInited&&this._audioNextDts===void 0,rn=!1;if(!Lt||Lt.length===0||Lt.length===1&&!Ve)return;let Fn=0,vi=null,_i=0;wi?(Fn=0,_i=ot.length):(Fn=8,_i=8+ot.length);let cn=null;if(Lt.length>1&&(cn=Lt.pop(),_i-=cn.length),this._audioStashedLastSample!=null){let li=this._audioStashedLastSample;this._audioStashedLastSample=null,Lt.unshift(li),_i+=li.length}cn!=null&&(this._audioStashedLastSample=cn);let qn=Lt[0].dts-this._dtsBase;if(this._audioNextDts)At=qn-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())At=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(rn=!0);else{let li=this._audioSegmentInfoList.getLastSampleBefore(qn);if(li!=null){let dr=qn-(li.originalDts+li.duration);dr<=3&&(dr=0);let jr=li.dts+li.duration+dr;At=qn-jr}else At=0}if(rn){let li=qn-At,dr=this._videoSegmentInfoList.getLastSegmentBefore(qn);if(dr!=null&&dr.beginDts<li){let jr=vn.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(jr){let ei=dr.beginDts,Ui=li-dr.beginDts;me.v(this.TAG,`InsertPrefixSilentAudio: dts: ${ei}, duration: ${Ui}`),Lt.unshift({unit:jr,dts:ei,pts:ei}),_i+=jr.byteLength}}else rn=!1}let Ii=[];for(let li=0;li<Lt.length;li++){let dr=Lt[li],jr=dr.unit,ei=dr.dts-this._dtsBase,Ui=ei-At;an===-1&&(an=Ui);let ws=0;li!==Lt.length-1?ws=Lt[li+1].dts-this._dtsBase-At-Ui:cn!=null?ws=cn.dts-this._dtsBase-At-Ui:Ii.length>=1?ws=Ii[Ii.length-1].duration:ws=Math.floor(Zn);let cs=!1,Io=null;if(ws>Zn*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!ie.safari){cs=!0;let dn=Math.abs(ws-Zn),gr=Math.ceil(dn/Zn),Zr=Ui+Zn;me.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
|
|
|
dts: ${Ui+ws} ms, expected: ${Ui+Math.round(Zn)} ms, delta: ${Math.round(dn)} ms, generate: ${gr} frames`);let $i=vn.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);$i==null&&(me.w(this.TAG,`Unable to generate silent frame for ${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`),$i=jr),Io=[];for(let Rr=0;Rr<gr;Rr++){let uo=Math.round(Zr);if(Io.length>0){let Yr=Io[Io.length-1];Yr.duration=uo-Yr.dts}let to={dts:uo,pts:uo,cts:0,unit:$i,size:$i.byteLength,duration:0,originalDts:ei,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};Io.push(to),_i+=to.size,Zr+=Zn}let yo=Io[Io.length-1];yo.duration=Ui+ws-yo.dts,ws=Math.round(Zn)}Ii.push({dts:Ui,pts:Ui,cts:0,unit:dr.unit,size:dr.unit.byteLength,duration:ws,originalDts:ei,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),cs&&Ii.push.apply(Ii,Io)}wi?vi=new Uint8Array(_i):(vi=new Uint8Array(_i),vi[0]=_i>>>24&255,vi[1]=_i>>>16&255,vi[2]=_i>>>8&255,vi[3]=_i&255,vi.set(mt.types.mdat,4));for(let li=0;li<Ii.length;li++){let dr=Ii[li].unit;vi.set(dr,Fn),Fn+=dr.byteLength}let lr=Ii[Ii.length-1];Ot=lr.dts+lr.duration,this._audioNextDts=Ot;let _r=new Mn;_r.beginDts=an,_r.endDts=Ot,_r.beginPts=an,_r.endPts=Ot,_r.originalBeginDts=Ii[0].originalDts,_r.originalEndDts=lr.originalDts+lr.duration,_r.firstSample=new An(Ii[0].dts,Ii[0].pts,Ii[0].duration,Ii[0].originalDts,!1),_r.lastSample=new An(lr.dts,lr.pts,lr.duration,lr.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(_r),ot.samples=Ii,ot.sequenceNumber++;let Ti=null;wi?Ti=new Uint8Array:Ti=mt.moof(ot,an),ot.samples=[],ot.length=0;let bi={type:"audio",data:this._mergeBoxes(Ti,vi).buffer,sampleCount:Ii.length,info:_r};wi&&Bn&&(bi.timestampOffset=an),this._onMediaSegment("audio",bi)}_remuxVideo(He,Ve){if(this._videoMeta==null)return;let ot=He,Lt=ot.samples,At,an=-1,Ot=-1,xn=-1,Zn=-1;if(!Lt||Lt.length===0||Lt.length===1&&!Ve)return;let wi=8,Bn=null,rn=8+He.length,Fn=null;if(Lt.length>1&&(Fn=Lt.pop(),rn-=Fn.length),this._videoStashedLastSample!=null){let lr=this._videoStashedLastSample;this._videoStashedLastSample=null,Lt.unshift(lr),rn+=lr.length}Fn!=null&&(this._videoStashedLastSample=Fn);let vi=Lt[0].dts-this._dtsBase;if(this._videoNextDts)At=vi-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())At=0;else{let lr=this._videoSegmentInfoList.getLastSampleBefore(vi);if(lr!=null){let _r=vi-(lr.originalDts+lr.duration);_r<=3&&(_r=0);let Ti=lr.dts+lr.duration+_r;At=vi-Ti}else At=0}let _i=new Mn,cn=[];for(let lr=0;lr<Lt.length;lr++){let _r=Lt[lr],Ti=_r.dts-this._dtsBase,bi=_r.isKeyframe,li=Ti-At,dr=_r.cts,jr=li+dr;an===-1&&(an=li,xn=jr);let ei=0;if(lr!==Lt.length-1?ei=Lt[lr+1].dts-this._dtsBase-At-li:Fn!=null?ei=Fn.dts-this._dtsBase-At-li:cn.length>=1?ei=cn[cn.length-1].duration:ei=Math.floor(this._videoMeta.refSampleDuration),bi){let Ui=new An(li,jr,ei,_r.dts,!0);Ui.fileposition=_r.fileposition,_i.appendSyncPoint(Ui)}cn.push({dts:li,pts:jr,cts:dr,units:_r.units,size:_r.length,isKeyframe:bi,duration:ei,originalDts:Ti,flags:{isLeading:0,dependsOn:bi?2:1,isDependedOn:bi?1:0,hasRedundancy:0,isNonSync:bi?0:1}})}Bn=new Uint8Array(rn),Bn[0]=rn>>>24&255,Bn[1]=rn>>>16&255,Bn[2]=rn>>>8&255,Bn[3]=rn&255,Bn.set(mt.types.mdat,4);for(let lr=0;lr<cn.length;lr++){let _r=cn[lr].units;for(;_r.length;){let bi=_r.shift().data;Bn.set(bi,wi),wi+=bi.byteLength}}let qn=cn[cn.length-1];if(Ot=qn.dts+qn.duration,Zn=qn.pts+qn.duration,this._videoNextDts=Ot,_i.beginDts=an,_i.endDts=Ot,_i.beginPts=xn,_i.endPts=Zn,_i.originalBeginDts=cn[0].originalDts,_i.originalEndDts=qn.originalDts+qn.duration,_i.firstSample=new An(cn[0].dts,cn[0].pts,cn[0].duration,cn[0].originalDts,cn[0].isKeyframe),_i.lastSample=new An(qn.dts,qn.pts,qn.duration,qn.originalDts,qn.isKeyframe),this._isLive||this._videoSegmentInfoList.append(_i),ot.samples=cn,ot.sequenceNumber++,this._forceFirstIDR){let lr=cn[0].flags;lr.dependsOn=2,lr.isNonSync=0}let Ii=mt.moof(ot,an);ot.samples=[],ot.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(Ii,Bn).buffer,sampleCount:cn.length,info:_i})}_mergeBoxes(He,Ve){let ot=new Uint8Array(He.byteLength+Ve.byteLength);return ot.set(He,0),ot.set(Ve,He.byteLength),ot}}var Cn=si,Yn={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 Qi{constructor(He,Ve){this.TAG="TransmuxingController",this._emitter=new(Me()),this._config=Ve,He.segments||(He.segments=[{duration:He.duration,filesize:He.filesize,url:He.url}]),typeof He.cors!="boolean"&&(He.cors=!0),typeof He.withCredentials!="boolean"&&(He.withCredentials=!1),this._mediaDataSource=He,this._currentSegmentIndex=0;let ot=0;this._mediaDataSource.segments.forEach(Lt=>{Lt.timestampBase=ot,ot+=Lt.duration,Lt.cors=He.cors,Lt.withCredentials=He.withCredentials,Ve.referrerPolicy&&(Lt.referrerPolicy=Ve.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(He,Ve){this._emitter.addListener(He,Ve)}off(He,Ve){this._emitter.removeListener(He,Ve)}start(){this._loadSegment(0),this._enableStatisticsReporter()}_loadSegment(He,Ve){this._currentSegmentIndex=He;let ot=this._mediaDataSource.segments[He],Lt=this._ioctl=new wt(ot,this._config,He);Lt.onError=this._onIOException.bind(this),Lt.onSeeked=this._onIOSeeked.bind(this),Lt.onComplete=this._onIOComplete.bind(this),Lt.onRedirect=this._onIORedirect.bind(this),Lt.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),Ve?this._demuxer.bindDataSource(this._ioctl):Lt.onDataArrival=this._onInitChunkArrival.bind(this),Lt.open(Ve)}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(He){if(this._mediaInfo==null||!this._mediaInfo.isSeekable())return;let Ve=this._searchSegmentIndexContains(He);if(Ve===this._currentSegmentIndex){let ot=this._mediaInfo.segments[Ve];if(ot==null)this._pendingSeekTime=He;else{let Lt=ot.getNearestKeyframe(He);this._remuxer.seek(Lt.milliseconds),this._ioctl.seek(Lt.fileposition),this._pendingResolveSeekPoint=Lt.milliseconds}}else{let ot=this._mediaInfo.segments[Ve];if(ot==null)this._pendingSeekTime=He,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(Ve);else{let Lt=ot.getNearestKeyframe(He);this._internalAbort(),this._remuxer.seek(He),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[Ve].timestampBase,this._loadSegment(Ve,Lt.fileposition),this._pendingResolveSeekPoint=Lt.milliseconds,this._reportSegmentMediaInfo(Ve)}}this._enableStatisticsReporter()}_searchSegmentIndexContains(He){let Ve=this._mediaDataSource.segments,ot=Ve.length-1;for(let Lt=0;Lt<Ve.length;Lt++)if(He<Ve[Lt].timestampBase){ot=Lt-1;break}return ot}_onInitChunkArrival(He,Ve){let ot=null,Lt=0;if(Ve>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,Lt=this._demuxer.parseChunks(He,Ve);else if((ot=Ze.probe(He)).match){this._demuxer=new Ze(ot,this._config),this._remuxer||(this._remuxer=new Cn(this._config));let At=this._mediaDataSource;At.duration!=null&&!isNaN(At.duration)&&(this._demuxer.overridedDuration=At.duration),typeof At.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=At.hasAudio),typeof At.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=At.hasVideo),this._demuxer.timestampBase=At.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),Lt=this._demuxer.parseChunks(He,Ve)}else ot=null,me.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(()=>{this._internalAbort()}),this._emitter.emit(Yn.DEMUX_ERROR,nt.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),Lt=0;return Lt}_onMediaInfo(He){this._mediaInfo==null&&(this._mediaInfo=Object.assign({},He),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,Kt.prototype));let Ve=Object.assign({},He);Object.setPrototypeOf(Ve,Kt.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=Ve,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(()=>{let ot=this._pendingSeekTime;this._pendingSeekTime=null,this.seek(ot)})}_onMetaDataArrived(He){this._emitter.emit(Yn.METADATA_ARRIVED,He)}_onScriptDataArrived(He){this._emitter.emit(Yn.SCRIPTDATA_ARRIVED,He)}_onIOSeeked(){this._remuxer.insertDiscontinuity()}_onIOComplete(He){let ot=He+1;ot<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(ot)):(this._remuxer.flushStashedSamples(),this._emitter.emit(Yn.LOADING_COMPLETE),this._disableStatisticsReporter())}_onIORedirect(He){let Ve=this._ioctl.extraData;this._mediaDataSource.segments[Ve].redirectedURL=He}_onIORecoveredEarlyEof(){this._emitter.emit(Yn.RECOVERED_EARLY_EOF)}_onIOException(He,Ve){me.e(this.TAG,`IOException: type = ${He}, code = ${Ve.code}, msg = ${Ve.msg}`),this._emitter.emit(Yn.IO_ERROR,He,Ve),this._disableStatisticsReporter()}_onDemuxException(He,Ve){me.e(this.TAG,`DemuxException: type = ${He}, info = ${Ve}`),this._emitter.emit(Yn.DEMUX_ERROR,He,Ve)}_onRemuxerInitSegmentArrival(He,Ve){this._emitter.emit(Yn.INIT_SEGMENT,He,Ve)}_onRemuxerMediaSegmentArrival(He,Ve){if(this._pendingSeekTime==null&&(this._emitter.emit(Yn.MEDIA_SEGMENT,He,Ve),this._pendingResolveSeekPoint!=null&&He==="video")){let ot=Ve.info.syncPoints,Lt=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,ie.safari&&ot.length>0&&ot[0].originalDts===Lt&&(Lt=ot[0].pts),this._emitter.emit(Yn.RECOMMEND_SEEKPOINT,Lt)}}_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(He){let Ve=this._mediaInfo.segments[He],ot=Object.assign({},Ve);ot.duration=this._mediaInfo.duration,ot.segmentCount=this._mediaInfo.segmentCount,delete ot.segments,delete ot.keyframesIndex,this._emitter.emit(Yn.MEDIA_INFO,ot)}_reportStatisticsInfo(){let He={};He.url=this._ioctl.currentURL,He.hasRedirect=this._ioctl.hasRedirect,He.hasRedirect&&(He.redirectedURL=this._ioctl.currentRedirectedURL),He.speed=this._ioctl.currentSpeed,He.loaderType=this._ioctl.loaderType,He.currentSegmentIndex=this._currentSegmentIndex,He.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(Yn.STATISTICS_INFO,He)}}var vr=Qi,Ci=function(sn){let He="TransmuxingWorker",Ve=null,ot=_i.bind(this);ye.install(),sn.addEventListener("message",function(cn){switch(cn.data.cmd){case"init":Ve=new vr(cn.data.param[0],cn.data.param[1]),Ve.on(Yn.IO_ERROR,rn.bind(this)),Ve.on(Yn.DEMUX_ERROR,Fn.bind(this)),Ve.on(Yn.INIT_SEGMENT,Lt.bind(this)),Ve.on(Yn.MEDIA_SEGMENT,At.bind(this)),Ve.on(Yn.LOADING_COMPLETE,an.bind(this)),Ve.on(Yn.RECOVERED_EARLY_EOF,Ot.bind(this)),Ve.on(Yn.MEDIA_INFO,xn.bind(this)),Ve.on(Yn.METADATA_ARRIVED,Zn.bind(this)),Ve.on(Yn.SCRIPTDATA_ARRIVED,wi.bind(this)),Ve.on(Yn.STATISTICS_INFO,Bn.bind(this)),Ve.on(Yn.RECOMMEND_SEEKPOINT,vi.bind(this));break;case"destroy":Ve&&(Ve.destroy(),Ve=null),sn.postMessage({msg:"destroyed"});break;case"start":Ve.start();break;case"stop":Ve.stop();break;case"seek":Ve.seek(cn.data.param);break;case"pause":Ve.pause();break;case"resume":Ve.resume();break;case"logging_config":{let qn=cn.data.param;yt.applyConfig(qn),qn.enableCallback===!0?yt.addLogListener(ot):yt.removeLogListener(ot);break}}});function Lt(cn,qn){let Ii={msg:Yn.INIT_SEGMENT,data:{type:cn,data:qn}};sn.postMessage(Ii,[qn.data])}function At(cn,qn){let Ii={msg:Yn.MEDIA_SEGMENT,data:{type:cn,data:qn}};sn.postMessage(Ii,[qn.data])}function an(){let cn={msg:Yn.LOADING_COMPLETE};sn.postMessage(cn)}function Ot(){let cn={msg:Yn.RECOVERED_EARLY_EOF};sn.postMessage(cn)}function xn(cn){let qn={msg:Yn.MEDIA_INFO,data:cn};sn.postMessage(qn)}function Zn(cn){let qn={msg:Yn.METADATA_ARRIVED,data:cn};sn.postMessage(qn)}function wi(cn){let qn={msg:Yn.SCRIPTDATA_ARRIVED,data:cn};sn.postMessage(qn)}function Bn(cn){let qn={msg:Yn.STATISTICS_INFO,data:cn};sn.postMessage(qn)}function rn(cn,qn){sn.postMessage({msg:Yn.IO_ERROR,data:{type:cn,info:qn}})}function Fn(cn,qn){sn.postMessage({msg:Yn.DEMUX_ERROR,data:{type:cn,info:qn}})}function vi(cn){sn.postMessage({msg:Yn.RECOMMEND_SEEKPOINT,data:cn})}function _i(cn,qn){sn.postMessage({msg:"logcat_callback",data:{type:cn,logcat:qn}})}};class kr{constructor(He,Ve){if(this.TAG="Transmuxer",this._emitter=new(Me()),Ve.enableWorker&&typeof Worker!="undefined")try{let ot=De(18034);this._worker=ot(Ci),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[He,Ve]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},yt.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:yt.getConfig()})}catch(ot){me.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new vr(He,Ve)}else this._controller=new vr(He,Ve);if(this._controller){let ot=this._controller;ot.on(Yn.IO_ERROR,this._onIOError.bind(this)),ot.on(Yn.DEMUX_ERROR,this._onDemuxError.bind(this)),ot.on(Yn.INIT_SEGMENT,this._onInitSegment.bind(this)),ot.on(Yn.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),ot.on(Yn.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),ot.on(Yn.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),ot.on(Yn.MEDIA_INFO,this._onMediaInfo.bind(this)),ot.on(Yn.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),ot.on(Yn.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),ot.on(Yn.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),ot.on(Yn.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}destroy(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),yt.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}on(He,Ve){this._emitter.addListener(He,Ve)}off(He,Ve){this._emitter.removeListener(He,Ve)}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(He){this._worker?this._worker.postMessage({cmd:"seek",param:He}):this._controller.seek(He)}pause(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}resume(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}_onInitSegment(He,Ve){Promise.resolve().then(()=>{this._emitter.emit(Yn.INIT_SEGMENT,He,Ve)})}_onMediaSegment(He,Ve){Promise.resolve().then(()=>{this._emitter.emit(Yn.MEDIA_SEGMENT,He,Ve)})}_onLoadingComplete(){Promise.resolve().then(()=>{this._emitter.emit(Yn.LOADING_COMPLETE)})}_onRecoveredEarlyEof(){Promise.resolve().then(()=>{this._emitter.emit(Yn.RECOVERED_EARLY_EOF)})}_onMediaInfo(He){Promise.resolve().then(()=>{this._emitter.emit(Yn.MEDIA_INFO,He)})}_onMetaDataArrived(He){Promise.resolve().then(()=>{this._emitter.emit(Yn.METADATA_ARRIVED,He)})}_onScriptDataArrived(He){Promise.resolve().then(()=>{this._emitter.emit(Yn.SCRIPTDATA_ARRIVED,He)})}_onStatisticsInfo(He){Promise.resolve().then(()=>{this._emitter.emit(Yn.STATISTICS_INFO,He)})}_onIOError(He,Ve){Promise.resolve().then(()=>{this._emitter.emit(Yn.IO_ERROR,He,Ve)})}_onDemuxError(He,Ve){Promise.resolve().then(()=>{this._emitter.emit(Yn.DEMUX_ERROR,He,Ve)})}_onRecommendSeekpoint(He){Promise.resolve().then(()=>{this._emitter.emit(Yn.RECOMMEND_SEEKPOINT,He)})}_onLoggingConfigChanged(He){this._worker&&this._worker.postMessage({cmd:"logging_config",param:He})}_onWorkerMessage(He){let Ve=He.data,ot=Ve.data;if(Ve.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(Ve.msg){case Yn.INIT_SEGMENT:case Yn.MEDIA_SEGMENT:this._emitter.emit(Ve.msg,ot.type,ot.data);break;case Yn.LOADING_COMPLETE:case Yn.RECOVERED_EARLY_EOF:this._emitter.emit(Ve.msg);break;case Yn.MEDIA_INFO:Object.setPrototypeOf(ot,Kt.prototype),this._emitter.emit(Ve.msg,ot);break;case Yn.METADATA_ARRIVED:case Yn.SCRIPTDATA_ARRIVED:case Yn.STATISTICS_INFO:this._emitter.emit(Ve.msg,ot);break;case Yn.IO_ERROR:case Yn.DEMUX_ERROR:this._emitter.emit(Ve.msg,ot.type,ot.info);break;case Yn.RECOMMEND_SEEKPOINT:this._emitter.emit(Ve.msg,ot);break;case"logcat_callback":me.emitter.emit("log",ot.type,ot.logcat);break;default:break}}}var vo=kr,Do={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};class Oo{constructor(He){this.TAG="MSEController",this._config=He,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 hi}destroy(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}on(He,Ve){this._emitter.addListener(He,Ve)}off(He,Ve){this._emitter.removeListener(He,Ve)}attachMediaElement(He){if(this._mediaSource)throw new ge("MediaSource has been attached to an HTMLMediaElement!");let Ve=this._mediaSource=new window.MediaSource;Ve.addEventListener("sourceopen",this.e.onSourceOpen),Ve.addEventListener("sourceended",this.e.onSourceEnded),Ve.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=He,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),He.src=this._mediaSourceObjectURL}detachMediaElement(){if(this._mediaSource){let He=this._mediaSource;for(let Ve in this._sourceBuffers){let ot=this._pendingSegments[Ve];ot.splice(0,ot.length),this._pendingSegments[Ve]=null,this._pendingRemoveRanges[Ve]=null,this._lastInitSegments[Ve]=null;let Lt=this._sourceBuffers[Ve];if(Lt){if(He.readyState!=="closed"){try{He.removeSourceBuffer(Lt)}catch(At){me.e(this.TAG,At.message)}Lt.removeEventListener("error",this.e.onSourceBufferError),Lt.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[Ve]=null,this._sourceBuffers[Ve]=null}}if(He.readyState==="open")try{He.endOfStream()}catch(Ve){me.e(this.TAG,Ve.message)}He.removeEventListener("sourceopen",this.e.onSourceOpen),He.removeEventListener("sourceended",this.e.onSourceEnded),He.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(He,Ve){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(He),this._pendingSegments[He.type].push(He);return}let ot=He,Lt=`${ot.container}`;ot.codec&&ot.codec.length>0&&(Lt+=`;codecs=${ot.codec}`);let At=!1;if(me.v(this.TAG,"Received Initialization Segment, mimeType: "+Lt),this._lastInitSegments[ot.type]=ot,Lt!==this._mimeTypes[ot.type]){if(this._mimeTypes[ot.type])me.v(this.TAG,`Notice: ${ot.type} mimeType changed, origin: ${this._mimeTypes[ot.type]}, target: ${Lt}`);else{At=!0;try{let an=this._sourceBuffers[ot.type]=this._mediaSource.addSourceBuffer(Lt);an.addEventListener("error",this.e.onSourceBufferError),an.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(an){me.e(this.TAG,an.message),this._emitter.emit(Do.ERROR,{code:an.code,msg:an.message});return}}this._mimeTypes[ot.type]=Lt}Ve||this._pendingSegments[ot.type].push(ot),At||this._sourceBuffers[ot.type]&&!this._sourceBuffers[ot.type].updating&&this._doAppendSegments(),ie.safari&&ot.container==="audio/mpeg"&&ot.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=ot.mediaDuration/1e3,this._updateMediaSourceDuration())}appendMediaSegment(He){let Ve=He;this._pendingSegments[Ve.type].push(Ve),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();let ot=this._sourceBuffers[Ve.type];ot&&!ot.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}seek(He){for(let Ve in this._sourceBuffers){if(!this._sourceBuffers[Ve])continue;let ot=this._sourceBuffers[Ve];if(this._mediaSource.readyState==="open")try{ot.abort()}catch(At){me.e(this.TAG,At.message)}this._idrList.clear();let Lt=this._pendingSegments[Ve];if(Lt.splice(0,Lt.length),this._mediaSource.readyState!=="closed"){for(let At=0;At<ot.buffered.length;At++){let an=ot.buffered.start(At),Ot=ot.buffered.end(At);this._pendingRemoveRanges[Ve].push({start:an,end:Ot})}if(ot.updating||this._doRemoveRanges(),ie.safari){let At=this._lastInitSegments[Ve];At&&(this._pendingSegments[Ve].push(At),ot.updating||this._doAppendSegments())}}}}endOfStream(){let He=this._mediaSource,Ve=this._sourceBuffers;if(!He||He.readyState!=="open"){He&&He.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}Ve.video&&Ve.video.updating||Ve.audio&&Ve.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,He.endOfStream())}getNearestKeyframe(He){return this._idrList.getLastSyncPointBeforeDts(He)}_needCleanupSourceBuffer(){if(!this._config.autoCleanupSourceBuffer)return!1;let He=this._mediaElement.currentTime;for(let Ve in this._sourceBuffers){let ot=this._sourceBuffers[Ve];if(ot){let Lt=ot.buffered;if(Lt.length>=1&&He-Lt.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}_doCleanupSourceBuffer(){let He=this._mediaElement.currentTime;for(let Ve in this._sourceBuffers){let ot=this._sourceBuffers[Ve];if(ot){let Lt=ot.buffered,At=!1;for(let an=0;an<Lt.length;an++){let Ot=Lt.start(an),xn=Lt.end(an);if(Ot<=He&&He<xn+3){if(He-Ot>=this._config.autoCleanupMaxBackwardDuration){At=!0;let Zn=He-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[Ve].push({start:Ot,end:Zn})}}else xn<He&&(At=!0,this._pendingRemoveRanges[Ve].push({start:Ot,end:xn}))}At&&!ot.updating&&this._doRemoveRanges()}}}_updateMediaSourceDuration(){let He=this._sourceBuffers;if(this._mediaElement.readyState===0||this._mediaSource.readyState!=="open"||He.video&&He.video.updating||He.audio&&He.audio.updating)return;let Ve=this._mediaSource.duration,ot=this._pendingMediaDuration;ot>0&&(isNaN(Ve)||ot>Ve)&&(me.v(this.TAG,`Update MediaSource duration from ${Ve} to ${ot}`),this._mediaSource.duration=ot),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}_doRemoveRanges(){for(let He in this._pendingRemoveRanges){if(!this._sourceBuffers[He]||this._sourceBuffers[He].updating)continue;let Ve=this._sourceBuffers[He],ot=this._pendingRemoveRanges[He];for(;ot.length&&!Ve.updating;){let Lt=ot.shift();Ve.remove(Lt.start,Lt.end)}}}_doAppendSegments(){let He=this._pendingSegments;for(let Ve in He)if(!(!this._sourceBuffers[Ve]||this._sourceBuffers[Ve].updating)&&He[Ve].length>0){let ot=He[Ve].shift();if(ot.timestampOffset){let Lt=this._sourceBuffers[Ve].timestampOffset,At=ot.timestampOffset/1e3;Math.abs(Lt-At)>.1&&(me.v(this.TAG,`Update MPEG audio timestampOffset from ${Lt} to ${At}`),this._sourceBuffers[Ve].timestampOffset=At),delete ot.timestampOffset}if(!ot.data||ot.data.byteLength===0)continue;try{this._sourceBuffers[Ve].appendBuffer(ot.data),this._isBufferFull=!1,Ve==="video"&&ot.hasOwnProperty("info")&&this._idrList.appendArray(ot.info.syncPoints)}catch(Lt){this._pendingSegments[Ve].unshift(ot),Lt.code===22?(this._isBufferFull||this._emitter.emit(Do.BUFFER_FULL),this._isBufferFull=!0):(me.e(this.TAG,Lt.message),this._emitter.emit(Do.ERROR,{code:Lt.code,msg:Lt.message}))}}}_onSourceOpen(){if(me.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0){let He=this._pendingSourceBufferInit;for(;He.length;){let Ve=He.shift();this.appendInitSegment(Ve,!0)}}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(Do.SOURCE_OPEN)}_onSourceEnded(){me.v(this.TAG,"MediaSource onSourceEnded")}_onSourceClose(){me.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 He=this._pendingSegments;return He.video.length>0||He.audio.length>0}_hasPendingRemoveRanges(){let He=this._pendingRemoveRanges;return He.video.length>0||He.audio.length>0}_onSourceBufferUpdateEnd(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(Do.UPDATE_END)}_onSourceBufferError(He){me.e(this.TAG,`SourceBuffer Error: ${He}`)}}var Cr=Oo;const jo={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},or={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:nt.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:nt.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:nt.CODEC_UNSUPPORTED};class kn{constructor(He,Ve){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(Me()),this._config=$t(),typeof Ve=="object"&&Object.assign(this._config,Ve),He.type.toLowerCase()!=="flv")throw new he("FlvPlayer requires an flv MediaDataSource input!");He.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=He,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=ie.chrome&&(ie.version.major<50||ie.version.major===50&&ie.version.build<2661);this._alwaysSeekKeyframe=!!(ot||ie.msedge||ie.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(He,Ve){He===dt.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(dt.MEDIA_INFO,this.mediaInfo)}):He===dt.STATISTICS_INFO&&this._statisticsInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(dt.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(He,Ve)}off(He,Ve){this._emitter.removeListener(He,Ve)}attachMediaElement(He){if(this._mediaElement=He,He.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),He.addEventListener("seeking",this.e.onvSeeking),He.addEventListener("canplay",this.e.onvCanPlay),He.addEventListener("stalled",this.e.onvStalled),He.addEventListener("progress",this.e.onvProgress),this._msectl=new Cr(this._config),this._msectl.on(Do.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(Do.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(Do.SOURCE_OPEN,()=>{this._mseSourceOpened=!0,this._hasPendingLoad&&(this._hasPendingLoad=!1,this.load())}),this._msectl.on(Do.ERROR,Ve=>{this._emitter.emit(dt.ERROR,jo.MEDIA_ERROR,or.MEDIA_MSE_ERROR,Ve)}),this._msectl.attachMediaElement(He),this._pendingSeekTime!=null)try{He.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(Ve){}}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 ge("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new ge("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 vo(this._mediaDataSource,this._config),this._transmuxer.on(Yn.INIT_SEGMENT,(He,Ve)=>{this._msectl.appendInitSegment(Ve)}),this._transmuxer.on(Yn.MEDIA_SEGMENT,(He,Ve)=>{if(this._msectl.appendMediaSegment(Ve),this._config.lazyLoad&&!this._config.isLive){let ot=this._mediaElement.currentTime;Ve.info.endDts>=(ot+this._config.lazyLoadMaxDuration)*1e3&&this._progressChecker==null&&(me.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}),this._transmuxer.on(Yn.LOADING_COMPLETE,()=>{this._msectl.endOfStream(),this._emitter.emit(dt.LOADING_COMPLETE)}),this._transmuxer.on(Yn.RECOVERED_EARLY_EOF,()=>{this._emitter.emit(dt.RECOVERED_EARLY_EOF)}),this._transmuxer.on(Yn.IO_ERROR,(He,Ve)=>{this._emitter.emit(dt.ERROR,jo.NETWORK_ERROR,He,Ve)}),this._transmuxer.on(Yn.DEMUX_ERROR,(He,Ve)=>{this._emitter.emit(dt.ERROR,jo.MEDIA_ERROR,He,{code:-1,msg:Ve})}),this._transmuxer.on(Yn.MEDIA_INFO,He=>{this._mediaInfo=He,this._emitter.emit(dt.MEDIA_INFO,Object.assign({},He))}),this._transmuxer.on(Yn.METADATA_ARRIVED,He=>{this._emitter.emit(dt.METADATA_ARRIVED,He)}),this._transmuxer.on(Yn.SCRIPTDATA_ARRIVED,He=>{this._emitter.emit(dt.SCRIPTDATA_ARRIVED,He)}),this._transmuxer.on(Yn.STATISTICS_INFO,He=>{this._statisticsInfo=this._fillStatisticsInfo(He),this._emitter.emit(dt.STATISTICS_INFO,Object.assign({},this._statisticsInfo))}),this._transmuxer.on(Yn.RECOMMEND_SEEKPOINT,He=>{this._mediaElement&&!this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=He/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(He){this._mediaElement.volume=He}get muted(){return this._mediaElement.muted}set muted(He){this._mediaElement.muted=He}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(He){this._mediaElement?this._internalSeek(He):this._pendingSeekTime=He}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(He){if(He.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return He;let Ve=!0,ot=0,Lt=0;if(this._mediaElement.getVideoPlaybackQuality){let At=this._mediaElement.getVideoPlaybackQuality();ot=At.totalVideoFrames,Lt=At.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(ot=this._mediaElement.webkitDecodedFrameCount,Lt=this._mediaElement.webkitDroppedFrameCount):Ve=!1;return Ve&&(He.decodedFrames=ot,He.droppedFrames=Lt),He}_onmseUpdateEnd(){if(!this._config.lazyLoad||this._config.isLive)return;let He=this._mediaElement.buffered,Ve=this._mediaElement.currentTime,ot=0,Lt=0;for(let At=0;At<He.length;At++){let an=He.start(At),Ot=He.end(At);if(an<=Ve&&Ve<Ot){ot=an,Lt=Ot;break}}Lt>=Ve+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(me.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}_onmseBufferFull(){me.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 He=this._mediaElement.currentTime,Ve=this._mediaElement.buffered,ot=!1;for(let Lt=0;Lt<Ve.length;Lt++){let At=Ve.start(Lt),an=Ve.end(Lt);if(He>=At&&He<an){He>=an-this._config.lazyLoadRecoverDuration&&(ot=!0);break}}ot&&(window.clearInterval(this._progressChecker),this._progressChecker=null,ot&&(me.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}_isTimepointBuffered(He){let Ve=this._mediaElement.buffered;for(let ot=0;ot<Ve.length;ot++){let Lt=Ve.start(ot),At=Ve.end(ot);if(He>=Lt&&He<At)return!0}return!1}_internalSeek(He){let Ve=this._isTimepointBuffered(He),ot=!1,Lt=0;if(He<1&&this._mediaElement.buffered.length>0){let At=this._mediaElement.buffered.start(0);(At<1&&He<At||ie.safari)&&(ot=!0,Lt=ie.safari?.1:At)}if(ot)this._requestSetTime=!0,this._mediaElement.currentTime=Lt;else if(Ve){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=He;else{let At=this._msectl.getNearestKeyframe(Math.floor(He*1e3));this._requestSetTime=!0,At!=null?this._mediaElement.currentTime=At.dts/1e3:this._mediaElement.currentTime=He}this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(He),this._transmuxer.seek(Math.floor(He*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=He)}_checkAndApplyUnbufferedSeekpoint(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){let He=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(He)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(He),this._transmuxer.seek(Math.floor(He*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=He))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_checkAndResumeStuckPlayback(He){let Ve=this._mediaElement;if(He||!this._receivedCanPlay||Ve.readyState<2){let ot=Ve.buffered;ot.length>0&&Ve.currentTime<ot.start(0)&&(me.w(this.TAG,`Playback seems stuck at ${Ve.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(He){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}_onvSeeking(He){let Ve=this._mediaElement.currentTime,ot=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(Ve<1&&ot.length>0){let Lt=ot.start(0);if(Lt<1&&Ve<Lt||ie.safari){this._requestSetTime=!0,this._mediaElement.currentTime=ie.safari?.1:Lt;return}}if(this._isTimepointBuffered(Ve)){if(this._alwaysSeekKeyframe){let Lt=this._msectl.getNearestKeyframe(Math.floor(Ve*1e3));Lt!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=Lt.dts/1e3)}this._progressChecker!=null&&this._checkProgressAndResume();return}this._seekpointRecord={seekPoint:Ve,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_onvCanPlay(He){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}_onvStalled(He){this._checkAndResumeStuckPlayback(!0)}_onvProgress(He){this._checkAndResumeStuckPlayback()}}var qe=kn;class Tn{constructor(He,Ve){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(Me()),this._config=$t(),typeof Ve=="object"&&Object.assign(this._config,Ve),He.type.toLowerCase()==="flv")throw new he("NativePlayer does't support flv MediaDataSource input!");if(He.hasOwnProperty("segments"))throw new he(`NativePlayer(${He.type}) doesn't support multipart playback!`);this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=He,this._mediaElement=null}destroy(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(He,Ve){He===dt.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(dt.MEDIA_INFO,this.mediaInfo)}):He===dt.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(dt.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(He,Ve)}off(He,Ve){this._emitter.removeListener(He,Ve)}attachMediaElement(He){if(this._mediaElement=He,He.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{He.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(Ve){}}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 ge("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(He){this._mediaElement.volume=He}get muted(){return this._mediaElement.muted}set muted(He){this._mediaElement.muted=He}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(He){this._mediaElement?this._mediaElement.currentTime=He:this._pendingSeekTime=He}get mediaInfo(){let Ve={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(Ve.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(Ve.width=this._mediaElement.videoWidth,Ve.height=this._mediaElement.videoHeight)),Ve}get statisticsInfo(){let He={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return He;let Ve=!0,ot=0,Lt=0;if(this._mediaElement.getVideoPlaybackQuality){let At=this._mediaElement.getVideoPlaybackQuality();ot=At.totalVideoFrames,Lt=At.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(ot=this._mediaElement.webkitDecodedFrameCount,Lt=this._mediaElement.webkitDroppedFrameCount):Ve=!1;return Ve&&(He.decodedFrames=ot,He.droppedFrames=Lt),He}_onvLoadedMetadata(He){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(dt.MEDIA_INFO,this.mediaInfo)}_reportStatisticsInfo(){this._emitter.emit(dt.STATISTICS_INFO,this.statisticsInfo)}}var In=Tn;ye.install();function zi(sn,He){let Ve=sn;if(Ve==null||typeof Ve!="object")throw new he("MediaDataSource must be an javascript object!");if(!Ve.hasOwnProperty("type"))throw new he("MediaDataSource must has type field to indicate video file type!");switch(Ve.type){case"flv":return new qe(Ve,He);default:return new In(Ve,He)}}function Gi(){return et.supportMSEH264Playback()}function Vi(){return et.getFeatureList()}let Zi={};Zi.createPlayer=zi,Zi.isSupported=Gi,Zi.getFeatureList=Vi,Zi.BaseLoader=ee,Zi.LoaderStatus=fe,Zi.LoaderErrors=ue,Zi.Events=dt,Zi.ErrorTypes=jo,Zi.ErrorDetails=or,Zi.FlvPlayer=qe,Zi.NativePlayer=In,Zi.LoggingControl=yt,Object.defineProperty(Zi,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var qr=Zi},69548:function(_n,hn,De){(function(Le){if(1)window.OSS=Le(),_n.exports=Le();else var ye})(function(){var Le;return function(){function ye(Fe,Me,Ee){function me(we,ge){if(!Me[we]){if(!Fe[we]){var he=void 0;if(!ge&&he)return require(we,!0);if(be)return be(we,!0);var xe=new Error("Cannot find module '"+we+"'");throw xe.code="MODULE_NOT_FOUND",xe}var fe=Me[we]={exports:{}};Fe[we][0].call(fe.exports,function(ue){return me(Fe[we][1][ue]||ue)},fe,fe.exports,ye,Fe,Me,Ee)}return Me[we].exports}for(var be=void 0,ve=0;ve<Ee.length;ve++)me(Ee[ve]);return me}return ye}()({1:[function(ye,Fe,Me){"use strict";var Ee=ye("./browser/client");Ee.Buffer=ye("buffer").Buffer,Ee.co=ye("co"),Ee.urllib=ye("../shims/xhr"),Ee.version=ye("./browser/version").version,Fe.exports=Ee},{"../shims/xhr":244,"./browser/client":2,"./browser/version":5,buffer:38,co:41}],2:[function(ye,Fe,Me){(function(Ee,me){"use strict";function be(et){return et&&et.__esModule?et:{default:et}}function ve(et,lt){return et[lt]||et[lt.toLowerCase()]}function we(et,lt){var dt=Re.parse(et);if(!dt.protocol){var bt=lt?"https://":"http://";dt=Re.parse(bt+et)}if(dt.protocol!=="http:"&&dt.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return dt}function ge(et,lt,dt){var bt=dt?"https://":"http://",yt=lt?"-internal.aliyuncs.com":".aliyuncs.com";return et.substr(0,14)==="vpc100-oss-cn-"&&(yt=".aliyuncs.com"),Re.parse(bt+et+yt)}function he(){return document&&document.location&&document.location.protocol==="https:"}function xe(et,lt){if(!(this instanceof xe))return new xe(et,lt);et&&et.inited?this.options=et:this.options=xe.initOptions(et),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=pt,this.agent=this.options.agent||$t),this.ctx=lt,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}var fe=ye("babel-runtime/regenerator"),ue=be(fe),ee=ye("babel-runtime/core-js/object/keys"),z=be(ee),oe=ye("debug")("ali-oss"),ie=ye("./../../shims/crypto/crypto.js"),se=ye("path"),le=ye("copy-to"),Se=ye("mime"),pe=ye("xml2js"),Ce=ye("humanize-ms"),Ae=ye("agentkeepalive"),Oe=ye("merge-descriptors"),Re=ye("url"),We=ye("is-type-of"),$e=ye("platform"),Je=ye("utility"),pt=ye("urllib"),St=ye("./version"),Mt=ye("dateformat"),ct=ye("bowser"),wt=ye("../common/signUtils"),ft=ye("../common/utils"),$t=new Ae;Fe.exports=xe,xe.initOptions=function(et){if(!et||!et.accessKeyId||!et.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");var lt=he(),dt={region:"oss-cn-hangzhou",internal:!1,secure:lt,bucket:null,endpoint:null,cname:!1};if((0,z.default)(et).forEach(function(bt){et[bt]!==void 0&&(dt[bt]=et[bt])}),dt.accessKeyId=dt.accessKeyId.trim(),dt.accessKeySecret=dt.accessKeySecret.trim(),dt.timeout&&(dt.timeout=Ce(dt.timeout)),dt.endpoint)dt.endpoint=we(dt.endpoint,dt.secure);else{if(!dt.region)throw new Error("require options.endpoint or options.region");dt.endpoint=ge(dt.region,dt.internal,dt.secure)}return dt.inited=!0,dt};var st=xe.prototype;Oe(st,ye("./object")),Oe(st,ye("./managed_upload")),Oe(st,ye("../common/multipart")),Oe(st,ye("../common/thunkpool.js")),xe.Wrapper=ye("./wrapper"),st.signature=function(et){return oe("authorization stringToSign: %s",et),wt.computeSignature(this.options.accessKeySecret,et)},st.authorization=function(et,lt,dt,bt){var yt=wt.buildCanonicalString(et.toUpperCase(),lt,{headers:bt,parameters:dt});return wt.authorization(this.options.accessKeyId,this.options.accessKeySecret,yt)},st.createRequest=function(et){var lt={"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&&(lt["x-oss-security-token"]=this.options.stsToken),le(et.headers).to(lt),ve(lt,"Content-Type")||(et.mime===Se.default_type&&(et.mime=""),et.mime&&et.mime.indexOf("/")>0?lt["Content-Type"]=et.mime:lt["Content-Type"]=Se.getType(et.mime||se.extname(et.object||""))||"application/octet-stream"),et.content&&(lt["Content-Md5"]=ie.createHash("md5").update(new me(et.content,"utf8")).digest("base64"),lt["Content-Length"]||(lt["Content-Length"]=et.content.length));var dt=this._getResource(et);lt.authorization=this.authorization(et.method,dt,et.subres,lt);var bt=this._getReqUrl(et);oe("request %s %s, with headers %j, !!stream: %s",et.method,bt,lt,!!et.stream);var yt=et.timeout||this.options.timeout;return{url:bt,params:{agent:this.agent,method:et.method,content:et.content,stream:et.stream,headers:lt,timeout:yt,writeStream:et.writeStream,customResponse:et.customResponse,ctx:et.ctx||this.ctx}}},st.request=ue.default.mark(function et(lt){var dt,bt,yt,Vt;return ue.default.wrap(function(Kt){for(;;)switch(Kt.prev=Kt.next){case 0:return dt=this.createRequest(lt),bt=void 0,yt=void 0,Kt.prev=3,Kt.next=6,this.urllib.request(dt.url,dt.params);case 6:bt=Kt.sent,oe("response %s %s, got %s, headers: %j",lt.method,dt.url,bt.status,bt.headers),Kt.next=13;break;case 10:Kt.prev=10,Kt.t0=Kt.catch(3),yt=Kt.t0;case 13:if(Vt=void 0,!bt||!lt.successStatuses||lt.successStatuses.indexOf(bt.status)!==-1){Kt.next=26;break}return Kt.next=17,this.requestError(bt);case 17:if(Vt=Kt.sent,Vt.code!=="RequestTimeTooSkewed"){Kt.next=23;break}return this.options.amendTimeSkewed=+new Date(Vt.serverTime)-new Date,Kt.next=22,this.request(lt);case 22:return Kt.abrupt("return",Kt.sent);case 23:Vt.params=lt,Kt.next=30;break;case 26:if(!yt){Kt.next=30;break}return Kt.next=29,this.requestError(yt);case 29:Vt=Kt.sent;case 30:if(!Vt){Kt.next=32;break}throw Vt;case 32:if(!lt.xmlResponse){Kt.next=36;break}return Kt.next=35,this.parseXML(bt.data);case 35:bt.data=Kt.sent;case 36:return Kt.abrupt("return",bt);case 37:case"end":return Kt.stop()}},et,this,[[3,10]])}),st._getResource=function(et){var lt="/";return et.bucket&&(lt+=et.bucket+"/"),et.object&&(lt+=et.object),lt},st._isIP=function(et){return ft._isIP(et)},st._escape=function(et){return Je.encodeURIComponent(et).replace(/%2F/g,"/")},st._getReqUrl=function(et){var lt={};le(this.options.endpoint).to(lt);var dt=this._isIP(lt.hostname),bt=this.options.cname;!et.bucket||bt||dt||(lt.host=et.bucket+"."+lt.host);var yt="/";et.bucket&&dt&&(yt+=et.bucket+"/"),et.object&&(yt+=this._escape(et.object).replace(/\+/g,"%2B")),lt.pathname=yt;var Vt={};if(et.query&&Oe(Vt,et.query),et.subres){var Kt={};We.string(et.subres)?Kt[et.subres]="":We.array(et.subres)?et.subres.forEach(function(gn){Kt[gn]=""}):Kt=et.subres,Oe(Vt,Kt)}return lt.query=Vt,Re.format(lt)},st._getUserAgent=function(){var et=Ee&&Ee.browser?"js":"nodejs",lt="aliyun-sdk-"+et+"/"+St.version,dt=$e.description;return!dt&&Ee&&(dt="Node.js "+Ee.version.slice(1)+" on "+Ee.platform+" "+Ee.arch),this._checkUserAgent(lt+" "+dt)},st._checkUserAgent=function(et){return et.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},st.checkBrowserAndVersion=function(et,lt){return ct.name===et&&ct.version.split(".")[0]===lt},st.parseXML=function(et){return function(lt){me.isBuffer(et)&&(et=et.toString()),pe.parseString(et,{explicitRoot:!1,explicitArray:!1},lt)}},st.requestError=ue.default.mark(function et(lt){var dt,bt,yt,Vt;return ue.default.wrap(function(Kt){for(;;)switch(Kt.prev=Kt.next){case 0:if(dt=null,lt.data&<.data.length){Kt.next=5;break}lt.status===-1||lt.status===-2?(dt=new Error(lt.message),dt.name=lt.name,dt.status=lt.status,dt.code=lt.name):(lt.status===404?(dt=new Error("Object not exists"),dt.name="NoSuchKeyError",dt.status=404,dt.code="NoSuchKey"):lt.status===412?(dt=new Error("Pre condition failed"),dt.name="PreconditionFailedError",dt.status=412,dt.code="PreconditionFailed"):(dt=new Error("Unknow error, status: "+lt.status),dt.name="UnknowError",dt.status=lt.status),dt.requestId=lt.headers["x-oss-request-id"],dt.host=""),Kt.next=30;break;case 5:return bt=String(lt.data),oe("request response error data: %s",bt),yt=void 0,Kt.prev=8,Kt.next=11,this.parseXML(bt)||{};case 11:yt=Kt.sent,Kt.next=21;break;case 14:return Kt.prev=14,Kt.t0=Kt.catch(8),oe(bt),Kt.t0.message+=`
|
|
|
raw xml: `+bt,Kt.t0.status=lt.status,Kt.t0.requestId=lt.headers["x-oss-request-id"],Kt.abrupt("return",Kt.t0);case 21:Vt=yt.Message||"unknow request error, status: "+lt.status,yt.Condition&&(Vt+=" (condition: "+yt.Condition+")"),dt=new Error(Vt),dt.name=yt.Code?yt.Code+"Error":"UnknowError",dt.status=lt.status,dt.code=yt.Code,dt.requestId=yt.RequestId,dt.hostId=yt.HostId,dt.serverTime=yt.ServerTime;case 30:return oe("generate error %j",dt),Kt.abrupt("return",dt);case 32:case"end":return Kt.stop()}},et,this,[[8,14]])})}).call(this,ye("_process"),ye("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(ye,Fe,Me){(function(Ee){"use strict";function me(le){return le&&le.__esModule?le:{default:le}}function be(le,Se){if(!(this instanceof be))return new be(le,Se);se.call(this,Se),this.file=le,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}var ve=ye("babel-runtime/core-js/array/from"),we=me(ve),ge=ye("babel-runtime/regenerator"),he=me(ge),xe=ye("is-type-of"),fe=ye("util"),ue=ye("path"),ee=ye("mime"),z=ye("copy-to"),oe=Me;oe.multipartUpload=he.default.mark(function le(Se,pe,Ce){var Ae,Oe,Re,We,$e,Je,pt,St,Mt;return he.default.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:if(this.resetCancelFlag(),Ce=Ce||{},!Ce.checkpoint||!Ce.checkpoint.uploadId){ct.next=6;break}return ct.next=5,this._resumeMultipart(Ce.checkpoint,Ce);case 5:return ct.abrupt("return",ct.sent);case 6:return Ae=102400,Ce.mime||(xe.file(pe)?Ce.mime=ee.getType(ue.extname(pe.name)):xe.blob(pe)?Ce.mime=pe.type:Ce.mime=ee.getType(ue.extname(pe))),Ce.headers=Ce.headers||{},this._convertMetaToHeaders(Ce.meta,Ce.headers),ct.next=12,this._getFileSize(pe);case 12:if(!((Oe=ct.sent)<Ae)){ct.next=25;break}return Re=this._createStream(pe,0,Oe),Ce.contentLength=Oe,ct.next=18,this.putStream(Se,Re,Ce);case 18:if(We=ct.sent,!Ce||!Ce.progress){ct.next=22;break}return ct.next=22,Ce.progress(1);case 22:return $e={res:We.res,bucket:this.options.bucket,name:Se,etag:We.res.headers.etag},(Ce.headers&&Ce.headers["x-oss-callback"]||Ce.callback)&&($e.data=We.data),ct.abrupt("return",$e);case 25:if(!(Ce.partSize&&Ce.partSize<Ae)){ct.next=27;break}throw new Error("partSize must not be smaller than "+Ae);case 27:return ct.next=29,this.initMultipartUpload(Se,Ce);case 29:if(Je=ct.sent,pt=Je.uploadId,St=this._getPartSize(Oe,Ce.partSize),Mt={file:pe,name:Se,fileSize:Oe,partSize:St,uploadId:pt,doneParts:[]},!Ce||!Ce.progress){ct.next=36;break}return ct.next=36,Ce.progress(0,Mt,Je.res);case 36:return ct.next=38,this._resumeMultipart(Mt,Ce);case 38:return ct.abrupt("return",ct.sent);case 39:case"end":return ct.stop()}},le,this)}),oe._resumeMultipart=he.default.mark(function le(Se,pe){var Ce,Ae,Oe,Re,We,$e,Je,pt,St,Mt,ct,wt,ft,$t,st,et,lt,dt,bt,yt,Vt;return he.default.wrap(function(Kt){for(;;)switch(Kt.prev=Kt.next){case 0:if(!this.isCancel()){Kt.next=2;break}throw this._makeCancelEvent();case 2:if(Ce=Se.file,Ae=Se.fileSize,Oe=Se.partSize,Re=Se.uploadId,We=Se.doneParts,$e=Se.name,Je=[],We.length>0&&z(We).to(Je),pt=this._divideParts(Ae,Oe),St=pt.length,Mt=!1,ct=he.default.mark(function gn(Gt,Dt){var on,Jt,jt;return he.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:if(Gt.isCancel()){ut.next=21;break}return ut.prev=1,on=pt[Dt-1],Jt={stream:Gt._createStream(Ce,on.start,on.end),size:on.end-on.start},ut.next=6,Gt._uploadPart($e,Re,Dt,Jt);case 6:if(jt=ut.sent,Gt.isCancel()||Mt){ut.next=13;break}if(Se.doneParts.push({number:Dt,etag:jt.res.headers.etag}),Je.push({number:Dt,etag:jt.res.headers.etag}),!pe||!pe.progress){ut.next=13;break}return ut.next=13,pe.progress(We.length/St,Se,jt.res);case 13:ut.next=21;break;case 15:if(ut.prev=15,ut.t0=ut.catch(1),Gt.isCancel()){ut.next=21;break}throw Gt.cancel(),ut.t0.partNum=Dt,ut.t0;case 21:case"end":return ut.stop()}},gn,this,[[1,15]])}),wt=(0,we.default)(new Array(St),function(gn,Gt){return Gt+1}),ft=Je.map(function(gn){return gn.number}),$t=wt.filter(function(gn){return ft.indexOf(gn)<0}),st=5,et=pe.parallel||st,!this.checkBrowserAndVersion("Internet Explorer","10")&&et!==1){Kt.next=26;break}lt=0;case 16:if(!(lt<$t.length)){Kt.next=24;break}if(!this.isCancel()){Kt.next=19;break}throw this._makeCancelEvent();case 19:return Kt.next=21,ct(this,$t[lt]);case 21:lt++,Kt.next=16;break;case 24:Kt.next=40;break;case 26:for(dt=[],bt=0;bt<$t.length;bt++)dt.push(ct(this,$t[bt]));return Kt.next=30,this._thunkPool(dt,et);case 30:if(yt=Kt.sent,Mt=!0,!(yt&&yt.length>0)){Kt.next=37;break}throw this.resetCancelFlag(),Vt=yt[0],Vt.message="Failed to upload some parts with error: "+Vt.toString()+" part_num: "+Vt.partNum,Vt;case 37:if(!this.isCancel()){Kt.next=40;break}throw dt=null,this._makeCancelEvent();case 40:return Kt.next=42,this.completeMultipartUpload($e,Re,Je,pe);case 42:return Kt.abrupt("return",Kt.sent);case 43:case"end":return Kt.stop()}},le,this)}),xe.file=function(le){return typeof File!="undefined"&&le instanceof File},xe.blob=function(le){return typeof Blob!="undefined"&&le instanceof Blob},oe._getFileSize=he.default.mark(function le(Se){var pe;return he.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(!xe.buffer(Se)){Ce.next=4;break}return Ce.abrupt("return",Se.length);case 4:if(!xe.blob(Se)&&!xe.file(Se)){Ce.next=6;break}return Ce.abrupt("return",Se.size);case 6:if(!xe.string(Se)){Ce.next=11;break}return Ce.next=9,this._statFile(Se);case 9:return pe=Ce.sent,Ce.abrupt("return",pe.size);case 11:throw new Error("_getFileSize requires Buffer/File/String.");case 12:case"end":return Ce.stop()}},le,this)});var ie=ye("stream"),se=ie.Readable;fe.inherits(be,se),be.prototype.readFileAndPush=function(le){if(this.fileBuffer)for(var Se=!0;Se&&this.fileBuffer&&this.start<this.fileBuffer.length;){var pe=this.start,Ce=pe+le;Ce=Ce>this.fileBuffer.length?this.fileBuffer.length:Ce,this.start=Ce,Se=this.push(this.fileBuffer.slice(pe,Ce))}},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 Se=this;this.reader.onload=function(pe){Se.fileBuffer=new Ee(new Uint8Array(pe.target.result)),Se.file=null,Se.readFileAndPush(le)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(le)},oe._createStream=function(le,Se,pe){if(xe.blob(le)||xe.file(le))return new be(le.slice(Se,pe));throw new Error("_createStream requires File/String.")},oe._getPartSize=function(le,Se){return Se?Math.max(Math.ceil(le/1e4),Se):1048576},oe._divideParts=function(le,Se){for(var pe=Math.ceil(le/Se),Ce=[],Ae=0;Ae<pe;Ae++){var Oe=Se*Ae,Re=Math.min(Oe+Se,le);Ce.push({start:Oe,end:Re})}return Ce},oe._makeCancelEvent=function(){return{status:0,name:"cancel"}}}).call(this,ye("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(ye,Fe,Me){"use strict";function Ee(Se){return Se&&Se.__esModule?Se:{default:Se}}var me=ye("babel-runtime/core-js/object/keys"),be=Ee(me),ve=ye("babel-runtime/regenerator"),we=Ee(ve),ge=ye("debug")("ali-oss:object"),he=ye("utility"),xe=ye("fs"),fe=ye("is-type-of"),ue=ye("url"),ee=ye("copy-to"),z=ye("path"),oe=ye("mime"),ie=ye("../common/callback"),se=ye("../common/signUtils"),le=Me;le.append=we.default.mark(function Se(pe,Ce,Ae){var Oe;return we.default.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:return Ae=Ae||{},Ae.position===void 0&&(Ae.position="0"),Ae.subres={append:"",position:Ae.position},Ae.method="POST",Re.next=6,this.put(pe,Ce,Ae);case 6:return Oe=Re.sent,Oe.nextAppendPosition=Oe.res.headers["x-oss-next-append-position"],Re.abrupt("return",Oe);case 9:case"end":return Re.stop()}},Se,this)}),le.put=we.default.mark(function Se(pe,Ce,Ae){var Oe,Re,We,$e,Je,pt;return we.default.wrap(function(St){for(;;)switch(St.prev=St.next){case 0:if(Oe=void 0,Ae=Ae||{},!fe.buffer(Ce)){St.next=6;break}Oe=Ce,St.next=18;break;case 6:if(!fe.blob(Ce)&&!fe.file(Ce)){St.next=17;break}return Ae.mime||(fe.file(Ce)?Ae.mime=oe.getType(z.extname(Ce.name)):Ae.mime=Ce.type),Re=this._createStream(Ce,0,Ce.size),St.next=11,this._getFileSize(Ce);case 11:return Ae.contentLength=St.sent,St.next=14,this.putStream(pe,Re,Ae);case 14:return St.abrupt("return",St.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),We=Ae.method||"PUT",$e=this._objectRequestParams(We,pe,Ae),ie.encodeCallback($e,Ae),$e.mime=Ae.mime,$e.content=Oe,$e.successStatuses=[200],St.next=28,this.request($e);case 28:return Je=St.sent,pt={name:pe,url:this._objectUrl(pe),res:Je.res},$e.headers&&$e.headers["x-oss-callback"]&&(pt.data=JSON.parse(Je.data.toString())),St.abrupt("return",pt);case 32:case"end":return St.stop()}},Se,this)}),le.putStream=we.default.mark(function Se(pe,Ce,Ae){var Oe,Re,We,$e;return we.default.wrap(function(Je){for(;;)switch(Je.prev=Je.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),Oe=Ae.method||"PUT",Re=this._objectRequestParams(Oe,pe,Ae),ie.encodeCallback(Re,Ae),Re.mime=Ae.mime,Re.stream=Ce,Re.successStatuses=[200],Je.next=12,this.request(Re);case 12:return We=Je.sent,$e={name:pe,url:this._objectUrl(pe),res:We.res},Re.headers&&Re.headers["x-oss-callback"]&&($e.data=JSON.parse(We.data.toString())),Je.abrupt("return",$e);case 16:case"end":return Je.stop()}},Se,this)}),le.head=we.default.mark(function Se(pe,Ce){var Ae,Oe,Re;return we.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:return Ae=this._objectRequestParams("HEAD",pe,Ce),Ae.successStatuses=[200,304],We.next=4,this.request(Ae);case 4:return Oe=We.sent,Re={meta:null,res:Oe.res,status:Oe.status},Oe.status===200&&(0,be.default)(Oe.headers).forEach(function($e){$e.indexOf("x-oss-meta-")===0&&(Re.meta||(Re.meta={}),Re.meta[$e.substring(11)]=Oe.headers[$e])}),We.abrupt("return",Re);case 8:case"end":return We.stop()}},Se,this)}),le.get=we.default.mark(function Se(pe,Ce,Ae){var Oe,Re,We,$e;return we.default.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return Oe=null,Re=!1,fe.writableStream(Ce)?Oe=Ce:fe.string(Ce)?(Oe=xe.createWriteStream(Ce),Re=!0):Ae=Ce,Ae=Ae||{},Ae.process&&(Ae.subres=Ae.subres||{},Ae.subres["x-oss-process"]=Ae.process),We=void 0,Je.prev=6,$e=this._objectRequestParams("GET",pe,Ae),$e.writeStream=Oe,$e.successStatuses=[200,206,304],Je.next=12,this.request($e);case 12:We=Je.sent,Re&&Oe.destroy(),Je.next=24;break;case 16:if(Je.prev=16,Je.t0=Je.catch(6),!Re){Je.next=23;break}return Oe.destroy(),ge("get error: %s, delete the exists file %s",Je.t0,Ce),Je.next=23,this._deleteFileSafe(Ce);case 23:throw Je.t0;case 24:return Je.abrupt("return",{res:We.res,content:We.data});case 25:case"end":return Je.stop()}},Se,this,[[6,16]])}),le.getStream=we.default.mark(function Se(pe,Ce){var Ae,Oe;return we.default.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:return Ce=Ce||{},Ae=this._objectRequestParams("GET",pe,Ce),Ae.customResponse=!0,Ae.successStatuses=[200,206,304],Re.next=6,this.request(Ae);case 6:return Oe=Re.sent,Re.abrupt("return",{stream:Oe.res,res:{status:Oe.status,headers:Oe.headers}});case 8:case"end":return Re.stop()}},Se,this)}),le.delete=we.default.mark(function Se(pe,Ce){var Ae,Oe;return we.default.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:return Ae=this._objectRequestParams("DELETE",pe,Ce),Ae.successStatuses=[204],Re.next=4,this.request(Ae);case 4:return Oe=Re.sent,Re.abrupt("return",{res:Oe.res});case 6:case"end":return Re.stop()}},Se,this)}),le.deleteMulti=we.default.mark(function Se(pe,Ce){var Ae,Oe,Re,We,$e,Je;return we.default.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:for(Ce=Ce||{},Ae=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<Delete>
|
|
|
`,Ce.quiet?Ae+=` <Quiet>true</Quiet>
|
|
|
`:Ae+=` <Quiet>false</Quiet>
|
|
|
`,Oe=0;Oe<pe.length;Oe++)Ae+=" <Object><Key>"+he.escape(this._objectName(pe[Oe]))+`</Key></Object>
|
|
|
`;return Ae+="</Delete>",ge("delete multi objects: %s",Ae),Ce.subres="delete",Re=this._objectRequestParams("POST","",Ce),Re.mime="xml",Re.content=Ae,Re.xmlResponse=!0,Re.successStatuses=[200],pt.next=14,this.request(Re);case 14:return We=pt.sent,$e=We.data,Je=$e&&$e.Deleted||null,Je&&(Array.isArray(Je)||(Je=[Je]),Je=Je.map(function(St){return St.Key})),pt.abrupt("return",{res:We.res,deleted:Je});case 19:case"end":return pt.stop()}},Se,this)}),le.copy=we.default.mark(function Se(pe,Ce,Ae){var Oe,Re,We;return we.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return Ae=Ae||{},Ae.headers=Ae.headers||{},(0,be.default)(Ae.headers).forEach(function(Je){Ae.headers["x-oss-copy-source-"+Je.toLowerCase()]=Ae.headers[Je]}),Ae.meta&&(Ae.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(Ae.meta,Ae.headers),Ce=Ce[0]!=="/"?"/"+this.options.bucket+"/"+encodeURIComponent(Ce):"/"+encodeURIComponent(Ce.slice(1)),Ae.headers["x-oss-copy-source"]=Ce,Oe=this._objectRequestParams("PUT",pe,Ae),Oe.xmlResponse=!0,Oe.successStatuses=[200,304],$e.next=12,this.request(Oe);case 12:return Re=$e.sent,We=Re.data,We&&(We={etag:We.ETag,lastModified:We.LastModified}),$e.abrupt("return",{data:We,res:Re.res});case 16:case"end":return $e.stop()}},Se,this)}),le.putMeta=we.default.mark(function Se(pe,Ce,Ae){return we.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return Oe.next=2,this.copy(pe,pe,{meta:Ce||{},timeout:Ae&&Ae.timeout,ctx:Ae&&Ae.ctx});case 2:return Oe.abrupt("return",Oe.sent);case 3:case"end":return Oe.stop()}},Se,this)}),le.list=we.default.mark(function Se(pe,Ce){var Ae,Oe,Re,We,$e;return we.default.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return Ae=this._objectRequestParams("GET","",Ce),Ae.query=pe,Ae.xmlResponse=!0,Ae.successStatuses=[200],Je.next=6,this.request(Ae);case 6:return Oe=Je.sent,Re=Oe.data.Contents,We=this,Re&&(Array.isArray(Re)||(Re=[Re]),Re=Re.map(function(pt){return{name:pt.Key,url:We._objectUrl(pt.Key),lastModified:pt.LastModified,etag:pt.ETag,type:pt.Type,size:Number(pt.Size),storageClass:pt.StorageClass,owner:{id:pt.Owner.ID,displayName:pt.Owner.DisplayName}}})),$e=Oe.data.CommonPrefixes||null,$e&&(Array.isArray($e)||($e=[$e]),$e=$e.map(function(pt){return pt.Prefix})),Je.abrupt("return",{res:Oe.res,objects:Re,prefixes:$e,nextMarker:Oe.data.NextMarker||null,isTruncated:Oe.data.IsTruncated==="true"});case 13:case"end":return Je.stop()}},Se,this)}),le.putACL=we.default.mark(function Se(pe,Ce,Ae){var Oe,Re;return we.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:return Ae=Ae||{},Ae.subres="acl",Ae.headers=Ae.headers||{},Ae.headers["x-oss-object-acl"]=Ce,pe=this._objectName(pe),Oe=this._objectRequestParams("PUT",pe,Ae),Oe.successStatuses=[200],We.next=9,this.request(Oe);case 9:return Re=We.sent,We.abrupt("return",{res:Re.res});case 11:case"end":return We.stop()}},Se,this)}),le.getACL=we.default.mark(function Se(pe,Ce){var Ae,Oe;return we.default.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:return Ce=Ce||{},Ce.subres="acl",pe=this._objectName(pe),Ae=this._objectRequestParams("GET",pe,Ce),Ae.successStatuses=[200],Ae.xmlResponse=!0,Re.next=8,this.request(Ae);case 8:return Oe=Re.sent,Re.abrupt("return",{acl:Oe.data.AccessControlList.Grant,owner:{id:Oe.data.Owner.ID,displayName:Oe.data.Owner.DisplayName},res:Oe.res});case 10:case"end":return Re.stop()}},Se,this)}),le.restore=we.default.mark(function Se(pe,Ce){var Ae,Oe;return we.default.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:return Ce=Ce||{},Ce.subres="restore",Ae=this._objectRequestParams("POST",pe,Ce),Ae.successStatuses=[202],Re.next=6,this.request(Ae);case 6:return Oe=Re.sent,Re.abrupt("return",{res:Oe.res});case 8:case"end":return Re.stop()}},Se,this)}),le.signatureUrl=function(Se,pe){pe=pe||{},Se=this._objectName(Se),pe.method=pe.method||"GET";var Ce=he.timestamp()+(pe.expires||1800),Ae={bucket:this.options.bucket,object:Se},Oe=this._getResource(Ae);this.options.stsToken&&(pe["security-token"]=this.options.stsToken);var Re=se._signatureForURL(this.options.accessKeySecret,pe,Oe,Ce),We=ue.parse(this._getReqUrl(Ae));return We.query={OSSAccessKeyId:this.options.accessKeyId,Expires:Ce,Signature:Re.Signature},ee(Re.subResource).to(We.query),We.format()},le.getObjectUrl=function(Se,pe){return pe?pe[pe.length-1]!=="/"&&(pe+="/"):pe=this.options.endpoint.format(),pe+this._escape(this._objectName(Se))},le._objectUrl=function(Se){return this._getReqUrl({bucket:this.options.bucket,object:Se})},le.generateObjectUrl=function(Se,pe){if(pe)pe[pe.length-1]!=="/"&&(pe+="/");else{pe=this.options.endpoint.format();var Ce=ue.parse(pe),Ae=this.options.bucket;Ce.hostname=Ae+"."+Ce.hostname,Ce.host=Ae+"."+Ce.host,pe=Ce.format()}return pe+this._escape(this._objectName(Se))},le._objectRequestParams=function(Se,pe,Ce){if(!this.options.bucket)throw new Error("Please create a bucket first");Ce=Ce||{},pe=this._objectName(pe);var Ae={object:pe,bucket:this.options.bucket,method:Se,subres:Ce&&Ce.subres,timeout:Ce&&Ce.timeout,ctx:Ce&&Ce.ctx};return Ce.headers&&(Ae.headers={},ee(Ce.headers).to(Ae.headers)),Ae},le._objectName=function(Se){return Se.replace(/^\/+/,"")},le._statFile=function(Se){return function(pe){xe.stat(Se,pe)}},le._convertMetaToHeaders=function(Se,pe){Se&&(0,be.default)(Se).forEach(function(Ce){pe["x-oss-meta-"+Ce]=Se[Ce]})},le._deleteFileSafe=function(Se){return function(pe){xe.exists(Se,function(Ce){Ce?xe.unlink(Se,function(Ae){Ae&&ge("unlink %j error: %s",Se,Ae),pe()}):pe()})}}},{"../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(ye,Fe,Me){"use strict";Me.version="5.3.1"},{}],6:[function(ye,Fe,Me){"use strict";function Ee(z){return z&&z.__esModule?z:{default:z}}function me(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"||me(oe.prototype)||me(z.prototype))}function ve(z,oe){var ie=new z(oe),se=(0,fe.default)(ie),le=(0,fe.default)((0,he.default)(ie));se.concat(le).forEach(function(Se){be(ie[Se])?this[Se]=ue.wrap(ie[Se]).bind(ie):this[Se]=ie[Se]},this)}function we(z){if(!(this instanceof we))return new we(z);ve.call(this,ee,z)}var ge=ye("babel-runtime/core-js/object/get-prototype-of"),he=Ee(ge),xe=ye("babel-runtime/core-js/object/keys"),fe=Ee(xe),ue=ye("co"),ee=ye("./client");Fe.exports=we,we.STS=function z(oe){if(!(this instanceof z))return new z(oe);ve.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(ye,Fe,Me){(function(Ee){"use strict";function me(he){return he&&he.__esModule?he:{default:he}}var be=ye("babel-runtime/core-js/object/keys"),ve=me(be),we=ye("babel-runtime/core-js/json/stringify"),ge=me(we);Me.encodeCallback=function(he,xe){if(he.headers=he.headers||{},!Object.prototype.hasOwnProperty.call(he.headers,"x-oss-callback")&&xe.callback){var fe={callbackUrl:encodeURI(xe.callback.url),callbackBody:xe.callback.body};xe.callback.host&&(fe.callbackHost=xe.callback.host),xe.callback.contentType&&(fe.callbackBodyType=xe.callback.contentType);var ue=new Ee((0,ge.default)(fe)).toString("base64");if(he.headers["x-oss-callback"]=ue,xe.callback.customValue){var ee={};(0,ve.default)(xe.callback.customValue).forEach(function(z){ee["x:"+z]=xe.callback.customValue[z]}),he.headers["x-oss-callback-var"]=new Ee((0,ge.default)(ee)).toString("base64")}}}}).call(this,ye("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38}],8:[function(ye,Fe,Me){"use strict";var Ee=ye("babel-runtime/regenerator"),me=function(ge){return ge&&ge.__esModule?ge:{default:ge}}(Ee),be=ye("copy-to"),ve=ye("./callback"),we=Me;we.listUploads=me.default.mark(function ge(he,xe){var fe,ue,ee,z;return me.default.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return xe=xe||{},fe={},be(xe).to(fe),fe.subres="uploads",ue=this._objectRequestParams("GET","",fe),ue.query=he,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(ie){return{name:ie.Key,uploadId:ie.UploadId,initiated:ie.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()}},ge,this)}),we.listParts=me.default.mark(function ge(he,xe,fe,ue){var ee,z,oe;return me.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return ue=ue||{},ee={},be(ue).to(ee),ee.subres={uploadId:xe},z=this._objectRequestParams("GET",he,ee),z.query=fe,z.xmlResponse=!0,z.successStatuses=[200],ie.next=10,this.request(z);case 10:return oe=ie.sent,ie.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 ie.stop()}},ge,this)}),we.abortMultipartUpload=me.default.mark(function ge(he,xe,fe){var ue,ee,z;return me.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:xe},ee=this._objectRequestParams("DELETE",he,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()}},ge,this)}),we.initMultipartUpload=me.default.mark(function ge(he,xe){var fe,ue,ee;return me.default.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return xe=xe||{},fe={},be(xe).to(fe),fe.headers=fe.headers||{},this._convertMetaToHeaders(xe.meta,fe.headers),fe.subres="uploads",ue=this._objectRequestParams("POST",he,fe),ue.mime=xe.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()}},ge,this)}),we.uploadPart=me.default.mark(function ge(he,xe,fe,ue,ee,z,oe){var ie;return me.default.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return ie={stream:this._createStream(ue,ee,z),size:z-ee},se.next=3,this._uploadPart(he,xe,fe,ie,oe);case 3:return se.abrupt("return",se.sent);case 4:case"end":return se.stop()}},ge,this)}),we.completeMultipartUpload=me.default.mark(function ge(he,xe,fe,ue){var ee,z,oe,ie,se,le,Se,pe;return me.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:for(ee=fe.concat().sort(function(Ae,Oe){return Ae.number-Oe.number}).filter(function(Ae,Oe,Re){return!Oe||Ae.number!==Re[Oe-1].number}),z=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,oe=0;oe<ee.length;oe++)ie=ee[oe],z+=`<Part>
|
|
|
`,z+="<PartNumber>"+ie.number+`</PartNumber>
|
|
|
`,z+="<ETag>"+ie.etag+`</ETag>
|
|
|
`,z+=`</Part>
|
|
|
`;return z+="</CompleteMultipartUpload>",ue=ue||{},se={},be(ue).to(se),se.subres={uploadId:xe},le=this._objectRequestParams("POST",he,se),ve.encodeCallback(le,se),le.mime="xml",le.content=z,le.headers&&le.headers["x-oss-callback"]||(le.xmlResponse=!0),le.successStatuses=[200],Ce.next=16,this.request(le);case 16:return Se=Ce.sent,pe={res:Se.res,bucket:le.bucket,name:he,etag:Se.res.headers.etag},le.headers&&le.headers["x-oss-callback"]&&(pe.data=JSON.parse(Se.data.toString())),Ce.abrupt("return",pe);case 20:case"end":return Ce.stop()}},ge,this)}),we._uploadPart=me.default.mark(function ge(he,xe,fe,ue,ee){var z,oe,ie;return me.default.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return ee=ee||{},z={},be(ee).to(z),z.headers={"Content-Length":ue.size},z.subres={partNumber:fe,uploadId:xe},oe=this._objectRequestParams("PUT",he,z),oe.mime=z.mime,oe.stream=ue.stream,oe.successStatuses=[200],se.next=11,this.request(oe);case 11:return ie=se.sent,ue.stream=null,oe.stream=null,se.abrupt("return",{name:he,etag:ie.res.headers.etag,res:ie.res});case 15:case"end":return se.stop()}},ge,this)})},{"./callback":7,"babel-runtime/regenerator":33,"copy-to":43}],9:[function(ye,Fe,Me){(function(Ee){"use strict";function me(fe){return fe&&fe.__esModule?fe:{default:fe}}var be=ye("babel-runtime/core-js/json/stringify"),ve=me(be),we=ye("babel-runtime/core-js/object/keys"),ge=me(we),he=ye("./../../shims/crypto/crypto.js"),xe=ye("is-type-of");Me.buildCanonicalizedResource=function(fe,ue){var ee=""+fe,z="?";if(xe.string(ue)&&ue.trim()!=="")ee+=z+ue;else if(xe.array(ue))ue.sort(),ee+=z+ue.join("&");else if(ue){var oe=function(se,le){return se[0]>le[0]?1:se[0]<le[0]?-1:0},ie=function(se){ee+=z+se,ue[se]&&(ee+="="+ue[se]),z="&"};(0,ge.default)(ue).sort(oe).forEach(ie)}return ee},Me.buildCanonicalString=function(fe,ue,ee,z){ee=ee||{};var oe=ee.headers||{},ie=[],se={},le=[fe.toUpperCase(),oe["Content-Md5"]||"",oe["Content-Type"]||oe["Content-Type".toLowerCase()],z||oe["x-oss-date"]];return(0,ge.default)(oe).forEach(function(Se){var pe=Se.toLowerCase();pe.indexOf("x-oss-")===0&&(se[pe]=String(oe[Se]).trim())}),(0,ge.default)(se).sort().forEach(function(Se){ie.push(Se+":"+se[Se])}),le=le.concat(ie),le.push(this.buildCanonicalizedResource(ue,ee.parameters)),le.join(`
|
|
|
`)},Me.computeSignature=function(fe,ue){return he.createHmac("sha1",fe).update(new Ee(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={},ie={};if(ue.process&&(ie["x-oss-process"]=ue.process),ue.response&&(0,ge.default)(ue.response).forEach(function(pe){var Ce="response-"+pe.toLowerCase();ie[Ce]=ue.response[pe]}),(0,ge.default)(ue).forEach(function(pe){var Ce=pe.toLowerCase(),Ae=ue[pe];Ce.indexOf("x-oss-")===0?oe[Ce]=Ae:Ce.indexOf("content-md5")===0||Ce.indexOf("content-type")===0?oe[pe]=Ae:Ce!=="expires"&&Ce!=="response"&&Ce!=="process"&&Ce!=="method"&&(ie[Ce]=Ae)}),Object.prototype.hasOwnProperty.call(ue,"security-token")&&(ie["security-token"]=ue["security-token"]),Object.prototype.hasOwnProperty.call(ue,"callback")){var se={callbackUrl:encodeURI(ue.callback.url),callbackBody:ue.callback.body};if(ue.callback.host&&(se.callbackHost=ue.callback.host),ue.callback.contentType&&(se.callbackBodyType=ue.callback.contentType),ie.callback=new Ee((0,ve.default)(se)).toString("base64"),ue.callback.customValue){var le={};(0,ge.default)(ue.callback.customValue).forEach(function(pe){le["x:"+pe]=ue.callback.customValue[pe]}),ie["callback-var"]=new Ee((0,ve.default)(le)).toString("base64")}}var Se=this.buildCanonicalString(ue.method,ee,{headers:oe,parameters:ie},z.toString());return{Signature:this.computeSignature(fe,Se),subResource:ie}}}).call(this,ye("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(ye,Fe,Me){"use strict";var Ee=ye("babel-runtime/regenerator"),me=function(he){return he&&he.__esModule?he:{default:he}}(Ee),be=ye("co"),ve=ye("co-priority-queue"),we=ye("any-promise"),ge=Me;ge._thunkPool=function(he,xe){function fe(ie,se){++z===ie.length&&se(oe)}function ue(ie,se){function le(){var Re;return me.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:Re=void 0;case 1:if(ee.isCancel()){We.next=9;break}return We.next=4,Ce.next();case 4:return Re=We.sent,We.next=7,Re();case 7:We.next=1;break;case 9:Ae+=1,Ae===ie&&(Ce.fns=[],Ce.buffer=[],se(oe));case 11:case"end":return We.stop()}},pe,this)}function Se(Re){console.error(Re.stack)}for(var pe=me.default.mark(le),Ce=new ve,Ae=0,Oe=0;Oe<ie;Oe++)be(le).catch(Se);return function(Re,We){return function($e){Ce.push(me.default.mark(function Je(){return me.default.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:return pt.prev=0,pt.t0=$e,pt.next=4,Re;case 4:pt.t1=pt.sent,(0,pt.t0)(null,pt.t1),pt.next=11;break;case 8:pt.prev=8,pt.t2=pt.catch(0),$e(pt.t2);case 11:case"end":return pt.stop()}},Je,this,[[0,8]])}),We)}}}var ee=this,z=0,oe=[];return new we(function(ie){function se(Ae){return me.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return Oe.next=2,pe(he[Ae]);case 2:fe(he,ie);case 3:case"end":return Oe.stop()}},Se,this)}function le(Ae){oe.push(Ae),fe(he,ie)}for(var Se=me.default.mark(se),pe=new ue(xe,ie),Ce=0;Ce<he.length;Ce++)be(se(Ce)).catch(le)})},ge.cancel=function(){this.options.cancelFlag=!0},ge.isCancel=function(){return this.options.cancelFlag},ge.resetCancelFlag=function(){this.options.cancelFlag=!1}},{"any-promise":13,"babel-runtime/regenerator":33,co:41,"co-priority-queue":40}],11:[function(ye,Fe,Me){"use strict";Me._isIP=function(Ee){var me=/^(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 me.test(Ee)||be.test(Ee)}},{}],12:[function(ye,Fe,Me){function Ee(){}Fe.exports=Ee,Fe.exports.HttpsAgent=Ee},{}],13:[function(ye,Fe,Me){Fe.exports=ye("./register")().Promise},{"./register":15}],14:[function(ye,Fe,Me){"use strict";var Ee=null;Fe.exports=function(me,be){return function(ve,we){ve=ve||null,we=we||{};var ge=we.global!==!1;if(Ee===null&&ge&&(Ee=me["@@any-promise/REGISTRATION"]||null),Ee!==null&&ve!==null&&Ee.implementation!==ve)throw new Error('any-promise already defined as "'+Ee.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return Ee===null&&(Ee=ve!==null&&we.Promise!==void 0?{Promise:we.Promise,implementation:ve}:be(ve),ge&&(me["@@any-promise/REGISTRATION"]=Ee)),Ee}}},{}],15:[function(ye,Fe,Me){"use strict";function Ee(){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"}}Fe.exports=ye("./loader")(window,Ee)},{"./loader":14}],16:[function(ye,Fe,Me){Fe.exports={default:ye("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":44}],17:[function(ye,Fe,Me){Fe.exports={default:ye("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":45}],18:[function(ye,Fe,Me){Fe.exports={default:ye("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":46}],19:[function(ye,Fe,Me){Fe.exports={default:ye("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":47}],20:[function(ye,Fe,Me){Fe.exports={default:ye("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":48}],21:[function(ye,Fe,Me){Fe.exports={default:ye("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":49}],22:[function(ye,Fe,Me){Fe.exports={default:ye("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":50}],23:[function(ye,Fe,Me){Fe.exports={default:ye("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":51}],24:[function(ye,Fe,Me){Fe.exports={default:ye("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":52}],25:[function(ye,Fe,Me){Fe.exports={default:ye("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":53}],26:[function(ye,Fe,Me){Fe.exports={default:ye("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":54}],27:[function(ye,Fe,Me){Fe.exports={default:ye("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":56}],28:[function(ye,Fe,Me){Fe.exports={default:ye("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":55}],29:[function(ye,Fe,Me){Fe.exports={default:ye("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":57}],30:[function(ye,Fe,Me){"use strict";Me.__esModule=!0,Me.default=function(Ee,me){if(!(Ee instanceof me))throw new TypeError("Cannot call a class as a function")}},{}],31:[function(ye,Fe,Me){"use strict";Me.__esModule=!0;var Ee=ye("../core-js/object/define-property"),me=function(be){return be&&be.__esModule?be:{default:be}}(Ee);Me.default=function(){function be(ve,we){for(var ge=0;ge<we.length;ge++){var he=we[ge];he.enumerable=he.enumerable||!1,he.configurable=!0,"value"in he&&(he.writable=!0),(0,me.default)(ve,he.key,he)}}return function(ve,we,ge){return we&&be(ve.prototype,we),ge&&be(ve,ge),ve}}()},{"../core-js/object/define-property":20}],32:[function(ye,Fe,Me){"use strict";function Ee(he){return he&&he.__esModule?he:{default:he}}Me.__esModule=!0;var me=ye("../core-js/symbol/iterator"),be=Ee(me),ve=ye("../core-js/symbol"),we=Ee(ve),ge=typeof we.default=="function"&&typeof be.default=="symbol"?function(he){return typeof he}:function(he){return he&&typeof we.default=="function"&&he.constructor===we.default&&he!==we.default.prototype?"symbol":typeof he};Me.default=typeof we.default=="function"&&ge(be.default)==="symbol"?function(he){return he===void 0?"undefined":ge(he)}:function(he){return he&&typeof we.default=="function"&&he.constructor===we.default&&he!==we.default.prototype?"symbol":he===void 0?"undefined":ge(he)}},{"../core-js/symbol":27,"../core-js/symbol/iterator":29}],33:[function(ye,Fe,Me){Fe.exports=ye("regenerator-runtime")},{"regenerator-runtime":191}],34:[function(ye,Fe,Me){"use strict";function Ee(ie){var se=ie.length;if(se%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var le=ie.indexOf("=");return le===-1&&(le=se),[le,le===se?0:4-le%4]}function me(ie){var se=Ee(ie),le=se[0],Se=se[1];return 3*(le+Se)/4-Se}function be(ie,se,le){return 3*(se+le)/4-le}function ve(ie){for(var se,le=Ee(ie),Se=le[0],pe=le[1],Ce=new ue(be(ie,Se,pe)),Ae=0,Oe=pe>0?Se-4:Se,Re=0;Re<Oe;Re+=4)se=fe[ie.charCodeAt(Re)]<<18|fe[ie.charCodeAt(Re+1)]<<12|fe[ie.charCodeAt(Re+2)]<<6|fe[ie.charCodeAt(Re+3)],Ce[Ae++]=se>>16&255,Ce[Ae++]=se>>8&255,Ce[Ae++]=255&se;return pe===2&&(se=fe[ie.charCodeAt(Re)]<<2|fe[ie.charCodeAt(Re+1)]>>4,Ce[Ae++]=255&se),pe===1&&(se=fe[ie.charCodeAt(Re)]<<10|fe[ie.charCodeAt(Re+1)]<<4|fe[ie.charCodeAt(Re+2)]>>2,Ce[Ae++]=se>>8&255,Ce[Ae++]=255&se),Ce}function we(ie){return xe[ie>>18&63]+xe[ie>>12&63]+xe[ie>>6&63]+xe[63&ie]}function ge(ie,se,le){for(var Se,pe=[],Ce=se;Ce<le;Ce+=3)Se=(ie[Ce]<<16&16711680)+(ie[Ce+1]<<8&65280)+(255&ie[Ce+2]),pe.push(we(Se));return pe.join("")}function he(ie){for(var se,le=ie.length,Se=le%3,pe=[],Ce=0,Ae=le-Se;Ce<Ae;Ce+=16383)pe.push(ge(ie,Ce,Ce+16383>Ae?Ae:Ce+16383));return Se===1?(se=ie[le-1],pe.push(xe[se>>2]+xe[se<<4&63]+"==")):Se===2&&(se=(ie[le-2]<<8)+ie[le-1],pe.push(xe[se>>10]+xe[se>>4&63]+xe[se<<2&63]+"=")),pe.join("")}Me.byteLength=me,Me.toByteArray=ve,Me.fromByteArray=he;for(var xe=[],fe=[],ue=typeof Uint8Array!="undefined"?Uint8Array:Array,ee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",z=0,oe=ee.length;z<oe;++z)xe[z]=ee[z],fe[ee.charCodeAt(z)]=z;fe[45]=62,fe[95]=63},{}],35:[function(ye,Fe,Me){(function(Ee,me,be){Fe!==void 0&&Fe.exports?Fe.exports=be():typeof Le=="function"&&Le.amd?Le("bowser",be):Ee.bowser=be()})(this,0,function(){function Ee(fe){function ue(et){var lt=fe.match(et);return lt&<.length>1&<[1]||""}function ee(et){var lt=fe.match(et);return lt&<.length>1&<[2]||""}var z,oe=ue(/(ipod|iphone|ipad)/i).toLowerCase(),ie=/like android/i.test(fe),se=!ie&&/android/i.test(fe),le=/nexus\s*[0-6]\s*/i.test(fe),Se=!le&&/nexus\s*[0-9]+/i.test(fe),pe=/CrOS/.test(fe),Ce=/silk/i.test(fe),Ae=/sailfish/i.test(fe),Oe=/tizen/i.test(fe),Re=/(web|hpw)os/i.test(fe),We=/windows phone/i.test(fe),$e=(/SamsungBrowser/i.test(fe),!We&&/windows/i.test(fe)),Je=!oe&&!Ce&&/macintosh/i.test(fe),pt=!se&&!Ae&&!Oe&&!Re&&/linux/i.test(fe),St=ee(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),Mt=ue(/version\/(\d+(\.\d+)?)/i),ct=/tablet/i.test(fe)&&!/tablet pc/i.test(fe),wt=!ct&&/[^-]mobi/i.test(fe),ft=/xbox/i.test(fe);/opera/i.test(fe)?z={name:"Opera",opera:he,version:Mt||ue(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(fe)?z={name:"Opera",opera:he,version:ue(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||Mt}:/SamsungBrowser/i.test(fe)?z={name:"Samsung Internet for Android",samsungBrowser:he,version:Mt||ue(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(fe)?z={name:"Opera Coast",coast:he,version:Mt||ue(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(fe)?z={name:"Yandex Browser",yandexbrowser:he,version:Mt||ue(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(fe)?z={name:"UC Browser",ucbrowser:he,version:ue(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(fe)?z={name:"Maxthon",maxthon:he,version:ue(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(fe)?z={name:"Epiphany",epiphany:he,version:ue(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(fe)?z={name:"Puffin",puffin:he,version:ue(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(fe)?z={name:"Sleipnir",sleipnir:he,version:ue(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(fe)?z={name:"K-Meleon",kMeleon:he,version:ue(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:We?(z={name:"Windows Phone",osname:"Windows Phone",windowsphone:he},St?(z.msedge=he,z.version=St):(z.msie=he,z.version=ue(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(fe)?z={name:"Internet Explorer",msie:he,version:ue(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:pe?z={name:"Chrome",osname:"Chrome OS",chromeos:he,chromeBook:he,chrome:he,version:ue(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(fe)?z={name:"Microsoft Edge",msedge:he,version:St}:/vivaldi/i.test(fe)?z={name:"Vivaldi",vivaldi:he,version:ue(/vivaldi\/(\d+(\.\d+)?)/i)||Mt}:Ae?z={name:"Sailfish",osname:"Sailfish OS",sailfish:he,version:ue(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(fe)?z={name:"SeaMonkey",seamonkey:he,version:ue(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(fe)?(z={name:"Firefox",firefox:he,version:ue(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(fe)&&(z.firefoxos=he,z.osname="Firefox OS")):Ce?z={name:"Amazon Silk",silk:he,version:ue(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(fe)?z={name:"PhantomJS",phantom:he,version:ue(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(fe)?z={name:"SlimerJS",slimer:he,version:ue(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(fe)||/rim\stablet/i.test(fe)?z={name:"BlackBerry",osname:"BlackBerry OS",blackberry:he,version:Mt||ue(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:Re?(z={name:"WebOS",osname:"WebOS",webos:he,version:Mt||ue(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(fe)&&(z.touchpad=he)):/bada/i.test(fe)?z={name:"Bada",osname:"Bada",bada:he,version:ue(/dolfin\/(\d+(\.\d+)?)/i)}:Oe?z={name:"Tizen",osname:"Tizen",tizen:he,version:ue(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||Mt}:/qupzilla/i.test(fe)?z={name:"QupZilla",qupzilla:he,version:ue(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||Mt}:/chromium/i.test(fe)?z={name:"Chromium",chromium:he,version:ue(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||Mt}:/chrome|crios|crmo/i.test(fe)?z={name:"Chrome",chrome:he,version:ue(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:se?z={name:"Android",version:Mt}:/safari|applewebkit/i.test(fe)?(z={name:"Safari",safari:he},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:he,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=he):(z.name=z.name||"Webkit",z.webkit=he),!z.version&&Mt&&(z.version=Mt)):!z.opera&&/gecko\//i.test(fe)&&(z.name=z.name||"Gecko",z.gecko=he,z.version=z.version||ue(/gecko\/(\d+(\.\d+)?)/i)),z.windowsphone||!se&&!z.silk?!z.windowsphone&&oe?(z[oe]=he,z.ios=he,z.osname="iOS"):Je?(z.mac=he,z.osname="macOS"):ft?(z.xbox=he,z.osname="Xbox"):$e?(z.windows=he,z.osname="Windows"):pt&&(z.linux=he,z.osname="Linux"):(z.android=he,z.osname="Android");var $t="";z.windows?$t=function(et){switch(et){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?$t=ue(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):z.mac?($t=ue(/Mac OS X (\d+([_\.\s]\d+)*)/i),$t=$t.replace(/[_\s]/g,".")):oe?($t=ue(/os (\d+([_\s]\d+)*) like mac os x/i),$t=$t.replace(/[_\s]/g,".")):se?$t=ue(/android[ \/-](\d+(\.\d+)*)/i):z.webos?$t=ue(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):z.blackberry?$t=ue(/rim\stablet\sos\s(\d+(\.\d+)*)/i):z.bada?$t=ue(/bada\/(\d+(\.\d+)*)/i):z.tizen&&($t=ue(/tizen[\/\s](\d+(\.\d+)*)/i)),$t&&(z.osversion=$t);var st=!z.windows&&$t.split(".")[0];return ct||Se||oe=="ipad"||se&&(st==3||st>=4&&!wt)||z.silk?z.tablet=he:(wt||oe=="iphone"||oe=="ipod"||se||le||z.blackberry||z.webos||z.bada)&&(z.mobile=he),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=he: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=he:z.x=he,z}function me(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 ve(fe){for(var ue=Math.max(me(fe[0]),me(fe[1])),ee=be(fe,function(z){var oe=ue-me(z);return z+=new Array(oe+1).join(".0"),be(z.split("."),function(ie){return new Array(20-ie.length).join("0")+ie}).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=xe;typeof ue=="string"&&(ee=ue,ue=void 0),ue===void 0&&(ue=!1),ee&&(z=Ee(ee));var oe=""+z.version;for(var ie in fe)if(fe.hasOwnProperty(ie)&&z[ie]){if(typeof fe[ie]!="string")throw new Error("Browser version in the minVersion map should be a string: "+ie+": "+String(fe));return ve([oe,fe[ie]])<0}return ue}function ge(fe,ue,ee){return!we(fe,ue,ee)}var he=!0,xe=Ee(typeof navigator!="undefined"&&navigator.userAgent||"");return xe.test=function(fe){for(var ue=0;ue<fe.length;++ue){var ee=fe[ue];if(typeof ee=="string"&&ee in xe)return!0}return!1},xe.isUnsupportedBrowser=we,xe.compareVersions=ve,xe.check=ge,xe._detect=Ee,xe.detect=Ee,xe})},{}],36:[function(ye,Fe,Me){},{}],37:[function(ye,Fe,Me){function Ee(xe){if(xe&&!ge(xe))throw new Error("Unknown encoding: "+xe)}function me(xe){return xe.toString(this.encoding)}function be(xe){this.charReceived=xe.length%2,this.charLength=this.charReceived?2:0}function ve(xe){this.charReceived=xe.length%3,this.charLength=this.charReceived?3:0}var we=ye("buffer").Buffer,ge=we.isEncoding||function(xe){switch(xe&&xe.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}},he=Me.StringDecoder=function(xe){switch(this.encoding=(xe||"utf8").toLowerCase().replace(/[-_]/,""),Ee(xe),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=ve;break;default:return void(this.write=me)}this.charBuffer=new we(6),this.charReceived=0,this.charLength=0};he.prototype.write=function(xe){for(var fe="";this.charLength;){var ue=xe.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:xe.length;if(xe.copy(this.charBuffer,this.charReceived,0,ue),this.charReceived+=ue,this.charReceived<this.charLength)return"";xe=xe.slice(ue,xe.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,xe.length===0)return fe;break}this.charLength+=this.surrogateSize,fe=""}this.detectIncompleteChar(xe);var ee=xe.length;this.charLength&&(xe.copy(this.charBuffer,0,xe.length-this.charReceived,ee),ee-=this.charReceived),fe+=xe.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),xe.copy(this.charBuffer,0,0,oe),fe.substring(0,ee)}return fe},he.prototype.detectIncompleteChar=function(xe){for(var fe=xe.length>=3?3:xe.length;fe>0;fe--){var ue=xe[xe.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},he.prototype.end=function(xe){var fe="";if(xe&&xe.length&&(fe=this.write(xe)),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(ye,Fe,Me){(function(Ee){"use strict";function me(){return ve.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function be(Be,Ue){if(me()<Ue)throw new RangeError("Invalid typed array length");return ve.TYPED_ARRAY_SUPPORT?(Be=new Uint8Array(Ue),Be.__proto__=ve.prototype):(Be===null&&(Be=new ve(Ue)),Be.length=Ue),Be}function ve(Be,Ue,rt){if(!(ve.TYPED_ARRAY_SUPPORT||this instanceof ve))return new ve(Be,Ue,rt);if(typeof Be=="number"){if(typeof Ue=="string")throw new Error("If encoding is specified then the first argument must be a string");return xe(this,Be)}return we(this,Be,Ue,rt)}function we(Be,Ue,rt,Ze){if(typeof Ue=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Ue instanceof ArrayBuffer?ee(Be,Ue,rt,Ze):typeof Ue=="string"?fe(Be,Ue,rt):z(Be,Ue)}function ge(Be){if(typeof Be!="number")throw new TypeError('"size" argument must be a number');if(Be<0)throw new RangeError('"size" argument must not be negative')}function he(Be,Ue,rt,Ze){return ge(Ue),Ue<=0?be(Be,Ue):rt!==void 0?typeof Ze=="string"?be(Be,Ue).fill(rt,Ze):be(Be,Ue).fill(rt):be(Be,Ue)}function xe(Be,Ue){if(ge(Ue),Be=be(Be,Ue<0?0:0|oe(Ue)),!ve.TYPED_ARRAY_SUPPORT)for(var rt=0;rt<Ue;++rt)Be[rt]=0;return Be}function fe(Be,Ue,rt){if(typeof rt=="string"&&rt!==""||(rt="utf8"),!ve.isEncoding(rt))throw new TypeError('"encoding" must be a valid string encoding');var Ze=0|se(Ue,rt);Be=be(Be,Ze);var Xe=Be.write(Ue,rt);return Xe!==Ze&&(Be=Be.slice(0,Xe)),Be}function ue(Be,Ue){var rt=Ue.length<0?0:0|oe(Ue.length);Be=be(Be,rt);for(var Ze=0;Ze<rt;Ze+=1)Be[Ze]=255&Ue[Ze];return Be}function ee(Be,Ue,rt,Ze){if(Ue.byteLength,rt<0||Ue.byteLength<rt)throw new RangeError("'offset' is out of bounds");if(Ue.byteLength<rt+(Ze||0))throw new RangeError("'length' is out of bounds");return Ue=rt===void 0&&Ze===void 0?new Uint8Array(Ue):Ze===void 0?new Uint8Array(Ue,rt):new Uint8Array(Ue,rt,Ze),ve.TYPED_ARRAY_SUPPORT?(Be=Ue,Be.__proto__=ve.prototype):Be=ue(Be,Ue),Be}function z(Be,Ue){if(ve.isBuffer(Ue)){var rt=0|oe(Ue.length);return Be=be(Be,rt),Be.length===0||Ue.copy(Be,0,0,rt),Be}if(Ue){if(typeof ArrayBuffer!="undefined"&&Ue.buffer instanceof ArrayBuffer||"length"in Ue)return typeof Ue.length!="number"||ze(Ue.length)?be(Be,0):ue(Be,Ue);if(Ue.type==="Buffer"&&ht(Ue.data))return ue(Be,Ue.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function oe(Be){if(Be>=me())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+me().toString(16)+" bytes");return 0|Be}function ie(Be){return+Be!=Be&&(Be=0),ve.alloc(+Be)}function se(Be,Ue){if(ve.isBuffer(Be))return Be.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(Be)||Be instanceof ArrayBuffer))return Be.byteLength;typeof Be!="string"&&(Be=""+Be);var rt=Be.length;if(rt===0)return 0;for(var Ze=!1;;)switch(Ue){case"ascii":case"latin1":case"binary":return rt;case"utf8":case"utf-8":case void 0:return Dt(Be).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*rt;case"hex":return rt>>>1;case"base64":return jt(Be).length;default:if(Ze)return Dt(Be).length;Ue=(""+Ue).toLowerCase(),Ze=!0}}function le(Be,Ue,rt){var Ze=!1;if((Ue===void 0||Ue<0)&&(Ue=0),Ue>this.length||((rt===void 0||rt>this.length)&&(rt=this.length),rt<=0)||(rt>>>=0,Ue>>>=0,rt<=Ue))return"";for(Be||(Be="utf8");;)switch(Be){case"hex":return ft(this,Ue,rt);case"utf8":case"utf-8":return St(this,Ue,rt);case"ascii":return ct(this,Ue,rt);case"latin1":case"binary":return wt(this,Ue,rt);case"base64":return pt(this,Ue,rt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $t(this,Ue,rt);default:if(Ze)throw new TypeError("Unknown encoding: "+Be);Be=(Be+"").toLowerCase(),Ze=!0}}function Se(Be,Ue,rt){var Ze=Be[Ue];Be[Ue]=Be[rt],Be[rt]=Ze}function pe(Be,Ue,rt,Ze,Xe){if(Be.length===0)return-1;if(typeof rt=="string"?(Ze=rt,rt=0):rt>2147483647?rt=2147483647:rt<-2147483648&&(rt=-2147483648),rt=+rt,isNaN(rt)&&(rt=Xe?0:Be.length-1),rt<0&&(rt=Be.length+rt),rt>=Be.length){if(Xe)return-1;rt=Be.length-1}else if(rt<0){if(!Xe)return-1;rt=0}if(typeof Ue=="string"&&(Ue=ve.from(Ue,Ze)),ve.isBuffer(Ue))return Ue.length===0?-1:Ce(Be,Ue,rt,Ze,Xe);if(typeof Ue=="number")return Ue&=255,ve.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Xe?Uint8Array.prototype.indexOf.call(Be,Ue,rt):Uint8Array.prototype.lastIndexOf.call(Be,Ue,rt):Ce(Be,[Ue],rt,Ze,Xe);throw new TypeError("val must be string, number or Buffer")}function Ce(Be,Ue,rt,Ze,Xe){function mt(Cn,Ki){return Rt===1?Cn[Ki]:Cn.readUInt16BE(Ki*Rt)}var Rt=1,vn=Be.length,An=Ue.length;if(Ze!==void 0&&((Ze=String(Ze).toLowerCase())==="ucs2"||Ze==="ucs-2"||Ze==="utf16le"||Ze==="utf-16le")){if(Be.length<2||Ue.length<2)return-1;Rt=2,vn/=2,An/=2,rt/=2}var Mn;if(Xe){var hi=-1;for(Mn=rt;Mn<vn;Mn++)if(mt(Be,Mn)===mt(Ue,hi===-1?0:Mn-hi)){if(hi===-1&&(hi=Mn),Mn-hi+1===An)return hi*Rt}else hi!==-1&&(Mn-=Mn-hi),hi=-1}else for(rt+An>vn&&(rt=vn-An),Mn=rt;Mn>=0;Mn--){for(var mi=!0,si=0;si<An;si++)if(mt(Be,Mn+si)!==mt(Ue,si)){mi=!1;break}if(mi)return Mn}return-1}function Ae(Be,Ue,rt,Ze){rt=Number(rt)||0;var Xe=Be.length-rt;Ze?(Ze=Number(Ze))>Xe&&(Ze=Xe):Ze=Xe;var mt=Ue.length;if(mt%2!=0)throw new TypeError("Invalid hex string");Ze>mt/2&&(Ze=mt/2);for(var Rt=0;Rt<Ze;++Rt){var vn=parseInt(Ue.substr(2*Rt,2),16);if(isNaN(vn))return Rt;Be[rt+Rt]=vn}return Rt}function Oe(Be,Ue,rt,Ze){return ut(Dt(Ue,Be.length-rt),Be,rt,Ze)}function Re(Be,Ue,rt,Ze){return ut(on(Ue),Be,rt,Ze)}function We(Be,Ue,rt,Ze){return Re(Be,Ue,rt,Ze)}function $e(Be,Ue,rt,Ze){return ut(jt(Ue),Be,rt,Ze)}function Je(Be,Ue,rt,Ze){return ut(Jt(Ue,Be.length-rt),Be,rt,Ze)}function pt(Be,Ue,rt){return Ue===0&&rt===Be.length?je.fromByteArray(Be):je.fromByteArray(Be.slice(Ue,rt))}function St(Be,Ue,rt){rt=Math.min(Be.length,rt);for(var Ze=[],Xe=Ue;Xe<rt;){var mt=Be[Xe],Rt=null,vn=mt>239?4:mt>223?3:mt>191?2:1;if(Xe+vn<=rt){var An,Mn,hi,mi;switch(vn){case 1:mt<128&&(Rt=mt);break;case 2:An=Be[Xe+1],(192&An)==128&&(mi=(31&mt)<<6|63&An)>127&&(Rt=mi);break;case 3:An=Be[Xe+1],Mn=Be[Xe+2],(192&An)==128&&(192&Mn)==128&&(mi=(15&mt)<<12|(63&An)<<6|63&Mn)>2047&&(mi<55296||mi>57343)&&(Rt=mi);break;case 4:An=Be[Xe+1],Mn=Be[Xe+2],hi=Be[Xe+3],(192&An)==128&&(192&Mn)==128&&(192&hi)==128&&(mi=(15&mt)<<18|(63&An)<<12|(63&Mn)<<6|63&hi)>65535&&mi<1114112&&(Rt=mi)}}Rt===null?(Rt=65533,vn=1):Rt>65535&&(Rt-=65536,Ze.push(Rt>>>10&1023|55296),Rt=56320|1023&Rt),Ze.push(Rt),Xe+=vn}return Mt(Ze)}function Mt(Be){var Ue=Be.length;if(Ue<=nt)return String.fromCharCode.apply(String,Be);for(var rt="",Ze=0;Ze<Ue;)rt+=String.fromCharCode.apply(String,Be.slice(Ze,Ze+=nt));return rt}function ct(Be,Ue,rt){var Ze="";rt=Math.min(Be.length,rt);for(var Xe=Ue;Xe<rt;++Xe)Ze+=String.fromCharCode(127&Be[Xe]);return Ze}function wt(Be,Ue,rt){var Ze="";rt=Math.min(Be.length,rt);for(var Xe=Ue;Xe<rt;++Xe)Ze+=String.fromCharCode(Be[Xe]);return Ze}function ft(Be,Ue,rt){var Ze=Be.length;(!Ue||Ue<0)&&(Ue=0),(!rt||rt<0||rt>Ze)&&(rt=Ze);for(var Xe="",mt=Ue;mt<rt;++mt)Xe+=Gt(Be[mt]);return Xe}function $t(Be,Ue,rt){for(var Ze=Be.slice(Ue,rt),Xe="",mt=0;mt<Ze.length;mt+=2)Xe+=String.fromCharCode(Ze[mt]+256*Ze[mt+1]);return Xe}function st(Be,Ue,rt){if(Be%1!=0||Be<0)throw new RangeError("offset is not uint");if(Be+Ue>rt)throw new RangeError("Trying to access beyond buffer length")}function et(Be,Ue,rt,Ze,Xe,mt){if(!ve.isBuffer(Be))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ue>Xe||Ue<mt)throw new RangeError('"value" argument is out of bounds');if(rt+Ze>Be.length)throw new RangeError("Index out of range")}function lt(Be,Ue,rt,Ze){Ue<0&&(Ue=65535+Ue+1);for(var Xe=0,mt=Math.min(Be.length-rt,2);Xe<mt;++Xe)Be[rt+Xe]=(Ue&255<<8*(Ze?Xe:1-Xe))>>>8*(Ze?Xe:1-Xe)}function dt(Be,Ue,rt,Ze){Ue<0&&(Ue=4294967295+Ue+1);for(var Xe=0,mt=Math.min(Be.length-rt,4);Xe<mt;++Xe)Be[rt+Xe]=Ue>>>8*(Ze?Xe:3-Xe)&255}function bt(Be,Ue,rt,Ze,Xe,mt){if(rt+Ze>Be.length)throw new RangeError("Index out of range");if(rt<0)throw new RangeError("Index out of range")}function yt(Be,Ue,rt,Ze,Xe){return Xe||bt(Be,Ue,rt,4,34028234663852886e22,-34028234663852886e22),it.write(Be,Ue,rt,Ze,23,4),rt+4}function Vt(Be,Ue,rt,Ze,Xe){return Xe||bt(Be,Ue,rt,8,17976931348623157e292,-17976931348623157e292),it.write(Be,Ue,rt,Ze,52,8),rt+8}function Kt(Be){if(Be=gn(Be).replace(Ke,""),Be.length<2)return"";for(;Be.length%4!=0;)Be+="=";return Be}function gn(Be){return Be.trim?Be.trim():Be.replace(/^\s+|\s+$/g,"")}function Gt(Be){return Be<16?"0"+Be.toString(16):Be.toString(16)}function Dt(Be,Ue){Ue=Ue||1/0;for(var rt,Ze=Be.length,Xe=null,mt=[],Rt=0;Rt<Ze;++Rt){if((rt=Be.charCodeAt(Rt))>55295&&rt<57344){if(!Xe){if(rt>56319){(Ue-=3)>-1&&mt.push(239,191,189);continue}if(Rt+1===Ze){(Ue-=3)>-1&&mt.push(239,191,189);continue}Xe=rt;continue}if(rt<56320){(Ue-=3)>-1&&mt.push(239,191,189),Xe=rt;continue}rt=65536+(Xe-55296<<10|rt-56320)}else Xe&&(Ue-=3)>-1&&mt.push(239,191,189);if(Xe=null,rt<128){if((Ue-=1)<0)break;mt.push(rt)}else if(rt<2048){if((Ue-=2)<0)break;mt.push(rt>>6|192,63&rt|128)}else if(rt<65536){if((Ue-=3)<0)break;mt.push(rt>>12|224,rt>>6&63|128,63&rt|128)}else{if(!(rt<1114112))throw new Error("Invalid code point");if((Ue-=4)<0)break;mt.push(rt>>18|240,rt>>12&63|128,rt>>6&63|128,63&rt|128)}}return mt}function on(Be){for(var Ue=[],rt=0;rt<Be.length;++rt)Ue.push(255&Be.charCodeAt(rt));return Ue}function Jt(Be,Ue){for(var rt,Ze,Xe,mt=[],Rt=0;Rt<Be.length&&!((Ue-=2)<0);++Rt)rt=Be.charCodeAt(Rt),Ze=rt>>8,Xe=rt%256,mt.push(Xe),mt.push(Ze);return mt}function jt(Be){return je.toByteArray(Kt(Be))}function ut(Be,Ue,rt,Ze){for(var Xe=0;Xe<Ze&&!(Xe+rt>=Ue.length||Xe>=Be.length);++Xe)Ue[Xe+rt]=Be[Xe];return Xe}function ze(Be){return Be!==Be}var je=ye("base64-js"),it=ye("ieee754"),ht=ye("isarray");Me.Buffer=ve,Me.SlowBuffer=ie,Me.INSPECT_MAX_BYTES=50,ve.TYPED_ARRAY_SUPPORT=Ee.TYPED_ARRAY_SUPPORT!==void 0?Ee.TYPED_ARRAY_SUPPORT:function(){try{var Be=new Uint8Array(1);return Be.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},Be.foo()===42&&typeof Be.subarray=="function"&&Be.subarray(1,1).byteLength===0}catch(Ue){return!1}}(),Me.kMaxLength=me(),ve.poolSize=8192,ve._augment=function(Be){return Be.__proto__=ve.prototype,Be},ve.from=function(Be,Ue,rt){return we(null,Be,Ue,rt)},ve.TYPED_ARRAY_SUPPORT&&(ve.prototype.__proto__=Uint8Array.prototype,ve.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&ve[Symbol.species]===ve&&Object.defineProperty(ve,Symbol.species,{value:null,configurable:!0})),ve.alloc=function(Be,Ue,rt){return he(null,Be,Ue,rt)},ve.allocUnsafe=function(Be){return xe(null,Be)},ve.allocUnsafeSlow=function(Be){return xe(null,Be)},ve.isBuffer=function(Be){return!(Be==null||!Be._isBuffer)},ve.compare=function(Be,Ue){if(!ve.isBuffer(Be)||!ve.isBuffer(Ue))throw new TypeError("Arguments must be Buffers");if(Be===Ue)return 0;for(var rt=Be.length,Ze=Ue.length,Xe=0,mt=Math.min(rt,Ze);Xe<mt;++Xe)if(Be[Xe]!==Ue[Xe]){rt=Be[Xe],Ze=Ue[Xe];break}return rt<Ze?-1:Ze<rt?1:0},ve.isEncoding=function(Be){switch(String(Be).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}},ve.concat=function(Be,Ue){if(!ht(Be))throw new TypeError('"list" argument must be an Array of Buffers');if(Be.length===0)return ve.alloc(0);var rt;if(Ue===void 0)for(Ue=0,rt=0;rt<Be.length;++rt)Ue+=Be[rt].length;var Ze=ve.allocUnsafe(Ue),Xe=0;for(rt=0;rt<Be.length;++rt){var mt=Be[rt];if(!ve.isBuffer(mt))throw new TypeError('"list" argument must be an Array of Buffers');mt.copy(Ze,Xe),Xe+=mt.length}return Ze},ve.byteLength=se,ve.prototype._isBuffer=!0,ve.prototype.swap16=function(){var Be=this.length;if(Be%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Ue=0;Ue<Be;Ue+=2)Se(this,Ue,Ue+1);return this},ve.prototype.swap32=function(){var Be=this.length;if(Be%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Ue=0;Ue<Be;Ue+=4)Se(this,Ue,Ue+3),Se(this,Ue+1,Ue+2);return this},ve.prototype.swap64=function(){var Be=this.length;if(Be%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Ue=0;Ue<Be;Ue+=8)Se(this,Ue,Ue+7),Se(this,Ue+1,Ue+6),Se(this,Ue+2,Ue+5),Se(this,Ue+3,Ue+4);return this},ve.prototype.toString=function(){var Be=0|this.length;return Be===0?"":arguments.length===0?St(this,0,Be):le.apply(this,arguments)},ve.prototype.equals=function(Be){if(!ve.isBuffer(Be))throw new TypeError("Argument must be a Buffer");return this===Be||ve.compare(this,Be)===0},ve.prototype.inspect=function(){var Be="",Ue=Me.INSPECT_MAX_BYTES;return this.length>0&&(Be=this.toString("hex",0,Ue).match(/.{2}/g).join(" "),this.length>Ue&&(Be+=" ... ")),"<Buffer "+Be+">"},ve.prototype.compare=function(Be,Ue,rt,Ze,Xe){if(!ve.isBuffer(Be))throw new TypeError("Argument must be a Buffer");if(Ue===void 0&&(Ue=0),rt===void 0&&(rt=Be?Be.length:0),Ze===void 0&&(Ze=0),Xe===void 0&&(Xe=this.length),Ue<0||rt>Be.length||Ze<0||Xe>this.length)throw new RangeError("out of range index");if(Ze>=Xe&&Ue>=rt)return 0;if(Ze>=Xe)return-1;if(Ue>=rt)return 1;if(Ue>>>=0,rt>>>=0,Ze>>>=0,Xe>>>=0,this===Be)return 0;for(var mt=Xe-Ze,Rt=rt-Ue,vn=Math.min(mt,Rt),An=this.slice(Ze,Xe),Mn=Be.slice(Ue,rt),hi=0;hi<vn;++hi)if(An[hi]!==Mn[hi]){mt=An[hi],Rt=Mn[hi];break}return mt<Rt?-1:Rt<mt?1:0},ve.prototype.includes=function(Be,Ue,rt){return this.indexOf(Be,Ue,rt)!==-1},ve.prototype.indexOf=function(Be,Ue,rt){return pe(this,Be,Ue,rt,!0)},ve.prototype.lastIndexOf=function(Be,Ue,rt){return pe(this,Be,Ue,rt,!1)},ve.prototype.write=function(Be,Ue,rt,Ze){if(Ue===void 0)Ze="utf8",rt=this.length,Ue=0;else if(rt===void 0&&typeof Ue=="string")Ze=Ue,rt=this.length,Ue=0;else{if(!isFinite(Ue))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");Ue|=0,isFinite(rt)?(rt|=0,Ze===void 0&&(Ze="utf8")):(Ze=rt,rt=void 0)}var Xe=this.length-Ue;if((rt===void 0||rt>Xe)&&(rt=Xe),Be.length>0&&(rt<0||Ue<0)||Ue>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ze||(Ze="utf8");for(var mt=!1;;)switch(Ze){case"hex":return Ae(this,Be,Ue,rt);case"utf8":case"utf-8":return Oe(this,Be,Ue,rt);case"ascii":return Re(this,Be,Ue,rt);case"latin1":case"binary":return We(this,Be,Ue,rt);case"base64":return $e(this,Be,Ue,rt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Je(this,Be,Ue,rt);default:if(mt)throw new TypeError("Unknown encoding: "+Ze);Ze=(""+Ze).toLowerCase(),mt=!0}},ve.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var nt=4096;ve.prototype.slice=function(Be,Ue){var rt=this.length;Be=~~Be,Ue=Ue===void 0?rt:~~Ue,Be<0?(Be+=rt)<0&&(Be=0):Be>rt&&(Be=rt),Ue<0?(Ue+=rt)<0&&(Ue=0):Ue>rt&&(Ue=rt),Ue<Be&&(Ue=Be);var Ze;if(ve.TYPED_ARRAY_SUPPORT)Ze=this.subarray(Be,Ue),Ze.__proto__=ve.prototype;else{var Xe=Ue-Be;Ze=new ve(Xe,void 0);for(var mt=0;mt<Xe;++mt)Ze[mt]=this[mt+Be]}return Ze},ve.prototype.readUIntLE=function(Be,Ue,rt){Be|=0,Ue|=0,rt||st(Be,Ue,this.length);for(var Ze=this[Be],Xe=1,mt=0;++mt<Ue&&(Xe*=256);)Ze+=this[Be+mt]*Xe;return Ze},ve.prototype.readUIntBE=function(Be,Ue,rt){Be|=0,Ue|=0,rt||st(Be,Ue,this.length);for(var Ze=this[Be+--Ue],Xe=1;Ue>0&&(Xe*=256);)Ze+=this[Be+--Ue]*Xe;return Ze},ve.prototype.readUInt8=function(Be,Ue){return Ue||st(Be,1,this.length),this[Be]},ve.prototype.readUInt16LE=function(Be,Ue){return Ue||st(Be,2,this.length),this[Be]|this[Be+1]<<8},ve.prototype.readUInt16BE=function(Be,Ue){return Ue||st(Be,2,this.length),this[Be]<<8|this[Be+1]},ve.prototype.readUInt32LE=function(Be,Ue){return Ue||st(Be,4,this.length),(this[Be]|this[Be+1]<<8|this[Be+2]<<16)+16777216*this[Be+3]},ve.prototype.readUInt32BE=function(Be,Ue){return Ue||st(Be,4,this.length),16777216*this[Be]+(this[Be+1]<<16|this[Be+2]<<8|this[Be+3])},ve.prototype.readIntLE=function(Be,Ue,rt){Be|=0,Ue|=0,rt||st(Be,Ue,this.length);for(var Ze=this[Be],Xe=1,mt=0;++mt<Ue&&(Xe*=256);)Ze+=this[Be+mt]*Xe;return Xe*=128,Ze>=Xe&&(Ze-=Math.pow(2,8*Ue)),Ze},ve.prototype.readIntBE=function(Be,Ue,rt){Be|=0,Ue|=0,rt||st(Be,Ue,this.length);for(var Ze=Ue,Xe=1,mt=this[Be+--Ze];Ze>0&&(Xe*=256);)mt+=this[Be+--Ze]*Xe;return Xe*=128,mt>=Xe&&(mt-=Math.pow(2,8*Ue)),mt},ve.prototype.readInt8=function(Be,Ue){return Ue||st(Be,1,this.length),128&this[Be]?-1*(255-this[Be]+1):this[Be]},ve.prototype.readInt16LE=function(Be,Ue){Ue||st(Be,2,this.length);var rt=this[Be]|this[Be+1]<<8;return 32768&rt?4294901760|rt:rt},ve.prototype.readInt16BE=function(Be,Ue){Ue||st(Be,2,this.length);var rt=this[Be+1]|this[Be]<<8;return 32768&rt?4294901760|rt:rt},ve.prototype.readInt32LE=function(Be,Ue){return Ue||st(Be,4,this.length),this[Be]|this[Be+1]<<8|this[Be+2]<<16|this[Be+3]<<24},ve.prototype.readInt32BE=function(Be,Ue){return Ue||st(Be,4,this.length),this[Be]<<24|this[Be+1]<<16|this[Be+2]<<8|this[Be+3]},ve.prototype.readFloatLE=function(Be,Ue){return Ue||st(Be,4,this.length),it.read(this,Be,!0,23,4)},ve.prototype.readFloatBE=function(Be,Ue){return Ue||st(Be,4,this.length),it.read(this,Be,!1,23,4)},ve.prototype.readDoubleLE=function(Be,Ue){return Ue||st(Be,8,this.length),it.read(this,Be,!0,52,8)},ve.prototype.readDoubleBE=function(Be,Ue){return Ue||st(Be,8,this.length),it.read(this,Be,!1,52,8)},ve.prototype.writeUIntLE=function(Be,Ue,rt,Ze){Be=+Be,Ue|=0,rt|=0,!Ze&&et(this,Be,Ue,rt,Math.pow(2,8*rt)-1,0);var Xe=1,mt=0;for(this[Ue]=255&Be;++mt<rt&&(Xe*=256);)this[Ue+mt]=Be/Xe&255;return Ue+rt},ve.prototype.writeUIntBE=function(Be,Ue,rt,Ze){Be=+Be,Ue|=0,rt|=0,!Ze&&et(this,Be,Ue,rt,Math.pow(2,8*rt)-1,0);var Xe=rt-1,mt=1;for(this[Ue+Xe]=255&Be;--Xe>=0&&(mt*=256);)this[Ue+Xe]=Be/mt&255;return Ue+rt},ve.prototype.writeUInt8=function(Be,Ue,rt){return Be=+Be,Ue|=0,rt||et(this,Be,Ue,1,255,0),ve.TYPED_ARRAY_SUPPORT||(Be=Math.floor(Be)),this[Ue]=255&Be,Ue+1},ve.prototype.writeUInt16LE=function(Be,Ue,rt){return Be=+Be,Ue|=0,rt||et(this,Be,Ue,2,65535,0),ve.TYPED_ARRAY_SUPPORT?(this[Ue]=255&Be,this[Ue+1]=Be>>>8):lt(this,Be,Ue,!0),Ue+2},ve.prototype.writeUInt16BE=function(Be,Ue,rt){return Be=+Be,Ue|=0,rt||et(this,Be,Ue,2,65535,0),ve.TYPED_ARRAY_SUPPORT?(this[Ue]=Be>>>8,this[Ue+1]=255&Be):lt(this,Be,Ue,!1),Ue+2},ve.prototype.writeUInt32LE=function(Be,Ue,rt){return Be=+Be,Ue|=0,rt||et(this,Be,Ue,4,4294967295,0),ve.TYPED_ARRAY_SUPPORT?(this[Ue+3]=Be>>>24,this[Ue+2]=Be>>>16,this[Ue+1]=Be>>>8,this[Ue]=255&Be):dt(this,Be,Ue,!0),Ue+4},ve.prototype.writeUInt32BE=function(Be,Ue,rt){return Be=+Be,Ue|=0,rt||et(this,Be,Ue,4,4294967295,0),ve.TYPED_ARRAY_SUPPORT?(this[Ue]=Be>>>24,this[Ue+1]=Be>>>16,this[Ue+2]=Be>>>8,this[Ue+3]=255&Be):dt(this,Be,Ue,!1),Ue+4},ve.prototype.writeIntLE=function(Be,Ue,rt,Ze){if(Be=+Be,Ue|=0,!Ze){var Xe=Math.pow(2,8*rt-1);et(this,Be,Ue,rt,Xe-1,-Xe)}var mt=0,Rt=1,vn=0;for(this[Ue]=255&Be;++mt<rt&&(Rt*=256);)Be<0&&vn===0&&this[Ue+mt-1]!==0&&(vn=1),this[Ue+mt]=(Be/Rt>>0)-vn&255;return Ue+rt},ve.prototype.writeIntBE=function(Be,Ue,rt,Ze){if(Be=+Be,Ue|=0,!Ze){var Xe=Math.pow(2,8*rt-1);et(this,Be,Ue,rt,Xe-1,-Xe)}var mt=rt-1,Rt=1,vn=0;for(this[Ue+mt]=255&Be;--mt>=0&&(Rt*=256);)Be<0&&vn===0&&this[Ue+mt+1]!==0&&(vn=1),this[Ue+mt]=(Be/Rt>>0)-vn&255;return Ue+rt},ve.prototype.writeInt8=function(Be,Ue,rt){return Be=+Be,Ue|=0,rt||et(this,Be,Ue,1,127,-128),ve.TYPED_ARRAY_SUPPORT||(Be=Math.floor(Be)),Be<0&&(Be=255+Be+1),this[Ue]=255&Be,Ue+1},ve.prototype.writeInt16LE=function(Be,Ue,rt){return Be=+Be,Ue|=0,rt||et(this,Be,Ue,2,32767,-32768),ve.TYPED_ARRAY_SUPPORT?(this[Ue]=255&Be,this[Ue+1]=Be>>>8):lt(this,Be,Ue,!0),Ue+2},ve.prototype.writeInt16BE=function(Be,Ue,rt){return Be=+Be,Ue|=0,rt||et(this,Be,Ue,2,32767,-32768),ve.TYPED_ARRAY_SUPPORT?(this[Ue]=Be>>>8,this[Ue+1]=255&Be):lt(this,Be,Ue,!1),Ue+2},ve.prototype.writeInt32LE=function(Be,Ue,rt){return Be=+Be,Ue|=0,rt||et(this,Be,Ue,4,2147483647,-2147483648),ve.TYPED_ARRAY_SUPPORT?(this[Ue]=255&Be,this[Ue+1]=Be>>>8,this[Ue+2]=Be>>>16,this[Ue+3]=Be>>>24):dt(this,Be,Ue,!0),Ue+4},ve.prototype.writeInt32BE=function(Be,Ue,rt){return Be=+Be,Ue|=0,rt||et(this,Be,Ue,4,2147483647,-2147483648),Be<0&&(Be=4294967295+Be+1),ve.TYPED_ARRAY_SUPPORT?(this[Ue]=Be>>>24,this[Ue+1]=Be>>>16,this[Ue+2]=Be>>>8,this[Ue+3]=255&Be):dt(this,Be,Ue,!1),Ue+4},ve.prototype.writeFloatLE=function(Be,Ue,rt){return yt(this,Be,Ue,!0,rt)},ve.prototype.writeFloatBE=function(Be,Ue,rt){return yt(this,Be,Ue,!1,rt)},ve.prototype.writeDoubleLE=function(Be,Ue,rt){return Vt(this,Be,Ue,!0,rt)},ve.prototype.writeDoubleBE=function(Be,Ue,rt){return Vt(this,Be,Ue,!1,rt)},ve.prototype.copy=function(Be,Ue,rt,Ze){if(rt||(rt=0),Ze||Ze===0||(Ze=this.length),Ue>=Be.length&&(Ue=Be.length),Ue||(Ue=0),Ze>0&&Ze<rt&&(Ze=rt),Ze===rt||Be.length===0||this.length===0)return 0;if(Ue<0)throw new RangeError("targetStart out of bounds");if(rt<0||rt>=this.length)throw new RangeError("sourceStart out of bounds");if(Ze<0)throw new RangeError("sourceEnd out of bounds");Ze>this.length&&(Ze=this.length),Be.length-Ue<Ze-rt&&(Ze=Be.length-Ue+rt);var Xe,mt=Ze-rt;if(this===Be&&rt<Ue&&Ue<Ze)for(Xe=mt-1;Xe>=0;--Xe)Be[Xe+Ue]=this[Xe+rt];else if(mt<1e3||!ve.TYPED_ARRAY_SUPPORT)for(Xe=0;Xe<mt;++Xe)Be[Xe+Ue]=this[Xe+rt];else Uint8Array.prototype.set.call(Be,this.subarray(rt,rt+mt),Ue);return mt},ve.prototype.fill=function(Be,Ue,rt,Ze){if(typeof Be=="string"){if(typeof Ue=="string"?(Ze=Ue,Ue=0,rt=this.length):typeof rt=="string"&&(Ze=rt,rt=this.length),Be.length===1){var Xe=Be.charCodeAt(0);Xe<256&&(Be=Xe)}if(Ze!==void 0&&typeof Ze!="string")throw new TypeError("encoding must be a string");if(typeof Ze=="string"&&!ve.isEncoding(Ze))throw new TypeError("Unknown encoding: "+Ze)}else typeof Be=="number"&&(Be&=255);if(Ue<0||this.length<Ue||this.length<rt)throw new RangeError("Out of range index");if(rt<=Ue)return this;Ue>>>=0,rt=rt===void 0?this.length:rt>>>0,Be||(Be=0);var mt;if(typeof Be=="number")for(mt=Ue;mt<rt;++mt)this[mt]=Be;else{var Rt=ve.isBuffer(Be)?Be:Dt(new ve(Be,Ze).toString()),vn=Rt.length;for(mt=0;mt<rt-Ue;++mt)this[mt+Ue]=Rt[mt%vn]}return this};var Ke=/[^+\/0-9A-Za-z-_]/g}).call(this,typeof De.g!="undefined"?De.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"base64-js":34,ieee754:161,isarray:166}],39:[function(ye,Fe,Me){Fe.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(ye,Fe,Me){"use strict";var Ee=function(){this.buffer=[],this.fns=[]};Ee.prototype.push=function(be,ve){if(this.fns.length)return this.fns.shift()(null,be);var we={data:be,priority:ve},ge=me(this.buffer,we,function(he){return he.priority});this.buffer.splice(ge,0,we)},Ee.prototype.next=function(){var be=this;return function(ve){if(be.buffer.length)return ve(null,be.buffer.pop().data);be.fns.push(ve)}};var me=function(be,ve,we){ve=we(ve);for(var ge=0,he=be?be.length:ge;ge<he;){var xe=ge+he>>>1;we(be[xe])<ve?ge=xe+1:he=xe}return ge};Fe.exports=Ee},{}],41:[function(ye,Fe,Me){function Ee(ee){var z=this,oe=ue.call(arguments,1);return new Promise(function(ie,se){function le(Ce){var Ae;try{Ae=ee.next(Ce)}catch(Oe){return se(Oe)}pe(Ae)}function Se(Ce){var Ae;try{Ae=ee.throw(Ce)}catch(Oe){return se(Oe)}pe(Ae)}function pe(Ce){if(Ce.done)return ie(Ce.value);var Ae=me.call(z,Ce.value);return Ae&&ge(Ae)?Ae.then(le,Se):Se(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(Ce.value)+'"'))}if(typeof ee=="function"&&(ee=ee.apply(z,oe)),!ee||typeof ee.next!="function")return ie(ee);le()})}function me(ee){return ee&&(ge(ee)?ee:xe(ee)||he(ee)?Ee.call(this,ee):typeof ee=="function"?be.call(this,ee):Array.isArray(ee)?ve.call(this,ee):fe(ee)?we.call(this,ee):ee)}function be(ee){var z=this;return new Promise(function(oe,ie){ee.call(z,function(se,le){if(se)return ie(se);arguments.length>2&&(le=ue.call(arguments,1)),oe(le)})})}function ve(ee){return Promise.all(ee.map(me,this))}function we(ee){for(var z=new ee.constructor,oe=Object.keys(ee),ie=[],se=0;se<oe.length;se++){var le=oe[se],Se=me.call(this,ee[le]);Se&&ge(Se)?function(pe,Ce){z[Ce]=void 0,ie.push(pe.then(function(Ae){z[Ce]=Ae}))}(Se,le):z[le]=ee[le]}return Promise.all(ie).then(function(){return z})}function ge(ee){return typeof ee.then=="function"}function he(ee){return typeof ee.next=="function"&&typeof ee.throw=="function"}function xe(ee){var z=ee.constructor;return!!z&&(z.name==="GeneratorFunction"||z.displayName==="GeneratorFunction"||he(z.prototype))}function fe(ee){return Object==ee.constructor}var ue=Array.prototype.slice;Fe.exports=Ee.default=Ee.co=Ee,Ee.wrap=function(ee){function z(){return Ee.call(this,ee.apply(this,arguments))}return z.__generatorFunction__=ee,z}},{}],42:[function(ye,Fe,Me){Fe.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(ye,Fe,Me){"use strict";function Ee(ve,we){if(!(this instanceof Ee))return new Ee(ve,we);this.src=ve,this._withAccess=we}function me(ve,we){return ve[we]===void 0&&ve.__lookupGetter__(we)===void 0&&ve.__lookupSetter__(we)===void 0}var be=Array.prototype.slice;Fe.exports=Ee,Ee.prototype.withAccess=function(ve){return this._withAccess=ve!==!1,this},Ee.prototype.pick=function(ve){return Array.isArray(ve)||(ve=be.call(arguments)),ve.length&&(this.keys=ve),this},Ee.prototype.to=function(ve){if(ve=ve||{},!this.src)return ve;var we=this.keys||Object.keys(this.src);if(!this._withAccess){for(var ge=0;ge<we.length;ge++)he=we[ge],ve[he]===void 0&&(ve[he]=this.src[he]);return ve}for(var ge=0;ge<we.length;ge++){var he=we[ge];if(me(ve,he)){var xe=this.src.__lookupGetter__(he),fe=this.src.__lookupSetter__(he);xe&&ve.__defineGetter__(he,xe),fe&&ve.__defineSetter__(he,fe),xe||fe||(ve[he]=this.src[he])}}return ve},Ee.prototype.toCover=function(ve){for(var we=this.keys||Object.keys(this.src),ge=0;ge<we.length;ge++){var he=we[ge];delete ve[he];var xe=this.src.__lookupGetter__(he),fe=this.src.__lookupSetter__(he);xe&&ve.__defineGetter__(he,xe),fe&&ve.__defineSetter__(he,fe),xe||fe||(ve[he]=this.src[he])}},Ee.prototype.override=Ee.prototype.toCover,Ee.prototype.and=function(ve){var we={};return this.to(we),this.src=ve,this.to(we),this.src=we,this}},{}],44:[function(ye,Fe,Me){ye("../../modules/es6.string.iterator"),ye("../../modules/es6.array.from"),Fe.exports=ye("../../modules/_core").Array.from},{"../../modules/_core":65,"../../modules/es6.array.from":133,"../../modules/es6.string.iterator":145}],45:[function(ye,Fe,Me){var Ee=ye("../../modules/_core"),me=Ee.JSON||(Ee.JSON={stringify:JSON.stringify});Fe.exports=function(be){return me.stringify.apply(me,arguments)}},{"../../modules/_core":65}],46:[function(ye,Fe,Me){ye("../../modules/es6.object.assign"),Fe.exports=ye("../../modules/_core").Object.assign},{"../../modules/_core":65,"../../modules/es6.object.assign":136}],47:[function(ye,Fe,Me){ye("../../modules/es6.object.create");var Ee=ye("../../modules/_core").Object;Fe.exports=function(me,be){return Ee.create(me,be)}},{"../../modules/_core":65,"../../modules/es6.object.create":137}],48:[function(ye,Fe,Me){ye("../../modules/es6.object.define-property");var Ee=ye("../../modules/_core").Object;Fe.exports=function(me,be,ve){return Ee.defineProperty(me,be,ve)}},{"../../modules/_core":65,"../../modules/es6.object.define-property":138}],49:[function(ye,Fe,Me){ye("../../modules/es6.object.get-own-property-names");var Ee=ye("../../modules/_core").Object;Fe.exports=function(me){return Ee.getOwnPropertyNames(me)}},{"../../modules/_core":65,"../../modules/es6.object.get-own-property-names":139}],50:[function(ye,Fe,Me){ye("../../modules/es6.object.get-prototype-of"),Fe.exports=ye("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":65,"../../modules/es6.object.get-prototype-of":140}],51:[function(ye,Fe,Me){ye("../../modules/es6.object.keys"),Fe.exports=ye("../../modules/_core").Object.keys},{"../../modules/_core":65,"../../modules/es6.object.keys":141}],52:[function(ye,Fe,Me){ye("../modules/es6.object.to-string"),ye("../modules/es6.string.iterator"),ye("../modules/web.dom.iterable"),ye("../modules/es6.promise"),ye("../modules/es7.promise.finally"),ye("../modules/es7.promise.try"),Fe.exports=ye("../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(ye,Fe,Me){ye("../modules/web.immediate"),Fe.exports=ye("../modules/_core").setImmediate},{"../modules/_core":65,"../modules/web.immediate":152}],54:[function(ye,Fe,Me){ye("../../modules/es6.string.from-code-point"),Fe.exports=ye("../../modules/_core").String.fromCodePoint},{"../../modules/_core":65,"../../modules/es6.string.from-code-point":144}],55:[function(ye,Fe,Me){ye("../../modules/es6.function.has-instance"),Fe.exports=ye("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":130,"../../modules/es6.function.has-instance":135}],56:[function(ye,Fe,Me){ye("../../modules/es6.symbol"),ye("../../modules/es6.object.to-string"),ye("../../modules/es7.symbol.async-iterator"),ye("../../modules/es7.symbol.observable"),Fe.exports=ye("../../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(ye,Fe,Me){ye("../../modules/es6.string.iterator"),ye("../../modules/web.dom.iterable"),Fe.exports=ye("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":130,"../../modules/es6.string.iterator":145,"../../modules/web.dom.iterable":151}],58:[function(ye,Fe,Me){Fe.exports=function(Ee){if(typeof Ee!="function")throw TypeError(Ee+" is not a function!");return Ee}},{}],59:[function(ye,Fe,Me){Fe.exports=function(){}},{}],60:[function(ye,Fe,Me){Fe.exports=function(Ee,me,be,ve){if(!(Ee instanceof me)||ve!==void 0&&ve in Ee)throw TypeError(be+": incorrect invocation!");return Ee}},{}],61:[function(ye,Fe,Me){var Ee=ye("./_is-object");Fe.exports=function(me){if(!Ee(me))throw TypeError(me+" is not an object!");return me}},{"./_is-object":85}],62:[function(ye,Fe,Me){var Ee=ye("./_to-iobject"),me=ye("./_to-length"),be=ye("./_to-absolute-index");Fe.exports=function(ve){return function(we,ge,he){var xe,fe=Ee(we),ue=me(fe.length),ee=be(he,ue);if(ve&&ge!=ge){for(;ue>ee;)if((xe=fe[ee++])!=xe)return!0}else for(;ue>ee;ee++)if((ve||ee in fe)&&fe[ee]===ge)return ve||ee||0;return!ve&&-1}}},{"./_to-absolute-index":121,"./_to-iobject":123,"./_to-length":124}],63:[function(ye,Fe,Me){var Ee=ye("./_cof"),me=ye("./_wks")("toStringTag"),be=Ee(function(){return arguments}())=="Arguments",ve=function(we,ge){try{return we[ge]}catch(he){}};Fe.exports=function(we){var ge,he,xe;return we===void 0?"Undefined":we===null?"Null":typeof(he=ve(ge=Object(we),me))=="string"?he:be?Ee(ge):(xe=Ee(ge))=="Object"&&typeof ge.callee=="function"?"Arguments":xe}},{"./_cof":64,"./_wks":131}],64:[function(ye,Fe,Me){var Ee={}.toString;Fe.exports=function(me){return Ee.call(me).slice(8,-1)}},{}],65:[function(ye,Fe,Me){var Ee=Fe.exports={version:"2.5.7"};typeof __e=="number"&&(__e=Ee)},{}],66:[function(ye,Fe,Me){"use strict";var Ee=ye("./_object-dp"),me=ye("./_property-desc");Fe.exports=function(be,ve,we){ve in be?Ee.f(be,ve,me(0,we)):be[ve]=we}},{"./_object-dp":98,"./_property-desc":111}],67:[function(ye,Fe,Me){var Ee=ye("./_a-function");Fe.exports=function(me,be,ve){if(Ee(me),be===void 0)return me;switch(ve){case 1:return function(we){return me.call(be,we)};case 2:return function(we,ge){return me.call(be,we,ge)};case 3:return function(we,ge,he){return me.call(be,we,ge,he)}}return function(){return me.apply(be,arguments)}}},{"./_a-function":58}],68:[function(ye,Fe,Me){Fe.exports=function(Ee){if(Ee==null)throw TypeError("Can't call method on "+Ee);return Ee}},{}],69:[function(ye,Fe,Me){Fe.exports=!ye("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":74}],70:[function(ye,Fe,Me){var Ee=ye("./_is-object"),me=ye("./_global").document,be=Ee(me)&&Ee(me.createElement);Fe.exports=function(ve){return be?me.createElement(ve):{}}},{"./_global":76,"./_is-object":85}],71:[function(ye,Fe,Me){Fe.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],72:[function(ye,Fe,Me){var Ee=ye("./_object-keys"),me=ye("./_object-gops"),be=ye("./_object-pie");Fe.exports=function(ve){var we=Ee(ve),ge=me.f;if(ge)for(var he,xe=ge(ve),fe=be.f,ue=0;xe.length>ue;)fe.call(ve,he=xe[ue++])&&we.push(he);return we}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(ye,Fe,Me){var Ee=ye("./_global"),me=ye("./_core"),be=ye("./_ctx"),ve=ye("./_hide"),we=ye("./_has"),ge=function(he,xe,fe){var ue,ee,z,oe=he&ge.F,ie=he&ge.G,se=he&ge.S,le=he&ge.P,Se=he&ge.B,pe=he&ge.W,Ce=ie?me:me[xe]||(me[xe]={}),Ae=Ce.prototype,Oe=ie?Ee:se?Ee[xe]:(Ee[xe]||{}).prototype;ie&&(fe=xe);for(ue in fe)(ee=!oe&&Oe&&Oe[ue]!==void 0)&&we(Ce,ue)||(z=ee?Oe[ue]:fe[ue],Ce[ue]=ie&&typeof Oe[ue]!="function"?fe[ue]:Se&&ee?be(z,Ee):pe&&Oe[ue]==z?function(Re){var We=function($e,Je,pt){if(this instanceof Re){switch(arguments.length){case 0:return new Re;case 1:return new Re($e);case 2:return new Re($e,Je)}return new Re($e,Je,pt)}return Re.apply(this,arguments)};return We.prototype=Re.prototype,We}(z):le&&typeof z=="function"?be(Function.call,z):z,le&&((Ce.virtual||(Ce.virtual={}))[ue]=z,he&ge.R&&Ae&&!Ae[ue]&&ve(Ae,ue,z)))};ge.F=1,ge.G=2,ge.S=4,ge.P=8,ge.B=16,ge.W=32,ge.U=64,ge.R=128,Fe.exports=ge},{"./_core":65,"./_ctx":67,"./_global":76,"./_has":77,"./_hide":78}],74:[function(ye,Fe,Me){Fe.exports=function(Ee){try{return!!Ee()}catch(me){return!0}}},{}],75:[function(ye,Fe,fe){var Ee=ye("./_ctx"),me=ye("./_iter-call"),be=ye("./_is-array-iter"),ve=ye("./_an-object"),we=ye("./_to-length"),ge=ye("./core.get-iterator-method"),he={},xe={},fe=Fe.exports=function(ue,ee,z,oe,ie){var se,le,Se,pe,Ce=ie?function(){return ue}:ge(ue),Ae=Ee(z,oe,ee?2:1),Oe=0;if(typeof Ce!="function")throw TypeError(ue+" is not iterable!");if(be(Ce)){for(se=we(ue.length);se>Oe;Oe++)if((pe=ee?Ae(ve(le=ue[Oe])[0],le[1]):Ae(ue[Oe]))===he||pe===xe)return pe}else for(Se=Ce.call(ue);!(le=Se.next()).done;)if((pe=me(Se,Ae,le.value,ee))===he||pe===xe)return pe};fe.BREAK=he,fe.RETURN=xe},{"./_an-object":61,"./_ctx":67,"./_is-array-iter":83,"./_iter-call":86,"./_to-length":124,"./core.get-iterator-method":132}],76:[function(ye,Fe,Me){var Ee=Fe.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=Ee)},{}],77:[function(ye,Fe,Me){var Ee={}.hasOwnProperty;Fe.exports=function(me,be){return Ee.call(me,be)}},{}],78:[function(ye,Fe,Me){var Ee=ye("./_object-dp"),me=ye("./_property-desc");Fe.exports=ye("./_descriptors")?function(be,ve,we){return Ee.f(be,ve,me(1,we))}:function(be,ve,we){return be[ve]=we,be}},{"./_descriptors":69,"./_object-dp":98,"./_property-desc":111}],79:[function(ye,Fe,Me){var Ee=ye("./_global").document;Fe.exports=Ee&&Ee.documentElement},{"./_global":76}],80:[function(ye,Fe,Me){Fe.exports=!ye("./_descriptors")&&!ye("./_fails")(function(){return Object.defineProperty(ye("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":69,"./_dom-create":70,"./_fails":74}],81:[function(ye,Fe,Me){Fe.exports=function(Ee,me,be){var ve=be===void 0;switch(me.length){case 0:return ve?Ee():Ee.call(be);case 1:return ve?Ee(me[0]):Ee.call(be,me[0]);case 2:return ve?Ee(me[0],me[1]):Ee.call(be,me[0],me[1]);case 3:return ve?Ee(me[0],me[1],me[2]):Ee.call(be,me[0],me[1],me[2]);case 4:return ve?Ee(me[0],me[1],me[2],me[3]):Ee.call(be,me[0],me[1],me[2],me[3])}return Ee.apply(be,me)}},{}],82:[function(ye,Fe,Me){var Ee=ye("./_cof");Fe.exports=Object("z").propertyIsEnumerable(0)?Object:function(me){return Ee(me)=="String"?me.split(""):Object(me)}},{"./_cof":64}],83:[function(ye,Fe,Me){var Ee=ye("./_iterators"),me=ye("./_wks")("iterator"),be=Array.prototype;Fe.exports=function(ve){return ve!==void 0&&(Ee.Array===ve||be[me]===ve)}},{"./_iterators":91,"./_wks":131}],84:[function(ye,Fe,Me){var Ee=ye("./_cof");Fe.exports=Array.isArray||function(me){return Ee(me)=="Array"}},{"./_cof":64}],85:[function(ye,Fe,Me){Fe.exports=function(Ee){return typeof Ee=="object"?Ee!==null:typeof Ee=="function"}},{}],86:[function(ye,Fe,Me){var Ee=ye("./_an-object");Fe.exports=function(me,be,ve,we){try{return we?be(Ee(ve)[0],ve[1]):be(ve)}catch(he){var ge=me.return;throw ge!==void 0&&Ee(ge.call(me)),he}}},{"./_an-object":61}],87:[function(ye,Fe,Me){"use strict";var Ee=ye("./_object-create"),me=ye("./_property-desc"),be=ye("./_set-to-string-tag"),ve={};ye("./_hide")(ve,ye("./_wks")("iterator"),function(){return this}),Fe.exports=function(we,ge,he){we.prototype=Ee(ve,{next:me(1,he)}),be(we,ge+" Iterator")}},{"./_hide":78,"./_object-create":97,"./_property-desc":111,"./_set-to-string-tag":115,"./_wks":131}],88:[function(ye,Fe,Me){"use strict";var Ee=ye("./_library"),me=ye("./_export"),be=ye("./_redefine"),ve=ye("./_hide"),we=ye("./_iterators"),ge=ye("./_iter-create"),he=ye("./_set-to-string-tag"),xe=ye("./_object-gpo"),fe=ye("./_wks")("iterator"),ue=!([].keys&&"next"in[].keys()),ee=function(){return this};Fe.exports=function(z,oe,ie,se,le,Se,pe){ge(ie,oe,se);var Ce,Ae,Oe,Re=function(ft){if(!ue&&ft in pt)return pt[ft];switch(ft){case"keys":case"values":return function(){return new ie(this,ft)}}return function(){return new ie(this,ft)}},We=oe+" Iterator",$e=le=="values",Je=!1,pt=z.prototype,St=pt[fe]||pt["@@iterator"]||le&&pt[le],Mt=St||Re(le),ct=le?$e?Re("entries"):Mt:void 0,wt=oe=="Array"&&pt.entries||St;if(wt&&(Oe=xe(wt.call(new z)))!==Object.prototype&&Oe.next&&(he(Oe,We,!0),Ee||typeof Oe[fe]=="function"||ve(Oe,fe,ee)),$e&&St&&St.name!=="values"&&(Je=!0,Mt=function(){return St.call(this)}),Ee&&!pe||!ue&&!Je&&pt[fe]||ve(pt,fe,Mt),we[oe]=Mt,we[We]=ee,le)if(Ce={values:$e?Mt:Re("values"),keys:Se?Mt:Re("keys"),entries:ct},pe)for(Ae in Ce)Ae in pt||be(pt,Ae,Ce[Ae]);else me(me.P+me.F*(ue||Je),oe,Ce);return Ce}},{"./_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(ye,Fe,Me){var Ee=ye("./_wks")("iterator"),me=!1;try{var be=[7][Ee]();be.return=function(){me=!0},Array.from(be,function(){throw 2})}catch(ve){}Fe.exports=function(ve,we){if(!we&&!me)return!1;var ge=!1;try{var he=[7],xe=he[Ee]();xe.next=function(){return{done:ge=!0}},he[Ee]=function(){return xe},ve(he)}catch(fe){}return ge}},{"./_wks":131}],90:[function(ye,Fe,Me){Fe.exports=function(Ee,me){return{value:me,done:!!Ee}}},{}],91:[function(ye,Fe,Me){Fe.exports={}},{}],92:[function(ye,Fe,Me){Fe.exports=!0},{}],93:[function(ye,Fe,Me){var Ee=ye("./_uid")("meta"),me=ye("./_is-object"),be=ye("./_has"),ve=ye("./_object-dp").f,we=0,ge=Object.isExtensible||function(){return!0},he=!ye("./_fails")(function(){return ge(Object.preventExtensions({}))}),xe=function(oe){ve(oe,Ee,{value:{i:"O"+ ++we,w:{}}})},fe=function(oe,ie){if(!me(oe))return typeof oe=="symbol"?oe:(typeof oe=="string"?"S":"P")+oe;if(!be(oe,Ee)){if(!ge(oe))return"F";if(!ie)return"E";xe(oe)}return oe[Ee].i},ue=function(oe,ie){if(!be(oe,Ee)){if(!ge(oe))return!0;if(!ie)return!1;xe(oe)}return oe[Ee].w},ee=function(oe){return he&&z.NEED&&ge(oe)&&!be(oe,Ee)&&xe(oe),oe},z=Fe.exports={KEY:Ee,NEED:!1,fastKey:fe,getWeak:ue,onFreeze:ee}},{"./_fails":74,"./_has":77,"./_is-object":85,"./_object-dp":98,"./_uid":127}],94:[function(ye,Fe,Me){var Ee=ye("./_global"),me=ye("./_task").set,be=Ee.MutationObserver||Ee.WebKitMutationObserver,ve=Ee.process,we=Ee.Promise,ge=ye("./_cof")(ve)=="process";Fe.exports=function(){var he,xe,fe,ue=function(){var ie,se;for(ge&&(ie=ve.domain)&&ie.exit();he;){se=he.fn,he=he.next;try{se()}catch(le){throw he?fe():xe=void 0,le}}xe=void 0,ie&&ie.enter()};if(ge)fe=function(){ve.nextTick(ue)};else if(!be||Ee.navigator&&Ee.navigator.standalone)if(we&&we.resolve){var ee=we.resolve(void 0);fe=function(){ee.then(ue)}}else fe=function(){me.call(Ee,ue)};else{var z=!0,oe=document.createTextNode("");new be(ue).observe(oe,{characterData:!0}),fe=function(){oe.data=z=!z}}return function(ie){var se={fn:ie,next:void 0};xe&&(xe.next=se),he||(he=se,fe()),xe=se}}},{"./_cof":64,"./_global":76,"./_task":120}],95:[function(ye,Fe,Me){"use strict";function Ee(be){var ve,we;this.promise=new be(function(ge,he){if(ve!==void 0||we!==void 0)throw TypeError("Bad Promise constructor");ve=ge,we=he}),this.resolve=me(ve),this.reject=me(we)}var me=ye("./_a-function");Fe.exports.f=function(be){return new Ee(be)}},{"./_a-function":58}],96:[function(ye,Fe,Me){"use strict";var Ee=ye("./_object-keys"),me=ye("./_object-gops"),be=ye("./_object-pie"),ve=ye("./_to-object"),we=ye("./_iobject"),ge=Object.assign;Fe.exports=!ge||ye("./_fails")(function(){var he={},xe={},fe=Symbol(),ue="abcdefghijklmnopqrst";return he[fe]=7,ue.split("").forEach(function(ee){xe[ee]=ee}),ge({},he)[fe]!=7||Object.keys(ge({},xe)).join("")!=ue})?function(he,xe){for(var fe=ve(he),ue=arguments.length,ee=1,z=me.f,oe=be.f;ue>ee;)for(var ie,se=we(arguments[ee++]),le=z?Ee(se).concat(z(se)):Ee(se),Se=le.length,pe=0;Se>pe;)oe.call(se,ie=le[pe++])&&(fe[ie]=se[ie]);return fe}:ge},{"./_fails":74,"./_iobject":82,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_to-object":125}],97:[function(ye,Fe,Me){var Ee=ye("./_an-object"),me=ye("./_object-dps"),be=ye("./_enum-bug-keys"),ve=ye("./_shared-key")("IE_PROTO"),we=function(){},ge=function(){var he,xe=ye("./_dom-create")("iframe"),fe=be.length;for(xe.style.display="none",ye("./_html").appendChild(xe),xe.src="javascript:",he=xe.contentWindow.document,he.open(),he.write("<script>document.F=Object<\/script>"),he.close(),ge=he.F;fe--;)delete ge.prototype[be[fe]];return ge()};Fe.exports=Object.create||function(he,xe){var fe;return he!==null?(we.prototype=Ee(he),fe=new we,we.prototype=null,fe[ve]=he):fe=ge(),xe===void 0?fe:me(fe,xe)}},{"./_an-object":61,"./_dom-create":70,"./_enum-bug-keys":71,"./_html":79,"./_object-dps":99,"./_shared-key":116}],98:[function(ye,Fe,Me){var Ee=ye("./_an-object"),me=ye("./_ie8-dom-define"),be=ye("./_to-primitive"),ve=Object.defineProperty;Me.f=ye("./_descriptors")?Object.defineProperty:function(we,ge,he){if(Ee(we),ge=be(ge,!0),Ee(he),me)try{return ve(we,ge,he)}catch(xe){}if("get"in he||"set"in he)throw TypeError("Accessors not supported!");return"value"in he&&(we[ge]=he.value),we}},{"./_an-object":61,"./_descriptors":69,"./_ie8-dom-define":80,"./_to-primitive":126}],99:[function(ye,Fe,Me){var Ee=ye("./_object-dp"),me=ye("./_an-object"),be=ye("./_object-keys");Fe.exports=ye("./_descriptors")?Object.defineProperties:function(ve,we){me(ve);for(var ge,he=be(we),xe=he.length,fe=0;xe>fe;)Ee.f(ve,ge=he[fe++],we[ge]);return ve}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(ye,Fe,Me){var Ee=ye("./_object-pie"),me=ye("./_property-desc"),be=ye("./_to-iobject"),ve=ye("./_to-primitive"),we=ye("./_has"),ge=ye("./_ie8-dom-define"),he=Object.getOwnPropertyDescriptor;Me.f=ye("./_descriptors")?he:function(xe,fe){if(xe=be(xe),fe=ve(fe,!0),ge)try{return he(xe,fe)}catch(ue){}if(we(xe,fe))return me(!Ee.f.call(xe,fe),xe[fe])}},{"./_descriptors":69,"./_has":77,"./_ie8-dom-define":80,"./_object-pie":107,"./_property-desc":111,"./_to-iobject":123,"./_to-primitive":126}],101:[function(ye,Fe,Me){var Ee=ye("./_to-iobject"),me=ye("./_object-gopn").f,be={}.toString,ve=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],we=function(ge){try{return me(ge)}catch(he){return ve.slice()}};Fe.exports.f=function(ge){return ve&&be.call(ge)=="[object Window]"?we(ge):me(Ee(ge))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(ye,Fe,Me){var Ee=ye("./_object-keys-internal"),me=ye("./_enum-bug-keys").concat("length","prototype");Me.f=Object.getOwnPropertyNames||function(be){return Ee(be,me)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],103:[function(ye,Fe,Me){Me.f=Object.getOwnPropertySymbols},{}],104:[function(ye,Fe,Me){var Ee=ye("./_has"),me=ye("./_to-object"),be=ye("./_shared-key")("IE_PROTO"),ve=Object.prototype;Fe.exports=Object.getPrototypeOf||function(we){return we=me(we),Ee(we,be)?we[be]:typeof we.constructor=="function"&&we instanceof we.constructor?we.constructor.prototype:we instanceof Object?ve:null}},{"./_has":77,"./_shared-key":116,"./_to-object":125}],105:[function(ye,Fe,Me){var Ee=ye("./_has"),me=ye("./_to-iobject"),be=ye("./_array-includes")(!1),ve=ye("./_shared-key")("IE_PROTO");Fe.exports=function(we,ge){var he,xe=me(we),fe=0,ue=[];for(he in xe)he!=ve&&Ee(xe,he)&&ue.push(he);for(;ge.length>fe;)Ee(xe,he=ge[fe++])&&(~be(ue,he)||ue.push(he));return ue}},{"./_array-includes":62,"./_has":77,"./_shared-key":116,"./_to-iobject":123}],106:[function(ye,Fe,Me){var Ee=ye("./_object-keys-internal"),me=ye("./_enum-bug-keys");Fe.exports=Object.keys||function(be){return Ee(be,me)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(ye,Fe,Me){Me.f={}.propertyIsEnumerable},{}],108:[function(ye,Fe,Me){var Ee=ye("./_export"),me=ye("./_core"),be=ye("./_fails");Fe.exports=function(ve,we){var ge=(me.Object||{})[ve]||Object[ve],he={};he[ve]=we(ge),Ee(Ee.S+Ee.F*be(function(){ge(1)}),"Object",he)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(ye,Fe,Me){Fe.exports=function(Ee){try{return{e:!1,v:Ee()}}catch(me){return{e:!0,v:me}}}},{}],110:[function(ye,Fe,Me){var Ee=ye("./_an-object"),me=ye("./_is-object"),be=ye("./_new-promise-capability");Fe.exports=function(ve,we){if(Ee(ve),me(we)&&we.constructor===ve)return we;var ge=be.f(ve);return(0,ge.resolve)(we),ge.promise}},{"./_an-object":61,"./_is-object":85,"./_new-promise-capability":95}],111:[function(ye,Fe,Me){Fe.exports=function(Ee,me){return{enumerable:!(1&Ee),configurable:!(2&Ee),writable:!(4&Ee),value:me}}},{}],112:[function(ye,Fe,Me){var Ee=ye("./_hide");Fe.exports=function(me,be,ve){for(var we in be)ve&&me[we]?me[we]=be[we]:Ee(me,we,be[we]);return me}},{"./_hide":78}],113:[function(ye,Fe,Me){Fe.exports=ye("./_hide")},{"./_hide":78}],114:[function(ye,Fe,Me){"use strict";var Ee=ye("./_global"),me=ye("./_core"),be=ye("./_object-dp"),ve=ye("./_descriptors"),we=ye("./_wks")("species");Fe.exports=function(ge){var he=typeof me[ge]=="function"?me[ge]:Ee[ge];ve&&he&&!he[we]&&be.f(he,we,{configurable:!0,get:function(){return this}})}},{"./_core":65,"./_descriptors":69,"./_global":76,"./_object-dp":98,"./_wks":131}],115:[function(ye,Fe,Me){var Ee=ye("./_object-dp").f,me=ye("./_has"),be=ye("./_wks")("toStringTag");Fe.exports=function(ve,we,ge){ve&&!me(ve=ge?ve:ve.prototype,be)&&Ee(ve,be,{configurable:!0,value:we})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(ye,Fe,Me){var Ee=ye("./_shared")("keys"),me=ye("./_uid");Fe.exports=function(be){return Ee[be]||(Ee[be]=me(be))}},{"./_shared":117,"./_uid":127}],117:[function(ye,Fe,Me){var Ee=ye("./_core"),me=ye("./_global"),be=me["__core-js_shared__"]||(me["__core-js_shared__"]={});(Fe.exports=function(ve,we){return be[ve]||(be[ve]=we!==void 0?we:{})})("versions",[]).push({version:Ee.version,mode:ye("./_library")?"pure":"global",copyright:"\u6F0F 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":65,"./_global":76,"./_library":92}],118:[function(ye,Fe,Me){var Ee=ye("./_an-object"),me=ye("./_a-function"),be=ye("./_wks")("species");Fe.exports=function(ve,we){var ge,he=Ee(ve).constructor;return he===void 0||(ge=Ee(he)[be])==null?we:me(ge)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(ye,Fe,Me){var Ee=ye("./_to-integer"),me=ye("./_defined");Fe.exports=function(be){return function(ve,we){var ge,he,xe=String(me(ve)),fe=Ee(we),ue=xe.length;return fe<0||fe>=ue?be?"":void 0:(ge=xe.charCodeAt(fe),ge<55296||ge>56319||fe+1===ue||(he=xe.charCodeAt(fe+1))<56320||he>57343?be?xe.charAt(fe):ge:be?xe.slice(fe,fe+2):he-56320+(ge-55296<<10)+65536)}}},{"./_defined":68,"./_to-integer":122}],120:[function(ye,Fe,Me){var Ee,me,be,ve=ye("./_ctx"),we=ye("./_invoke"),ge=ye("./_html"),he=ye("./_dom-create"),xe=ye("./_global"),fe=xe.process,ue=xe.setImmediate,ee=xe.clearImmediate,z=xe.MessageChannel,oe=xe.Dispatch,ie=0,se={},le=function(){var pe=+this;if(se.hasOwnProperty(pe)){var Ce=se[pe];delete se[pe],Ce()}},Se=function(pe){le.call(pe.data)};ue&&ee||(ue=function(pe){for(var Ce=[],Ae=1;arguments.length>Ae;)Ce.push(arguments[Ae++]);return se[++ie]=function(){we(typeof pe=="function"?pe:Function(pe),Ce)},Ee(ie),ie},ee=function(pe){delete se[pe]},ye("./_cof")(fe)=="process"?Ee=function(pe){fe.nextTick(ve(le,pe,1))}:oe&&oe.now?Ee=function(pe){oe.now(ve(le,pe,1))}:z?(me=new z,be=me.port2,me.port1.onmessage=Se,Ee=ve(be.postMessage,be,1)):xe.addEventListener&&typeof postMessage=="function"&&!xe.importScripts?(Ee=function(pe){xe.postMessage(pe+"","*")},xe.addEventListener("message",Se,!1)):Ee="onreadystatechange"in he("script")?function(pe){ge.appendChild(he("script")).onreadystatechange=function(){ge.removeChild(this),le.call(pe)}}:function(pe){setTimeout(ve(le,pe,1),0)}),Fe.exports={set:ue,clear:ee}},{"./_cof":64,"./_ctx":67,"./_dom-create":70,"./_global":76,"./_html":79,"./_invoke":81}],121:[function(ye,Fe,Me){var Ee=ye("./_to-integer"),me=Math.max,be=Math.min;Fe.exports=function(ve,we){return ve=Ee(ve),ve<0?me(ve+we,0):be(ve,we)}},{"./_to-integer":122}],122:[function(ye,Fe,Me){var Ee=Math.ceil,me=Math.floor;Fe.exports=function(be){return isNaN(be=+be)?0:(be>0?me:Ee)(be)}},{}],123:[function(ye,Fe,Me){var Ee=ye("./_iobject"),me=ye("./_defined");Fe.exports=function(be){return Ee(me(be))}},{"./_defined":68,"./_iobject":82}],124:[function(ye,Fe,Me){var Ee=ye("./_to-integer"),me=Math.min;Fe.exports=function(be){return be>0?me(Ee(be),9007199254740991):0}},{"./_to-integer":122}],125:[function(ye,Fe,Me){var Ee=ye("./_defined");Fe.exports=function(me){return Object(Ee(me))}},{"./_defined":68}],126:[function(ye,Fe,Me){var Ee=ye("./_is-object");Fe.exports=function(me,be){if(!Ee(me))return me;var ve,we;if(be&&typeof(ve=me.toString)=="function"&&!Ee(we=ve.call(me))||typeof(ve=me.valueOf)=="function"&&!Ee(we=ve.call(me))||!be&&typeof(ve=me.toString)=="function"&&!Ee(we=ve.call(me)))return we;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(ye,Fe,Me){var Ee=0,me=Math.random();Fe.exports=function(be){return"Symbol(".concat(be===void 0?"":be,")_",(++Ee+me).toString(36))}},{}],128:[function(ye,Fe,Me){var Ee=ye("./_global"),me=Ee.navigator;Fe.exports=me&&me.userAgent||""},{"./_global":76}],129:[function(ye,Fe,Me){var Ee=ye("./_global"),me=ye("./_core"),be=ye("./_library"),ve=ye("./_wks-ext"),we=ye("./_object-dp").f;Fe.exports=function(ge){var he=me.Symbol||(me.Symbol=be?{}:Ee.Symbol||{});ge.charAt(0)=="_"||ge in he||we(he,ge,{value:ve.f(ge)})}},{"./_core":65,"./_global":76,"./_library":92,"./_object-dp":98,"./_wks-ext":130}],130:[function(ye,Fe,Me){Me.f=ye("./_wks")},{"./_wks":131}],131:[function(ye,Fe,Me){var Ee=ye("./_shared")("wks"),me=ye("./_uid"),be=ye("./_global").Symbol,ve=typeof be=="function";(Fe.exports=function(we){return Ee[we]||(Ee[we]=ve&&be[we]||(ve?be:me)("Symbol."+we))}).store=Ee},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(ye,Fe,Me){var Ee=ye("./_classof"),me=ye("./_wks")("iterator"),be=ye("./_iterators");Fe.exports=ye("./_core").getIteratorMethod=function(ve){if(ve!=null)return ve[me]||ve["@@iterator"]||be[Ee(ve)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(ye,Fe,Me){"use strict";var Ee=ye("./_ctx"),me=ye("./_export"),be=ye("./_to-object"),ve=ye("./_iter-call"),we=ye("./_is-array-iter"),ge=ye("./_to-length"),he=ye("./_create-property"),xe=ye("./core.get-iterator-method");me(me.S+me.F*!ye("./_iter-detect")(function(fe){Array.from(fe)}),"Array",{from:function(fe){var ue,ee,z,oe,ie=be(fe),se=typeof this=="function"?this:Array,le=arguments.length,Se=le>1?arguments[1]:void 0,pe=Se!==void 0,Ce=0,Ae=xe(ie);if(pe&&(Se=Ee(Se,le>2?arguments[2]:void 0,2)),Ae==null||se==Array&&we(Ae))for(ue=ge(ie.length),ee=new se(ue);ue>Ce;Ce++)he(ee,Ce,pe?Se(ie[Ce],Ce):ie[Ce]);else for(oe=Ae.call(ie),ee=new se;!(z=oe.next()).done;Ce++)he(ee,Ce,pe?ve(oe,Se,[z.value,Ce],!0):z.value);return ee.length=Ce,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(ye,Fe,Me){"use strict";var Ee=ye("./_add-to-unscopables"),me=ye("./_iter-step"),be=ye("./_iterators"),ve=ye("./_to-iobject");Fe.exports=ye("./_iter-define")(Array,"Array",function(we,ge){this._t=ve(we),this._i=0,this._k=ge},function(){var we=this._t,ge=this._k,he=this._i++;return!we||he>=we.length?(this._t=void 0,me(1)):ge=="keys"?me(0,he):ge=="values"?me(0,we[he]):me(0,[he,we[he]])},"values"),be.Arguments=be.Array,Ee("keys"),Ee("values"),Ee("entries")},{"./_add-to-unscopables":59,"./_iter-define":88,"./_iter-step":90,"./_iterators":91,"./_to-iobject":123}],135:[function(ye,Fe,Me){"use strict";var Ee=ye("./_is-object"),me=ye("./_object-gpo"),be=ye("./_wks")("hasInstance"),ve=Function.prototype;be in ve||ye("./_object-dp").f(ve,be,{value:function(we){if(typeof this!="function"||!Ee(we))return!1;if(!Ee(this.prototype))return we instanceof this;for(;we=me(we);)if(this.prototype===we)return!0;return!1}})},{"./_is-object":85,"./_object-dp":98,"./_object-gpo":104,"./_wks":131}],136:[function(ye,Fe,Me){var Ee=ye("./_export");Ee(Ee.S+Ee.F,"Object",{assign:ye("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(ye,Fe,Me){var Ee=ye("./_export");Ee(Ee.S,"Object",{create:ye("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(ye,Fe,Me){var Ee=ye("./_export");Ee(Ee.S+Ee.F*!ye("./_descriptors"),"Object",{defineProperty:ye("./_object-dp").f})},{"./_descriptors":69,"./_export":73,"./_object-dp":98}],139:[function(ye,Fe,Me){ye("./_object-sap")("getOwnPropertyNames",function(){return ye("./_object-gopn-ext").f})},{"./_object-gopn-ext":101,"./_object-sap":108}],140:[function(ye,Fe,Me){var Ee=ye("./_to-object"),me=ye("./_object-gpo");ye("./_object-sap")("getPrototypeOf",function(){return function(be){return me(Ee(be))}})},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(ye,Fe,Me){var Ee=ye("./_to-object"),me=ye("./_object-keys");ye("./_object-sap")("keys",function(){return function(be){return me(Ee(be))}})},{"./_object-keys":106,"./_object-sap":108,"./_to-object":125}],142:[function(ye,Fe,Me){arguments[4][36][0].apply(Me,arguments)},{dup:36}],143:[function(ye,Fe,Me){"use strict";var Ee,me,be,ve,we=ye("./_library"),ge=ye("./_global"),he=ye("./_ctx"),xe=ye("./_classof"),fe=ye("./_export"),ue=ye("./_is-object"),ee=ye("./_a-function"),z=ye("./_an-instance"),oe=ye("./_for-of"),ie=ye("./_species-constructor"),se=ye("./_task").set,le=ye("./_microtask")(),Se=ye("./_new-promise-capability"),pe=ye("./_perform"),Ce=ye("./_user-agent"),Ae=ye("./_promise-resolve"),Oe=ge.TypeError,Re=ge.process,We=Re&&Re.versions,$e=We&&We.v8||"",Je=ge.Promise,pt=xe(Re)=="process",St=function(){},Mt=me=Se.f,ct=!!function(){try{var bt=Je.resolve(1),yt=(bt.constructor={})[ye("./_wks")("species")]=function(Vt){Vt(St,St)};return(pt||typeof PromiseRejectionEvent=="function")&&bt.then(St)instanceof yt&&$e.indexOf("6.6")!==0&&Ce.indexOf("Chrome/66")===-1}catch(Vt){}}(),wt=function(bt){var yt;return!(!ue(bt)||typeof(yt=bt.then)!="function")&&yt},ft=function(bt,yt){if(!bt._n){bt._n=!0;var Vt=bt._c;le(function(){for(var Kt=bt._v,gn=bt._s==1,Gt=0;Vt.length>Gt;)(function(Dt){var on,Jt,jt,ut=gn?Dt.ok:Dt.fail,ze=Dt.resolve,je=Dt.reject,it=Dt.domain;try{ut?(gn||(bt._h==2&&et(bt),bt._h=1),ut===!0?on=Kt:(it&&it.enter(),on=ut(Kt),it&&(it.exit(),jt=!0)),on===Dt.promise?je(Oe("Promise-chain cycle")):(Jt=wt(on))?Jt.call(on,ze,je):ze(on)):je(Kt)}catch(ht){it&&!jt&&it.exit(),je(ht)}})(Vt[Gt++]);bt._c=[],bt._n=!1,yt&&!bt._h&&$t(bt)})}},$t=function(bt){se.call(ge,function(){var yt,Vt,Kt,gn=bt._v,Gt=st(bt);if(Gt&&(yt=pe(function(){pt?Re.emit("unhandledRejection",gn,bt):(Vt=ge.onunhandledrejection)?Vt({promise:bt,reason:gn}):(Kt=ge.console)&&Kt.error&&Kt.error("Unhandled promise rejection",gn)}),bt._h=pt||st(bt)?2:1),bt._a=void 0,Gt&&yt.e)throw yt.v})},st=function(bt){return bt._h!==1&&(bt._a||bt._c).length===0},et=function(bt){se.call(ge,function(){var yt;pt?Re.emit("rejectionHandled",bt):(yt=ge.onrejectionhandled)&&yt({promise:bt,reason:bt._v})})},lt=function(bt){var yt=this;yt._d||(yt._d=!0,yt=yt._w||yt,yt._v=bt,yt._s=2,yt._a||(yt._a=yt._c.slice()),ft(yt,!0))},dt=function(bt){var yt,Vt=this;if(!Vt._d){Vt._d=!0,Vt=Vt._w||Vt;try{if(Vt===bt)throw Oe("Promise can't be resolved itself");(yt=wt(bt))?le(function(){var Kt={_w:Vt,_d:!1};try{yt.call(bt,he(dt,Kt,1),he(lt,Kt,1))}catch(gn){lt.call(Kt,gn)}}):(Vt._v=bt,Vt._s=1,ft(Vt,!1))}catch(Kt){lt.call({_w:Vt,_d:!1},Kt)}}};ct||(Je=function(bt){z(this,Je,"Promise","_h"),ee(bt),Ee.call(this);try{bt(he(dt,this,1),he(lt,this,1))}catch(yt){lt.call(this,yt)}},Ee=function(bt){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},Ee.prototype=ye("./_redefine-all")(Je.prototype,{then:function(bt,yt){var Vt=Mt(ie(this,Je));return Vt.ok=typeof bt!="function"||bt,Vt.fail=typeof yt=="function"&&yt,Vt.domain=pt?Re.domain:void 0,this._c.push(Vt),this._a&&this._a.push(Vt),this._s&&ft(this,!1),Vt.promise},catch:function(bt){return this.then(void 0,bt)}}),be=function(){var bt=new Ee;this.promise=bt,this.resolve=he(dt,bt,1),this.reject=he(lt,bt,1)},Se.f=Mt=function(bt){return bt===Je||bt===ve?new be(bt):me(bt)}),fe(fe.G+fe.W+fe.F*!ct,{Promise:Je}),ye("./_set-to-string-tag")(Je,"Promise"),ye("./_set-species")("Promise"),ve=ye("./_core").Promise,fe(fe.S+fe.F*!ct,"Promise",{reject:function(bt){var yt=Mt(this);return(0,yt.reject)(bt),yt.promise}}),fe(fe.S+fe.F*(we||!ct),"Promise",{resolve:function(bt){return Ae(we&&this===ve?Je:this,bt)}}),fe(fe.S+fe.F*!(ct&&ye("./_iter-detect")(function(bt){Je.all(bt).catch(St)})),"Promise",{all:function(bt){var yt=this,Vt=Mt(yt),Kt=Vt.resolve,gn=Vt.reject,Gt=pe(function(){var Dt=[],on=0,Jt=1;oe(bt,!1,function(jt){var ut=on++,ze=!1;Dt.push(void 0),Jt++,yt.resolve(jt).then(function(je){ze||(ze=!0,Dt[ut]=je,--Jt||Kt(Dt))},gn)}),--Jt||Kt(Dt)});return Gt.e&&gn(Gt.v),Vt.promise},race:function(bt){var yt=this,Vt=Mt(yt),Kt=Vt.reject,gn=pe(function(){oe(bt,!1,function(Gt){yt.resolve(Gt).then(Vt.resolve,Kt)})});return gn.e&&Kt(gn.v),Vt.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(ye,Fe,Me){var Ee=ye("./_export"),me=ye("./_to-absolute-index"),be=String.fromCharCode,ve=String.fromCodePoint;Ee(Ee.S+Ee.F*(!!ve&&ve.length!=1),"String",{fromCodePoint:function(we){for(var ge,he=[],xe=arguments.length,fe=0;xe>fe;){if(ge=+arguments[fe++],me(ge,1114111)!==ge)throw RangeError(ge+" is not a valid code point");he.push(ge<65536?be(ge):be(55296+((ge-=65536)>>10),ge%1024+56320))}return he.join("")}})},{"./_export":73,"./_to-absolute-index":121}],145:[function(ye,Fe,Me){"use strict";var Ee=ye("./_string-at")(!0);ye("./_iter-define")(String,"String",function(me){this._t=String(me),this._i=0},function(){var me,be=this._t,ve=this._i;return ve>=be.length?{value:void 0,done:!0}:(me=Ee(be,ve),this._i+=me.length,{value:me,done:!1})})},{"./_iter-define":88,"./_string-at":119}],146:[function(ye,Fe,Me){"use strict";var Ee=ye("./_global"),me=ye("./_has"),be=ye("./_descriptors"),ve=ye("./_export"),we=ye("./_redefine"),ge=ye("./_meta").KEY,he=ye("./_fails"),xe=ye("./_shared"),fe=ye("./_set-to-string-tag"),ue=ye("./_uid"),ee=ye("./_wks"),z=ye("./_wks-ext"),oe=ye("./_wks-define"),ie=ye("./_enum-keys"),se=ye("./_is-array"),le=ye("./_an-object"),Se=ye("./_is-object"),pe=ye("./_to-iobject"),Ce=ye("./_to-primitive"),Ae=ye("./_property-desc"),Oe=ye("./_object-create"),Re=ye("./_object-gopn-ext"),We=ye("./_object-gopd"),$e=ye("./_object-dp"),Je=ye("./_object-keys"),pt=We.f,St=$e.f,Mt=Re.f,ct=Ee.Symbol,wt=Ee.JSON,ft=wt&&wt.stringify,$t=ee("_hidden"),st=ee("toPrimitive"),et={}.propertyIsEnumerable,lt=xe("symbol-registry"),dt=xe("symbols"),bt=xe("op-symbols"),yt=Object.prototype,Vt=typeof ct=="function",Kt=Ee.QObject,gn=!Kt||!Kt.prototype||!Kt.prototype.findChild,Gt=be&&he(function(){return Oe(St({},"a",{get:function(){return St(this,"a",{value:7}).a}})).a!=7})?function(rt,Ze,Xe){var mt=pt(yt,Ze);mt&&delete yt[Ze],St(rt,Ze,Xe),mt&&rt!==yt&&St(yt,Ze,mt)}:St,Dt=function(rt){var Ze=dt[rt]=Oe(ct.prototype);return Ze._k=rt,Ze},on=Vt&&typeof ct.iterator=="symbol"?function(rt){return typeof rt=="symbol"}:function(rt){return rt instanceof ct},Jt=function(rt,Ze,Xe){return rt===yt&&Jt(bt,Ze,Xe),le(rt),Ze=Ce(Ze,!0),le(Xe),me(dt,Ze)?(Xe.enumerable?(me(rt,$t)&&rt[$t][Ze]&&(rt[$t][Ze]=!1),Xe=Oe(Xe,{enumerable:Ae(0,!1)})):(me(rt,$t)||St(rt,$t,Ae(1,{})),rt[$t][Ze]=!0),Gt(rt,Ze,Xe)):St(rt,Ze,Xe)},jt=function(rt,Ze){le(rt);for(var Xe,mt=ie(Ze=pe(Ze)),Rt=0,vn=mt.length;vn>Rt;)Jt(rt,Xe=mt[Rt++],Ze[Xe]);return rt},ut=function(rt,Ze){return Ze===void 0?Oe(rt):jt(Oe(rt),Ze)},ze=function(rt){var Ze=et.call(this,rt=Ce(rt,!0));return!(this===yt&&me(dt,rt)&&!me(bt,rt))&&(!(Ze||!me(this,rt)||!me(dt,rt)||me(this,$t)&&this[$t][rt])||Ze)},je=function(rt,Ze){if(rt=pe(rt),Ze=Ce(Ze,!0),rt!==yt||!me(dt,Ze)||me(bt,Ze)){var Xe=pt(rt,Ze);return!Xe||!me(dt,Ze)||me(rt,$t)&&rt[$t][Ze]||(Xe.enumerable=!0),Xe}},it=function(rt){for(var Ze,Xe=Mt(pe(rt)),mt=[],Rt=0;Xe.length>Rt;)me(dt,Ze=Xe[Rt++])||Ze==$t||Ze==ge||mt.push(Ze);return mt},ht=function(rt){for(var Ze,Xe=rt===yt,mt=Mt(Xe?bt:pe(rt)),Rt=[],vn=0;mt.length>vn;)!me(dt,Ze=mt[vn++])||Xe&&!me(yt,Ze)||Rt.push(dt[Ze]);return Rt};Vt||(ct=function(){if(this instanceof ct)throw TypeError("Symbol is not a constructor!");var rt=ue(arguments.length>0?arguments[0]:void 0),Ze=function(Xe){this===yt&&Ze.call(bt,Xe),me(this,$t)&&me(this[$t],rt)&&(this[$t][rt]=!1),Gt(this,rt,Ae(1,Xe))};return be&&gn&&Gt(yt,rt,{configurable:!0,set:Ze}),Dt(rt)},we(ct.prototype,"toString",function(){return this._k}),We.f=je,$e.f=Jt,ye("./_object-gopn").f=Re.f=it,ye("./_object-pie").f=ze,ye("./_object-gops").f=ht,be&&!ye("./_library")&&we(yt,"propertyIsEnumerable",ze,!0),z.f=function(rt){return Dt(ee(rt))}),ve(ve.G+ve.W+ve.F*!Vt,{Symbol:ct});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Ke=0;nt.length>Ke;)ee(nt[Ke++]);for(var Be=Je(ee.store),Ue=0;Be.length>Ue;)oe(Be[Ue++]);ve(ve.S+ve.F*!Vt,"Symbol",{for:function(rt){return me(lt,rt+="")?lt[rt]:lt[rt]=ct(rt)},keyFor:function(rt){if(!on(rt))throw TypeError(rt+" is not a symbol!");for(var Ze in lt)if(lt[Ze]===rt)return Ze},useSetter:function(){gn=!0},useSimple:function(){gn=!1}}),ve(ve.S+ve.F*!Vt,"Object",{create:ut,defineProperty:Jt,defineProperties:jt,getOwnPropertyDescriptor:je,getOwnPropertyNames:it,getOwnPropertySymbols:ht}),wt&&ve(ve.S+ve.F*(!Vt||he(function(){var rt=ct();return ft([rt])!="[null]"||ft({a:rt})!="{}"||ft(Object(rt))!="{}"})),"JSON",{stringify:function(rt){for(var Ze,Xe,mt=[rt],Rt=1;arguments.length>Rt;)mt.push(arguments[Rt++]);if(Xe=Ze=mt[1],(Se(Ze)||rt!==void 0)&&!on(rt))return se(Ze)||(Ze=function(vn,An){if(typeof Xe=="function"&&(An=Xe.call(this,vn,An)),!on(An))return An}),mt[1]=Ze,ft.apply(wt,mt)}}),ct.prototype[st]||ye("./_hide")(ct.prototype,st,ct.prototype.valueOf),fe(ct,"Symbol"),fe(Math,"Math",!0),fe(Ee.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(ye,Fe,Me){"use strict";var Ee=ye("./_export"),me=ye("./_core"),be=ye("./_global"),ve=ye("./_species-constructor"),we=ye("./_promise-resolve");Ee(Ee.P+Ee.R,"Promise",{finally:function(ge){var he=ve(this,me.Promise||be.Promise),xe=typeof ge=="function";return this.then(xe?function(fe){return we(he,ge()).then(function(){return fe})}:ge,xe?function(fe){return we(he,ge()).then(function(){throw fe})}:ge)}})},{"./_core":65,"./_export":73,"./_global":76,"./_promise-resolve":110,"./_species-constructor":118}],148:[function(ye,Fe,Me){"use strict";var Ee=ye("./_export"),me=ye("./_new-promise-capability"),be=ye("./_perform");Ee(Ee.S,"Promise",{try:function(ve){var we=me.f(this),ge=be(ve);return(ge.e?we.reject:we.resolve)(ge.v),we.promise}})},{"./_export":73,"./_new-promise-capability":95,"./_perform":109}],149:[function(ye,Fe,Me){ye("./_wks-define")("asyncIterator")},{"./_wks-define":129}],150:[function(ye,Fe,Me){ye("./_wks-define")("observable")},{"./_wks-define":129}],151:[function(ye,Fe,Me){ye("./es6.array.iterator");for(var Ee=ye("./_global"),me=ye("./_hide"),be=ye("./_iterators"),ve=ye("./_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(","),ge=0;ge<we.length;ge++){var he=we[ge],xe=Ee[he],fe=xe&&xe.prototype;fe&&!fe[ve]&&me(fe,ve,he),be[he]=be.Array}},{"./_global":76,"./_hide":78,"./_iterators":91,"./_wks":131,"./es6.array.iterator":134}],152:[function(ye,Fe,Me){var Ee=ye("./_export"),me=ye("./_task");Ee(Ee.G+Ee.B,{setImmediate:me.set,clearImmediate:me.clear})},{"./_export":73,"./_task":120}],153:[function(ye,Fe,Me){(function(Ee){"use strict";function me(Ce){return Array.isArray?Array.isArray(Ce):le(Ce)==="[object Array]"}function be(Ce){return typeof Ce=="boolean"}function ve(Ce){return Ce===null}function we(Ce){return Ce==null}function ge(Ce){return typeof Ce=="number"}function he(Ce){return typeof Ce=="string"}function xe(Ce){return(Ce===void 0?"undefined":(0,pe.default)(Ce))==="symbol"}function fe(Ce){return Ce===void 0}function ue(Ce){return le(Ce)==="[object RegExp]"}function ee(Ce){return(Ce===void 0?"undefined":(0,pe.default)(Ce))==="object"&&Ce!==null}function z(Ce){return le(Ce)==="[object Date]"}function oe(Ce){return le(Ce)==="[object Error]"||Ce instanceof Error}function ie(Ce){return typeof Ce=="function"}function se(Ce){return Ce===null||typeof Ce=="boolean"||typeof Ce=="number"||typeof Ce=="string"||(Ce===void 0?"undefined":(0,pe.default)(Ce))==="symbol"||Ce===void 0}function le(Ce){return Object.prototype.toString.call(Ce)}var Se=ye("babel-runtime/helpers/typeof"),pe=function(Ce){return Ce&&Ce.__esModule?Ce:{default:Ce}}(Se);Me.isArray=me,Me.isBoolean=be,Me.isNull=ve,Me.isNullOrUndefined=we,Me.isNumber=ge,Me.isString=he,Me.isSymbol=xe,Me.isUndefined=fe,Me.isRegExp=ue,Me.isObject=ee,Me.isDate=z,Me.isError=oe,Me.isFunction=ie,Me.isPrimitive=se,Me.isBuffer=Ee.isBuffer}).call(this,{isBuffer:ye("../../is-buffer/index.js")})},{"../../is-buffer/index.js":163,"babel-runtime/helpers/typeof":32}],154:[function(ye,Fe,Me){"use strict";var Ee=ye("babel-runtime/helpers/typeof"),me=function(be){return be&&be.__esModule?be:{default:be}}(Ee);(function(be){function ve(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 ge(fe){var ue=fe.getDay();return ue===0&&(ue=7),ue}function he(fe){return fe===null?"null":fe===void 0?"undefined":(fe===void 0?"undefined":(0,me.default)(fe))!=="object"?fe===void 0?"undefined":(0,me.default)(fe):Array.isArray(fe)?"array":{}.toString.call(fe).slice(8,-1).toLowerCase()}var xe=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,ie,se){if(arguments.length!==1||he(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(xe.masks[oe]||oe||xe.masks.default);var le=oe.slice(0,4);le!=="UTC:"&&le!=="GMT:"||(oe=oe.slice(4),ie=!0,le==="GMT:"&&(se=!0));var Se=ie?"getUTC":"get",pe=z[Se+"Date"](),Ce=z[Se+"Day"](),Ae=z[Se+"Month"](),Oe=z[Se+"FullYear"](),Re=z[Se+"Hours"](),We=z[Se+"Minutes"](),$e=z[Se+"Seconds"](),Je=z[Se+"Milliseconds"](),pt=ie?0:z.getTimezoneOffset(),St=we(z),Mt=ge(z),ct={d:pe,dd:ve(pe),ddd:xe.i18n.dayNames[Ce],dddd:xe.i18n.dayNames[Ce+7],m:Ae+1,mm:ve(Ae+1),mmm:xe.i18n.monthNames[Ae],mmmm:xe.i18n.monthNames[Ae+12],yy:String(Oe).slice(2),yyyy:Oe,h:Re%12||12,hh:ve(Re%12||12),H:Re,HH:ve(Re),M:We,MM:ve(We),s:$e,ss:ve($e),l:ve(Je,3),L:ve(Math.round(Je/10)),t:Re<12?"a":"p",tt:Re<12?"am":"pm",T:Re<12?"A":"P",TT:Re<12?"AM":"PM",Z:se?"GMT":ie?"UTC":(String(z).match(ue)||[""]).pop().replace(ee,""),o:(pt>0?"-":"+")+ve(100*Math.floor(Math.abs(pt)/60)+Math.abs(pt)%60,4),S:["th","st","nd","rd"][pe%10>3?0:(pe%100-pe%10!=10)*pe%10],W:St,N:Mt};return oe.replace(fe,function(wt){return wt in ct?ct[wt]:wt.slice(1,wt.length-1)})}}();xe.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"},xe.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 xe}):(Me===void 0?"undefined":(0,me.default)(Me))==="object"?Fe.exports=xe:be.dateFormat=xe})(void 0)},{"babel-runtime/helpers/typeof":32}],155:[function(ye,Fe,Me){(function(Ee){function me(){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(he){var xe=this.useColors;if(he[0]=(xe?"%c":"")+this.namespace+(xe?" %c":" ")+he[0]+(xe?"%c ":" ")+"+"+Me.humanize(this.diff),xe){var fe="color: "+this.color;he.splice(1,0,fe,"color: inherit");var ue=0,ee=0;he[0].replace(/%[a-zA-Z%]/g,function(z){z!=="%%"&&(ue++,z==="%c"&&(ee=ue))}),he.splice(ee,0,fe)}}function ve(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function we(he){try{he==null?Me.storage.removeItem("debug"):Me.storage.debug=he}catch(xe){}}function ge(){var he;try{he=Me.storage.debug}catch(xe){}return!he&&Ee!==void 0&&"env"in Ee&&(he=Ee.env.DEBUG),he}Me=Fe.exports=ye("./debug"),Me.log=ve,Me.formatArgs=be,Me.save=we,Me.load=ge,Me.useColors=me,Me.storage=typeof chrome!="undefined"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch(he){}}(),Me.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],Me.formatters.j=function(he){try{return JSON.stringify(he)}catch(xe){return"[UnexpectedJSONParseError]: "+xe.message}},Me.enable(ge())}).call(this,ye("_process"))},{"./debug":156,_process:173}],156:[function(ye,Fe,Me){function Ee(xe){var fe,ue=0;for(fe in xe)ue=(ue<<5)-ue+xe.charCodeAt(fe),ue|=0;return Me.colors[Math.abs(ue)%Me.colors.length]}function me(xe){function fe(){if(fe.enabled){var ue=fe,ee=+new Date,z=ee-(he||ee);ue.diff=z,ue.prev=he,ue.curr=ee,he=ee;for(var oe=new Array(arguments.length),ie=0;ie<oe.length;ie++)oe[ie]=arguments[ie];oe[0]=Me.coerce(oe[0]),typeof oe[0]!="string"&&oe.unshift("%O");var se=0;oe[0]=oe[0].replace(/%([a-zA-Z%])/g,function(le,Se){if(le==="%%")return le;se++;var pe=Me.formatters[Se];if(typeof pe=="function"){var Ce=oe[se];le=pe.call(ue,Ce),oe.splice(se,1),se--}return le}),Me.formatArgs.call(ue,oe),(fe.log||Me.log||console.log.bind(console)).apply(ue,oe)}}return fe.namespace=xe,fe.enabled=Me.enabled(xe),fe.useColors=Me.useColors(),fe.color=Ee(xe),typeof Me.init=="function"&&Me.init(fe),fe}function be(xe){Me.save(xe),Me.names=[],Me.skips=[];for(var fe=(typeof xe=="string"?xe:"").split(/[\s,]+/),ue=fe.length,ee=0;ee<ue;ee++)fe[ee]&&(xe=fe[ee].replace(/\*/g,".*?"),xe[0]==="-"?Me.skips.push(new RegExp("^"+xe.substr(1)+"$")):Me.names.push(new RegExp("^"+xe+"$")))}function ve(){Me.enable("")}function we(xe){var fe,ue;for(fe=0,ue=Me.skips.length;fe<ue;fe++)if(Me.skips[fe].test(xe))return!1;for(fe=0,ue=Me.names.length;fe<ue;fe++)if(Me.names[fe].test(xe))return!0;return!1}function ge(xe){return xe instanceof Error?xe.stack||xe.message:xe}Me=Fe.exports=me.debug=me.default=me,Me.coerce=ge,Me.disable=ve,Me.enable=be,Me.enabled=we,Me.humanize=ye("ms"),Me.names=[],Me.skips=[],Me.formatters={};var he},{ms:169}],157:[function(ye,Fe,Me){"use strict";function Ee(be){var ve=""+be,we=me.exec(ve);if(!we)return ve;var ge,he="",xe=0,fe=0;for(xe=we.index;xe<ve.length;xe++){switch(ve.charCodeAt(xe)){case 34:ge=""";break;case 38:ge="&";break;case 39:ge="'";break;case 60:ge="<";break;case 62:ge=">";break;default:continue}fe!==xe&&(he+=ve.substring(fe,xe)),fe=xe+1,he+=ge}return fe!==xe?he+ve.substring(fe,xe):he}var me=/["'&<>]/;Fe.exports=Ee},{}],158:[function(ye,Fe,Me){function Ee(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function me(ge){return typeof ge=="function"}function be(ge){return typeof ge=="number"}function ve(ge){return typeof ge=="object"&&ge!==null}function we(ge){return ge===void 0}Fe.exports=Ee,Ee.EventEmitter=Ee,Ee.prototype._events=void 0,Ee.prototype._maxListeners=void 0,Ee.defaultMaxListeners=10,Ee.prototype.setMaxListeners=function(ge){if(!be(ge)||ge<0||isNaN(ge))throw TypeError("n must be a positive number");return this._maxListeners=ge,this},Ee.prototype.emit=function(ge){var he,xe,fe,ue,ee,z;if(this._events||(this._events={}),ge==="error"&&(!this._events.error||ve(this._events.error)&&!this._events.error.length)){if((he=arguments[1])instanceof Error)throw he;var oe=new Error('Uncaught, unspecified "error" event. ('+he+")");throw oe.context=he,oe}if(xe=this._events[ge],we(xe))return!1;if(me(xe))switch(arguments.length){case 1:xe.call(this);break;case 2:xe.call(this,arguments[1]);break;case 3:xe.call(this,arguments[1],arguments[2]);break;default:ue=Array.prototype.slice.call(arguments,1),xe.apply(this,ue)}else if(ve(xe))for(ue=Array.prototype.slice.call(arguments,1),z=xe.slice(),fe=z.length,ee=0;ee<fe;ee++)z[ee].apply(this,ue);return!0},Ee.prototype.addListener=function(ge,he){var xe;if(!me(he))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",ge,me(he.listener)?he.listener:he),this._events[ge]?ve(this._events[ge])?this._events[ge].push(he):this._events[ge]=[this._events[ge],he]:this._events[ge]=he,ve(this._events[ge])&&!this._events[ge].warned&&(xe=we(this._maxListeners)?Ee.defaultMaxListeners:this._maxListeners)&&xe>0&&this._events[ge].length>xe&&(this._events[ge].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[ge].length),typeof console.trace=="function"&&console.trace()),this},Ee.prototype.on=Ee.prototype.addListener,Ee.prototype.once=function(ge,he){function xe(){this.removeListener(ge,xe),fe||(fe=!0,he.apply(this,arguments))}if(!me(he))throw TypeError("listener must be a function");var fe=!1;return xe.listener=he,this.on(ge,xe),this},Ee.prototype.removeListener=function(ge,he){var xe,fe,ue,ee;if(!me(he))throw TypeError("listener must be a function");if(!this._events||!this._events[ge])return this;if(xe=this._events[ge],ue=xe.length,fe=-1,xe===he||me(xe.listener)&&xe.listener===he)delete this._events[ge],this._events.removeListener&&this.emit("removeListener",ge,he);else if(ve(xe)){for(ee=ue;ee-- >0;)if(xe[ee]===he||xe[ee].listener&&xe[ee].listener===he){fe=ee;break}if(fe<0)return this;xe.length===1?(xe.length=0,delete this._events[ge]):xe.splice(fe,1),this._events.removeListener&&this.emit("removeListener",ge,he)}return this},Ee.prototype.removeAllListeners=function(ge){var he,xe;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[ge]&&delete this._events[ge],this;if(arguments.length===0){for(he in this._events)he!=="removeListener"&&this.removeAllListeners(he);return this.removeAllListeners("removeListener"),this._events={},this}if(xe=this._events[ge],me(xe))this.removeListener(ge,xe);else if(xe)for(;xe.length;)this.removeListener(ge,xe[xe.length-1]);return delete this._events[ge],this},Ee.prototype.listeners=function(ge){return this._events&&this._events[ge]?me(this._events[ge])?[this._events[ge]]:this._events[ge].slice():[]},Ee.prototype.listenerCount=function(ge){if(this._events){var he=this._events[ge];if(me(he))return 1;if(he)return he.length}return 0},Ee.listenerCount=function(ge,he){return ge.listenerCount(he)}},{}],159:[function(ye,Fe,Me){var Ee=ye("http"),me=Fe.exports;for(var be in Ee)Ee.hasOwnProperty(be)&&(me[be]=Ee[be]);me.request=function(ve,we){return ve||(ve={}),ve.scheme="https",ve.protocol="https:",Ee.request.call(this,ve,we)}},{http:196}],160:[function(ye,Fe,Me){"use strict";var Ee=ye("util"),me=ye("ms");Fe.exports=function(be){if(typeof be=="number")return be;var ve=me(be);if(ve===void 0){var we=new Error(Ee.format("humanize-ms(%j) result undefined",be));console.warn(we.stack)}return ve}},{ms:169,util:207}],161:[function(ye,Fe,Me){Me.read=function(Ee,me,be,ve,we){var ge,he,xe=8*we-ve-1,fe=(1<<xe)-1,ue=fe>>1,ee=-7,z=be?we-1:0,oe=be?-1:1,ie=Ee[me+z];for(z+=oe,ge=ie&(1<<-ee)-1,ie>>=-ee,ee+=xe;ee>0;ge=256*ge+Ee[me+z],z+=oe,ee-=8);for(he=ge&(1<<-ee)-1,ge>>=-ee,ee+=ve;ee>0;he=256*he+Ee[me+z],z+=oe,ee-=8);if(ge===0)ge=1-ue;else{if(ge===fe)return he?NaN:1/0*(ie?-1:1);he+=Math.pow(2,ve),ge-=ue}return(ie?-1:1)*he*Math.pow(2,ge-ve)},Me.write=function(Ee,me,be,ve,we,ge){var he,xe,fe,ue=8*ge-we-1,ee=(1<<ue)-1,z=ee>>1,oe=we===23?Math.pow(2,-24)-Math.pow(2,-77):0,ie=ve?0:ge-1,se=ve?1:-1,le=me<0||me===0&&1/me<0?1:0;for(me=Math.abs(me),isNaN(me)||me===1/0?(xe=isNaN(me)?1:0,he=ee):(he=Math.floor(Math.log(me)/Math.LN2),me*(fe=Math.pow(2,-he))<1&&(he--,fe*=2),me+=he+z>=1?oe/fe:oe*Math.pow(2,1-z),me*fe>=2&&(he++,fe/=2),he+z>=ee?(xe=0,he=ee):he+z>=1?(xe=(me*fe-1)*Math.pow(2,we),he+=z):(xe=me*Math.pow(2,z-1)*Math.pow(2,we),he=0));we>=8;Ee[be+ie]=255&xe,ie+=se,xe/=256,we-=8);for(he=he<<we|xe,ue+=we;ue>0;Ee[be+ie]=255&he,ie+=se,he/=256,ue-=8);Ee[be+ie-se]|=128*le}},{}],162:[function(ye,Fe,Me){typeof Object.create=="function"?Fe.exports=function(Ee,me){Ee.super_=me,Ee.prototype=Object.create(me.prototype,{constructor:{value:Ee,enumerable:!1,writable:!0,configurable:!0}})}:Fe.exports=function(Ee,me){Ee.super_=me;var be=function(){};be.prototype=me.prototype,Ee.prototype=new be,Ee.prototype.constructor=Ee}},{}],163:[function(ye,Fe,Me){function Ee(be){return!!be.constructor&&typeof be.constructor.isBuffer=="function"&&be.constructor.isBuffer(be)}function me(be){return typeof be.readFloatLE=="function"&&typeof be.slice=="function"&&Ee(be.slice(0,0))}Fe.exports=function(be){return be!=null&&(Ee(be)||me(be)||!!be._isBuffer)}},{}],164:[function(ye,Fe,Me){(function(Ee){function me(we){return ve.call(we).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}function be(we){return typeof we=="function"&&(/^class(\s|\{\}$)/.test(ve.call(we))||/^.*classCallCheck\(/.test(me(we)))}var ve=Function.prototype.toString;Me!==void 0?(Fe!==void 0&&Fe.exports&&(Me=Fe.exports=be),Me.isClass=be):typeof Le=="function"&&Le.amd?Le([],function(){return be}):Ee.isClass=be})(this)},{}],165:[function(ye,Fe,Me){"use strict";function Ee(ge){var he=ge.slice(2);return he=he[0].toLowerCase()+he.slice(1)}var me=ye("core-util-is"),be=ye("isstream"),ve=ye("is-class");Object.keys(me).map(function(ge){Me[Ee(ge)]=me[ge]}),Me.stream=be,Me.readableStream=be.isReadable,Me.writableStream=be.isWritable,Me.duplexStream=be.isDuplex,Me.class=ve,Me.finite=function(ge){return Number.isFinite(ge)},Me.NaN=function(ge){return Number.isNaN(ge)},Me.generator=function(ge){return ge&&typeof ge.next=="function"&&typeof ge.throw=="function"},Me.generatorFunction=function(ge){return ge&&ge.constructor&&ge.constructor.name==="GeneratorFunction"},Me.asyncFunction=function(ge){return ge&&ge.constructor&&ge.constructor.name==="AsyncFunction"},Me.promise=function(ge){return ge&&typeof ge.then=="function"};var we=Math.pow(2,31);Me.int=function(ge){return me.isNumber(ge)&&ge%1==0},Me.int32=function(ge){return Me.int(ge)&&ge<we&&ge>=-we},Me.long=function(ge){return Me.int(ge)&&(ge>=we||ge<-we)},Me.Long=function(ge){return Me.object(ge)&&Me.number(ge.high)&&Me.number(ge.low)},Me.double=function(ge){return me.isNumber(ge)&&!isNaN(ge)&&ge%1!=0},Me.date=function(ge){return ge instanceof Date},Me.regExp=function(ge){return ge instanceof RegExp},Me.regexp=Me.regExp,Me.error=function(ge){return ge instanceof Error},Me.array=function(ge){return Array.isArray(ge)}},{"core-util-is":153,"is-class":164,isstream:167}],166:[function(ye,Fe,Me){var Ee={}.toString;Fe.exports=Array.isArray||function(me){return Ee.call(me)=="[object Array]"}},{}],167:[function(ye,Fe,Me){function Ee(ge){return ge instanceof we.Stream}function me(ge){return Ee(ge)&&typeof ge._read=="function"&&typeof ge._readableState=="object"}function be(ge){return Ee(ge)&&typeof ge._write=="function"&&typeof ge._writableState=="object"}function ve(ge){return me(ge)&&be(ge)}var we=ye("stream");Fe.exports=Ee,Fe.exports.isReadable=me,Fe.exports.isWritable=be,Fe.exports.isDuplex=ve},{stream:195}],168:[function(ye,Fe,Me){"use strict";function Ee(be,ve,we){if(!be)throw new TypeError("argument dest is required");if(!ve)throw new TypeError("argument src is required");return we===void 0&&(we=!0),Object.getOwnPropertyNames(ve).forEach(function(ge){if(we||!me.call(be,ge)){var he=Object.getOwnPropertyDescriptor(ve,ge);Object.defineProperty(be,ge,he)}}),be}Fe.exports=Ee;var me=Object.prototype.hasOwnProperty},{}],169:[function(ye,Fe,Me){function Ee(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*xe;case"hours":case"hour":case"hrs":case"hr":case"h":return z*he;case"minutes":case"minute":case"mins":case"min":case"m":return z*ge;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 me(ue){return ue>=xe?Math.round(ue/xe)+"d":ue>=he?Math.round(ue/he)+"h":ue>=ge?Math.round(ue/ge)+"m":ue>=we?Math.round(ue/we)+"s":ue+"ms"}function be(ue){return ve(ue,xe,"day")||ve(ue,he,"hour")||ve(ue,ge,"minute")||ve(ue,we,"second")||ue+" ms"}function ve(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,ge=60*we,he=60*ge,xe=24*he,fe=365.25*xe;Fe.exports=function(ue,ee){ee=ee||{};var z=typeof ue;if(z==="string"&&ue.length>0)return Ee(ue);if(z==="number"&&isNaN(ue)===!1)return ee.long?be(ue):me(ue);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(ue))}},{}],170:[function(ye,Fe,Me){(function(Ee){function me(ge,he){for(var xe=0,fe=ge.length-1;fe>=0;fe--){var ue=ge[fe];ue==="."?ge.splice(fe,1):ue===".."?(ge.splice(fe,1),xe++):xe&&(ge.splice(fe,1),xe--)}if(he)for(;xe--;xe)ge.unshift("..");return ge}function be(ge){typeof ge!="string"&&(ge+="");var he,xe=0,fe=-1,ue=!0;for(he=ge.length-1;he>=0;--he)if(ge.charCodeAt(he)===47){if(!ue){xe=he+1;break}}else fe===-1&&(ue=!1,fe=he+1);return fe===-1?"":ge.slice(xe,fe)}function ve(ge,he){if(ge.filter)return ge.filter(he);for(var xe=[],fe=0;fe<ge.length;fe++)he(ge[fe],fe,ge)&&xe.push(ge[fe]);return xe}Me.resolve=function(){for(var ge="",he=!1,xe=arguments.length-1;xe>=-1&&!he;xe--){var fe=xe>=0?arguments[xe]:Ee.cwd();if(typeof fe!="string")throw new TypeError("Arguments to path.resolve must be strings");fe&&(ge=fe+"/"+ge,he=fe.charAt(0)==="/")}return ge=me(ve(ge.split("/"),function(ue){return!!ue}),!he).join("/"),(he?"/":"")+ge||"."},Me.normalize=function(ge){var he=Me.isAbsolute(ge),xe=we(ge,-1)==="/";return ge=me(ve(ge.split("/"),function(fe){return!!fe}),!he).join("/"),ge||he||(ge="."),ge&&xe&&(ge+="/"),(he?"/":"")+ge},Me.isAbsolute=function(ge){return ge.charAt(0)==="/"},Me.join=function(){var ge=Array.prototype.slice.call(arguments,0);return Me.normalize(ve(ge,function(he,xe){if(typeof he!="string")throw new TypeError("Arguments to path.join must be strings");return he}).join("/"))},Me.relative=function(ge,he){function xe(se){for(var le=0;le<se.length&&se[le]==="";le++);for(var Se=se.length-1;Se>=0&&se[Se]==="";Se--);return le>Se?[]:se.slice(le,Se-le+1)}ge=Me.resolve(ge).substr(1),he=Me.resolve(he).substr(1);for(var fe=xe(ge.split("/")),ue=xe(he.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 ie=[],oe=z;oe<fe.length;oe++)ie.push("..");return ie=ie.concat(ue.slice(z)),ie.join("/")},Me.sep="/",Me.delimiter=":",Me.dirname=function(ge){if(typeof ge!="string"&&(ge+=""),ge.length===0)return".";for(var he=ge.charCodeAt(0),xe=he===47,fe=-1,ue=!0,ee=ge.length-1;ee>=1;--ee)if((he=ge.charCodeAt(ee))===47){if(!ue){fe=ee;break}}else ue=!1;return fe===-1?xe?"/":".":xe&&fe===1?"/":ge.slice(0,fe)},Me.basename=function(ge,he){var xe=be(ge);return he&&xe.substr(-1*he.length)===he&&(xe=xe.substr(0,xe.length-he.length)),xe},Me.extname=function(ge){typeof ge!="string"&&(ge+="");for(var he=-1,xe=0,fe=-1,ue=!0,ee=0,z=ge.length-1;z>=0;--z){var oe=ge.charCodeAt(z);if(oe!==47)fe===-1&&(ue=!1,fe=z+1),oe===46?he===-1?he=z:ee!==1&&(ee=1):he!==-1&&(ee=-1);else if(!ue){xe=z+1;break}}return he===-1||fe===-1||ee===0||ee===1&&he===fe-1&&he===xe+1?"":ge.slice(he,fe)};var we=function(ge,he,xe){return ge.substr(he,xe)}}).call(this,ye("_process"))},{_process:173}],171:[function(ye,Fe,Me){(function(Ee){(function(){"use strict";function me($e){return $e=String($e),$e.charAt(0).toUpperCase()+$e.slice(1)}function be($e,Je,pt){var St={"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 Je&&pt&&/^Win/i.test($e)&&!/^Windows Phone /i.test($e)&&(St=St[/[\d.]+$/.exec($e)])&&($e="Windows "+St),$e=String($e),Je&&pt&&($e=$e.replace(RegExp(Je,"i"),pt)),$e=we($e.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 ve($e,Je){var pt=-1,St=$e?$e.length:0;if(typeof St=="number"&&St>-1&&St<=pe)for(;++pt<St;)Je($e[pt],pt,$e);else ge($e,Je)}function we($e){return $e=ee($e),/^(?:webOS|i(?:OS|P))/.test($e)?$e:me($e)}function ge($e,Je){for(var pt in $e)Oe.call($e,pt)&&Je($e[pt],pt,$e)}function he($e){return $e==null?me($e):Re.call($e).slice(8,-1)}function xe($e,Je){var pt=$e!=null?typeof $e[Je]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(pt)||pt=="object"&&!$e[Je])}function fe($e){return String($e).replace(/([ -])(?!$)/g,"$1?")}function ue($e,Je){var pt=null;return ve($e,function(St,Mt){pt=Je(pt,St,Mt,$e)}),pt}function ee($e){return String($e).replace(/^ +| +$/g,"")}function z($e){function Je(rt){return ue(rt,function(Ze,Xe){var mt=Xe.pattern||fe(Xe);return!Ze&&(Ze=RegExp("\\b"+mt+" *\\d+[.\\w_]*","i").exec($e)||RegExp("\\b"+mt+" *\\w+-[\\w]*","i").exec($e)||RegExp("\\b"+mt+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec($e))&&((Ze=String(Xe.label&&!RegExp(mt,"i").test(Xe.label)?Xe.label:Ze).split("/"))[1]&&!/[\d.]+/.test(Ze[0])&&(Ze[0]+=" "+Ze[1]),Xe=Xe.label||Xe,Ze=we(Ze[0].replace(RegExp(mt,"i"),Xe).replace(RegExp("; *(?:"+Xe+"[_-])?","i")," ").replace(RegExp("("+Xe+")[-_.]?(\\w)","i"),"$1 $2"))),Ze})}function pt(){return this.description||""}var St=ie,Mt=$e&&typeof $e=="object"&&he($e)!="String";Mt&&(St=$e,$e=null);var ct=St.navigator||{},wt=ct.userAgent||"";$e||($e=wt);var ft,$t,st=Mt?!!ct.likeChrome:/\bChrome\b/.test($e)&&!/internal|\n/i.test(Re.toString()),et=Mt?"Object":"ScriptBridgingProxyObject",lt=Mt?"Object":"Environment",dt=Mt&&St.java?"JavaPackage":he(St.java),bt=Mt?"Object":"RuntimeObject",yt=/\bJava/.test(dt)&&St.java,Vt=yt&&he(St.environment)==lt,Kt=yt?"a":"\u4F2A",gn=yt?"b":"\u5C3E",Gt=St.document||{},Dt=St.operamini||St.opera,on=Ce.test(on=Mt&&Dt?Dt["[[Class]]"]:he(Dt))?on:Dt=null,Jt=$e,jt=[],ut=null,ze=$e==wt,je=ze&&Dt&&typeof Dt.version=="function"&&Dt.version(),it=function(rt){return ue(rt,function(Ze,Xe){return Ze||RegExp("\\b"+(Xe.pattern||fe(Xe))+"\\b","i").exec($e)&&(Xe.label||Xe)})}([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),ht=function(rt){return ue(rt,function(Ze,Xe){return Ze||RegExp("\\b"+(Xe.pattern||fe(Xe))+"\\b","i").exec($e)&&(Xe.label||Xe)})}(["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"]),nt=Je([{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"]),Ke=function(rt){return ue(rt,function(Ze,Xe,mt){return Ze||(Xe[nt]||Xe[/^[a-z]+(?: +[a-z]+\b)*/i.exec(nt)]||RegExp("\\b"+fe(mt)+"(?:\\b|\\w*\\d)","i").exec($e))&&mt})}({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}}),Be=function(rt){return ue(rt,function(Ze,Xe){var mt=Xe.pattern||fe(Xe);return!Ze&&(Ze=RegExp("\\b"+mt+"(?:/[\\d.]+|[ \\w.]*)","i").exec($e))&&(Ze=be(Ze,mt,Xe.label||Xe)),Ze})}(["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(it&&(it=[it]),Ke&&!nt&&(nt=Je([Ke])),(ft=/\bGoogle TV\b/.exec(nt))&&(nt=ft[0]),/\bSimulator\b/i.test($e)&&(nt=(nt?nt+" ":"")+"Simulator"),ht=="Opera Mini"&&/\bOPiOS\b/.test($e)&&jt.push("running in Turbo/Uncompressed mode"),ht=="IE"&&/\blike iPhone OS\b/.test($e)?(ft=z($e.replace(/like iPhone OS/,"")),Ke=ft.manufacturer,nt=ft.product):/^iP/.test(nt)?(ht||(ht="Safari"),Be="iOS"+((ft=/ OS ([\d_]+)/i.exec($e))?" "+ft[1].replace(/_/g,"."):"")):ht!="Konqueror"||/buntu/i.test(Be)?Ke&&Ke!="Google"&&(/Chrome/.test(ht)&&!/\bMobile Safari\b/i.test($e)||/\bVita\b/.test(nt))||/\bAndroid\b/.test(Be)&&/^Chrome/.test(ht)&&/\bVersion\//i.test($e)?(ht="Android Browser",Be=/\bAndroid\b/.test(Be)?Be:"Android"):ht=="Silk"?(/\bMobi/i.test($e)||(Be="Android",jt.unshift("desktop mode")),/Accelerated *= *true/i.test($e)&&jt.unshift("accelerated")):ht=="PaleMoon"&&(ft=/\bFirefox\/([\d.]+)\b/.exec($e))?jt.push("identifying as Firefox "+ft[1]):ht=="Firefox"&&(ft=/\b(Mobile|Tablet|TV)\b/i.exec($e))?(Be||(Be="Firefox OS"),nt||(nt=ft[1])):!ht||(ft=!/\bMinefield\b/i.test($e)&&/\b(?:Firefox|Safari)\b/.exec(ht))?(ht&&!nt&&/[\/,]|^[^(]+?\)/.test($e.slice($e.indexOf(ft+"/")+8))&&(ht=null),(ft=nt||Ke||Be)&&(nt||Ke||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Be))&&(ht=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Be)?Be:ft)+" Browser")):ht=="Electron"&&(ft=(/\bChrome\/([\d.]+)\b/.exec($e)||0)[1])&&jt.push("Chromium "+ft):Be="Kubuntu",je||(je=function(rt){return ue(rt,function(Ze,Xe){return Ze||(RegExp(Xe+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec($e)||0)[1]||null})}(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",fe(ht),"(?:Firefox|Minefield|NetFront)"])),(ft=it=="iCab"&&parseFloat(je)>3&&"WebKit"||/\bOpera\b/.test(ht)&&(/\bOPR\b/.test($e)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test($e)&&!/^(?:Trident|EdgeHTML)$/.test(it)&&"WebKit"||!it&&/\bMSIE\b/i.test($e)&&(Be=="Mac OS"?"Tasman":"Trident")||it=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(ht)&&"NetFront")&&(it=[ft]),ht=="IE"&&(ft=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec($e)||0)[1])?(ht+=" Mobile",Be="Windows Phone "+(/\+$/.test(ft)?ft:ft+".x"),jt.unshift("desktop mode")):/\bWPDesktop\b/i.test($e)?(ht="IE Mobile",Be="Windows Phone 8.x",jt.unshift("desktop mode"),je||(je=(/\brv:([\d.]+)/.exec($e)||0)[1])):ht!="IE"&&it=="Trident"&&(ft=/\brv:([\d.]+)/.exec($e))&&(ht&&jt.push("identifying as "+ht+(je?" "+je:"")),ht="IE",je=ft[1]),ze){if(xe(St,"global"))if(yt&&(ft=yt.lang.System,Jt=ft.getProperty("os.arch"),Be=Be||ft.getProperty("os.name")+" "+ft.getProperty("os.version")),Vt){try{je=St.require("ringo/engine").version.join("."),ht="RingoJS"}catch(rt){(ft=St.system)&&ft.global.system==St.system&&(ht="Narwhal",Be||(Be=ft[0].os||null))}ht||(ht="Rhino")}else typeof St.process=="object"&&!St.process.browser&&(ft=St.process)&&(typeof ft.versions=="object"&&(typeof ft.versions.electron=="string"?(jt.push("Node "+ft.versions.node),ht="Electron",je=ft.versions.electron):typeof ft.versions.nw=="string"&&(jt.push("Chromium "+je,"Node "+ft.versions.node),ht="NW.js",je=ft.versions.nw)),ht||(ht="Node.js",Jt=ft.arch,Be=ft.platform,je=/[\d.]+/.exec(ft.version),je=je?je[0]:null));else he(ft=St.runtime)==et?(ht="Adobe AIR",Be=ft.flash.system.Capabilities.os):he(ft=St.phantom)==bt?(ht="PhantomJS",je=(ft=ft.version||null)&&ft.major+"."+ft.minor+"."+ft.patch):typeof Gt.documentMode=="number"&&(ft=/\bTrident\/(\d+)/i.exec($e))?(je=[je,Gt.documentMode],(ft=+ft[1]+4)!=je[1]&&(jt.push("IE "+je[1]+" mode"),it&&(it[1]=""),je[1]=ft),je=ht=="IE"?String(je[1].toFixed(1)):je[0]):typeof Gt.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(ht)&&(jt.push("masking as "+ht+" "+je),ht="IE",je="11.0",it=["Trident"],Be="Windows");Be=Be&&we(Be)}if(je&&(ft=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(je)||/(?:alpha|beta)(?: ?\d)?/i.exec($e+";"+(ze&&ct.appMinorVersion))||/\bMinefield\b/i.test($e)&&"a")&&(ut=/b/i.test(ft)?"beta":"alpha",je=je.replace(RegExp(ft+"\\+?$"),"")+(ut=="beta"?gn:Kt)+(/\d+\+?/.exec(ft)||"")),ht=="Fennec"||ht=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(Be))ht="Firefox Mobile";else if(ht=="Maxthon"&&je)je=je.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(nt))nt=="Xbox 360"&&(Be=null),nt=="Xbox 360"&&/\bIEMobile\b/.test($e)&&jt.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(ht)&&(!ht||nt||/Browser|Mobi/.test(ht))||Be!="Windows CE"&&!/Mobi/i.test($e))if(ht=="IE"&&ze)try{St.external===null&&jt.unshift("platform preview")}catch(rt){jt.unshift("embedded")}else(/\bBlackBerry\b/.test(nt)||/\bBB10\b/.test($e))&&(ft=(RegExp(nt.replace(/ +/g," *")+"/([.\\d]+)","i").exec($e)||0)[1]||je)?(ft=[ft,/BB10/.test($e)],Be=(ft[1]?(nt=null,Ke="BlackBerry"):"Device Software")+" "+ft[0],je=null):this!=ge&&nt!="Wii"&&(ze&&Dt||/Opera/.test(ht)&&/\b(?:MSIE|Firefox)\b/i.test($e)||ht=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Be)||ht=="IE"&&(Be&&!/^Win/.test(Be)&&je>5.5||/\bWindows XP\b/.test(Be)&&je>8||je==8&&!/\bTrident\b/.test($e)))&&!Ce.test(ft=z.call(ge,$e.replace(Ce,"")+";"))&&ft.name&&(ft="ing as "+ft.name+((ft=ft.version)?" "+ft:""),Ce.test(ht)?(/\bIE\b/.test(ft)&&Be=="Mac OS"&&(Be=null),ft="identify"+ft):(ft="mask"+ft,ht=on?we(on.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(ft)&&(Be=null),ze||(je=null)),it=["Presto"],jt.push(ft));else ht+=" Mobile";(ft=(/\bAppleWebKit\/([\d.]+\+?)/i.exec($e)||0)[1])&&(ft=[parseFloat(ft.replace(/\.(\d)$/,".0$1")),ft],ht=="Safari"&&ft[1].slice(-1)=="+"?(ht="WebKit Nightly",ut="alpha",je=ft[1].slice(0,-1)):je!=ft[1]&&je!=(ft[2]=(/\bSafari\/([\d.]+\+?)/i.exec($e)||0)[1])||(je=null),ft[1]=(/\bChrome\/([\d.]+)/i.exec($e)||0)[1],ft[0]==537.36&&ft[2]==537.36&&parseFloat(ft[1])>=28&&it=="WebKit"&&(it=["Blink"]),ze&&(st||ft[1])?(it&&(it[1]="like Chrome"),ft=ft[1]||(ft=ft[0],ft<530?1:ft<532?2:ft<532.05?3:ft<533?4:ft<534.03?5:ft<534.07?6:ft<534.1?7:ft<534.13?8:ft<534.16?9:ft<534.24?10:ft<534.3?11:ft<535.01?12:ft<535.02?"13+":ft<535.07?15:ft<535.11?16:ft<535.19?17:ft<536.05?18:ft<536.1?19:ft<537.01?20:ft<537.11?"21+":ft<537.13?23:ft<537.18?24:ft<537.24?25:ft<537.36?26:it!="Blink"?"27":"28")):(it&&(it[1]="like Safari"),ft=ft[0],ft=ft<400?1:ft<500?2:ft<526?3:ft<533?4:ft<534?"4+":ft<535?5:ft<537?6:ft<538?7:ft<601?8:"8"),it&&(it[1]+=" "+(ft+=typeof ft=="number"?".x":/[.+]/.test(ft)?"":"+")),ht=="Safari"&&(!je||parseInt(je)>45)&&(je=ft)),ht=="Opera"&&(ft=/\bzbov|zvav$/.exec(Be))?(ht+=" ",jt.unshift("desktop mode"),ft=="zvav"?(ht+="Mini",je=null):ht+="Mobile",Be=Be.replace(RegExp(" *"+ft+"$"),"")):ht=="Safari"&&/\bChrome\b/.exec(it&&it[1])&&(jt.unshift("desktop mode"),ht="Chrome Mobile",je=null,/\bOS X\b/.test(Be)?(Ke="Apple",Be="iOS 4.3+"):Be=null),je&&je.indexOf(ft=/[\d.]+$/.exec(Be))==0&&$e.indexOf("/"+ft+"-")>-1&&(Be=ee(Be.replace(ft,""))),it&&!/\b(?:Avant|Nook)\b/.test(ht)&&(/Browser|Lunascape|Maxthon/.test(ht)||ht!="Safari"&&/^iOS/.test(Be)&&/\bSafari\b/.test(it[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(ht)&&it[1])&&(ft=it[it.length-1])&&jt.push(ft),jt.length&&(jt=["("+jt.join("; ")+")"]),Ke&&nt&&nt.indexOf(Ke)<0&&jt.push("on "+Ke),nt&&jt.push((/^on /.test(jt[jt.length-1])?"":"on ")+nt),Be&&(ft=/ ([\d.+]+)$/.exec(Be),$t=ft&&Be.charAt(Be.length-ft[0].length-1)=="/",Be={architecture:32,family:ft&&!$t?Be.replace(ft[0],""):Be,version:ft?ft[1]:null,toString:function(){var rt=this.version;return this.family+(rt&&!$t?" "+rt:"")+(this.architecture==64?" 64-bit":"")}}),(ft=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Jt))&&!/\bi686\b/i.test(Jt)?(Be&&(Be.architecture=64,Be.family=Be.family.replace(RegExp(" *"+ft),"")),ht&&(/\bWOW64\b/i.test($e)||ze&&/\w(?:86|32)$/.test(ct.cpuClass||ct.platform)&&!/\bWin64; x64\b/i.test($e))&&jt.unshift("32-bit")):Be&&/^OS X/.test(Be.family)&&ht=="Chrome"&&parseFloat(je)>=39&&(Be.architecture=64),$e||($e=null);var Ue={};return Ue.description=$e,Ue.layout=it&&it[0],Ue.manufacturer=Ke,Ue.name=ht,Ue.prerelease=ut,Ue.product=nt,Ue.ua=$e,Ue.version=ht&&je,Ue.os=Be||{architecture:null,family:null,version:null,toString:function(){return"null"}},Ue.parse=z,Ue.toString=pt,Ue.version&&jt.unshift(je),Ue.name&&jt.unshift(ht),Be&&ht&&(Be!=String(Be).split(" ")[0]||Be!=ht.split(" ")[0]&&!nt)&&jt.push(nt?"("+Be+")":"on "+Be),jt.length&&(Ue.description=jt.join(" ")),Ue}var oe={function:!0,object:!0},ie=oe[typeof window]&&window||this,se=oe[typeof Me]&&Me,le=oe[typeof Fe]&&Fe&&!Fe.nodeType&&Fe,Se=se&&le&&typeof Ee=="object"&&Ee;!Se||Se.global!==Se&&Se.window!==Se&&Se.self!==Se||(ie=Se);var pe=Math.pow(2,53)-1,Ce=/\bOpera/,Ae=Object.prototype,Oe=Ae.hasOwnProperty,Re=Ae.toString,We=z();typeof Le=="function"&&typeof Le.amd=="object"&&Le.amd?(ie.platform=We,Le(function(){return We})):se&&le?ge(We,function($e,Je){se[Je]=$e}):ie.platform=We}).call(this)}).call(this,typeof De.g!="undefined"?De.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],172:[function(ye,Fe,Me){(function(Ee){"use strict";function me(be,ve,we,ge){if(typeof be!="function")throw new TypeError('"callback" argument must be a function');var he,xe,fe=arguments.length;switch(fe){case 0:case 1:return Ee.nextTick(be);case 2:return Ee.nextTick(function(){be.call(null,ve)});case 3:return Ee.nextTick(function(){be.call(null,ve,we)});case 4:return Ee.nextTick(function(){be.call(null,ve,we,ge)});default:for(he=new Array(fe-1),xe=0;xe<he.length;)he[xe++]=arguments[xe];return Ee.nextTick(function(){be.apply(null,he)})}}!Ee.version||Ee.version.indexOf("v0.")===0||Ee.version.indexOf("v1.")===0&&Ee.version.indexOf("v1.8.")!==0?Fe.exports={nextTick:me}:Fe.exports=Ee}).call(this,ye("_process"))},{_process:173}],173:[function(ye,Fe,Me){function Ee(){throw new Error("setTimeout has not been defined")}function me(){throw new Error("clearTimeout has not been defined")}function be(le){if(fe===setTimeout)return setTimeout(le,0);if((fe===Ee||!fe)&&setTimeout)return fe=setTimeout,setTimeout(le,0);try{return fe(le,0)}catch(Se){try{return fe.call(null,le,0)}catch(pe){return fe.call(this,le,0)}}}function ve(le){if(ue===clearTimeout)return clearTimeout(le);if((ue===me||!ue)&&clearTimeout)return ue=clearTimeout,clearTimeout(le);try{return ue(le)}catch(Se){try{return ue.call(null,le)}catch(pe){return ue.call(this,le)}}}function we(){ie&&z&&(ie=!1,z.length?oe=z.concat(oe):se=-1,oe.length&&ge())}function ge(){if(!ie){var le=be(we);ie=!0;for(var Se=oe.length;Se;){for(z=oe,oe=[];++se<Se;)z&&z[se].run();se=-1,Se=oe.length}z=null,ie=!1,ve(le)}}function he(le,Se){this.fun=le,this.array=Se}function xe(){}var fe,ue,ee=Fe.exports={};(function(){try{fe=typeof setTimeout=="function"?setTimeout:Ee}catch(le){fe=Ee}try{ue=typeof clearTimeout=="function"?clearTimeout:me}catch(le){ue=me}})();var z,oe=[],ie=!1,se=-1;ee.nextTick=function(le){var Se=new Array(arguments.length-1);if(arguments.length>1)for(var pe=1;pe<arguments.length;pe++)Se[pe-1]=arguments[pe];oe.push(new he(le,Se)),oe.length!==1||ie||be(ge)},he.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=xe,ee.addListener=xe,ee.once=xe,ee.off=xe,ee.removeListener=xe,ee.removeAllListeners=xe,ee.emit=xe,ee.prependListener=xe,ee.prependOnceListener=xe,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(ye,Fe,Me){(function(Ee){(function(me){function be(dt){throw new RangeError($t[dt])}function ve(dt,bt){for(var yt=dt.length,Vt=[];yt--;)Vt[yt]=bt(dt[yt]);return Vt}function we(dt,bt){var yt=dt.split("@"),Vt="";return yt.length>1&&(Vt=yt[0]+"@",dt=yt[1]),dt=dt.replace(ft,"."),Vt+ve(dt.split("."),bt).join(".")}function ge(dt){for(var bt,yt,Vt=[],Kt=0,gn=dt.length;Kt<gn;)bt=dt.charCodeAt(Kt++),bt>=55296&&bt<=56319&&Kt<gn?(yt=dt.charCodeAt(Kt++),(64512&yt)==56320?Vt.push(((1023&bt)<<10)+(1023&yt)+65536):(Vt.push(bt),Kt--)):Vt.push(bt);return Vt}function he(dt){return ve(dt,function(bt){var yt="";return bt>65535&&(bt-=65536,yt+=lt(bt>>>10&1023|55296),bt=56320|1023&bt),yt+=lt(bt)}).join("")}function xe(dt){return dt-48<10?dt-22:dt-65<26?dt-65:dt-97<26?dt-97:Oe}function fe(dt,bt){return dt+22+75*(dt<26)-((bt!=0)<<5)}function ue(dt,bt,yt){var Vt=0;for(dt=yt?et(dt/Je):dt>>1,dt+=et(dt/bt);dt>st*We>>1;Vt+=Oe)dt=et(dt/st);return et(Vt+(st+1)*dt/(dt+$e))}function ee(dt){var bt,yt,Vt,Kt,gn,Gt,Dt,on,Jt,jt,ut=[],ze=dt.length,je=0,it=St,ht=pt;for(yt=dt.lastIndexOf(Mt),yt<0&&(yt=0),Vt=0;Vt<yt;++Vt)dt.charCodeAt(Vt)>=128&&be("not-basic"),ut.push(dt.charCodeAt(Vt));for(Kt=yt>0?yt+1:0;Kt<ze;){for(gn=je,Gt=1,Dt=Oe;Kt>=ze&&be("invalid-input"),on=xe(dt.charCodeAt(Kt++)),(on>=Oe||on>et((Ae-je)/Gt))&&be("overflow"),je+=on*Gt,Jt=Dt<=ht?Re:Dt>=ht+We?We:Dt-ht,!(on<Jt);Dt+=Oe)jt=Oe-Jt,Gt>et(Ae/jt)&&be("overflow"),Gt*=jt;bt=ut.length+1,ht=ue(je-gn,bt,gn==0),et(je/bt)>Ae-it&&be("overflow"),it+=et(je/bt),je%=bt,ut.splice(je++,0,it)}return he(ut)}function z(dt){var bt,yt,Vt,Kt,gn,Gt,Dt,on,Jt,jt,ut,ze,je,it,ht,nt=[];for(dt=ge(dt),ze=dt.length,bt=St,yt=0,gn=pt,Gt=0;Gt<ze;++Gt)(ut=dt[Gt])<128&&nt.push(lt(ut));for(Vt=Kt=nt.length,Kt&&nt.push(Mt);Vt<ze;){for(Dt=Ae,Gt=0;Gt<ze;++Gt)(ut=dt[Gt])>=bt&&ut<Dt&&(Dt=ut);for(je=Vt+1,Dt-bt>et((Ae-yt)/je)&&be("overflow"),yt+=(Dt-bt)*je,bt=Dt,Gt=0;Gt<ze;++Gt)if(ut=dt[Gt],ut<bt&&++yt>Ae&&be("overflow"),ut==bt){for(on=yt,Jt=Oe;jt=Jt<=gn?Re:Jt>=gn+We?We:Jt-gn,!(on<jt);Jt+=Oe)ht=on-jt,it=Oe-jt,nt.push(lt(fe(jt+ht%it,0))),on=et(ht/it);nt.push(lt(fe(on,0))),gn=ue(yt,je,Vt==Kt),yt=0,++Vt}++yt,++bt}return nt.join("")}function oe(dt){return we(dt,function(bt){return ct.test(bt)?ee(bt.slice(4).toLowerCase()):bt})}function ie(dt){return we(dt,function(bt){return wt.test(bt)?"xn--"+z(bt):bt})}var se=typeof Me=="object"&&Me&&!Me.nodeType&&Me,le=typeof Fe=="object"&&Fe&&!Fe.nodeType&&Fe,Se=typeof Ee=="object"&&Ee;Se.global!==Se&&Se.window!==Se&&Se.self!==Se||(me=Se);var pe,Ce,Ae=2147483647,Oe=36,Re=1,We=26,$e=38,Je=700,pt=72,St=128,Mt="-",ct=/^xn--/,wt=/[^\x20-\x7E]/,ft=/[\x2E\u3002\uFF0E\uFF61]/g,$t={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},st=Oe-Re,et=Math.floor,lt=String.fromCharCode;if(pe={version:"1.4.1",ucs2:{decode:ge,encode:he},decode:ee,encode:z,toASCII:ie,toUnicode:oe},typeof Le=="function"&&typeof Le.amd=="object"&&Le.amd)Le("punycode",function(){return pe});else if(se&&le)if(Fe.exports==se)le.exports=pe;else for(Ce in pe)pe.hasOwnProperty(Ce)&&(se[Ce]=pe[Ce]);else me.punycode=pe})(this)}).call(this,typeof De.g!="undefined"?De.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],175:[function(ye,Fe,Me){"use strict";function Ee(be,ve){return Object.prototype.hasOwnProperty.call(be,ve)}Fe.exports=function(be,ve,we,ge){ve=ve||"&",we=we||"=";var he={};if(typeof be!="string"||be.length===0)return he;var xe=/\+/g;be=be.split(ve);var fe=1e3;ge&&typeof ge.maxKeys=="number"&&(fe=ge.maxKeys);var ue=be.length;fe>0&&ue>fe&&(ue=fe);for(var ee=0;ee<ue;++ee){var z,oe,ie,se,le=be[ee].replace(xe,"%20"),Se=le.indexOf(we);Se>=0?(z=le.substr(0,Se),oe=le.substr(Se+1)):(z=le,oe=""),ie=decodeURIComponent(z),se=decodeURIComponent(oe),Ee(he,ie)?me(he[ie])?he[ie].push(se):he[ie]=[he[ie],se]:he[ie]=se}return he};var me=Array.isArray||function(be){return Object.prototype.toString.call(be)==="[object Array]"}},{}],176:[function(ye,Fe,Me){"use strict";function Ee(we,ge){if(we.map)return we.map(ge);for(var he=[],xe=0;xe<we.length;xe++)he.push(ge(we[xe],xe));return he}var me=function(we){switch(typeof we){case"string":return we;case"boolean":return we?"true":"false";case"number":return isFinite(we)?we:"";default:return""}};Fe.exports=function(we,ge,he,xe){return ge=ge||"&",he=he||"=",we===null&&(we=void 0),typeof we=="object"?Ee(ve(we),function(fe){var ue=encodeURIComponent(me(fe))+he;return be(we[fe])?Ee(we[fe],function(ee){return ue+encodeURIComponent(me(ee))}).join(ge):ue+encodeURIComponent(me(we[fe]))}).join(ge):xe?encodeURIComponent(me(xe))+he+encodeURIComponent(me(we)):""};var be=Array.isArray||function(we){return Object.prototype.toString.call(we)==="[object Array]"},ve=Object.keys||function(we){var ge=[];for(var he in we)Object.prototype.hasOwnProperty.call(we,he)&&ge.push(he);return ge}},{}],177:[function(ye,Fe,Me){"use strict";Me.decode=Me.parse=ye("./decode"),Me.encode=Me.stringify=ye("./encode")},{"./decode":175,"./encode":176}],178:[function(ye,Fe,Me){Fe.exports=ye("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":179}],179:[function(ye,Fe,Me){"use strict";function Ee(ie){if(!(this instanceof Ee))return new Ee(ie);fe.call(this,ie),ue.call(this,ie),ie&&ie.readable===!1&&(this.readable=!1),ie&&ie.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,ie&&ie.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",me)}function me(){this.allowHalfOpen||this._writableState.ended||ge.nextTick(be,this)}function be(ie){ie.end()}var ve=ye("babel-runtime/core-js/object/keys"),we=function(ie){return ie&&ie.__esModule?ie:{default:ie}}(ve),ge=ye("process-nextick-args"),he=we.default||function(ie){var se=[];for(var le in ie)se.push(le);return se};Fe.exports=Ee;var xe=ye("core-util-is");xe.inherits=ye("inherits");var fe=ye("./_stream_readable"),ue=ye("./_stream_writable");xe.inherits(Ee,fe);for(var ee=he(ue.prototype),z=0;z<ee.length;z++){var oe=ee[z];Ee.prototype[oe]||(Ee.prototype[oe]=ue.prototype[oe])}Object.defineProperty(Ee.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(Ee.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(ie){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=ie,this._writableState.destroyed=ie)}}),Ee.prototype._destroy=function(ie,se){this.push(null),this.end(),ge.nextTick(se,ie)}},{"./_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(ye,Fe,Me){"use strict";function Ee(ve){if(!(this instanceof Ee))return new Ee(ve);me.call(this,ve)}Fe.exports=Ee;var me=ye("./_stream_transform"),be=ye("core-util-is");be.inherits=ye("inherits"),be.inherits(Ee,me),Ee.prototype._transform=function(ve,we,ge){ge(null,ve)}},{"./_stream_transform":182,"core-util-is":153,inherits:162}],181:[function(ye,Fe,Me){(function(Ee,me){"use strict";function be(ze){return yt.from(ze)}function ve(ze){return yt.isBuffer(ze)||ze instanceof Vt}function we(ze,je,it){if(typeof ze.prependListener=="function")return ze.prependListener(je,it);ze._events&&ze._events[je]?lt(ze._events[je])?ze._events[je].unshift(it):ze._events[je]=[it,ze._events[je]]:ze.on(je,it)}function ge(ze,je){et=et||ye("./_stream_duplex"),ze=ze||{};var it=je instanceof et;this.objectMode=!!ze.objectMode,it&&(this.objectMode=this.objectMode||!!ze.readableObjectMode);var ht=ze.highWaterMark,nt=ze.readableHighWaterMark,Ke=this.objectMode?16:16384;this.highWaterMark=ht||ht===0?ht:it&&(nt||nt===0)?nt:Ke,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new on,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=ze.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ze.encoding&&(Dt||(Dt=ye("string_decoder/").StringDecoder),this.decoder=new Dt(ze.encoding),this.encoding=ze.encoding)}function he(ze){if(et=et||ye("./_stream_duplex"),!(this instanceof he))return new he(ze);this._readableState=new ge(ze,this),this.readable=!0,ze&&(typeof ze.read=="function"&&(this._read=ze.read),typeof ze.destroy=="function"&&(this._destroy=ze.destroy)),bt.call(this)}function xe(ze,je,it,ht,nt){var Ke=ze._readableState;if(je===null)Ke.reading=!1,ie(ze,Ke);else{var Be;nt||(Be=ue(Ke,je)),Be?ze.emit("error",Be):Ke.objectMode||je&&je.length>0?(typeof je=="string"||Ke.objectMode||(0,$t.default)(je)===yt.prototype||(je=be(je)),ht?Ke.endEmitted?ze.emit("error",new Error("stream.unshift() after end event")):fe(ze,Ke,je,!0):Ke.ended?ze.emit("error",new Error("stream.push() after EOF")):(Ke.reading=!1,Ke.decoder&&!it?(je=Ke.decoder.write(je),Ke.objectMode||je.length!==0?fe(ze,Ke,je,!1):Se(ze,Ke)):fe(ze,Ke,je,!1))):ht||(Ke.reading=!1)}return ee(Ke)}function fe(ze,je,it,ht){je.flowing&&je.length===0&&!je.sync?(ze.emit("data",it),ze.read(0)):(je.length+=je.objectMode?1:it.length,ht?je.buffer.unshift(it):je.buffer.push(it),je.needReadable&&se(ze)),Se(ze,je)}function ue(ze,je){var it;return ve(je)||typeof je=="string"||je===void 0||ze.objectMode||(it=new TypeError("Invalid non-string/buffer chunk")),it}function ee(ze){return!ze.ended&&(ze.needReadable||ze.length<ze.highWaterMark||ze.length===0)}function z(ze){return ze>=ut?ze=ut:(ze--,ze|=ze>>>1,ze|=ze>>>2,ze|=ze>>>4,ze|=ze>>>8,ze|=ze>>>16,ze++),ze}function oe(ze,je){return ze<=0||je.length===0&&je.ended?0:je.objectMode?1:ze!==ze?je.flowing&&je.length?je.buffer.head.data.length:je.length:(ze>je.highWaterMark&&(je.highWaterMark=z(ze)),ze<=je.length?ze:je.ended?je.length:(je.needReadable=!0,0))}function ie(ze,je){if(!je.ended){if(je.decoder){var it=je.decoder.end();it&&it.length&&(je.buffer.push(it),je.length+=je.objectMode?1:it.length)}je.ended=!0,se(ze)}}function se(ze){var je=ze._readableState;je.needReadable=!1,je.emittedReadable||(Gt("emitReadable",je.flowing),je.emittedReadable=!0,je.sync?st.nextTick(le,ze):le(ze))}function le(ze){Gt("emit readable"),ze.emit("readable"),We(ze)}function Se(ze,je){je.readingMore||(je.readingMore=!0,st.nextTick(pe,ze,je))}function pe(ze,je){for(var it=je.length;!je.reading&&!je.flowing&&!je.ended&&je.length<je.highWaterMark&&(Gt("maybeReadMore read 0"),ze.read(0),it!==je.length);)it=je.length;je.readingMore=!1}function Ce(ze){return function(){var je=ze._readableState;Gt("pipeOnDrain",je.awaitDrain),je.awaitDrain&&je.awaitDrain--,je.awaitDrain===0&&dt(ze,"data")&&(je.flowing=!0,We(ze))}}function Ae(ze){Gt("readable nexttick read 0"),ze.read(0)}function Oe(ze,je){je.resumeScheduled||(je.resumeScheduled=!0,st.nextTick(Re,ze,je))}function Re(ze,je){je.reading||(Gt("resume read 0"),ze.read(0)),je.resumeScheduled=!1,je.awaitDrain=0,ze.emit("resume"),We(ze),je.flowing&&!je.reading&&ze.read(0)}function We(ze){var je=ze._readableState;for(Gt("flow",je.flowing);je.flowing&&ze.read()!==null;);}function $e(ze,je){if(je.length===0)return null;var it;return je.objectMode?it=je.buffer.shift():!ze||ze>=je.length?(it=je.decoder?je.buffer.join(""):je.buffer.length===1?je.buffer.head.data:je.buffer.concat(je.length),je.buffer.clear()):it=Je(ze,je.buffer,je.decoder),it}function Je(ze,je,it){var ht;return ze<je.head.data.length?(ht=je.head.data.slice(0,ze),je.head.data=je.head.data.slice(ze)):ht=ze===je.head.data.length?je.shift():it?pt(ze,je):St(ze,je),ht}function pt(ze,je){var it=je.head,ht=1,nt=it.data;for(ze-=nt.length;it=it.next;){var Ke=it.data,Be=ze>Ke.length?Ke.length:ze;if(Be===Ke.length?nt+=Ke:nt+=Ke.slice(0,ze),(ze-=Be)===0){Be===Ke.length?(++ht,it.next?je.head=it.next:je.head=je.tail=null):(je.head=it,it.data=Ke.slice(Be));break}++ht}return je.length-=ht,nt}function St(ze,je){var it=yt.allocUnsafe(ze),ht=je.head,nt=1;for(ht.data.copy(it),ze-=ht.data.length;ht=ht.next;){var Ke=ht.data,Be=ze>Ke.length?Ke.length:ze;if(Ke.copy(it,it.length-ze,0,Be),(ze-=Be)===0){Be===Ke.length?(++nt,ht.next?je.head=ht.next:je.head=je.tail=null):(je.head=ht,ht.data=Ke.slice(Be));break}++nt}return je.length-=nt,it}function Mt(ze){var je=ze._readableState;if(je.length>0)throw new Error('"endReadable()" called on non-empty stream');je.endEmitted||(je.ended=!0,st.nextTick(ct,je,ze))}function ct(ze,je){ze.endEmitted||ze.length!==0||(ze.endEmitted=!0,je.readable=!1,je.emit("end"))}function wt(ze,je){for(var it=0,ht=ze.length;it<ht;it++)if(ze[it]===je)return it;return-1}var ft=ye("babel-runtime/core-js/object/get-prototype-of"),$t=function(ze){return ze&&ze.__esModule?ze:{default:ze}}(ft),st=ye("process-nextick-args");Fe.exports=he;var et,lt=ye("isarray");he.ReadableState=ge;var dt=(ye("events").EventEmitter,function(ze,je){return ze.listeners(je).length}),bt=ye("./internal/streams/stream"),yt=ye("safe-buffer").Buffer,Vt=me.Uint8Array||function(){},Kt=ye("core-util-is");Kt.inherits=ye("inherits");var gn=ye("util"),Gt=void 0;Gt=gn&&gn.debuglog?gn.debuglog("stream"):function(){};var Dt,on=ye("./internal/streams/BufferList"),Jt=ye("./internal/streams/destroy");Kt.inherits(he,bt);var jt=["error","close","destroy","pause","resume"];Object.defineProperty(he.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(ze){this._readableState&&(this._readableState.destroyed=ze)}}),he.prototype.destroy=Jt.destroy,he.prototype._undestroy=Jt.undestroy,he.prototype._destroy=function(ze,je){this.push(null),je(ze)},he.prototype.push=function(ze,je){var it,ht=this._readableState;return ht.objectMode?it=!0:typeof ze=="string"&&(je=je||ht.defaultEncoding,je!==ht.encoding&&(ze=yt.from(ze,je),je=""),it=!0),xe(this,ze,je,!1,it)},he.prototype.unshift=function(ze){return xe(this,ze,null,!0,!1)},he.prototype.isPaused=function(){return this._readableState.flowing===!1},he.prototype.setEncoding=function(ze){return Dt||(Dt=ye("string_decoder/").StringDecoder),this._readableState.decoder=new Dt(ze),this._readableState.encoding=ze,this};var ut=8388608;he.prototype.read=function(ze){Gt("read",ze),ze=parseInt(ze,10);var je=this._readableState,it=ze;if(ze!==0&&(je.emittedReadable=!1),ze===0&&je.needReadable&&(je.length>=je.highWaterMark||je.ended))return Gt("read: emitReadable",je.length,je.ended),je.length===0&&je.ended?Mt(this):se(this),null;if((ze=oe(ze,je))===0&&je.ended)return je.length===0&&Mt(this),null;var ht=je.needReadable;Gt("need readable",ht),(je.length===0||je.length-ze<je.highWaterMark)&&(ht=!0,Gt("length less than watermark",ht)),je.ended||je.reading?(ht=!1,Gt("reading or ended",ht)):ht&&(Gt("do read"),je.reading=!0,je.sync=!0,je.length===0&&(je.needReadable=!0),this._read(je.highWaterMark),je.sync=!1,je.reading||(ze=oe(it,je)));var nt;return nt=ze>0?$e(ze,je):null,nt===null?(je.needReadable=!0,ze=0):je.length-=ze,je.length===0&&(je.ended||(je.needReadable=!0),it!==ze&&je.ended&&Mt(this)),nt!==null&&this.emit("data",nt),nt},he.prototype._read=function(ze){this.emit("error",new Error("_read() is not implemented"))},he.prototype.pipe=function(ze,je){function it(mi,si){Gt("onunpipe"),mi===Xe&&si&&si.hasUnpiped===!1&&(si.hasUnpiped=!0,nt())}function ht(){Gt("onend"),ze.end()}function nt(){Gt("cleanup"),ze.removeListener("close",Ue),ze.removeListener("finish",rt),ze.removeListener("drain",An),ze.removeListener("error",Be),ze.removeListener("unpipe",it),Xe.removeListener("end",ht),Xe.removeListener("end",Ze),Xe.removeListener("data",Ke),Mn=!0,!mt.awaitDrain||ze._writableState&&!ze._writableState.needDrain||An()}function Ke(mi){Gt("ondata"),hi=!1,ze.write(mi)!==!1||hi||((mt.pipesCount===1&&mt.pipes===ze||mt.pipesCount>1&&wt(mt.pipes,ze)!==-1)&&!Mn&&(Gt("false write response, pause",Xe._readableState.awaitDrain),Xe._readableState.awaitDrain++,hi=!0),Xe.pause())}function Be(mi){Gt("onerror",mi),Ze(),ze.removeListener("error",Be),dt(ze,"error")===0&&ze.emit("error",mi)}function Ue(){ze.removeListener("finish",rt),Ze()}function rt(){Gt("onfinish"),ze.removeListener("close",Ue),Ze()}function Ze(){Gt("unpipe"),Xe.unpipe(ze)}var Xe=this,mt=this._readableState;switch(mt.pipesCount){case 0:mt.pipes=ze;break;case 1:mt.pipes=[mt.pipes,ze];break;default:mt.pipes.push(ze)}mt.pipesCount+=1,Gt("pipe count=%d opts=%j",mt.pipesCount,je);var Rt=(!je||je.end!==!1)&&ze!==Ee.stdout&&ze!==Ee.stderr,vn=Rt?ht:Ze;mt.endEmitted?st.nextTick(vn):Xe.once("end",vn),ze.on("unpipe",it);var An=Ce(Xe);ze.on("drain",An);var Mn=!1,hi=!1;return Xe.on("data",Ke),we(ze,"error",Be),ze.once("close",Ue),ze.once("finish",rt),ze.emit("pipe",Xe),mt.flowing||(Gt("pipe resume"),Xe.resume()),ze},he.prototype.unpipe=function(ze){var je=this._readableState,it={hasUnpiped:!1};if(je.pipesCount===0)return this;if(je.pipesCount===1)return ze&&ze!==je.pipes?this:(ze||(ze=je.pipes),je.pipes=null,je.pipesCount=0,je.flowing=!1,ze&&ze.emit("unpipe",this,it),this);if(!ze){var ht=je.pipes,nt=je.pipesCount;je.pipes=null,je.pipesCount=0,je.flowing=!1;for(var Ke=0;Ke<nt;Ke++)ht[Ke].emit("unpipe",this,it);return this}var Be=wt(je.pipes,ze);return Be===-1?this:(je.pipes.splice(Be,1),je.pipesCount-=1,je.pipesCount===1&&(je.pipes=je.pipes[0]),ze.emit("unpipe",this,it),this)},he.prototype.on=function(ze,je){var it=bt.prototype.on.call(this,ze,je);if(ze==="data")this._readableState.flowing!==!1&&this.resume();else if(ze==="readable"){var ht=this._readableState;ht.endEmitted||ht.readableListening||(ht.readableListening=ht.needReadable=!0,ht.emittedReadable=!1,ht.reading?ht.length&&se(this):st.nextTick(Ae,this))}return it},he.prototype.addListener=he.prototype.on,he.prototype.resume=function(){var ze=this._readableState;return ze.flowing||(Gt("resume"),ze.flowing=!0,Oe(this,ze)),this},he.prototype.pause=function(){return Gt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Gt("pause"),this._readableState.flowing=!1,this.emit("pause")),this},he.prototype.wrap=function(ze){var je=this,it=this._readableState,ht=!1;ze.on("end",function(){if(Gt("wrapped end"),it.decoder&&!it.ended){var Be=it.decoder.end();Be&&Be.length&&je.push(Be)}je.push(null)}),ze.on("data",function(Be){Gt("wrapped data"),it.decoder&&(Be=it.decoder.write(Be)),(!it.objectMode||Be!=null)&&(it.objectMode||Be&&Be.length)&&(je.push(Be)||(ht=!0,ze.pause()))});for(var nt in ze)this[nt]===void 0&&typeof ze[nt]=="function"&&(this[nt]=function(Be){return function(){return ze[Be].apply(ze,arguments)}}(nt));for(var Ke=0;Ke<jt.length;Ke++)ze.on(jt[Ke],this.emit.bind(this,jt[Ke]));return this._read=function(Be){Gt("wrapped _read",Be),ht&&(ht=!1,ze.resume())},this},Object.defineProperty(he.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),he._fromList=$e}).call(this,ye("_process"),typeof De.g!="undefined"?De.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(ye,Fe,Me){"use strict";function Ee(he,xe){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,xe!=null&&this.push(xe),ue(he);var ee=this._readableState;ee.reading=!1,(ee.needReadable||ee.length<ee.highWaterMark)&&this._read(ee.highWaterMark)}function me(he){if(!(this instanceof me))return new me(he);we.call(this,he),this._transformState={afterTransform:Ee.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,he&&(typeof he.transform=="function"&&(this._transform=he.transform),typeof he.flush=="function"&&(this._flush=he.flush)),this.on("prefinish",be)}function be(){var he=this;typeof this._flush=="function"?this._flush(function(xe,fe){ve(he,xe,fe)}):ve(this,null,null)}function ve(he,xe,fe){if(xe)return he.emit("error",xe);if(fe!=null&&he.push(fe),he._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(he._transformState.transforming)throw new Error("Calling transform done when still transforming");return he.push(null)}Fe.exports=me;var we=ye("./_stream_duplex"),ge=ye("core-util-is");ge.inherits=ye("inherits"),ge.inherits(me,we),me.prototype.push=function(he,xe){return this._transformState.needTransform=!1,we.prototype.push.call(this,he,xe)},me.prototype._transform=function(he,xe,fe){throw new Error("_transform() is not implemented")},me.prototype._write=function(he,xe,fe){var ue=this._transformState;if(ue.writecb=fe,ue.writechunk=he,ue.writeencoding=xe,!ue.transforming){var ee=this._readableState;(ue.needTransform||ee.needReadable||ee.length<ee.highWaterMark)&&this._read(ee.highWaterMark)}},me.prototype._read=function(he){var xe=this._transformState;xe.writechunk!==null&&xe.writecb&&!xe.transforming?(xe.transforming=!0,this._transform(xe.writechunk,xe.writeencoding,xe.afterTransform)):xe.needTransform=!0},me.prototype._destroy=function(he,xe){var fe=this;we.prototype._destroy.call(this,he,function(ue){xe(ue),fe.emit("close")})}},{"./_stream_duplex":179,"core-util-is":153,inherits:162}],183:[function(ye,Fe,Me){(function(Ee,me){"use strict";function be(Jt){return Jt&&Jt.__esModule?Jt:{default:Jt}}function ve(Jt){var jt=this;this.next=null,this.entry=null,this.finish=function(){pt(jt,Jt)}}function we(Jt){return gn.from(Jt)}function ge(Jt){return gn.isBuffer(Jt)||Jt instanceof Gt}function he(){}function xe(Jt,jt){dt=dt||ye("./_stream_duplex"),Jt=Jt||{};var ut=jt instanceof dt;this.objectMode=!!Jt.objectMode,ut&&(this.objectMode=this.objectMode||!!Jt.writableObjectMode);var ze=Jt.highWaterMark,je=Jt.writableHighWaterMark,it=this.objectMode?16:16384;this.highWaterMark=ze||ze===0?ze:ut&&(je||je===0)?je:it,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=Jt.decodeStrings===!1;this.decodeStrings=!ht,this.defaultEncoding=Jt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(nt){Se(jt,nt)},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 ve(this)}function fe(Jt){if(dt=dt||ye("./_stream_duplex"),!(on.call(fe,this)||this instanceof dt))return new fe(Jt);this._writableState=new xe(Jt,this),this.writable=!0,Jt&&(typeof Jt.write=="function"&&(this._write=Jt.write),typeof Jt.writev=="function"&&(this._writev=Jt.writev),typeof Jt.destroy=="function"&&(this._destroy=Jt.destroy),typeof Jt.final=="function"&&(this._final=Jt.final)),Kt.call(this)}function ue(Jt,jt){var ut=new Error("write after end");Jt.emit("error",ut),lt.nextTick(jt,ut)}function ee(Jt,jt,ut,ze){var je=!0,it=!1;return ut===null?it=new TypeError("May not write null values to stream"):typeof ut=="string"||ut===void 0||jt.objectMode||(it=new TypeError("Invalid non-string/buffer chunk")),it&&(Jt.emit("error",it),lt.nextTick(ze,it),je=!1),je}function z(Jt,jt,ut){return Jt.objectMode||Jt.decodeStrings===!1||typeof jt!="string"||(jt=gn.from(jt,ut)),jt}function oe(Jt,jt,ut,ze,je,it){if(!ut){var ht=z(jt,ze,je);ze!==ht&&(ut=!0,je="buffer",ze=ht)}var nt=jt.objectMode?1:ze.length;jt.length+=nt;var Ke=jt.length<jt.highWaterMark;if(Ke||(jt.needDrain=!0),jt.writing||jt.corked){var Be=jt.lastBufferedRequest;jt.lastBufferedRequest={chunk:ze,encoding:je,isBuf:ut,callback:it,next:null},Be?Be.next=jt.lastBufferedRequest:jt.bufferedRequest=jt.lastBufferedRequest,jt.bufferedRequestCount+=1}else ie(Jt,jt,!1,nt,ze,je,it);return Ke}function ie(Jt,jt,ut,ze,je,it,ht){jt.writelen=ze,jt.writecb=ht,jt.writing=!0,jt.sync=!0,ut?Jt._writev(je,jt.onwrite):Jt._write(je,it,jt.onwrite),jt.sync=!1}function se(Jt,jt,ut,ze,je){--jt.pendingcb,ut?(lt.nextTick(je,ze),lt.nextTick($e,Jt,jt),Jt._writableState.errorEmitted=!0,Jt.emit("error",ze)):(je(ze),Jt._writableState.errorEmitted=!0,Jt.emit("error",ze),$e(Jt,jt))}function le(Jt){Jt.writing=!1,Jt.writecb=null,Jt.length-=Jt.writelen,Jt.writelen=0}function Se(Jt,jt){var ut=Jt._writableState,ze=ut.sync,je=ut.writecb;if(le(ut),jt)se(Jt,ut,ze,jt,je);else{var it=Oe(ut);it||ut.corked||ut.bufferProcessing||!ut.bufferedRequest||Ae(Jt,ut),ze?bt(pe,Jt,ut,it,je):pe(Jt,ut,it,je)}}function pe(Jt,jt,ut,ze){ut||Ce(Jt,jt),jt.pendingcb--,ze(),$e(Jt,jt)}function Ce(Jt,jt){jt.length===0&&jt.needDrain&&(jt.needDrain=!1,Jt.emit("drain"))}function Ae(Jt,jt){jt.bufferProcessing=!0;var ut=jt.bufferedRequest;if(Jt._writev&&ut&&ut.next){var ze=jt.bufferedRequestCount,je=new Array(ze),it=jt.corkedRequestsFree;it.entry=ut;for(var ht=0,nt=!0;ut;)je[ht]=ut,ut.isBuf||(nt=!1),ut=ut.next,ht+=1;je.allBuffers=nt,ie(Jt,jt,!0,jt.length,je,"",it.finish),jt.pendingcb++,jt.lastBufferedRequest=null,it.next?(jt.corkedRequestsFree=it.next,it.next=null):jt.corkedRequestsFree=new ve(jt),jt.bufferedRequestCount=0}else{for(;ut;){var Ke=ut.chunk,Be=ut.encoding,Ue=ut.callback;if(ie(Jt,jt,!1,jt.objectMode?1:Ke.length,Ke,Be,Ue),ut=ut.next,jt.bufferedRequestCount--,jt.writing)break}ut===null&&(jt.lastBufferedRequest=null)}jt.bufferedRequest=ut,jt.bufferProcessing=!1}function Oe(Jt){return Jt.ending&&Jt.length===0&&Jt.bufferedRequest===null&&!Jt.finished&&!Jt.writing}function Re(Jt,jt){Jt._final(function(ut){jt.pendingcb--,ut&&Jt.emit("error",ut),jt.prefinished=!0,Jt.emit("prefinish"),$e(Jt,jt)})}function We(Jt,jt){jt.prefinished||jt.finalCalled||(typeof Jt._final=="function"?(jt.pendingcb++,jt.finalCalled=!0,lt.nextTick(Re,Jt,jt)):(jt.prefinished=!0,Jt.emit("prefinish")))}function $e(Jt,jt){var ut=Oe(jt);return ut&&(We(Jt,jt),jt.pendingcb===0&&(jt.finished=!0,Jt.emit("finish"))),ut}function Je(Jt,jt,ut){jt.ending=!0,$e(Jt,jt),ut&&(jt.finished?lt.nextTick(ut):Jt.once("finish",ut)),jt.ended=!0,Jt.writable=!1}function pt(Jt,jt,ut){var ze=Jt.entry;for(Jt.entry=null;ze;){var je=ze.callback;jt.pendingcb--,je(ut),ze=ze.next}jt.corkedRequestsFree?jt.corkedRequestsFree.next=Jt:jt.corkedRequestsFree=Jt}var St=ye("babel-runtime/core-js/object/define-property"),Mt=be(St),ct=ye("babel-runtime/core-js/symbol/has-instance"),wt=be(ct),ft=ye("babel-runtime/core-js/symbol"),$t=be(ft),st=ye("babel-runtime/core-js/set-immediate"),et=be(st),lt=ye("process-nextick-args");Fe.exports=fe;var dt,bt=!Ee.browser&&["v0.10","v0.9."].indexOf(Ee.version.slice(0,5))>-1?et.default:lt.nextTick;fe.WritableState=xe;var yt=ye("core-util-is");yt.inherits=ye("inherits");var Vt={deprecate:ye("util-deprecate")},Kt=ye("./internal/streams/stream"),gn=ye("safe-buffer").Buffer,Gt=me.Uint8Array||function(){},Dt=ye("./internal/streams/destroy");yt.inherits(fe,Kt),xe.prototype.getBuffer=function(){for(var Jt=this.bufferedRequest,jt=[];Jt;)jt.push(Jt),Jt=Jt.next;return jt},function(){try{Object.defineProperty(xe.prototype,"buffer",{get:Vt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Jt){}}();var on;typeof $t.default=="function"&&wt.default&&typeof Function.prototype[wt.default]=="function"?(on=Function.prototype[wt.default],(0,Mt.default)(fe,wt.default,{value:function(Jt){return!!on.call(this,Jt)||this===fe&&Jt&&Jt._writableState instanceof xe}})):on=function(Jt){return Jt instanceof this},fe.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},fe.prototype.write=function(Jt,jt,ut){var ze=this._writableState,je=!1,it=!ze.objectMode&&ge(Jt);return it&&!gn.isBuffer(Jt)&&(Jt=we(Jt)),typeof jt=="function"&&(ut=jt,jt=null),it?jt="buffer":jt||(jt=ze.defaultEncoding),typeof ut!="function"&&(ut=he),ze.ended?ue(this,ut):(it||ee(this,ze,Jt,ut))&&(ze.pendingcb++,je=oe(this,ze,it,Jt,jt,ut)),je},fe.prototype.cork=function(){this._writableState.corked++},fe.prototype.uncork=function(){var Jt=this._writableState;Jt.corked&&(Jt.corked--,Jt.writing||Jt.corked||Jt.finished||Jt.bufferProcessing||!Jt.bufferedRequest||Ae(this,Jt))},fe.prototype.setDefaultEncoding=function(Jt){if(typeof Jt=="string"&&(Jt=Jt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Jt+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+Jt);return this._writableState.defaultEncoding=Jt,this},Object.defineProperty(fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),fe.prototype._write=function(Jt,jt,ut){ut(new Error("_write() is not implemented"))},fe.prototype._writev=null,fe.prototype.end=function(Jt,jt,ut){var ze=this._writableState;typeof Jt=="function"?(ut=Jt,Jt=null,jt=null):typeof jt=="function"&&(ut=jt,jt=null),Jt!=null&&this.write(Jt,jt),ze.corked&&(ze.corked=1,this.uncork()),ze.ending||ze.finished||Je(this,ze,ut)},Object.defineProperty(fe.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(Jt){this._writableState&&(this._writableState.destroyed=Jt)}}),fe.prototype.destroy=Dt.destroy,fe.prototype._undestroy=Dt.undestroy,fe.prototype._destroy=function(Jt,jt){this.end(),jt(Jt)}}).call(this,ye("_process"),typeof De.g!="undefined"?De.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(ye,Fe,Me){"use strict";function Ee(we,ge){if(!(we instanceof ge))throw new TypeError("Cannot call a class as a function")}function me(we,ge,he){we.copy(ge,he)}var be=ye("safe-buffer").Buffer,ve=ye("util");Fe.exports=function(){function we(){Ee(this,we),this.head=null,this.tail=null,this.length=0}return we.prototype.push=function(ge){var he={data:ge,next:null};this.length>0?this.tail.next=he:this.head=he,this.tail=he,++this.length},we.prototype.unshift=function(ge){var he={data:ge,next:this.head};this.length===0&&(this.tail=he),this.head=he,++this.length},we.prototype.shift=function(){if(this.length!==0){var ge=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,ge}},we.prototype.clear=function(){this.head=this.tail=null,this.length=0},we.prototype.join=function(ge){if(this.length===0)return"";for(var he=this.head,xe=""+he.data;he=he.next;)xe+=ge+he.data;return xe},we.prototype.concat=function(ge){if(this.length===0)return be.alloc(0);if(this.length===1)return this.head.data;for(var he=be.allocUnsafe(ge>>>0),xe=this.head,fe=0;xe;)me(xe.data,he,fe),fe+=xe.data.length,xe=xe.next;return he},we}(),ve&&ve.inspect&&ve.inspect.custom&&(Fe.exports.prototype[ve.inspect.custom]=function(){var we=ve.inspect({length:this.length});return this.constructor.name+" "+we})},{"safe-buffer":193,util:36}],185:[function(ye,Fe,Me){"use strict";function Ee(we,ge){var he=this,xe=this._readableState&&this._readableState.destroyed,fe=this._writableState&&this._writableState.destroyed;return xe||fe?(ge?ge(we):!we||this._writableState&&this._writableState.errorEmitted||ve.nextTick(be,this,we),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(we||null,function(ue){!ge&&ue?(ve.nextTick(be,he,ue),he._writableState&&(he._writableState.errorEmitted=!0)):ge&&ge(ue)}),this)}function me(){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,ge){we.emit("error",ge)}var ve=ye("process-nextick-args");Fe.exports={destroy:Ee,undestroy:me}},{"process-nextick-args":172}],186:[function(ye,Fe,Me){"use strict";Fe.exports=ye("events").EventEmitter},{events:158}],187:[function(ye,Fe,Me){Fe.exports=ye("./readable").PassThrough},{"./readable":188}],188:[function(ye,Fe,Me){Me=Fe.exports=ye("./lib/_stream_readable.js"),Me.Stream=Me,Me.Readable=Me,Me.Writable=ye("./lib/_stream_writable.js"),Me.Duplex=ye("./lib/_stream_duplex.js"),Me.Transform=ye("./lib/_stream_transform.js"),Me.PassThrough=ye("./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(ye,Fe,Me){Fe.exports=ye("./readable").Transform},{"./readable":188}],190:[function(ye,Fe,Me){Fe.exports=ye("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":183}],191:[function(ye,Fe,Me){var Ee=function(){return this}()||Function("return this")(),me=Ee.regeneratorRuntime&&Object.getOwnPropertyNames(Ee).indexOf("regeneratorRuntime")>=0,be=me&&Ee.regeneratorRuntime;if(Ee.regeneratorRuntime=void 0,Fe.exports=ye("./runtime"),me)Ee.regeneratorRuntime=be;else try{delete Ee.regeneratorRuntime}catch(ve){Ee.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(ye,Fe,Me){(function(Ee){"use strict";function me(et,lt,dt,bt){var yt=lt&<.prototype instanceof ve?lt:ve,Vt=Object.create(yt.prototype),Kt=new oe(bt||[]);return Vt._invoke=fe(et,dt,Kt),Vt}function be(et,lt,dt){try{return{type:"normal",arg:et.call(lt,dt)}}catch(bt){return{type:"throw",arg:bt}}}function ve(){}function we(){}function ge(){}function he(et){["next","throw","return"].forEach(function(lt){et[lt]=function(dt){return this._invoke(lt,dt)}})}function xe(et){function lt(yt,Vt,Kt,gn){var Gt=be(et[yt],et,Vt);if(Gt.type!=="throw"){var Dt=Gt.arg,on=Dt.value;return on&&typeof on=="object"&&pe.call(on,"__await")?Promise.resolve(on.__await).then(function(Jt){lt("next",Jt,Kt,gn)},function(Jt){lt("throw",Jt,Kt,gn)}):Promise.resolve(on).then(function(Jt){Dt.value=Jt,Kt(Dt)},gn)}gn(Gt.arg)}function dt(yt,Vt){function Kt(){return new Promise(function(gn,Gt){lt(yt,Vt,gn,Gt)})}return bt=bt?bt.then(Kt,Kt):Kt()}var bt;this._invoke=dt}function fe(et,lt,dt){var bt=Je;return function(yt,Vt){if(bt===St)throw new Error("Generator is already running");if(bt===Mt){if(yt==="throw")throw Vt;return se()}for(dt.method=yt,dt.arg=Vt;;){var Kt=dt.delegate;if(Kt){var gn=ue(Kt,dt);if(gn){if(gn===ct)continue;return gn}}if(dt.method==="next")dt.sent=dt._sent=dt.arg;else if(dt.method==="throw"){if(bt===Je)throw bt=Mt,dt.arg;dt.dispatchException(dt.arg)}else dt.method==="return"&&dt.abrupt("return",dt.arg);bt=St;var Gt=be(et,lt,dt);if(Gt.type==="normal"){if(bt=dt.done?Mt:pt,Gt.arg===ct)continue;return{value:Gt.arg,done:dt.done}}Gt.type==="throw"&&(bt=Mt,dt.method="throw",dt.arg=Gt.arg)}}}function ue(et,lt){var dt=et.iterator[lt.method];if(dt===le){if(lt.delegate=null,lt.method==="throw"){if(et.iterator.return&&(lt.method="return",lt.arg=le,ue(et,lt),lt.method==="throw"))return ct;lt.method="throw",lt.arg=new TypeError("The iterator does not provide a 'throw' method")}return ct}var bt=be(dt,et.iterator,lt.arg);if(bt.type==="throw")return lt.method="throw",lt.arg=bt.arg,lt.delegate=null,ct;var yt=bt.arg;return yt?yt.done?(lt[et.resultName]=yt.value,lt.next=et.nextLoc,lt.method!=="return"&&(lt.method="next",lt.arg=le),lt.delegate=null,ct):yt:(lt.method="throw",lt.arg=new TypeError("iterator result is not an object"),lt.delegate=null,ct)}function ee(et){var lt={tryLoc:et[0]};1 in et&&(lt.catchLoc=et[1]),2 in et&&(lt.finallyLoc=et[2],lt.afterLoc=et[3]),this.tryEntries.push(lt)}function z(et){var lt=et.completion||{};lt.type="normal",delete lt.arg,et.completion=lt}function oe(et){this.tryEntries=[{tryLoc:"root"}],et.forEach(ee,this),this.reset(!0)}function ie(et){if(et){var lt=et[Ae];if(lt)return lt.call(et);if(typeof et.next=="function")return et;if(!isNaN(et.length)){var dt=-1,bt=function yt(){for(;++dt<et.length;)if(pe.call(et,dt))return yt.value=et[dt],yt.done=!1,yt;return yt.value=le,yt.done=!0,yt};return bt.next=bt}}return{next:se}}function se(){return{value:le,done:!0}}var le,Se=Object.prototype,pe=Se.hasOwnProperty,Ce=typeof Symbol=="function"?Symbol:{},Ae=Ce.iterator||"@@iterator",Oe=Ce.asyncIterator||"@@asyncIterator",Re=Ce.toStringTag||"@@toStringTag",We=typeof Fe=="object",$e=Ee.regeneratorRuntime;if($e)return void(We&&(Fe.exports=$e));$e=Ee.regeneratorRuntime=We?Fe.exports:{},$e.wrap=me;var Je="suspendedStart",pt="suspendedYield",St="executing",Mt="completed",ct={},wt={};wt[Ae]=function(){return this};var ft=Object.getPrototypeOf,$t=ft&&ft(ft(ie([])));$t&&$t!==Se&&pe.call($t,Ae)&&(wt=$t);var st=ge.prototype=ve.prototype=Object.create(wt);we.prototype=st.constructor=ge,ge.constructor=we,ge[Re]=we.displayName="GeneratorFunction",$e.isGeneratorFunction=function(et){var lt=typeof et=="function"&&et.constructor;return!!lt&&(lt===we||(lt.displayName||lt.name)==="GeneratorFunction")},$e.mark=function(et){return Object.setPrototypeOf?Object.setPrototypeOf(et,ge):(et.__proto__=ge,Re in et||(et[Re]="GeneratorFunction")),et.prototype=Object.create(st),et},$e.awrap=function(et){return{__await:et}},he(xe.prototype),xe.prototype[Oe]=function(){return this},$e.AsyncIterator=xe,$e.async=function(et,lt,dt,bt){var yt=new xe(me(et,lt,dt,bt));return $e.isGeneratorFunction(lt)?yt:yt.next().then(function(Vt){return Vt.done?Vt.value:yt.next()})},he(st),st[Re]="Generator",st[Ae]=function(){return this},st.toString=function(){return"[object Generator]"},$e.keys=function(et){var lt=[];for(var dt in et)lt.push(dt);return lt.reverse(),function bt(){for(;lt.length;){var yt=lt.pop();if(yt in et)return bt.value=yt,bt.done=!1,bt}return bt.done=!0,bt}},$e.values=ie,oe.prototype={constructor:oe,reset:function(et){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),!et)for(var lt in this)lt.charAt(0)==="t"&&pe.call(this,lt)&&!isNaN(+lt.slice(1))&&(this[lt]=le)},stop:function(){this.done=!0;var et=this.tryEntries[0],lt=et.completion;if(lt.type==="throw")throw lt.arg;return this.rval},dispatchException:function(et){function lt(Gt,Dt){return Vt.type="throw",Vt.arg=et,dt.next=Gt,Dt&&(dt.method="next",dt.arg=le),!!Dt}if(this.done)throw et;for(var dt=this,bt=this.tryEntries.length-1;bt>=0;--bt){var yt=this.tryEntries[bt],Vt=yt.completion;if(yt.tryLoc==="root")return lt("end");if(yt.tryLoc<=this.prev){var Kt=pe.call(yt,"catchLoc"),gn=pe.call(yt,"finallyLoc");if(Kt&&gn){if(this.prev<yt.catchLoc)return lt(yt.catchLoc,!0);if(this.prev<yt.finallyLoc)return lt(yt.finallyLoc)}else if(Kt){if(this.prev<yt.catchLoc)return lt(yt.catchLoc,!0)}else{if(!gn)throw new Error("try statement without catch or finally");if(this.prev<yt.finallyLoc)return lt(yt.finallyLoc)}}}},abrupt:function(et,lt){for(var dt=this.tryEntries.length-1;dt>=0;--dt){var bt=this.tryEntries[dt];if(bt.tryLoc<=this.prev&&pe.call(bt,"finallyLoc")&&this.prev<bt.finallyLoc){var yt=bt;break}}yt&&(et==="break"||et==="continue")&&yt.tryLoc<=lt&<<=yt.finallyLoc&&(yt=null);var Vt=yt?yt.completion:{};return Vt.type=et,Vt.arg=lt,yt?(this.method="next",this.next=yt.finallyLoc,ct):this.complete(Vt)},complete:function(et,lt){if(et.type==="throw")throw et.arg;return et.type==="break"||et.type==="continue"?this.next=et.arg:et.type==="return"?(this.rval=this.arg=et.arg,this.method="return",this.next="end"):et.type==="normal"&<&&(this.next=lt),ct},finish:function(et){for(var lt=this.tryEntries.length-1;lt>=0;--lt){var dt=this.tryEntries[lt];if(dt.finallyLoc===et)return this.complete(dt.completion,dt.afterLoc),z(dt),ct}},catch:function(et){for(var lt=this.tryEntries.length-1;lt>=0;--lt){var dt=this.tryEntries[lt];if(dt.tryLoc===et){var bt=dt.completion;if(bt.type==="throw"){var yt=bt.arg;z(dt)}return yt}}throw new Error("illegal catch attempt")},delegateYield:function(et,lt,dt){return this.delegate={iterator:ie(et),resultName:lt,nextLoc:dt},this.method==="next"&&(this.arg=le),ct}}})(function(){return this}()||Function("return this")())},{}],193:[function(ye,Fe,Me){function Ee(we,ge){for(var he in we)ge[he]=we[he]}function me(we,ge,he){return ve(we,ge,he)}var be=ye("buffer"),ve=be.Buffer;ve.from&&ve.alloc&&ve.allocUnsafe&&ve.allocUnsafeSlow?Fe.exports=be:(Ee(be,Me),Me.Buffer=me),Ee(ve,me),me.from=function(we,ge,he){if(typeof we=="number")throw new TypeError("Argument must not be a number");return ve(we,ge,he)},me.alloc=function(we,ge,he){if(typeof we!="number")throw new TypeError("Argument must be a number");var xe=ve(we);return ge!==void 0?typeof he=="string"?xe.fill(ge,he):xe.fill(ge):xe.fill(0),xe},me.allocUnsafe=function(we){if(typeof we!="number")throw new TypeError("Argument must be a number");return ve(we)},me.allocUnsafeSlow=function(we){if(typeof we!="number")throw new TypeError("Argument must be a number");return be.SlowBuffer(we)}},{buffer:38}],194:[function(ye,Fe,Me){(function(Ee){"use strict";function me(se){return se&&se.__esModule?se:{default:se}}var be=ye("babel-runtime/core-js/string/from-code-point"),ve=me(be),we=ye("babel-runtime/core-js/json/stringify"),ge=me(we),he=ye("babel-runtime/helpers/typeof"),xe=me(he),fe=ye("babel-runtime/core-js/object/define-property"),ue=me(fe),ee=ye("babel-runtime/core-js/object/keys"),z=me(ee),oe=ye("babel-runtime/core-js/object/create"),ie=me(oe);(function(se){function le(Ze,Xe){if(!(this instanceof le))return new le(Ze,Xe);var mt=this;pe(mt),mt.q=mt.c="",mt.bufferCheckPosition=se.MAX_BUFFER_LENGTH,mt.opt=Xe||{},mt.opt.lowercase=mt.opt.lowercase||mt.opt.lowercasetags,mt.looseCase=mt.opt.lowercase?"toLowerCase":"toUpperCase",mt.tags=[],mt.closed=mt.closedRoot=mt.sawRoot=!1,mt.tag=mt.error=null,mt.strict=!!Ze,mt.noscript=!(!Ze&&!mt.opt.noscript),mt.state=Ue.BEGIN,mt.strictEntities=mt.opt.strictEntities,mt.ENTITIES=mt.strictEntities?(0,ie.default)(se.XML_ENTITIES):(0,ie.default)(se.ENTITIES),mt.attribList=[],mt.opt.xmlns&&(mt.ns=(0,ie.default)(it)),mt.trackPosition=mt.opt.position!==!1,mt.trackPosition&&(mt.position=mt.line=mt.column=0),St(mt,"onready")}function Se(Ze){for(var Xe=Math.max(se.MAX_BUFFER_LENGTH,10),mt=0,Rt=0,vn=Dt.length;Rt<vn;Rt++){var An=Ze[Dt[Rt]].length;if(An>Xe)switch(Dt[Rt]){case"textNode":ct(Ze);break;case"cdata":Mt(Ze,"oncdata",Ze.cdata),Ze.cdata="";break;case"script":Mt(Ze,"onscript",Ze.script),Ze.script="";break;default:ft(Ze,"Max buffer length exceeded: "+Dt[Rt])}mt=Math.max(mt,An)}var Mn=se.MAX_BUFFER_LENGTH-mt;Ze.bufferCheckPosition=Mn+Ze.position}function pe(Ze){for(var Xe=0,mt=Dt.length;Xe<mt;Xe++)Ze[Dt[Xe]]=""}function Ce(Ze){ct(Ze),Ze.cdata!==""&&(Mt(Ze,"oncdata",Ze.cdata),Ze.cdata=""),Ze.script!==""&&(Mt(Ze,"onscript",Ze.script),Ze.script="")}function Ae(Ze,Xe){return new Oe(Ze,Xe)}function Oe(Ze,Xe){if(!(this instanceof Oe))return new Oe(Ze,Xe);on.apply(this),this._parser=new le(Ze,Xe),this.writable=!0,this.readable=!0;var mt=this;this._parser.onend=function(){mt.emit("end")},this._parser.onerror=function(Rt){mt.emit("error",Rt),mt._parser.error=null},this._decoder=null,Jt.forEach(function(Rt){(0,ue.default)(mt,"on"+Rt,{get:function(){return mt._parser["on"+Rt]},set:function(vn){if(!vn)return mt.removeAllListeners(Rt),mt._parser["on"+Rt]=vn,vn;mt.on(Rt,vn)},enumerable:!0,configurable:!1})})}function Re(Ze){return Ze===" "||Ze===`
|
|
|
`||Ze==="\r"||Ze===" "}function We(Ze){return Ze==='"'||Ze==="'"}function $e(Ze){return Ze===">"||Re(Ze)}function Je(Ze,Xe){return Ze.test(Xe)}function pt(Ze,Xe){return!Je(Ze,Xe)}function St(Ze,Xe,mt){Ze[Xe]&&Ze[Xe](mt)}function Mt(Ze,Xe,mt){Ze.textNode&&ct(Ze),St(Ze,Xe,mt)}function ct(Ze){Ze.textNode=wt(Ze.opt,Ze.textNode),Ze.textNode&&St(Ze,"ontext",Ze.textNode),Ze.textNode=""}function wt(Ze,Xe){return Ze.trim&&(Xe=Xe.trim()),Ze.normalize&&(Xe=Xe.replace(/\s+/g," ")),Xe}function ft(Ze,Xe){return ct(Ze),Ze.trackPosition&&(Xe+=`
|
|
|
Line: `+Ze.line+`
|
|
|
Column: `+Ze.column+`
|
|
|
Char: `+Ze.c),Xe=new Error(Xe),Ze.error=Xe,St(Ze,"onerror",Xe),Ze}function $t(Ze){return Ze.sawRoot&&!Ze.closedRoot&&st(Ze,"Unclosed root tag"),Ze.state!==Ue.BEGIN&&Ze.state!==Ue.BEGIN_WHITESPACE&&Ze.state!==Ue.TEXT&&ft(Ze,"Unexpected end"),ct(Ze),Ze.c="",Ze.closed=!0,St(Ze,"onend"),le.call(Ze,Ze.strict,Ze.opt),Ze}function st(Ze,Xe){if((Ze===void 0?"undefined":(0,xe.default)(Ze))!=="object"||!(Ze instanceof le))throw new Error("bad call to strictFail");Ze.strict&&ft(Ze,Xe)}function et(Ze){Ze.strict||(Ze.tagName=Ze.tagName[Ze.looseCase]());var Xe=Ze.tags[Ze.tags.length-1]||Ze,mt=Ze.tag={name:Ze.tagName,attributes:{}};Ze.opt.xmlns&&(mt.ns=Xe.ns),Ze.attribList.length=0,Mt(Ze,"onopentagstart",mt)}function lt(Ze,Xe){var mt=Ze.indexOf(":"),Rt=mt<0?["",Ze]:Ze.split(":"),vn=Rt[0],An=Rt[1];return Xe&&Ze==="xmlns"&&(vn="xmlns",An=""),{prefix:vn,local:An}}function dt(Ze){if(Ze.strict||(Ze.attribName=Ze.attribName[Ze.looseCase]()),Ze.attribList.indexOf(Ze.attribName)!==-1||Ze.tag.attributes.hasOwnProperty(Ze.attribName))return void(Ze.attribName=Ze.attribValue="");if(Ze.opt.xmlns){var Xe=lt(Ze.attribName,!0),mt=Xe.prefix,Rt=Xe.local;if(mt==="xmlns")if(Rt==="xml"&&Ze.attribValue!==ze)st(Ze,"xml: prefix must be bound to "+ze+`
|
|
|
Actual: `+Ze.attribValue);else if(Rt==="xmlns"&&Ze.attribValue!==je)st(Ze,"xmlns: prefix must be bound to "+je+`
|
|
|
Actual: `+Ze.attribValue);else{var vn=Ze.tag,An=Ze.tags[Ze.tags.length-1]||Ze;vn.ns===An.ns&&(vn.ns=(0,ie.default)(An.ns)),vn.ns[Rt]=Ze.attribValue}Ze.attribList.push([Ze.attribName,Ze.attribValue])}else Ze.tag.attributes[Ze.attribName]=Ze.attribValue,Mt(Ze,"onattribute",{name:Ze.attribName,value:Ze.attribValue});Ze.attribName=Ze.attribValue=""}function bt(Ze,Xe){if(Ze.opt.xmlns){var mt=Ze.tag,Rt=lt(Ze.tagName);mt.prefix=Rt.prefix,mt.local=Rt.local,mt.uri=mt.ns[Rt.prefix]||"",mt.prefix&&!mt.uri&&(st(Ze,"Unbound namespace prefix: "+(0,ge.default)(Ze.tagName)),mt.uri=Rt.prefix);var vn=Ze.tags[Ze.tags.length-1]||Ze;mt.ns&&vn.ns!==mt.ns&&(0,z.default)(mt.ns).forEach(function(Dr){Mt(Ze,"onopennamespace",{prefix:Dr,uri:mt.ns[Dr]})});for(var An=0,Mn=Ze.attribList.length;An<Mn;An++){var hi=Ze.attribList[An],mi=hi[0],si=hi[1],Cn=lt(mi,!0),Ki=Cn.prefix,Yn=Cn.local,Qi=Ki===""?"":mt.ns[Ki]||"",vr={name:mi,value:si,prefix:Ki,local:Yn,uri:Qi};Ki&&Ki!=="xmlns"&&!Qi&&(st(Ze,"Unbound namespace prefix: "+(0,ge.default)(Ki)),vr.uri=Ki),Ze.tag.attributes[mi]=vr,Mt(Ze,"onattribute",vr)}Ze.attribList.length=0}Ze.tag.isSelfClosing=!!Xe,Ze.sawRoot=!0,Ze.tags.push(Ze.tag),Mt(Ze,"onopentag",Ze.tag),Xe||(Ze.noscript||Ze.tagName.toLowerCase()!=="script"?Ze.state=Ue.TEXT:Ze.state=Ue.SCRIPT,Ze.tag=null,Ze.tagName=""),Ze.attribName=Ze.attribValue="",Ze.attribList.length=0}function yt(Ze){if(!Ze.tagName)return st(Ze,"Weird empty close tag."),Ze.textNode+="</>",void(Ze.state=Ue.TEXT);if(Ze.script){if(Ze.tagName!=="script")return Ze.script+="</"+Ze.tagName+">",Ze.tagName="",void(Ze.state=Ue.SCRIPT);Mt(Ze,"onscript",Ze.script),Ze.script=""}var Xe=Ze.tags.length,mt=Ze.tagName;Ze.strict||(mt=mt[Ze.looseCase]());for(var Rt=mt;Xe--&&Ze.tags[Xe].name!==Rt;)st(Ze,"Unexpected close tag");if(Xe<0)return st(Ze,"Unmatched closing tag: "+Ze.tagName),Ze.textNode+="</"+Ze.tagName+">",void(Ze.state=Ue.TEXT);Ze.tagName=mt;for(var vn=Ze.tags.length;vn-- >Xe;){var An=Ze.tag=Ze.tags.pop();Ze.tagName=Ze.tag.name,Mt(Ze,"onclosetag",Ze.tagName);var Mn={};for(var hi in An.ns)Mn[hi]=An.ns[hi];var mi=Ze.tags[Ze.tags.length-1]||Ze;Ze.opt.xmlns&&An.ns!==mi.ns&&(0,z.default)(An.ns).forEach(function(si){var Cn=An.ns[si];Mt(Ze,"onclosenamespace",{prefix:si,uri:Cn})})}Xe===0&&(Ze.closedRoot=!0),Ze.tagName=Ze.attribValue=Ze.attribName="",Ze.attribList.length=0,Ze.state=Ue.TEXT}function Vt(Ze){var Xe,mt=Ze.entity,Rt=mt.toLowerCase(),vn="";return Ze.ENTITIES[mt]?Ze.ENTITIES[mt]:Ze.ENTITIES[Rt]?Ze.ENTITIES[Rt]:(mt=Rt,mt.charAt(0)==="#"&&(mt.charAt(1)==="x"?(mt=mt.slice(2),Xe=parseInt(mt,16),vn=Xe.toString(16)):(mt=mt.slice(1),Xe=parseInt(mt,10),vn=Xe.toString(10))),mt=mt.replace(/^0+/,""),isNaN(Xe)||vn.toLowerCase()!==mt?(st(Ze,"Invalid character entity"),"&"+Ze.entity+";"):(0,ve.default)(Xe))}function Kt(Ze,Xe){Xe==="<"?(Ze.state=Ue.OPEN_WAKA,Ze.startTagPosition=Ze.position):Re(Xe)||(st(Ze,"Non-whitespace before first tag."),Ze.textNode=Xe,Ze.state=Ue.TEXT)}function gn(Ze,Xe){var mt="";return Xe<Ze.length&&(mt=Ze.charAt(Xe)),mt}function Gt(Ze){var Xe=this;if(this.error)throw this.error;if(Xe.closed)return ft(Xe,"Cannot write after close. Assign an onready handler.");if(Ze===null)return $t(Xe);(Ze===void 0?"undefined":(0,xe.default)(Ze))==="object"&&(Ze=Ze.toString());for(var mt=0,Rt="";Rt=gn(Ze,mt++),Xe.c=Rt,!!Rt;)switch(Xe.trackPosition&&(Xe.position++,Rt===`
|
|
|
`?(Xe.line++,Xe.column=0):Xe.column++),Xe.state){case Ue.BEGIN:if(Xe.state=Ue.BEGIN_WHITESPACE,Rt==="\uFEFF")continue;Kt(Xe,Rt);continue;case Ue.BEGIN_WHITESPACE:Kt(Xe,Rt);continue;case Ue.TEXT:if(Xe.sawRoot&&!Xe.closedRoot){for(var vn=mt-1;Rt&&Rt!=="<"&&Rt!=="&";)(Rt=gn(Ze,mt++))&&Xe.trackPosition&&(Xe.position++,Rt===`
|
|
|
`?(Xe.line++,Xe.column=0):Xe.column++);Xe.textNode+=Ze.substring(vn,mt-1)}Rt!=="<"||Xe.sawRoot&&Xe.closedRoot&&!Xe.strict?(Re(Rt)||Xe.sawRoot&&!Xe.closedRoot||st(Xe,"Text data outside of root node."),Rt==="&"?Xe.state=Ue.TEXT_ENTITY:Xe.textNode+=Rt):(Xe.state=Ue.OPEN_WAKA,Xe.startTagPosition=Xe.position);continue;case Ue.SCRIPT:Rt==="<"?Xe.state=Ue.SCRIPT_ENDING:Xe.script+=Rt;continue;case Ue.SCRIPT_ENDING:Rt==="/"?Xe.state=Ue.CLOSE_TAG:(Xe.script+="<"+Rt,Xe.state=Ue.SCRIPT);continue;case Ue.OPEN_WAKA:if(Rt==="!")Xe.state=Ue.SGML_DECL,Xe.sgmlDecl="";else if(!Re(Rt))if(Je(ht,Rt))Xe.state=Ue.OPEN_TAG,Xe.tagName=Rt;else if(Rt==="/")Xe.state=Ue.CLOSE_TAG,Xe.tagName="";else if(Rt==="?")Xe.state=Ue.PROC_INST,Xe.procInstName=Xe.procInstBody="";else{if(st(Xe,"Unencoded <"),Xe.startTagPosition+1<Xe.position){var An=Xe.position-Xe.startTagPosition;Rt=new Array(An).join(" ")+Rt}Xe.textNode+="<"+Rt,Xe.state=Ue.TEXT}continue;case Ue.SGML_DECL:(Xe.sgmlDecl+Rt).toUpperCase()===jt?(Mt(Xe,"onopencdata"),Xe.state=Ue.CDATA,Xe.sgmlDecl="",Xe.cdata=""):Xe.sgmlDecl+Rt==="--"?(Xe.state=Ue.COMMENT,Xe.comment="",Xe.sgmlDecl=""):(Xe.sgmlDecl+Rt).toUpperCase()===ut?(Xe.state=Ue.DOCTYPE,(Xe.doctype||Xe.sawRoot)&&st(Xe,"Inappropriately located doctype declaration"),Xe.doctype="",Xe.sgmlDecl=""):Rt===">"?(Mt(Xe,"onsgmldeclaration",Xe.sgmlDecl),Xe.sgmlDecl="",Xe.state=Ue.TEXT):(We(Rt)&&(Xe.state=Ue.SGML_DECL_QUOTED),Xe.sgmlDecl+=Rt);continue;case Ue.SGML_DECL_QUOTED:Rt===Xe.q&&(Xe.state=Ue.SGML_DECL,Xe.q=""),Xe.sgmlDecl+=Rt;continue;case Ue.DOCTYPE:Rt===">"?(Xe.state=Ue.TEXT,Mt(Xe,"ondoctype",Xe.doctype),Xe.doctype=!0):(Xe.doctype+=Rt,Rt==="["?Xe.state=Ue.DOCTYPE_DTD:We(Rt)&&(Xe.state=Ue.DOCTYPE_QUOTED,Xe.q=Rt));continue;case Ue.DOCTYPE_QUOTED:Xe.doctype+=Rt,Rt===Xe.q&&(Xe.q="",Xe.state=Ue.DOCTYPE);continue;case Ue.DOCTYPE_DTD:Xe.doctype+=Rt,Rt==="]"?Xe.state=Ue.DOCTYPE:We(Rt)&&(Xe.state=Ue.DOCTYPE_DTD_QUOTED,Xe.q=Rt);continue;case Ue.DOCTYPE_DTD_QUOTED:Xe.doctype+=Rt,Rt===Xe.q&&(Xe.state=Ue.DOCTYPE_DTD,Xe.q="");continue;case Ue.COMMENT:Rt==="-"?Xe.state=Ue.COMMENT_ENDING:Xe.comment+=Rt;continue;case Ue.COMMENT_ENDING:Rt==="-"?(Xe.state=Ue.COMMENT_ENDED,Xe.comment=wt(Xe.opt,Xe.comment),Xe.comment&&Mt(Xe,"oncomment",Xe.comment),Xe.comment=""):(Xe.comment+="-"+Rt,Xe.state=Ue.COMMENT);continue;case Ue.COMMENT_ENDED:Rt!==">"?(st(Xe,"Malformed comment"),Xe.comment+="--"+Rt,Xe.state=Ue.COMMENT):Xe.state=Ue.TEXT;continue;case Ue.CDATA:Rt==="]"?Xe.state=Ue.CDATA_ENDING:Xe.cdata+=Rt;continue;case Ue.CDATA_ENDING:Rt==="]"?Xe.state=Ue.CDATA_ENDING_2:(Xe.cdata+="]"+Rt,Xe.state=Ue.CDATA);continue;case Ue.CDATA_ENDING_2:Rt===">"?(Xe.cdata&&Mt(Xe,"oncdata",Xe.cdata),Mt(Xe,"onclosecdata"),Xe.cdata="",Xe.state=Ue.TEXT):Rt==="]"?Xe.cdata+="]":(Xe.cdata+="]]"+Rt,Xe.state=Ue.CDATA);continue;case Ue.PROC_INST:Rt==="?"?Xe.state=Ue.PROC_INST_ENDING:Re(Rt)?Xe.state=Ue.PROC_INST_BODY:Xe.procInstName+=Rt;continue;case Ue.PROC_INST_BODY:if(!Xe.procInstBody&&Re(Rt))continue;Rt==="?"?Xe.state=Ue.PROC_INST_ENDING:Xe.procInstBody+=Rt;continue;case Ue.PROC_INST_ENDING:Rt===">"?(Mt(Xe,"onprocessinginstruction",{name:Xe.procInstName,body:Xe.procInstBody}),Xe.procInstName=Xe.procInstBody="",Xe.state=Ue.TEXT):(Xe.procInstBody+="?"+Rt,Xe.state=Ue.PROC_INST_BODY);continue;case Ue.OPEN_TAG:Je(nt,Rt)?Xe.tagName+=Rt:(et(Xe),Rt===">"?bt(Xe):Rt==="/"?Xe.state=Ue.OPEN_TAG_SLASH:(Re(Rt)||st(Xe,"Invalid character in tag name"),Xe.state=Ue.ATTRIB));continue;case Ue.OPEN_TAG_SLASH:Rt===">"?(bt(Xe,!0),yt(Xe)):(st(Xe,"Forward-slash in opening tag not followed by >"),Xe.state=Ue.ATTRIB);continue;case Ue.ATTRIB:if(Re(Rt))continue;Rt===">"?bt(Xe):Rt==="/"?Xe.state=Ue.OPEN_TAG_SLASH:Je(ht,Rt)?(Xe.attribName=Rt,Xe.attribValue="",Xe.state=Ue.ATTRIB_NAME):st(Xe,"Invalid attribute name");continue;case Ue.ATTRIB_NAME:Rt==="="?Xe.state=Ue.ATTRIB_VALUE:Rt===">"?(st(Xe,"Attribute without value"),Xe.attribValue=Xe.attribName,dt(Xe),bt(Xe)):Re(Rt)?Xe.state=Ue.ATTRIB_NAME_SAW_WHITE:Je(nt,Rt)?Xe.attribName+=Rt:st(Xe,"Invalid attribute name");continue;case Ue.ATTRIB_NAME_SAW_WHITE:if(Rt==="=")Xe.state=Ue.ATTRIB_VALUE;else{if(Re(Rt))continue;st(Xe,"Attribute without value"),Xe.tag.attributes[Xe.attribName]="",Xe.attribValue="",Mt(Xe,"onattribute",{name:Xe.attribName,value:""}),Xe.attribName="",Rt===">"?bt(Xe):Je(ht,Rt)?(Xe.attribName=Rt,Xe.state=Ue.ATTRIB_NAME):(st(Xe,"Invalid attribute name"),Xe.state=Ue.ATTRIB)}continue;case Ue.ATTRIB_VALUE:if(Re(Rt))continue;We(Rt)?(Xe.q=Rt,Xe.state=Ue.ATTRIB_VALUE_QUOTED):(st(Xe,"Unquoted attribute value"),Xe.state=Ue.ATTRIB_VALUE_UNQUOTED,Xe.attribValue=Rt);continue;case Ue.ATTRIB_VALUE_QUOTED:if(Rt!==Xe.q){Rt==="&"?Xe.state=Ue.ATTRIB_VALUE_ENTITY_Q:Xe.attribValue+=Rt;continue}dt(Xe),Xe.q="",Xe.state=Ue.ATTRIB_VALUE_CLOSED;continue;case Ue.ATTRIB_VALUE_CLOSED:Re(Rt)?Xe.state=Ue.ATTRIB:Rt===">"?bt(Xe):Rt==="/"?Xe.state=Ue.OPEN_TAG_SLASH:Je(ht,Rt)?(st(Xe,"No whitespace between attributes"),Xe.attribName=Rt,Xe.attribValue="",Xe.state=Ue.ATTRIB_NAME):st(Xe,"Invalid attribute name");continue;case Ue.ATTRIB_VALUE_UNQUOTED:if(!$e(Rt)){Rt==="&"?Xe.state=Ue.ATTRIB_VALUE_ENTITY_U:Xe.attribValue+=Rt;continue}dt(Xe),Rt===">"?bt(Xe):Xe.state=Ue.ATTRIB;continue;case Ue.CLOSE_TAG:if(Xe.tagName)Rt===">"?yt(Xe):Je(nt,Rt)?Xe.tagName+=Rt:Xe.script?(Xe.script+="</"+Xe.tagName,Xe.tagName="",Xe.state=Ue.SCRIPT):(Re(Rt)||st(Xe,"Invalid tagname in closing tag"),Xe.state=Ue.CLOSE_TAG_SAW_WHITE);else{if(Re(Rt))continue;pt(ht,Rt)?Xe.script?(Xe.script+="</"+Rt,Xe.state=Ue.SCRIPT):st(Xe,"Invalid tagname in closing tag."):Xe.tagName=Rt}continue;case Ue.CLOSE_TAG_SAW_WHITE:if(Re(Rt))continue;Rt===">"?yt(Xe):st(Xe,"Invalid characters in closing tag");continue;case Ue.TEXT_ENTITY:case Ue.ATTRIB_VALUE_ENTITY_Q:case Ue.ATTRIB_VALUE_ENTITY_U:var Mn,hi;switch(Xe.state){case Ue.TEXT_ENTITY:Mn=Ue.TEXT,hi="textNode";break;case Ue.ATTRIB_VALUE_ENTITY_Q:Mn=Ue.ATTRIB_VALUE_QUOTED,hi="attribValue";break;case Ue.ATTRIB_VALUE_ENTITY_U:Mn=Ue.ATTRIB_VALUE_UNQUOTED,hi="attribValue"}Rt===";"?(Xe[hi]+=Vt(Xe),Xe.entity="",Xe.state=Mn):Je(Xe.entity.length?Be:Ke,Rt)?Xe.entity+=Rt:(st(Xe,"Invalid character in entity name"),Xe[hi]+="&"+Xe.entity+Rt,Xe.entity="",Xe.state=Mn);continue;default:throw new Error(Xe,"Unknown state: "+Xe.state)}return Xe.position>=Xe.bufferCheckPosition&&Se(Xe),Xe}se.parser=function(Ze,Xe){return new le(Ze,Xe)},se.SAXParser=le,se.SAXStream=Oe,se.createStream=Ae,se.MAX_BUFFER_LENGTH=65536;var Dt=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];se.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],ie.default||(Object.create=function(Ze){function Xe(){}return Xe.prototype=Ze,new Xe}),z.default||(Object.keys=function(Ze){var Xe=[];for(var mt in Ze)Ze.hasOwnProperty(mt)&&Xe.push(mt);return Xe}),le.prototype={end:function(){$t(this)},write:Gt,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){Ce(this)}};var on;try{on=ye("stream").Stream}catch(Ze){on=function(){}}var Jt=se.EVENTS.filter(function(Ze){return Ze!=="error"&&Ze!=="end"});Oe.prototype=(0,ie.default)(on.prototype,{constructor:{value:Oe}}),Oe.prototype.write=function(Ze){if(typeof Ee=="function"&&typeof Ee.isBuffer=="function"&&Ee.isBuffer(Ze)){if(!this._decoder){var Xe=ye("string_decoder").StringDecoder;this._decoder=new Xe("utf8")}Ze=this._decoder.write(Ze)}return this._parser.write(Ze.toString()),this.emit("data",Ze),!0},Oe.prototype.end=function(Ze){return Ze&&Ze.length&&this.write(Ze),this._parser.end(),!0},Oe.prototype.on=function(Ze,Xe){var mt=this;return mt._parser["on"+Ze]||Jt.indexOf(Ze)===-1||(mt._parser["on"+Ze]=function(){var Rt=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Rt.splice(0,0,Ze),mt.emit.apply(mt,Rt)}),on.prototype.on.call(mt,Ze,Xe)};var jt="[CDATA[",ut="DOCTYPE",ze="http://www.w3.org/XML/1998/namespace",je="http://www.w3.org/2000/xmlns/",it={xml:ze,xmlns:je},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]/,nt=/[:_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-]/,Ke=/[#:_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]/,Be=/[#:_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-]/,Ue=0;se.STATE={BEGIN:Ue++,BEGIN_WHITESPACE:Ue++,TEXT:Ue++,TEXT_ENTITY:Ue++,OPEN_WAKA:Ue++,SGML_DECL:Ue++,SGML_DECL_QUOTED:Ue++,DOCTYPE:Ue++,DOCTYPE_QUOTED:Ue++,DOCTYPE_DTD:Ue++,DOCTYPE_DTD_QUOTED:Ue++,COMMENT_STARTING:Ue++,COMMENT:Ue++,COMMENT_ENDING:Ue++,COMMENT_ENDED:Ue++,CDATA:Ue++,CDATA_ENDING:Ue++,CDATA_ENDING_2:Ue++,PROC_INST:Ue++,PROC_INST_BODY:Ue++,PROC_INST_ENDING:Ue++,OPEN_TAG:Ue++,OPEN_TAG_SLASH:Ue++,ATTRIB:Ue++,ATTRIB_NAME:Ue++,ATTRIB_NAME_SAW_WHITE:Ue++,ATTRIB_VALUE:Ue++,ATTRIB_VALUE_QUOTED:Ue++,ATTRIB_VALUE_CLOSED:Ue++,ATTRIB_VALUE_UNQUOTED:Ue++,ATTRIB_VALUE_ENTITY_Q:Ue++,ATTRIB_VALUE_ENTITY_U:Ue++,CLOSE_TAG:Ue++,CLOSE_TAG_SAW_WHITE:Ue++,SCRIPT:Ue++,SCRIPT_ENDING:Ue++},se.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},se.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)(se.ENTITIES).forEach(function(Ze){var Xe=se.ENTITIES[Ze],mt=typeof Xe=="number"?String.fromCharCode(Xe):Xe;se.ENTITIES[Ze]=mt});for(var rt in se.STATE)se.STATE[se.STATE[rt]]=rt;Ue=se.STATE,ve.default||function(){var Ze=String.fromCharCode,Xe=Math.floor,mt=function(){var Rt,vn,An=[],Mn=-1,hi=arguments.length;if(!hi)return"";for(var mi="";++Mn<hi;){var si=Number(arguments[Mn]);if(!isFinite(si)||si<0||si>1114111||Xe(si)!==si)throw RangeError("Invalid code point: "+si);si<=65535?An.push(si):(si-=65536,Rt=55296+(si>>10),vn=si%1024+56320,An.push(Rt,vn)),(Mn+1===hi||An.length>16384)&&(mi+=Ze.apply(null,An),An.length=0)}return mi};ue.default?Object.defineProperty(String,"fromCodePoint",{value:mt,configurable:!0,writable:!0}):String.fromCodePoint=mt}()})(Me===void 0?(void 0).sax={}:Me)}).call(this,ye("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(ye,Fe,Me){function Ee(){me.call(this)}Fe.exports=Ee;var me=ye("events").EventEmitter;ye("inherits")(Ee,me),Ee.Readable=ye("readable-stream/readable.js"),Ee.Writable=ye("readable-stream/writable.js"),Ee.Duplex=ye("readable-stream/duplex.js"),Ee.Transform=ye("readable-stream/transform.js"),Ee.PassThrough=ye("readable-stream/passthrough.js"),Ee.Stream=Ee,Ee.prototype.pipe=function(be,ve){function we(oe){be.writable&&be.write(oe)===!1&&ee.pause&&ee.pause()}function ge(){ee.readable&&ee.resume&&ee.resume()}function he(){z||(z=!0,be.end())}function xe(){z||(z=!0,typeof be.destroy=="function"&&be.destroy())}function fe(oe){if(ue(),me.listenerCount(this,"error")===0)throw oe}function ue(){ee.removeListener("data",we),be.removeListener("drain",ge),ee.removeListener("end",he),ee.removeListener("close",xe),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",ge),be._isStdio||ve&&ve.end===!1||(ee.on("end",he),ee.on("close",xe));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(ye,Fe,Me){(function(Ee){var me=ye("./lib/request"),be=ye("./lib/response"),ve=ye("xtend"),we=ye("builtin-status-codes"),ge=ye("url"),he=Me;he.request=function(xe,fe){xe=typeof xe=="string"?ge.parse(xe):ve(xe);var ue=Ee.location.protocol.search(/^https?:$/)===-1?"http:":"",ee=xe.protocol||ue,z=xe.hostname||xe.host,oe=xe.port,ie=xe.path||"/";z&&z.indexOf(":")!==-1&&(z="["+z+"]"),xe.url=(z?ee+"//"+z:"")+(oe?":"+oe:"")+ie,xe.method=(xe.method||"GET").toUpperCase(),xe.headers=xe.headers||{};var se=new me(xe);return fe&&se.on("response",fe),se},he.get=function(xe,fe){var ue=he.request(xe,fe);return ue.end(),ue},he.ClientRequest=me,he.IncomingMessage=be.IncomingMessage,he.Agent=function(){},he.Agent.defaultMaxSockets=4,he.globalAgent=new he.Agent,he.STATUS_CODES=we,he.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 De.g!="undefined"?De.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(ye,Fe,Me){(function(Ee){"use strict";function me(){if(we!==void 0)return we;if(Ee.XMLHttpRequest){we=new Ee.XMLHttpRequest;try{we.open("GET",Ee.XDomainRequest?"/":"https://example.com")}catch(xe){we=null}}else we=null;return we}function be(xe){var fe=me();if(!fe)return!1;try{return fe.responseType=xe,fe.responseType===xe}catch(ue){}return!1}function ve(xe){return typeof xe=="function"}Me.fetch=ve(Ee.fetch)&&ve(Ee.ReadableStream),Me.writableStream=ve(Ee.WritableStream),Me.abortController=ve(Ee.AbortController),Me.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),Me.blobConstructor=!0}catch(xe){}var we,ge=Ee.ArrayBuffer!==void 0,he=ge&&ve(Ee.ArrayBuffer.prototype.slice);Me.arraybuffer=Me.fetch||ge&&be("arraybuffer"),Me.msstream=!Me.fetch&&he&&be("ms-stream"),Me.mozchunkedarraybuffer=!Me.fetch&&ge&&be("moz-chunked-arraybuffer"),Me.overrideMimeType=Me.fetch||!!me()&&ve(me().overrideMimeType),Me.vbArray=ve(Ee.VBArray),we=null}).call(this,typeof De.g!="undefined"?De.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],198:[function(ye,Fe,Me){(function(Ee,me,be){"use strict";function ve(Se,pe){return xe.fetch&&pe?"fetch":xe.mozchunkedarraybuffer?"moz-chunked-arraybuffer":xe.msstream?"ms-stream":xe.arraybuffer&&Se?"arraybuffer":xe.vbArray&&Se?"text:vbarray":"text"}function we(Se){try{var pe=Se.status;return pe!==null&&pe!==0}catch(Ce){return!1}}var ge=ye("babel-runtime/core-js/object/keys"),he=function(Se){return Se&&Se.__esModule?Se:{default:Se}}(ge),xe=ye("./capability"),fe=ye("inherits"),ue=ye("./response"),ee=ye("readable-stream"),z=ye("to-arraybuffer"),oe=ue.IncomingMessage,ie=ue.readyStates,se=Fe.exports=function(Se){var pe=this;ee.Writable.call(pe),pe._opts=Se,pe._body=[],pe._headers={},Se.auth&&pe.setHeader("Authorization","Basic "+new be(Se.auth).toString("base64")),(0,he.default)(Se.headers).forEach(function(Oe){pe.setHeader(Oe,Se.headers[Oe])});var Ce,Ae=!0;if(Se.mode==="disable-fetch"||"requestTimeout"in Se&&!xe.abortController)Ae=!1,Ce=!0;else if(Se.mode==="prefer-streaming")Ce=!1;else if(Se.mode==="allow-wrong-content-type")Ce=!xe.overrideMimeType;else{if(Se.mode&&Se.mode!=="default"&&Se.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");Ce=!0}pe._mode=ve(Ce,Ae),pe._fetchTimer=null,pe.on("finish",function(){pe._onFinish()})};fe(se,ee.Writable),se.prototype.setHeader=function(Se,pe){var Ce=this,Ae=Se.toLowerCase();le.indexOf(Ae)===-1&&(Ce._headers[Ae]={name:Se,value:pe})},se.prototype.getHeader=function(Se){var pe=this._headers[Se.toLowerCase()];return pe?pe.value:null},se.prototype.removeHeader=function(Se){delete this._headers[Se.toLowerCase()]},se.prototype._onFinish=function(){var Se=this;if(!Se._destroyed){var pe=Se._opts,Ce=Se._headers,Ae=null;pe.method!=="GET"&&pe.method!=="HEAD"&&(Ae=xe.arraybuffer?z(be.concat(Se._body)):xe.blobConstructor?new me.Blob(Se._body.map(function(Je){return z(Je)}),{type:(Ce["content-type"]||{}).value||""}):be.concat(Se._body).toString());var Oe=[];if((0,he.default)(Ce).forEach(function(Je){var pt=Ce[Je].name,St=Ce[Je].value;Array.isArray(St)?St.forEach(function(Mt){Oe.push([pt,Mt])}):Oe.push([pt,St])}),Se._mode==="fetch"){var Re=null;if(xe.abortController){var We=new AbortController;Re=We.signal,Se._fetchAbortController=We,"requestTimeout"in pe&&pe.requestTimeout!==0&&(Se._fetchTimer=me.setTimeout(function(){Se.emit("requestTimeout"),Se._fetchAbortController&&Se._fetchAbortController.abort()},pe.requestTimeout))}me.fetch(Se._opts.url,{method:Se._opts.method,headers:Oe,body:Ae||void 0,mode:"cors",credentials:pe.withCredentials?"include":"same-origin",signal:Re}).then(function(Je){Se._fetchResponse=Je,Se._connect()},function(Je){me.clearTimeout(Se._fetchTimer),Se._destroyed||Se.emit("error",Je)})}else{var $e=Se._xhr=new me.XMLHttpRequest;try{$e.open(Se._opts.method,Se._opts.url,!0)}catch(Je){return void Ee.nextTick(function(){Se.emit("error",Je)})}"responseType"in $e&&($e.responseType=Se._mode.split(":")[0]),"withCredentials"in $e&&($e.withCredentials=!!pe.withCredentials),Se._mode==="text"&&"overrideMimeType"in $e&&$e.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in pe&&($e.timeout=pe.requestTimeout,$e.ontimeout=function(){Se.emit("requestTimeout")}),Oe.forEach(function(Je){$e.setRequestHeader(Je[0],Je[1])}),Se._response=null,$e.onreadystatechange=function(){switch($e.readyState){case ie.LOADING:case ie.DONE:Se._onXHRProgress()}},Se._mode==="moz-chunked-arraybuffer"&&($e.onprogress=function(){Se._onXHRProgress()}),$e.onerror=function(){Se._destroyed||Se.emit("error",new Error("XHR error"))};try{$e.send(Ae)}catch(Je){return void Ee.nextTick(function(){Se.emit("error",Je)})}}}},se.prototype._onXHRProgress=function(){var Se=this;we(Se._xhr)&&!Se._destroyed&&(Se._response||Se._connect(),Se._response._onXHRProgress())},se.prototype._connect=function(){var Se=this;Se._destroyed||(Se._response=new oe(Se._xhr,Se._fetchResponse,Se._mode,Se._fetchTimer),Se._response.on("error",function(pe){Se.emit("error",pe)}),Se.emit("response",Se._response))},se.prototype._write=function(Se,pe,Ce){this._body.push(Se),Ce()},se.prototype.abort=se.prototype.destroy=function(){var Se=this;Se._destroyed=!0,me.clearTimeout(Se._fetchTimer),Se._response&&(Se._response._destroyed=!0),Se._xhr?Se._xhr.abort():Se._fetchAbortController&&Se._fetchAbortController.abort()},se.prototype.end=function(Se,pe,Ce){var Ae=this;typeof Se=="function"&&(Ce=Se,Se=void 0),ee.Writable.prototype.end.call(Ae,Se,pe,Ce)},se.prototype.flushHeaders=function(){},se.prototype.setTimeout=function(){},se.prototype.setNoDelay=function(){},se.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,ye("_process"),typeof De.g!="undefined"?De.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ye("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(ye,Fe,Me){(function(Ee,me,be){"use strict";var ve=ye("babel-runtime/core-js/promise"),we=function(ee){return ee&&ee.__esModule?ee:{default:ee}}(ve),ge=ye("./capability"),he=ye("inherits"),xe=ye("readable-stream"),fe=Me.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},ue=Me.IncomingMessage=function(ee,z,oe,ie){var se=this;if(xe.Readable.call(se),se._mode=oe,se.headers={},se.rawHeaders=[],se.trailers={},se.rawTrailers=[],se.on("end",function(){Ee.nextTick(function(){se.emit("close")})}),oe==="fetch"){if(se._fetchResponse=z,se.url=z.url,se.statusCode=z.status,se.statusMessage=z.statusText,z.headers.forEach(function(Ae,Oe){se.headers[Oe.toLowerCase()]=Ae,se.rawHeaders.push(Oe,Ae)}),ge.writableStream){var le=new WritableStream({write:function(Ae){return new we.default(function(Oe,Re){se._destroyed?Re():se.push(new be(Ae))?Oe():se._resumeFetch=Oe})},close:function(){me.clearTimeout(ie),se._destroyed||se.push(null)},abort:function(Ae){se._destroyed||se.emit("error",Ae)}});try{return void z.body.pipeTo(le).catch(function(Ae){me.clearTimeout(ie),se._destroyed||se.emit("error",Ae)})}catch(Ae){}}var Se=z.body.getReader();(function Ae(){Se.read().then(function(Oe){if(!se._destroyed){if(Oe.done)return me.clearTimeout(ie),void se.push(null);se.push(new be(Oe.value)),Ae()}}).catch(function(Oe){me.clearTimeout(ie),se._destroyed||se.emit("error",Oe)})})()}else if(se._xhr=ee,se._pos=0,se.url=ee.responseURL,se.statusCode=ee.status,se.statusMessage=ee.statusText,ee.getAllResponseHeaders().split(/\r?\n/).forEach(function(Ae){var Oe=Ae.match(/^([^:]+):\s*(.*)/);if(Oe){var Re=Oe[1].toLowerCase();Re==="set-cookie"?(se.headers[Re]===void 0&&(se.headers[Re]=[]),se.headers[Re].push(Oe[2])):se.headers[Re]!==void 0?se.headers[Re]+=", "+Oe[2]:se.headers[Re]=Oe[2],se.rawHeaders.push(Oe[1],Oe[2])}}),se._charset="x-user-defined",!ge.overrideMimeType){var pe=se.rawHeaders["mime-type"];if(pe){var Ce=pe.match(/;\s*charset=([^;])(;|$)/);Ce&&(se._charset=Ce[1].toLowerCase())}se._charset||(se._charset="utf-8")}};he(ue,xe.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 me.VBArray(z.responseBody).toArray()}catch(pe){}if(oe!==null){ee.push(new be(oe));break}case"text":try{oe=z.responseText}catch(pe){ee._mode="text:vbarray";break}if(oe.length>ee._pos){var ie=oe.substr(ee._pos);if(ee._charset==="x-user-defined"){for(var se=new be(ie.length),le=0;le<ie.length;le++)se[le]=255&ie.charCodeAt(le);ee.push(se)}else ee.push(ie,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 Se=new me.MSStreamReader;Se.onprogress=function(){Se.result.byteLength>ee._pos&&(ee.push(new be(new Uint8Array(Se.result.slice(ee._pos)))),ee._pos=Se.result.byteLength)},Se.onload=function(){ee.push(null)},Se.readAsArrayBuffer(oe)}ee._xhr.readyState===fe.DONE&&ee._mode!=="ms-stream"&&ee.push(null)}}).call(this,ye("_process"),typeof De.g!="undefined"?De.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ye("buffer").Buffer)},{"./capability":197,_process:173,"babel-runtime/core-js/promise":24,buffer:38,inherits:162,"readable-stream":188}],200:[function(ye,Fe,Me){"use strict";function Ee(pe){if(!pe)return"utf8";for(var Ce;;)switch(pe){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 pe;default:if(Ce)return;pe=(""+pe).toLowerCase(),Ce=!0}}function me(pe){var Ce=Ee(pe);if(typeof Ce!="string"&&(le.isEncoding===Se||!Se(pe)))throw new Error("Unknown encoding: "+pe);return Ce||pe}function be(pe){this.encoding=me(pe);var Ce;switch(this.encoding){case"utf16le":this.text=ue,this.end=ee,Ce=4;break;case"utf8":this.fillLast=he,Ce=4;break;case"base64":this.text=z,this.end=oe,Ce=3;break;default:return this.write=ie,void(this.end=se)}this.lastNeed=0,this.lastTotal=0,this.lastChar=le.allocUnsafe(Ce)}function ve(pe){return pe<=127?0:pe>>5==6?2:pe>>4==14?3:pe>>3==30?4:pe>>6==2?-1:-2}function we(pe,Ce,Ae){var Oe=Ce.length-1;if(Oe<Ae)return 0;var Re=ve(Ce[Oe]);return Re>=0?(Re>0&&(pe.lastNeed=Re-1),Re):--Oe<Ae||Re===-2?0:(Re=ve(Ce[Oe]))>=0?(Re>0&&(pe.lastNeed=Re-2),Re):--Oe<Ae||Re===-2?0:(Re=ve(Ce[Oe]),Re>=0?(Re>0&&(Re===2?Re=0:pe.lastNeed=Re-3),Re):0)}function ge(pe,Ce,Ae){if((192&Ce[0])!=128)return pe.lastNeed=0,"\u951F\uFFFD";if(pe.lastNeed>1&&Ce.length>1){if((192&Ce[1])!=128)return pe.lastNeed=1,"\u951F\uFFFD";if(pe.lastNeed>2&&Ce.length>2&&(192&Ce[2])!=128)return pe.lastNeed=2,"\u951F\uFFFD"}}function he(pe){var Ce=this.lastTotal-this.lastNeed,Ae=ge(this,pe,Ce);return Ae!==void 0?Ae:this.lastNeed<=pe.length?(pe.copy(this.lastChar,Ce,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(pe.copy(this.lastChar,Ce,0,pe.length),void(this.lastNeed-=pe.length))}function xe(pe,Ce){var Ae=we(this,pe,Ce);if(!this.lastNeed)return pe.toString("utf8",Ce);this.lastTotal=Ae;var Oe=pe.length-(Ae-this.lastNeed);return pe.copy(this.lastChar,0,Oe),pe.toString("utf8",Ce,Oe)}function fe(pe){var Ce=pe&&pe.length?this.write(pe):"";return this.lastNeed?Ce+"\u951F\uFFFD":Ce}function ue(pe,Ce){if((pe.length-Ce)%2==0){var Ae=pe.toString("utf16le",Ce);if(Ae){var Oe=Ae.charCodeAt(Ae.length-1);if(Oe>=55296&&Oe<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=pe[pe.length-2],this.lastChar[1]=pe[pe.length-1],Ae.slice(0,-1)}return Ae}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=pe[pe.length-1],pe.toString("utf16le",Ce,pe.length-1)}function ee(pe){var Ce=pe&&pe.length?this.write(pe):"";if(this.lastNeed){var Ae=this.lastTotal-this.lastNeed;return Ce+this.lastChar.toString("utf16le",0,Ae)}return Ce}function z(pe,Ce){var Ae=(pe.length-Ce)%3;return Ae===0?pe.toString("base64",Ce):(this.lastNeed=3-Ae,this.lastTotal=3,Ae===1?this.lastChar[0]=pe[pe.length-1]:(this.lastChar[0]=pe[pe.length-2],this.lastChar[1]=pe[pe.length-1]),pe.toString("base64",Ce,pe.length-Ae))}function oe(pe){var Ce=pe&&pe.length?this.write(pe):"";return this.lastNeed?Ce+this.lastChar.toString("base64",0,3-this.lastNeed):Ce}function ie(pe){return pe.toString(this.encoding)}function se(pe){return pe&&pe.length?this.write(pe):""}var le=ye("safe-buffer").Buffer,Se=le.isEncoding||function(pe){switch((pe=""+pe)&&pe.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(pe){if(pe.length===0)return"";var Ce,Ae;if(this.lastNeed){if((Ce=this.fillLast(pe))===void 0)return"";Ae=this.lastNeed,this.lastNeed=0}else Ae=0;return Ae<pe.length?Ce?Ce+this.text(pe,Ae):this.text(pe,Ae):Ce||""},be.prototype.end=fe,be.prototype.text=xe,be.prototype.fillLast=function(pe){if(this.lastNeed<=pe.length)return pe.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);pe.copy(this.lastChar,this.lastTotal-this.lastNeed,0,pe.length),this.lastNeed-=pe.length}},{"safe-buffer":193}],201:[function(ye,Fe,Me){(function(Ee,me){function be(fe,ue){this._id=fe,this._clearFn=ue}var ve=ye("process/browser.js").nextTick,we=Function.prototype.apply,ge=Array.prototype.slice,he={},xe=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 Ee=="function"?Ee:function(fe){var ue=xe++,ee=!(arguments.length<2)&&ge.call(arguments,1);return he[ue]=!0,ve(function(){he[ue]&&(ee?fe.apply(null,ee):fe.call(null),Me.clearImmediate(ue))}),ue},Me.clearImmediate=typeof me=="function"?me:function(fe){delete he[fe]}}).call(this,ye("timers").setImmediate,ye("timers").clearImmediate)},{"process/browser.js":173,timers:201}],202:[function(ye,Fe,Me){var Ee=ye("buffer").Buffer;Fe.exports=function(me){if(me instanceof Uint8Array){if(me.byteOffset===0&&me.byteLength===me.buffer.byteLength)return me.buffer;if(typeof me.buffer.slice=="function")return me.buffer.slice(me.byteOffset,me.byteOffset+me.byteLength)}if(Ee.isBuffer(me)){for(var be=new Uint8Array(me.length),ve=me.length,we=0;we<ve;we++)be[we]=me[we];return be.buffer}throw new Error("Argument must be a Buffer")}},{buffer:38}],203:[function(ye,Fe,Me){"use strict";function Ee(){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 me(Re,We,$e){if(Re&&he.isObject(Re)&&Re instanceof Ee)return Re;var Je=new Ee;return Je.parse(Re,We,$e),Je}function be(Re){return he.isString(Re)&&(Re=me(Re)),Re instanceof Ee?Re.format():Ee.prototype.format.call(Re)}function ve(Re,We){return me(Re,!1,!0).resolve(We)}function we(Re,We){return Re?me(Re,!1,!0).resolveObject(We):We}var ge=ye("punycode"),he=ye("./util");Me.parse=me,Me.resolve=ve,Me.resolveObject=we,Me.format=be,Me.Url=Ee;var xe=/^([a-z0-9.+-]+:)/i,fe=/:[0-9]*$/,ue=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,ee=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],z=["{","}","|","\\","^","`"].concat(ee),oe=["'"].concat(z),ie=["%","/","?",";","#"].concat(oe),se=["/","?","#"],le=/^[+a-z0-9A-Z_-]{0,63}$/,Se=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,pe={javascript:!0,"javascript:":!0},Ce={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},Oe=ye("querystring");Ee.prototype.parse=function(Re,We,$e){if(!he.isString(Re))throw new TypeError("Parameter 'url' must be a string, not "+typeof Re);var Je=Re.indexOf("?"),pt=Je!==-1&&Je<Re.indexOf("#")?"?":"#",St=Re.split(pt),Mt=/\\/g;St[0]=St[0].replace(Mt,"/"),Re=St.join(pt);var ct=Re;if(ct=ct.trim(),!$e&&Re.split("#").length===1){var wt=ue.exec(ct);if(wt)return this.path=ct,this.href=ct,this.pathname=wt[1],wt[2]?(this.search=wt[2],this.query=We?Oe.parse(this.search.substr(1)):this.search.substr(1)):We&&(this.search="",this.query={}),this}var ft=xe.exec(ct);if(ft){ft=ft[0];var $t=ft.toLowerCase();this.protocol=$t,ct=ct.substr(ft.length)}if($e||ft||ct.match(/^\/\/[^@\/]+@[^@\/]+/)){var st=ct.substr(0,2)==="//";!st||ft&&Ce[ft]||(ct=ct.substr(2),this.slashes=!0)}if(!Ce[ft]&&(st||ft&&!Ae[ft])){for(var et=-1,lt=0;lt<se.length;lt++){var dt=ct.indexOf(se[lt]);dt!==-1&&(et===-1||dt<et)&&(et=dt)}var bt,yt;yt=et===-1?ct.lastIndexOf("@"):ct.lastIndexOf("@",et),yt!==-1&&(bt=ct.slice(0,yt),ct=ct.slice(yt+1),this.auth=decodeURIComponent(bt)),et=-1;for(var lt=0;lt<ie.length;lt++){var dt=ct.indexOf(ie[lt]);dt!==-1&&(et===-1||dt<et)&&(et=dt)}et===-1&&(et=ct.length),this.host=ct.slice(0,et),ct=ct.slice(et),this.parseHost(),this.hostname=this.hostname||"";var Vt=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Vt)for(var Kt=this.hostname.split(/\./),lt=0,gn=Kt.length;lt<gn;lt++){var Gt=Kt[lt];if(Gt&&!Gt.match(le)){for(var Dt="",on=0,Jt=Gt.length;on<Jt;on++)Gt.charCodeAt(on)>127?Dt+="x":Dt+=Gt[on];if(!Dt.match(le)){var jt=Kt.slice(0,lt),ut=Kt.slice(lt+1),ze=Gt.match(Se);ze&&(jt.push(ze[1]),ut.unshift(ze[2])),ut.length&&(ct="/"+ut.join(".")+ct),this.hostname=jt.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),Vt||(this.hostname=ge.toASCII(this.hostname));var je=this.port?":"+this.port:"",it=this.hostname||"";this.host=it+je,this.href+=this.host,Vt&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),ct[0]!=="/"&&(ct="/"+ct))}if(!pe[$t])for(var lt=0,gn=oe.length;lt<gn;lt++){var ht=oe[lt];if(ct.indexOf(ht)!==-1){var nt=encodeURIComponent(ht);nt===ht&&(nt=escape(ht)),ct=ct.split(ht).join(nt)}}var Ke=ct.indexOf("#");Ke!==-1&&(this.hash=ct.substr(Ke),ct=ct.slice(0,Ke));var Be=ct.indexOf("?");if(Be!==-1?(this.search=ct.substr(Be),this.query=ct.substr(Be+1),We&&(this.query=Oe.parse(this.query)),ct=ct.slice(0,Be)):We&&(this.search="",this.query={}),ct&&(this.pathname=ct),Ae[$t]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var je=this.pathname||"",Ue=this.search||"";this.path=je+Ue}return this.href=this.format(),this},Ee.prototype.format=function(){var Re=this.auth||"";Re&&(Re=encodeURIComponent(Re),Re=Re.replace(/%3A/i,":"),Re+="@");var We=this.protocol||"",$e=this.pathname||"",Je=this.hash||"",pt=!1,St="";this.host?pt=Re+this.host:this.hostname&&(pt=Re+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(pt+=":"+this.port)),this.query&&he.isObject(this.query)&&Object.keys(this.query).length&&(St=Oe.stringify(this.query));var Mt=this.search||St&&"?"+St||"";return We&&We.substr(-1)!==":"&&(We+=":"),this.slashes||(!We||Ae[We])&&pt!==!1?(pt="//"+(pt||""),$e&&$e.charAt(0)!=="/"&&($e="/"+$e)):pt||(pt=""),Je&&Je.charAt(0)!=="#"&&(Je="#"+Je),Mt&&Mt.charAt(0)!=="?"&&(Mt="?"+Mt),$e=$e.replace(/[?#]/g,function(ct){return encodeURIComponent(ct)}),Mt=Mt.replace("#","%23"),We+pt+$e+Mt+Je},Ee.prototype.resolve=function(Re){return this.resolveObject(me(Re,!1,!0)).format()},Ee.prototype.resolveObject=function(Re){if(he.isString(Re)){var We=new Ee;We.parse(Re,!1,!0),Re=We}for(var $e=new Ee,Je=Object.keys(this),pt=0;pt<Je.length;pt++){var St=Je[pt];$e[St]=this[St]}if($e.hash=Re.hash,Re.href==="")return $e.href=$e.format(),$e;if(Re.slashes&&!Re.protocol){for(var Mt=Object.keys(Re),ct=0;ct<Mt.length;ct++){var wt=Mt[ct];wt!=="protocol"&&($e[wt]=Re[wt])}return Ae[$e.protocol]&&$e.hostname&&!$e.pathname&&($e.path=$e.pathname="/"),$e.href=$e.format(),$e}if(Re.protocol&&Re.protocol!==$e.protocol){if(!Ae[Re.protocol]){for(var ft=Object.keys(Re),$t=0;$t<ft.length;$t++){var st=ft[$t];$e[st]=Re[st]}return $e.href=$e.format(),$e}if($e.protocol=Re.protocol,Re.host||Ce[Re.protocol])$e.pathname=Re.pathname;else{for(var gn=(Re.pathname||"").split("/");gn.length&&!(Re.host=gn.shift()););Re.host||(Re.host=""),Re.hostname||(Re.hostname=""),gn[0]!==""&&gn.unshift(""),gn.length<2&&gn.unshift(""),$e.pathname=gn.join("/")}if($e.search=Re.search,$e.query=Re.query,$e.host=Re.host||"",$e.auth=Re.auth,$e.hostname=Re.hostname||Re.host,$e.port=Re.port,$e.pathname||$e.search){var et=$e.pathname||"",lt=$e.search||"";$e.path=et+lt}return $e.slashes=$e.slashes||Re.slashes,$e.href=$e.format(),$e}var dt=$e.pathname&&$e.pathname.charAt(0)==="/",bt=Re.host||Re.pathname&&Re.pathname.charAt(0)==="/",yt=bt||dt||$e.host&&Re.pathname,Vt=yt,Kt=$e.pathname&&$e.pathname.split("/")||[],gn=Re.pathname&&Re.pathname.split("/")||[],Gt=$e.protocol&&!Ae[$e.protocol];if(Gt&&($e.hostname="",$e.port=null,$e.host&&(Kt[0]===""?Kt[0]=$e.host:Kt.unshift($e.host)),$e.host="",Re.protocol&&(Re.hostname=null,Re.port=null,Re.host&&(gn[0]===""?gn[0]=Re.host:gn.unshift(Re.host)),Re.host=null),yt=yt&&(gn[0]===""||Kt[0]==="")),bt)$e.host=Re.host||Re.host===""?Re.host:$e.host,$e.hostname=Re.hostname||Re.hostname===""?Re.hostname:$e.hostname,$e.search=Re.search,$e.query=Re.query,Kt=gn;else if(gn.length)Kt||(Kt=[]),Kt.pop(),Kt=Kt.concat(gn),$e.search=Re.search,$e.query=Re.query;else if(!he.isNullOrUndefined(Re.search)){if(Gt){$e.hostname=$e.host=Kt.shift();var Dt=!!($e.host&&$e.host.indexOf("@")>0)&&$e.host.split("@");Dt&&($e.auth=Dt.shift(),$e.host=$e.hostname=Dt.shift())}return $e.search=Re.search,$e.query=Re.query,he.isNull($e.pathname)&&he.isNull($e.search)||($e.path=($e.pathname?$e.pathname:"")+($e.search?$e.search:"")),$e.href=$e.format(),$e}if(!Kt.length)return $e.pathname=null,$e.search?$e.path="/"+$e.search:$e.path=null,$e.href=$e.format(),$e;for(var on=Kt.slice(-1)[0],Jt=($e.host||Re.host||Kt.length>1)&&(on==="."||on==="..")||on==="",jt=0,ut=Kt.length;ut>=0;ut--)on=Kt[ut],on==="."?Kt.splice(ut,1):on===".."?(Kt.splice(ut,1),jt++):jt&&(Kt.splice(ut,1),jt--);if(!yt&&!Vt)for(;jt--;jt)Kt.unshift("..");!yt||Kt[0]===""||Kt[0]&&Kt[0].charAt(0)==="/"||Kt.unshift(""),Jt&&Kt.join("/").substr(-1)!=="/"&&Kt.push("");var ze=Kt[0]===""||Kt[0]&&Kt[0].charAt(0)==="/";if(Gt){$e.hostname=$e.host=ze?"":Kt.length?Kt.shift():"";var Dt=!!($e.host&&$e.host.indexOf("@")>0)&&$e.host.split("@");Dt&&($e.auth=Dt.shift(),$e.host=$e.hostname=Dt.shift())}return yt=yt||$e.host&&Kt.length,yt&&!ze&&Kt.unshift(""),Kt.length?$e.pathname=Kt.join("/"):($e.pathname=null,$e.path=null),he.isNull($e.pathname)&&he.isNull($e.search)||($e.path=($e.pathname?$e.pathname:"")+($e.search?$e.search:"")),$e.auth=Re.auth||$e.auth,$e.slashes=$e.slashes||Re.slashes,$e.href=$e.format(),$e},Ee.prototype.parseHost=function(){var Re=this.host,We=fe.exec(Re);We&&(We=We[0],We!==":"&&(this.port=We.substr(1)),Re=Re.substr(0,Re.length-We.length)),Re&&(this.hostname=Re)}},{"./util":204,punycode:174,querystring:177}],204:[function(ye,Fe,Me){"use strict";Fe.exports={isString:function(Ee){return typeof Ee=="string"},isObject:function(Ee){return typeof Ee=="object"&&Ee!==null},isNull:function(Ee){return Ee===null},isNullOrUndefined:function(Ee){return Ee==null}}},{}],205:[function(ye,Fe,Me){(function(Ee){function me(ve,we){function ge(){if(!he){if(be("throwDeprecation"))throw new Error(we);be("traceDeprecation")?console.trace(we):console.warn(we),he=!0}return ve.apply(this,arguments)}if(be("noDeprecation"))return ve;var he=!1;return ge}function be(ve){try{if(!Ee.localStorage)return!1}catch(ge){return!1}var we=Ee.localStorage[ve];return we!=null&&String(we).toLowerCase()==="true"}Fe.exports=me}).call(this,typeof De.g!="undefined"?De.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],206:[function(ye,Fe,Me){Fe.exports=function(Ee){return Ee&&typeof Ee=="object"&&typeof Ee.copy=="function"&&typeof Ee.fill=="function"&&typeof Ee.readUInt8=="function"}},{}],207:[function(ye,Fe,Me){(function(Ee,me){function be(lt,dt){var bt={seen:[],stylize:we};return arguments.length>=3&&(bt.depth=arguments[2]),arguments.length>=4&&(bt.colors=arguments[3]),ie(dt)?bt.showHidden=dt:dt&&Me._extend(bt,dt),Ae(bt.showHidden)&&(bt.showHidden=!1),Ae(bt.depth)&&(bt.depth=2),Ae(bt.colors)&&(bt.colors=!1),Ae(bt.customInspect)&&(bt.customInspect=!0),bt.colors&&(bt.stylize=ve),he(bt,lt,bt.depth)}function ve(lt,dt){var bt=be.styles[dt];return bt?"\x1B["+be.colors[bt][0]+"m"+lt+"\x1B["+be.colors[bt][1]+"m":lt}function we(lt,dt){return lt}function ge(lt){var dt={};return lt.forEach(function(bt,yt){dt[bt]=!0}),dt}function he(lt,dt,bt){if(lt.customInspect&&dt&&Je(dt.inspect)&&dt.inspect!==Me.inspect&&(!dt.constructor||dt.constructor.prototype!==dt)){var yt=dt.inspect(bt,lt);return pe(yt)||(yt=he(lt,yt,bt)),yt}var Vt=xe(lt,dt);if(Vt)return Vt;var Kt=Object.keys(dt),gn=ge(Kt);if(lt.showHidden&&(Kt=Object.getOwnPropertyNames(dt)),$e(dt)&&(Kt.indexOf("message")>=0||Kt.indexOf("description")>=0))return fe(dt);if(Kt.length===0){if(Je(dt)){var Gt=dt.name?": "+dt.name:"";return lt.stylize("[Function"+Gt+"]","special")}if(Oe(dt))return lt.stylize(RegExp.prototype.toString.call(dt),"regexp");if(We(dt))return lt.stylize(Date.prototype.toString.call(dt),"date");if($e(dt))return fe(dt)}var Dt="",on=!1,Jt=["{","}"];if(oe(dt)&&(on=!0,Jt=["[","]"]),Je(dt)&&(Dt=" [Function"+(dt.name?": "+dt.name:"")+"]"),Oe(dt)&&(Dt=" "+RegExp.prototype.toString.call(dt)),We(dt)&&(Dt=" "+Date.prototype.toUTCString.call(dt)),$e(dt)&&(Dt=" "+fe(dt)),Kt.length===0&&(!on||dt.length==0))return Jt[0]+Dt+Jt[1];if(bt<0)return Oe(dt)?lt.stylize(RegExp.prototype.toString.call(dt),"regexp"):lt.stylize("[Object]","special");lt.seen.push(dt);var jt;return jt=on?ue(lt,dt,bt,gn,Kt):Kt.map(function(ut){return ee(lt,dt,bt,gn,ut,on)}),lt.seen.pop(),z(jt,Dt,Jt)}function xe(lt,dt){if(Ae(dt))return lt.stylize("undefined","undefined");if(pe(dt)){var bt="'"+JSON.stringify(dt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return lt.stylize(bt,"string")}return Se(dt)?lt.stylize(""+dt,"number"):ie(dt)?lt.stylize(""+dt,"boolean"):se(dt)?lt.stylize("null","null"):void 0}function fe(lt){return"["+Error.prototype.toString.call(lt)+"]"}function ue(lt,dt,bt,yt,Vt){for(var Kt=[],gn=0,Gt=dt.length;gn<Gt;++gn)wt(dt,String(gn))?Kt.push(ee(lt,dt,bt,yt,String(gn),!0)):Kt.push("");return Vt.forEach(function(Dt){Dt.match(/^\d+$/)||Kt.push(ee(lt,dt,bt,yt,Dt,!0))}),Kt}function ee(lt,dt,bt,yt,Vt,Kt){var gn,Gt,Dt;if(Dt=Object.getOwnPropertyDescriptor(dt,Vt)||{value:dt[Vt]},Dt.get?Gt=Dt.set?lt.stylize("[Getter/Setter]","special"):lt.stylize("[Getter]","special"):Dt.set&&(Gt=lt.stylize("[Setter]","special")),wt(yt,Vt)||(gn="["+Vt+"]"),Gt||(lt.seen.indexOf(Dt.value)<0?(Gt=se(bt)?he(lt,Dt.value,null):he(lt,Dt.value,bt-1),Gt.indexOf(`
|
|
|
`)>-1&&(Gt=Kt?Gt.split(`
|
|
|
`).map(function(on){return" "+on}).join(`
|
|
|
`).substr(2):`
|
|
|
`+Gt.split(`
|
|
|
`).map(function(on){return" "+on}).join(`
|
|
|
`))):Gt=lt.stylize("[Circular]","special")),Ae(gn)){if(Kt&&Vt.match(/^\d+$/))return Gt;gn=JSON.stringify(""+Vt),gn.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(gn=gn.substr(1,gn.length-2),gn=lt.stylize(gn,"name")):(gn=gn.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),gn=lt.stylize(gn,"string"))}return gn+": "+Gt}function z(lt,dt,bt){var yt=0;return lt.reduce(function(Vt,Kt){return yt++,Kt.indexOf(`
|
|
|
`)>=0&&yt++,Vt+Kt.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?bt[0]+(dt===""?"":dt+`
|
|
|
`)+" "+lt.join(`,
|
|
|
`)+" "+bt[1]:bt[0]+dt+" "+lt.join(", ")+" "+bt[1]}function oe(lt){return Array.isArray(lt)}function ie(lt){return typeof lt=="boolean"}function se(lt){return lt===null}function le(lt){return lt==null}function Se(lt){return typeof lt=="number"}function pe(lt){return typeof lt=="string"}function Ce(lt){return typeof lt=="symbol"}function Ae(lt){return lt===void 0}function Oe(lt){return Re(lt)&&St(lt)==="[object RegExp]"}function Re(lt){return typeof lt=="object"&<!==null}function We(lt){return Re(lt)&&St(lt)==="[object Date]"}function $e(lt){return Re(lt)&&(St(lt)==="[object Error]"||lt instanceof Error)}function Je(lt){return typeof lt=="function"}function pt(lt){return lt===null||typeof lt=="boolean"||typeof lt=="number"||typeof lt=="string"||typeof lt=="symbol"||lt===void 0}function St(lt){return Object.prototype.toString.call(lt)}function Mt(lt){return lt<10?"0"+lt.toString(10):lt.toString(10)}function ct(){var lt=new Date,dt=[Mt(lt.getHours()),Mt(lt.getMinutes()),Mt(lt.getSeconds())].join(":");return[lt.getDate(),et[lt.getMonth()],dt].join(" ")}function wt(lt,dt){return Object.prototype.hasOwnProperty.call(lt,dt)}var ft=/%[sdj%]/g;Me.format=function(lt){if(!pe(lt)){for(var dt=[],bt=0;bt<arguments.length;bt++)dt.push(be(arguments[bt]));return dt.join(" ")}for(var bt=1,yt=arguments,Vt=yt.length,Kt=String(lt).replace(ft,function(Dt){if(Dt==="%%")return"%";if(bt>=Vt)return Dt;switch(Dt){case"%s":return String(yt[bt++]);case"%d":return Number(yt[bt++]);case"%j":try{return JSON.stringify(yt[bt++])}catch(on){return"[Circular]"}default:return Dt}}),gn=yt[bt];bt<Vt;gn=yt[++bt])se(gn)||!Re(gn)?Kt+=" "+gn:Kt+=" "+be(gn);return Kt},Me.deprecate=function(lt,dt){function bt(){if(!yt){if(Ee.throwDeprecation)throw new Error(dt);Ee.traceDeprecation?console.trace(dt):console.error(dt),yt=!0}return lt.apply(this,arguments)}if(Ae(me.process))return function(){return Me.deprecate(lt,dt).apply(this,arguments)};if(Ee.noDeprecation===!0)return lt;var yt=!1;return bt};var $t,st={};Me.debuglog=function(lt){if(Ae($t)&&($t=Ee.env.NODE_DEBUG||""),lt=lt.toUpperCase(),!st[lt])if(new RegExp("\\b"+lt+"\\b","i").test($t)){var dt=Ee.pid;st[lt]=function(){var bt=Me.format.apply(Me,arguments);console.error("%s %d: %s",lt,dt,bt)}}else st[lt]=function(){};return st[lt]},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=ie,Me.isNull=se,Me.isNullOrUndefined=le,Me.isNumber=Se,Me.isString=pe,Me.isSymbol=Ce,Me.isUndefined=Ae,Me.isRegExp=Oe,Me.isObject=Re,Me.isDate=We,Me.isError=$e,Me.isFunction=Je,Me.isPrimitive=pt,Me.isBuffer=ye("./support/isBuffer");var et=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Me.log=function(){console.log("%s - %s",ct(),Me.format.apply(Me,arguments))},Me.inherits=ye("inherits"),Me._extend=function(lt,dt){if(!dt||!Re(dt))return lt;for(var bt=Object.keys(dt),yt=bt.length;yt--;)lt[bt[yt]]=dt[bt[yt]];return lt}}).call(this,ye("_process"),typeof De.g!="undefined"?De.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":206,_process:173,inherits:162}],208:[function(ye,Fe,Me){"use strict";(function(){Me.stripBOM=function(Ee){return Ee[0]==="\uFEFF"?Ee.substring(1):Ee}}).call(void 0)},{}],209:[function(ye,Fe,Me){"use strict";function Ee(ge){return ge&&ge.__esModule?ge:{default:ge}}var me=ye("babel-runtime/helpers/typeof"),be=Ee(me),ve=ye("babel-runtime/core-js/object/keys"),we=Ee(ve);(function(){var ge,he,xe,fe,ue,ee={}.hasOwnProperty;ge=ye("xmlbuilder"),he=ye("./defaults").defaults,fe=function(z){return typeof z=="string"&&(z.indexOf("&")>=0||z.indexOf(">")>=0||z.indexOf("<")>=0)},ue=function(z){return"<![CDATA["+xe(z)+"]]>"},xe=function(z){return z.replace("]]>","]]]]><![CDATA[>")},Me.Builder=function(){function z(oe){var ie,se,le;this.options={},se=he[.2];for(ie in se)ee.call(se,ie)&&(le=se[ie],this.options[ie]=le);for(ie in oe)ee.call(oe,ie)&&(le=oe[ie],this.options[ie]=le)}return z.prototype.buildObject=function(oe){var ie,se,le,Se,pe;return ie=this.options.attrkey,se=this.options.charkey,(0,we.default)(oe).length===1&&this.options.rootName===he[.2].rootName?(pe=(0,we.default)(oe)[0],oe=oe[pe]):pe=this.options.rootName,le=function(Ce){return function(Ae,Oe){var Re,We,$e,Je,pt,St;if((Oe===void 0?"undefined":(0,be.default)(Oe))!=="object")Ce.options.cdata&&fe(Oe)?Ae.raw(ue(Oe)):Ae.txt(Oe);else if(Array.isArray(Oe)){for(Je in Oe)if(ee.call(Oe,Je)){We=Oe[Je];for(pt in We)$e=We[pt],Ae=le(Ae.ele(pt),$e).up()}}else for(pt in Oe)if(ee.call(Oe,pt))if(We=Oe[pt],pt===ie){if((We===void 0?"undefined":(0,be.default)(We))==="object")for(Re in We)St=We[Re],Ae=Ae.att(Re,St)}else if(pt===se)Ae=Ce.options.cdata&&fe(We)?Ae.raw(ue(We)):Ae.txt(We);else if(Array.isArray(We))for(Je in We)ee.call(We,Je)&&($e=We[Je],Ae=typeof $e=="string"?Ce.options.cdata&&fe($e)?Ae.ele(pt).raw(ue($e)).up():Ae.ele(pt,$e).up():le(Ae.ele(pt),$e).up());else(We===void 0?"undefined":(0,be.default)(We))==="object"?Ae=le(Ae.ele(pt),We).up():typeof We=="string"&&Ce.options.cdata&&fe(We)?Ae=Ae.ele(pt).raw(ue(We)).up():(We==null&&(We=""),Ae=Ae.ele(pt,We.toString()).up());return Ae}}(this),Se=ge.create(pe,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),le(Se,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(ye,Fe,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(ye,Fe,Me){"use strict";function Ee(xe){return xe&&xe.__esModule?xe:{default:xe}}var me=ye("babel-runtime/core-js/object/get-own-property-names"),be=Ee(me),ve=ye("babel-runtime/core-js/object/keys"),we=Ee(ve),ge=ye("babel-runtime/helpers/typeof"),he=Ee(ge);(function(){var xe,fe,ue,ee,z,oe,ie,se,le=function(Ce,Ae){return function(){return Ce.apply(Ae,arguments)}},Se=function(Ce,Ae){function Oe(){this.constructor=Ce}for(var Re in Ae)pe.call(Ae,Re)&&(Ce[Re]=Ae[Re]);return Oe.prototype=Ae.prototype,Ce.prototype=new Oe,Ce.__super__=Ae.prototype,Ce},pe={}.hasOwnProperty;ie=ye("sax"),ue=ye("events"),xe=ye("./bom"),oe=ye("./processors"),se=ye("timers").setImmediate,fe=ye("./defaults").defaults,ee=function(Ce){return(Ce===void 0?"undefined":(0,he.default)(Ce))==="object"&&Ce!=null&&(0,we.default)(Ce).length===0},z=function(Ce,Ae,Oe){var Re,We,$e;for(Re=0,We=Ce.length;Re<We;Re++)$e=Ce[Re],Ae=$e(Ae,Oe);return Ae},Me.Parser=function(Ce){function Ae(Oe){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 Re,We,$e;if(!(this instanceof Me.Parser))return new Me.Parser(Oe);this.options={},We=fe[.2];for(Re in We)pe.call(We,Re)&&($e=We[Re],this.options[Re]=$e);for(Re in Oe)pe.call(Oe,Re)&&($e=Oe[Re],this.options[Re]=$e);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 Se(Ae,Ce),Ae.prototype.processAsync=function(){var Oe,Re;try{return this.remaining.length<=this.options.chunkSize?(Oe=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(Oe),this.saxParser.close()):(Oe=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(Oe),se(this.processAsync))}catch(We){if(Re=We,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(Re)}},Ae.prototype.assignOrPush=function(Oe,Re,We){return Re in Oe?(Oe[Re]instanceof Array||(Oe[Re]=[Oe[Re]]),Oe[Re].push(We)):this.options.explicitArray?Oe[Re]=[We]:Oe[Re]=We},Ae.prototype.reset=function(){var Oe,Re,We,$e;return this.removeAllListeners(),this.saxParser=ie.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(Je){return function(pt){if(Je.saxParser.resume(),!Je.saxParser.errThrown)return Je.saxParser.errThrown=!0,Je.emit("error",pt)}}(this),this.saxParser.onend=function(Je){return function(){if(!Je.saxParser.ended)return Je.saxParser.ended=!0,Je.emit("end",Je.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,$e=[],Oe=this.options.attrkey,Re=this.options.charkey,this.saxParser.onopentag=function(Je){return function(pt){var St,Mt,ct,wt,ft;if(ct={},ct[Re]="",!Je.options.ignoreAttrs){ft=pt.attributes;for(St in ft)pe.call(ft,St)&&(Oe in ct||Je.options.mergeAttrs||(ct[Oe]={}),Mt=Je.options.attrValueProcessors?z(Je.options.attrValueProcessors,pt.attributes[St],St):pt.attributes[St],wt=Je.options.attrNameProcessors?z(Je.options.attrNameProcessors,St):St,Je.options.mergeAttrs?Je.assignOrPush(ct,wt,Mt):ct[Oe][wt]=Mt)}return ct["#name"]=Je.options.tagNameProcessors?z(Je.options.tagNameProcessors,pt.name):pt.name,Je.options.xmlns&&(ct[Je.options.xmlnskey]={uri:pt.uri,local:pt.local}),$e.push(ct)}}(this),this.saxParser.onclosetag=function(Je){return function(){var pt,St,Mt,ct,wt,ft,$t,st,et,lt;if(ft=$e.pop(),wt=ft["#name"],Je.options.explicitChildren&&Je.options.preserveChildrenOrder||delete ft["#name"],ft.cdata===!0&&(pt=ft.cdata,delete ft.cdata),et=$e[$e.length-1],ft[Re].match(/^\s*$/)&&!pt?(St=ft[Re],delete ft[Re]):(Je.options.trim&&(ft[Re]=ft[Re].trim()),Je.options.normalize&&(ft[Re]=ft[Re].replace(/\s{2,}/g," ").trim()),ft[Re]=Je.options.valueProcessors?z(Je.options.valueProcessors,ft[Re],wt):ft[Re],(0,we.default)(ft).length===1&&Re in ft&&!Je.EXPLICIT_CHARKEY&&(ft=ft[Re])),ee(ft)&&(ft=Je.options.emptyTag!==""?Je.options.emptyTag:St),Je.options.validator!=null&&(lt="/"+function(){var dt,bt,yt;for(yt=[],dt=0,bt=$e.length;dt<bt;dt++)ct=$e[dt],yt.push(ct["#name"]);return yt}().concat(wt).join("/"),function(){var dt;try{ft=Je.options.validator(lt,et&&et[wt],ft)}catch(bt){return dt=bt,Je.emit("error",dt)}}()),Je.options.explicitChildren&&!Je.options.mergeAttrs&&(ft===void 0?"undefined":(0,he.default)(ft))==="object")if(Je.options.preserveChildrenOrder){if(et){et[Je.options.childkey]=et[Je.options.childkey]||[],$t={};for(Mt in ft)pe.call(ft,Mt)&&($t[Mt]=ft[Mt]);et[Je.options.childkey].push($t),delete ft["#name"],(0,we.default)(ft).length===1&&Re in ft&&!Je.EXPLICIT_CHARKEY&&(ft=ft[Re])}}else ct={},Je.options.attrkey in ft&&(ct[Je.options.attrkey]=ft[Je.options.attrkey],delete ft[Je.options.attrkey]),!Je.options.charsAsChildren&&Je.options.charkey in ft&&(ct[Je.options.charkey]=ft[Je.options.charkey],delete ft[Je.options.charkey]),(0,be.default)(ft).length>0&&(ct[Je.options.childkey]=ft),ft=ct;return $e.length>0?Je.assignOrPush(et,wt,ft):(Je.options.explicitRoot&&(st=ft,ft={},ft[wt]=st),Je.resultObject=ft,Je.saxParser.ended=!0,Je.emit("end",Je.resultObject))}}(this),We=function(Je){return function(pt){var St,Mt;if(Mt=$e[$e.length-1])return Mt[Re]+=pt,Je.options.explicitChildren&&Je.options.preserveChildrenOrder&&Je.options.charsAsChildren&&(Je.options.includeWhiteChars||pt.replace(/\\n/g,"").trim()!=="")&&(Mt[Je.options.childkey]=Mt[Je.options.childkey]||[],St={"#name":"__text__"},St[Re]=pt,Je.options.normalize&&(St[Re]=St[Re].replace(/\s{2,}/g," ").trim()),Mt[Je.options.childkey].push(St)),Mt}}(this),this.saxParser.ontext=We,this.saxParser.oncdata=function(Je){return function(pt){var St;if(St=We(pt))return St.cdata=!0}}()},Ae.prototype.parseString=function(Oe,Re){var We;Re!=null&&typeof Re=="function"&&(this.on("end",function($e){return this.reset(),Re(null,$e)}),this.on("error",function($e){return this.reset(),Re($e)}));try{return Oe=Oe.toString(),Oe.trim()===""?(this.emit("end",null),!0):(Oe=xe.stripBOM(Oe),this.options.async?(this.remaining=Oe,se(this.processAsync),this.saxParser):this.saxParser.write(Oe).close())}catch($e){if(We=$e,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",We),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw We}},Ae}(ue.EventEmitter),Me.parseString=function(Ce,Ae,Oe){var Re,We,$e;return Oe!=null?(typeof Oe=="function"&&(Re=Oe),(Ae===void 0?"undefined":(0,he.default)(Ae))==="object"&&(We=Ae)):(typeof Ae=="function"&&(Re=Ae),We={}),$e=new Me.Parser(We),$e.parseString(Ce,Re)}}).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(ye,Fe,Me){"use strict";(function(){var Ee;Ee=new RegExp(/(?!xmlns)^.*:/),Me.normalize=function(me){return me.toLowerCase()},Me.firstCharLowerCase=function(me){return me.charAt(0).toLowerCase()+me.slice(1)},Me.stripPrefix=function(me){return me.replace(Ee,"")},Me.parseNumbers=function(me){return isNaN(me)||(me=me%1==0?parseInt(me,10):parseFloat(me)),me},Me.parseBooleans=function(me){return/^(?:true|false)$/i.test(me)&&(me=me.toLowerCase()==="true"),me}}).call(void 0)},{}],213:[function(ye,Fe,Me){"use strict";(function(){var Ee,me,be,ve,we=function(he,xe){function fe(){this.constructor=he}for(var ue in xe)ge.call(xe,ue)&&(he[ue]=xe[ue]);return fe.prototype=xe.prototype,he.prototype=new fe,he.__super__=xe.prototype,he},ge={}.hasOwnProperty;me=ye("./defaults"),Ee=ye("./builder"),be=ye("./parser"),ve=ye("./processors"),Me.defaults=me.defaults,Me.processors=ve,Me.ValidationError=function(he){function xe(fe){this.message=fe}return we(xe,he),xe}(Error),Me.Builder=Ee.Builder,Me.Parser=be.Parser,Me.parseString=be.parseString}).call(void 0)},{"./builder":209,"./defaults":210,"./parser":211,"./processors":212}],214:[function(ye,Fe,Me){"use strict";function Ee(xe){return xe&&xe.__esModule?xe:{default:xe}}var me=ye("babel-runtime/core-js/object/get-prototype-of"),be=Ee(me),ve=ye("babel-runtime/helpers/typeof"),we=Ee(ve),ge=ye("babel-runtime/core-js/object/assign"),he=Ee(ge);(function(){var xe,fe,ue,ee,z,oe,ie=[].slice,se={}.hasOwnProperty;xe=function(){var le,Se,pe,Ce,Ae,Oe;if(Oe=arguments[0],Ae=2<=arguments.length?ie.call(arguments,1):[],ee(he.default))he.default.apply(null,arguments);else for(le=0,pe=Ae.length;le<pe;le++)if((Ce=Ae[le])!=null)for(Se in Ce)se.call(Ce,Se)&&(Oe[Se]=Ce[Se]);return Oe},ee=function(le){return!!le&&Object.prototype.toString.call(le)==="[object Function]"},z=function(le){var Se;return!!le&&((Se=le===void 0?"undefined":(0,we.default)(le))==="function"||Se==="object")},fe=function(le){return ee(Array.isArray)?Array.isArray(le):Object.prototype.toString.call(le)==="[object Array]"},ue=function(le){var Se;if(fe(le))return!le.length;for(Se in le)if(se.call(le,Se))return!1;return!0},oe=function(le){var Se,pe;return z(le)&&(pe=(0,be.default)(le))&&(Se=pe.constructor)&&typeof Se=="function"&&Se instanceof Se&&Function.prototype.toString.call(Se)===Function.prototype.toString.call(Object)},Fe.exports.assign=xe,Fe.exports.isFunction=ee,Fe.exports.isObject=z,Fe.exports.isArray=fe,Fe.exports.isEmpty=ue,Fe.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(ye,Fe,Me){"use strict";var Ee=ye("babel-runtime/core-js/object/create"),me=function(be){return be&&be.__esModule?be:{default:be}}(Ee);(function(){Fe.exports=function(){function be(ve,we,ge){if(this.options=ve.options,this.stringify=ve.stringify,we==null)throw new Error("Missing attribute name of element "+ve.name);if(ge==null)throw new Error("Missing attribute value for attribute "+we+" of element "+ve.name);this.name=this.stringify.attName(we),this.value=this.stringify.attValue(ge)}return be.prototype.clone=function(){return(0,me.default)(this)},be.prototype.toString=function(ve){return this.options.writer.set(ve).attribute(this)},be}()}).call(void 0)},{"babel-runtime/core-js/object/create":19}],216:[function(ye,Fe,Me){"use strict";var Ee=ye("babel-runtime/core-js/object/create"),me=function(be){return be&&be.__esModule?be:{default:be}}(Ee);(function(){var be,ve=function(ge,he){function xe(){this.constructor=ge}for(var fe in he)we.call(he,fe)&&(ge[fe]=he[fe]);return xe.prototype=he.prototype,ge.prototype=new xe,ge.__super__=he.prototype,ge},we={}.hasOwnProperty;be=ye("./XMLNode"),Fe.exports=function(ge){function he(xe,fe){if(he.__super__.constructor.call(this,xe),fe==null)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(fe)}return ve(he,ge),he.prototype.clone=function(){return(0,me.default)(this)},he.prototype.toString=function(xe){return this.options.writer.set(xe).cdata(this)},he}(be)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],217:[function(ye,Fe,Me){"use strict";var Ee=ye("babel-runtime/core-js/object/create"),me=function(be){return be&&be.__esModule?be:{default:be}}(Ee);(function(){var be,ve=function(ge,he){function xe(){this.constructor=ge}for(var fe in he)we.call(he,fe)&&(ge[fe]=he[fe]);return xe.prototype=he.prototype,ge.prototype=new xe,ge.__super__=he.prototype,ge},we={}.hasOwnProperty;be=ye("./XMLNode"),Fe.exports=function(ge){function he(xe,fe){if(he.__super__.constructor.call(this,xe),fe==null)throw new Error("Missing comment text");this.text=this.stringify.comment(fe)}return ve(he,ge),he.prototype.clone=function(){return(0,me.default)(this)},he.prototype.toString=function(xe){return this.options.writer.set(xe).comment(this)},he}(be)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],218:[function(ye,Fe,Me){"use strict";(function(){var Ee,me=function(ve,we){function ge(){this.constructor=ve}for(var he in we)be.call(we,he)&&(ve[he]=we[he]);return ge.prototype=we.prototype,ve.prototype=new ge,ve.__super__=we.prototype,ve},be={}.hasOwnProperty;Ee=ye("./XMLNode"),Fe.exports=function(ve){function we(ge,he,xe,fe,ue,ee){if(we.__super__.constructor.call(this,ge),he==null)throw new Error("Missing DTD element name");if(xe==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(he),this.attributeName=this.stringify.attName(xe),this.attributeType=this.stringify.dtdAttType(fe),this.defaultValue=this.stringify.dtdAttDefault(ee),this.defaultValueType=ue}return me(we,ve),we.prototype.toString=function(ge){return this.options.writer.set(ge).dtdAttList(this)},we}(Ee)}).call(void 0)},{"./XMLNode":227}],219:[function(ye,Fe,Me){"use strict";(function(){var Ee,me=function(ve,we){function ge(){this.constructor=ve}for(var he in we)be.call(we,he)&&(ve[he]=we[he]);return ge.prototype=we.prototype,ve.prototype=new ge,ve.__super__=we.prototype,ve},be={}.hasOwnProperty;Ee=ye("./XMLNode"),Fe.exports=function(ve){function we(ge,he,xe){if(we.__super__.constructor.call(this,ge),he==null)throw new Error("Missing DTD element name");xe||(xe="(#PCDATA)"),Array.isArray(xe)&&(xe="("+xe.join(",")+")"),this.name=this.stringify.eleName(he),this.value=this.stringify.dtdElementValue(xe)}return me(we,ve),we.prototype.toString=function(ge){return this.options.writer.set(ge).dtdElement(this)},we}(Ee)}).call(void 0)},{"./XMLNode":227}],220:[function(ye,Fe,Me){"use strict";(function(){var Ee,me,be=function(we,ge){function he(){this.constructor=we}for(var xe in ge)ve.call(ge,xe)&&(we[xe]=ge[xe]);return he.prototype=ge.prototype,we.prototype=new he,we.__super__=ge.prototype,we},ve={}.hasOwnProperty;me=ye("./Utility").isObject,Ee=ye("./XMLNode"),Fe.exports=function(we){function ge(he,xe,fe,ue){if(ge.__super__.constructor.call(this,he),fe==null)throw new Error("Missing entity name");if(ue==null)throw new Error("Missing entity value");if(this.pe=!!xe,this.name=this.stringify.eleName(fe),me(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(ge,we),ge.prototype.toString=function(he){return this.options.writer.set(he).dtdEntity(this)},ge}(Ee)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],221:[function(ye,Fe,Me){"use strict";(function(){var Ee,me=function(ve,we){function ge(){this.constructor=ve}for(var he in we)be.call(we,he)&&(ve[he]=we[he]);return ge.prototype=we.prototype,ve.prototype=new ge,ve.__super__=we.prototype,ve},be={}.hasOwnProperty;Ee=ye("./XMLNode"),Fe.exports=function(ve){function we(ge,he,xe){if(we.__super__.constructor.call(this,ge),he==null)throw new Error("Missing notation name");if(!xe.pubID&&!xe.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(he),xe.pubID!=null&&(this.pubID=this.stringify.dtdPubID(xe.pubID)),xe.sysID!=null&&(this.sysID=this.stringify.dtdSysID(xe.sysID))}return me(we,ve),we.prototype.toString=function(ge){return this.options.writer.set(ge).dtdNotation(this)},we}(Ee)}).call(void 0)},{"./XMLNode":227}],222:[function(ye,Fe,Me){"use strict";(function(){var Ee,me,be=function(we,ge){function he(){this.constructor=we}for(var xe in ge)ve.call(ge,xe)&&(we[xe]=ge[xe]);return he.prototype=ge.prototype,we.prototype=new he,we.__super__=ge.prototype,we},ve={}.hasOwnProperty;me=ye("./Utility").isObject,Ee=ye("./XMLNode"),Fe.exports=function(we){function ge(he,xe,fe,ue){var ee;ge.__super__.constructor.call(this,he),me(xe)&&(ee=xe,xe=ee.version,fe=ee.encoding,ue=ee.standalone),xe||(xe="1.0"),this.version=this.stringify.xmlVersion(xe),fe!=null&&(this.encoding=this.stringify.xmlEncoding(fe)),ue!=null&&(this.standalone=this.stringify.xmlStandalone(ue))}return be(ge,we),ge.prototype.toString=function(he){return this.options.writer.set(he).declaration(this)},ge}(Ee)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],223:[function(ye,Fe,Me){"use strict";(function(){var Ee,me,be,ve,we,ge,he=function(fe,ue){function ee(){this.constructor=fe}for(var z in ue)xe.call(ue,z)&&(fe[z]=ue[z]);return ee.prototype=ue.prototype,fe.prototype=new ee,fe.__super__=ue.prototype,fe},xe={}.hasOwnProperty;ge=ye("./Utility").isObject,we=ye("./XMLNode"),Ee=ye("./XMLDTDAttList"),be=ye("./XMLDTDEntity"),me=ye("./XMLDTDElement"),ve=ye("./XMLDTDNotation"),Fe.exports=function(fe){function ue(ee,z,oe){var ie,se;ue.__super__.constructor.call(this,ee),this.documentObject=ee,ge(z)&&(ie=z,z=ie.pubID,oe=ie.sysID),oe==null&&(se=[z,oe],oe=se[0],z=se[1]),z!=null&&(this.pubID=this.stringify.dtdPubID(z)),oe!=null&&(this.sysID=this.stringify.dtdSysID(oe))}return he(ue,fe),ue.prototype.element=function(ee,z){var oe;return oe=new me(this,ee,z),this.children.push(oe),this},ue.prototype.attList=function(ee,z,oe,ie,se){var le;return le=new Ee(this,ee,z,oe,ie,se),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 ve(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,ie,se){return this.attList(ee,z,oe,ie,se)},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(ye,Fe,Me){"use strict";(function(){var Ee,me,be,ve,we=function(he,xe){function fe(){this.constructor=he}for(var ue in xe)ge.call(xe,ue)&&(he[ue]=xe[ue]);return fe.prototype=xe.prototype,he.prototype=new fe,he.__super__=xe.prototype,he},ge={}.hasOwnProperty;ve=ye("./Utility").isPlainObject,Ee=ye("./XMLNode"),be=ye("./XMLStringifier"),me=ye("./XMLStringWriter"),Fe.exports=function(he){function xe(fe){xe.__super__.constructor.call(this,null),fe||(fe={}),fe.writer||(fe.writer=new me),this.options=fe,this.stringify=new be(fe),this.isDocument=!0}return we(xe,he),xe.prototype.end=function(fe){var ue;return fe?ve(fe)&&(ue=fe,fe=this.options.writer.set(ue)):fe=this.options.writer,fe.document(this)},xe.prototype.toString=function(fe){return this.options.writer.set(fe).document(this)},xe}(Ee)}).call(void 0)},{"./Utility":214,"./XMLNode":227,"./XMLStringWriter":231,"./XMLStringifier":232}],225:[function(ye,Fe,Me){"use strict";(function(){var Ee,me,be,ve,we,ge,he,xe,fe,ue,ee,z,oe,ie,se,le,Se,pe,Ce,Ae={}.hasOwnProperty;Ce=ye("./Utility"),Se=Ce.isObject,le=Ce.isFunction,pe=Ce.isPlainObject,ue=ye("./XMLElement"),me=ye("./XMLCData"),be=ye("./XMLComment"),z=ye("./XMLRaw"),se=ye("./XMLText"),ee=ye("./XMLProcessingInstruction"),xe=ye("./XMLDeclaration"),fe=ye("./XMLDocType"),ve=ye("./XMLDTDAttList"),ge=ye("./XMLDTDEntity"),we=ye("./XMLDTDElement"),he=ye("./XMLDTDNotation"),Ee=ye("./XMLAttribute"),ie=ye("./XMLStringifier"),oe=ye("./XMLStringWriter"),Fe.exports=function(){function Oe(Re,We,$e){var Je;Re||(Re={}),Re.writer?pe(Re.writer)&&(Je=Re.writer,Re.writer=new oe(Je)):Re.writer=new oe(Re),this.options=Re,this.writer=Re.writer,this.stringify=new ie(Re),this.onDataCallback=We||function(){},this.onEndCallback=$e||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return Oe.prototype.node=function(Re,We,$e){var Je;if(Re==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(),Re=Re.valueOf(),We==null&&(We={}),We=We.valueOf(),Se(We)||(Je=[We,$e],$e=Je[0],We=Je[1]),this.currentNode=new ue(this,Re,We),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,$e!=null&&this.text($e),this},Oe.prototype.element=function(Re,We,$e){return this.currentNode&&this.currentNode instanceof fe?this.dtdElement.apply(this,arguments):this.node(Re,We,$e)},Oe.prototype.attribute=function(Re,We){var $e,Je;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(Re!=null&&(Re=Re.valueOf()),Se(Re))for($e in Re)Ae.call(Re,$e)&&(Je=Re[$e],this.attribute($e,Je));else le(We)&&(We=We.apply()),this.options.skipNullAttributes&&We==null||(this.currentNode.attributes[Re]=new Ee(this,Re,We));return this},Oe.prototype.text=function(Re){var We;return this.openCurrent(),We=new se(this,Re),this.onData(this.writer.text(We,this.currentLevel+1)),this},Oe.prototype.cdata=function(Re){var We;return this.openCurrent(),We=new me(this,Re),this.onData(this.writer.cdata(We,this.currentLevel+1)),this},Oe.prototype.comment=function(Re){var We;return this.openCurrent(),We=new be(this,Re),this.onData(this.writer.comment(We,this.currentLevel+1)),this},Oe.prototype.raw=function(Re){var We;return this.openCurrent(),We=new z(this,Re),this.onData(this.writer.raw(We,this.currentLevel+1)),this},Oe.prototype.instruction=function(Re,We){var $e,Je,pt,St,Mt;if(this.openCurrent(),Re!=null&&(Re=Re.valueOf()),We!=null&&(We=We.valueOf()),Array.isArray(Re))for($e=0,St=Re.length;$e<St;$e++)Je=Re[$e],this.instruction(Je);else if(Se(Re))for(Je in Re)Ae.call(Re,Je)&&(pt=Re[Je],this.instruction(Je,pt));else le(We)&&(We=We.apply()),Mt=new ee(this,Re,We),this.onData(this.writer.processingInstruction(Mt,this.currentLevel+1));return this},Oe.prototype.declaration=function(Re,We,$e){var Je;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return Je=new xe(this,Re,We,$e),this.onData(this.writer.declaration(Je,this.currentLevel+1)),this},Oe.prototype.doctype=function(Re,We,$e){if(this.openCurrent(),Re==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,We,$e),this.currentNode.rootNodeName=Re,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},Oe.prototype.dtdElement=function(Re,We){var $e;return this.openCurrent(),$e=new we(this,Re,We),this.onData(this.writer.dtdElement($e,this.currentLevel+1)),this},Oe.prototype.attList=function(Re,We,$e,Je,pt){var St;return this.openCurrent(),St=new ve(this,Re,We,$e,Je,pt),this.onData(this.writer.dtdAttList(St,this.currentLevel+1)),this},Oe.prototype.entity=function(Re,We){var $e;return this.openCurrent(),$e=new ge(this,!1,Re,We),this.onData(this.writer.dtdEntity($e,this.currentLevel+1)),this},Oe.prototype.pEntity=function(Re,We){var $e;return this.openCurrent(),$e=new ge(this,!0,Re,We),this.onData(this.writer.dtdEntity($e,this.currentLevel+1)),this},Oe.prototype.notation=function(Re,We){var $e;return this.openCurrent(),$e=new he(this,Re,We),this.onData(this.writer.dtdNotation($e,this.currentLevel+1)),this},Oe.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},Oe.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},Oe.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},Oe.prototype.openNode=function(Re){if(!Re.isOpen)return!this.root&&this.currentLevel===0&&Re instanceof ue&&(this.root=Re),this.onData(this.writer.openNode(Re,this.currentLevel)),Re.isOpen=!0},Oe.prototype.closeNode=function(Re){if(!Re.isClosed)return this.onData(this.writer.closeNode(Re,this.currentLevel)),Re.isClosed=!0},Oe.prototype.onData=function(Re){return this.documentStarted=!0,this.onDataCallback(Re)},Oe.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},Oe.prototype.ele=function(){return this.element.apply(this,arguments)},Oe.prototype.nod=function(Re,We,$e){return this.node(Re,We,$e)},Oe.prototype.txt=function(Re){return this.text(Re)},Oe.prototype.dat=function(Re){return this.cdata(Re)},Oe.prototype.com=function(Re){return this.comment(Re)},Oe.prototype.ins=function(Re,We){return this.instruction(Re,We)},Oe.prototype.dec=function(Re,We,$e){return this.declaration(Re,We,$e)},Oe.prototype.dtd=function(Re,We,$e){return this.doctype(Re,We,$e)},Oe.prototype.e=function(Re,We,$e){return this.element(Re,We,$e)},Oe.prototype.n=function(Re,We,$e){return this.node(Re,We,$e)},Oe.prototype.t=function(Re){return this.text(Re)},Oe.prototype.d=function(Re){return this.cdata(Re)},Oe.prototype.c=function(Re){return this.comment(Re)},Oe.prototype.r=function(Re){return this.raw(Re)},Oe.prototype.i=function(Re,We){return this.instruction(Re,We)},Oe.prototype.att=function(){return this.currentNode&&this.currentNode instanceof fe?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Oe.prototype.a=function(){return this.currentNode&&this.currentNode instanceof fe?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Oe.prototype.ent=function(Re,We){return this.entity(Re,We)},Oe.prototype.pent=function(Re,We){return this.pEntity(Re,We)},Oe.prototype.not=function(Re,We){return this.notation(Re,We)},Oe}()}).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(ye,Fe,Me){"use strict";var Ee=ye("babel-runtime/core-js/object/create"),me=function(be){return be&&be.__esModule?be:{default:be}}(Ee);(function(){var be,ve,we,ge,he,xe=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;he=ye("./Utility"),ge=he.isObject,we=he.isFunction,ve=ye("./XMLNode"),be=ye("./XMLAttribute"),Fe.exports=function(ue){function ee(z,oe,ie){if(ee.__super__.constructor.call(this,z),oe==null)throw new Error("Missing element name");this.name=this.stringify.eleName(oe),this.attributes={},ie!=null&&this.attribute(ie),z.isDocument&&(this.isRoot=!0,this.documentObject=z,z.rootObject=this)}return xe(ee,ue),ee.prototype.clone=function(){var z,oe,ie,se;ie=(0,me.default)(this),ie.isRoot&&(ie.documentObject=null),ie.attributes={},se=this.attributes;for(oe in se)fe.call(se,oe)&&(z=se[oe],ie.attributes[oe]=z.clone());return ie.children=[],this.children.forEach(function(le){var Se;return Se=le.clone(),Se.parent=ie,ie.children.push(Se)}),ie},ee.prototype.attribute=function(z,oe){var ie,se;if(z!=null&&(z=z.valueOf()),ge(z))for(ie in z)fe.call(z,ie)&&(se=z[ie],this.attribute(ie,se));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,ie,se;if(z==null)throw new Error("Missing attribute name");if(z=z.valueOf(),Array.isArray(z))for(ie=0,se=z.length;ie<se;ie++)oe=z[ie],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}(ve)}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLNode":227,"babel-runtime/core-js/object/create":19}],227:[function(ye,Fe,Me){"use strict";(function(){var Ee,me,be,ve,we,ge,he,xe,fe,ue,ee,z,oe={}.hasOwnProperty;z=ye("./Utility"),ee=z.isObject,ue=z.isFunction,fe=z.isEmpty,we=null,Ee=null,me=null,be=null,ve=null,he=null,xe=null,ge=null,Fe.exports=function(){function ie(se){this.parent=se,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.children=[],we||(we=ye("./XMLElement"),Ee=ye("./XMLCData"),me=ye("./XMLComment"),be=ye("./XMLDeclaration"),ve=ye("./XMLDocType"),he=ye("./XMLRaw"),xe=ye("./XMLText"),ge=ye("./XMLProcessingInstruction"))}return ie.prototype.element=function(se,le,Se){var pe,Ce,Ae,Oe,Re,We,$e,Je,pt,St;if(We=null,le==null&&(le={}),le=le.valueOf(),ee(le)||(pt=[le,Se],Se=pt[0],le=pt[1]),se!=null&&(se=se.valueOf()),Array.isArray(se))for(Ae=0,$e=se.length;Ae<$e;Ae++)Ce=se[Ae],We=this.element(Ce);else if(ue(se))We=this.element(se.apply());else if(ee(se)){for(Re in se)if(oe.call(se,Re))if(St=se[Re],ue(St)&&(St=St.apply()),ee(St)&&fe(St)&&(St=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&Re.indexOf(this.stringify.convertAttKey)===0)We=this.attribute(Re.substr(this.stringify.convertAttKey.length),St);else if(!this.options.separateArrayItems&&Array.isArray(St))for(Oe=0,Je=St.length;Oe<Je;Oe++)Ce=St[Oe],pe={},pe[Re]=Ce,We=this.element(pe);else ee(St)?(We=this.element(Re),We.element(St)):We=this.element(Re,St)}else We=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&se.indexOf(this.stringify.convertTextKey)===0?this.text(Se):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&se.indexOf(this.stringify.convertCDataKey)===0?this.cdata(Se):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&se.indexOf(this.stringify.convertCommentKey)===0?this.comment(Se):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&se.indexOf(this.stringify.convertRawKey)===0?this.raw(Se):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&se.indexOf(this.stringify.convertPIKey)===0?this.instruction(se.substr(this.stringify.convertPIKey.length),Se):this.node(se,le,Se);if(We==null)throw new Error("Could not create any elements with: "+se);return We},ie.prototype.insertBefore=function(se,le,Se){var pe,Ce,Ae;if(this.isRoot)throw new Error("Cannot insert elements at root level");return Ce=this.parent.children.indexOf(this),Ae=this.parent.children.splice(Ce),pe=this.parent.element(se,le,Se),Array.prototype.push.apply(this.parent.children,Ae),pe},ie.prototype.insertAfter=function(se,le,Se){var pe,Ce,Ae;if(this.isRoot)throw new Error("Cannot insert elements at root level");return Ce=this.parent.children.indexOf(this),Ae=this.parent.children.splice(Ce+1),pe=this.parent.element(se,le,Se),Array.prototype.push.apply(this.parent.children,Ae),pe},ie.prototype.remove=function(){var se;if(this.isRoot)throw new Error("Cannot remove the root element");return se=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[se,se-se+1].concat([])),this.parent},ie.prototype.node=function(se,le,Se){var pe,Ce;return se!=null&&(se=se.valueOf()),le||(le={}),le=le.valueOf(),ee(le)||(Ce=[le,Se],Se=Ce[0],le=Ce[1]),pe=new we(this,se,le),Se!=null&&pe.text(Se),this.children.push(pe),pe},ie.prototype.text=function(se){var le;return le=new xe(this,se),this.children.push(le),this},ie.prototype.cdata=function(se){var le;return le=new Ee(this,se),this.children.push(le),this},ie.prototype.comment=function(se){var le;return le=new me(this,se),this.children.push(le),this},ie.prototype.commentBefore=function(se){var le,Se;return le=this.parent.children.indexOf(this),Se=this.parent.children.splice(le),this.parent.comment(se),Array.prototype.push.apply(this.parent.children,Se),this},ie.prototype.commentAfter=function(se){var le,Se;return le=this.parent.children.indexOf(this),Se=this.parent.children.splice(le+1),this.parent.comment(se),Array.prototype.push.apply(this.parent.children,Se),this},ie.prototype.raw=function(se){var le;return le=new he(this,se),this.children.push(le),this},ie.prototype.instruction=function(se,le){var Se,pe,Ce,Ae,Oe;if(se!=null&&(se=se.valueOf()),le!=null&&(le=le.valueOf()),Array.isArray(se))for(Ae=0,Oe=se.length;Ae<Oe;Ae++)Se=se[Ae],this.instruction(Se);else if(ee(se))for(Se in se)oe.call(se,Se)&&(pe=se[Se],this.instruction(Se,pe));else ue(le)&&(le=le.apply()),Ce=new ge(this,se,le),this.children.push(Ce);return this},ie.prototype.instructionBefore=function(se,le){var Se,pe;return Se=this.parent.children.indexOf(this),pe=this.parent.children.splice(Se),this.parent.instruction(se,le),Array.prototype.push.apply(this.parent.children,pe),this},ie.prototype.instructionAfter=function(se,le){var Se,pe;return Se=this.parent.children.indexOf(this),pe=this.parent.children.splice(Se+1),this.parent.instruction(se,le),Array.prototype.push.apply(this.parent.children,pe),this},ie.prototype.declaration=function(se,le,Se){var pe,Ce;return pe=this.document(),Ce=new be(pe,se,le,Se),pe.children[0]instanceof be?pe.children[0]=Ce:pe.children.unshift(Ce),pe.root()||pe},ie.prototype.doctype=function(se,le){var Se,pe,Ce,Ae,Oe,Re,We,$e,Je,pt;for(pe=this.document(),Ce=new ve(pe,se,le),Je=pe.children,Ae=Oe=0,We=Je.length;Oe<We;Ae=++Oe)if((Se=Je[Ae])instanceof ve)return pe.children[Ae]=Ce,Ce;for(pt=pe.children,Ae=Re=0,$e=pt.length;Re<$e;Ae=++Re)if(Se=pt[Ae],Se.isRoot)return pe.children.splice(Ae,0,Ce),Ce;return pe.children.push(Ce),Ce},ie.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},ie.prototype.root=function(){var se;for(se=this;se;){if(se.isDocument)return se.rootObject;if(se.isRoot)return se;se=se.parent}},ie.prototype.document=function(){var se;for(se=this;se;){if(se.isDocument)return se;se=se.parent}},ie.prototype.end=function(se){return this.document().end(se)},ie.prototype.prev=function(){var se;if((se=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node");return this.parent.children[se-1]},ie.prototype.next=function(){var se;if((se=this.parent.children.indexOf(this))===-1||se===this.parent.children.length-1)throw new Error("Already at the last node");return this.parent.children[se+1]},ie.prototype.importDocument=function(se){var le;return le=se.root().clone(),le.parent=this,le.isRoot=!1,this.children.push(le),this},ie.prototype.ele=function(se,le,Se){return this.element(se,le,Se)},ie.prototype.nod=function(se,le,Se){return this.node(se,le,Se)},ie.prototype.txt=function(se){return this.text(se)},ie.prototype.dat=function(se){return this.cdata(se)},ie.prototype.com=function(se){return this.comment(se)},ie.prototype.ins=function(se,le){return this.instruction(se,le)},ie.prototype.doc=function(){return this.document()},ie.prototype.dec=function(se,le,Se){return this.declaration(se,le,Se)},ie.prototype.dtd=function(se,le){return this.doctype(se,le)},ie.prototype.e=function(se,le,Se){return this.element(se,le,Se)},ie.prototype.n=function(se,le,Se){return this.node(se,le,Se)},ie.prototype.t=function(se){return this.text(se)},ie.prototype.d=function(se){return this.cdata(se)},ie.prototype.c=function(se){return this.comment(se)},ie.prototype.r=function(se){return this.raw(se)},ie.prototype.i=function(se,le){return this.instruction(se,le)},ie.prototype.u=function(){return this.up()},ie.prototype.importXMLBuilder=function(se){return this.importDocument(se)},ie}()}).call(void 0)},{"./Utility":214,"./XMLCData":216,"./XMLComment":217,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233}],228:[function(ye,Fe,Me){"use strict";var Ee=ye("babel-runtime/core-js/object/create"),me=function(be){return be&&be.__esModule?be:{default:be}}(Ee);(function(){var be,ve=function(ge,he){function xe(){this.constructor=ge}for(var fe in he)we.call(he,fe)&&(ge[fe]=he[fe]);return xe.prototype=he.prototype,ge.prototype=new xe,ge.__super__=he.prototype,ge},we={}.hasOwnProperty;be=ye("./XMLNode"),Fe.exports=function(ge){function he(xe,fe,ue){if(he.__super__.constructor.call(this,xe),fe==null)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(fe),ue&&(this.value=this.stringify.insValue(ue))}return ve(he,ge),he.prototype.clone=function(){return(0,me.default)(this)},he.prototype.toString=function(xe){return this.options.writer.set(xe).processingInstruction(this)},he}(be)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],229:[function(ye,Fe,Me){"use strict";var Ee=ye("babel-runtime/core-js/object/create"),me=function(be){return be&&be.__esModule?be:{default:be}}(Ee);(function(){var be,ve=function(ge,he){function xe(){this.constructor=ge}for(var fe in he)we.call(he,fe)&&(ge[fe]=he[fe]);return xe.prototype=he.prototype,ge.prototype=new xe,ge.__super__=he.prototype,ge},we={}.hasOwnProperty;be=ye("./XMLNode"),Fe.exports=function(ge){function he(xe,fe){if(he.__super__.constructor.call(this,xe),fe==null)throw new Error("Missing raw text");this.value=this.stringify.raw(fe)}return ve(he,ge),he.prototype.clone=function(){return(0,me.default)(this)},he.prototype.toString=function(xe){return this.options.writer.set(xe).raw(this)},he}(be)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],230:[function(ye,Fe,Me){"use strict";(function(){var Ee,me,be,ve,we,ge,he,xe,fe,ue,ee,z,oe,ie=function(le,Se){function pe(){this.constructor=le}for(var Ce in Se)se.call(Se,Ce)&&(le[Ce]=Se[Ce]);return pe.prototype=Se.prototype,le.prototype=new pe,le.__super__=Se.prototype,le},se={}.hasOwnProperty;he=ye("./XMLDeclaration"),xe=ye("./XMLDocType"),Ee=ye("./XMLCData"),me=ye("./XMLComment"),fe=ye("./XMLElement"),ee=ye("./XMLRaw"),z=ye("./XMLText"),ue=ye("./XMLProcessingInstruction"),be=ye("./XMLDTDAttList"),ve=ye("./XMLDTDElement"),we=ye("./XMLDTDEntity"),ge=ye("./XMLDTDNotation"),oe=ye("./XMLWriterBase"),Fe.exports=function(le){function Se(pe,Ce){Se.__super__.constructor.call(this,Ce),this.stream=pe}return ie(Se,le),Se.prototype.document=function(pe){var Ce,Ae,Oe,Re,We,$e,Je,pt;for($e=pe.children,Ae=0,Re=$e.length;Ae<Re;Ae++)Ce=$e[Ae],Ce.isLastRootNode=!1;for(pe.children[pe.children.length-1].isLastRootNode=!0,Je=pe.children,pt=[],Oe=0,We=Je.length;Oe<We;Oe++)switch(Ce=Je[Oe],!1){case!(Ce instanceof he):pt.push(this.declaration(Ce));break;case!(Ce instanceof xe):pt.push(this.docType(Ce));break;case!(Ce instanceof me):pt.push(this.comment(Ce));break;case!(Ce instanceof ue):pt.push(this.processingInstruction(Ce));break;default:pt.push(this.element(Ce))}return pt},Se.prototype.attribute=function(pe){return this.stream.write(" "+pe.name+'="'+pe.value+'"')},Se.prototype.cdata=function(pe,Ce){return this.stream.write(this.space(Ce)+"<![CDATA["+pe.text+"]]>"+this.endline(pe))},Se.prototype.comment=function(pe,Ce){return this.stream.write(this.space(Ce)+"<!-- "+pe.text+" -->"+this.endline(pe))},Se.prototype.declaration=function(pe,Ce){return this.stream.write(this.space(Ce)),this.stream.write('<?xml version="'+pe.version+'"'),pe.encoding!=null&&this.stream.write(' encoding="'+pe.encoding+'"'),pe.standalone!=null&&this.stream.write(' standalone="'+pe.standalone+'"'),this.stream.write(this.spacebeforeslash+"?>"),this.stream.write(this.endline(pe))},Se.prototype.docType=function(pe,Ce){var Ae,Oe,Re,We;if(Ce||(Ce=0),this.stream.write(this.space(Ce)),this.stream.write("<!DOCTYPE "+pe.root().name),pe.pubID&&pe.sysID?this.stream.write(' PUBLIC "'+pe.pubID+'" "'+pe.sysID+'"'):pe.sysID&&this.stream.write(' SYSTEM "'+pe.sysID+'"'),pe.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(pe)),We=pe.children,Oe=0,Re=We.length;Oe<Re;Oe++)switch(Ae=We[Oe],!1){case!(Ae instanceof be):this.dtdAttList(Ae,Ce+1);break;case!(Ae instanceof ve):this.dtdElement(Ae,Ce+1);break;case!(Ae instanceof we):this.dtdEntity(Ae,Ce+1);break;case!(Ae instanceof ge):this.dtdNotation(Ae,Ce+1);break;case!(Ae instanceof Ee):this.cdata(Ae,Ce+1);break;case!(Ae instanceof me):this.comment(Ae,Ce+1);break;case!(Ae instanceof ue):this.processingInstruction(Ae,Ce+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(pe))},Se.prototype.element=function(pe,Ce){var Ae,Oe,Re,We,$e,Je,pt,St;Ce||(Ce=0),St=this.space(Ce),this.stream.write(St+"<"+pe.name),Je=pe.attributes;for($e in Je)se.call(Je,$e)&&(Ae=Je[$e],this.attribute(Ae));if(pe.children.length===0||pe.children.every(function(Mt){return Mt.value===""}))this.allowEmpty?this.stream.write("></"+pe.name+">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&pe.children.length===1&&pe.children[0].value!=null)this.stream.write(">"),this.stream.write(pe.children[0].value),this.stream.write("</"+pe.name+">");else{for(this.stream.write(">"+this.newline),pt=pe.children,Re=0,We=pt.length;Re<We;Re++)switch(Oe=pt[Re],!1){case!(Oe instanceof Ee):this.cdata(Oe,Ce+1);break;case!(Oe instanceof me):this.comment(Oe,Ce+1);break;case!(Oe instanceof fe):this.element(Oe,Ce+1);break;case!(Oe instanceof ee):this.raw(Oe,Ce+1);break;case!(Oe instanceof z):this.text(Oe,Ce+1);break;case!(Oe instanceof ue):this.processingInstruction(Oe,Ce+1);break;default:throw new Error("Unknown XML node type: "+Oe.constructor.name)}this.stream.write(St+"</"+pe.name+">")}return this.stream.write(this.endline(pe))},Se.prototype.processingInstruction=function(pe,Ce){return this.stream.write(this.space(Ce)+"<?"+pe.target),pe.value&&this.stream.write(" "+pe.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(pe))},Se.prototype.raw=function(pe,Ce){return this.stream.write(this.space(Ce)+pe.value+this.endline(pe))},Se.prototype.text=function(pe,Ce){return this.stream.write(this.space(Ce)+pe.value+this.endline(pe))},Se.prototype.dtdAttList=function(pe,Ce){return this.stream.write(this.space(Ce)+"<!ATTLIST "+pe.elementName+" "+pe.attributeName+" "+pe.attributeType),pe.defaultValueType!=="#DEFAULT"&&this.stream.write(" "+pe.defaultValueType),pe.defaultValue&&this.stream.write(' "'+pe.defaultValue+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(pe))},Se.prototype.dtdElement=function(pe,Ce){return this.stream.write(this.space(Ce)+"<!ELEMENT "+pe.name+" "+pe.value),this.stream.write(this.spacebeforeslash+">"+this.endline(pe))},Se.prototype.dtdEntity=function(pe,Ce){return this.stream.write(this.space(Ce)+"<!ENTITY"),pe.pe&&this.stream.write(" %"),this.stream.write(" "+pe.name),pe.value?this.stream.write(' "'+pe.value+'"'):(pe.pubID&&pe.sysID?this.stream.write(' PUBLIC "'+pe.pubID+'" "'+pe.sysID+'"'):pe.sysID&&this.stream.write(' SYSTEM "'+pe.sysID+'"'),pe.nData&&this.stream.write(" NDATA "+pe.nData)),this.stream.write(this.spacebeforeslash+">"+this.endline(pe))},Se.prototype.dtdNotation=function(pe,Ce){return this.stream.write(this.space(Ce)+"<!NOTATION "+pe.name),pe.pubID&&pe.sysID?this.stream.write(' PUBLIC "'+pe.pubID+'" "'+pe.sysID+'"'):pe.pubID?this.stream.write(' PUBLIC "'+pe.pubID+'"'):pe.sysID&&this.stream.write(' SYSTEM "'+pe.sysID+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(pe))},Se.prototype.endline=function(pe){return pe.isLastRootNode?"":this.newline},Se}(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(ye,Fe,Me){"use strict";(function(){var Ee,me,be,ve,we,ge,he,xe,fe,ue,ee,z,oe,ie=function(le,Se){function pe(){this.constructor=le}for(var Ce in Se)se.call(Se,Ce)&&(le[Ce]=Se[Ce]);return pe.prototype=Se.prototype,le.prototype=new pe,le.__super__=Se.prototype,le},se={}.hasOwnProperty;he=ye("./XMLDeclaration"),xe=ye("./XMLDocType"),Ee=ye("./XMLCData"),me=ye("./XMLComment"),fe=ye("./XMLElement"),ee=ye("./XMLRaw"),z=ye("./XMLText"),ue=ye("./XMLProcessingInstruction"),be=ye("./XMLDTDAttList"),ve=ye("./XMLDTDElement"),we=ye("./XMLDTDEntity"),ge=ye("./XMLDTDNotation"),oe=ye("./XMLWriterBase"),Fe.exports=function(le){function Se(pe){Se.__super__.constructor.call(this,pe)}return ie(Se,le),Se.prototype.document=function(pe){var Ce,Ae,Oe,Re,We;for(this.textispresent=!1,Re="",We=pe.children,Ae=0,Oe=We.length;Ae<Oe;Ae++)Ce=We[Ae],Re+=function(){switch(!1){case!(Ce instanceof he):return this.declaration(Ce);case!(Ce instanceof xe):return this.docType(Ce);case!(Ce instanceof me):return this.comment(Ce);case!(Ce instanceof ue):return this.processingInstruction(Ce);default:return this.element(Ce,0)}}.call(this);return this.pretty&&Re.slice(-this.newline.length)===this.newline&&(Re=Re.slice(0,-this.newline.length)),Re},Se.prototype.attribute=function(pe){return" "+pe.name+'="'+pe.value+'"'},Se.prototype.cdata=function(pe,Ce){return this.space(Ce)+"<![CDATA["+pe.text+"]]>"+this.newline},Se.prototype.comment=function(pe,Ce){return this.space(Ce)+"<!-- "+pe.text+" -->"+this.newline},Se.prototype.declaration=function(pe,Ce){var Ae;return Ae=this.space(Ce),Ae+='<?xml version="'+pe.version+'"',pe.encoding!=null&&(Ae+=' encoding="'+pe.encoding+'"'),pe.standalone!=null&&(Ae+=' standalone="'+pe.standalone+'"'),Ae+=this.spacebeforeslash+"?>",Ae+=this.newline},Se.prototype.docType=function(pe,Ce){var Ae,Oe,Re,We,$e;if(Ce||(Ce=0),We=this.space(Ce),We+="<!DOCTYPE "+pe.root().name,pe.pubID&&pe.sysID?We+=' PUBLIC "'+pe.pubID+'" "'+pe.sysID+'"':pe.sysID&&(We+=' SYSTEM "'+pe.sysID+'"'),pe.children.length>0){for(We+=" [",We+=this.newline,$e=pe.children,Oe=0,Re=$e.length;Oe<Re;Oe++)Ae=$e[Oe],We+=function(){switch(!1){case!(Ae instanceof be):return this.dtdAttList(Ae,Ce+1);case!(Ae instanceof ve):return this.dtdElement(Ae,Ce+1);case!(Ae instanceof we):return this.dtdEntity(Ae,Ce+1);case!(Ae instanceof ge):return this.dtdNotation(Ae,Ce+1);case!(Ae instanceof Ee):return this.cdata(Ae,Ce+1);case!(Ae instanceof me):return this.comment(Ae,Ce+1);case!(Ae instanceof ue):return this.processingInstruction(Ae,Ce+1);default:throw new Error("Unknown DTD node type: "+Ae.constructor.name)}}.call(this);We+="]"}return We+=this.spacebeforeslash+">",We+=this.newline},Se.prototype.element=function(pe,Ce){var Ae,Oe,Re,We,$e,Je,pt,St,Mt,ct,wt,ft,$t;Ce||(Ce=0),$t=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),ft=this.space(Ce),St="",St+=ft+"<"+pe.name,Mt=pe.attributes;for(pt in Mt)se.call(Mt,pt)&&(Ae=Mt[pt],St+=this.attribute(Ae));if(pe.children.length===0||pe.children.every(function(st){return st.value===""}))this.allowEmpty?St+="></"+pe.name+">"+this.newline:St+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&pe.children.length===1&&pe.children[0].value!=null)St+=">",St+=pe.children[0].value,St+="</"+pe.name+">"+this.newline;else{if(this.dontprettytextnodes){for(ct=pe.children,Re=0,$e=ct.length;Re<$e;Re++)if(Oe=ct[Re],Oe.value!=null){this.textispresent++,$t=!0;break}}for(this.textispresent&&(this.newline="",this.pretty=!1,ft=this.space(Ce)),St+=">"+this.newline,wt=pe.children,We=0,Je=wt.length;We<Je;We++)Oe=wt[We],St+=function(){switch(!1){case!(Oe instanceof Ee):return this.cdata(Oe,Ce+1);case!(Oe instanceof me):return this.comment(Oe,Ce+1);case!(Oe instanceof fe):return this.element(Oe,Ce+1);case!(Oe instanceof ee):return this.raw(Oe,Ce+1);case!(Oe instanceof z):return this.text(Oe,Ce+1);case!(Oe instanceof ue):return this.processingInstruction(Oe,Ce+1);default:throw new Error("Unknown XML node type: "+Oe.constructor.name)}}.call(this);$t&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),St+=ft+"</"+pe.name+">"+this.newline}return St},Se.prototype.processingInstruction=function(pe,Ce){var Ae;return Ae=this.space(Ce)+"<?"+pe.target,pe.value&&(Ae+=" "+pe.value),Ae+=this.spacebeforeslash+"?>"+this.newline},Se.prototype.raw=function(pe,Ce){return this.space(Ce)+pe.value+this.newline},Se.prototype.text=function(pe,Ce){return this.space(Ce)+pe.value+this.newline},Se.prototype.dtdAttList=function(pe,Ce){var Ae;return Ae=this.space(Ce)+"<!ATTLIST "+pe.elementName+" "+pe.attributeName+" "+pe.attributeType,pe.defaultValueType!=="#DEFAULT"&&(Ae+=" "+pe.defaultValueType),pe.defaultValue&&(Ae+=' "'+pe.defaultValue+'"'),Ae+=this.spacebeforeslash+">"+this.newline},Se.prototype.dtdElement=function(pe,Ce){return this.space(Ce)+"<!ELEMENT "+pe.name+" "+pe.value+this.spacebeforeslash+">"+this.newline},Se.prototype.dtdEntity=function(pe,Ce){var Ae;return Ae=this.space(Ce)+"<!ENTITY",pe.pe&&(Ae+=" %"),Ae+=" "+pe.name,pe.value?Ae+=' "'+pe.value+'"':(pe.pubID&&pe.sysID?Ae+=' PUBLIC "'+pe.pubID+'" "'+pe.sysID+'"':pe.sysID&&(Ae+=' SYSTEM "'+pe.sysID+'"'),pe.nData&&(Ae+=" NDATA "+pe.nData)),Ae+=this.spacebeforeslash+">"+this.newline},Se.prototype.dtdNotation=function(pe,Ce){var Ae;return Ae=this.space(Ce)+"<!NOTATION "+pe.name,pe.pubID&&pe.sysID?Ae+=' PUBLIC "'+pe.pubID+'" "'+pe.sysID+'"':pe.pubID?Ae+=' PUBLIC "'+pe.pubID+'"':pe.sysID&&(Ae+=' SYSTEM "'+pe.sysID+'"'),Ae+=this.spacebeforeslash+">"+this.newline},Se.prototype.openNode=function(pe,Ce){var Ae,Oe,Re,We;if(Ce||(Ce=0),pe instanceof fe){Re=this.space(Ce)+"<"+pe.name,We=pe.attributes;for(Oe in We)se.call(We,Oe)&&(Ae=We[Oe],Re+=this.attribute(Ae));return Re+=(pe.children?">":"/>")+this.newline}return Re=this.space(Ce)+"<!DOCTYPE "+pe.rootNodeName,pe.pubID&&pe.sysID?Re+=' PUBLIC "'+pe.pubID+'" "'+pe.sysID+'"':pe.sysID&&(Re+=' SYSTEM "'+pe.sysID+'"'),Re+=(pe.children?" [":">")+this.newline},Se.prototype.closeNode=function(pe,Ce){switch(Ce||(Ce=0),!1){case!(pe instanceof fe):return this.space(Ce)+"</"+pe.name+">"+this.newline;case!(pe instanceof xe):return this.space(Ce)+"]>"+this.newline}},Se}(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(ye,Fe,Me){"use strict";(function(){var Ee=function(be,ve){return function(){return be.apply(ve,arguments)}},me={}.hasOwnProperty;Fe.exports=function(){function be(ve){this.assertLegalChar=Ee(this.assertLegalChar,this);var we,ge,he;ve||(ve={}),this.noDoubleEncoding=ve.noDoubleEncoding,ge=ve.stringify||{};for(we in ge)me.call(ge,we)&&(he=ge[we],this[we]=he)}return be.prototype.eleName=function(ve){return ve=""+ve||"",this.assertLegalChar(ve)},be.prototype.eleText=function(ve){return ve=""+ve||"",this.assertLegalChar(this.elEscape(ve))},be.prototype.cdata=function(ve){return ve=""+ve||"",ve=ve.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(ve)},be.prototype.comment=function(ve){if(ve=""+ve||"",ve.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+ve);return this.assertLegalChar(ve)},be.prototype.raw=function(ve){return""+ve||""},be.prototype.attName=function(ve){return ve=""+ve||""},be.prototype.attValue=function(ve){return ve=""+ve||"",this.attEscape(ve)},be.prototype.insTarget=function(ve){return""+ve||""},be.prototype.insValue=function(ve){if(ve=""+ve||"",ve.match(/\?>/))throw new Error("Invalid processing instruction value: "+ve);return ve},be.prototype.xmlVersion=function(ve){if(ve=""+ve||"",!ve.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+ve);return ve},be.prototype.xmlEncoding=function(ve){if(ve=""+ve||"",!ve.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+ve);return ve},be.prototype.xmlStandalone=function(ve){return ve?"yes":"no"},be.prototype.dtdPubID=function(ve){return""+ve||""},be.prototype.dtdSysID=function(ve){return""+ve||""},be.prototype.dtdElementValue=function(ve){return""+ve||""},be.prototype.dtdAttType=function(ve){return""+ve||""},be.prototype.dtdAttDefault=function(ve){return ve!=null?""+ve||"":ve},be.prototype.dtdEntityValue=function(ve){return""+ve||""},be.prototype.dtdNData=function(ve){return""+ve||""},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(ve){var we;if(we=ve.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+ve+" at index "+we.index);return ve},be.prototype.elEscape=function(ve){var we;return we=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,ve.replace(we,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
")},be.prototype.attEscape=function(ve){var we;return we=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,ve.replace(we,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
")},be}()}).call(void 0)},{}],233:[function(ye,Fe,Me){"use strict";var Ee=ye("babel-runtime/core-js/object/create"),me=function(be){return be&&be.__esModule?be:{default:be}}(Ee);(function(){var be,ve=function(ge,he){function xe(){this.constructor=ge}for(var fe in he)we.call(he,fe)&&(ge[fe]=he[fe]);return xe.prototype=he.prototype,ge.prototype=new xe,ge.__super__=he.prototype,ge},we={}.hasOwnProperty;be=ye("./XMLNode"),Fe.exports=function(ge){function he(xe,fe){if(he.__super__.constructor.call(this,xe),fe==null)throw new Error("Missing element text");this.value=this.stringify.eleText(fe)}return ve(he,ge),he.prototype.clone=function(){return(0,me.default)(this)},he.prototype.toString=function(xe){return this.options.writer.set(xe).text(this)},he}(be)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],234:[function(ye,Fe,Me){"use strict";(function(){var Ee={}.hasOwnProperty;Fe.exports=function(){function me(be){var ve,we,ge,he,xe,fe,ue,ee,z;be||(be={}),this.pretty=be.pretty||!1,this.allowEmpty=(we=be.allowEmpty)!=null&&we,this.pretty?(this.indent=(ge=be.indent)!=null?ge:" ",this.newline=(he=be.newline)!=null?he:`
|
|
|
`,this.offset=(xe=be.offset)!=null?xe: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(ve in ee)Ee.call(ee,ve)&&(z=ee[ve],this[ve]=z)}return me.prototype.set=function(be){var ve,we,ge;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(ve in we)Ee.call(we,ve)&&(ge=we[ve],this[ve]=ge);return this},me.prototype.space=function(be){var ve;return this.pretty?(ve=(be||0)+this.offset+1,ve>0?new Array(ve).join(this.indent):""):""},me}()}).call(void 0)},{}],235:[function(ye,Fe,Me){"use strict";(function(){var Ee,me,be,ve,we,ge,he;he=ye("./Utility"),we=he.assign,ge=he.isFunction,Ee=ye("./XMLDocument"),me=ye("./XMLDocumentCB"),ve=ye("./XMLStringWriter"),be=ye("./XMLStreamWriter"),Fe.exports.create=function(xe,fe,ue,ee){var z,oe;if(xe==null)throw new Error("Root element needs a name");return ee=we({},fe,ue,ee),z=new Ee(ee),oe=z.element(xe),ee.headless||(z.declaration(ee),ee.pubID==null&&ee.sysID==null||z.doctype(ee)),oe},Fe.exports.begin=function(xe,fe,ue){var ee;return ge(xe)&&(ee=[xe,fe],fe=ee[0],ue=ee[1],xe={}),fe?new me(xe,fe,ue):new Ee(xe)},Fe.exports.stringWriter=function(xe){return new ve(xe)},Fe.exports.streamWriter=function(xe,fe){return new be(xe,fe)}}).call(void 0)},{"./Utility":214,"./XMLDocument":224,"./XMLDocumentCB":225,"./XMLStreamWriter":230,"./XMLStringWriter":231}],236:[function(ye,Fe,Me){function Ee(){for(var be={},ve=0;ve<arguments.length;ve++){var we=arguments[ve];for(var ge in we)me.call(we,ge)&&(be[ge]=we[ge])}return be}Fe.exports=Ee;var me=Object.prototype.hasOwnProperty},{}],237:[function(ye,Fe,Me){"use strict";function Ee(ee,z,oe){ve.isBuffer(z)||(z=new ve(z)),ve.isBuffer(oe)||(oe=new ve(oe)),z.length>fe?z=ee(z):z.length<fe&&(z=ve.concat([z,ue],fe));for(var ie=new ve(fe),se=new ve(fe),le=0;le<fe;le++)ie[le]=54^z[le],se[le]=92^z[le];var Se=ee(ve.concat([ie,oe]));return ee(ve.concat([se,Se]))}function me(ee,z){ee=ee||"sha1";var oe=xe[ee],ie=[],se=0;return oe||be("algorithm:",ee,"is not yet supported"),{update:function(le){return ve.isBuffer(le)||(le=new ve(le)),ie.push(le),se+=le.length,this},digest:function(le){var Se=ve.concat(ie),pe=z?Ee(oe,z,Se):oe(Se);return ie=null,le?pe.toString(le):pe}}}function be(){var ee=[].slice.call(arguments).join(" ");throw new Error([ee,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
|
`))}var ve=ye("buffer").Buffer,we=ye("./sha"),ge=ye("./sha256"),he=ye("./md5"),xe={sha1:we,sha256:ge,md5:he},fe=64,ue=new ve(fe);ue.fill(0),Me.createHash=function(ee){return me(ee)},Me.createHmac=function(ee,z){return me(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(ye,Fe,Me){"use strict";function Ee(xe,fe){if(xe.length%we!=0){var ue=xe.length+(we-xe.length%we);xe=ve.concat([xe,ge],ue)}for(var ee=[],z=fe?xe.readInt32BE:xe.readInt32LE,oe=0;oe<xe.length;oe+=we)ee.push(z.call(xe,oe));return ee}function me(xe,fe,ue){for(var ee=new ve(fe),z=ue?ee.writeInt32BE:ee.writeInt32LE,oe=0;oe<xe.length;oe++)z.call(ee,xe[oe],4*oe,!0);return ee}function be(xe,fe,ue,ee){return ve.isBuffer(xe)||(xe=new ve(xe)),me(fe(Ee(xe,ee),xe.length*he),ue,ee)}var ve=ye("buffer").Buffer,we=4,ge=new ve(we);ge.fill(0);var he=8;Fe.exports={hash:be}},{buffer:38}],239:[function(ye,Fe,Me){"use strict";function Ee(ue,ee){ue[ee>>5]|=128<<ee%32,ue[14+(ee+64>>>9<<4)]=ee;for(var z=1732584193,oe=-271733879,ie=-1732584194,se=271733878,le=0;le<ue.length;le+=16){var Se=z,pe=oe,Ce=ie,Ae=se;z=be(z,oe,ie,se,ue[le+0],7,-680876936),se=be(se,z,oe,ie,ue[le+1],12,-389564586),ie=be(ie,se,z,oe,ue[le+2],17,606105819),oe=be(oe,ie,se,z,ue[le+3],22,-1044525330),z=be(z,oe,ie,se,ue[le+4],7,-176418897),se=be(se,z,oe,ie,ue[le+5],12,1200080426),ie=be(ie,se,z,oe,ue[le+6],17,-1473231341),oe=be(oe,ie,se,z,ue[le+7],22,-45705983),z=be(z,oe,ie,se,ue[le+8],7,1770035416),se=be(se,z,oe,ie,ue[le+9],12,-1958414417),ie=be(ie,se,z,oe,ue[le+10],17,-42063),oe=be(oe,ie,se,z,ue[le+11],22,-1990404162),z=be(z,oe,ie,se,ue[le+12],7,1804603682),se=be(se,z,oe,ie,ue[le+13],12,-40341101),ie=be(ie,se,z,oe,ue[le+14],17,-1502002290),oe=be(oe,ie,se,z,ue[le+15],22,1236535329),z=ve(z,oe,ie,se,ue[le+1],5,-165796510),se=ve(se,z,oe,ie,ue[le+6],9,-1069501632),ie=ve(ie,se,z,oe,ue[le+11],14,643717713),oe=ve(oe,ie,se,z,ue[le+0],20,-373897302),z=ve(z,oe,ie,se,ue[le+5],5,-701558691),se=ve(se,z,oe,ie,ue[le+10],9,38016083),ie=ve(ie,se,z,oe,ue[le+15],14,-660478335),oe=ve(oe,ie,se,z,ue[le+4],20,-405537848),z=ve(z,oe,ie,se,ue[le+9],5,568446438),se=ve(se,z,oe,ie,ue[le+14],9,-1019803690),ie=ve(ie,se,z,oe,ue[le+3],14,-187363961),oe=ve(oe,ie,se,z,ue[le+8],20,1163531501),z=ve(z,oe,ie,se,ue[le+13],5,-1444681467),se=ve(se,z,oe,ie,ue[le+2],9,-51403784),ie=ve(ie,se,z,oe,ue[le+7],14,1735328473),oe=ve(oe,ie,se,z,ue[le+12],20,-1926607734),z=we(z,oe,ie,se,ue[le+5],4,-378558),se=we(se,z,oe,ie,ue[le+8],11,-2022574463),ie=we(ie,se,z,oe,ue[le+11],16,1839030562),oe=we(oe,ie,se,z,ue[le+14],23,-35309556),z=we(z,oe,ie,se,ue[le+1],4,-1530992060),se=we(se,z,oe,ie,ue[le+4],11,1272893353),ie=we(ie,se,z,oe,ue[le+7],16,-155497632),oe=we(oe,ie,se,z,ue[le+10],23,-1094730640),z=we(z,oe,ie,se,ue[le+13],4,681279174),se=we(se,z,oe,ie,ue[le+0],11,-358537222),ie=we(ie,se,z,oe,ue[le+3],16,-722521979),oe=we(oe,ie,se,z,ue[le+6],23,76029189),z=we(z,oe,ie,se,ue[le+9],4,-640364487),se=we(se,z,oe,ie,ue[le+12],11,-421815835),ie=we(ie,se,z,oe,ue[le+15],16,530742520),oe=we(oe,ie,se,z,ue[le+2],23,-995338651),z=ge(z,oe,ie,se,ue[le+0],6,-198630844),se=ge(se,z,oe,ie,ue[le+7],10,1126891415),ie=ge(ie,se,z,oe,ue[le+14],15,-1416354905),oe=ge(oe,ie,se,z,ue[le+5],21,-57434055),z=ge(z,oe,ie,se,ue[le+12],6,1700485571),se=ge(se,z,oe,ie,ue[le+3],10,-1894986606),ie=ge(ie,se,z,oe,ue[le+10],15,-1051523),oe=ge(oe,ie,se,z,ue[le+1],21,-2054922799),z=ge(z,oe,ie,se,ue[le+8],6,1873313359),se=ge(se,z,oe,ie,ue[le+15],10,-30611744),ie=ge(ie,se,z,oe,ue[le+6],15,-1560198380),oe=ge(oe,ie,se,z,ue[le+13],21,1309151649),z=ge(z,oe,ie,se,ue[le+4],6,-145523070),se=ge(se,z,oe,ie,ue[le+11],10,-1120210379),ie=ge(ie,se,z,oe,ue[le+2],15,718787259),oe=ge(oe,ie,se,z,ue[le+9],21,-343485551),z=he(z,Se),oe=he(oe,pe),ie=he(ie,Ce),se=he(se,Ae)}return Array(z,oe,ie,se)}function me(ue,ee,z,oe,ie,se){return he(xe(he(he(ee,ue),he(oe,se)),ie),z)}function be(ue,ee,z,oe,ie,se,le){return me(ee&z|~ee&oe,ue,ee,ie,se,le)}function ve(ue,ee,z,oe,ie,se,le){return me(ee&oe|z&~oe,ue,ee,ie,se,le)}function we(ue,ee,z,oe,ie,se,le){return me(ee^z^oe,ue,ee,ie,se,le)}function ge(ue,ee,z,oe,ie,se,le){return me(z^(ee|~oe),ue,ee,ie,se,le)}function he(ue,ee){var z=(65535&ue)+(65535&ee);return(ue>>16)+(ee>>16)+(z>>16)<<16|65535&z}function xe(ue,ee){return ue<<ee|ue>>>32-ee}var fe=ye("./helpers");Fe.exports=function(ue){return fe.hash(ue,Ee,16)}},{"./helpers":238}],240:[function(ye,Fe,Me){"use strict";function Ee(he,xe){he[xe>>5]|=128<<24-xe%32,he[15+(xe+64>>9<<4)]=xe;for(var fe=Array(80),ue=1732584193,ee=-271733879,z=-1732584194,oe=271733878,ie=-1009589776,se=0;se<he.length;se+=16){for(var le=ue,Se=ee,pe=z,Ce=oe,Ae=ie,Oe=0;Oe<80;Oe++){fe[Oe]=Oe<16?he[se+Oe]:we(fe[Oe-3]^fe[Oe-8]^fe[Oe-14]^fe[Oe-16],1);var Re=ve(ve(we(ue,5),me(Oe,ee,z,oe)),ve(ve(ie,fe[Oe]),be(Oe)));ie=oe,oe=z,z=we(ee,30),ee=ue,ue=Re}ue=ve(ue,le),ee=ve(ee,Se),z=ve(z,pe),oe=ve(oe,Ce),ie=ve(ie,Ae)}return Array(ue,ee,z,oe,ie)}function me(he,xe,fe,ue){return he<20?xe&fe|~xe&ue:he<40?xe^fe^ue:he<60?xe&fe|xe&ue|fe&ue:xe^fe^ue}function be(he){return he<20?1518500249:he<40?1859775393:he<60?-1894007588:-899497514}function ve(he,xe){var fe=(65535&he)+(65535&xe);return(he>>16)+(xe>>16)+(fe>>16)<<16|65535&fe}function we(he,xe){return he<<xe|he>>>32-xe}var ge=ye("./helpers");Fe.exports=function(he){return ge.hash(he,Ee,20,!0)}},{"./helpers":238}],241:[function(ye,Fe,Me){"use strict";var Ee=ye("./helpers"),me=function(z,oe){var ie=(65535&z)+(65535&oe);return(z>>16)+(oe>>16)+(ie>>16)<<16|65535&ie},be=function(z,oe){return z>>>oe|z<<32-oe},ve=function(z,oe){return z>>>oe},we=function(z,oe,ie){return z&oe^~z&ie},ge=function(z,oe,ie){return z&oe^z&ie^oe&ie},he=function(z){return be(z,2)^be(z,13)^be(z,22)},xe=function(z){return be(z,6)^be(z,11)^be(z,25)},fe=function(z){return be(z,7)^be(z,18)^ve(z,3)},ue=function(z){return be(z,17)^be(z,19)^ve(z,10)},ee=function(z,oe){var ie,se,le,Se,pe,Ce,Ae,Oe,Re,We,$e,Je,pt=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),St=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 Re=0;Re<z.length;Re+=16){ie=St[0],se=St[1],le=St[2],Se=St[3],pe=St[4],Ce=St[5],Ae=St[6],Oe=St[7];for(var We=0;We<64;We++)Mt[We]=We<16?z[We+Re]:me(me(me(ue(Mt[We-2]),Mt[We-7]),fe(Mt[We-15])),Mt[We-16]),$e=me(me(me(me(Oe,xe(pe)),we(pe,Ce,Ae)),pt[We]),Mt[We]),Je=me(he(ie),ge(ie,se,le)),Oe=Ae,Ae=Ce,Ce=pe,pe=me(Se,$e),Se=le,le=se,se=ie,ie=me($e,Je);St[0]=me(ie,St[0]),St[1]=me(se,St[1]),St[2]=me(le,St[2]),St[3]=me(Se,St[3]),St[4]=me(pe,St[4]),St[5]=me(Ce,St[5]),St[6]=me(Ae,St[6]),St[7]=me(Oe,St[7])}return St};Fe.exports=function(z){return Ee.hash(z,ee,32,!0)}},{"./helpers":238}],242:[function(ye,Fe,Me){(function(Ee){"use strict";function me(ee){return ee&&ee.__esModule?ee:{default:ee}}var be=ye("babel-runtime/core-js/object/create"),ve=me(be),we=ye("babel-runtime/helpers/classCallCheck"),ge=me(we),he=ye("babel-runtime/helpers/createClass"),xe=me(he),fe=ye("babel-runtime/helpers/typeof"),ue=me(fe);(function(ee){if((Me===void 0?"undefined":(0,ue.default)(Me))==="object"&&Fe!==void 0)Fe.exports=ee();else if(typeof Le=="function"&&Le.amd)Le([],ee);else{var z;z=typeof window!="undefined"?window:Ee!==void 0?Ee:typeof self!="undefined"?self:this,z.mime=ee()}})(function(){return function ee(z,oe,ie){function se(pe,Ce){if(!oe[pe]){if(!z[pe]){var Ae=typeof ye=="function"&&ye;if(!Ce&&Ae)return Ae(pe,!0);if(le)return le(pe,!0);var Oe=new Error("Cannot find module '"+pe+"'");throw Oe.code="MODULE_NOT_FOUND",Oe}var Re=oe[pe]={exports:{}};z[pe][0].call(Re.exports,function(We){var $e=z[pe][1][We];return se($e||We)},Re,Re.exports,ee,z,oe,ie)}return oe[pe].exports}for(var le=typeof ye=="function"&&ye,Se=0;Se<ie.length;Se++)se(ie[Se]);return se}({1:[function(ee,z,oe){var ie=function(){function se(){(0,ge.default)(this,se),this._types=(0,ve.default)(null),this._extensions=(0,ve.default)(null);for(var le=0;le<arguments.length;le++)this.define(arguments[le])}return(0,xe.default)(se,[{key:"define",value:function(le,Se){for(var pe in le){for(var Ce=le[pe],Ae=0;Ae<Ce.length;Ae++){var Oe=Ce[Ae];if(!Se&&Oe in this._types)throw new Error('Attempt to change mapping for "'+Oe+'" extension from "'+this._types[Oe]+'" to "'+pe+'". Pass `force=true` to allow this, otherwise remove "'+Oe+'" from the list of extensions for "'+pe+'".');this._types[Oe]=pe}!Se&&this._extensions[pe]||(this._extensions[pe]=Ce[0])}}},{key:"getType",value:function(le){le=String(le);var Se=le.replace(/^.*[\/\\]/,"").toLowerCase(),pe=Se.replace(/^.*\./,"").toLowerCase(),Ce=Se.length<le.length;return(pe.length<Se.length-1||!Ce)&&this._types[pe]||null}},{key:"getExtension",value:function(le){return(le=/^\s*([^;\s]*)/.test(le)&&RegExp.$1)&&this._extensions[le.toLowerCase()]||null}}]),se}();z.exports=ie},{}],2:[function(ee,z,oe){var ie=ee("./Mime");z.exports=new ie(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 De.g!="undefined"?De.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(ye,Fe,Me){"use strict";Me.encodeURIComponent=function(Ee){try{return encodeURIComponent(Ee)}catch(me){return Ee}},Me.escape=ye("escape-html"),Me.timestamp=function(Ee){if(Ee){var me=Ee;return typeof me=="string"&&(me=Number(me)),String(Ee).length===10&&(me*=1e3),new Date(me)}return Math.round(Date.now()/1e3)}},{"escape-html":157}],244:[function(ye,Fe,Me){(function(Ee,me){"use strict";function be(Oe){return Oe&&Oe.__esModule?Oe:{default:Oe}}function ve(Oe,Re){return Oe===void 0?Re:Oe}function we(Oe,Re){return function(We,$e,Je){if(We)return Re(We);Oe({data:$e,status:Je.statusCode,headers:Je.headers,res:Je})}}var ge,he=ye("babel-runtime/core-js/json/stringify"),xe=be(he),fe=ye("babel-runtime/helpers/typeof"),ue=be(fe),ee=ye("util"),z=ye("url"),oe=ye("http"),ie=ye("https"),se=ye("debug")("urllib"),le=ye("humanize-ms"),Se=0,pe=Math.pow(2,31)-10,Ce=/^https?:\/\//i;Me.TIMEOUTS=[le("300s"),le("300s")];var Ae=["json","text"];Me.request=function(Oe,Re,We){return arguments.length===2&&typeof Re=="function"&&(We=Re,Re=null),typeof We=="function"?Me.requestWithCallback(Oe,Re,We):(ge||(ge=ye("any-promise")),new ge(function($e,Je){Me.requestWithCallback(Oe,Re,we($e,Je))}))},Me.requestWithCallback=function(Oe,Re,We){function $e(){nt&&(clearTimeout(nt),nt=null)}function Je(){Ke&&(clearTimeout(Ke),Ke=null)}function pt(Cn,Ki,Yn){if(Je(),!We)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),st,Ee.pid,Gt.method,Oe),void(Cn&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),st,Ee.pid,Cn.name,Cn.message,Cn.stack));var Qi=We;We=null;var vr={};if(Yn&&(Xe=Yn.statusCode,vr=Yn.headers),Xe===401&&vr["www-authenticate"]&&(!Re.headers||!Re.headers.Authorization)&&Re.digestAuth){var Dr=vr["www-authenticate"];if(Dr.indexOf("Digest ")>=0)return se("Request#%d %s: got digest auth header WWW-Authenticate: %s",st,Oe,Dr),Re.headers=Re.headers||{},Re.headers.Authorization=digestAuthHeader(Gt.method,Gt.path,Dr,Re.digestAuth),se("Request#%d %s: auth with digest header: %s",st,Oe,Re.headers.Authorization),Yn.headers["set-cookie"]&&(Re.headers.Cookie=Yn.headers["set-cookie"].join(";")),Me.requestWithCallback(Oe,Re,Qi)}var Ci=Date.now()-dt;An&&(An.contentDownload=Ci),se("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Ci,Ze,Xe,Gt.method,Gt.host,Gt.path,rt,An);var kr={status:Xe,statusCode:Xe,headers:vr,size:Ze,aborted:mt,rt:Ci,keepAliveSocket:rt,data:Ki,requestUrls:Re.requestUrls,timing:An,remoteAddress:Rt,remotePort:vn};if(Cn){var vo="";Kt&&typeof Kt.getCurrentStatus=="function"&&(vo=", agent status: "+(0,xe.default)(Kt.getCurrentStatus())),Cn.message+=", "+Gt.method+" "+Oe+" "+Xe+" (connected: "+Ue+", keepalive socket: "+rt+vo+`)
|
|
|
headers: `+(0,xe.default)(vr),Cn.data=Ki,Cn.path=Gt.path,Cn.status=Xe,Cn.headers=vr,Cn.res=kr}Qi(Cn,Ki,Re.streaming?Yn:kr),Re.emitter&&(et.url=Oe,et.socket=si&&si.connection,et.options=Gt,et.size=it,Re.emitter.emit("response",{requestId:st,error:Cn,ctx:Re.ctx,req:et,res:kr}))}function St(Cn){var Ki=null;if(Re.followRedirect&&statuses.redirect[Cn.statusCode]){Re._followRedirectCount=(Re._followRedirectCount||0)+1;var Yn=Cn.headers.location;if(Yn){if(!(Re._followRedirectCount>Re.maxRedirects)){var Qi=Re.formatRedirectUrl?Re.formatRedirectUrl(Oe,Yn):z.resolve(Oe,Yn);se("Request#%d %s: `redirected` from %s to %s",st,Gt.path,Oe,Qi),Je(),Re.headers&&Re.headers.Host&&Ce.test(Yn)&&(Re.headers.Host=null);var vr=We;return We=null,Me.requestWithCallback(Qi,Re,vr),{redirect:!0,error:null}}Ki=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+Oe),Ki.name="MaxRedirectError"}else Ki=new Error("Got statusCode "+Cn.statusCode+" but cannot resolve next location from headers"),Ki.name="FollowRedirectError"}return{redirect:!1,error:Ki}}function Mt(Cn,Ki,Yn){return Yn(null,Ki,Cn.headers["content-encoding"])}function ct(Cn){if(An&&(An.waiting=Date.now()-dt),se("Request#%d %s `req response` event emit: status %d, headers: %j",st,Oe,Cn.statusCode,Cn.headers),Re.streaming){var Ki=St(Cn);return Ki.redirect?void Cn.resume():Ki.error?(Cn.resume(),pt(Ki.error,null,Cn)):pt(null,null,Cn)}if(Cn.on("close",function(){se("Request#%d %s: `res close` event emit, total size %d",st,Oe,Ze)}),Cn.on("error",function(){se("Request#%d %s: `res error` event emit, total size %d",st,Oe,Ze)}),Cn.on("aborted",function(){mt=!0,se("Request#%d %s: `res aborted` event emit, total size %d",st,Oe,Ze)}),Mn){var Ki=St(Cn);return Ki.redirect?void Cn.resume():Ki.error?(Cn.resume(),Mn.end(),pt(Ki.error,null,Cn)):(Re.consumeWriteStream===!1?Cn.on("end",pt.bind(null,null,null,Cn)):isNode010||isNode012?first([[Mn,"close"],[Cn,"aborted"]],function(vr,Dr,Ci){se("Request#%d %s: writeStream or res %s event emitted",st,Oe,Ci),pt(Be||null,null,Cn)}):Mn.on("close",function(){se("Request#%d %s: writeStream close event emitted",st,Oe),pt(Be||null,null,Cn)}),Cn.pipe(Mn))}var Yn=[];Cn.on("data",function(Qi){se("Request#%d %s: `res data` event emit, size %d",st,Oe,Qi.length),Ze+=Qi.length,Yn.push(Qi)}),Cn.on("end",function(){var Qi=me.concat(Yn,Ze);if(se("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",st,Oe,Ze,Cn._dumped),Be)return pt(Be,Qi,Cn);var vr=St(Cn);if(vr.error)return pt(vr.error,Qi,Cn);vr.redirect||Mt(Cn,Qi,function(Dr,Ci,kr){if(Dr)return pt(Dr,Qi,Cn);if(!kr&&Ae.indexOf(Re.dataType)>=0){try{Ci=decodeBodyByCharset(Ci,Cn)}catch(qo){return se("decodeBodyByCharset error: %s",qo),pt(null,Ci,Cn)}if(Re.dataType==="json")if(Ze===0)Ci=null;else{var vo=parseJSON(Ci,gn);vo.error?Dr=vo.error:Ci=vo.data}}mt&&se("Request#%d %s: Remote socket was terminated before `response.end()` was called",st,Oe),pt(Dr,Ci,Cn)})})}function wt(){se("Response timer ticking, timeout: %d",mi),Ke=setTimeout(function(){Ke=null;var Cn="Response timeout for "+mi+"ms";Be=new Error(Cn),Be.name="ResponseTimeoutError",Be.requestId=st,se("ResponseTimeout: Request#%d %s %s: %s, connected: %s",st,Oe,Be.name,Cn,Ue),ft()},mi)}function ft(){se("Request#%d %s abort, connected: %s",st,Oe,Ue),si.socket||(Be.noSocket=!0,pt(Be)),si.abort()}if(!Oe||typeof Oe!="string"&&(Oe===void 0?"undefined":(0,ue.default)(Oe))!=="object"){var $t=ee.format("expect request url to be a string or a http request options, but got %j",Oe);throw new Error($t)}arguments.length===2&&typeof Re=="function"&&(We=Re,Re=null),Re=Re||{},Se>=pe&&(Se=0);var st=++Se;Re.requestUrls=Re.requestUrls||[];var et={requestId:st,url:Oe,args:Re,ctx:Re.ctx};Re.emitter&&Re.emitter.emit("request",et),Re.timeout=Re.timeout||Me.TIMEOUTS,Re.maxRedirects=Re.maxRedirects||10,Re.streaming=Re.streaming||Re.customResponse;var lt,dt=Date.now();typeof Oe=="string"?(Ce.test(Oe)||(Oe="http://"+Oe),lt=z.parse(Oe)):lt=Oe;var bt=(Re.type||Re.method||lt.method||"GET").toUpperCase(),yt=lt.port||80,Vt=oe,Kt=ve(Re.agent,Me.agent),gn=Re.fixJSONCtlChars;lt.protocol==="https:"&&(Vt=ie,Kt=ve(Re.httpsAgent,Me.httpsAgent),lt.port||(yt=443));var Gt={host:lt.hostname||lt.host||"localhost",path:lt.path||"/",method:bt,port:yt,agent:Kt,headers:Re.headers||{},lookup:Re.lookup};Array.isArray(Re.timeout)?Gt.requestTimeout=Re.timeout[Re.timeout.length-1]:Re.timeout!==void 0&&(Gt.requestTimeout=Re.timeout);for(var Dt=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],on=0;on<Dt.length;on++){var Jt=Dt[on];Re.hasOwnProperty(Jt)&&(Gt[Jt]=Re[Jt])}Gt.rejectUnauthorized!==!1||Gt.hasOwnProperty("secureOptions")||(Gt.secureOptions=ye("constants").SSL_OP_NO_TLSv1_2);var jt=Re.auth||lt.auth;jt&&(Gt.auth=jt);var ut=Re.content||Re.data,ze=bt==="GET"||bt==="HEAD"||Re.dataAsQueryString;if(!Re.content&&ut&&typeof ut!="string"&&!me.isBuffer(ut))if(ze)ut=Re.nestedQuerystring?qs.stringify(ut):querystring.stringify(ut);else{var je=Gt.headers["Content-Type"]||Gt.headers["content-type"];je||(je=Re.contentType==="json"?"application/json":"application/x-www-form-urlencoded",Gt.headers["Content-Type"]=je),ut=parseContentType(je).type==="application/json"?(0,xe.default)(ut):Re.nestedQuerystring?qs.stringify(ut):querystring.stringify(ut)}ze&&ut&&(Gt.path+=(lt.query?"&":"?")+ut,ut=null);var it=0;if(ut){var ht=ut.length;me.isBuffer(ut)||(ht=me.byteLength(ut)),it=Gt.headers["Content-Length"]=ht}Re.dataType==="json"&&(Gt.headers.Accept="application/json"),typeof Re.beforeRequest=="function"&&Re.beforeRequest(Gt);var nt=null,Ke=null,Be=null,Ue=!1,rt=!1,Ze=0,Xe=-1,mt=!1,Rt="",vn="",An=null;Re.timing&&(An={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),Gt.headers["User-Agent"]||Gt.headers["user-agent"]||(Gt.headers["User-Agent"]=navigator.userAgent),Re.gzip&&(Gt.headers["Accept-Encoding"]||Gt.headers["accept-encoding"]||(Gt.headers["Accept-Encoding"]="gzip"));var Mn=Re.writeStream;se("Request#%d %s %s with headers %j, options.path: %s",st,bt,Oe,Gt.headers,Gt.path),Re.requestUrls.push(Oe);var hi,mi;Array.isArray(Re.timeout)?(hi=le(Re.timeout[0]),mi=le(Re.timeout[1])):hi=mi=le(Re.timeout),se("ConnectTimeout: %d, ResponseTimeout: %d",hi,mi);var si;try{si=Vt.request(Gt,ct)}catch(Cn){return pt(Cn)}return typeof window=="undefined"?function(){se("Connect timer ticking, timeout: %d",hi),nt=setTimeout(function(){nt=null,Xe===-1&&(Xe=-2);var Cn="Connect timeout for "+hi+"ms",Ki="ConnectionTimeoutError";si.socket||(Ki="SocketAssignTimeoutError",Cn+=", working sockets is full"),Be=new Error(Cn),Be.name=Ki,Be.requestId=st,se("ConnectTimeout: Request#%d %s %s: %s, connected: %s",st,Oe,Be.name,Cn,Ue),ft()},hi)}():si.on("requestTimeout",function(){Xe===-1&&(Xe=-2);var Cn="Connect timeout for "+hi+"ms";Be=new Error(Cn),Be.name="ConnectionTimeoutError",Be.requestId=st,ft()}),An&&si.on("finish",function(){An.requestSent=Date.now()-dt}),si.once("socket",function(Cn){An&&(An.queuing=Date.now()-dt),isNode010&&Cn.socket&&(Cn=Cn.socket);var Ki=Cn.readyState;if(Ki==="opening")return Cn.once("lookup",function(Yn,Qi,vr){se("Request#%d %s lookup: %s, %s, %s",st,Oe,Yn,Qi,vr),An&&(An.dnslookup=Date.now()-dt),Qi&&(Rt=Qi)}),void Cn.once("connect",function(){An&&(An.connected=Date.now()-dt),$e(),wt(),se("Request#%d %s new socket connected",st,Oe),Ue=!0,Rt||(Rt=Cn.remoteAddress),vn=Cn.remotePort});se("Request#%d %s reuse socket connected, readyState: %s",st,Oe,Ki),Ue=!0,rt=!0,Rt||(Rt=Cn.remoteAddress),vn=Cn.remotePort,$e(),wt()}),si.on("error",function(Cn){Cn.name!=="Error"&&Cn.name!=="TypeError"||(Cn.name=Ue?"ResponseError":"RequestError"),Cn.message+=' (req "error")',se("Request#%d %s `req error` event emit, %s: %s",st,Oe,Cn.name,Cn.message),pt(Be||Cn)}),Mn&&Mn.once("error",function(Cn){Cn.message+=' (writeStream "error")',Be=Cn,se("Request#%d %s `writeStream error` event emit, %s: %s",st,Oe,Cn.name,Cn.message),ft()}),Re.stream?(Re.stream.pipe(si),Re.stream.once("error",function(Cn){Cn.message+=' (stream "error")',Be=Cn,se("Request#%d %s `readStream error` event emit, %s: %s",st,Oe,Cn.name,Cn.message),ft()})):si.end(ut),si.requestId=st,si}}).call(this,ye("_process"),ye("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 ye(Me){if(Fe[Me])return Fe[Me].exports;var Ee=Fe[Me]={i:Me,l:!1,exports:{}};return Le[Me].call(Ee.exports,Ee,Ee.exports,ye),Ee.l=!0,Ee.exports}var Fe={};ye.m=Le,ye.c=Fe,ye.d=function(Me,Ee,me){ye.o(Me,Ee)||Object.defineProperty(Me,Ee,{configurable:!1,enumerable:!0,get:me})},ye.n=function(Me){var Ee=Me&&Me.__esModule?function(){return Me.default}:function(){return Me};return ye.d(Ee,"a",Ee),Ee},ye.o=function(Me,Ee){return Object.prototype.hasOwnProperty.call(Me,Ee)},ye.p="",ye(ye.s=12)}([function(Le,ye,Fe){(function(Me,Ee){Le.exports=ye=Ee()})(0,function(){var Me=Me||function(Ee,me){var be=Object.create||function(){function ie(){}return function(se){var le;return ie.prototype=se,le=new ie,ie.prototype=null,le}}(),ve={},we=ve.lib={},ge=we.Base=function(){return{extend:function(ie){var se=be(this);return ie&&se.mixIn(ie),se.hasOwnProperty("init")&&this.init!==se.init||(se.init=function(){se.$super.init.apply(this,arguments)}),se.init.prototype=se,se.$super=this,se},create:function(){var ie=this.extend();return ie.init.apply(ie,arguments),ie},init:function(){},mixIn:function(ie){for(var se in ie)ie.hasOwnProperty(se)&&(this[se]=ie[se]);ie.hasOwnProperty("toString")&&(this.toString=ie.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),he=we.WordArray=ge.extend({init:function(ie,se){ie=this.words=ie||[],this.sigBytes=se!=null?se:4*ie.length},toString:function(ie){return(ie||fe).stringify(this)},concat:function(ie){var se=this.words,le=ie.words,Se=this.sigBytes,pe=ie.sigBytes;if(this.clamp(),Se%4)for(var Ce=0;Ce<pe;Ce++){var Ae=le[Ce>>>2]>>>24-Ce%4*8&255;se[Se+Ce>>>2]|=Ae<<24-(Se+Ce)%4*8}else for(var Ce=0;Ce<pe;Ce+=4)se[Se+Ce>>>2]=le[Ce>>>2];return this.sigBytes+=pe,this},clamp:function(){var ie=this.words,se=this.sigBytes;ie[se>>>2]&=4294967295<<32-se%4*8,ie.length=Ee.ceil(se/4)},clone:function(){var ie=ge.clone.call(this);return ie.words=this.words.slice(0),ie},random:function(ie){for(var se,le=[],Se=0;Se<ie;Se+=4){var pe=function(Ae){var Ae=Ae,Oe=987654321,Re=4294967295;return function(){Oe=36969*(65535&Oe)+(Oe>>16)&Re,Ae=18e3*(65535&Ae)+(Ae>>16)ℜvar We=(Oe<<16)+Aeℜreturn We/=4294967296,(We+=.5)*(Ee.random()>.5?1:-1)}}(4294967296*(se||Ee.random()));se=987654071*pe(),le.push(4294967296*pe()|0)}return new he.init(le,ie)}}),xe=ve.enc={},fe=xe.Hex={stringify:function(ie){for(var se=ie.words,le=ie.sigBytes,Se=[],pe=0;pe<le;pe++){var Ce=se[pe>>>2]>>>24-pe%4*8&255;Se.push((Ce>>>4).toString(16)),Se.push((15&Ce).toString(16))}return Se.join("")},parse:function(ie){for(var se=ie.length,le=[],Se=0;Se<se;Se+=2)le[Se>>>3]|=parseInt(ie.substr(Se,2),16)<<24-Se%8*4;return new he.init(le,se/2)}},ue=xe.Latin1={stringify:function(ie){for(var se=ie.words,le=ie.sigBytes,Se=[],pe=0;pe<le;pe++){var Ce=se[pe>>>2]>>>24-pe%4*8&255;Se.push(String.fromCharCode(Ce))}return Se.join("")},parse:function(ie){for(var se=ie.length,le=[],Se=0;Se<se;Se++)le[Se>>>2]|=(255&ie.charCodeAt(Se))<<24-Se%4*8;return new he.init(le,se)}},ee=xe.Utf8={stringify:function(ie){try{return decodeURIComponent(escape(ue.stringify(ie)))}catch(se){throw new Error("Malformed UTF-8 data")}},parse:function(ie){return ue.parse(unescape(encodeURIComponent(ie)))}},z=we.BufferedBlockAlgorithm=ge.extend({reset:function(){this._data=new he.init,this._nDataBytes=0},_append:function(ie){typeof ie=="string"&&(ie=ee.parse(ie)),this._data.concat(ie),this._nDataBytes+=ie.sigBytes},_process:function(ie){var se=this._data,le=se.words,Se=se.sigBytes,pe=this.blockSize,Ce=4*pe,Ae=Se/Ce;Ae=ie?Ee.ceil(Ae):Ee.max((0|Ae)-this._minBufferSize,0);var Oe=Ae*pe,Re=Ee.min(4*Oe,Se);if(Oe){for(var We=0;We<Oe;We+=pe)this._doProcessBlock(le,We);var $e=le.splice(0,Oe);se.sigBytes-=Re}return new he.init($e,Re)},clone:function(){var ie=ge.clone.call(this);return ie._data=this._data.clone(),ie},_minBufferSize:0}),oe=(we.Hasher=z.extend({cfg:ge.extend(),init:function(ie){this.cfg=this.cfg.extend(ie),this.reset()},reset:function(){z.reset.call(this),this._doReset()},update:function(ie){return this._append(ie),this._process(),this},finalize:function(ie){return ie&&this._append(ie),this._doFinalize()},blockSize:16,_createHelper:function(ie){return function(se,le){return new ie.init(le).finalize(se)}},_createHmacHelper:function(ie){return function(se,le){return new oe.HMAC.init(ie,le).finalize(se)}}}),ve.algo={});return ve}(Math);return Me})},function(Le,ye,Fe){"use strict";function Me(be,ve){if(!(be instanceof ve))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ye,"__esModule",{value:!0});var Ee=function(){function be(ve,we){for(var ge=0;ge<we.length;ge++){var he=we[ge];he.enumerable=he.enumerable||!1,he.configurable=!0,"value"in he&&(he.writable=!0),Object.defineProperty(ve,he.key,he)}}return function(ve,we,ge){return we&&be(ve.prototype,we),ge&&be(ve,ge),ve}}(),me=function(){function be(){Me(this,be)}return Ee(be,null,[{key:"detectIEVersion",value:function(){for(var ve=4,we=document.createElement("div"),ge=we.getElementsByTagName("i");we.innerHTML="<!--[if gt IE "+ve+"]><i></i><![endif]-->",ge[0];)ve++;return ve>4&&ve}},{key:"extend",value:function(ve,we){for(var ge in we)Object.prototype.hasOwnProperty.call(we,ge)&&we[ge]&&(ve[ge]=we[ge])}},{key:"isArray",value:function(ve){return Object.prototype.toString.call(arg)==="[object Array]"}},{key:"getFileType",value:function(ve){return ve=ve.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(ve)?"video":/.mp3|.wav|.ape|.cda|.au|.midi|.mac|.aac|.ac3|.acm|.amr|.caf|.flac|.m4a|.ra|.wma/.test(ve)?"audio":/.bmp|.jpg|.jpeg|.png/.test(ve)?"img":"other"}},{key:"isImage",value:function(ve){return ve=ve.toLowerCase(),!!/.jpg|.jpeg|.png/.test(ve)}},{key:"ISODateString",value:function(ve){function we(ge){return ge<10?"0"+ge:ge}return ve.getUTCFullYear()+"-"+we(ve.getUTCMonth()+1)+"-"+we(ve.getUTCDate())+"T"+we(ve.getUTCHours())+":"+we(ve.getUTCMinutes())+":"+we(ve.getUTCSeconds())+"Z"}},{key:"isIntNum",value:function(ve){return!!/^\d+$/.test(ve)}}]),be}();ye.default=me},function(Le,ye,Fe){(function(Me,Ee){Le.exports=ye=Ee(Fe(0))})(0,function(Me){return function(Ee){function me(oe,ie,se,le,Se,pe,Ce){var Ae=oe+(ie&se|~ie&le)+Se+Ce;return(Ae<<pe|Ae>>>32-pe)+ie}function be(oe,ie,se,le,Se,pe,Ce){var Ae=oe+(ie&le|se&~le)+Se+Ce;return(Ae<<pe|Ae>>>32-pe)+ie}function ve(oe,ie,se,le,Se,pe,Ce){var Ae=oe+(ie^se^le)+Se+Ce;return(Ae<<pe|Ae>>>32-pe)+ie}function we(oe,ie,se,le,Se,pe,Ce){var Ae=oe+(se^(ie|~le))+Se+Ce;return(Ae<<pe|Ae>>>32-pe)+ie}var ge=Me,he=ge.lib,xe=he.WordArray,fe=he.Hasher,ue=ge.algo,ee=[];(function(){for(var oe=0;oe<64;oe++)ee[oe]=4294967296*Ee.abs(Ee.sin(oe+1))|0})();var z=ue.MD5=fe.extend({_doReset:function(){this._hash=new xe.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(oe,ie){for(var se=0;se<16;se++){var le=ie+se,Se=oe[le];oe[le]=16711935&(Se<<8|Se>>>24)|4278255360&(Se<<24|Se>>>8)}var pe=this._hash.words,Ce=oe[ie+0],Ae=oe[ie+1],Oe=oe[ie+2],Re=oe[ie+3],We=oe[ie+4],$e=oe[ie+5],Je=oe[ie+6],pt=oe[ie+7],St=oe[ie+8],Mt=oe[ie+9],ct=oe[ie+10],wt=oe[ie+11],ft=oe[ie+12],$t=oe[ie+13],st=oe[ie+14],et=oe[ie+15],lt=pe[0],dt=pe[1],bt=pe[2],yt=pe[3];lt=me(lt,dt,bt,yt,Ce,7,ee[0]),yt=me(yt,lt,dt,bt,Ae,12,ee[1]),bt=me(bt,yt,lt,dt,Oe,17,ee[2]),dt=me(dt,bt,yt,lt,Re,22,ee[3]),lt=me(lt,dt,bt,yt,We,7,ee[4]),yt=me(yt,lt,dt,bt,$e,12,ee[5]),bt=me(bt,yt,lt,dt,Je,17,ee[6]),dt=me(dt,bt,yt,lt,pt,22,ee[7]),lt=me(lt,dt,bt,yt,St,7,ee[8]),yt=me(yt,lt,dt,bt,Mt,12,ee[9]),bt=me(bt,yt,lt,dt,ct,17,ee[10]),dt=me(dt,bt,yt,lt,wt,22,ee[11]),lt=me(lt,dt,bt,yt,ft,7,ee[12]),yt=me(yt,lt,dt,bt,$t,12,ee[13]),bt=me(bt,yt,lt,dt,st,17,ee[14]),dt=me(dt,bt,yt,lt,et,22,ee[15]),lt=be(lt,dt,bt,yt,Ae,5,ee[16]),yt=be(yt,lt,dt,bt,Je,9,ee[17]),bt=be(bt,yt,lt,dt,wt,14,ee[18]),dt=be(dt,bt,yt,lt,Ce,20,ee[19]),lt=be(lt,dt,bt,yt,$e,5,ee[20]),yt=be(yt,lt,dt,bt,ct,9,ee[21]),bt=be(bt,yt,lt,dt,et,14,ee[22]),dt=be(dt,bt,yt,lt,We,20,ee[23]),lt=be(lt,dt,bt,yt,Mt,5,ee[24]),yt=be(yt,lt,dt,bt,st,9,ee[25]),bt=be(bt,yt,lt,dt,Re,14,ee[26]),dt=be(dt,bt,yt,lt,St,20,ee[27]),lt=be(lt,dt,bt,yt,$t,5,ee[28]),yt=be(yt,lt,dt,bt,Oe,9,ee[29]),bt=be(bt,yt,lt,dt,pt,14,ee[30]),dt=be(dt,bt,yt,lt,ft,20,ee[31]),lt=ve(lt,dt,bt,yt,$e,4,ee[32]),yt=ve(yt,lt,dt,bt,St,11,ee[33]),bt=ve(bt,yt,lt,dt,wt,16,ee[34]),dt=ve(dt,bt,yt,lt,st,23,ee[35]),lt=ve(lt,dt,bt,yt,Ae,4,ee[36]),yt=ve(yt,lt,dt,bt,We,11,ee[37]),bt=ve(bt,yt,lt,dt,pt,16,ee[38]),dt=ve(dt,bt,yt,lt,ct,23,ee[39]),lt=ve(lt,dt,bt,yt,$t,4,ee[40]),yt=ve(yt,lt,dt,bt,Ce,11,ee[41]),bt=ve(bt,yt,lt,dt,Re,16,ee[42]),dt=ve(dt,bt,yt,lt,Je,23,ee[43]),lt=ve(lt,dt,bt,yt,Mt,4,ee[44]),yt=ve(yt,lt,dt,bt,ft,11,ee[45]),bt=ve(bt,yt,lt,dt,et,16,ee[46]),dt=ve(dt,bt,yt,lt,Oe,23,ee[47]),lt=we(lt,dt,bt,yt,Ce,6,ee[48]),yt=we(yt,lt,dt,bt,pt,10,ee[49]),bt=we(bt,yt,lt,dt,st,15,ee[50]),dt=we(dt,bt,yt,lt,$e,21,ee[51]),lt=we(lt,dt,bt,yt,ft,6,ee[52]),yt=we(yt,lt,dt,bt,Re,10,ee[53]),bt=we(bt,yt,lt,dt,ct,15,ee[54]),dt=we(dt,bt,yt,lt,Ae,21,ee[55]),lt=we(lt,dt,bt,yt,St,6,ee[56]),yt=we(yt,lt,dt,bt,et,10,ee[57]),bt=we(bt,yt,lt,dt,Je,15,ee[58]),dt=we(dt,bt,yt,lt,$t,21,ee[59]),lt=we(lt,dt,bt,yt,We,6,ee[60]),yt=we(yt,lt,dt,bt,wt,10,ee[61]),bt=we(bt,yt,lt,dt,Oe,15,ee[62]),dt=we(dt,bt,yt,lt,Mt,21,ee[63]),pe[0]=pe[0]+lt|0,pe[1]=pe[1]+dt|0,pe[2]=pe[2]+bt|0,pe[3]=pe[3]+yt|0},_doFinalize:function(){var oe=this._data,ie=oe.words,se=8*this._nDataBytes,le=8*oe.sigBytes;ie[le>>>5]|=128<<24-le%32;var Se=Ee.floor(se/4294967296),pe=se;ie[15+(le+64>>>9<<4)]=16711935&(Se<<8|Se>>>24)|4278255360&(Se<<24|Se>>>8),ie[14+(le+64>>>9<<4)]=16711935&(pe<<8|pe>>>24)|4278255360&(pe<<24|pe>>>8),oe.sigBytes=4*(ie.length+1),this._process();for(var Ce=this._hash,Ae=Ce.words,Oe=0;Oe<4;Oe++){var Re=Ae[Oe];Ae[Oe]=16711935&(Re<<8|Re>>>24)|4278255360&(Re<<24|Re>>>8)}return Ce},clone:function(){var oe=fe.clone.call(this);return oe._hash=this._hash.clone(),oe}});ge.MD5=fe._createHelper(z),ge.HmacMD5=fe._createHmacHelper(z)}(Math),Me.MD5})},function(Le,ye,Fe){"use strict";Object.defineProperty(ye,"__esModule",{value:!0}),ye.UPLOADSTATE={INIT:"init",UPLOADING:"uploading",COMPLETE:"complete",INTERRUPT:"interrupt"},ye.UPLOADSTEP={INIT:"init",PART:"part",COMPLETE:"complete"},ye.UPLOADDEFAULT={PARALLEL:5,PARTSIZE:1048576}},function(Le,ye,Fe){"use strict";function Me(z){return z&&z.__esModule?z:{default:z}}function Ee(z,oe){if(!(z instanceof oe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ye,"__esModule",{value:!0});var me=function(){function z(oe,ie){for(var se=0;se<ie.length;se++){var le=ie[se];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(oe,le.key,le)}}return function(oe,ie,se){return ie&&z(oe.prototype,ie),se&&z(oe,se),oe}}(),be=Fe(5),ve=Me(be),we=Fe(25),ge=Me(we),he=Fe(6),xe=Me(he),fe=Fe(7),ue=Me(fe),ee=function(){function z(oe){Ee(this,z);var ie=ue.default.os.name,se=ue.default.os.version||"",le=ue.default.browser.name,Se=ue.default.browser.version||"",pe=window.location.href,Ce="";pe&&(Ce=ue.default.getHost(pe));var Ae="pc";ue.default.os.ipad?Ae="pad":(ue.default.os.iphone||ue.default.os.android)&&(Ae="phone"),this._ri=ve.default.create(),this.initParam={APIVersion:"0.6.0",lv:"1",av:xe.default.version,pd:"upload",sm:"upload",md:"uploader",uuid:z.getUuid(),os:ie,ov:se,et:le,ev:Se,uat:navigator.userAgent,app_n:Ce,tt:Ae,dm:"h5",ut:""}}return me(z,[{key:"log",value:function(oe,ie){ie&&ie.ri?(this._ri=ie.ri,delete ie.ri):this._ri=ve.default.create(),ie&&ie.ut&&(this.initParam.ut=ie.ut,delete ie.ut),this.initParam.t=new Date().getTime(),this.initParam.ll=oe=="20006"?"error":"info",this.initParam.ri=this._ri,this.initParam.e=oe;var se=[];if(ie)for(var le in ie)se.push(le+"="+ie[le]);var Se=se.join("&");this.initParam.args=encodeURIComponent(Se==""?"0":Se);var pe=[];for(var le in this.initParam)pe.push(le+"="+this.initParam[le]);var Ce=pe.join("&");AliyunUpload&&AliyunUpload.__logTestCallback__?AliyunUpload.__logTestCallback__(Ce):new Image(0,0).src="https://videocloud.cn-hangzhou.log.aliyuncs.com/logstores/upload/track?"+Ce}}],[{key:"getUuid",value:function(){var oe=ge.default.get("p_h5_upload_u");return oe||(oe=ve.default.create(),ge.default.set("p_h5_upload_u",oe,730)),oe}},{key:"getClientId",value:function(){return ge.default.get("p_h5_upload_clientId")}},{key:"setClientId",value:function(oe){return oe||(oe=ve.default.create()),ge.default.set("p_h5_upload_clientId",oe,730),oe}}]),z}();ye.default=ee},function(Le,ye,Fe){"use strict";function Me(be,ve){if(!(be instanceof ve))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ye,"__esModule",{value:!0});var Ee=function(){function be(ve,we){for(var ge=0;ge<we.length;ge++){var he=we[ge];he.enumerable=he.enumerable||!1,he.configurable=!0,"value"in he&&(he.writable=!0),Object.defineProperty(ve,he.key,he)}}return function(ve,we,ge){return we&&be(ve.prototype,we),ge&&be(ve,ge),ve}}(),me=function(){function be(){Me(this,be)}return Ee(be,null,[{key:"create",value:function(ve,we){var ge,he="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),xe=[];if(we=we||he.length,ve)for(ge=0;ge<ve;ge++)xe[ge]=he[0|Math.random()*we];else{var fe;for(xe[8]=xe[13]=xe[18]=xe[23]="-",xe[14]="4",ge=0;ge<36;ge++)xe[ge]||(fe=0|16*Math.random(),xe[ge]=he[ge==19?3&fe|8:fe])}return xe.join("")}}]),be}();ye.default=me},function(Le,ye,Fe){"use strict";Object.defineProperty(ye,"__esModule",{value:!0});var Me={version:"1.5.0"};ye.default=Me},function(Le,ye,Fe){"use strict";function Me(he,xe){if(!(he instanceof xe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ye,"__esModule",{value:!0});var Ee=function(){function he(xe,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(xe,ee.key,ee)}}return function(xe,fe,ue){return fe&&he(xe.prototype,fe),ue&&he(xe,ue),xe}}(),me=function(he){var xe=navigator.userAgent,fe="other";if(he.ios)return"iOS";if(he.android)return"android";if(xe.indexOf("Baiduspider")>-1)return"Baiduspider";if(xe.indexOf("PlayStation")>-1)return"PS4";var ue=navigator.platform=="Win32"||navigator.platform=="Windows"||xe.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 he=navigator.userAgent,xe="";return(he.indexOf("Windows NT 5.0")>-1||he.indexOf("Windows 2000")>-1)&&(xe="2000"),(he.indexOf("Windows NT 5.1")>-1||he.indexOf("Windows XP")>-1)&&(xe="XP"),(he.indexOf("Windows NT 5.2")>-1||he.indexOf("Windows 2003")>-1)&&(xe="2003"),(he.indexOf("Windows NT 6.0")>-1||he.indexOf("Windows Vista")>-1)&&(xe="Vista"),(he.indexOf("Windows NT 6.1")>-1||he.indexOf("Windows 7")>-1)&&(xe="7"),(he.indexOf("Windows NT 6.2")>-1||he.indexOf("Windows 8")>-1)&&(xe="8"),(he.indexOf("Windows NT 6.3")>-1||he.indexOf("Windows 8.1")>-1)&&(xe="8.1"),(he.indexOf("Windows NT 10")>-1||he.indexOf("Windows 10")>-1)&&(xe="10"),xe},ve=function(he){var xe=navigator.userAgent.toLowerCase();return he.chrome?"Chrome":he.firefox?"Firefox":he.safari?"Safari":he.webview?"webview":he.ie?/edge/.test(xe)?"Edge":"IE":/baiduspider/.test(xe)?"Baiduspider":/ucweb/.test(xe)||/UCBrowser/.test(xe)?"UC":/opera/.test(xe)?"Opera":/ucweb/.test(xe)?"UC":/360se/.test(xe)?"360\u6D4F\u89C8\u5668":/bidubrowser/.test(xe)?"\u767E\u5EA6\u6D4F\u89C8\u5668":/metasr/.test(xe)?"\u641C\u72D7\u6D4F\u89C8\u5668":/lbbrowser/.test(xe)?"\u730E\u8C79\u6D4F\u89C8\u5668":/micromessenger/.test(xe)?"\u5FAE\u4FE1\u5185\u7F6E\u6D4F\u89C8\u5668":/qqbrowser/.test(xe)?"QQ\u6D4F\u89C8\u5668":/playstation/.test(xe)?"PS4\u6D4F\u89C8\u5668":void 0},we=function(){var he={},xe={},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 /),ie=fe.match(/(iPad).*OS\s([\d_]+)/),se=fe.match(/(iPod)(.*OS\s([\d_]+))?/),le=!ie&&fe.match(/(iPhone\sOS)\s([\d_]+)/),Se=fe.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),pe=/Win\d{2}|Windows/.test(ue),Ce=fe.match(/Windows Phone ([\d.]+)/),Ae=Se&&fe.match(/TouchPad/),Oe=fe.match(/Kindle\/([\d.]+)/),Re=fe.match(/Silk\/([\d._]+)/),We=fe.match(/(BlackBerry).*Version\/([\d.]+)/),$e=fe.match(/(BB10).*Version\/([\d.]+)/),Je=fe.match(/(RIM\sTablet\sOS)\s([\d.]+)/),pt=fe.match(/PlayBook/),St=fe.match(/Chrome\/([\d.]+)/)||fe.match(/CriOS\/([\d.]+)/),Mt=fe.match(/Firefox\/([\d.]+)/),ct=fe.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),wt=fe.match(/MSIE\s([\d.]+)/)||fe.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),ft=!St&&fe.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),$t=ft||fe.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);if((xe.webkit=!!ee)&&(xe.version=ee[1]),z&&(he.android=!0,he.version=z[2]),le&&!se&&(he.ios=he.iphone=!0,he.version=le[2].replace(/_/g,".")),ie&&(he.ios=he.ipad=!0,he.version=ie[2].replace(/_/g,".")),se&&(he.ios=he.ipod=!0,he.version=se[3]?se[3].replace(/_/g,"."):null),Ce&&(he.wp=!0,he.version=Ce[1]),Se&&(he.webos=!0,he.version=Se[2]),Ae&&(he.touchpad=!0),We&&(he.blackberry=!0,he.version=We[2]),$e&&(he.bb10=!0,he.version=$e[2]),Je&&(he.rimtabletos=!0,he.version=Je[2]),pt&&(xe.playbook=!0),Oe&&(he.kindle=!0,he.version=Oe[1]),Re&&(xe.silk=!0,xe.version=Re[1]),!Re&&he.android&&fe.match(/Kindle Fire/)&&(xe.silk=!0),St&&(xe.chrome=!0,xe.version=St[1]),Mt&&(xe.firefox=!0,xe.version=Mt[1]),ct&&(he.firefoxos=!0,he.version=ct[1]),wt&&(xe.ie=!0,xe.version=wt[1]),$t&&(oe||he.ios||pe||z)&&(xe.safari=!0,he.ios||(xe.version=$t[1])),ft&&(xe.webview=!0),oe){var st=fe.match(/[\d]*_[\d]*_[\d]*/);st&&st.length>0&&st[0]&&(he.version=st[0].replace(/_/g,"."))}return he.tablet=!!(ie||pt||z&&!fe.match(/Mobile/)||Mt&&fe.match(/Tablet/)||wt&&!fe.match(/Phone/)&&fe.match(/Touch/)),he.phone=!(he.tablet||he.ipod||!(z||le||Se||We||$e||St&&fe.match(/Android/)||St&&fe.match(/CriOS\/([\d.]+)/)||Mt&&fe.match(/Mobile/)||wt&&fe.match(/Touch/))),he.pc=!he.tablet&&!he.phone,oe?he.name="macOS":pe?(he.name="windows",he.version=be()):he.name=me(he),xe.name=ve(xe),{os:he,browser:xe}}(),ge=function(){function he(){Me(this,he)}return Ee(he,null,[{key:"getHost",value:function(xe){var ee="";if(xe===void 0||xe==null||xe=="")return"";var fe=xe.indexOf("//"),ue=xe;fe>-1&&(ue=xe.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 xe=we.browser;return xe.name||(xe.name=ve()),xe}}]),he}();ye.default=ge},function(Le,ye,Fe){"use strict";function Me(be,ve){if(!(be instanceof ve))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ye,"__esModule",{value:!0});var Ee=function(){function be(ve,we){for(var ge=0;ge<we.length;ge++){var he=we[ge];he.enumerable=he.enumerable||!1,he.configurable=!0,"value"in he&&(he.writable=!0),Object.defineProperty(ve,he.key,he)}}return function(ve,we,ge){return we&&be(ve.prototype,we),ge&&be(ve,ge),ve}}(),me=function(){function be(){Me(this,be)}return Ee(be,null,[{key:"get",value:function(ve,we,ge,he,xe){var fe;ge=ge||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):ge(fe.responseText))};try{he===void 0&&(he=!0),fe.open("GET",ve,he),xe&&(fe.withCredentials=!0)}catch(ue){return void ge(ue)}try{fe.send()}catch(ue){ge(ue)}}}]),be}();ye.default=me},function(Le,ye,Fe){"use strict";function Me(we,ge){if(!(we instanceof ge))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ye,"__esModule",{value:!0});var Ee=function(){function we(ge,he){for(var xe=0;xe<he.length;xe++){var fe=he[xe];fe.enumerable=fe.enumerable||!1,fe.configurable=!0,"value"in fe&&(fe.writable=!0),Object.defineProperty(ge,fe.key,fe)}}return function(ge,he,xe){return he&&we(ge.prototype,he),xe&&we(ge,xe),ge}}(),me=Fe(27),be=Fe(30),ve=(Fe(10),function(){function we(){Me(this,we)}return Ee(we,null,[{key:"randomUUID",value:function(){for(var ge=[],he="0123456789abcdef",xe=0;xe<36;xe++)ge[xe]=he.substr(Math.floor(16*Math.random()),1);return ge[14]="4",ge[19]=he.substr(3&ge[19]|8,1),ge[8]=ge[13]=ge[18]=ge[23]="-",ge.join("")}},{key:"aliyunEncodeURI",value:function(ge){var he=encodeURIComponent(ge);return he=he.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(ge,he,xe){if(!ge)throw new Error("PrismPlayer Error: vid should not be null!");var fe=[];for(var ue in ge)fe.push(ue);for(var ee=fe.sort(),z="",oe=ee.length,ue=0;ue<oe;ue++){var ie=we.aliyunEncodeURI(ee[ue]),se=we.aliyunEncodeURI(ge[ee[ue]]);z==""?z=ie+he+se:z+=xe+ie+he+se}return z}},{key:"makeChangeSiga",value:function(ge,he){if(!ge)throw new Error("PrismPlayer Error: vid should not be null!");return be.stringify(me("GET&"+we.aliyunEncodeURI("/")+"&"+we.aliyunEncodeURI(we.makeUTF8sort(ge,"=","&")),he+"&"))}}]),we}());ye.default=ve},function(Le,ye,Fe){(function(Me,Ee){Le.exports=ye=Ee(Fe(0))})(0,function(Me){return Me.enc.Utf8})},function(Le,ye,Fe){(function(Me,Ee){Le.exports=ye=Ee(Fe(0))})(0,function(Me){return Me.enc.Hex})},function(Le,ye,Fe){Le.exports=Fe(13)},function(Le,ye,Fe){"use strict";var Me,Ee,me=Fe(14),be=function(we){return we&&we.__esModule?we:{default:we}}(me),ve={Vod:be.default};Me=[],(Ee=function(){return ve}.apply(ye,Me))!==void 0&&(Le.exports=Ee),window.AliyunUpload=ve,_n.exports=AliyunUpload},function(Le,ye,Fe){"use strict";function Me($e){return $e&&$e.__esModule?$e:{default:$e}}function Ee($e,Je){if(!($e instanceof Je))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ye,"__esModule",{value:!0});var me=function(){function $e(Je,pt){for(var St=0;St<pt.length;St++){var Mt=pt[St];Mt.enumerable=Mt.enumerable||!1,Mt.configurable=!0,"value"in Mt&&(Mt.writable=!0),Object.defineProperty(Je,Mt.key,Mt)}}return function(Je,pt,St){return pt&&$e(Je.prototype,pt),St&&$e(Je,St),Je}}(),be=Fe(15),ve=Fe(3),we=Fe(16),ge=Me(we),he=Fe(18),xe=Me(he),fe=Fe(24),ue=Me(fe),ee=Fe(4),z=Me(ee),oe=Fe(1),ie=Me(oe),se=Fe(5),le=Me(se),Se=Fe(26),pe=Me(Se),Ce=Fe(31),Ae=Me(Ce),Oe=Fe(32),Re=Me(Oe),We=(Fe(2),function(){function $e(Je){Ee(this,$e),this.options=Je,this.options.partSize=this.options.partSize||ve.UPLOADDEFAULT.PARTSIZE,this.options.parallel=this.options.parallel||ve.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 me($e,[{key:"init",value:function(Je,pt,St,Mt){return this._retryCount=0,!(St&&!Mt||!St&&Mt)&&!(Je&&!pt||!Je&&pt)&&(this._ossCreditor.accessKeyId=Je,this._ossCreditor.accessKeySecret=pt,this._ossCreditor.securityToken=St,this._ossCreditor.expireTime=Mt,!0)}},{key:"addFile",value:function(Je,pt,St,Mt,ct,wt){if(!Je)return!1;if(Je.size==0)try{this.options.onUploadFailed({file:Je},"EmptyFile","\u6587\u4EF6\u5927\u5C0F\u4E3A0\uFF0C\u4E0D\u80FD\u4E0A\u4F20")}catch(et){console.log(et)}for(var ft=(this.options,0);ft<this._uploadList.length;ft++)if(this._uploadList[ft].file==Je)return!1;var $t=new Object;if($t.file=Je,$t._endpoint=pt,$t._bucket=St,$t._object=Mt,$t.state=be.UPLOADSTATE.INIT,$t.isImage=ie.default.isImage(Je.name),!$t.isImage&&this.options.enableUploadProgress){var st=this;Re.default.getMd5(Je,function(et){$t.fileHash=et;var lt=st._getCheckoutpoint($t);st.options.localCheckpoint||lt||st._getCheckoutpointFromCloud($t,function(dt){if(dt.UploadPoint){var bt=JSON.parse(dt.UploadPoint);bt.loaded!=1&&($t.checkpoint=bt.checkpoint,$t.loaded=bt.loaded,$t.videoId=dt.VideoId,st._saveCheckoutpoint($t,bt.checkpoint))}},function(dt){try{if((dt=JSON.parse(dt))&&dt.Code=="InvalidParameter"&&dt.Message.indexOf("UserId")>0){st._invalidUserId=!0;var bt=dt.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(bt)}}catch(yt){console.log(yt)}})})}ct&&($t.videoInfo=ct?JSON.parse(ct).Vod:{},$t.userData=xe.default.encode(ct)),$t.ri=le.default.create(),this._uploadList.push($t),this._reportLog("20001",$t,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess($t)}catch(et){console.log(et)}return!0}},{key:"deleteFile",value:function(Je){return!!this.cancelFile(Je)&&(this._uploadList.splice(Je,1),!0)}},{key:"cleanList",value:function(){this.stopUpload(),this._uploadList.length=0,this._curIndex=-1}},{key:"cancelFile",value:function(Je){if(this.options,Je<0||Je>=this._uploadList.length)return!1;var pt=this._uploadList[Je];if(Je==this._curIndex&&pt.state==be.UPLOADSTATE.UPLOADING){pt.state=be.UPLOADSTATE.CANCELED;var St=this._getCheckoutpoint(pt);St&&St.checkpoint&&(St=St.checkpoint),St&&this._ossUpload.abort(pt),this._removeCheckoutpoint(pt),this.nextUpload()}else pt.state!=be.UPLOADSTATE.SUCCESS&&(pt.state=be.UPLOADSTATE.CANCELED);return this._reportLog("20008",pt),!0}},{key:"resumeFile",value:function(Je){if(this.options,Je<0||Je>=this._uploadList.length)return!1;var pt=this._uploadList[Je];return pt.state==be.UPLOADSTATE.CANCELED&&(pt.state=be.UPLOADSTATE.INIT,!0)}},{key:"listFiles",value:function(){return this._uploadList}},{key:"getCheckpoint",value:function(Je){return this._getCheckoutpoint({file:Je})}},{key:"startUpload",value:function(Je){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 pt=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(pt),this._state=be.VODSTATE.START}},{key:"nextUpload",value:function(){var Je=this.options;if(this._state==be.VODSTATE.START)if(this._curIndex=this._findUploadIndex(),this._curIndex!=-1){var pt=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(pt)}else{this._state=be.VODSTATE.END;try{Je.onUploadEnd&&Je.onUploadEnd(pt)}catch(St){console.log(St)}}}},{key:"clear",value:function(Je){for(var pt=this.options,St=0,Mt=0;Mt<this._uploadList.length;Mt++)pt.uploadList[Mt].state==be.UPLOADSTATE.SUCCESS&&St++,this._uploadList[Mt].state==Je&&(pt.uploadList.splice(Mt,1),Mt--);pt.onClear&&pt.onClear(pt.uploadList.length,St)}},{key:"stopUpload",value:function(){if((this._state==be.VODSTATE.START||this._state==be.VODSTATE.FAILURE||this._curIndex==-1)&&this._curIndex!=-1){var Je=this._uploadList[this._curIndex];this._state=be.VODSTATE.STOP,Je.state=be.UPLOADSTATE.STOPED,this._changeState(Je,be.UPLOADSTATE.STOPED),this._ossUpload.cancel()}}},{key:"resumeUploadWithAuth",value:function(Je){var pt=this;if(!Je)return!1;var St=JSON.parse(xe.default.decode(Je));return!!(St.AccessKeyId&&St.AccessKeySecret&&St.SecurityToken&&St.Expiration)&&pt.resumeUploadWithToken(St.AccessKeyId,St.AccessKeySecret,St.SecurityToken,St.Expiration)}},{key:"resumeUploadWithToken",value:function(Je,pt,St,Mt){if(this.options,!(Je&&pt&&St&&Mt)||this._state!=be.VODSTATE.EXPIRE||this._curIndex==-1)return!1;var ct="";return this._uploadList.length>this._curIndex&&(ct=this._uploadList[this._curIndex]),ct&&(this.init(Je,pt,St,Mt),this._state=be.VODSTATE.START,this._ossUpload=null,this._uploadCore(ct,ct.retry),ct.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(Je,pt,St){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,Je,pt,St):this.setSTSToken(Mt,Je,pt,St)}}},{key:"setSTSTokenDirectlyUpload",value:function(Je,pt,St,Mt,ct){if(!(pt&&St&&Mt&&ct))return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken and expiration should not be empty."),!1;this._ut="oss";var wt=Je;this.init(pt,St,Mt,ct),wt.endpoint=wt._endpoint,wt.bucket=wt._bucket,wt.object=wt._object,this._ossUpload=null,this._uploadCore(wt,Je.retry),Je.retry=!1}},{key:"setSTSToken",value:function(Je,pt,St,Mt){if(!pt||!St||!Mt)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var ct=Je.videoInfo,wt={accessKeyId:pt,securityToken:Mt,accessKeySecret:St,fileName:Je.file.name,title:ct.Title,requestId:Je.ri,region:this.options.region};ct.ImageType&&(wt.imageType=ct.ImageType),ct.ImageExt&&(wt.imageExt=ct.ImageExt),ct.FileSize&&(wt.fileSize=ct.FileSize),ct.Description&&(wt.description=ct.Description),ct.CateId&&(wt.cateId=ct.CateId),ct.Tags&&(wt.tags=ct.Tags),ct.TemplateGroupId&&(wt.templateGroupId=ct.TemplateGroupId),ct.StorageLocation&&(wt.storageLocation=ct.StorageLocation),ct.CoverURL&&(wt.coverUrl=ct.CoverURL),ct.TransCodeMode&&(wt.transCodeMode=ct.TransCodeMode),ct.UserData&&(wt.userData=ct.UserData);var ft=this,$t="getUploadAuth";Je.videoId?(wt.videoId=Je.videoId,$t="refreshUploadAuth"):Je.isImage&&($t="getImageUploadAuth"),pe.default[$t](wt,function(st){Je.videoId=st.VideoId?st.VideoId:Je.videoId,ft.setUploadAuthAndAddress(Je,st.UploadAuth,st.UploadAddress),ft._state=be.VODSTATE.START},function(st){ft._error(Je,{name:st.Code,code:st.Code,message:st.Message,requestId:st.RequestId})})}},{key:"setUploadAuthAndAddress",value:function(Je,pt,St,Mt){if(!Je||!pt||!St)return!1;var ct=JSON.parse(xe.default.decode(pt));if(!(ct.AccessKeyId&&ct.AccessKeySecret&&ct.SecurityToken&&ct.Expiration))return console.error("uploadauth is invalid"),!1;var wt={},ft=Je;if(St){if(wt=JSON.parse(xe.default.decode(St)),!wt.Endpoint||!wt.Bucket||!wt.FileName)return console.error("uploadAddress is invalid"),!1}else wt.Endpoint=ft.endpoint,wt.Bucket=ft.bucket,wt.FileName=ft.object;this._ut="vod",this._uploadWay="vod",this.options.region=ct.Region||this.options.region,this.init(ct.AccessKeyId,ct.AccessKeySecret,ct.SecurityToken,ct.Expiration),ft.endpoint=ft._endpoint?ft._endpoint:wt.Endpoint,ft.bucket=ft._bucket?ft._bucket:wt.Bucket,ft.object=ft._object?ft._object:wt.FileName,ft.region=this.options.region,Mt&&(ft.videoId=Mt),this._ossUpload=null,this._uploadCore(ft,Je.retry),Je.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(Je,pt,St,Mt){if(!pt||!St||!Mt)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;var ct={accessKeyId:pt,securityToken:Mt,accessKeySecret:St,videoId:Je.object,requestId:Je.ri,region:this.options.region},wt=this,ft="refreshUploadAuth";Je.isImage&&(ft="getImageUploadAuth"),pe.default[ft](ct,function($t){wt.setUploadAuthAndAddress(Je,$t.UploadAuth,UploadAddress),wt._state=be.VODSTATE.START},function($t){wt._error(Je,{name:$t.Code,code:$t.Code,message:$t.Message,requestId:$t.RequestId})})}},{key:"_upload",value:function(Je){var pt=arguments.length>1&&arguments[1]!==void 0&&arguments[1],St=this.options;if(Je.retry=pt,St.onUploadstarted&&!pt)try{var Mt=this._getCheckoutpoint(Je);Mt&&Mt.state!=be.UPLOADSTATE.UPLOADING&&(Je.checkpoint=Mt,Je.videoId=Mt.videoId),St.onUploadstarted(Je)}catch(ct){console.log(ct)}}},{key:"_uploadCore",value:function(Je){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(Je.state=be.UPLOADSTATE.UPLOADING,!this._ossUpload){Je.endpoint=Je.endpoint||"http://oss-cn-hangzhou.aliyuncs.com";var pt=this;this._ossUpload=new ge.default({bucket:Je.bucket,endpoint:Je.endpoint,AccessKeyId:this._ossCreditor.accessKeyId,AccessKeySecret:this._ossCreditor.accessKeySecret,SecurityToken:this._ossCreditor.securityToken,timeout:this.options.timeout,cname:this.options.cname},{onerror:function(st,et){pt._error.call(pt,st,et)},oncomplete:function(st,et){pt._complete.call(pt,st,et)},onprogress:function(st,et,lt){pt._progress.call(pt,st,et,lt)}})}var St=ie.default.getFileType(Je.file.name),Mt=this._getCheckoutpoint(Je),ct="",wt="";Mt&&Mt.checkpoint&&(wt=Mt.state,ct=Mt.videoId,Mt=Mt.checkpoint),Mt&&ct==Je.videoId&&wt!=be.UPLOADSTATE.UPLOADING&&(Mt.file=Je.file,Je.checkpoint=Mt,Mt.uploadId);var ft=this._adjustPartSize(Je);this._reportLog("20002",Je,{ft:St,fs:Je.file.size,bu:Je.bucket,ok:Je.object,vid:Je.videoId||"",fn:Je.file.name,fw:null,fh:null,ps:ft});var $t={headers:{"x-oss-notification":Je.userData?Je.userData:""},partSize:ft,parallel:this.options.parallel};this._ossUpload.upload(Je,$t)}},{key:"_findUploadIndex",value:function(){for(var Je=-1,pt=0;pt<this._uploadList.length;pt++)if(this._uploadList[pt].state==be.UPLOADSTATE.INIT){Je=pt;break}return Je}},{key:"_error",value:function(Je,pt){if(pt.name=="cancel")try{this.options.onUploadCanceled(Je,pt)}catch(Mt){console.log(Mt)}else{if(pt.message.indexOf("InvalidAccessKeyIdError")>0||pt.name=="SignatureDoesNotMatchError"||pt.code=="SecurityTokenExpired"||pt.code=="InvalidSecurityToken.Expired"||pt.code=="InvalidAccessKeyId"&&this._ossCreditor.securityToken){if(this.options.onUploadTokenExpired){this._state=be.VODSTATE.EXPIRE,Je.state=be.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(Je,pt)}catch(Mt){console.log(Mt)}}return}if((pt.name=="RequestTimeoutError"||pt.name=="ConnectionTimeout"||pt.name=="ConnectionTimeoutError")&&this._retryTotal>this._retryCount){var St=this;return setTimeout(function(){St._uploadCore(Je,!0)},1e3*St._retryDuration),void this._retryCount++}pt.name=="NoSuchUploadError"&&this._removeCheckoutpoint(Je),this._handleError(Je,pt)}}},{key:"_handleError",value:function(Je,pt){var St=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],Mt=be.UPLOADSTATE.FAIlURE;if(Je.state!=be.UPLOADSTATE.CANCELED&&(Je.state=be.UPLOADSTATE.FAIlURE,this._state=be.VODSTATE.FAILURE,this.options.onUploadFailed&&pt&&pt.code&&pt.message))try{this.options.onUploadFailed(Je,pt.code,pt.message)}catch(wt){console.log(wt)}if(St&&this._changeState(Je,Mt),this._reportLog("20006",Je,{code:pt.name,message:pt.message,requestId:pt.requestId,fs:Je.file.size,bu:Je.bucket,ok:Je.object,fn:Je.file.name}),this._reportLog("20004",Je,{requestId:pt.requestId,fs:Je.file.size,bu:Je.bucket,ok:Je.object,fn:Je.file.name}),Je.ri=le.default.create(),this._findUploadIndex()!=-1){var ct=this;this._state=be.VODSTATE.START,setTimeout(function(){ct.nextUpload()},100)}}},{key:"_complete",value:function(Je,pt){if(Je.state=be.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(Je)}catch(ct){console.log(ct)}var St=0;pt&&pt.res&&pt.res.headers&&(St=pt.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(Je);var Mt=this;setTimeout(function(){Mt.nextUpload()},100),this._retryCount=0,this._reportLog("20003",Je,{requestId:St})}},{key:"_progress",value:function(Je,pt,St){if(this.options.onUploadProgress)try{Je.loaded=pt.loaded,this.options.onUploadProgress(Je,pt.total,pt.loaded)}catch(et){console.log(et)}var Mt=pt.checkpoint,ct=0;Mt&&(Je.checkpoint=Mt,this._saveCheckoutpoint(Je,Mt,be.UPLOADSTATE.UPLOADING),ct=Mt.uploadId),this._retryCount=0;var wt=this._getPortNumber(Mt),ft=0;if(St&&St.headers&&(ft=St.headers["x-oss-request-id"]),pt.loaded!=0&&this._reportLog("20007",Je,{pn:wt,requestId:ft}),pt.loaded!=1&&this._reportLog("20005",Je,{UploadId:ct,pn:wt+1,pr:Je.retry?1:0,fs:Je.file.size,bu:Je.bucket,ok:Je.object,fn:Je.file.name}),!this._invalidUserId&&!Je.isImage&&this._ut=="vod"&&this.options.enableUploadProgress){var $t={file:Je.file,checkpoint:pt,userId:this.options.userId,videoId:Je.videoId,region:this.options.region,fileHash:Je.fileHash};try{var st=this;Ae.default.upload($t,function(){},function(et){if((et=JSON.parse(et))&&et.Code=="InvalidParameter"&&et.Message.indexOf("UserId")>0){st._invalidUserId=!0;var lt=et.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(lt)}})}catch(et){console.log(et)}}}},{key:"_getPortNumber",value:function(Je){if(Je){var pt=Je.doneParts;if(pt&&pt.length>0)return pt[pt.length-1].number}return 0}},{key:"_removeCheckoutpoint",value:function(Je){var pt=this._getCheckoutpointKey(Je);ue.default.remove(pt)}},{key:"_getCheckoutpoint",value:function(Je){var pt=this._getCheckoutpointKey(Je),St=ue.default.get(pt);if(St)try{return JSON.parse(St)}catch(Mt){}return""}},{key:"_saveCheckoutpoint",value:function(Je,pt,St){if(pt){var Mt=this._getCheckoutpointKey(Je),ct=Je.file,wt={fileName:ct.name,lastModified:ct.lastModified,size:ct.size,object:Je.object,videoId:Je.videoId,bucket:Je.bucket,endpoint:Je.endpoint,checkpoint:pt,loaded:Je.loaded,state:St};ue.default.set(Mt,JSON.stringify(wt))}}},{key:"_changeState",value:function(Je,pt){var St=this._getCheckoutpoint(Je);St&&((this._onbeforeunload=!0)&&(pt=be.UPLOADSTATE.STOPED),this._saveCheckoutpoint(Je,St.checkpoint,pt))}},{key:"_getCheckoutpointKey",value:function(Je){return"upload_"+Je.file.lastModified+"_"+Je.file.name+"_"+Je.file.size}},{key:"_getCheckoutpointFromCloud",value:function(Je,pt,St){var Mt={userId:this.options.userId,uploadInfoList:[{FileName:Je.file.name,FileSize:Je.file.size,FileCreateTime:Je.file.lastModified,FileHash:Je.fileHash}],region:this.options.region};Ae.default.get(Mt,function(ct){pt(ct)},St)}},{key:"_reportLog",value:function(Je,pt,St){St||(St={}),St.ri=pt.ri,this._ut&&(St.ut=this._ut),this._log.log(Je,St)}},{key:"_initEvent",value:function(){var Je=this;window&&(window.onbeforeunload=function(pt){if(Je._onbeforeunload=!0,Je._curIndex!=-1&&Je._uploadList.length>Je._curIndex){var St=Je._uploadList[Je._curIndex];Je._changeState(St,be.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var Je=0;Je<this._uploadList.length;Je++){var pt=this._uploadList[Je];pt.state!=be.UPLOADSTATE.FAIlURE&&pt.state!=be.UPLOADSTATE.STOPED||(pt.state=be.UPLOADSTATE.INIT)}this._state=be.VODSTATE.INIT}},{key:"_adjustPartSize",value:function(Je){return Je.file.size/this.options.partSize>1e4?Je.file.size/9999:this.options.partSize}}]),$e}());ye.default=We},function(Le,ye,Fe){"use strict";Object.defineProperty(ye,"__esModule",{value:!0}),ye.UPLOADSTATE={INIT:"Ready",UPLOADING:"Uploading",SUCCESS:"Success",FAIlURE:"Failure",CANCELED:"Canceled",STOPED:"Stoped"},ye.VODSTATE={INIT:"Init",START:"Start",STOP:"Stop",FAILURE:"Failure",EXPIRE:"Expire",END:"End"}},function(Le,ye,Fe){"use strict";function Me(he){return he&&he.__esModule?he:{default:he}}function Ee(he,xe){if(!(he instanceof xe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ye,"__esModule",{value:!0});var me=function(){function he(xe,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(xe,ee.key,ee)}}return function(xe,fe,ue){return fe&&he(xe.prototype,fe),ue&&he(xe,ue),xe}}(),be=Fe(3),ve=Fe(17),we=(Me(ve),Fe(1)),ge=(Me(we),function(){function he(xe,fe){if(Ee(this,he),xe){this._config=xe,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 me(he,[{key:"create",value:function(xe){if(xe.endpoint=xe.endpoint||this._config.endpoint,xe.bucket=xe.bucket||this._config.bucket,!(xe.AccessKeyId&&xe.AccessKeySecret&&xe.endpoint&&xe.SecurityToken))throw new Error("AccessKeyId\u3001AccessKeySecret\u3001endpoint should not be null");var fe={accessKeyId:xe.AccessKeyId,accessKeySecret:xe.AccessKeySecret,stsToken:xe.SecurityToken,endpoint:xe.endpoint||this._config.endpoint,bucket:xe.bucket||this._config.bucket,secure:!0,cname:xe.cname};xe.timeout&&(fe.timeout=xe.timeout),this.oss=new OSS.Wrapper(fe)}},{key:"abort",value:function(xe){if(xe.checkpoint){var fe=xe.checkpoint.uploadId;this.oss.abortMultipartUpload(xe.object,fe)}}},{key:"getVersion",value:function(){}},{key:"cancel",value:function(){this.oss.cancel&&this.oss.cancel()}},{key:"upload",value:function(xe,fe){this._uploadInfo=xe;var ue=this,ee=function(oe,ie,se){return function(le){ue._progress(oe,ie,se),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),xe.checkpoint&&(z.checkpoint=xe.checkpoint),xe.bucket||(this.oss.options.bucket=xe.bucket),xe.endpoint||(this.oss.options.endpoint=xe.endpoint),this.oss.multipartUpload(xe.object,xe.file,z).then(function(oe,ie){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(xe,fe,ue){this.oss.get(xe.object).then(function(ee){fe(ee)}).catch(function(ee){ue(ee)})}},{key:"_progress",value:function(xe,fe,ue){this._callback.onprogress(this._uploadInfo,{loaded:xe,total:this._uploadInfo.file.size,checkpoint:fe},ue)}},{key:"_error",value:function(xe){this._callback.onerror(this._uploadInfo,xe)}},{key:"_complete",value:function(xe){this._callback.oncomplete(this._uploadInfo,xe)}}]),he}());ye.default=ge},function(Le,ye,Fe){"use strict";function Me(be,ve){if(!(be instanceof ve))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ye,"__esModule",{value:!0});var Ee=function(){function be(ve,we){for(var ge=0;ge<we.length;ge++){var he=we[ge];he.enumerable=he.enumerable||!1,he.configurable=!0,"value"in he&&(he.writable=!0),Object.defineProperty(ve,he.key,he)}}return function(ve,we,ge){return we&&be(ve.prototype,we),ge&&be(ve,ge),ve}}(),me=function(){function be(){Me(this,be)}return Ee(be,null,[{key:"format",value:function(ve){if(arguments.length<2)return null;for(var we=arguments[1],ge=1;ge<arguments.length;ge++){var he=new RegExp("\\{"+(ge-1)+"\\}","gm");we=we.replace(he,arguments[ge+1])}return{code:ve,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}();ye.default=me},function(Le,ye,Fe){"use strict";(function(Me){function Ee(ve,we){if(!(ve instanceof we))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ye,"__esModule",{value:!0});var me=function(){function ve(we,ge){for(var he=0;he<ge.length;he++){var xe=ge[he];xe.enumerable=xe.enumerable||!1,xe.configurable=!0,"value"in xe&&(xe.writable=!0),Object.defineProperty(we,xe.key,xe)}}return function(we,ge,he){return ge&&ve(we.prototype,ge),he&&ve(we,he),we}}(),be=function(){function ve(){Ee(this,ve)}return me(ve,null,[{key:"encode",value:function(we){return new Me(we).toString("base64")}},{key:"decode",value:function(we){return new Me(we,"base64").toString()}}]),ve}();ye.default=be}).call(ye,Fe(19).Buffer)},function(Le,ye,Fe){"use strict";(function(Me){function Ee(){return be.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function me(Ke,Be){if(Ee()<Be)throw new RangeError("Invalid typed array length");return be.TYPED_ARRAY_SUPPORT?(Ke=new Uint8Array(Be),Ke.__proto__=be.prototype):(Ke===null&&(Ke=new be(Be)),Ke.length=Be),Ke}function be(Ke,Be,Ue){if(!(be.TYPED_ARRAY_SUPPORT||this instanceof be))return new be(Ke,Be,Ue);if(typeof Ke=="number"){if(typeof Be=="string")throw new Error("If encoding is specified then the first argument must be a string");return he(this,Ke)}return ve(this,Ke,Be,Ue)}function ve(Ke,Be,Ue,rt){if(typeof Be=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Be instanceof ArrayBuffer?ue(Ke,Be,Ue,rt):typeof Be=="string"?xe(Ke,Be,Ue):ee(Ke,Be)}function we(Ke){if(typeof Ke!="number")throw new TypeError('"size" argument must be a number');if(Ke<0)throw new RangeError('"size" argument must not be negative')}function ge(Ke,Be,Ue,rt){return we(Be),Be<=0?me(Ke,Be):Ue!==void 0?typeof rt=="string"?me(Ke,Be).fill(Ue,rt):me(Ke,Be).fill(Ue):me(Ke,Be)}function he(Ke,Be){if(we(Be),Ke=me(Ke,Be<0?0:0|z(Be)),!be.TYPED_ARRAY_SUPPORT)for(var Ue=0;Ue<Be;++Ue)Ke[Ue]=0;return Ke}function xe(Ke,Be,Ue){if(typeof Ue=="string"&&Ue!==""||(Ue="utf8"),!be.isEncoding(Ue))throw new TypeError('"encoding" must be a valid string encoding');var rt=0|ie(Be,Ue);Ke=me(Ke,rt);var Ze=Ke.write(Be,Ue);return Ze!==rt&&(Ke=Ke.slice(0,Ze)),Ke}function fe(Ke,Be){var Ue=Be.length<0?0:0|z(Be.length);Ke=me(Ke,Ue);for(var rt=0;rt<Ue;rt+=1)Ke[rt]=255&Be[rt];return Ke}function ue(Ke,Be,Ue,rt){if(Be.byteLength,Ue<0||Be.byteLength<Ue)throw new RangeError("'offset' is out of bounds");if(Be.byteLength<Ue+(rt||0))throw new RangeError("'length' is out of bounds");return Be=Ue===void 0&&rt===void 0?new Uint8Array(Be):rt===void 0?new Uint8Array(Be,Ue):new Uint8Array(Be,Ue,rt),be.TYPED_ARRAY_SUPPORT?(Ke=Be,Ke.__proto__=be.prototype):Ke=fe(Ke,Be),Ke}function ee(Ke,Be){if(be.isBuffer(Be)){var Ue=0|z(Be.length);return Ke=me(Ke,Ue),Ke.length===0||Be.copy(Ke,0,0,Ue),Ke}if(Be){if(typeof ArrayBuffer!="undefined"&&Be.buffer instanceof ArrayBuffer||"length"in Be)return typeof Be.length!="number"||ut(Be.length)?me(Ke,0):fe(Ke,Be);if(Be.type==="Buffer"&&it(Be.data))return fe(Ke,Be.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function z(Ke){if(Ke>=Ee())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ee().toString(16)+" bytes");return 0|Ke}function oe(Ke){return+Ke!=Ke&&(Ke=0),be.alloc(+Ke)}function ie(Ke,Be){if(be.isBuffer(Ke))return Ke.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(Ke)||Ke instanceof ArrayBuffer))return Ke.byteLength;typeof Ke!="string"&&(Ke=""+Ke);var Ue=Ke.length;if(Ue===0)return 0;for(var rt=!1;;)switch(Be){case"ascii":case"latin1":case"binary":return Ue;case"utf8":case"utf-8":case void 0:return Gt(Ke).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Ue;case"hex":return Ue>>>1;case"base64":return Jt(Ke).length;default:if(rt)return Gt(Ke).length;Be=(""+Be).toLowerCase(),rt=!0}}function se(Ke,Be,Ue){var rt=!1;if((Be===void 0||Be<0)&&(Be=0),Be>this.length||((Ue===void 0||Ue>this.length)&&(Ue=this.length),Ue<=0)||(Ue>>>=0,Be>>>=0,Ue<=Be))return"";for(Ke||(Ke="utf8");;)switch(Ke){case"hex":return wt(this,Be,Ue);case"utf8":case"utf-8":return pt(this,Be,Ue);case"ascii":return Mt(this,Be,Ue);case"latin1":case"binary":return ct(this,Be,Ue);case"base64":return Je(this,Be,Ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ft(this,Be,Ue);default:if(rt)throw new TypeError("Unknown encoding: "+Ke);Ke=(Ke+"").toLowerCase(),rt=!0}}function le(Ke,Be,Ue){var rt=Ke[Be];Ke[Be]=Ke[Ue],Ke[Ue]=rt}function Se(Ke,Be,Ue,rt,Ze){if(Ke.length===0)return-1;if(typeof Ue=="string"?(rt=Ue,Ue=0):Ue>2147483647?Ue=2147483647:Ue<-2147483648&&(Ue=-2147483648),Ue=+Ue,isNaN(Ue)&&(Ue=Ze?0:Ke.length-1),Ue<0&&(Ue=Ke.length+Ue),Ue>=Ke.length){if(Ze)return-1;Ue=Ke.length-1}else if(Ue<0){if(!Ze)return-1;Ue=0}if(typeof Be=="string"&&(Be=be.from(Be,rt)),be.isBuffer(Be))return Be.length===0?-1:pe(Ke,Be,Ue,rt,Ze);if(typeof Be=="number")return Be&=255,be.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Ze?Uint8Array.prototype.indexOf.call(Ke,Be,Ue):Uint8Array.prototype.lastIndexOf.call(Ke,Be,Ue):pe(Ke,[Be],Ue,rt,Ze);throw new TypeError("val must be string, number or Buffer")}function pe(Ke,Be,Ue,rt,Ze){function Xe(si,Cn){return mt===1?si[Cn]:si.readUInt16BE(Cn*mt)}var mt=1,Rt=Ke.length,vn=Be.length;if(rt!==void 0&&((rt=String(rt).toLowerCase())==="ucs2"||rt==="ucs-2"||rt==="utf16le"||rt==="utf-16le")){if(Ke.length<2||Be.length<2)return-1;mt=2,Rt/=2,vn/=2,Ue/=2}var An;if(Ze){var Mn=-1;for(An=Ue;An<Rt;An++)if(Xe(Ke,An)===Xe(Be,Mn===-1?0:An-Mn)){if(Mn===-1&&(Mn=An),An-Mn+1===vn)return Mn*mt}else Mn!==-1&&(An-=An-Mn),Mn=-1}else for(Ue+vn>Rt&&(Ue=Rt-vn),An=Ue;An>=0;An--){for(var hi=!0,mi=0;mi<vn;mi++)if(Xe(Ke,An+mi)!==Xe(Be,mi)){hi=!1;break}if(hi)return An}return-1}function Ce(Ke,Be,Ue,rt){Ue=Number(Ue)||0;var Ze=Ke.length-Ue;rt?(rt=Number(rt))>Ze&&(rt=Ze):rt=Ze;var Xe=Be.length;if(Xe%2!=0)throw new TypeError("Invalid hex string");rt>Xe/2&&(rt=Xe/2);for(var mt=0;mt<rt;++mt){var Rt=parseInt(Be.substr(2*mt,2),16);if(isNaN(Rt))return mt;Ke[Ue+mt]=Rt}return mt}function Ae(Ke,Be,Ue,rt){return jt(Gt(Be,Ke.length-Ue),Ke,Ue,rt)}function Oe(Ke,Be,Ue,rt){return jt(Dt(Be),Ke,Ue,rt)}function Re(Ke,Be,Ue,rt){return Oe(Ke,Be,Ue,rt)}function We(Ke,Be,Ue,rt){return jt(Jt(Be),Ke,Ue,rt)}function $e(Ke,Be,Ue,rt){return jt(on(Be,Ke.length-Ue),Ke,Ue,rt)}function Je(Ke,Be,Ue){return Be===0&&Ue===Ke.length?ze.fromByteArray(Ke):ze.fromByteArray(Ke.slice(Be,Ue))}function pt(Ke,Be,Ue){Ue=Math.min(Ke.length,Ue);for(var rt=[],Ze=Be;Ze<Ue;){var Xe=Ke[Ze],mt=null,Rt=Xe>239?4:Xe>223?3:Xe>191?2:1;if(Ze+Rt<=Ue){var vn,An,Mn,hi;switch(Rt){case 1:Xe<128&&(mt=Xe);break;case 2:vn=Ke[Ze+1],(192&vn)==128&&(hi=(31&Xe)<<6|63&vn)>127&&(mt=hi);break;case 3:vn=Ke[Ze+1],An=Ke[Ze+2],(192&vn)==128&&(192&An)==128&&(hi=(15&Xe)<<12|(63&vn)<<6|63&An)>2047&&(hi<55296||hi>57343)&&(mt=hi);break;case 4:vn=Ke[Ze+1],An=Ke[Ze+2],Mn=Ke[Ze+3],(192&vn)==128&&(192&An)==128&&(192&Mn)==128&&(hi=(15&Xe)<<18|(63&vn)<<12|(63&An)<<6|63&Mn)>65535&&hi<1114112&&(mt=hi)}}mt===null?(mt=65533,Rt=1):mt>65535&&(mt-=65536,rt.push(mt>>>10&1023|55296),mt=56320|1023&mt),rt.push(mt),Ze+=Rt}return St(rt)}function St(Ke){var Be=Ke.length;if(Be<=ht)return String.fromCharCode.apply(String,Ke);for(var Ue="",rt=0;rt<Be;)Ue+=String.fromCharCode.apply(String,Ke.slice(rt,rt+=ht));return Ue}function Mt(Ke,Be,Ue){var rt="";Ue=Math.min(Ke.length,Ue);for(var Ze=Be;Ze<Ue;++Ze)rt+=String.fromCharCode(127&Ke[Ze]);return rt}function ct(Ke,Be,Ue){var rt="";Ue=Math.min(Ke.length,Ue);for(var Ze=Be;Ze<Ue;++Ze)rt+=String.fromCharCode(Ke[Ze]);return rt}function wt(Ke,Be,Ue){var rt=Ke.length;(!Be||Be<0)&&(Be=0),(!Ue||Ue<0||Ue>rt)&&(Ue=rt);for(var Ze="",Xe=Be;Xe<Ue;++Xe)Ze+=gn(Ke[Xe]);return Ze}function ft(Ke,Be,Ue){for(var rt=Ke.slice(Be,Ue),Ze="",Xe=0;Xe<rt.length;Xe+=2)Ze+=String.fromCharCode(rt[Xe]+256*rt[Xe+1]);return Ze}function $t(Ke,Be,Ue){if(Ke%1!=0||Ke<0)throw new RangeError("offset is not uint");if(Ke+Be>Ue)throw new RangeError("Trying to access beyond buffer length")}function st(Ke,Be,Ue,rt,Ze,Xe){if(!be.isBuffer(Ke))throw new TypeError('"buffer" argument must be a Buffer instance');if(Be>Ze||Be<Xe)throw new RangeError('"value" argument is out of bounds');if(Ue+rt>Ke.length)throw new RangeError("Index out of range")}function et(Ke,Be,Ue,rt){Be<0&&(Be=65535+Be+1);for(var Ze=0,Xe=Math.min(Ke.length-Ue,2);Ze<Xe;++Ze)Ke[Ue+Ze]=(Be&255<<8*(rt?Ze:1-Ze))>>>8*(rt?Ze:1-Ze)}function lt(Ke,Be,Ue,rt){Be<0&&(Be=4294967295+Be+1);for(var Ze=0,Xe=Math.min(Ke.length-Ue,4);Ze<Xe;++Ze)Ke[Ue+Ze]=Be>>>8*(rt?Ze:3-Ze)&255}function dt(Ke,Be,Ue,rt,Ze,Xe){if(Ue+rt>Ke.length)throw new RangeError("Index out of range");if(Ue<0)throw new RangeError("Index out of range")}function bt(Ke,Be,Ue,rt,Ze){return Ze||dt(Ke,Be,Ue,4,34028234663852886e22,-34028234663852886e22),je.write(Ke,Be,Ue,rt,23,4),Ue+4}function yt(Ke,Be,Ue,rt,Ze){return Ze||dt(Ke,Be,Ue,8,17976931348623157e292,-17976931348623157e292),je.write(Ke,Be,Ue,rt,52,8),Ue+8}function Vt(Ke){if(Ke=Kt(Ke).replace(nt,""),Ke.length<2)return"";for(;Ke.length%4!=0;)Ke+="=";return Ke}function Kt(Ke){return Ke.trim?Ke.trim():Ke.replace(/^\s+|\s+$/g,"")}function gn(Ke){return Ke<16?"0"+Ke.toString(16):Ke.toString(16)}function Gt(Ke,Be){Be=Be||1/0;for(var Ue,rt=Ke.length,Ze=null,Xe=[],mt=0;mt<rt;++mt){if((Ue=Ke.charCodeAt(mt))>55295&&Ue<57344){if(!Ze){if(Ue>56319){(Be-=3)>-1&&Xe.push(239,191,189);continue}if(mt+1===rt){(Be-=3)>-1&&Xe.push(239,191,189);continue}Ze=Ue;continue}if(Ue<56320){(Be-=3)>-1&&Xe.push(239,191,189),Ze=Ue;continue}Ue=65536+(Ze-55296<<10|Ue-56320)}else Ze&&(Be-=3)>-1&&Xe.push(239,191,189);if(Ze=null,Ue<128){if((Be-=1)<0)break;Xe.push(Ue)}else if(Ue<2048){if((Be-=2)<0)break;Xe.push(Ue>>6|192,63&Ue|128)}else if(Ue<65536){if((Be-=3)<0)break;Xe.push(Ue>>12|224,Ue>>6&63|128,63&Ue|128)}else{if(!(Ue<1114112))throw new Error("Invalid code point");if((Be-=4)<0)break;Xe.push(Ue>>18|240,Ue>>12&63|128,Ue>>6&63|128,63&Ue|128)}}return Xe}function Dt(Ke){for(var Be=[],Ue=0;Ue<Ke.length;++Ue)Be.push(255&Ke.charCodeAt(Ue));return Be}function on(Ke,Be){for(var Ue,rt,Ze,Xe=[],mt=0;mt<Ke.length&&!((Be-=2)<0);++mt)Ue=Ke.charCodeAt(mt),rt=Ue>>8,Ze=Ue%256,Xe.push(Ze),Xe.push(rt);return Xe}function Jt(Ke){return ze.toByteArray(Vt(Ke))}function jt(Ke,Be,Ue,rt){for(var Ze=0;Ze<rt&&!(Ze+Ue>=Be.length||Ze>=Ke.length);++Ze)Be[Ze+Ue]=Ke[Ze];return Ze}function ut(Ke){return Ke!==Ke}var ze=Fe(21),je=Fe(22),it=Fe(23);ye.Buffer=be,ye.SlowBuffer=oe,ye.INSPECT_MAX_BYTES=50,be.TYPED_ARRAY_SUPPORT=Me.TYPED_ARRAY_SUPPORT!==void 0?Me.TYPED_ARRAY_SUPPORT:function(){try{var Ke=new Uint8Array(1);return Ke.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},Ke.foo()===42&&typeof Ke.subarray=="function"&&Ke.subarray(1,1).byteLength===0}catch(Be){return!1}}(),ye.kMaxLength=Ee(),be.poolSize=8192,be._augment=function(Ke){return Ke.__proto__=be.prototype,Ke},be.from=function(Ke,Be,Ue){return ve(null,Ke,Be,Ue)},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(Ke,Be,Ue){return ge(null,Ke,Be,Ue)},be.allocUnsafe=function(Ke){return he(null,Ke)},be.allocUnsafeSlow=function(Ke){return he(null,Ke)},be.isBuffer=function(Ke){return!(Ke==null||!Ke._isBuffer)},be.compare=function(Ke,Be){if(!be.isBuffer(Ke)||!be.isBuffer(Be))throw new TypeError("Arguments must be Buffers");if(Ke===Be)return 0;for(var Ue=Ke.length,rt=Be.length,Ze=0,Xe=Math.min(Ue,rt);Ze<Xe;++Ze)if(Ke[Ze]!==Be[Ze]){Ue=Ke[Ze],rt=Be[Ze];break}return Ue<rt?-1:rt<Ue?1:0},be.isEncoding=function(Ke){switch(String(Ke).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(Ke,Be){if(!it(Ke))throw new TypeError('"list" argument must be an Array of Buffers');if(Ke.length===0)return be.alloc(0);var Ue;if(Be===void 0)for(Be=0,Ue=0;Ue<Ke.length;++Ue)Be+=Ke[Ue].length;var rt=be.allocUnsafe(Be),Ze=0;for(Ue=0;Ue<Ke.length;++Ue){var Xe=Ke[Ue];if(!be.isBuffer(Xe))throw new TypeError('"list" argument must be an Array of Buffers');Xe.copy(rt,Ze),Ze+=Xe.length}return rt},be.byteLength=ie,be.prototype._isBuffer=!0,be.prototype.swap16=function(){var Ke=this.length;if(Ke%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Be=0;Be<Ke;Be+=2)le(this,Be,Be+1);return this},be.prototype.swap32=function(){var Ke=this.length;if(Ke%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Be=0;Be<Ke;Be+=4)le(this,Be,Be+3),le(this,Be+1,Be+2);return this},be.prototype.swap64=function(){var Ke=this.length;if(Ke%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Be=0;Be<Ke;Be+=8)le(this,Be,Be+7),le(this,Be+1,Be+6),le(this,Be+2,Be+5),le(this,Be+3,Be+4);return this},be.prototype.toString=function(){var Ke=0|this.length;return Ke===0?"":arguments.length===0?pt(this,0,Ke):se.apply(this,arguments)},be.prototype.equals=function(Ke){if(!be.isBuffer(Ke))throw new TypeError("Argument must be a Buffer");return this===Ke||be.compare(this,Ke)===0},be.prototype.inspect=function(){var Ke="",Be=ye.INSPECT_MAX_BYTES;return this.length>0&&(Ke=this.toString("hex",0,Be).match(/.{2}/g).join(" "),this.length>Be&&(Ke+=" ... ")),"<Buffer "+Ke+">"},be.prototype.compare=function(Ke,Be,Ue,rt,Ze){if(!be.isBuffer(Ke))throw new TypeError("Argument must be a Buffer");if(Be===void 0&&(Be=0),Ue===void 0&&(Ue=Ke?Ke.length:0),rt===void 0&&(rt=0),Ze===void 0&&(Ze=this.length),Be<0||Ue>Ke.length||rt<0||Ze>this.length)throw new RangeError("out of range index");if(rt>=Ze&&Be>=Ue)return 0;if(rt>=Ze)return-1;if(Be>=Ue)return 1;if(Be>>>=0,Ue>>>=0,rt>>>=0,Ze>>>=0,this===Ke)return 0;for(var Xe=Ze-rt,mt=Ue-Be,Rt=Math.min(Xe,mt),vn=this.slice(rt,Ze),An=Ke.slice(Be,Ue),Mn=0;Mn<Rt;++Mn)if(vn[Mn]!==An[Mn]){Xe=vn[Mn],mt=An[Mn];break}return Xe<mt?-1:mt<Xe?1:0},be.prototype.includes=function(Ke,Be,Ue){return this.indexOf(Ke,Be,Ue)!==-1},be.prototype.indexOf=function(Ke,Be,Ue){return Se(this,Ke,Be,Ue,!0)},be.prototype.lastIndexOf=function(Ke,Be,Ue){return Se(this,Ke,Be,Ue,!1)},be.prototype.write=function(Ke,Be,Ue,rt){if(Be===void 0)rt="utf8",Ue=this.length,Be=0;else if(Ue===void 0&&typeof Be=="string")rt=Be,Ue=this.length,Be=0;else{if(!isFinite(Be))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");Be|=0,isFinite(Ue)?(Ue|=0,rt===void 0&&(rt="utf8")):(rt=Ue,Ue=void 0)}var Ze=this.length-Be;if((Ue===void 0||Ue>Ze)&&(Ue=Ze),Ke.length>0&&(Ue<0||Be<0)||Be>this.length)throw new RangeError("Attempt to write outside buffer bounds");rt||(rt="utf8");for(var Xe=!1;;)switch(rt){case"hex":return Ce(this,Ke,Be,Ue);case"utf8":case"utf-8":return Ae(this,Ke,Be,Ue);case"ascii":return Oe(this,Ke,Be,Ue);case"latin1":case"binary":return Re(this,Ke,Be,Ue);case"base64":return We(this,Ke,Be,Ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $e(this,Ke,Be,Ue);default:if(Xe)throw new TypeError("Unknown encoding: "+rt);rt=(""+rt).toLowerCase(),Xe=!0}},be.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ht=4096;be.prototype.slice=function(Ke,Be){var Ue=this.length;Ke=~~Ke,Be=Be===void 0?Ue:~~Be,Ke<0?(Ke+=Ue)<0&&(Ke=0):Ke>Ue&&(Ke=Ue),Be<0?(Be+=Ue)<0&&(Be=0):Be>Ue&&(Be=Ue),Be<Ke&&(Be=Ke);var rt;if(be.TYPED_ARRAY_SUPPORT)rt=this.subarray(Ke,Be),rt.__proto__=be.prototype;else{var Ze=Be-Ke;rt=new be(Ze,void 0);for(var Xe=0;Xe<Ze;++Xe)rt[Xe]=this[Xe+Ke]}return rt},be.prototype.readUIntLE=function(Ke,Be,Ue){Ke|=0,Be|=0,Ue||$t(Ke,Be,this.length);for(var rt=this[Ke],Ze=1,Xe=0;++Xe<Be&&(Ze*=256);)rt+=this[Ke+Xe]*Ze;return rt},be.prototype.readUIntBE=function(Ke,Be,Ue){Ke|=0,Be|=0,Ue||$t(Ke,Be,this.length);for(var rt=this[Ke+--Be],Ze=1;Be>0&&(Ze*=256);)rt+=this[Ke+--Be]*Ze;return rt},be.prototype.readUInt8=function(Ke,Be){return Be||$t(Ke,1,this.length),this[Ke]},be.prototype.readUInt16LE=function(Ke,Be){return Be||$t(Ke,2,this.length),this[Ke]|this[Ke+1]<<8},be.prototype.readUInt16BE=function(Ke,Be){return Be||$t(Ke,2,this.length),this[Ke]<<8|this[Ke+1]},be.prototype.readUInt32LE=function(Ke,Be){return Be||$t(Ke,4,this.length),(this[Ke]|this[Ke+1]<<8|this[Ke+2]<<16)+16777216*this[Ke+3]},be.prototype.readUInt32BE=function(Ke,Be){return Be||$t(Ke,4,this.length),16777216*this[Ke]+(this[Ke+1]<<16|this[Ke+2]<<8|this[Ke+3])},be.prototype.readIntLE=function(Ke,Be,Ue){Ke|=0,Be|=0,Ue||$t(Ke,Be,this.length);for(var rt=this[Ke],Ze=1,Xe=0;++Xe<Be&&(Ze*=256);)rt+=this[Ke+Xe]*Ze;return Ze*=128,rt>=Ze&&(rt-=Math.pow(2,8*Be)),rt},be.prototype.readIntBE=function(Ke,Be,Ue){Ke|=0,Be|=0,Ue||$t(Ke,Be,this.length);for(var rt=Be,Ze=1,Xe=this[Ke+--rt];rt>0&&(Ze*=256);)Xe+=this[Ke+--rt]*Ze;return Ze*=128,Xe>=Ze&&(Xe-=Math.pow(2,8*Be)),Xe},be.prototype.readInt8=function(Ke,Be){return Be||$t(Ke,1,this.length),128&this[Ke]?-1*(255-this[Ke]+1):this[Ke]},be.prototype.readInt16LE=function(Ke,Be){Be||$t(Ke,2,this.length);var Ue=this[Ke]|this[Ke+1]<<8;return 32768&Ue?4294901760|Ue:Ue},be.prototype.readInt16BE=function(Ke,Be){Be||$t(Ke,2,this.length);var Ue=this[Ke+1]|this[Ke]<<8;return 32768&Ue?4294901760|Ue:Ue},be.prototype.readInt32LE=function(Ke,Be){return Be||$t(Ke,4,this.length),this[Ke]|this[Ke+1]<<8|this[Ke+2]<<16|this[Ke+3]<<24},be.prototype.readInt32BE=function(Ke,Be){return Be||$t(Ke,4,this.length),this[Ke]<<24|this[Ke+1]<<16|this[Ke+2]<<8|this[Ke+3]},be.prototype.readFloatLE=function(Ke,Be){return Be||$t(Ke,4,this.length),je.read(this,Ke,!0,23,4)},be.prototype.readFloatBE=function(Ke,Be){return Be||$t(Ke,4,this.length),je.read(this,Ke,!1,23,4)},be.prototype.readDoubleLE=function(Ke,Be){return Be||$t(Ke,8,this.length),je.read(this,Ke,!0,52,8)},be.prototype.readDoubleBE=function(Ke,Be){return Be||$t(Ke,8,this.length),je.read(this,Ke,!1,52,8)},be.prototype.writeUIntLE=function(Ke,Be,Ue,rt){Ke=+Ke,Be|=0,Ue|=0,!rt&&st(this,Ke,Be,Ue,Math.pow(2,8*Ue)-1,0);var Ze=1,Xe=0;for(this[Be]=255&Ke;++Xe<Ue&&(Ze*=256);)this[Be+Xe]=Ke/Ze&255;return Be+Ue},be.prototype.writeUIntBE=function(Ke,Be,Ue,rt){Ke=+Ke,Be|=0,Ue|=0,!rt&&st(this,Ke,Be,Ue,Math.pow(2,8*Ue)-1,0);var Ze=Ue-1,Xe=1;for(this[Be+Ze]=255&Ke;--Ze>=0&&(Xe*=256);)this[Be+Ze]=Ke/Xe&255;return Be+Ue},be.prototype.writeUInt8=function(Ke,Be,Ue){return Ke=+Ke,Be|=0,Ue||st(this,Ke,Be,1,255,0),be.TYPED_ARRAY_SUPPORT||(Ke=Math.floor(Ke)),this[Be]=255&Ke,Be+1},be.prototype.writeUInt16LE=function(Ke,Be,Ue){return Ke=+Ke,Be|=0,Ue||st(this,Ke,Be,2,65535,0),be.TYPED_ARRAY_SUPPORT?(this[Be]=255&Ke,this[Be+1]=Ke>>>8):et(this,Ke,Be,!0),Be+2},be.prototype.writeUInt16BE=function(Ke,Be,Ue){return Ke=+Ke,Be|=0,Ue||st(this,Ke,Be,2,65535,0),be.TYPED_ARRAY_SUPPORT?(this[Be]=Ke>>>8,this[Be+1]=255&Ke):et(this,Ke,Be,!1),Be+2},be.prototype.writeUInt32LE=function(Ke,Be,Ue){return Ke=+Ke,Be|=0,Ue||st(this,Ke,Be,4,4294967295,0),be.TYPED_ARRAY_SUPPORT?(this[Be+3]=Ke>>>24,this[Be+2]=Ke>>>16,this[Be+1]=Ke>>>8,this[Be]=255&Ke):lt(this,Ke,Be,!0),Be+4},be.prototype.writeUInt32BE=function(Ke,Be,Ue){return Ke=+Ke,Be|=0,Ue||st(this,Ke,Be,4,4294967295,0),be.TYPED_ARRAY_SUPPORT?(this[Be]=Ke>>>24,this[Be+1]=Ke>>>16,this[Be+2]=Ke>>>8,this[Be+3]=255&Ke):lt(this,Ke,Be,!1),Be+4},be.prototype.writeIntLE=function(Ke,Be,Ue,rt){if(Ke=+Ke,Be|=0,!rt){var Ze=Math.pow(2,8*Ue-1);st(this,Ke,Be,Ue,Ze-1,-Ze)}var Xe=0,mt=1,Rt=0;for(this[Be]=255&Ke;++Xe<Ue&&(mt*=256);)Ke<0&&Rt===0&&this[Be+Xe-1]!==0&&(Rt=1),this[Be+Xe]=(Ke/mt>>0)-Rt&255;return Be+Ue},be.prototype.writeIntBE=function(Ke,Be,Ue,rt){if(Ke=+Ke,Be|=0,!rt){var Ze=Math.pow(2,8*Ue-1);st(this,Ke,Be,Ue,Ze-1,-Ze)}var Xe=Ue-1,mt=1,Rt=0;for(this[Be+Xe]=255&Ke;--Xe>=0&&(mt*=256);)Ke<0&&Rt===0&&this[Be+Xe+1]!==0&&(Rt=1),this[Be+Xe]=(Ke/mt>>0)-Rt&255;return Be+Ue},be.prototype.writeInt8=function(Ke,Be,Ue){return Ke=+Ke,Be|=0,Ue||st(this,Ke,Be,1,127,-128),be.TYPED_ARRAY_SUPPORT||(Ke=Math.floor(Ke)),Ke<0&&(Ke=255+Ke+1),this[Be]=255&Ke,Be+1},be.prototype.writeInt16LE=function(Ke,Be,Ue){return Ke=+Ke,Be|=0,Ue||st(this,Ke,Be,2,32767,-32768),be.TYPED_ARRAY_SUPPORT?(this[Be]=255&Ke,this[Be+1]=Ke>>>8):et(this,Ke,Be,!0),Be+2},be.prototype.writeInt16BE=function(Ke,Be,Ue){return Ke=+Ke,Be|=0,Ue||st(this,Ke,Be,2,32767,-32768),be.TYPED_ARRAY_SUPPORT?(this[Be]=Ke>>>8,this[Be+1]=255&Ke):et(this,Ke,Be,!1),Be+2},be.prototype.writeInt32LE=function(Ke,Be,Ue){return Ke=+Ke,Be|=0,Ue||st(this,Ke,Be,4,2147483647,-2147483648),be.TYPED_ARRAY_SUPPORT?(this[Be]=255&Ke,this[Be+1]=Ke>>>8,this[Be+2]=Ke>>>16,this[Be+3]=Ke>>>24):lt(this,Ke,Be,!0),Be+4},be.prototype.writeInt32BE=function(Ke,Be,Ue){return Ke=+Ke,Be|=0,Ue||st(this,Ke,Be,4,2147483647,-2147483648),Ke<0&&(Ke=4294967295+Ke+1),be.TYPED_ARRAY_SUPPORT?(this[Be]=Ke>>>24,this[Be+1]=Ke>>>16,this[Be+2]=Ke>>>8,this[Be+3]=255&Ke):lt(this,Ke,Be,!1),Be+4},be.prototype.writeFloatLE=function(Ke,Be,Ue){return bt(this,Ke,Be,!0,Ue)},be.prototype.writeFloatBE=function(Ke,Be,Ue){return bt(this,Ke,Be,!1,Ue)},be.prototype.writeDoubleLE=function(Ke,Be,Ue){return yt(this,Ke,Be,!0,Ue)},be.prototype.writeDoubleBE=function(Ke,Be,Ue){return yt(this,Ke,Be,!1,Ue)},be.prototype.copy=function(Ke,Be,Ue,rt){if(Ue||(Ue=0),rt||rt===0||(rt=this.length),Be>=Ke.length&&(Be=Ke.length),Be||(Be=0),rt>0&&rt<Ue&&(rt=Ue),rt===Ue||Ke.length===0||this.length===0)return 0;if(Be<0)throw new RangeError("targetStart out of bounds");if(Ue<0||Ue>=this.length)throw new RangeError("sourceStart out of bounds");if(rt<0)throw new RangeError("sourceEnd out of bounds");rt>this.length&&(rt=this.length),Ke.length-Be<rt-Ue&&(rt=Ke.length-Be+Ue);var Ze,Xe=rt-Ue;if(this===Ke&&Ue<Be&&Be<rt)for(Ze=Xe-1;Ze>=0;--Ze)Ke[Ze+Be]=this[Ze+Ue];else if(Xe<1e3||!be.TYPED_ARRAY_SUPPORT)for(Ze=0;Ze<Xe;++Ze)Ke[Ze+Be]=this[Ze+Ue];else Uint8Array.prototype.set.call(Ke,this.subarray(Ue,Ue+Xe),Be);return Xe},be.prototype.fill=function(Ke,Be,Ue,rt){if(typeof Ke=="string"){if(typeof Be=="string"?(rt=Be,Be=0,Ue=this.length):typeof Ue=="string"&&(rt=Ue,Ue=this.length),Ke.length===1){var Ze=Ke.charCodeAt(0);Ze<256&&(Ke=Ze)}if(rt!==void 0&&typeof rt!="string")throw new TypeError("encoding must be a string");if(typeof rt=="string"&&!be.isEncoding(rt))throw new TypeError("Unknown encoding: "+rt)}else typeof Ke=="number"&&(Ke&=255);if(Be<0||this.length<Be||this.length<Ue)throw new RangeError("Out of range index");if(Ue<=Be)return this;Be>>>=0,Ue=Ue===void 0?this.length:Ue>>>0,Ke||(Ke=0);var Xe;if(typeof Ke=="number")for(Xe=Be;Xe<Ue;++Xe)this[Xe]=Ke;else{var mt=be.isBuffer(Ke)?Ke:Gt(new be(Ke,rt).toString()),Rt=mt.length;for(Xe=0;Xe<Ue-Be;++Xe)this[Xe+Be]=mt[Xe%Rt]}return this};var nt=/[^+\/0-9A-Za-z-_]/g}).call(ye,Fe(20))},function(Le,ye){var Fe;Fe=function(){return this}();try{Fe=Fe||Function("return this")()||(0,eval)("this")}catch(Me){typeof window=="object"&&(Fe=window)}Le.exports=Fe},function(Le,ye,Fe){"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 Ee(z){return 3*z.length/4-Me(z)}function me(z){var oe,ie,se,le,Se,pe=z.length;le=Me(z),Se=new xe(3*pe/4-le),ie=le>0?pe-4:pe;var Ce=0;for(oe=0;oe<ie;oe+=4)se=he[z.charCodeAt(oe)]<<18|he[z.charCodeAt(oe+1)]<<12|he[z.charCodeAt(oe+2)]<<6|he[z.charCodeAt(oe+3)],Se[Ce++]=se>>16&255,Se[Ce++]=se>>8&255,Se[Ce++]=255&se;return le===2?(se=he[z.charCodeAt(oe)]<<2|he[z.charCodeAt(oe+1)]>>4,Se[Ce++]=255&se):le===1&&(se=he[z.charCodeAt(oe)]<<10|he[z.charCodeAt(oe+1)]<<4|he[z.charCodeAt(oe+2)]>>2,Se[Ce++]=se>>8&255,Se[Ce++]=255&se),Se}function be(z){return ge[z>>18&63]+ge[z>>12&63]+ge[z>>6&63]+ge[63&z]}function ve(z,oe,ie){for(var se,le=[],Se=oe;Se<ie;Se+=3)se=(z[Se]<<16)+(z[Se+1]<<8)+z[Se+2],le.push(be(se));return le.join("")}function we(z){for(var oe,ie=z.length,se=ie%3,le="",Se=[],pe=0,Ce=ie-se;pe<Ce;pe+=16383)Se.push(ve(z,pe,pe+16383>Ce?Ce:pe+16383));return se===1?(oe=z[ie-1],le+=ge[oe>>2],le+=ge[oe<<4&63],le+="=="):se===2&&(oe=(z[ie-2]<<8)+z[ie-1],le+=ge[oe>>10],le+=ge[oe>>4&63],le+=ge[oe<<2&63],le+="="),Se.push(le),Se.join("")}ye.byteLength=Ee,ye.toByteArray=me,ye.fromByteArray=we;for(var ge=[],he=[],xe=typeof Uint8Array!="undefined"?Uint8Array:Array,fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ue=0,ee=fe.length;ue<ee;++ue)ge[ue]=fe[ue],he[fe.charCodeAt(ue)]=ue;he[45]=62,he[95]=63},function(Le,ye){ye.read=function(Fe,Me,Ee,me,be){var ve,we,ge=8*be-me-1,he=(1<<ge)-1,xe=he>>1,fe=-7,ue=Ee?be-1:0,ee=Ee?-1:1,z=Fe[Me+ue];for(ue+=ee,ve=z&(1<<-fe)-1,z>>=-fe,fe+=ge;fe>0;ve=256*ve+Fe[Me+ue],ue+=ee,fe-=8);for(we=ve&(1<<-fe)-1,ve>>=-fe,fe+=me;fe>0;we=256*we+Fe[Me+ue],ue+=ee,fe-=8);if(ve===0)ve=1-xe;else{if(ve===he)return we?NaN:1/0*(z?-1:1);we+=Math.pow(2,me),ve-=xe}return(z?-1:1)*we*Math.pow(2,ve-me)},ye.write=function(Fe,Me,Ee,me,be,ve){var we,ge,he,xe=8*ve-be-1,fe=(1<<xe)-1,ue=fe>>1,ee=be===23?Math.pow(2,-24)-Math.pow(2,-77):0,z=me?0:ve-1,oe=me?1:-1,ie=Me<0||Me===0&&1/Me<0?1:0;for(Me=Math.abs(Me),isNaN(Me)||Me===1/0?(ge=isNaN(Me)?1:0,we=fe):(we=Math.floor(Math.log(Me)/Math.LN2),Me*(he=Math.pow(2,-we))<1&&(we--,he*=2),Me+=we+ue>=1?ee/he:ee*Math.pow(2,1-ue),Me*he>=2&&(we++,he/=2),we+ue>=fe?(ge=0,we=fe):we+ue>=1?(ge=(Me*he-1)*Math.pow(2,be),we+=ue):(ge=Me*Math.pow(2,ue-1)*Math.pow(2,be),we=0));be>=8;Fe[Ee+z]=255&ge,z+=oe,ge/=256,be-=8);for(we=we<<be|ge,xe+=be;xe>0;Fe[Ee+z]=255&we,z+=oe,we/=256,xe-=8);Fe[Ee+z-oe]|=128*ie}},function(Le,ye){var Fe={}.toString;Le.exports=Array.isArray||function(Me){return Fe.call(Me)=="[object Array]"}},function(Le,ye,Fe){"use strict";function Me(be,ve){if(!(be instanceof ve))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ye,"__esModule",{value:!0});var Ee=function(){function be(ve,we){for(var ge=0;ge<we.length;ge++){var he=we[ge];he.enumerable=he.enumerable||!1,he.configurable=!0,"value"in he&&(he.writable=!0),Object.defineProperty(ve,he.key,he)}}return function(ve,we,ge){return we&&be(ve.prototype,we),ge&&be(ve,ge),ve}}(),me=function(){function be(){Me(this,be)}return Ee(be,null,[{key:"set",value:function(ve,we){try{window.localStorage&&localStorage.setItem(ve,we)}catch(ge){window[ve+"_localStorage"]=we}}},{key:"get",value:function(ve){try{if(window.localStorage)return localStorage.getItem(ve)}catch(we){return window[ve+"_localStorage"]}return""}},{key:"remove",value:function(ve){try{window.localStorage&&localStorage.removeItem(ve)}catch(we){delete window[ve+"_localStorage"]}}}]),be}();ye.default=me},function(Le,ye,Fe){"use strict";function Me(be,ve){if(!(be instanceof ve))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ye,"__esModule",{value:!0});var Ee=function(){function be(ve,we){for(var ge=0;ge<we.length;ge++){var he=we[ge];he.enumerable=he.enumerable||!1,he.configurable=!0,"value"in he&&(he.writable=!0),Object.defineProperty(ve,he.key,he)}}return function(ve,we,ge){return we&&be(ve.prototype,we),ge&&be(ve,ge),ve}}(),me=function(){function be(){Me(this,be)}return Ee(be,null,[{key:"get",value:function(ve){for(var we=ve+"",ge=document.cookie.split(";"),he=0;he<ge.length;he++){var xe=ge[he].trim();if(xe.indexOf(we)==0)return unescape(xe.substring(we.length+1,xe.length))}return""}},{key:"set",value:function(ve,we,ge){var he=new Date;he.setTime(he.getTime()+24*ge*60*60*1e3);var xe="expires="+he.toGMTString();document.cookie=ve+"="+escape(we)+"; "+xe}}]),be}();ye.default=me},function(Le,ye,Fe){"use strict";function Me(xe){return xe&&xe.__esModule?xe:{default:xe}}function Ee(xe,fe){if(!(xe instanceof fe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ye,"__esModule",{value:!0});var me=function(){function xe(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&&xe(fe.prototype,ue),ee&&xe(fe,ee),fe}}(),be=Fe(8),ve=Me(be),we=Fe(9),ge=Me(we),he=function(){function xe(){Ee(this,xe)}return me(xe,null,[{key:"refreshUploadAuth",value:function(fe,ue,ee){var z=(ge.default.randomUUID(),ge.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},ie=ge.default.makeUTF8sort(oe,"=","&")+"&Signature="+ge.default.aliyunEncodeURI(ge.default.makeChangeSiga(oe,fe.accessKeySecret)),se="https://vod."+fe.region+".aliyuncs.com/?"+ie;ve.default.get(se,function(Se){var Se=JSON.parse(Se);ue&&ue(Se)},function(le){if(ee){var Se=JSON.parse(le);ee(Se)}})}},{key:"getUploadAuth",value:function(fe,ue,ee){var z=(ge.default.randomUUID(),ge.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 ie=ge.default.makeUTF8sort(oe,"=","&")+"&Signature="+ge.default.aliyunEncodeURI(ge.default.makeChangeSiga(oe,fe.accessKeySecret)),se="https://vod."+fe.region+".aliyuncs.com/?"+ie;ve.default.get(se,function(le){try{le=JSON.parse(le)}catch(Se){if(ee)return void ee({Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"})}ue&&ue(le)},function(le){if(ee){var Se={Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"};try{Se=JSON.parse(le)}catch(pe){}ee(Se)}})}},{key:"getImageUploadAuth",value:function(fe,ue,ee){var z=(ge.default.randomUUID(),ge.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 ie=ge.default.makeUTF8sort(oe,"=","&")+"&Signature="+ge.default.aliyunEncodeURI(ge.default.makeChangeSiga(oe,fe.accessKeySecret)),se="https://vod."+fe.region+".aliyuncs.com/?"+ie;ve.default.get(se,function(le){le=JSON.parse(le),ue&&ue(le)},function(le){if(ee){var Se=JSON.parse(le);ee(Se)}})}}]),xe}();ye.default=he},function(Le,ye,Fe){(function(Me,Ee,me){Le.exports=ye=Ee(Fe(0),Fe(28),Fe(29))})(0,function(Me){return Me.HmacSHA1})},function(Le,ye,Fe){(function(Me,Ee){Le.exports=ye=Ee(Fe(0))})(0,function(Me){return function(){var Ee=Me,me=Ee.lib,be=me.WordArray,ve=me.Hasher,we=Ee.algo,ge=[],he=we.SHA1=ve.extend({_doReset:function(){this._hash=new be.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(xe,fe){for(var ue=this._hash.words,ee=ue[0],z=ue[1],oe=ue[2],ie=ue[3],se=ue[4],le=0;le<80;le++){if(le<16)ge[le]=0|xe[fe+le];else{var Se=ge[le-3]^ge[le-8]^ge[le-14]^ge[le-16];ge[le]=Se<<1|Se>>>31}var pe=(ee<<5|ee>>>27)+se+ge[le];pe+=le<20?1518500249+(z&oe|~z&ie):le<40?1859775393+(z^oe^ie):le<60?(z&oe|z&ie|oe&ie)-1894007588:(z^oe^ie)-899497514,se=ie,ie=oe,oe=z<<30|z>>>2,z=ee,ee=pe}ue[0]=ue[0]+ee|0,ue[1]=ue[1]+z|0,ue[2]=ue[2]+oe|0,ue[3]=ue[3]+ie|0,ue[4]=ue[4]+se|0},_doFinalize:function(){var xe=this._data,fe=xe.words,ue=8*this._nDataBytes,ee=8*xe.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,xe.sigBytes=4*fe.length,this._process(),this._hash},clone:function(){var xe=ve.clone.call(this);return xe._hash=this._hash.clone(),xe}});Ee.SHA1=ve._createHelper(he),Ee.HmacSHA1=ve._createHmacHelper(he)}(),Me.SHA1})},function(Le,ye,Fe){(function(Me,Ee){Le.exports=ye=Ee(Fe(0))})(0,function(Me){(function(){var Ee=Me,me=Ee.lib,be=me.Base,ve=Ee.enc,we=ve.Utf8,ge=Ee.algo;ge.HMAC=be.extend({init:function(he,xe){he=this._hasher=new he.init,typeof xe=="string"&&(xe=we.parse(xe));var fe=he.blockSize,ue=4*fe;xe.sigBytes>ue&&(xe=he.finalize(xe)),xe.clamp();for(var ee=this._oKey=xe.clone(),z=this._iKey=xe.clone(),oe=ee.words,ie=z.words,se=0;se<fe;se++)oe[se]^=1549556828,ie[se]^=909522486;ee.sigBytes=z.sigBytes=ue,this.reset()},reset:function(){var he=this._hasher;he.reset(),he.update(this._iKey)},update:function(he){return this._hasher.update(he),this},finalize:function(he){var xe=this._hasher,fe=xe.finalize(he);return xe.reset(),xe.finalize(this._oKey.clone().concat(fe))}})})()})},function(Le,ye,Fe){(function(Me,Ee){Le.exports=ye=Ee(Fe(0))})(0,function(Me){return function(){function Ee(ge,he,xe){for(var fe=[],ue=0,ee=0;ee<he;ee++)if(ee%4){var z=xe[ge.charCodeAt(ee-1)]<<ee%4*2,oe=xe[ge.charCodeAt(ee)]>>>6-ee%4*2;fe[ue>>>2]|=(z|oe)<<24-ue%4*8,ue++}return ve.create(fe,ue)}var me=Me,be=me.lib,ve=be.WordArray,we=me.enc;we.Base64={stringify:function(ge){var he=ge.words,xe=ge.sigBytes,fe=this._map;ge.clamp();for(var ue=[],ee=0;ee<xe;ee+=3)for(var z=he[ee>>>2]>>>24-ee%4*8&255,oe=he[ee+1>>>2]>>>24-(ee+1)%4*8&255,ie=he[ee+2>>>2]>>>24-(ee+2)%4*8&255,se=z<<16|oe<<8|ie,le=0;le<4&&ee+.75*le<xe;le++)ue.push(fe.charAt(se>>>6*(3-le)&63));var Se=fe.charAt(64);if(Se)for(;ue.length%4;)ue.push(Se);return ue.join("")},parse:function(ge){var he=ge.length,xe=this._map,fe=this._reverseMap;if(!fe){fe=this._reverseMap=[];for(var ue=0;ue<xe.length;ue++)fe[xe.charCodeAt(ue)]=ue}var ee=xe.charAt(64);if(ee){var z=ge.indexOf(ee);z!==-1&&(he=z)}return Ee(ge,he,fe)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),Me.enc.Base64})},function(Le,ye,Fe){"use strict";function Me(Ce){return Ce&&Ce.__esModule?Ce:{default:Ce}}function Ee(Ce,Ae){if(!(Ce instanceof Ae))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ye,"__esModule",{value:!0});var me=function(){function Ce(Ae,Oe){for(var Re=0;Re<Oe.length;Re++){var We=Oe[Re];We.enumerable=We.enumerable||!1,We.configurable=!0,"value"in We&&(We.writable=!0),Object.defineProperty(Ae,We.key,We)}}return function(Ae,Oe,Re){return Oe&&Ce(Ae.prototype,Oe),Re&&Ce(Ae,Re),Ae}}(),be=Fe(8),ve=Me(be),we=Fe(7),ge=Me(we),he=Fe(4),xe=Me(he),fe=Fe(6),ue=Me(fe),ee=Fe(1),z=Me(ee),oe=Fe(9),ie=Me(oe),se=Fe(2),le=Fe(11),Se=Fe(10),pe=function(){function Ce(){Ee(this,Ce)}return me(Ce,null,[{key:"getAuthInfo",value:function(Ae,Oe,Re){var We=Ae+"|f#Ylm&^1TppeRhLg|"+Re;return Oe&&(We=Ae+"|"+Oe+"|f#Ylm&^1TppeRhLg|"+Re),se(Se.parse(We)).toString(le)}},{key:"upload",value:function(Ae,Oe,Re){var We=z.default.ISODateString(new Date),$e=Math.floor(new Date().valueOf()/1e3),Je=xe.default.getClientId();Je=xe.default.setClientId(Je);var pt=Ce.getAuthInfo(Ae.userId,Je,$e),St=ie.default.randomUUID(),Mt={Source:"WebSDK",BusinessType:"UploadVideo",Action:"ReportUploadProgress",TerminalType:"H5",DeviceModel:ge.default.browser.name+(ge.default.browser.version||""),AppVersion:ue.default.version,AuthTimestamp:$e,Timestamp:We,AuthInfo:pt,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:St};Je&&(Mt.ClientId=Je);var ct=ie.default.makeUTF8sort(Mt,"=","&")+"&Signature="+ie.default.aliyunEncodeURI(ie.default.makeChangeSiga(Mt,Ae.accessKeySecret)),wt="https://vod."+Ae.region+".aliyuncs.com/?"+ct;ve.default.get(wt,function(ft){Oe&&Oe()},function(ft){ft&&(Re(ft),console.log(ft))})}},{key:"get",value:function(Ae,Oe,Re){var We=z.default.ISODateString(new Date),$e=Math.floor(new Date().valueOf()/1e3),Je=xe.default.getClientId(),pt=Ce.getAuthInfo(Ae.userId,Je,$e),St=ie.default.randomUUID(),Mt={Source:"WebSDK",BusinessType:"UploadVideo",Action:"GetUploadProgress",TerminalType:"H5",DeviceModel:ge.default.browser.name+(ge.default.browser.version||""),AppVersion:ue.default.version,AuthTimestamp:$e,Timestamp:We,AuthInfo:pt,UserId:Ae.userId,UploadInfoList:JSON.stringify(Ae.uploadInfoList),Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:St};Je&&(Mt.ClientId=Je);var ct=ie.default.makeUTF8sort(Mt,"=","&")+"&Signature="+ie.default.aliyunEncodeURI(ie.default.makeChangeSiga(Mt,Ae.accessKeySecret)),wt="https://vod."+Ae.region+".aliyuncs.com/?"+ct;ve.default.get(wt,function(ft){var $t={},st=Je;ft=ft?JSON.parse(ft):{},ft.UploadProgress&&ft.UploadProgress.UploadProgressList&&ft.UploadProgress.UploadProgressList.length>0&&($t=ft.UploadProgress.UploadProgressList[0],st=$t.ClientId),xe.default.setClientId(st),Oe&&Oe($t)},function(ft){ft&&(Re(ft),console.log(ft))})}}]),Ce}();ye.default=pe},function(Le,ye,Fe){"use strict";function Me(we,ge){if(!(we instanceof ge))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ye,"__esModule",{value:!0});var Ee=function(){function we(ge,he){for(var xe=0;xe<he.length;xe++){var fe=he[xe];fe.enumerable=fe.enumerable||!1,fe.configurable=!0,"value"in fe&&(fe.writable=!0),Object.defineProperty(ge,fe.key,fe)}}return function(ge,he,xe){return he&&we(ge.prototype,he),xe&&we(ge,xe),ge}}(),me=Fe(2),be=Fe(33),ve=(Fe(11),function(){function we(){Me(this,we)}return Ee(we,null,[{key:"getMd5",value:function(ge,he,xe){var fe=new FileReader;fe.onload=function(z){try{if(z&&z.target){var oe=me(be.parse(z.target.result)),ie=oe.toString();he(ie)}}catch(se){console.log(se)}},fe.onerror=function(z){console.log(z),errorCallback(z)};var ue=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,ee=ue.call(ge,0,1024);fe.readAsBinaryString(ee)}}]),we}());ye.default=ve},function(Le,ye,Fe){(function(Me,Ee){Le.exports=ye=Ee(Fe(0))})(0,function(Me){return Me.enc.Latin1})}])},88386:function(_n,hn,De){(function(Le){Le(De(4631))})(function(Le){Le.defineOption("placeholder","",function(ve,we,ge){var he=ge&&ge!=Le.Init;if(we&&!he)ve.on("blur",Ee),ve.on("change",me),ve.on("swapDoc",me),Le.on(ve.getInputField(),"compositionupdate",ve.state.placeholderCompose=function(){Me(ve)}),me(ve);else if(!we&&he){ve.off("blur",Ee),ve.off("change",me),ve.off("swapDoc",me),Le.off(ve.getInputField(),"compositionupdate",ve.state.placeholderCompose),ye(ve);var xe=ve.getWrapperElement();xe.className=xe.className.replace(" CodeMirror-empty","")}we&&!ve.hasFocus()&&Ee(ve)});function ye(ve){ve.state.placeholder&&(ve.state.placeholder.parentNode.removeChild(ve.state.placeholder),ve.state.placeholder=null)}function Fe(ve){ye(ve);var we=ve.state.placeholder=document.createElement("pre");we.style.cssText="height: 0; overflow: visible",we.style.direction=ve.getOption("direction"),we.className="CodeMirror-placeholder CodeMirror-line-like";var ge=ve.getOption("placeholder");typeof ge=="string"&&(ge=document.createTextNode(ge)),we.appendChild(ge),ve.display.lineSpace.insertBefore(we,ve.display.lineSpace.firstChild)}function Me(ve){setTimeout(function(){var we=!1,ge=ve.getInputField();ge.nodeName=="TEXTAREA"?we=!ge.value:ve.lineCount()==1&&(we=!/[^\u200b]/.test(ge.querySelector(".CodeMirror-line").textContent)),we?Fe(ve):ye(ve)},20)}function Ee(ve){be(ve)&&Fe(ve)}function me(ve){var we=ve.getWrapperElement(),ge=be(ve);we.className=we.className.replace(" CodeMirror-empty","")+(ge?" CodeMirror-empty":""),ge?Fe(ve):ye(ve)}function be(ve){return ve.lineCount()===1&&ve.getLine(0)===""}})},82801:function(_n,hn,De){(function(Le){Le(De(4631))})(function(Le){var ye={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Fe=Le.Pos;Le.defineOption("autoCloseBrackets",!1,function(ee,z,oe){oe&&oe!=Le.Init&&(ee.removeKeyMap(Ee),ee.state.closeBrackets=null),z&&(me(Me(z,"pairs")),ee.state.closeBrackets=z,ee.addKeyMap(Ee))});function Me(ee,z){return z=="pairs"&&typeof ee=="string"?ee:typeof ee=="object"&&ee[z]!=null?ee[z]:ye[z]}var Ee={Backspace:we,Enter:ge};function me(ee){for(var z=0;z<ee.length;z++){var oe=ee.charAt(z),ie="'"+oe+"'";Ee[ie]||(Ee[ie]=be(oe))}}me(ye.pairs+"`");function be(ee){return function(z){return xe(z,ee)}}function ve(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=ve(ee);if(!z||ee.getOption("disableInput"))return Le.Pass;for(var oe=Me(z,"pairs"),ie=ee.listSelections(),se=0;se<ie.length;se++){if(!ie[se].empty())return Le.Pass;var le=fe(ee,ie[se].head);if(!le||oe.indexOf(le)%2!=0)return Le.Pass}for(var se=ie.length-1;se>=0;se--){var Se=ie[se].head;ee.replaceRange("",Fe(Se.line,Se.ch-1),Fe(Se.line,Se.ch+1),"+delete")}}function ge(ee){var z=ve(ee),oe=z&&Me(z,"explode");if(!oe||ee.getOption("disableInput"))return Le.Pass;for(var ie=ee.listSelections(),se=0;se<ie.length;se++){if(!ie[se].empty())return Le.Pass;var le=fe(ee,ie[se].head);if(!le||oe.indexOf(le)%2!=0)return Le.Pass}ee.operation(function(){var Se=ee.lineSeparator()||`
|
|
|
`;ee.replaceSelection(Se+Se,null),ee.execCommand("goCharLeft"),ie=ee.listSelections();for(var pe=0;pe<ie.length;pe++){var Ce=ie[pe].head.line;ee.indentLine(Ce,null,!0),ee.indentLine(Ce+1,null,!0)}})}function he(ee){var z=Le.cmpPos(ee.anchor,ee.head)>0;return{anchor:new Fe(ee.anchor.line,ee.anchor.ch+(z?-1:1)),head:new Fe(ee.head.line,ee.head.ch+(z?1:-1))}}function xe(ee,z){var oe=ve(ee);if(!oe||ee.getOption("disableInput"))return Le.Pass;var ie=Me(oe,"pairs"),se=ie.indexOf(z);if(se==-1)return Le.Pass;for(var le=Me(oe,"closeBefore"),Se=Me(oe,"triples"),pe=ie.charAt(se+1)==z,Ce=ee.listSelections(),Ae=se%2==0,Oe,Re=0;Re<Ce.length;Re++){var We=Ce[Re],$e=We.head,Je,pt=ee.getRange($e,Fe($e.line,$e.ch+1));if(Ae&&!We.empty())Je="surround";else if((pe||!Ae)&&pt==z)pe&&ue(ee,$e)?Je="both":Se.indexOf(z)>=0&&ee.getRange($e,Fe($e.line,$e.ch+3))==z+z+z?Je="skipThree":Je="skip";else if(pe&&$e.ch>1&&Se.indexOf(z)>=0&&ee.getRange(Fe($e.line,$e.ch-2),$e)==z+z){if($e.ch>2&&/\bstring/.test(ee.getTokenTypeAt(Fe($e.line,$e.ch-2))))return Le.Pass;Je="addFour"}else if(pe){var St=$e.ch==0?" ":ee.getRange(Fe($e.line,$e.ch-1),$e);if(!Le.isWordChar(pt)&&St!=z&&!Le.isWordChar(St))Je="both";else return Le.Pass}else if(Ae&&(pt.length===0||/\s/.test(pt)||le.indexOf(pt)>-1))Je="both";else return Le.Pass;if(!Oe)Oe=Je;else if(Oe!=Je)return Le.Pass}var Mt=se%2?ie.charAt(se-1):z,ct=se%2?z:ie.charAt(se+1);ee.operation(function(){if(Oe=="skip")ee.execCommand("goCharRight");else if(Oe=="skipThree")for(var wt=0;wt<3;wt++)ee.execCommand("goCharRight");else if(Oe=="surround"){for(var ft=ee.getSelections(),wt=0;wt<ft.length;wt++)ft[wt]=Mt+ft[wt]+ct;ee.replaceSelections(ft,"around"),ft=ee.listSelections().slice();for(var wt=0;wt<ft.length;wt++)ft[wt]=he(ft[wt]);ee.setSelections(ft)}else Oe=="both"?(ee.replaceSelection(Mt+ct,null),ee.triggerElectric(Mt+ct),ee.execCommand("goCharLeft")):Oe=="addFour"&&(ee.replaceSelection(Mt+Mt+Mt+Mt,"before"),ee.execCommand("goCharRight"))})}function fe(ee,z){var oe=ee.getRange(Fe(z.line,z.ch-1),Fe(z.line,z.ch+1));return oe.length==2?oe:null}function ue(ee,z){var oe=ee.getTokenAt(Fe(z.line,z.ch+1));return/\bstring/.test(oe.type)&&oe.start==z.ch&&(z.ch==0||!/\bstring/.test(ee.getTokenTypeAt(z)))}})},57341:function(_n,hn,De){(function(Le){Le(De(4631),De(4786))})(function(Le){Le.defineOption("autoCloseTags",!1,function(we,ge,he){if(he!=Le.Init&&he&&we.removeKeyMap("autoCloseTags"),!!ge){var xe={name:"autoCloseTags"};(typeof ge!="object"||ge.whenClosing!==!1)&&(xe["'/'"]=function(fe){return me(fe)}),(typeof ge!="object"||ge.whenOpening!==!1)&&(xe["'>'"]=function(fe){return Me(fe)}),we.addKeyMap(xe)}});var ye=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Fe=["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 ge=we.listSelections(),he=[],xe=we.getOption("autoCloseTags"),fe=0;fe<ge.length;fe++){if(!ge[fe].empty())return Le.Pass;var ue=ge[fe].head,ee=we.getTokenAt(ue),z=Le.innerMode(we.getMode(),ee.state),oe=z.state,ie=z.mode.xmlCurrentTag&&z.mode.xmlCurrentTag(oe),se=ie&&ie.name;if(!se)return Le.Pass;var le=z.mode.configuration=="html",Se=typeof xe=="object"&&xe.dontCloseTags||le&&ye,pe=typeof xe=="object"&&xe.indentTags||le&&Fe;ee.end>ue.ch&&(se=se.slice(0,se.length-ee.end+ue.ch));var Ce=se.toLowerCase();if(!se||ee.type=="string"&&(ee.end!=ue.ch||!/[\"\']/.test(ee.string.charAt(ee.string.length-1))||ee.string.length==1)||ee.type=="tag"&&ie.close||ee.string.indexOf("/")==ue.ch-ee.start-1||Se&&be(Se,Ce)>-1||ve(we,z.mode.xmlCurrentContext&&z.mode.xmlCurrentContext(oe)||[],se,ue,!0))return Le.Pass;var Ae=typeof xe=="object"&&xe.emptyTags;if(Ae&&be(Ae,se)>-1){he[fe]={text:"/>",newPos:Le.Pos(ue.line,ue.ch+2)};continue}var Oe=pe&&be(pe,Ce)>-1;he[fe]={indent:Oe,text:">"+(Oe?`
|
|
|
|
|
|
`:"")+"</"+se+">",newPos:Oe?Le.Pos(ue.line+1,0):Le.Pos(ue.line,ue.ch+1)}}for(var Re=typeof xe=="object"&&xe.dontIndentOnAutoClose,fe=ge.length-1;fe>=0;fe--){var We=he[fe];we.replaceRange(We.text,ge[fe].head,ge[fe].anchor,"+insert");var $e=we.listSelections().slice(0);$e[fe]={head:We.newPos,anchor:We.newPos},we.setSelections($e),!Re&&We.indent&&(we.indentLine(We.newPos.line,null,!0),we.indentLine(We.newPos.line+1,null,!0))}}function Ee(we,ge){for(var he=we.listSelections(),xe=[],fe=ge?"/":"</",ue=we.getOption("autoCloseTags"),ee=typeof ue=="object"&&ue.dontIndentOnSlash,z=0;z<he.length;z++){if(!he[z].empty())return Le.Pass;var oe=he[z].head,ie=we.getTokenAt(oe),se=Le.innerMode(we.getMode(),ie.state),le=se.state;if(ge&&(ie.type=="string"||ie.string.charAt(0)!="<"||ie.start!=oe.ch-1))return Le.Pass;var Se,pe=se.mode.name!="xml"&&we.getMode().name=="htmlmixed";if(pe&&se.mode.name=="javascript")Se=fe+"script";else if(pe&&se.mode.name=="css")Se=fe+"style";else{var Ce=se.mode.xmlCurrentContext&&se.mode.xmlCurrentContext(le);if(!Ce||Ce.length&&ve(we,Ce,Ce[Ce.length-1],oe))return Le.Pass;Se=fe+Ce[Ce.length-1]}we.getLine(oe.line).charAt(ie.end)!=">"&&(Se+=">"),xe[z]=Se}if(we.replaceSelections(xe),he=we.listSelections(),!ee)for(var z=0;z<he.length;z++)(z==he.length-1||he[z].head.line<he[z+1].head.line)&&we.indentLine(he[z].head.line)}function me(we){return we.getOption("disableInput")?Le.Pass:Ee(we,!0)}Le.commands.closeTag=function(we){return Ee(we)};function be(we,ge){if(we.indexOf)return we.indexOf(ge);for(var he=0,xe=we.length;he<xe;++he)if(we[he]==ge)return he;return-1}function ve(we,ge,he,xe,fe){if(!Le.scanForClosingTag)return!1;var ue=Math.min(we.lastLine()+1,xe.line+500),ee=Le.scanForClosingTag(we,xe,null,ue);if(!ee||ee.tag!=he)return!1;for(var z=fe?1:0,oe=ge.length-1;oe>=0&&ge[oe]==he;oe--)++z;xe=ee.to;for(var oe=1;oe<z;oe++){var ie=Le.scanForClosingTag(we,xe,null,ue);if(!ie||ie.tag!=he)return!1;xe=ie.to}return!0}})},4786:function(_n,hn,De){(function(Le){Le(De(4631))})(function(Le){"use strict";var ye=Le.Pos;function Fe(oe,ie){return oe.line-ie.line||oe.ch-ie.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",Ee=Me+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",me=new RegExp("<(/?)(["+Me+"]["+Ee+"]*)","g");function be(oe,ie,se,le){this.line=ie,this.ch=se,this.cm=oe,this.text=oe.getLine(ie),this.min=le?Math.max(le.from,oe.firstLine()):oe.firstLine(),this.max=le?Math.min(le.to-1,oe.lastLine()):oe.lastLine()}function ve(oe,ie){var se=oe.cm.getTokenTypeAt(ye(oe.line,ie));return se&&/\btag\b/.test(se)}function we(oe){if(!(oe.line>=oe.max))return oe.ch=0,oe.text=oe.cm.getLine(++oe.line),!0}function ge(oe){if(!(oe.line<=oe.min))return oe.text=oe.cm.getLine(--oe.line),oe.ch=oe.text.length,!0}function he(oe){for(;;){var ie=oe.text.indexOf(">",oe.ch);if(ie==-1){if(we(oe))continue;return}if(!ve(oe,ie+1)){oe.ch=ie+1;continue}var se=oe.text.lastIndexOf("/",ie),le=se>-1&&!/\S/.test(oe.text.slice(se+1,ie));return oe.ch=ie+1,le?"selfClose":"regular"}}function xe(oe){for(;;){var ie=oe.ch?oe.text.lastIndexOf("<",oe.ch-1):-1;if(ie==-1){if(ge(oe))continue;return}if(!ve(oe,ie+1)){oe.ch=ie;continue}me.lastIndex=ie,oe.ch=ie;var se=me.exec(oe.text);if(se&&se.index==ie)return se}}function fe(oe){for(;;){me.lastIndex=oe.ch;var ie=me.exec(oe.text);if(!ie){if(we(oe))continue;return}if(!ve(oe,ie.index+1)){oe.ch=ie.index+1;continue}return oe.ch=ie.index+ie[0].length,ie}}function ue(oe){for(;;){var ie=oe.ch?oe.text.lastIndexOf(">",oe.ch-1):-1;if(ie==-1){if(ge(oe))continue;return}if(!ve(oe,ie+1)){oe.ch=ie;continue}var se=oe.text.lastIndexOf("/",ie),le=se>-1&&!/\S/.test(oe.text.slice(se+1,ie));return oe.ch=ie+1,le?"selfClose":"regular"}}function ee(oe,ie){for(var se=[];;){var le=fe(oe),Se,pe=oe.line,Ce=oe.ch-(le?le[0].length:0);if(!le||!(Se=he(oe)))return;if(Se!="selfClose")if(le[1]){for(var Ae=se.length-1;Ae>=0;--Ae)if(se[Ae]==le[2]){se.length=Ae;break}if(Ae<0&&(!ie||ie==le[2]))return{tag:le[2],from:ye(pe,Ce),to:ye(oe.line,oe.ch)}}else se.push(le[2])}}function z(oe,ie){for(var se=[];;){var le=ue(oe);if(!le)return;if(le=="selfClose"){xe(oe);continue}var Se=oe.line,pe=oe.ch,Ce=xe(oe);if(!Ce)return;if(Ce[1])se.push(Ce[2]);else{for(var Ae=se.length-1;Ae>=0;--Ae)if(se[Ae]==Ce[2]){se.length=Ae;break}if(Ae<0&&(!ie||ie==Ce[2]))return{tag:Ce[2],from:ye(oe.line,oe.ch),to:ye(Se,pe)}}}}Le.registerHelper("fold","xml",function(oe,ie){for(var se=new be(oe,ie.line,0);;){var le=fe(se);if(!le||se.line!=ie.line)return;var Se=he(se);if(!Se)return;if(!le[1]&&Se!="selfClose"){var pe=ye(se.line,se.ch),Ce=ee(se,le[2]);return Ce&&Fe(Ce.from,pe)>0?{from:pe,to:Ce.from}:null}}}),Le.findMatchingTag=function(oe,ie,se){var le=new be(oe,ie.line,ie.ch,se);if(!(le.text.indexOf(">")==-1&&le.text.indexOf("<")==-1)){var Se=he(le),pe=Se&&ye(le.line,le.ch),Ce=Se&&xe(le);if(!(!Se||!Ce||Fe(le,ie)>0)){var Ae={from:ye(le.line,le.ch),to:pe,tag:Ce[2]};return Se=="selfClose"?{open:Ae,close:null,at:"open"}:Ce[1]?{open:z(le,Ce[2]),close:Ae,at:"close"}:(le=new be(oe,pe.line,pe.ch,se),{open:Ae,close:ee(le,Ce[2]),at:"open"})}}},Le.findEnclosingTag=function(oe,ie,se,le){for(var Se=new be(oe,ie.line,ie.ch,se);;){var pe=z(Se,le);if(!pe)break;var Ce=new be(oe,ie.line,ie.ch,se),Ae=ee(Ce,pe.tag);if(Ae)return{open:pe,close:Ae}}},Le.scanForClosingTag=function(oe,ie,se,le){var Se=new be(oe,ie.line,ie.ch,le?{from:0,to:le}:null);return ee(Se,se)}})},4631:function(_n){(function(hn,De){_n.exports=De()})(this,function(){"use strict";var hn=navigator.userAgent,De=navigator.platform,Le=/gecko\/\d/i.test(hn),ye=/MSIE \d/.test(hn),Fe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(hn),Me=/Edge\/(\d+)/.exec(hn),Ee=ye||Fe||Me,me=Ee&&(ye?document.documentMode||6:+(Me||Fe)[1]),be=!Me&&/WebKit\//.test(hn),ve=be&&/Qt\/\d+\.\d+/.test(hn),we=!Me&&/Chrome\//.test(hn),ge=/Opera\//.test(hn),he=/Apple Computer/.test(navigator.vendor),xe=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(hn),fe=/PhantomJS/.test(hn),ue=!Me&&/AppleWebKit/.test(hn)&&/Mobile\/\w+/.test(hn),ee=/Android/.test(hn),z=ue||ee||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(hn),oe=ue||/Mac/.test(De),ie=/\bCrOS\b/.test(hn),se=/win/i.test(De),le=ge&&hn.match(/Version\/(\d*\.\d*)/);le&&(le=Number(le[1])),le&&le>=15&&(ge=!1,be=!0);var Se=oe&&(ve||ge&&(le==null||le<12.11)),pe=Le||Ee&&me>=9;function Ce(re){return new RegExp("(^|\\s)"+re+"(?:$|\\s)\\s*")}var Ae=function(re,de){var Te=re.className,ke=Ce(de).exec(Te);if(ke){var Ie=Te.slice(ke.index+ke[0].length);re.className=Te.slice(0,ke.index)+(Ie?ke[1]+Ie:"")}};function Oe(re){for(var de=re.childNodes.length;de>0;--de)re.removeChild(re.firstChild);return re}function Re(re,de){return Oe(re).appendChild(de)}function We(re,de,Te,ke){var Ie=document.createElement(re);if(Te&&(Ie.className=Te),ke&&(Ie.style.cssText=ke),typeof de=="string")Ie.appendChild(document.createTextNode(de));else if(de)for(var tt=0;tt<de.length;++tt)Ie.appendChild(de[tt]);return Ie}function $e(re,de,Te,ke){var Ie=We(re,de,Te,ke);return Ie.setAttribute("role","presentation"),Ie}var Je;document.createRange?Je=function(re,de,Te,ke){var Ie=document.createRange();return Ie.setEnd(ke||re,Te),Ie.setStart(re,de),Ie}:Je=function(re,de,Te){var ke=document.body.createTextRange();try{ke.moveToElementText(re.parentNode)}catch(Ie){return ke}return ke.collapse(!0),ke.moveEnd("character",Te),ke.moveStart("character",de),ke};function pt(re,de){if(de.nodeType==3&&(de=de.parentNode),re.contains)return re.contains(de);do if(de.nodeType==11&&(de=de.host),de==re)return!0;while(de=de.parentNode)}function St(){var re;try{re=document.activeElement}catch(de){re=document.body||null}for(;re&&re.shadowRoot&&re.shadowRoot.activeElement;)re=re.shadowRoot.activeElement;return re}function Mt(re,de){var Te=re.className;Ce(de).test(Te)||(re.className+=(Te?" ":"")+de)}function ct(re,de){for(var Te=re.split(" "),ke=0;ke<Te.length;ke++)Te[ke]&&!Ce(Te[ke]).test(de)&&(de+=" "+Te[ke]);return de}var wt=function(re){re.select()};ue?wt=function(re){re.selectionStart=0,re.selectionEnd=re.value.length}:Ee&&(wt=function(re){try{re.select()}catch(de){}});function ft(re){var de=Array.prototype.slice.call(arguments,1);return function(){return re.apply(null,de)}}function $t(re,de,Te){de||(de={});for(var ke in re)re.hasOwnProperty(ke)&&(Te!==!1||!de.hasOwnProperty(ke))&&(de[ke]=re[ke]);return de}function st(re,de,Te,ke,Ie){de==null&&(de=re.search(/[^\s\u00a0]/),de==-1&&(de=re.length));for(var tt=ke||0,gt=Ie||0;;){var Et=re.indexOf(" ",tt);if(Et<0||Et>=de)return gt+(de-tt);gt+=Et-tt,gt+=Te-gt%Te,tt=Et+1}}var et=function(){this.id=null,this.f=null,this.time=0,this.handler=ft(this.onTimeout,this)};et.prototype.onTimeout=function(re){re.id=0,re.time<=+new Date?re.f():setTimeout(re.handler,re.time-+new Date)},et.prototype.set=function(re,de){this.f=de;var Te=+new Date+re;(!this.id||Te<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,re),this.time=Te)};function lt(re,de){for(var Te=0;Te<re.length;++Te)if(re[Te]==de)return Te;return-1}var dt=50,bt={toString:function(){return"CodeMirror.Pass"}},yt={scroll:!1},Vt={origin:"*mouse"},Kt={origin:"+move"};function gn(re,de,Te){for(var ke=0,Ie=0;;){var tt=re.indexOf(" ",ke);tt==-1&&(tt=re.length);var gt=tt-ke;if(tt==re.length||Ie+gt>=de)return ke+Math.min(gt,de-Ie);if(Ie+=tt-ke,Ie+=Te-Ie%Te,ke=tt+1,Ie>=de)return ke}}var Gt=[""];function Dt(re){for(;Gt.length<=re;)Gt.push(on(Gt)+" ");return Gt[re]}function on(re){return re[re.length-1]}function Jt(re,de){for(var Te=[],ke=0;ke<re.length;ke++)Te[ke]=de(re[ke],ke);return Te}function jt(re,de,Te){for(var ke=0,Ie=Te(de);ke<re.length&&Te(re[ke])<=Ie;)ke++;re.splice(ke,0,de)}function ut(){}function ze(re,de){var Te;return Object.create?Te=Object.create(re):(ut.prototype=re,Te=new ut),de&&$t(de,Te),Te}var je=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function it(re){return/\w/.test(re)||re>"\x80"&&(re.toUpperCase()!=re.toLowerCase()||je.test(re))}function ht(re,de){return de?de.source.indexOf("\\w")>-1&&it(re)?!0:de.test(re):it(re)}function nt(re){for(var de in re)if(re.hasOwnProperty(de)&&re[de])return!1;return!0}var Ke=/[\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 Be(re){return re.charCodeAt(0)>=768&&Ke.test(re)}function Ue(re,de,Te){for(;(Te<0?de>0:de<re.length)&&Be(re.charAt(de));)de+=Te;return de}function rt(re,de,Te){for(var ke=de>Te?-1:1;;){if(de==Te)return de;var Ie=(de+Te)/2,tt=ke<0?Math.ceil(Ie):Math.floor(Ie);if(tt==de)return re(tt)?de:Te;re(tt)?Te=tt:de=tt+ke}}function Ze(re,de,Te,ke){if(!re)return ke(de,Te,"ltr",0);for(var Ie=!1,tt=0;tt<re.length;++tt){var gt=re[tt];(gt.from<Te&>.to>de||de==Te&>.to==de)&&(ke(Math.max(gt.from,de),Math.min(gt.to,Te),gt.level==1?"rtl":"ltr",tt),Ie=!0)}Ie||ke(de,Te,"ltr")}var Xe=null;function mt(re,de,Te){var ke;Xe=null;for(var Ie=0;Ie<re.length;++Ie){var tt=re[Ie];if(tt.from<de&&tt.to>de)return Ie;tt.to==de&&(tt.from!=tt.to&&Te=="before"?ke=Ie:Xe=Ie),tt.from==de&&(tt.from!=tt.to&&Te!="before"?ke=Ie:Xe=Ie)}return ke!=null?ke:Xe}var Rt=function(){var re="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",de="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function Te(zt){return zt<=247?re.charAt(zt):1424<=zt&&zt<=1524?"R":1536<=zt&&zt<=1785?de.charAt(zt-1536):1774<=zt&&zt<=2220?"r":8192<=zt&&zt<=8203?"w":zt==8204?"b":"L"}var ke=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Ie=/[stwN]/,tt=/[LRr]/,gt=/[Lb1n]/,Et=/[1n]/;function Pt(zt,mn,Xt){this.level=zt,this.from=mn,this.to=Xt}return function(zt,mn){var Xt=mn=="ltr"?"L":"R";if(zt.length==0||mn=="ltr"&&!ke.test(zt))return!1;for(var Nn=zt.length,Ln=[],Si=0;Si<Nn;++Si)Ln.push(Te(zt.charCodeAt(Si)));for(var Li=0,Bi=Xt;Li<Nn;++Li){var cr=Ln[Li];cr=="m"?Ln[Li]=Bi:Bi=cr}for(var Ir=0,Pr=Xt;Ir<Nn;++Ir){var Wr=Ln[Ir];Wr=="1"&&Pr=="r"?Ln[Ir]="n":tt.test(Wr)&&(Pr=Wr,Wr=="r"&&(Ln[Ir]="R"))}for(var No=1,wr=Ln[0];No<Nn-1;++No){var ts=Ln[No];ts=="+"&&wr=="1"&&Ln[No+1]=="1"?Ln[No]="1":ts==","&&wr==Ln[No+1]&&(wr=="1"||wr=="n")&&(Ln[No]=wr),wr=ts}for(var da=0;da<Nn;++da){var il=Ln[da];if(il==",")Ln[da]="N";else if(il=="%"){var wa=void 0;for(wa=da+1;wa<Nn&&Ln[wa]=="%";++wa);for(var ou=da&&Ln[da-1]=="!"||wa<Nn&&Ln[wa]=="1"?"1":"N",Il=da;Il<wa;++Il)Ln[Il]=ou;da=wa-1}}for(var Va=0,pu=Xt;Va<Nn;++Va){var Pl=Ln[Va];pu=="L"&&Pl=="1"?Ln[Va]="L":tt.test(Pl)&&(pu=Pl)}for(var Za=0;Za<Nn;++Za)if(Ie.test(Ln[Za])){var Es=void 0;for(Es=Za+1;Es<Nn&&Ie.test(Ln[Es]);++Es);for(var Ca=(Za?Ln[Za-1]:Xt)=="L",hl=(Es<Nn?Ln[Es]:Xt)=="L",Cl=Ca==hl?Ca?"L":"R":Xt,ih=Za;ih<Es;++ih)Ln[ih]=Cl;Za=Es-1}for(var _a=[],Wu,Ma=0;Ma<Nn;)if(gt.test(Ln[Ma])){var Pf=Ma;for(++Ma;Ma<Nn&>.test(Ln[Ma]);++Ma);_a.push(new Pt(0,Pf,Ma))}else{var Tu=Ma,gu=_a.length,su=mn=="rtl"?1:0;for(++Ma;Ma<Nn&&Ln[Ma]!="L";++Ma);for(var Ys=Tu;Ys<Ma;)if(Et.test(Ln[Ys])){Tu<Ys&&(_a.splice(gu,0,new Pt(1,Tu,Ys)),gu+=su);var cl=Ys;for(++Ys;Ys<Ma&&Et.test(Ln[Ys]);++Ys);_a.splice(gu,0,new Pt(2,cl,Ys)),gu+=su,Tu=Ys}else++Ys;Tu<Ma&&_a.splice(gu,0,new Pt(1,Tu,Ma))}return mn=="ltr"&&(_a[0].level==1&&(Wu=zt.match(/^\s+/))&&(_a[0].from=Wu[0].length,_a.unshift(new Pt(0,0,Wu[0].length))),on(_a).level==1&&(Wu=zt.match(/\s+$/))&&(on(_a).to-=Wu[0].length,_a.push(new Pt(0,Nn-Wu[0].length,Nn)))),mn=="rtl"?_a.reverse():_a}}();function vn(re,de){var Te=re.order;return Te==null&&(Te=re.order=Rt(re.text,de)),Te}var An=[],Mn=function(re,de,Te){if(re.addEventListener)re.addEventListener(de,Te,!1);else if(re.attachEvent)re.attachEvent("on"+de,Te);else{var ke=re._handlers||(re._handlers={});ke[de]=(ke[de]||An).concat(Te)}};function hi(re,de){return re._handlers&&re._handlers[de]||An}function mi(re,de,Te){if(re.removeEventListener)re.removeEventListener(de,Te,!1);else if(re.detachEvent)re.detachEvent("on"+de,Te);else{var ke=re._handlers,Ie=ke&&ke[de];if(Ie){var tt=lt(Ie,Te);tt>-1&&(ke[de]=Ie.slice(0,tt).concat(Ie.slice(tt+1)))}}}function si(re,de){var Te=hi(re,de);if(Te.length)for(var ke=Array.prototype.slice.call(arguments,2),Ie=0;Ie<Te.length;++Ie)Te[Ie].apply(null,ke)}function Cn(re,de,Te){return typeof de=="string"&&(de={type:de,preventDefault:function(){this.defaultPrevented=!0}}),si(re,Te||de.type,re,de),Ci(de)||de.codemirrorIgnore}function Ki(re){var de=re._handlers&&re._handlers.cursorActivity;if(de)for(var Te=re.curOp.cursorActivityHandlers||(re.curOp.cursorActivityHandlers=[]),ke=0;ke<de.length;++ke)lt(Te,de[ke])==-1&&Te.push(de[ke])}function Yn(re,de){return hi(re,de).length>0}function Qi(re){re.prototype.on=function(de,Te){Mn(this,de,Te)},re.prototype.off=function(de,Te){mi(this,de,Te)}}function vr(re){re.preventDefault?re.preventDefault():re.returnValue=!1}function Dr(re){re.stopPropagation?re.stopPropagation():re.cancelBubble=!0}function Ci(re){return re.defaultPrevented!=null?re.defaultPrevented:re.returnValue==!1}function kr(re){vr(re),Dr(re)}function vo(re){return re.target||re.srcElement}function qo(re){var de=re.which;return de==null&&(re.button&1?de=1:re.button&2?de=3:re.button&4&&(de=2)),oe&&re.ctrlKey&&de==1&&(de=3),de}var Do=function(){if(Ee&&me<9)return!1;var re=We("div");return"draggable"in re||"dragDrop"in re}(),Oo;function Cr(re){if(Oo==null){var de=We("span","\u200B");Re(re,We("span",[de,document.createTextNode("x")])),re.firstChild.offsetHeight!=0&&(Oo=de.offsetWidth<=1&&de.offsetHeight>2&&!(Ee&&me<8))}var Te=Oo?We("span","\u200B"):We("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return Te.setAttribute("cm-text",""),Te}var jo;function or(re){if(jo!=null)return jo;var de=Re(re,document.createTextNode("A\u062EA")),Te=Je(de,0,1).getBoundingClientRect(),ke=Je(de,1,2).getBoundingClientRect();return Oe(re),!Te||Te.left==Te.right?!1:jo=ke.right-Te.right<3}var kn=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(re){for(var de=0,Te=[],ke=re.length;de<=ke;){var Ie=re.indexOf(`
|
|
|
`,de);Ie==-1&&(Ie=re.length);var tt=re.slice(de,re.charAt(Ie-1)=="\r"?Ie-1:Ie),gt=tt.indexOf("\r");gt!=-1?(Te.push(tt.slice(0,gt)),de+=gt+1):(Te.push(tt),de=Ie+1)}return Te}:function(re){return re.split(/\r\n?|\n/)},qe=window.getSelection?function(re){try{return re.selectionStart!=re.selectionEnd}catch(de){return!1}}:function(re){var de;try{de=re.ownerDocument.selection.createRange()}catch(Te){}return!de||de.parentElement()!=re?!1:de.compareEndPoints("StartToEnd",de)!=0},Tn=function(){var re=We("div");return"oncopy"in re?!0:(re.setAttribute("oncopy","return;"),typeof re.oncopy=="function")}(),In=null;function zi(re){if(In!=null)return In;var de=Re(re,We("span","x")),Te=de.getBoundingClientRect(),ke=Je(de,0,1).getBoundingClientRect();return In=Math.abs(Te.left-ke.left)>1}var Gi={},Vi={};function Zi(re,de){arguments.length>2&&(de.dependencies=Array.prototype.slice.call(arguments,2)),Gi[re]=de}function qr(re,de){Vi[re]=de}function sn(re){if(typeof re=="string"&&Vi.hasOwnProperty(re))re=Vi[re];else if(re&&typeof re.name=="string"&&Vi.hasOwnProperty(re.name)){var de=Vi[re.name];typeof de=="string"&&(de={name:de}),re=ze(de,re),re.name=de.name}else{if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(re))return sn("application/xml");if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(re))return sn("application/json")}return typeof re=="string"?{name:re}:re||{name:"null"}}function He(re,de){de=sn(de);var Te=Gi[de.name];if(!Te)return He(re,"text/plain");var ke=Te(re,de);if(Ve.hasOwnProperty(de.name)){var Ie=Ve[de.name];for(var tt in Ie)Ie.hasOwnProperty(tt)&&(ke.hasOwnProperty(tt)&&(ke["_"+tt]=ke[tt]),ke[tt]=Ie[tt])}if(ke.name=de.name,de.helperType&&(ke.helperType=de.helperType),de.modeProps)for(var gt in de.modeProps)ke[gt]=de.modeProps[gt];return ke}var Ve={};function ot(re,de){var Te=Ve.hasOwnProperty(re)?Ve[re]:Ve[re]={};$t(de,Te)}function Lt(re,de){if(de===!0)return de;if(re.copyState)return re.copyState(de);var Te={};for(var ke in de){var Ie=de[ke];Ie instanceof Array&&(Ie=Ie.concat([])),Te[ke]=Ie}return Te}function At(re,de){for(var Te;re.innerMode&&(Te=re.innerMode(de),!(!Te||Te.mode==re));)de=Te.state,re=Te.mode;return Te||{mode:re,state:de}}function an(re,de,Te){return re.startState?re.startState(de,Te):!0}var Ot=function(re,de,Te){this.pos=this.start=0,this.string=re,this.tabSize=de||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=Te};Ot.prototype.eol=function(){return this.pos>=this.string.length},Ot.prototype.sol=function(){return this.pos==this.lineStart},Ot.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ot.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ot.prototype.eat=function(re){var de=this.string.charAt(this.pos),Te;if(typeof re=="string"?Te=de==re:Te=de&&(re.test?re.test(de):re(de)),Te)return++this.pos,de},Ot.prototype.eatWhile=function(re){for(var de=this.pos;this.eat(re););return this.pos>de},Ot.prototype.eatSpace=function(){for(var re=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>re},Ot.prototype.skipToEnd=function(){this.pos=this.string.length},Ot.prototype.skipTo=function(re){var de=this.string.indexOf(re,this.pos);if(de>-1)return this.pos=de,!0},Ot.prototype.backUp=function(re){this.pos-=re},Ot.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=st(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?st(this.string,this.lineStart,this.tabSize):0)},Ot.prototype.indentation=function(){return st(this.string,null,this.tabSize)-(this.lineStart?st(this.string,this.lineStart,this.tabSize):0)},Ot.prototype.match=function(re,de,Te){if(typeof re=="string"){var ke=function(gt){return Te?gt.toLowerCase():gt},Ie=this.string.substr(this.pos,re.length);if(ke(Ie)==ke(re))return de!==!1&&(this.pos+=re.length),!0}else{var tt=this.string.slice(this.pos).match(re);return tt&&tt.index>0?null:(tt&&de!==!1&&(this.pos+=tt[0].length),tt)}},Ot.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ot.prototype.hideFirstChars=function(re,de){this.lineStart+=re;try{return de()}finally{this.lineStart-=re}},Ot.prototype.lookAhead=function(re){var de=this.lineOracle;return de&&de.lookAhead(re)},Ot.prototype.baseToken=function(){var re=this.lineOracle;return re&&re.baseToken(this.pos)};function xn(re,de){if(de-=re.first,de<0||de>=re.size)throw new Error("There is no line "+(de+re.first)+" in the document.");for(var Te=re;!Te.lines;)for(var ke=0;;++ke){var Ie=Te.children[ke],tt=Ie.chunkSize();if(de<tt){Te=Ie;break}de-=tt}return Te.lines[de]}function Zn(re,de,Te){var ke=[],Ie=de.line;return re.iter(de.line,Te.line+1,function(tt){var gt=tt.text;Ie==Te.line&&(gt=gt.slice(0,Te.ch)),Ie==de.line&&(gt=gt.slice(de.ch)),ke.push(gt),++Ie}),ke}function wi(re,de,Te){var ke=[];return re.iter(de,Te,function(Ie){ke.push(Ie.text)}),ke}function Bn(re,de){var Te=de-re.height;if(Te)for(var ke=re;ke;ke=ke.parent)ke.height+=Te}function rn(re){if(re.parent==null)return null;for(var de=re.parent,Te=lt(de.lines,re),ke=de.parent;ke;de=ke,ke=ke.parent)for(var Ie=0;ke.children[Ie]!=de;++Ie)Te+=ke.children[Ie].chunkSize();return Te+de.first}function Fn(re,de){var Te=re.first;e:do{for(var ke=0;ke<re.children.length;++ke){var Ie=re.children[ke],tt=Ie.height;if(de<tt){re=Ie;continue e}de-=tt,Te+=Ie.chunkSize()}return Te}while(!re.lines);for(var gt=0;gt<re.lines.length;++gt){var Et=re.lines[gt],Pt=Et.height;if(de<Pt)break;de-=Pt}return Te+gt}function vi(re,de){return de>=re.first&&de<re.first+re.size}function _i(re,de){return String(re.lineNumberFormatter(de+re.firstLineNumber))}function cn(re,de,Te){if(Te===void 0&&(Te=null),!(this instanceof cn))return new cn(re,de,Te);this.line=re,this.ch=de,this.sticky=Te}function qn(re,de){return re.line-de.line||re.ch-de.ch}function Ii(re,de){return re.sticky==de.sticky&&qn(re,de)==0}function lr(re){return cn(re.line,re.ch)}function _r(re,de){return qn(re,de)<0?de:re}function Ti(re,de){return qn(re,de)<0?re:de}function bi(re,de){return Math.max(re.first,Math.min(de,re.first+re.size-1))}function li(re,de){if(de.line<re.first)return cn(re.first,0);var Te=re.first+re.size-1;return de.line>Te?cn(Te,xn(re,Te).text.length):dr(de,xn(re,de.line).text.length)}function dr(re,de){var Te=re.ch;return Te==null||Te>de?cn(re.line,de):Te<0?cn(re.line,0):re}function jr(re,de){for(var Te=[],ke=0;ke<de.length;ke++)Te[ke]=li(re,de[ke]);return Te}var ei=function(re,de){this.state=re,this.lookAhead=de},Ui=function(re,de,Te,ke){this.state=de,this.doc=re,this.line=Te,this.maxLookAhead=ke||0,this.baseTokens=null,this.baseTokenPos=1};Ui.prototype.lookAhead=function(re){var de=this.doc.getLine(this.line+re);return de!=null&&re>this.maxLookAhead&&(this.maxLookAhead=re),de},Ui.prototype.baseToken=function(re){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=re;)this.baseTokenPos+=2;var de=this.baseTokens[this.baseTokenPos+1];return{type:de&&de.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-re}},Ui.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ui.fromSaved=function(re,de,Te){return de instanceof ei?new Ui(re,Lt(re.mode,de.state),Te,de.lookAhead):new Ui(re,Lt(re.mode,de),Te)},Ui.prototype.save=function(re){var de=re!==!1?Lt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ei(de,this.maxLookAhead):de};function ws(re,de,Te,ke){var Ie=[re.state.modeGen],tt={};uo(re,de.text,re.doc.mode,Te,function(zt,mn){return Ie.push(zt,mn)},tt,ke);for(var gt=Te.state,Et=function(zt){Te.baseTokens=Ie;var mn=re.state.overlays[zt],Xt=1,Nn=0;Te.state=!0,uo(re,de.text,mn.mode,Te,function(Ln,Si){for(var Li=Xt;Nn<Ln;){var Bi=Ie[Xt];Bi>Ln&&Ie.splice(Xt,1,Ln,Ie[Xt+1],Bi),Xt+=2,Nn=Math.min(Ln,Bi)}if(Si)if(mn.opaque)Ie.splice(Li,Xt-Li,Ln,"overlay "+Si),Xt=Li+2;else for(;Li<Xt;Li+=2){var cr=Ie[Li+1];Ie[Li+1]=(cr?cr+" ":"")+"overlay "+Si}},tt),Te.state=gt,Te.baseTokens=null,Te.baseTokenPos=1},Pt=0;Pt<re.state.overlays.length;++Pt)Et(Pt);return{styles:Ie,classes:tt.bgClass||tt.textClass?tt:null}}function cs(re,de,Te){if(!de.styles||de.styles[0]!=re.state.modeGen){var ke=Io(re,rn(de)),Ie=de.text.length>re.options.maxHighlightLength&&Lt(re.doc.mode,ke.state),tt=ws(re,de,ke);Ie&&(ke.state=Ie),de.stateAfter=ke.save(!Ie),de.styles=tt.styles,tt.classes?de.styleClasses=tt.classes:de.styleClasses&&(de.styleClasses=null),Te===re.doc.highlightFrontier&&(re.doc.modeFrontier=Math.max(re.doc.modeFrontier,++re.doc.highlightFrontier))}return de.styles}function Io(re,de,Te){var ke=re.doc,Ie=re.display;if(!ke.mode.startState)return new Ui(ke,!0,de);var tt=to(re,de,Te),gt=tt>ke.first&&xn(ke,tt-1).stateAfter,Et=gt?Ui.fromSaved(ke,gt,tt):new Ui(ke,an(ke.mode),tt);return ke.iter(tt,de,function(Pt){dn(re,Pt.text,Et);var zt=Et.line;Pt.stateAfter=zt==de-1||zt%5==0||zt>=Ie.viewFrom&&zt<Ie.viewTo?Et.save():null,Et.nextLine()}),Te&&(ke.modeFrontier=Et.line),Et}function dn(re,de,Te,ke){var Ie=re.doc.mode,tt=new Ot(de,re.options.tabSize,Te);for(tt.start=tt.pos=ke||0,de==""&&gr(Ie,Te.state);!tt.eol();)Zr(Ie,tt,Te.state),tt.start=tt.pos}function gr(re,de){if(re.blankLine)return re.blankLine(de);if(re.innerMode){var Te=At(re,de);if(Te.mode.blankLine)return Te.mode.blankLine(Te.state)}}function Zr(re,de,Te,ke){for(var Ie=0;Ie<10;Ie++){ke&&(ke[0]=At(re,Te).mode);var tt=re.token(de,Te);if(de.pos>de.start)return tt}throw new Error("Mode "+re.name+" failed to advance stream.")}var $i=function(re,de,Te){this.start=re.start,this.end=re.pos,this.string=re.current(),this.type=de||null,this.state=Te};function yo(re,de,Te,ke){var Ie=re.doc,tt=Ie.mode,gt;de=li(Ie,de);var Et=xn(Ie,de.line),Pt=Io(re,de.line,Te),zt=new Ot(Et.text,re.options.tabSize,Pt),mn;for(ke&&(mn=[]);(ke||zt.pos<de.ch)&&!zt.eol();)zt.start=zt.pos,gt=Zr(tt,zt,Pt.state),ke&&mn.push(new $i(zt,gt,Lt(Ie.mode,Pt.state)));return ke?mn:new $i(zt,gt,Pt.state)}function Rr(re,de){if(re)for(;;){var Te=re.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!Te)break;re=re.slice(0,Te.index)+re.slice(Te.index+Te[0].length);var ke=Te[1]?"bgClass":"textClass";de[ke]==null?de[ke]=Te[2]:new RegExp("(?:^|\\s)"+Te[2]+"(?:$|\\s)").test(de[ke])||(de[ke]+=" "+Te[2])}return re}function uo(re,de,Te,ke,Ie,tt,gt){var Et=Te.flattenSpans;Et==null&&(Et=re.options.flattenSpans);var Pt=0,zt=null,mn=new Ot(de,re.options.tabSize,ke),Xt,Nn=re.options.addModeClass&&[null];for(de==""&&Rr(gr(Te,ke.state),tt);!mn.eol();){if(mn.pos>re.options.maxHighlightLength?(Et=!1,gt&&dn(re,de,ke,mn.pos),mn.pos=de.length,Xt=null):Xt=Rr(Zr(Te,mn,ke.state,Nn),tt),Nn){var Ln=Nn[0].name;Ln&&(Xt="m-"+(Xt?Ln+" "+Xt:Ln))}if(!Et||zt!=Xt){for(;Pt<mn.start;)Pt=Math.min(mn.start,Pt+5e3),Ie(Pt,zt);zt=Xt}mn.start=mn.pos}for(;Pt<mn.pos;){var Si=Math.min(mn.pos,Pt+5e3);Ie(Si,zt),Pt=Si}}function to(re,de,Te){for(var ke,Ie,tt=re.doc,gt=Te?-1:de-(re.doc.mode.innerMode?1e3:100),Et=de;Et>gt;--Et){if(Et<=tt.first)return tt.first;var Pt=xn(tt,Et-1),zt=Pt.stateAfter;if(zt&&(!Te||Et+(zt instanceof ei?zt.lookAhead:0)<=tt.modeFrontier))return Et;var mn=st(Pt.text,null,re.options.tabSize);(Ie==null||ke>mn)&&(Ie=Et-1,ke=mn)}return Ie}function Yr(re,de){if(re.modeFrontier=Math.min(re.modeFrontier,de),!(re.highlightFrontier<de-10)){for(var Te=re.first,ke=de-1;ke>Te;ke--){var Ie=xn(re,ke).stateAfter;if(Ie&&(!(Ie instanceof ei)||ke+Ie.lookAhead<de)){Te=ke+1;break}}re.highlightFrontier=Math.min(re.highlightFrontier,Te)}}var Fo=!1,zn=!1;function ns(){Fo=!0}function Ut(){zn=!0}function en(re,de,Te){this.marker=re,this.from=de,this.to=Te}function jn(re,de){if(re)for(var Te=0;Te<re.length;++Te){var ke=re[Te];if(ke.marker==de)return ke}}function Ft(re,de){for(var Te,ke=0;ke<re.length;++ke)re[ke]!=de&&(Te||(Te=[])).push(re[ke]);return Te}function Yt(re,de){re.markedSpans=re.markedSpans?re.markedSpans.concat([de]):[de],de.marker.attachLine(re)}function nn(re,de,Te){var ke;if(re)for(var Ie=0;Ie<re.length;++Ie){var tt=re[Ie],gt=tt.marker,Et=tt.from==null||(gt.inclusiveLeft?tt.from<=de:tt.from<de);if(Et||tt.from==de&>.type=="bookmark"&&(!Te||!tt.marker.insertLeft)){var Pt=tt.to==null||(gt.inclusiveRight?tt.to>=de:tt.to>de);(ke||(ke=[])).push(new en(gt,tt.from,Pt?null:tt.to))}}return ke}function yn(re,de,Te){var ke;if(re)for(var Ie=0;Ie<re.length;++Ie){var tt=re[Ie],gt=tt.marker,Et=tt.to==null||(gt.inclusiveRight?tt.to>=de:tt.to>de);if(Et||tt.from==de&>.type=="bookmark"&&(!Te||tt.marker.insertLeft)){var Pt=tt.from==null||(gt.inclusiveLeft?tt.from<=de:tt.from<de);(ke||(ke=[])).push(new en(gt,Pt?null:tt.from-de,tt.to==null?null:tt.to-de))}}return ke}function Xn(re,de){if(de.full)return null;var Te=vi(re,de.from.line)&&xn(re,de.from.line).markedSpans,ke=vi(re,de.to.line)&&xn(re,de.to.line).markedSpans;if(!Te&&!ke)return null;var Ie=de.from.ch,tt=de.to.ch,gt=qn(de.from,de.to)==0,Et=nn(Te,Ie,gt),Pt=yn(ke,tt,gt),zt=de.text.length==1,mn=on(de.text).length+(zt?Ie:0);if(Et)for(var Xt=0;Xt<Et.length;++Xt){var Nn=Et[Xt];if(Nn.to==null){var Ln=jn(Pt,Nn.marker);Ln?zt&&(Nn.to=Ln.to==null?null:Ln.to+mn):Nn.to=Ie}}if(Pt)for(var Si=0;Si<Pt.length;++Si){var Li=Pt[Si];if(Li.to!=null&&(Li.to+=mn),Li.from==null){var Bi=jn(Et,Li.marker);Bi||(Li.from=mn,zt&&(Et||(Et=[])).push(Li))}else Li.from+=mn,zt&&(Et||(Et=[])).push(Li)}Et&&(Et=yi(Et)),Pt&&Pt!=Et&&(Pt=yi(Pt));var cr=[Et];if(!zt){var Ir=de.text.length-2,Pr;if(Ir>0&&Et)for(var Wr=0;Wr<Et.length;++Wr)Et[Wr].to==null&&(Pr||(Pr=[])).push(new en(Et[Wr].marker,null,null));for(var No=0;No<Ir;++No)cr.push(Pr);cr.push(Pt)}return cr}function yi(re){for(var de=0;de<re.length;++de){var Te=re[de];Te.from!=null&&Te.from==Te.to&&Te.marker.clearWhenEmpty!==!1&&re.splice(de--,1)}return re.length?re:null}function gi(re,de,Te){var ke=null;if(re.iter(de.line,Te.line+1,function(Ln){if(Ln.markedSpans)for(var Si=0;Si<Ln.markedSpans.length;++Si){var Li=Ln.markedSpans[Si].marker;Li.readOnly&&(!ke||lt(ke,Li)==-1)&&(ke||(ke=[])).push(Li)}}),!ke)return null;for(var Ie=[{from:de,to:Te}],tt=0;tt<ke.length;++tt)for(var gt=ke[tt],Et=gt.find(0),Pt=0;Pt<Ie.length;++Pt){var zt=Ie[Pt];if(!(qn(zt.to,Et.from)<0||qn(zt.from,Et.to)>0)){var mn=[Pt,1],Xt=qn(zt.from,Et.from),Nn=qn(zt.to,Et.to);(Xt<0||!gt.inclusiveLeft&&!Xt)&&mn.push({from:zt.from,to:Et.from}),(Nn>0||!gt.inclusiveRight&&!Nn)&&mn.push({from:Et.to,to:zt.to}),Ie.splice.apply(Ie,mn),Pt+=mn.length-3}}return Ie}function Dn(re){var de=re.markedSpans;if(de){for(var Te=0;Te<de.length;++Te)de[Te].marker.detachLine(re);re.markedSpans=null}}function vt(re,de){if(de){for(var Te=0;Te<de.length;++Te)de[Te].marker.attachLine(re);re.markedSpans=de}}function Sr(re){return re.inclusiveLeft?-1:0}function Er(re){return re.inclusiveRight?1:0}function no(re,de){var Te=re.lines.length-de.lines.length;if(Te!=0)return Te;var ke=re.find(),Ie=de.find(),tt=qn(ke.from,Ie.from)||Sr(re)-Sr(de);if(tt)return-tt;var gt=qn(ke.to,Ie.to)||Er(re)-Er(de);return gt||de.id-re.id}function io(re,de){var Te=zn&&re.markedSpans,ke;if(Te)for(var Ie=void 0,tt=0;tt<Te.length;++tt)Ie=Te[tt],Ie.marker.collapsed&&(de?Ie.from:Ie.to)==null&&(!ke||no(ke,Ie.marker)<0)&&(ke=Ie.marker);return ke}function ro(re){return io(re,!0)}function zr(re){return io(re,!1)}function Go(re,de){var Te=zn&&re.markedSpans,ke;if(Te)for(var Ie=0;Ie<Te.length;++Ie){var tt=Te[Ie];tt.marker.collapsed&&(tt.from==null||tt.from<de)&&(tt.to==null||tt.to>de)&&(!ke||no(ke,tt.marker)<0)&&(ke=tt.marker)}return ke}function co(re,de,Te,ke,Ie){var tt=xn(re,de),gt=zn&&tt.markedSpans;if(gt)for(var Et=0;Et<gt.length;++Et){var Pt=gt[Et];if(Pt.marker.collapsed){var zt=Pt.marker.find(0),mn=qn(zt.from,Te)||Sr(Pt.marker)-Sr(Ie),Xt=qn(zt.to,ke)||Er(Pt.marker)-Er(Ie);if(!(mn>=0&&Xt<=0||mn<=0&&Xt>=0)&&(mn<=0&&(Pt.marker.inclusiveRight&&Ie.inclusiveLeft?qn(zt.to,Te)>=0:qn(zt.to,Te)>0)||mn>=0&&(Pt.marker.inclusiveRight&&Ie.inclusiveLeft?qn(zt.from,ke)<=0:qn(zt.from,ke)<0)))return!0}}}function br(re){for(var de;de=ro(re);)re=de.find(-1,!0).line;return re}function ir(re){for(var de;de=zr(re);)re=de.find(1,!0).line;return re}function Pi(re){for(var de,Te;de=zr(re);)re=de.find(1,!0).line,(Te||(Te=[])).push(re);return Te}function ui(re,de){var Te=xn(re,de),ke=br(Te);return Te==ke?de:rn(ke)}function Di(re,de){if(de>re.lastLine())return de;var Te=xn(re,de),ke;if(!Sn(re,Te))return de;for(;ke=zr(Te);)Te=ke.find(1,!0).line;return rn(Te)+1}function Sn(re,de){var Te=zn&&de.markedSpans;if(Te){for(var ke=void 0,Ie=0;Ie<Te.length;++Ie)if(ke=Te[Ie],!!ke.marker.collapsed){if(ke.from==null)return!0;if(!ke.marker.widgetNode&&ke.from==0&&ke.marker.inclusiveLeft&&ji(re,de,ke))return!0}}}function ji(re,de,Te){if(Te.to==null){var ke=Te.marker.find(1,!0);return ji(re,ke.line,jn(ke.line.markedSpans,Te.marker))}if(Te.marker.inclusiveRight&&Te.to==de.text.length)return!0;for(var Ie=void 0,tt=0;tt<de.markedSpans.length;++tt)if(Ie=de.markedSpans[tt],Ie.marker.collapsed&&!Ie.marker.widgetNode&&Ie.from==Te.to&&(Ie.to==null||Ie.to!=Te.from)&&(Ie.marker.inclusiveLeft||Te.marker.inclusiveRight)&&ji(re,de,Ie))return!0}function Wi(re){re=br(re);for(var de=0,Te=re.parent,ke=0;ke<Te.lines.length;++ke){var Ie=Te.lines[ke];if(Ie==re)break;de+=Ie.height}for(var tt=Te.parent;tt;Te=tt,tt=Te.parent)for(var gt=0;gt<tt.children.length;++gt){var Et=tt.children[gt];if(Et==Te)break;de+=Et.height}return de}function Ur(re){if(re.height==0)return 0;for(var de=re.text.length,Te,ke=re;Te=ro(ke);){var Ie=Te.find(0,!0);ke=Ie.from.line,de+=Ie.from.ch-Ie.to.ch}for(ke=re;Te=zr(ke);){var tt=Te.find(0,!0);de-=ke.text.length-tt.from.ch,ke=tt.to.line,de+=ke.text.length-tt.to.ch}return de}function Xr(re){var de=re.display,Te=re.doc;de.maxLine=xn(Te,Te.first),de.maxLineLength=Ur(de.maxLine),de.maxLineChanged=!0,Te.iter(function(ke){var Ie=Ur(ke);Ie>de.maxLineLength&&(de.maxLineLength=Ie,de.maxLine=ke)})}var Jr=function(re,de,Te){this.text=re,vt(this,de),this.height=Te?Te(this):1};Jr.prototype.lineNo=function(){return rn(this)},Qi(Jr);function xo(re,de,Te,ke){re.text=de,re.stateAfter&&(re.stateAfter=null),re.styles&&(re.styles=null),re.order!=null&&(re.order=null),Dn(re),vt(re,Te);var Ie=ke?ke(re):1;Ie!=re.height&&Bn(re,Ie)}function Qo(re){re.parent=null,Dn(re)}var Wo={},_s={};function As(re,de){if(!re||/^\s*$/.test(re))return null;var Te=de.addModeClass?_s:Wo;return Te[re]||(Te[re]=re.replace(/\S+/g,"cm-$&"))}function pn(re,de){var Te=$e("span",null,null,be?"padding-right: .1px":null),ke={pre:$e("pre",[Te],"CodeMirror-line"),content:Te,col:0,pos:0,cm:re,trailingSpace:!1,splitSpaces:re.getOption("lineWrapping")};de.measure={};for(var Ie=0;Ie<=(de.rest?de.rest.length:0);Ie++){var tt=Ie?de.rest[Ie-1]:de.line,gt=void 0;ke.pos=0,ke.addToken=ps,or(re.display.measure)&&(gt=vn(tt,re.doc.direction))&&(ke.addToken=mo(ke.addToken,gt)),ke.map=[];var Et=de!=re.display.externalMeasured&&rn(tt);Ss(tt,ke,cs(re,tt,Et)),tt.styleClasses&&(tt.styleClasses.bgClass&&(ke.bgClass=ct(tt.styleClasses.bgClass,ke.bgClass||"")),tt.styleClasses.textClass&&(ke.textClass=ct(tt.styleClasses.textClass,ke.textClass||""))),ke.map.length==0&&ke.map.push(0,0,ke.content.appendChild(Cr(re.display.measure))),Ie==0?(de.measure.map=ke.map,de.measure.cache={}):((de.measure.maps||(de.measure.maps=[])).push(ke.map),(de.measure.caches||(de.measure.caches=[])).push({}))}if(be){var Pt=ke.content.lastChild;(/\bcm-tab\b/.test(Pt.className)||Pt.querySelector&&Pt.querySelector(".cm-tab"))&&(ke.content.className="cm-tab-wrap-hack")}return si(re,"renderLine",re,de.line,ke.pre),ke.pre.className&&(ke.textClass=ct(ke.pre.className,ke.textClass||"")),ke}function ss(re){var de=We("span","\u2022","cm-invalidchar");return de.title="\\u"+re.charCodeAt(0).toString(16),de.setAttribute("aria-label",de.title),de}function ps(re,de,Te,ke,Ie,tt,gt){if(de){var Et=re.splitSpaces?Ts(de,re.trailingSpace):de,Pt=re.cm.state.specialChars,zt=!1,mn;if(!Pt.test(de))re.col+=de.length,mn=document.createTextNode(Et),re.map.push(re.pos,re.pos+de.length,mn),Ee&&me<9&&(zt=!0),re.pos+=de.length;else{mn=document.createDocumentFragment();for(var Xt=0;;){Pt.lastIndex=Xt;var Nn=Pt.exec(de),Ln=Nn?Nn.index-Xt:de.length-Xt;if(Ln){var Si=document.createTextNode(Et.slice(Xt,Xt+Ln));Ee&&me<9?mn.appendChild(We("span",[Si])):mn.appendChild(Si),re.map.push(re.pos,re.pos+Ln,Si),re.col+=Ln,re.pos+=Ln}if(!Nn)break;Xt+=Ln+1;var Li=void 0;if(Nn[0]==" "){var Bi=re.cm.options.tabSize,cr=Bi-re.col%Bi;Li=mn.appendChild(We("span",Dt(cr),"cm-tab")),Li.setAttribute("role","presentation"),Li.setAttribute("cm-text"," "),re.col+=cr}else Nn[0]=="\r"||Nn[0]==`
|
|
|
`?(Li=mn.appendChild(We("span",Nn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Li.setAttribute("cm-text",Nn[0]),re.col+=1):(Li=re.cm.options.specialCharPlaceholder(Nn[0]),Li.setAttribute("cm-text",Nn[0]),Ee&&me<9?mn.appendChild(We("span",[Li])):mn.appendChild(Li),re.col+=1);re.map.push(re.pos,re.pos+1,Li),re.pos++}}if(re.trailingSpace=Et.charCodeAt(de.length-1)==32,Te||ke||Ie||zt||tt||gt){var Ir=Te||"";ke&&(Ir+=ke),Ie&&(Ir+=Ie);var Pr=We("span",[mn],Ir,tt);if(gt)for(var Wr in gt)gt.hasOwnProperty(Wr)&&Wr!="style"&&Wr!="class"&&Pr.setAttribute(Wr,gt[Wr]);return re.content.appendChild(Pr)}re.content.appendChild(mn)}}function Ts(re,de){if(re.length>1&&!/ /.test(re))return re;for(var Te=de,ke="",Ie=0;Ie<re.length;Ie++){var tt=re.charAt(Ie);tt==" "&&Te&&(Ie==re.length-1||re.charCodeAt(Ie+1)==32)&&(tt="\xA0"),ke+=tt,Te=tt==" "}return ke}function mo(re,de){return function(Te,ke,Ie,tt,gt,Et,Pt){Ie=Ie?Ie+" cm-force-border":"cm-force-border";for(var zt=Te.pos,mn=zt+ke.length;;){for(var Xt=void 0,Nn=0;Nn<de.length&&(Xt=de[Nn],!(Xt.to>zt&&Xt.from<=zt));Nn++);if(Xt.to>=mn)return re(Te,ke,Ie,tt,gt,Et,Pt);re(Te,ke.slice(0,Xt.to-zt),Ie,tt,null,Et,Pt),tt=null,ke=ke.slice(Xt.to-zt),zt=Xt.to}}}function Ns(re,de,Te,ke){var Ie=!ke&&Te.widgetNode;Ie&&re.map.push(re.pos,re.pos+de,Ie),!ke&&re.cm.display.input.needsContentAttribute&&(Ie||(Ie=re.content.appendChild(document.createElement("span"))),Ie.setAttribute("cm-marker",Te.id)),Ie&&(re.cm.display.input.setUneditable(Ie),re.content.appendChild(Ie)),re.pos+=de,re.trailingSpace=!1}function Ss(re,de,Te){var ke=re.markedSpans,Ie=re.text,tt=0;if(!ke){for(var gt=1;gt<Te.length;gt+=2)de.addToken(de,Ie.slice(tt,tt=Te[gt]),As(Te[gt+1],de.cm.options));return}for(var Et=Ie.length,Pt=0,zt=1,mn="",Xt,Nn,Ln=0,Si,Li,Bi,cr,Ir;;){if(Ln==Pt){Si=Li=Bi=Nn="",Ir=null,cr=null,Ln=1/0;for(var Pr=[],Wr=void 0,No=0;No<ke.length;++No){var wr=ke[No],ts=wr.marker;if(ts.type=="bookmark"&&wr.from==Pt&&ts.widgetNode)Pr.push(ts);else if(wr.from<=Pt&&(wr.to==null||wr.to>Pt||ts.collapsed&&wr.to==Pt&&wr.from==Pt)){if(wr.to!=null&&wr.to!=Pt&&Ln>wr.to&&(Ln=wr.to,Li=""),ts.className&&(Si+=" "+ts.className),ts.css&&(Nn=(Nn?Nn+";":"")+ts.css),ts.startStyle&&wr.from==Pt&&(Bi+=" "+ts.startStyle),ts.endStyle&&wr.to==Ln&&(Wr||(Wr=[])).push(ts.endStyle,wr.to),ts.title&&((Ir||(Ir={})).title=ts.title),ts.attributes)for(var da in ts.attributes)(Ir||(Ir={}))[da]=ts.attributes[da];ts.collapsed&&(!cr||no(cr.marker,ts)<0)&&(cr=wr)}else wr.from>Pt&&Ln>wr.from&&(Ln=wr.from)}if(Wr)for(var il=0;il<Wr.length;il+=2)Wr[il+1]==Ln&&(Li+=" "+Wr[il]);if(!cr||cr.from==Pt)for(var wa=0;wa<Pr.length;++wa)Ns(de,0,Pr[wa]);if(cr&&(cr.from||0)==Pt){if(Ns(de,(cr.to==null?Et+1:cr.to)-Pt,cr.marker,cr.from==null),cr.to==null)return;cr.to==Pt&&(cr=!1)}}if(Pt>=Et)break;for(var ou=Math.min(Et,Ln);;){if(mn){var Il=Pt+mn.length;if(!cr){var Va=Il>ou?mn.slice(0,ou-Pt):mn;de.addToken(de,Va,Xt?Xt+Si:Si,Bi,Pt+Va.length==Ln?Li:"",Nn,Ir)}if(Il>=ou){mn=mn.slice(ou-Pt),Pt=ou;break}Pt=Il,Bi=""}mn=Ie.slice(tt,tt=Te[zt++]),Xt=As(Te[zt++],de.cm.options)}}}function Us(re,de,Te){this.line=de,this.rest=Pi(de),this.size=this.rest?rn(on(this.rest))-Te+1:1,this.node=this.text=null,this.hidden=Sn(re,de)}function fo(re,de,Te){for(var ke=[],Ie,tt=de;tt<Te;tt=Ie){var gt=new Us(re.doc,xn(re.doc,tt),tt);Ie=tt+gt.size,ke.push(gt)}return ke}var Co=null;function pr(re){Co?Co.ops.push(re):re.ownsGroup=Co={ops:[re],delayedCallbacks:[]}}function Gr(re){var de=re.delayedCallbacks,Te=0;do{for(;Te<de.length;Te++)de[Te].call(null);for(var ke=0;ke<re.ops.length;ke++){var Ie=re.ops[ke];if(Ie.cursorActivityHandlers)for(;Ie.cursorActivityCalled<Ie.cursorActivityHandlers.length;)Ie.cursorActivityHandlers[Ie.cursorActivityCalled++].call(null,Ie.cm)}}while(Te<de.length)}function po(re,de){var Te=re.ownsGroup;if(Te)try{Gr(Te)}finally{Co=null,de(Te)}}var Ro=null;function Ei(re,de){var Te=hi(re,de);if(Te.length){var ke=Array.prototype.slice.call(arguments,2),Ie;Co?Ie=Co.delayedCallbacks:Ro?Ie=Ro:(Ie=Ro=[],setTimeout(ms,0));for(var tt=function(Et){Ie.push(function(){return Te[Et].apply(null,ke)})},gt=0;gt<Te.length;++gt)tt(gt)}}function ms(){var re=Ro;Ro=null;for(var de=0;de<re.length;++de)re[de]()}function hs(re,de,Te,ke){for(var Ie=0;Ie<de.changes.length;Ie++){var tt=de.changes[Ie];tt=="text"?di(re,de):tt=="gutter"?Ls(re,de,Te,ke):tt=="class"?xs(re,de):tt=="widget"&&ga(re,de,ke)}de.changes=null}function ds(re){return re.node==re.text&&(re.node=We("div",null,null,"position: relative"),re.text.parentNode&&re.text.parentNode.replaceChild(re.node,re.text),re.node.appendChild(re.text),Ee&&me<8&&(re.node.style.zIndex=2)),re.node}function ia(re,de){var Te=de.bgClass?de.bgClass+" "+(de.line.bgClass||""):de.line.bgClass;if(Te&&(Te+=" CodeMirror-linebackground"),de.background)Te?de.background.className=Te:(de.background.parentNode.removeChild(de.background),de.background=null);else if(Te){var ke=ds(de);de.background=ke.insertBefore(We("div",null,Te),ke.firstChild),re.display.input.setUneditable(de.background)}}function ra(re,de){var Te=re.display.externalMeasured;return Te&&Te.line==de.line?(re.display.externalMeasured=null,de.measure=Te.measure,Te.built):pn(re,de)}function di(re,de){var Te=de.text.className,ke=ra(re,de);de.text==de.node&&(de.node=ke.pre),de.text.parentNode.replaceChild(ke.pre,de.text),de.text=ke.pre,ke.bgClass!=de.bgClass||ke.textClass!=de.textClass?(de.bgClass=ke.bgClass,de.textClass=ke.textClass,xs(re,de)):Te&&(de.text.className=Te)}function xs(re,de){ia(re,de),de.line.wrapClass?ds(de).className=de.line.wrapClass:de.node!=de.text&&(de.node.className="");var Te=de.textClass?de.textClass+" "+(de.line.textClass||""):de.line.textClass;de.text.className=Te||""}function Ls(re,de,Te,ke){if(de.gutter&&(de.node.removeChild(de.gutter),de.gutter=null),de.gutterBackground&&(de.node.removeChild(de.gutterBackground),de.gutterBackground=null),de.line.gutterClass){var Ie=ds(de);de.gutterBackground=We("div",null,"CodeMirror-gutter-background "+de.line.gutterClass,"left: "+(re.options.fixedGutter?ke.fixedPos:-ke.gutterTotalWidth)+"px; width: "+ke.gutterTotalWidth+"px"),re.display.input.setUneditable(de.gutterBackground),Ie.insertBefore(de.gutterBackground,de.text)}var tt=de.line.gutterMarkers;if(re.options.lineNumbers||tt){var gt=ds(de),Et=de.gutter=We("div",null,"CodeMirror-gutter-wrapper","left: "+(re.options.fixedGutter?ke.fixedPos:-ke.gutterTotalWidth)+"px");if(re.display.input.setUneditable(Et),gt.insertBefore(Et,de.text),de.line.gutterClass&&(Et.className+=" "+de.line.gutterClass),re.options.lineNumbers&&(!tt||!tt["CodeMirror-linenumbers"])&&(de.lineNumber=Et.appendChild(We("div",_i(re.options,Te),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+ke.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+re.display.lineNumInnerWidth+"px"))),tt)for(var Pt=0;Pt<re.display.gutterSpecs.length;++Pt){var zt=re.display.gutterSpecs[Pt].className,mn=tt.hasOwnProperty(zt)&&tt[zt];mn&&Et.appendChild(We("div",[mn],"CodeMirror-gutter-elt","left: "+ke.gutterLeft[zt]+"px; width: "+ke.gutterWidth[zt]+"px"))}}}function ga(re,de,Te){de.alignable&&(de.alignable=null);for(var ke=Ce("CodeMirror-linewidget"),Ie=de.node.firstChild,tt=void 0;Ie;Ie=tt)tt=Ie.nextSibling,ke.test(Ie.className)&&de.node.removeChild(Ie);oa(re,de,Te)}function vs(re,de,Te,ke){var Ie=ra(re,de);return de.text=de.node=Ie.pre,Ie.bgClass&&(de.bgClass=Ie.bgClass),Ie.textClass&&(de.textClass=Ie.textClass),xs(re,de),Ls(re,de,Te,ke),oa(re,de,ke),de.node}function oa(re,de,Te){if(Hr(re,de.line,de,Te,!0),de.rest)for(var ke=0;ke<de.rest.length;ke++)Hr(re,de.rest[ke],de,Te,!1)}function Hr(re,de,Te,ke,Ie){if(de.widgets)for(var tt=ds(Te),gt=0,Et=de.widgets;gt<Et.length;++gt){var Pt=Et[gt],zt=We("div",[Pt.node],"CodeMirror-linewidget"+(Pt.className?" "+Pt.className:""));Pt.handleMouseEvents||zt.setAttribute("cm-ignore-events","true"),Xa(Pt,zt,Te,ke),re.display.input.setUneditable(zt),Ie&&Pt.above?tt.insertBefore(zt,Te.gutter||Te.text):tt.appendChild(zt),Ei(Pt,"redraw")}}function Xa(re,de,Te,ke){if(re.noHScroll){(Te.alignable||(Te.alignable=[])).push(de);var Ie=ke.wrapperWidth;de.style.left=ke.fixedPos+"px",re.coverGutter||(Ie-=ke.gutterTotalWidth,de.style.paddingLeft=ke.gutterTotalWidth+"px"),de.style.width=Ie+"px"}re.coverGutter&&(de.style.zIndex=5,de.style.position="relative",re.noHScroll||(de.style.marginLeft=-ke.gutterTotalWidth+"px"))}function Hs(re){if(re.height!=null)return re.height;var de=re.doc.cm;if(!de)return 0;if(!pt(document.body,re.node)){var Te="position: relative;";re.coverGutter&&(Te+="margin-left: -"+de.display.gutters.offsetWidth+"px;"),re.noHScroll&&(Te+="width: "+de.display.wrapper.clientWidth+"px;"),Re(de.display.measure,We("div",[re.node],null,Te))}return re.height=re.node.parentNode.offsetHeight}function Ks(re,de){for(var Te=vo(de);Te!=re.wrapper;Te=Te.parentNode)if(!Te||Te.nodeType==1&&Te.getAttribute("cm-ignore-events")=="true"||Te.parentNode==re.sizer&&Te!=re.mover)return!0}function ka(re){return re.lineSpace.offsetTop}function Hl(re){return re.mover.offsetHeight-re.lineSpace.offsetHeight}function cu(re){if(re.cachedPaddingH)return re.cachedPaddingH;var de=Re(re.measure,We("pre","x","CodeMirror-line-like")),Te=window.getComputedStyle?window.getComputedStyle(de):de.currentStyle,ke={left:parseInt(Te.paddingLeft),right:parseInt(Te.paddingRight)};return!isNaN(ke.left)&&!isNaN(ke.right)&&(re.cachedPaddingH=ke),ke}function Ta(re){return dt-re.display.nativeBarWidth}function al(re){return re.display.scroller.clientWidth-Ta(re)-re.display.barWidth}function fh(re){return re.display.scroller.clientHeight-Ta(re)-re.display.barHeight}function kh(re,de,Te){var ke=re.options.lineWrapping,Ie=ke&&al(re);if(!de.measure.heights||ke&&de.measure.width!=Ie){var tt=de.measure.heights=[];if(ke){de.measure.width=Ie;for(var gt=de.text.firstChild.getClientRects(),Et=0;Et<gt.length-1;Et++){var Pt=gt[Et],zt=gt[Et+1];Math.abs(Pt.bottom-zt.bottom)>2&&tt.push((Pt.bottom+zt.top)/2-Te.top)}}tt.push(Te.bottom-Te.top)}}function ph(re,de,Te){if(re.line==de)return{map:re.measure.map,cache:re.measure.cache};for(var ke=0;ke<re.rest.length;ke++)if(re.rest[ke]==de)return{map:re.measure.maps[ke],cache:re.measure.caches[ke]};for(var Ie=0;Ie<re.rest.length;Ie++)if(rn(re.rest[Ie])>Te)return{map:re.measure.maps[Ie],cache:re.measure.caches[Ie],before:!0}}function qh(re,de){de=br(de);var Te=rn(de),ke=re.display.externalMeasured=new Us(re.doc,de,Te);ke.lineN=Te;var Ie=ke.built=pn(re,ke);return ke.text=Ie.pre,Re(re.display.lineMeasure,Ie.pre),ke}function Ia(re,de,Te,ke){return Al(re,Tl(re,de),Te,ke)}function za(re,de){if(de>=re.display.viewFrom&&de<re.display.viewTo)return re.display.view[Dl(re,de)];var Te=re.display.externalMeasured;if(Te&&de>=Te.lineN&&de<Te.lineN+Te.size)return Te}function Tl(re,de){var Te=rn(de),ke=za(re,Te);ke&&!ke.text?ke=null:ke&&ke.changes&&(hs(re,ke,Te,ec(re)),re.curOp.forceUpdate=!0),ke||(ke=qh(re,de));var Ie=ph(ke,de,Te);return{line:de,view:ke,rect:null,map:Ie.map,cache:Ie.cache,before:Ie.before,hasHeights:!1}}function Al(re,de,Te,ke,Ie){de.before&&(Te=-1);var tt=Te+(ke||""),gt;return de.cache.hasOwnProperty(tt)?gt=de.cache[tt]:(de.rect||(de.rect=de.view.text.getBoundingClientRect()),de.hasHeights||(kh(re,de.view,de.rect),de.hasHeights=!0),gt=ma(re,de,Te,ke),gt.bogus||(de.cache[tt]=gt)),{left:gt.left,right:gt.right,top:Ie?gt.rtop:gt.top,bottom:Ie?gt.rbottom:gt.bottom}}var Gl={left:0,right:0,top:0,bottom:0};function Pc(re,de,Te){for(var ke,Ie,tt,gt,Et,Pt,zt=0;zt<re.length;zt+=3)if(Et=re[zt],Pt=re[zt+1],de<Et?(Ie=0,tt=1,gt="left"):de<Pt?(Ie=de-Et,tt=Ie+1):(zt==re.length-3||de==Pt&&re[zt+3]>de)&&(tt=Pt-Et,Ie=tt-1,de>=Pt&&(gt="right")),Ie!=null){if(ke=re[zt+2],Et==Pt&&Te==(ke.insertLeft?"left":"right")&&(gt=Te),Te=="left"&&Ie==0)for(;zt&&re[zt-2]==re[zt-3]&&re[zt-1].insertLeft;)ke=re[(zt-=3)+2],gt="left";if(Te=="right"&&Ie==Pt-Et)for(;zt<re.length-3&&re[zt+3]==re[zt+4]&&!re[zt+5].insertLeft;)ke=re[(zt+=3)+2],gt="right";break}return{node:ke,start:Ie,end:tt,collapse:gt,coverStart:Et,coverEnd:Pt}}function Cc(re,de){var Te=Gl;if(de=="left")for(var ke=0;ke<re.length&&(Te=re[ke]).left==Te.right;ke++);else for(var Ie=re.length-1;Ie>=0&&(Te=re[Ie]).left==Te.right;Ie--);return Te}function ma(re,de,Te,ke){var Ie=Pc(de.map,Te,ke),tt=Ie.node,gt=Ie.start,Et=Ie.end,Pt=Ie.collapse,zt;if(tt.nodeType==3){for(var mn=0;mn<4;mn++){for(;gt&&Be(de.line.text.charAt(Ie.coverStart+gt));)--gt;for(;Ie.coverStart+Et<Ie.coverEnd&&Be(de.line.text.charAt(Ie.coverStart+Et));)++Et;if(Ee&&me<9&>==0&&Et==Ie.coverEnd-Ie.coverStart?zt=tt.parentNode.getBoundingClientRect():zt=Cc(Je(tt,gt,Et).getClientRects(),ke),zt.left||zt.right||gt==0)break;Et=gt,gt=gt-1,Pt="right"}Ee&&me<11&&(zt=ff(re.display.measure,zt))}else{gt>0&&(Pt=ke="right");var Xt;re.options.lineWrapping&&(Xt=tt.getClientRects()).length>1?zt=Xt[ke=="right"?Xt.length-1:0]:zt=tt.getBoundingClientRect()}if(Ee&&me<9&&!gt&&(!zt||!zt.left&&!zt.right)){var Nn=tt.parentNode.getClientRects()[0];Nn?zt={left:Nn.left,right:Nn.left+Dh(re.display),top:Nn.top,bottom:Nn.bottom}:zt=Gl}for(var Ln=zt.top-de.rect.top,Si=zt.bottom-de.rect.top,Li=(Ln+Si)/2,Bi=de.view.measure.heights,cr=0;cr<Bi.length-1&&!(Li<Bi[cr]);cr++);var Ir=cr?Bi[cr-1]:0,Pr=Bi[cr],Wr={left:(Pt=="right"?zt.right:zt.left)-de.rect.left,right:(Pt=="left"?zt.left:zt.right)-de.rect.left,top:Ir,bottom:Pr};return!zt.left&&!zt.right&&(Wr.bogus=!0),re.options.singleCursorHeightPerLine||(Wr.rtop=Ln,Wr.rbottom=Si),Wr}function ff(re,de){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!zi(re))return de;var Te=screen.logicalXDPI/screen.deviceXDPI,ke=screen.logicalYDPI/screen.deviceYDPI;return{left:de.left*Te,right:de.right*Te,top:de.top*ke,bottom:de.bottom*ke}}function Dd(re){if(re.measure&&(re.measure.cache={},re.measure.heights=null,re.rest))for(var de=0;de<re.rest.length;de++)re.measure.caches[de]={}}function Qh(re){re.display.externalMeasure=null,Oe(re.display.lineMeasure);for(var de=0;de<re.display.view.length;de++)Dd(re.display.view[de])}function bu(re){Qh(re),re.display.cachedCharWidth=re.display.cachedTextHeight=re.display.cachedPaddingH=null,re.options.lineWrapping||(re.display.maxLineChanged=!0),re.display.lineNumChars=null}function Ja(){return we&&ee?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ua(){return we&&ee?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function xa(re){var de=0;if(re.widgets)for(var Te=0;Te<re.widgets.length;++Te)re.widgets[Te].above&&(de+=Hs(re.widgets[Te]));return de}function Aa(re,de,Te,ke,Ie){if(!Ie){var tt=xa(de);Te.top+=tt,Te.bottom+=tt}if(ke=="line")return Te;ke||(ke="local");var gt=Wi(de);if(ke=="local"?gt+=ka(re.display):gt-=re.display.viewOffset,ke=="page"||ke=="window"){var Et=re.display.lineSpace.getBoundingClientRect();gt+=Et.top+(ke=="window"?0:Ua());var Pt=Et.left+(ke=="window"?0:Ja());Te.left+=Pt,Te.right+=Pt}return Te.top+=gt,Te.bottom+=gt,Te}function Th(re,de,Te){if(Te=="div")return de;var ke=de.left,Ie=de.top;if(Te=="page")ke-=Ja(),Ie-=Ua();else if(Te=="local"||!Te){var tt=re.display.sizer.getBoundingClientRect();ke+=tt.left,Ie+=tt.top}var gt=re.display.lineSpace.getBoundingClientRect();return{left:ke-gt.left,top:Ie-gt.top}}function Nl(re,de,Te,ke,Ie){return ke||(ke=xn(re.doc,de.line)),Aa(re,ke,Ia(re,ke,de.ch,Ie),Te)}function Qs(re,de,Te,ke,Ie,tt){ke=ke||xn(re.doc,de.line),Ie||(Ie=Tl(re,ke));function gt(Si,Li){var Bi=Al(re,Ie,Si,Li?"right":"left",tt);return Li?Bi.left=Bi.right:Bi.right=Bi.left,Aa(re,ke,Bi,Te)}var Et=vn(ke,re.doc.direction),Pt=de.ch,zt=de.sticky;if(Pt>=ke.text.length?(Pt=ke.text.length,zt="before"):Pt<=0&&(Pt=0,zt="after"),!Et)return gt(zt=="before"?Pt-1:Pt,zt=="before");function mn(Si,Li,Bi){var cr=Et[Li],Ir=cr.level==1;return gt(Bi?Si-1:Si,Ir!=Bi)}var Xt=mt(Et,Pt,zt),Nn=Xe,Ln=mn(Pt,Xt,zt=="before");return Nn!=null&&(Ln.other=mn(Pt,Nn,zt!="before")),Ln}function Ah(re,de){var Te=0;de=li(re.doc,de),re.options.lineWrapping||(Te=Dh(re.display)*de.ch);var ke=xn(re.doc,de.line),Ie=Wi(ke)+ka(re.display);return{left:Te,right:Te,top:Ie,bottom:Ie+ke.height}}function $h(re,de,Te,ke,Ie){var tt=cn(re,de,Te);return tt.xRel=Ie,ke&&(tt.outside=ke),tt}function Nh(re,de,Te){var ke=re.doc;if(Te+=re.display.viewOffset,Te<0)return $h(ke.first,0,null,-1,-1);var Ie=Fn(ke,Te),tt=ke.first+ke.size-1;if(Ie>tt)return $h(ke.first+ke.size-1,xn(ke,tt).text.length,null,1,1);de<0&&(de=0);for(var gt=xn(ke,Ie);;){var Et=Kn(re,gt,Ie,de,Te),Pt=Go(gt,Et.ch+(Et.xRel>0||Et.outside>0?1:0));if(!Pt)return Et;var zt=Pt.find(1);if(zt.line==Ie)return zt;gt=xn(ke,Ie=zt.line)}}function xr(re,de,Te,ke){ke-=xa(de);var Ie=de.text.length,tt=rt(function(gt){return Al(re,Te,gt-1).bottom<=ke},Ie,0);return Ie=rt(function(gt){return Al(re,Te,gt).top>ke},tt,Ie),{begin:tt,end:Ie}}function ed(re,de,Te,ke){Te||(Te=Tl(re,de));var Ie=Aa(re,de,Al(re,Te,ke),"line").top;return xr(re,de,Te,Ie)}function tn(re,de,Te,ke){return re.bottom<=Te?!1:re.top>Te?!0:(ke?re.left:re.right)>de}function Kn(re,de,Te,ke,Ie){Ie-=Wi(de);var tt=Tl(re,de),gt=xa(de),Et=0,Pt=de.text.length,zt=!0,mn=vn(de,re.doc.direction);if(mn){var Xt=(re.options.lineWrapping?td:Od)(re,de,Te,tt,mn,ke,Ie);zt=Xt.level!=1,Et=zt?Xt.from:Xt.to-1,Pt=zt?Xt.to:Xt.from-1}var Nn=null,Ln=null,Si=rt(function(No){var wr=Al(re,tt,No);return wr.top+=gt,wr.bottom+=gt,tn(wr,ke,Ie,!1)?(wr.top<=Ie&&wr.left<=ke&&(Nn=No,Ln=wr),!0):!1},Et,Pt),Li,Bi,cr=!1;if(Ln){var Ir=ke-Ln.left<Ln.right-ke,Pr=Ir==zt;Si=Nn+(Pr?0:1),Bi=Pr?"after":"before",Li=Ir?Ln.left:Ln.right}else{!zt&&(Si==Pt||Si==Et)&&Si++,Bi=Si==0?"after":Si==de.text.length?"before":Al(re,tt,Si-(zt?1:0)).bottom+gt<=Ie==zt?"after":"before";var Wr=Qs(re,cn(Te,Si,Bi),"line",de,tt);Li=Wr.left,cr=Ie<Wr.top?-1:Ie>=Wr.bottom?1:0}return Si=Ue(de.text,Si,1),$h(Te,Si,Bi,cr,ke-Li)}function Od(re,de,Te,ke,Ie,tt,gt){var Et=rt(function(Xt){var Nn=Ie[Xt],Ln=Nn.level!=1;return tn(Qs(re,cn(Te,Ln?Nn.to:Nn.from,Ln?"before":"after"),"line",de,ke),tt,gt,!0)},0,Ie.length-1),Pt=Ie[Et];if(Et>0){var zt=Pt.level!=1,mn=Qs(re,cn(Te,zt?Pt.from:Pt.to,zt?"after":"before"),"line",de,ke);tn(mn,tt,gt,!0)&&mn.top>gt&&(Pt=Ie[Et-1])}return Pt}function td(re,de,Te,ke,Ie,tt,gt){var Et=xr(re,de,ke,gt),Pt=Et.begin,zt=Et.end;/\s/.test(de.text.charAt(zt-1))&&zt--;for(var mn=null,Xt=null,Nn=0;Nn<Ie.length;Nn++){var Ln=Ie[Nn];if(!(Ln.from>=zt||Ln.to<=Pt)){var Si=Ln.level!=1,Li=Al(re,ke,Si?Math.min(zt,Ln.to)-1:Math.max(Pt,Ln.from)).right,Bi=Li<tt?tt-Li+1e9:Li-tt;(!mn||Xt>Bi)&&(mn=Ln,Xt=Bi)}}return mn||(mn=Ie[Ie.length-1]),mn.from<Pt&&(mn={from:Pt,to:mn.to,level:mn.level}),mn.to>zt&&(mn={from:mn.from,to:zt,level:mn.level}),mn}var Pu;function Cu(re){if(re.cachedTextHeight!=null)return re.cachedTextHeight;if(Pu==null){Pu=We("pre",null,"CodeMirror-line-like");for(var de=0;de<49;++de)Pu.appendChild(document.createTextNode("x")),Pu.appendChild(We("br"));Pu.appendChild(document.createTextNode("x"))}Re(re.measure,Pu);var Te=Pu.offsetHeight/50;return Te>3&&(re.cachedTextHeight=Te),Oe(re.measure),Te||1}function Dh(re){if(re.cachedCharWidth!=null)return re.cachedCharWidth;var de=We("span","xxxxxxxxxx"),Te=We("pre",[de],"CodeMirror-line-like");Re(re.measure,Te);var ke=de.getBoundingClientRect(),Ie=(ke.right-ke.left)/10;return Ie>2&&(re.cachedCharWidth=Ie),Ie||10}function ec(re){for(var de=re.display,Te={},ke={},Ie=de.gutters.clientLeft,tt=de.gutters.firstChild,gt=0;tt;tt=tt.nextSibling,++gt){var Et=re.display.gutterSpecs[gt].className;Te[Et]=tt.offsetLeft+tt.clientLeft+Ie,ke[Et]=tt.clientWidth}return{fixedPos:gh(de),gutterTotalWidth:de.gutters.offsetWidth,gutterLeft:Te,gutterWidth:ke,wrapperWidth:de.wrapper.clientWidth}}function gh(re){return re.scroller.getBoundingClientRect().left-re.sizer.getBoundingClientRect().left}function Gs(re){var de=Cu(re.display),Te=re.options.lineWrapping,ke=Te&&Math.max(5,re.display.scroller.clientWidth/Dh(re.display)-3);return function(Ie){if(Sn(re.doc,Ie))return 0;var tt=0;if(Ie.widgets)for(var gt=0;gt<Ie.widgets.length;gt++)Ie.widgets[gt].height&&(tt+=Ie.widgets[gt].height);return Te?tt+(Math.ceil(Ie.text.length/ke)||1)*de:tt+de}}function Kr(re){var de=re.doc,Te=Gs(re);de.iter(function(ke){var Ie=Te(ke);Ie!=ke.height&&Bn(ke,Ie)})}function qa(re,de,Te,ke){var Ie=re.display;if(!Te&&vo(de).getAttribute("cm-not-content")=="true")return null;var tt,gt,Et=Ie.lineSpace.getBoundingClientRect();try{tt=de.clientX-Et.left,gt=de.clientY-Et.top}catch(Xt){return null}var Pt=Nh(re,tt,gt),zt;if(ke&&Pt.xRel>0&&(zt=xn(re.doc,Pt.line).text).length==Pt.ch){var mn=st(zt,zt.length,re.options.tabSize)-zt.length;Pt=cn(Pt.line,Math.max(0,Math.round((tt-cu(re.display).left)/Dh(re.display))-mn))}return Pt}function Dl(re,de){if(de>=re.display.viewTo||(de-=re.display.viewFrom,de<0))return null;for(var Te=re.display.view,ke=0;ke<Te.length;ke++)if(de-=Te[ke].size,de<0)return ke}function Ds(re,de,Te,ke){de==null&&(de=re.doc.first),Te==null&&(Te=re.doc.first+re.doc.size),ke||(ke=0);var Ie=re.display;if(ke&&Te<Ie.viewTo&&(Ie.updateLineNumbers==null||Ie.updateLineNumbers>de)&&(Ie.updateLineNumbers=de),re.curOp.viewChanged=!0,de>=Ie.viewTo)zn&&ui(re.doc,de)<Ie.viewTo&&la(re);else if(Te<=Ie.viewFrom)zn&&Di(re.doc,Te+ke)>Ie.viewFrom?la(re):(Ie.viewFrom+=ke,Ie.viewTo+=ke);else if(de<=Ie.viewFrom&&Te>=Ie.viewTo)la(re);else if(de<=Ie.viewFrom){var tt=Qa(re,Te,Te+ke,1);tt?(Ie.view=Ie.view.slice(tt.index),Ie.viewFrom=tt.lineN,Ie.viewTo+=ke):la(re)}else if(Te>=Ie.viewTo){var gt=Qa(re,de,de,-1);gt?(Ie.view=Ie.view.slice(0,gt.index),Ie.viewTo=gt.lineN):la(re)}else{var Et=Qa(re,de,de,-1),Pt=Qa(re,Te,Te+ke,1);Et&&Pt?(Ie.view=Ie.view.slice(0,Et.index).concat(fo(re,Et.lineN,Pt.lineN)).concat(Ie.view.slice(Pt.index)),Ie.viewTo+=ke):la(re)}var zt=Ie.externalMeasured;zt&&(Te<zt.lineN?zt.lineN+=ke:de<zt.lineN+zt.size&&(Ie.externalMeasured=null))}function zo(re,de,Te){re.curOp.viewChanged=!0;var ke=re.display,Ie=re.display.externalMeasured;if(Ie&&de>=Ie.lineN&&de<Ie.lineN+Ie.size&&(ke.externalMeasured=null),!(de<ke.viewFrom||de>=ke.viewTo)){var tt=ke.view[Dl(re,de)];if(tt.node!=null){var gt=tt.changes||(tt.changes=[]);lt(gt,Te)==-1&>.push(Te)}}}function la(re){re.display.viewFrom=re.display.viewTo=re.doc.first,re.display.view=[],re.display.viewOffset=0}function Qa(re,de,Te,ke){var Ie=Dl(re,de),tt,gt=re.display.view;if(!zn||Te==re.doc.first+re.doc.size)return{index:Ie,lineN:Te};for(var Et=re.display.viewFrom,Pt=0;Pt<Ie;Pt++)Et+=gt[Pt].size;if(Et!=de){if(ke>0){if(Ie==gt.length-1)return null;tt=Et+gt[Ie].size-de,Ie++}else tt=Et-de;de+=tt,Te+=tt}for(;ui(re.doc,Te)!=Te;){if(Ie==(ke<0?0:gt.length-1))return null;Te+=ke*gt[Ie-(ke<0?1:0)].size,Ie+=ke}return{index:Ie,lineN:Te}}function is(re,de,Te){var ke=re.display,Ie=ke.view;Ie.length==0||de>=ke.viewTo||Te<=ke.viewFrom?(ke.view=fo(re,de,Te),ke.viewFrom=de):(ke.viewFrom>de?ke.view=fo(re,de,ke.viewFrom).concat(ke.view):ke.viewFrom<de&&(ke.view=ke.view.slice(Dl(re,de))),ke.viewFrom=de,ke.viewTo<Te?ke.view=ke.view.concat(fo(re,ke.viewTo,Te)):ke.viewTo>Te&&(ke.view=ke.view.slice(0,Dl(re,Te)))),ke.viewTo=Te}function wl(re){for(var de=re.display.view,Te=0,ke=0;ke<de.length;ke++){var Ie=de[ke];!Ie.hidden&&(!Ie.node||Ie.changes)&&++Te}return Te}function sa(re){re.display.input.showSelection(re.display.input.prepareSelection())}function $u(re,de){de===void 0&&(de=!0);for(var Te=re.doc,ke={},Ie=ke.cursors=document.createDocumentFragment(),tt=ke.selection=document.createDocumentFragment(),gt=0;gt<Te.sel.ranges.length;gt++)if(!(!de&>==Te.sel.primIndex)){var Et=Te.sel.ranges[gt];if(!(Et.from().line>=re.display.viewTo||Et.to().line<re.display.viewFrom)){var Pt=Et.empty();(Pt||re.options.showCursorWhenSelecting)&&rs(re,Et.head,Ie),Pt||Jo(re,Et,tt)}}return ke}function rs(re,de,Te){var ke=Qs(re,de,"div",null,null,!re.options.singleCursorHeightPerLine),Ie=Te.appendChild(We("div","\xA0","CodeMirror-cursor"));if(Ie.style.left=ke.left+"px",Ie.style.top=ke.top+"px",Ie.style.height=Math.max(0,ke.bottom-ke.top)*re.options.cursorHeight+"px",ke.other){var tt=Te.appendChild(We("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));tt.style.display="",tt.style.left=ke.other.left+"px",tt.style.top=ke.other.top+"px",tt.style.height=(ke.other.bottom-ke.other.top)*.85+"px"}}function ba(re,de){return re.top-de.top||re.left-de.left}function Jo(re,de,Te){var ke=re.display,Ie=re.doc,tt=document.createDocumentFragment(),gt=cu(re.display),Et=gt.left,Pt=Math.max(ke.sizerWidth,al(re)-ke.sizer.offsetLeft)-gt.right,zt=Ie.direction=="ltr";function mn(Pr,Wr,No,wr){Wr<0&&(Wr=0),Wr=Math.round(Wr),wr=Math.round(wr),tt.appendChild(We("div",null,"CodeMirror-selected","position: absolute; left: "+Pr+`px;
|
|
|
top: `+Wr+"px; width: "+(No==null?Pt-Pr:No)+`px;
|
|
|
height: `+(wr-Wr)+"px"))}function Xt(Pr,Wr,No){var wr=xn(Ie,Pr),ts=wr.text.length,da,il;function wa(Va,pu){return Nl(re,cn(Pr,Va),"div",wr,pu)}function ou(Va,pu,Pl){var Za=ed(re,wr,null,Va),Es=pu=="ltr"==(Pl=="after")?"left":"right",Ca=Pl=="after"?Za.begin:Za.end-(/\s/.test(wr.text.charAt(Za.end-1))?2:1);return wa(Ca,Es)[Es]}var Il=vn(wr,Ie.direction);return Ze(Il,Wr||0,No==null?ts:No,function(Va,pu,Pl,Za){var Es=Pl=="ltr",Ca=wa(Va,Es?"left":"right"),hl=wa(pu-1,Es?"right":"left"),Cl=Wr==null&&Va==0,ih=No==null&&pu==ts,_a=Za==0,Wu=!Il||Za==Il.length-1;if(hl.top-Ca.top<=3){var Ma=(zt?Cl:ih)&&_a,Pf=(zt?ih:Cl)&&Wu,Tu=Ma?Et:(Es?Ca:hl).left,gu=Pf?Pt:(Es?hl:Ca).right;mn(Tu,Ca.top,gu-Tu,Ca.bottom)}else{var su,Ys,cl,Fh;Es?(su=zt&&Cl&&_a?Et:Ca.left,Ys=zt?Pt:ou(Va,Pl,"before"),cl=zt?Et:ou(pu,Pl,"after"),Fh=zt&&ih&&Wu?Pt:hl.right):(su=zt?ou(Va,Pl,"before"):Et,Ys=!zt&&Cl&&_a?Pt:Ca.right,cl=!zt&&ih&&Wu?Et:hl.left,Fh=zt?ou(pu,Pl,"after"):Pt),mn(su,Ca.top,Ys-su,Ca.bottom),Ca.bottom<hl.top&&mn(Et,Ca.bottom,null,hl.top),mn(cl,hl.top,Fh-cl,hl.bottom)}(!da||ba(Ca,da)<0)&&(da=Ca),ba(hl,da)<0&&(da=hl),(!il||ba(Ca,il)<0)&&(il=Ca),ba(hl,il)<0&&(il=hl)}),{start:da,end:il}}var Nn=de.from(),Ln=de.to();if(Nn.line==Ln.line)Xt(Nn.line,Nn.ch,Ln.ch);else{var Si=xn(Ie,Nn.line),Li=xn(Ie,Ln.line),Bi=br(Si)==br(Li),cr=Xt(Nn.line,Nn.ch,Bi?Si.text.length+1:null).end,Ir=Xt(Ln.line,Bi?0:null,Ln.ch).start;Bi&&(cr.top<Ir.top-2?(mn(cr.right,cr.top,null,cr.bottom),mn(Et,Ir.top,Ir.left,Ir.bottom)):mn(cr.right,cr.top,Ir.left-cr.right,cr.bottom)),cr.bottom<Ir.top&&mn(Et,cr.bottom,null,Ir.top)}Te.appendChild(tt)}function bs(re){if(re.state.focused){var de=re.display;clearInterval(de.blinker);var Te=!0;de.cursorDiv.style.visibility="",re.options.cursorBlinkRate>0?de.blinker=setInterval(function(){re.hasFocus()||mh(re),de.cursorDiv.style.visibility=(Te=!Te)?"":"hidden"},re.options.cursorBlinkRate):re.options.cursorBlinkRate<0&&(de.cursorDiv.style.visibility="hidden")}}function Os(re){re.state.focused||(re.display.input.focus(),as(re))}function Ws(re){re.state.delayingBlurEvent=!0,setTimeout(function(){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1,mh(re))},100)}function as(re,de){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1),re.options.readOnly!="nocursor"&&(re.state.focused||(si(re,"focus",re,de),re.state.focused=!0,Mt(re.display.wrapper,"CodeMirror-focused"),!re.curOp&&re.display.selForContextMenu!=re.doc.sel&&(re.display.input.reset(),be&&setTimeout(function(){return re.display.input.reset(!0)},20)),re.display.input.receivedFocus()),bs(re))}function mh(re,de){re.state.delayingBlurEvent||(re.state.focused&&(si(re,"blur",re,de),re.state.focused=!1,Ae(re.display.wrapper,"CodeMirror-focused")),clearInterval(re.display.blinker),setTimeout(function(){re.state.focused||(re.display.shift=!1)},150))}function Fr(re){for(var de=re.display,Te=de.lineDiv.offsetTop,ke=0;ke<de.view.length;ke++){var Ie=de.view[ke],tt=re.options.lineWrapping,gt=void 0,Et=0;if(!Ie.hidden){if(Ee&&me<8){var Pt=Ie.node.offsetTop+Ie.node.offsetHeight;gt=Pt-Te,Te=Pt}else{var zt=Ie.node.getBoundingClientRect();gt=zt.bottom-zt.top,!tt&&Ie.text.firstChild&&(Et=Ie.text.firstChild.getBoundingClientRect().right-zt.left-1)}var mn=Ie.line.height-gt;if((mn>.005||mn<-.005)&&(Bn(Ie.line,gt),Bu(Ie.line),Ie.rest))for(var Xt=0;Xt<Ie.rest.length;Xt++)Bu(Ie.rest[Xt]);if(Et>re.display.sizerWidth){var Nn=Math.ceil(Et/Dh(re.display));Nn>re.display.maxLineLength&&(re.display.maxLineLength=Nn,re.display.maxLine=Ie.line,re.display.maxLineChanged=!0)}}}}function Bu(re){if(re.widgets)for(var de=0;de<re.widgets.length;++de){var Te=re.widgets[de],ke=Te.node.parentNode;ke&&(Te.height=ke.offsetHeight)}}function Ko(re,de,Te){var ke=Te&&Te.top!=null?Math.max(0,Te.top):re.scroller.scrollTop;ke=Math.floor(ke-ka(re));var Ie=Te&&Te.bottom!=null?Te.bottom:ke+re.wrapper.clientHeight,tt=Fn(de,ke),gt=Fn(de,Ie);if(Te&&Te.ensure){var Et=Te.ensure.from.line,Pt=Te.ensure.to.line;Et<tt?(tt=Et,gt=Fn(de,Wi(xn(de,Et))+re.wrapper.clientHeight)):Math.min(Pt,de.lastLine())>=gt&&(tt=Fn(de,Wi(xn(de,Pt))-re.wrapper.clientHeight),gt=Pt)}return{from:tt,to:Math.max(gt,tt+1)}}function Oh(re,de){if(!Cn(re,"scrollCursorIntoView")){var Te=re.display,ke=Te.sizer.getBoundingClientRect(),Ie=null;if(de.top+ke.top<0?Ie=!0:de.bottom+ke.top>(window.innerHeight||document.documentElement.clientHeight)&&(Ie=!1),Ie!=null&&!fe){var tt=We("div","\u200B",null,`position: absolute;
|
|
|
top: `+(de.top-Te.viewOffset-ka(re.display))+`px;
|
|
|
height: `+(de.bottom-de.top+Ta(re)+Te.barHeight)+`px;
|
|
|
left: `+de.left+"px; width: "+Math.max(2,de.right-de.left)+"px;");re.display.lineSpace.appendChild(tt),tt.scrollIntoView(Ie),re.display.lineSpace.removeChild(tt)}}}function tc(re,de,Te,ke){ke==null&&(ke=0);var Ie;!re.options.lineWrapping&&de==Te&&(de=de.ch?cn(de.line,de.sticky=="before"?de.ch-1:de.ch,"after"):de,Te=de.sticky=="before"?cn(de.line,de.ch+1,"before"):de);for(var tt=0;tt<5;tt++){var gt=!1,Et=Qs(re,de),Pt=!Te||Te==de?Et:Qs(re,Te);Ie={left:Math.min(Et.left,Pt.left),top:Math.min(Et.top,Pt.top)-ke,right:Math.max(Et.left,Pt.left),bottom:Math.max(Et.bottom,Pt.bottom)+ke};var zt=nd(re,Ie),mn=re.doc.scrollTop,Xt=re.doc.scrollLeft;if(zt.scrollTop!=null&&(Ht(re,zt.scrollTop),Math.abs(re.doc.scrollTop-mn)>1&&(gt=!0)),zt.scrollLeft!=null&&(Qt(re,zt.scrollLeft),Math.abs(re.doc.scrollLeft-Xt)>1&&(gt=!0)),!gt)break}return Ie}function nc(re,de){var Te=nd(re,de);Te.scrollTop!=null&&Ht(re,Te.scrollTop),Te.scrollLeft!=null&&Qt(re,Te.scrollLeft)}function nd(re,de){var Te=re.display,ke=Cu(re.display);de.top<0&&(de.top=0);var Ie=re.curOp&&re.curOp.scrollTop!=null?re.curOp.scrollTop:Te.scroller.scrollTop,tt=fh(re),gt={};de.bottom-de.top>tt&&(de.bottom=de.top+tt);var Et=re.doc.height+Hl(Te),Pt=de.top<ke,zt=de.bottom>Et-ke;if(de.top<Ie)gt.scrollTop=Pt?0:de.top;else if(de.bottom>Ie+tt){var mn=Math.min(de.top,(zt?Et:de.bottom)-tt);mn!=Ie&&(gt.scrollTop=mn)}var Xt=re.options.fixedGutter?0:Te.gutters.offsetWidth,Nn=re.curOp&&re.curOp.scrollLeft!=null?re.curOp.scrollLeft:Te.scroller.scrollLeft-Xt,Ln=al(re)-Te.gutters.offsetWidth,Si=de.right-de.left>Ln;return Si&&(de.right=de.left+Ln),de.left<10?gt.scrollLeft=0:de.left<Nn?gt.scrollLeft=Math.max(0,de.left+Xt-(Si?0:10)):de.right>Ln+Nn-3&&(gt.scrollLeft=de.right+(Si?0:10)-Ln),gt}function Ec(re,de){de!=null&&(zu(re),re.curOp.scrollTop=(re.curOp.scrollTop==null?re.doc.scrollTop:re.curOp.scrollTop)+de)}function ju(re){zu(re);var de=re.getCursor();re.curOp.scrollToPos={from:de,to:de,margin:re.options.cursorScrollMargin}}function eh(re,de,Te){(de!=null||Te!=null)&&zu(re),de!=null&&(re.curOp.scrollLeft=de),Te!=null&&(re.curOp.scrollTop=Te)}function us(re,de){zu(re),re.curOp.scrollToPos=de}function zu(re){var de=re.curOp.scrollToPos;if(de){re.curOp.scrollToPos=null;var Te=Ah(re,de.from),ke=Ah(re,de.to);_t(re,Te,ke,de.margin)}}function _t(re,de,Te,ke){var Ie=nd(re,{left:Math.min(de.left,Te.left),top:Math.min(de.top,Te.top)-ke,right:Math.max(de.right,Te.right),bottom:Math.max(de.bottom,Te.bottom)+ke});eh(re,Ie.scrollLeft,Ie.scrollTop)}function Ht(re,de){Math.abs(re.doc.scrollTop-de)<2||(Le||ri(re,{top:de}),Bt(re,de,!0),Le&&ri(re),Wt(re,100))}function Bt(re,de,Te){de=Math.max(0,Math.min(re.display.scroller.scrollHeight-re.display.scroller.clientHeight,de)),!(re.display.scroller.scrollTop==de&&!Te)&&(re.doc.scrollTop=de,re.display.scrollbars.setScrollTop(de),re.display.scroller.scrollTop!=de&&(re.display.scroller.scrollTop=de))}function Qt(re,de,Te,ke){de=Math.max(0,Math.min(de,re.display.scroller.scrollWidth-re.display.scroller.clientWidth)),!((Te?de==re.doc.scrollLeft:Math.abs(re.doc.scrollLeft-de)<2)&&!ke)&&(re.doc.scrollLeft=de,Hi(re),re.display.scroller.scrollLeft!=de&&(re.display.scroller.scrollLeft=de),re.display.scrollbars.setScrollLeft(de))}function fn(re){var de=re.display,Te=de.gutters.offsetWidth,ke=Math.round(re.doc.height+Hl(re.display));return{clientHeight:de.scroller.clientHeight,viewHeight:de.wrapper.clientHeight,scrollWidth:de.scroller.scrollWidth,clientWidth:de.scroller.clientWidth,viewWidth:de.wrapper.clientWidth,barLeft:re.options.fixedGutter?Te:0,docHeight:ke,scrollHeight:ke+Ta(re)+de.barHeight,nativeBarWidth:de.nativeBarWidth,gutterWidth:Te}}var wn=function(re,de,Te){this.cm=Te;var ke=this.vert=We("div",[We("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Ie=this.horiz=We("div",[We("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");ke.tabIndex=Ie.tabIndex=-1,re(ke),re(Ie),Mn(ke,"scroll",function(){ke.clientHeight&&de(ke.scrollTop,"vertical")}),Mn(Ie,"scroll",function(){Ie.clientWidth&&de(Ie.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Ee&&me<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};wn.prototype.update=function(re){var de=re.scrollWidth>re.clientWidth+1,Te=re.scrollHeight>re.clientHeight+1,ke=re.nativeBarWidth;if(Te){this.vert.style.display="block",this.vert.style.bottom=de?ke+"px":"0";var Ie=re.viewHeight-(de?ke:0);this.vert.firstChild.style.height=Math.max(0,re.scrollHeight-re.clientHeight+Ie)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(de){this.horiz.style.display="block",this.horiz.style.right=Te?ke+"px":"0",this.horiz.style.left=re.barLeft+"px";var tt=re.viewWidth-re.barLeft-(Te?ke:0);this.horiz.firstChild.style.width=Math.max(0,re.scrollWidth-re.clientWidth+tt)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&re.clientHeight>0&&(ke==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:Te?ke:0,bottom:de?ke:0}},wn.prototype.setScrollLeft=function(re){this.horiz.scrollLeft!=re&&(this.horiz.scrollLeft=re),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},wn.prototype.setScrollTop=function(re){this.vert.scrollTop!=re&&(this.vert.scrollTop=re),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},wn.prototype.zeroWidthHack=function(){var re=oe&&!xe?"12px":"18px";this.horiz.style.height=this.vert.style.width=re,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new et,this.disableVert=new et},wn.prototype.enableZeroWidthBar=function(re,de,Te){re.style.pointerEvents="auto";function ke(){var Ie=re.getBoundingClientRect(),tt=Te=="vert"?document.elementFromPoint(Ie.right-1,(Ie.top+Ie.bottom)/2):document.elementFromPoint((Ie.right+Ie.left)/2,Ie.bottom-1);tt!=re?re.style.pointerEvents="none":de.set(1e3,ke)}de.set(1e3,ke)},wn.prototype.clear=function(){var re=this.horiz.parentNode;re.removeChild(this.horiz),re.removeChild(this.vert)};var bn=function(){};bn.prototype.update=function(){return{bottom:0,right:0}},bn.prototype.setScrollLeft=function(){},bn.prototype.setScrollTop=function(){},bn.prototype.clear=function(){};function On(re,de){de||(de=fn(re));var Te=re.display.barWidth,ke=re.display.barHeight;ti(re,de);for(var Ie=0;Ie<4&&Te!=re.display.barWidth||ke!=re.display.barHeight;Ie++)Te!=re.display.barWidth&&re.options.lineWrapping&&Fr(re),ti(re,fn(re)),Te=re.display.barWidth,ke=re.display.barHeight}function ti(re,de){var Te=re.display,ke=Te.scrollbars.update(de);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&&re.options.coverGutterNextToScrollbar&&re.options.fixedGutter?(Te.gutterFiller.style.display="block",Te.gutterFiller.style.height=ke.bottom+"px",Te.gutterFiller.style.width=de.gutterWidth+"px"):Te.gutterFiller.style.display=""}var Jn={native:wn,null:bn};function oi(re){re.display.scrollbars&&(re.display.scrollbars.clear(),re.display.scrollbars.addClass&&Ae(re.display.wrapper,re.display.scrollbars.addClass)),re.display.scrollbars=new Jn[re.options.scrollbarStyle](function(de){re.display.wrapper.insertBefore(de,re.display.scrollbarFiller),Mn(de,"mousedown",function(){re.state.focused&&setTimeout(function(){return re.display.input.focus()},0)}),de.setAttribute("cm-not-content","true")},function(de,Te){Te=="horizontal"?Qt(re,de):Ht(re,de)},re),re.display.scrollbars.addClass&&Mt(re.display.wrapper,re.display.scrollbars.addClass)}var Wn=0;function ci(re){re.curOp={cm:re,viewChanged:!1,startHeight:re.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:++Wn},pr(re.curOp)}function ni(re){var de=re.curOp;de&&po(de,function(Te){for(var ke=0;ke<Te.ops.length;ke++)Te.ops[ke].cm.curOp=null;Ai(Te)})}function Ai(re){for(var de=re.ops,Te=0;Te<de.length;Te++)qi(de[Te]);for(var ke=0;ke<de.length;ke++)yr(de[ke]);for(var Ie=0;Ie<de.length;Ie++)Mr(de[Ie]);for(var tt=0;tt<de.length;tt++)Fi(de[tt]);for(var gt=0;gt<de.length;gt++)fr(de[gt])}function qi(re){var de=re.cm,Te=de.display;pi(de),re.updateMaxLine&&Xr(de),re.mustUpdate=re.viewChanged||re.forceUpdate||re.scrollTop!=null||re.scrollToPos&&(re.scrollToPos.from.line<Te.viewFrom||re.scrollToPos.to.line>=Te.viewTo)||Te.maxLineChanged&&de.options.lineWrapping,re.update=re.mustUpdate&&new ki(de,re.mustUpdate&&{top:re.scrollTop,ensure:re.scrollToPos},re.forceUpdate)}function yr(re){re.updatedDisplay=re.mustUpdate&&Hn(re.cm,re.update)}function Mr(re){var de=re.cm,Te=de.display;re.updatedDisplay&&Fr(de),re.barMeasure=fn(de),Te.maxLineChanged&&!de.options.lineWrapping&&(re.adjustWidthTo=Ia(de,Te.maxLine,Te.maxLine.text.length).left+3,de.display.sizerWidth=re.adjustWidthTo,re.barMeasure.scrollWidth=Math.max(Te.scroller.clientWidth,Te.sizer.offsetLeft+re.adjustWidthTo+Ta(de)+de.display.barWidth),re.maxScrollLeft=Math.max(0,Te.sizer.offsetLeft+re.adjustWidthTo-al(de))),(re.updatedDisplay||re.selectionChanged)&&(re.preparedSelection=Te.input.prepareSelection())}function Fi(re){var de=re.cm;re.adjustWidthTo!=null&&(de.display.sizer.style.minWidth=re.adjustWidthTo+"px",re.maxScrollLeft<de.doc.scrollLeft&&Qt(de,Math.min(de.display.scroller.scrollLeft,re.maxScrollLeft),!0),de.display.maxLineChanged=!1);var Te=re.focus&&re.focus==St();re.preparedSelection&&de.display.input.showSelection(re.preparedSelection,Te),(re.updatedDisplay||re.startHeight!=de.doc.height)&&On(de,re.barMeasure),re.updatedDisplay&&er(de,re.barMeasure),re.selectionChanged&&bs(de),de.state.focused&&re.updateInput&&de.display.input.reset(re.typing),Te&&Os(re.cm)}function fr(re){var de=re.cm,Te=de.display,ke=de.doc;if(re.updatedDisplay&&En(de,re.update),Te.wheelStartX!=null&&(re.scrollTop!=null||re.scrollLeft!=null||re.scrollToPos)&&(Te.wheelStartX=Te.wheelStartY=null),re.scrollTop!=null&&Bt(de,re.scrollTop,re.forceScroll),re.scrollLeft!=null&&Qt(de,re.scrollLeft,!0,!0),re.scrollToPos){var Ie=tc(de,li(ke,re.scrollToPos.from),li(ke,re.scrollToPos.to),re.scrollToPos.margin);Oh(de,Ie)}var tt=re.maybeHiddenMarkers,gt=re.maybeUnhiddenMarkers;if(tt)for(var Et=0;Et<tt.length;++Et)tt[Et].lines.length||si(tt[Et],"hide");if(gt)for(var Pt=0;Pt<gt.length;++Pt)gt[Pt].lines.length&&si(gt[Pt],"unhide");Te.wrapper.offsetHeight&&(ke.scrollTop=de.display.scroller.scrollTop),re.changeObjs&&si(de,"changes",de,re.changeObjs),re.update&&re.update.finish()}function Xi(re,de){if(re.curOp)return de();ci(re);try{return de()}finally{ni(re)}}function Ar(re,de){return function(){if(re.curOp)return de.apply(re,arguments);ci(re);try{return de.apply(re,arguments)}finally{ni(re)}}}function oo(re){return function(){if(this.curOp)return re.apply(this,arguments);ci(this);try{return re.apply(this,arguments)}finally{ni(this)}}}function kt(re){return function(){var de=this.cm;if(!de||de.curOp)return re.apply(this,arguments);ci(de);try{return re.apply(this,arguments)}finally{ni(de)}}}function Wt(re,de){re.doc.highlightFrontier<re.display.viewTo&&re.state.highlight.set(de,ft(qt,re))}function qt(re){var de=re.doc;if(!(de.highlightFrontier>=re.display.viewTo)){var Te=+new Date+re.options.workTime,ke=Io(re,de.highlightFrontier),Ie=[];de.iter(ke.line,Math.min(de.first+de.size,re.display.viewTo+500),function(tt){if(ke.line>=re.display.viewFrom){var gt=tt.styles,Et=tt.text.length>re.options.maxHighlightLength?Lt(de.mode,ke.state):null,Pt=ws(re,tt,ke,!0);Et&&(ke.state=Et),tt.styles=Pt.styles;var zt=tt.styleClasses,mn=Pt.classes;mn?tt.styleClasses=mn:zt&&(tt.styleClasses=null);for(var Xt=!gt||gt.length!=tt.styles.length||zt!=mn&&(!zt||!mn||zt.bgClass!=mn.bgClass||zt.textClass!=mn.textClass),Nn=0;!Xt&&Nn<gt.length;++Nn)Xt=gt[Nn]!=tt.styles[Nn];Xt&&Ie.push(ke.line),tt.stateAfter=ke.save(),ke.nextLine()}else tt.text.length<=re.options.maxHighlightLength&&dn(re,tt.text,ke),tt.stateAfter=ke.line%5==0?ke.save():null,ke.nextLine();if(+new Date>Te)return Wt(re,re.options.workDelay),!0}),de.highlightFrontier=ke.line,de.modeFrontier=Math.max(de.modeFrontier,ke.line),Ie.length&&Xi(re,function(){for(var tt=0;tt<Ie.length;tt++)zo(re,Ie[tt],"text")})}}var ki=function(re,de,Te){var ke=re.display;this.viewport=de,this.visible=Ko(ke,re.doc,de),this.editorIsHidden=!ke.wrapper.offsetWidth,this.wrapperHeight=ke.wrapper.clientHeight,this.wrapperWidth=ke.wrapper.clientWidth,this.oldDisplayWidth=al(re),this.force=Te,this.dims=ec(re),this.events=[]};ki.prototype.signal=function(re,de){Yn(re,de)&&this.events.push(arguments)},ki.prototype.finish=function(){for(var re=0;re<this.events.length;re++)si.apply(null,this.events[re])};function pi(re){var de=re.display;!de.scrollbarsClipped&&de.scroller.offsetWidth&&(de.nativeBarWidth=de.scroller.offsetWidth-de.scroller.clientWidth,de.heightForcer.style.height=Ta(re)+"px",de.sizer.style.marginBottom=-de.nativeBarWidth+"px",de.sizer.style.borderRightWidth=Ta(re)+"px",de.scrollbarsClipped=!0)}function Qn(re){if(re.hasFocus())return null;var de=St();if(!de||!pt(re.display.lineDiv,de))return null;var Te={activeElt:de};if(window.getSelection){var ke=window.getSelection();ke.anchorNode&&ke.extend&&pt(re.display.lineDiv,ke.anchorNode)&&(Te.anchorNode=ke.anchorNode,Te.anchorOffset=ke.anchorOffset,Te.focusNode=ke.focusNode,Te.focusOffset=ke.focusOffset)}return Te}function Vn(re){if(!(!re||!re.activeElt||re.activeElt==St())&&(re.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(re.activeElt.nodeName)&&re.anchorNode&&pt(document.body,re.anchorNode)&&pt(document.body,re.focusNode))){var de=window.getSelection(),Te=document.createRange();Te.setEnd(re.anchorNode,re.anchorOffset),Te.collapse(!1),de.removeAllRanges(),de.addRange(Te),de.extend(re.focusNode,re.focusOffset)}}function Hn(re,de){var Te=re.display,ke=re.doc;if(de.editorIsHidden)return la(re),!1;if(!de.force&&de.visible.from>=Te.viewFrom&&de.visible.to<=Te.viewTo&&(Te.updateLineNumbers==null||Te.updateLineNumbers>=Te.viewTo)&&Te.renderedView==Te.view&&wl(re)==0)return!1;sr(re)&&(la(re),de.dims=ec(re));var Ie=ke.first+ke.size,tt=Math.max(de.visible.from-re.options.viewportMargin,ke.first),gt=Math.min(Ie,de.visible.to+re.options.viewportMargin);Te.viewFrom<tt&&tt-Te.viewFrom<20&&(tt=Math.max(ke.first,Te.viewFrom)),Te.viewTo>gt&&Te.viewTo-gt<20&&(gt=Math.min(Ie,Te.viewTo)),zn&&(tt=ui(re.doc,tt),gt=Di(re.doc,gt));var Et=tt!=Te.viewFrom||gt!=Te.viewTo||Te.lastWrapHeight!=de.wrapperHeight||Te.lastWrapWidth!=de.wrapperWidth;is(re,tt,gt),Te.viewOffset=Wi(xn(re.doc,Te.viewFrom)),re.display.mover.style.top=Te.viewOffset+"px";var Pt=wl(re);if(!Et&&Pt==0&&!de.force&&Te.renderedView==Te.view&&(Te.updateLineNumbers==null||Te.updateLineNumbers>=Te.viewTo))return!1;var zt=Qn(re);return Pt>4&&(Te.lineDiv.style.display="none"),Yi(re,Te.updateLineNumbers,de.dims),Pt>4&&(Te.lineDiv.style.display=""),Te.renderedView=Te.view,Vn(zt),Oe(Te.cursorDiv),Oe(Te.selectionDiv),Te.gutters.style.height=Te.sizer.style.minHeight=0,Et&&(Te.lastWrapHeight=de.wrapperHeight,Te.lastWrapWidth=de.wrapperWidth,Wt(re,400)),Te.updateLineNumbers=null,!0}function En(re,de){for(var Te=de.viewport,ke=!0;;ke=!1){if(!ke||!re.options.lineWrapping||de.oldDisplayWidth==al(re)){if(Te&&Te.top!=null&&(Te={top:Math.min(re.doc.height+Hl(re.display)-fh(re),Te.top)}),de.visible=Ko(re.display,re.doc,Te),de.visible.from>=re.display.viewFrom&&de.visible.to<=re.display.viewTo)break}else ke&&(de.visible=Ko(re.display,re.doc,Te));if(!Hn(re,de))break;Fr(re);var Ie=fn(re);sa(re),On(re,Ie),er(re,Ie),de.force=!1}de.signal(re,"update",re),(re.display.viewFrom!=re.display.reportedViewFrom||re.display.viewTo!=re.display.reportedViewTo)&&(de.signal(re,"viewportChange",re,re.display.viewFrom,re.display.viewTo),re.display.reportedViewFrom=re.display.viewFrom,re.display.reportedViewTo=re.display.viewTo)}function ri(re,de){var Te=new ki(re,de);if(Hn(re,Te)){Fr(re),En(re,Te);var ke=fn(re);sa(re),On(re,ke),er(re,ke),Te.finish()}}function Yi(re,de,Te){var ke=re.display,Ie=re.options.lineNumbers,tt=ke.lineDiv,gt=tt.firstChild;function Et(Si){var Li=Si.nextSibling;return be&&oe&&re.display.currentWheelTarget==Si?Si.style.display="none":Si.parentNode.removeChild(Si),Li}for(var Pt=ke.view,zt=ke.viewFrom,mn=0;mn<Pt.length;mn++){var Xt=Pt[mn];if(!Xt.hidden)if(!Xt.node||Xt.node.parentNode!=tt){var Nn=vs(re,Xt,zt,Te);tt.insertBefore(Nn,gt)}else{for(;gt!=Xt.node;)gt=Et(gt);var Ln=Ie&&de!=null&&de<=zt&&Xt.lineNumber;Xt.changes&&(lt(Xt.changes,"gutter")>-1&&(Ln=!1),hs(re,Xt,zt,Te)),Ln&&(Oe(Xt.lineNumber),Xt.lineNumber.appendChild(document.createTextNode(_i(re.options,zt)))),gt=Xt.node.nextSibling}zt+=Xt.size}for(;gt;)gt=Et(gt)}function Oi(re){var de=re.gutters.offsetWidth;re.sizer.style.marginLeft=de+"px"}function er(re,de){re.display.sizer.style.minHeight=de.docHeight+"px",re.display.heightForcer.style.top=de.docHeight+"px",re.display.gutters.style.height=de.docHeight+re.display.barHeight+Ta(re)+"px"}function Hi(re){var de=re.display,Te=de.view;if(!(!de.alignWidgets&&(!de.gutters.firstChild||!re.options.fixedGutter))){for(var ke=gh(de)-de.scroller.scrollLeft+re.doc.scrollLeft,Ie=de.gutters.offsetWidth,tt=ke+"px",gt=0;gt<Te.length;gt++)if(!Te[gt].hidden){re.options.fixedGutter&&(Te[gt].gutter&&(Te[gt].gutter.style.left=tt),Te[gt].gutterBackground&&(Te[gt].gutterBackground.style.left=tt));var Et=Te[gt].alignable;if(Et)for(var Pt=0;Pt<Et.length;Pt++)Et[Pt].style.left=tt}re.options.fixedGutter&&(de.gutters.style.left=ke+Ie+"px")}}function sr(re){if(!re.options.lineNumbers)return!1;var de=re.doc,Te=_i(re.options,de.first+de.size-1),ke=re.display;if(Te.length!=ke.lineNumChars){var Ie=ke.measure.appendChild(We("div",[We("div",Te)],"CodeMirror-linenumber CodeMirror-gutter-elt")),tt=Ie.firstChild.offsetWidth,gt=Ie.offsetWidth-tt;return ke.lineGutter.style.width="",ke.lineNumInnerWidth=Math.max(tt,ke.lineGutter.offsetWidth-gt)+1,ke.lineNumWidth=ke.lineNumInnerWidth+gt,ke.lineNumChars=ke.lineNumInnerWidth?Te.length:-1,ke.lineGutter.style.width=ke.lineNumWidth+"px",Oi(re.display),!0}return!1}function tr(re,de){for(var Te=[],ke=!1,Ie=0;Ie<re.length;Ie++){var tt=re[Ie],gt=null;if(typeof tt!="string"&&(gt=tt.style,tt=tt.className),tt=="CodeMirror-linenumbers")if(de)ke=!0;else continue;Te.push({className:tt,style:gt})}return de&&!ke&&Te.push({className:"CodeMirror-linenumbers",style:null}),Te}function so(re){var de=re.gutters,Te=re.gutterSpecs;Oe(de),re.lineGutter=null;for(var ke=0;ke<Te.length;++ke){var Ie=Te[ke],tt=Ie.className,gt=Ie.style,Et=de.appendChild(We("div",null,"CodeMirror-gutter "+tt));gt&&(Et.style.cssText=gt),tt=="CodeMirror-linenumbers"&&(re.lineGutter=Et,Et.style.width=(re.lineNumWidth||1)+"px")}de.style.display=Te.length?"":"none",Oi(re)}function Or(re){so(re.display),Ds(re),Hi(re)}function So(re,de,Te,ke){var Ie=this;this.input=Te,Ie.scrollbarFiller=We("div",null,"CodeMirror-scrollbar-filler"),Ie.scrollbarFiller.setAttribute("cm-not-content","true"),Ie.gutterFiller=We("div",null,"CodeMirror-gutter-filler"),Ie.gutterFiller.setAttribute("cm-not-content","true"),Ie.lineDiv=$e("div",null,"CodeMirror-code"),Ie.selectionDiv=We("div",null,null,"position: relative; z-index: 1"),Ie.cursorDiv=We("div",null,"CodeMirror-cursors"),Ie.measure=We("div",null,"CodeMirror-measure"),Ie.lineMeasure=We("div",null,"CodeMirror-measure"),Ie.lineSpace=$e("div",[Ie.measure,Ie.lineMeasure,Ie.selectionDiv,Ie.cursorDiv,Ie.lineDiv],null,"position: relative; outline: none");var tt=$e("div",[Ie.lineSpace],"CodeMirror-lines");Ie.mover=We("div",[tt],null,"position: relative"),Ie.sizer=We("div",[Ie.mover],"CodeMirror-sizer"),Ie.sizerWidth=null,Ie.heightForcer=We("div",null,null,"position: absolute; height: "+dt+"px; width: 1px;"),Ie.gutters=We("div",null,"CodeMirror-gutters"),Ie.lineGutter=null,Ie.scroller=We("div",[Ie.sizer,Ie.heightForcer,Ie.gutters],"CodeMirror-scroll"),Ie.scroller.setAttribute("tabIndex","-1"),Ie.wrapper=We("div",[Ie.scrollbarFiller,Ie.gutterFiller,Ie.scroller],"CodeMirror"),Ee&&me<8&&(Ie.gutters.style.zIndex=-1,Ie.scroller.style.paddingRight=0),!be&&!(Le&&z)&&(Ie.scroller.draggable=!0),re&&(re.appendChild?re.appendChild(Ie.wrapper):re(Ie.wrapper)),Ie.viewFrom=Ie.viewTo=de.first,Ie.reportedViewFrom=Ie.reportedViewTo=de.first,Ie.view=[],Ie.renderedView=null,Ie.externalMeasured=null,Ie.viewOffset=0,Ie.lastWrapHeight=Ie.lastWrapWidth=0,Ie.updateLineNumbers=null,Ie.nativeBarWidth=Ie.barHeight=Ie.barWidth=0,Ie.scrollbarsClipped=!1,Ie.lineNumWidth=Ie.lineNumInnerWidth=Ie.lineNumChars=null,Ie.alignWidgets=!1,Ie.cachedCharWidth=Ie.cachedTextHeight=Ie.cachedPaddingH=null,Ie.maxLine=null,Ie.maxLineLength=0,Ie.maxLineChanged=!1,Ie.wheelDX=Ie.wheelDY=Ie.wheelStartX=Ie.wheelStartY=null,Ie.shift=!1,Ie.selForContextMenu=null,Ie.activeTouch=null,Ie.gutterSpecs=tr(ke.gutters,ke.lineNumbers),so(Ie),Te.init(Ie)}var To=0,nr=null;Ee?nr=-.53:Le?nr=15:we?nr=-.7:he&&(nr=-1/3);function Tr(re){var de=re.wheelDeltaX,Te=re.wheelDeltaY;return de==null&&re.detail&&re.axis==re.HORIZONTAL_AXIS&&(de=re.detail),Te==null&&re.detail&&re.axis==re.VERTICAL_AXIS?Te=re.detail:Te==null&&(Te=re.wheelDelta),{x:de,y:Te}}function Mi(re){var de=Tr(re);return de.x*=nr,de.y*=nr,de}function Vr(re,de){var Te=Tr(de),ke=Te.x,Ie=Te.y,tt=re.display,gt=tt.scroller,Et=gt.scrollWidth>gt.clientWidth,Pt=gt.scrollHeight>gt.clientHeight;if(ke&&Et||Ie&&Pt){if(Ie&&oe&&be){e:for(var zt=de.target,mn=tt.view;zt!=gt;zt=zt.parentNode)for(var Xt=0;Xt<mn.length;Xt++)if(mn[Xt].node==zt){re.display.currentWheelTarget=zt;break e}}if(ke&&!Le&&!ge&&nr!=null){Ie&&Pt&&Ht(re,Math.max(0,gt.scrollTop+Ie*nr)),Qt(re,Math.max(0,gt.scrollLeft+ke*nr)),(!Ie||Ie&&Pt)&&vr(de),tt.wheelStartX=null;return}if(Ie&&nr!=null){var Nn=Ie*nr,Ln=re.doc.scrollTop,Si=Ln+tt.wrapper.clientHeight;Nn<0?Ln=Math.max(0,Ln+Nn-50):Si=Math.min(re.doc.height,Si+Nn+50),ri(re,{top:Ln,bottom:Si})}To<20&&(tt.wheelStartX==null?(tt.wheelStartX=gt.scrollLeft,tt.wheelStartY=gt.scrollTop,tt.wheelDX=ke,tt.wheelDY=Ie,setTimeout(function(){if(tt.wheelStartX!=null){var Li=gt.scrollLeft-tt.wheelStartX,Bi=gt.scrollTop-tt.wheelStartY,cr=Bi&&tt.wheelDY&&Bi/tt.wheelDY||Li&&tt.wheelDX&&Li/tt.wheelDX;tt.wheelStartX=tt.wheelStartY=null,cr&&(nr=(nr*To+cr)/(To+1),++To)}},200)):(tt.wheelDX+=ke,tt.wheelDY+=Ie))}}var Lr=function(re,de){this.ranges=re,this.primIndex=de};Lr.prototype.primary=function(){return this.ranges[this.primIndex]},Lr.prototype.equals=function(re){if(re==this)return!0;if(re.primIndex!=this.primIndex||re.ranges.length!=this.ranges.length)return!1;for(var de=0;de<this.ranges.length;de++){var Te=this.ranges[de],ke=re.ranges[de];if(!Ii(Te.anchor,ke.anchor)||!Ii(Te.head,ke.head))return!1}return!0},Lr.prototype.deepCopy=function(){for(var re=[],de=0;de<this.ranges.length;de++)re[de]=new hr(lr(this.ranges[de].anchor),lr(this.ranges[de].head));return new Lr(re,this.primIndex)},Lr.prototype.somethingSelected=function(){for(var re=0;re<this.ranges.length;re++)if(!this.ranges[re].empty())return!0;return!1},Lr.prototype.contains=function(re,de){de||(de=re);for(var Te=0;Te<this.ranges.length;Te++){var ke=this.ranges[Te];if(qn(de,ke.from())>=0&&qn(re,ke.to())<=0)return Te}return-1};var hr=function(re,de){this.anchor=re,this.head=de};hr.prototype.from=function(){return Ti(this.anchor,this.head)},hr.prototype.to=function(){return _r(this.anchor,this.head)},hr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function wo(re,de,Te){var ke=re&&re.options.selectionsMayTouch,Ie=de[Te];de.sort(function(Nn,Ln){return qn(Nn.from(),Ln.from())}),Te=lt(de,Ie);for(var tt=1;tt<de.length;tt++){var gt=de[tt],Et=de[tt-1],Pt=qn(Et.to(),gt.from());if(ke&&!gt.empty()?Pt>0:Pt>=0){var zt=Ti(Et.from(),gt.from()),mn=_r(Et.to(),gt.to()),Xt=Et.empty()?gt.from()==gt.head:Et.from()==Et.head;tt<=Te&&--Te,de.splice(--tt,2,new hr(Xt?mn:zt,Xt?zt:mn))}}return new Lr(de,Te)}function rr(re,de){return new Lr([new hr(re,de||re)],0)}function $o(re){return re.text?cn(re.from.line+re.text.length-1,on(re.text).length+(re.text.length==1?re.from.ch:0)):re.to}function ko(re,de){if(qn(re,de.from)<0)return re;if(qn(re,de.to)<=0)return $o(de);var Te=re.line+de.text.length-(de.to.line-de.from.line)-1,ke=re.ch;return re.line==de.to.line&&(ke+=$o(de).ch-de.to.ch),cn(Te,ke)}function Ao(re,de){for(var Te=[],ke=0;ke<re.sel.ranges.length;ke++){var Ie=re.sel.ranges[ke];Te.push(new hr(ko(Ie.anchor,de),ko(Ie.head,de)))}return wo(re.cm,Te,re.sel.primIndex)}function eo(re,de,Te){return re.line==de.line?cn(Te.line,re.ch-de.ch+Te.ch):cn(Te.line+(re.line-de.line),re.ch)}function Bo(re,de,Te){for(var ke=[],Ie=cn(re.first,0),tt=Ie,gt=0;gt<de.length;gt++){var Et=de[gt],Pt=eo(Et.from,Ie,tt),zt=eo($o(Et),Ie,tt);if(Ie=Et.to,tt=zt,Te=="around"){var mn=re.sel.ranges[gt],Xt=qn(mn.head,mn.anchor)<0;ke[gt]=new hr(Xt?zt:Pt,Xt?Pt:zt)}else ke[gt]=new hr(Pt,Pt)}return new Lr(ke,re.sel.primIndex)}function Ri(re){re.doc.mode=He(re.options,re.doc.modeOption),$s(re)}function $s(re){re.doc.iter(function(de){de.stateAfter&&(de.stateAfter=null),de.styles&&(de.styles=null)}),re.doc.modeFrontier=re.doc.highlightFrontier=re.doc.first,Wt(re,100),re.state.modeGen++,re.curOp&&Ds(re)}function _o(re,de){return de.from.ch==0&&de.to.ch==0&&on(de.text)==""&&(!re.cm||re.cm.options.wholeLineUpdateBefore)}function Rs(re,de,Te,ke){function Ie(Ir){return Te?Te[Ir]:null}function tt(Ir,Pr,Wr){xo(Ir,Pr,Wr,ke),Ei(Ir,"change",Ir,de)}function gt(Ir,Pr){for(var Wr=[],No=Ir;No<Pr;++No)Wr.push(new Jr(zt[No],Ie(No),ke));return Wr}var Et=de.from,Pt=de.to,zt=de.text,mn=xn(re,Et.line),Xt=xn(re,Pt.line),Nn=on(zt),Ln=Ie(zt.length-1),Si=Pt.line-Et.line;if(de.full)re.insert(0,gt(0,zt.length)),re.remove(zt.length,re.size-zt.length);else if(_o(re,de)){var Li=gt(0,zt.length-1);tt(Xt,Xt.text,Ln),Si&&re.remove(Et.line,Si),Li.length&&re.insert(Et.line,Li)}else if(mn==Xt)if(zt.length==1)tt(mn,mn.text.slice(0,Et.ch)+Nn+mn.text.slice(Pt.ch),Ln);else{var Bi=gt(1,zt.length-1);Bi.push(new Jr(Nn+mn.text.slice(Pt.ch),Ln,ke)),tt(mn,mn.text.slice(0,Et.ch)+zt[0],Ie(0)),re.insert(Et.line+1,Bi)}else if(zt.length==1)tt(mn,mn.text.slice(0,Et.ch)+zt[0]+Xt.text.slice(Pt.ch),Ie(0)),re.remove(Et.line+1,Si);else{tt(mn,mn.text.slice(0,Et.ch)+zt[0],Ie(0)),tt(Xt,Nn+Xt.text.slice(Pt.ch),Ln);var cr=gt(1,zt.length-1);Si>1&&re.remove(Et.line+1,Si-1),re.insert(Et.line+1,cr)}Ei(re,"change",re,de)}function ua(re,de,Te){function ke(Ie,tt,gt){if(Ie.linked)for(var Et=0;Et<Ie.linked.length;++Et){var Pt=Ie.linked[Et];if(Pt.doc!=tt){var zt=gt&&Pt.sharedHist;Te&&!zt||(de(Pt.doc,zt),ke(Pt.doc,Ie,zt))}}}ke(re,null,!0)}function Cs(re,de){if(de.cm)throw new Error("This document is already in use.");re.doc=de,de.cm=re,Kr(re),Ri(re),_l(re),re.options.lineWrapping||Xr(re),re.options.mode=de.modeOption,Ds(re)}function _l(re){(re.doc.direction=="rtl"?Mt:Ae)(re.display.lineDiv,"CodeMirror-rtl")}function ho(re){Xi(re,function(){_l(re),Ds(re)})}function Uo(re){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=re||1}function es(re,de){var Te={from:lr(de.from),to:$o(de),text:Zn(re,de.from,de.to)};return Eu(re,Te,de.from.line,de.to.line+1),ua(re,function(ke){return Eu(ke,Te,de.from.line,de.to.line+1)},!0),Te}function Na(re){for(;re.length;){var de=on(re);if(de.ranges)re.pop();else break}}function ha(re,de){if(de)return Na(re.done),on(re.done);if(re.done.length&&!on(re.done).ranges)return on(re.done);if(re.done.length>1&&!re.done[re.done.length-2].ranges)return re.done.pop(),on(re.done)}function du(re,de,Te,ke){var Ie=re.history;Ie.undone.length=0;var tt=+new Date,gt,Et;if((Ie.lastOp==ke||Ie.lastOrigin==de.origin&&de.origin&&(de.origin.charAt(0)=="+"&&Ie.lastModTime>tt-(re.cm?re.cm.options.historyEventDelay:500)||de.origin.charAt(0)=="*"))&&(gt=ha(Ie,Ie.lastOp==ke)))Et=on(gt.changes),qn(de.from,de.to)==0&&qn(de.from,Et.to)==0?Et.to=$o(de):gt.changes.push(es(re,de));else{var Pt=on(Ie.done);for((!Pt||!Pt.ranges)&&ca(re.sel,Ie.done),gt={changes:[es(re,de)],generation:Ie.generation},Ie.done.push(gt);Ie.done.length>Ie.undoDepth;)Ie.done.shift(),Ie.done[0].ranges||Ie.done.shift()}Ie.done.push(Te),Ie.generation=++Ie.maxGeneration,Ie.lastModTime=Ie.lastSelTime=tt,Ie.lastOp=Ie.lastSelOp=ke,Ie.lastOrigin=Ie.lastSelOrigin=de.origin,Et||si(re,"historyAdded")}function bl(re,de,Te,ke){var Ie=de.charAt(0);return Ie=="*"||Ie=="+"&&Te.ranges.length==ke.ranges.length&&Te.somethingSelected()==ke.somethingSelected()&&new Date-re.history.lastSelTime<=(re.cm?re.cm.options.historyEventDelay:500)}function Vs(re,de,Te,ke){var Ie=re.history,tt=ke&&ke.origin;Te==Ie.lastSelOp||tt&&Ie.lastSelOrigin==tt&&(Ie.lastModTime==Ie.lastSelTime&&Ie.lastOrigin==tt||bl(re,tt,on(Ie.done),de))?Ie.done[Ie.done.length-1]=de:ca(de,Ie.done),Ie.lastSelTime=+new Date,Ie.lastSelOrigin=tt,Ie.lastSelOp=Te,ke&&ke.clearRedo!==!1&&Na(Ie.undone)}function ca(re,de){var Te=on(de);Te&&Te.ranges&&Te.equals(re)||de.push(re)}function Eu(re,de,Te,ke){var Ie=de["spans_"+re.id],tt=0;re.iter(Math.max(re.first,Te),Math.min(re.first+re.size,ke),function(gt){gt.markedSpans&&((Ie||(Ie=de["spans_"+re.id]={}))[tt]=gt.markedSpans),++tt})}function Da(re){if(!re)return null;for(var de,Te=0;Te<re.length;++Te)re[Te].marker.explicitlyCleared?de||(de=re.slice(0,Te)):de&&de.push(re[Te]);return de?de.length?de:null:re}function Wl(re,de){var Te=de["spans_"+re.id];if(!Te)return null;for(var ke=[],Ie=0;Ie<de.text.length;++Ie)ke.push(Da(Te[Ie]));return ke}function Eo(re,de){var Te=Wl(re,de),ke=Xn(re,de);if(!Te)return ke;if(!ke)return Te;for(var Ie=0;Ie<Te.length;++Ie){var tt=Te[Ie],gt=ke[Ie];if(tt&>)e:for(var Et=0;Et<gt.length;++Et){for(var Pt=gt[Et],zt=0;zt<tt.length;++zt)if(tt[zt].marker==Pt.marker)continue e;tt.push(Pt)}else gt&&(Te[Ie]=gt)}return Te}function Ms(re,de,Te){for(var ke=[],Ie=0;Ie<re.length;++Ie){var tt=re[Ie];if(tt.ranges){ke.push(Te?Lr.prototype.deepCopy.call(tt):tt);continue}var gt=tt.changes,Et=[];ke.push({changes:Et});for(var Pt=0;Pt<gt.length;++Pt){var zt=gt[Pt],mn=void 0;if(Et.push({from:zt.from,to:zt.to,text:zt.text}),de)for(var Xt in zt)(mn=Xt.match(/^spans_(\d+)$/))&<(de,Number(mn[1]))>-1&&(on(Et)[Xt]=zt[Xt],delete zt[Xt])}}return ke}function Pa(re,de,Te,ke){if(ke){var Ie=re.anchor;if(Te){var tt=qn(de,Ie)<0;tt!=qn(Te,Ie)<0?(Ie=de,de=Te):tt!=qn(de,Te)<0&&(de=Te)}return new hr(Ie,de)}else return new hr(Te||de,de)}function $a(re,de,Te,ke,Ie){Ie==null&&(Ie=re.cm&&(re.cm.display.shift||re.extend)),ys(re,new Lr([Pa(re.sel.primary(),de,Te,Ie)],0),ke)}function ea(re,de,Te){for(var ke=[],Ie=re.cm&&(re.cm.display.shift||re.extend),tt=0;tt<re.sel.ranges.length;tt++)ke[tt]=Pa(re.sel.ranges[tt],de[tt],null,Ie);var gt=wo(re.cm,ke,re.sel.primIndex);ys(re,gt,Te)}function Ha(re,de,Te,ke){var Ie=re.sel.ranges.slice(0);Ie[de]=Te,ys(re,wo(re.cm,Ie,re.sel.primIndex),ke)}function Ga(re,de,Te,ke){ys(re,rr(de,Te),ke)}function nu(re,de,Te){var ke={ranges:de.ranges,update:function(Ie){this.ranges=[];for(var tt=0;tt<Ie.length;tt++)this.ranges[tt]=new hr(li(re,Ie[tt].anchor),li(re,Ie[tt].head))},origin:Te&&Te.origin};return si(re,"beforeSelectionChange",re,ke),re.cm&&si(re.cm,"beforeSelectionChange",re.cm,ke),ke.ranges!=de.ranges?wo(re.cm,ke.ranges,ke.ranges.length-1):de}function Kl(re,de,Te){var ke=re.history.done,Ie=on(ke);Ie&&Ie.ranges?(ke[ke.length-1]=de,Wa(re,de,Te)):ys(re,de,Te)}function ys(re,de,Te){Wa(re,de,Te),Vs(re,re.sel,re.cm?re.cm.curOp.id:NaN,Te)}function Wa(re,de,Te){(Yn(re,"beforeSelectionChange")||re.cm&&Yn(re.cm,"beforeSelectionChange"))&&(de=nu(re,de,Te));var ke=Te&&Te.bias||(qn(de.primary().head,re.sel.primary().head)<0?-1:1);ll(re,Vl(re,de,ke,!0)),!(Te&&Te.scroll===!1)&&re.cm&&ju(re.cm)}function ll(re,de){de.equals(re.sel)||(re.sel=de,re.cm&&(re.cm.curOp.updateInput=1,re.cm.curOp.selectionChanged=!0,Ki(re.cm)),Ei(re,"cursorActivity",re))}function fu(re){ll(re,Vl(re,re.sel,null,!1))}function Vl(re,de,Te,ke){for(var Ie,tt=0;tt<de.ranges.length;tt++){var gt=de.ranges[tt],Et=de.ranges.length==re.sel.ranges.length&&re.sel.ranges[tt],Pt=ic(re,gt.anchor,Et&&Et.anchor,Te,ke),zt=ic(re,gt.head,Et&&Et.head,Te,ke);(Ie||Pt!=gt.anchor||zt!=gt.head)&&(Ie||(Ie=de.ranges.slice(0,tt)),Ie[tt]=new hr(Pt,zt))}return Ie?wo(re.cm,Ie,de.primIndex):de}function el(re,de,Te,ke,Ie){var tt=xn(re,de.line);if(tt.markedSpans)for(var gt=0;gt<tt.markedSpans.length;++gt){var Et=tt.markedSpans[gt],Pt=Et.marker,zt="selectLeft"in Pt?!Pt.selectLeft:Pt.inclusiveLeft,mn="selectRight"in Pt?!Pt.selectRight:Pt.inclusiveRight;if((Et.from==null||(zt?Et.from<=de.ch:Et.from<de.ch))&&(Et.to==null||(mn?Et.to>=de.ch:Et.to>de.ch))){if(Ie&&(si(Pt,"beforeCursorEnter"),Pt.explicitlyCleared))if(tt.markedSpans){--gt;continue}else break;if(!Pt.atomic)continue;if(Te){var Xt=Pt.find(ke<0?1:-1),Nn=void 0;if((ke<0?mn:zt)&&(Xt=rc(re,Xt,-ke,Xt&&Xt.line==de.line?tt:null)),Xt&&Xt.line==de.line&&(Nn=qn(Xt,Te))&&(ke<0?Nn<0:Nn>0))return el(re,Xt,de,ke,Ie)}var Ln=Pt.find(ke<0?-1:1);return(ke<0?zt:mn)&&(Ln=rc(re,Ln,ke,Ln.line==de.line?tt:null)),Ln?el(re,Ln,de,ke,Ie):null}}return de}function ic(re,de,Te,ke,Ie){var tt=ke||1,gt=el(re,de,Te,tt,Ie)||!Ie&&el(re,de,Te,tt,!0)||el(re,de,Te,-tt,Ie)||!Ie&&el(re,de,Te,-tt,!0);return gt||(re.cantEdit=!0,cn(re.first,0))}function rc(re,de,Te,ke){return Te<0&&de.ch==0?de.line>re.first?li(re,cn(de.line-1)):null:Te>0&&de.ch==(ke||xn(re,de.line)).text.length?de.line<re.first+re.size-1?cn(de.line+1,0):null:new cn(de.line,de.ch+Te)}function va(re){re.setSelection(cn(re.firstLine(),0),cn(re.lastLine()),yt)}function oc(re,de,Te){var ke={canceled:!1,from:de.from,to:de.to,text:de.text,origin:de.origin,cancel:function(){return ke.canceled=!0}};return Te&&(ke.update=function(Ie,tt,gt,Et){Ie&&(ke.from=li(re,Ie)),tt&&(ke.to=li(re,tt)),gt&&(ke.text=gt),Et!==void 0&&(ke.origin=Et)}),si(re,"beforeChange",re,ke),re.cm&&si(re.cm,"beforeChange",re.cm,ke),ke.canceled?(re.cm&&(re.cm.curOp.updateInput=2),null):{from:ke.from,to:ke.to,text:ke.text,origin:ke.origin}}function Uu(re,de,Te){if(re.cm){if(!re.cm.curOp)return Ar(re.cm,Uu)(re,de,Te);if(re.cm.state.suppressEdits)return}if(!((Yn(re,"beforeChange")||re.cm&&Yn(re.cm,"beforeChange"))&&(de=oc(re,de,!0),!de))){var ke=Fo&&!Te&&gi(re,de.from,de.to);if(ke)for(var Ie=ke.length-1;Ie>=0;--Ie)Fa(re,{from:ke[Ie].from,to:ke[Ie].to,text:Ie?[""]:de.text,origin:de.origin});else Fa(re,de)}}function Fa(re,de){if(!(de.text.length==1&&de.text[0]==""&&qn(de.from,de.to)==0)){var Te=Ao(re,de);du(re,de,Te,re.cm?re.cm.curOp.id:NaN),Mu(re,de,Te,Xn(re,de));var ke=[];ua(re,function(Ie,tt){!tt&<(ke,Ie.history)==-1&&(Mc(Ie.history,de),ke.push(Ie.history)),Mu(Ie,de,null,Xn(Ie,de))})}}function Lu(re,de,Te){var ke=re.cm&&re.cm.state.suppressEdits;if(!(ke&&!Te)){for(var Ie=re.history,tt,gt=re.sel,Et=de=="undo"?Ie.done:Ie.undone,Pt=de=="undo"?Ie.undone:Ie.done,zt=0;zt<Et.length&&(tt=Et[zt],!(Te?tt.ranges&&!tt.equals(re.sel):!tt.ranges));zt++);if(zt!=Et.length){for(Ie.lastOrigin=Ie.lastSelOrigin=null;;)if(tt=Et.pop(),tt.ranges){if(ca(tt,Pt),Te&&!tt.equals(re.sel)){ys(re,tt,{clearRedo:!1});return}gt=tt}else if(ke){Et.push(tt);return}else break;var mn=[];ca(gt,Pt),Pt.push({changes:mn,generation:Ie.generation}),Ie.generation=tt.generation||++Ie.maxGeneration;for(var Xt=Yn(re,"beforeChange")||re.cm&&Yn(re.cm,"beforeChange"),Nn=function(Li){var Bi=tt.changes[Li];if(Bi.origin=de,Xt&&!oc(re,Bi,!1))return Et.length=0,{};mn.push(es(re,Bi));var cr=Li?Ao(re,Bi):on(Et);Mu(re,Bi,cr,Eo(re,Bi)),!Li&&re.cm&&re.cm.scrollIntoView({from:Bi.from,to:$o(Bi)});var Ir=[];ua(re,function(Pr,Wr){!Wr&<(Ir,Pr.history)==-1&&(Mc(Pr.history,Bi),Ir.push(Pr.history)),Mu(Pr,Bi,null,Eo(Pr,Bi))})},Ln=tt.changes.length-1;Ln>=0;--Ln){var Si=Nn(Ln);if(Si)return Si.v}}}}function Rh(re,de){if(de!=0&&(re.first+=de,re.sel=new Lr(Jt(re.sel.ranges,function(Ie){return new hr(cn(Ie.anchor.line+de,Ie.anchor.ch),cn(Ie.head.line+de,Ie.head.ch))}),re.sel.primIndex),re.cm)){Ds(re.cm,re.first,re.first-de,de);for(var Te=re.cm.display,ke=Te.viewFrom;ke<Te.viewTo;ke++)zo(re.cm,ke,"gutter")}}function Mu(re,de,Te,ke){if(re.cm&&!re.cm.curOp)return Ar(re.cm,Mu)(re,de,Te,ke);if(de.to.line<re.first){Rh(re,de.text.length-1-(de.to.line-de.from.line));return}if(!(de.from.line>re.lastLine())){if(de.from.line<re.first){var Ie=de.text.length-1-(re.first-de.from.line);Rh(re,Ie),de={from:cn(re.first,0),to:cn(de.to.line+Ie,de.to.ch),text:[on(de.text)],origin:de.origin}}var tt=re.lastLine();de.to.line>tt&&(de={from:de.from,to:cn(tt,xn(re,tt).text.length),text:[de.text[0]],origin:de.origin}),de.removed=Zn(re,de.from,de.to),Te||(Te=Ao(re,de)),re.cm?Lc(re.cm,de,ke):Rs(re,de,ke),Wa(re,Te,yt),re.cantEdit&&ic(re,cn(re.firstLine(),0))&&(re.cantEdit=!1)}}function Lc(re,de,Te){var ke=re.doc,Ie=re.display,tt=de.from,gt=de.to,Et=!1,Pt=tt.line;re.options.lineWrapping||(Pt=rn(br(xn(ke,tt.line))),ke.iter(Pt,gt.line+1,function(Ln){if(Ln==Ie.maxLine)return Et=!0,!0})),ke.sel.contains(de.from,de.to)>-1&&Ki(re),Rs(ke,de,Te,Gs(re)),re.options.lineWrapping||(ke.iter(Pt,tt.line+de.text.length,function(Ln){var Si=Ur(Ln);Si>Ie.maxLineLength&&(Ie.maxLine=Ln,Ie.maxLineLength=Si,Ie.maxLineChanged=!0,Et=!1)}),Et&&(re.curOp.updateMaxLine=!0)),Yr(ke,tt.line),Wt(re,400);var zt=de.text.length-(gt.line-tt.line)-1;de.full?Ds(re):tt.line==gt.line&&de.text.length==1&&!_o(re.doc,de)?zo(re,tt.line,"text"):Ds(re,tt.line,gt.line+1,zt);var mn=Yn(re,"changes"),Xt=Yn(re,"change");if(Xt||mn){var Nn={from:tt,to:gt,text:de.text,removed:de.removed,origin:de.origin};Xt&&Ei(re,"change",re,Nn),mn&&(re.curOp.changeObjs||(re.curOp.changeObjs=[])).push(Nn)}re.display.selForContextMenu=null}function th(re,de,Te,ke,Ie){var tt;ke||(ke=Te),qn(ke,Te)<0&&(tt=[ke,Te],Te=tt[0],ke=tt[1]),typeof de=="string"&&(de=re.splitLines(de)),Uu(re,{from:Te,to:ke,text:de,origin:Ie})}function Zl(re,de,Te,ke){Te<re.line?re.line+=ke:de<re.line&&(re.line=de,re.ch=0)}function vh(re,de,Te,ke){for(var Ie=0;Ie<re.length;++Ie){var tt=re[Ie],gt=!0;if(tt.ranges){tt.copied||(tt=re[Ie]=tt.deepCopy(),tt.copied=!0);for(var Et=0;Et<tt.ranges.length;Et++)Zl(tt.ranges[Et].anchor,de,Te,ke),Zl(tt.ranges[Et].head,de,Te,ke);continue}for(var Pt=0;Pt<tt.changes.length;++Pt){var zt=tt.changes[Pt];if(Te<zt.from.line)zt.from=cn(zt.from.line+ke,zt.from.ch),zt.to=cn(zt.to.line+ke,zt.to.ch);else if(de<=zt.to.line){gt=!1;break}}gt||(re.splice(0,Ie+1),Ie=0)}}function Mc(re,de){var Te=de.from.line,ke=de.to.line,Ie=de.text.length-(ke-Te)-1;vh(re.done,Te,ke,Ie),vh(re.undone,Te,ke,Ie)}function bo(re,de,Te,ke){var Ie=de,tt=de;return typeof de=="number"?tt=xn(re,bi(re,de)):Ie=rn(de),Ie==null?null:(ke(tt,Ie)&&re.cm&&zo(re.cm,Ie,Te),tt)}function ao(re){this.lines=re,this.parent=null;for(var de=0,Te=0;Te<re.length;++Te)re[Te].parent=this,de+=re[Te].height;this.height=de}ao.prototype={chunkSize:function(){return this.lines.length},removeInner:function(re,de){for(var Te=re,ke=re+de;Te<ke;++Te){var Ie=this.lines[Te];this.height-=Ie.height,Qo(Ie),Ei(Ie,"delete")}this.lines.splice(re,de)},collapse:function(re){re.push.apply(re,this.lines)},insertInner:function(re,de,Te){this.height+=Te,this.lines=this.lines.slice(0,re).concat(de).concat(this.lines.slice(re));for(var ke=0;ke<de.length;++ke)de[ke].parent=this},iterN:function(re,de,Te){for(var ke=re+de;re<ke;++re)if(Te(this.lines[re]))return!0}};function Qr(re){this.children=re;for(var de=0,Te=0,ke=0;ke<re.length;++ke){var Ie=re[ke];de+=Ie.chunkSize(),Te+=Ie.height,Ie.parent=this}this.size=de,this.height=Te,this.parent=null}Qr.prototype={chunkSize:function(){return this.size},removeInner:function(re,de){this.size-=de;for(var Te=0;Te<this.children.length;++Te){var ke=this.children[Te],Ie=ke.chunkSize();if(re<Ie){var tt=Math.min(de,Ie-re),gt=ke.height;if(ke.removeInner(re,tt),this.height-=gt-ke.height,Ie==tt&&(this.children.splice(Te--,1),ke.parent=null),(de-=tt)==0)break;re=0}else re-=Ie}if(this.size-de<25&&(this.children.length>1||!(this.children[0]instanceof ao))){var Et=[];this.collapse(Et),this.children=[new ao(Et)],this.children[0].parent=this}},collapse:function(re){for(var de=0;de<this.children.length;++de)this.children[de].collapse(re)},insertInner:function(re,de,Te){this.size+=de.length,this.height+=Te;for(var ke=0;ke<this.children.length;++ke){var Ie=this.children[ke],tt=Ie.chunkSize();if(re<=tt){if(Ie.insertInner(re,de,Te),Ie.lines&&Ie.lines.length>50){for(var gt=Ie.lines.length%25+25,Et=gt;Et<Ie.lines.length;){var Pt=new ao(Ie.lines.slice(Et,Et+=25));Ie.height-=Pt.height,this.children.splice(++ke,0,Pt),Pt.parent=this}Ie.lines=Ie.lines.slice(0,gt),this.maybeSpill()}break}re-=tt}},maybeSpill:function(){if(!(this.children.length<=10)){var re=this;do{var de=re.children.splice(re.children.length-5,5),Te=new Qr(de);if(re.parent){re.size-=Te.size,re.height-=Te.height;var Ie=lt(re.parent.children,re);re.parent.children.splice(Ie+1,0,Te)}else{var ke=new Qr(re.children);ke.parent=re,re.children=[ke,Te],re=ke}Te.parent=re.parent}while(re.children.length>10);re.parent.maybeSpill()}},iterN:function(re,de,Te){for(var ke=0;ke<this.children.length;++ke){var Ie=this.children[ke],tt=Ie.chunkSize();if(re<tt){var gt=Math.min(de,tt-re);if(Ie.iterN(re,gt,Te))return!0;if((de-=gt)==0)break;re=0}else re-=tt}}};var Is=function(re,de,Te){if(Te)for(var ke in Te)Te.hasOwnProperty(ke)&&(this[ke]=Te[ke]);this.doc=re,this.node=de};Is.prototype.clear=function(){var re=this.doc.cm,de=this.line.widgets,Te=this.line,ke=rn(Te);if(!(ke==null||!de)){for(var Ie=0;Ie<de.length;++Ie)de[Ie]==this&&de.splice(Ie--,1);de.length||(Te.widgets=null);var tt=Hs(this);Bn(Te,Math.max(0,Te.height-tt)),re&&(Xi(re,function(){Ba(re,Te,-tt),zo(re,ke,"widget")}),Ei(re,"lineWidgetCleared",re,this,ke))}},Is.prototype.changed=function(){var re=this,de=this.height,Te=this.doc.cm,ke=this.line;this.height=null;var Ie=Hs(this)-de;Ie&&(Sn(this.doc,ke)||Bn(ke,ke.height+Ie),Te&&Xi(Te,function(){Te.curOp.forceUpdate=!0,Ba(Te,ke,Ie),Ei(Te,"lineWidgetChanged",Te,re,rn(ke))}))},Qi(Is);function Ba(re,de,Te){Wi(de)<(re.curOp&&re.curOp.scrollTop||re.doc.scrollTop)&&Ec(re,Te)}function yh(re,de,Te,ke){var Ie=new Is(re,Te,ke),tt=re.cm;return tt&&Ie.noHScroll&&(tt.display.alignWidgets=!0),bo(re,de,"widget",function(gt){var Et=gt.widgets||(gt.widgets=[]);if(Ie.insertAt==null?Et.push(Ie):Et.splice(Math.min(Et.length-1,Math.max(0,Ie.insertAt)),0,Ie),Ie.line=gt,tt&&!Sn(re,gt)){var Pt=Wi(gt)<re.scrollTop;Bn(gt,gt.height+Hs(Ie)),Pt&&Ec(tt,Ie.height),tt.curOp.forceUpdate=!0}return!0}),tt&&Ei(tt,"lineWidgetAdded",tt,Ie,typeof de=="number"?de:rn(de)),Ie}var Hu=0,ln=function(re,de){this.lines=[],this.type=de,this.doc=re,this.id=++Hu};ln.prototype.clear=function(){if(!this.explicitlyCleared){var re=this.doc.cm,de=re&&!re.curOp;if(de&&ci(re),Yn(this,"clear")){var Te=this.find();Te&&Ei(this,"clear",Te.from,Te.to)}for(var ke=null,Ie=null,tt=0;tt<this.lines.length;++tt){var gt=this.lines[tt],Et=jn(gt.markedSpans,this);re&&!this.collapsed?zo(re,rn(gt),"text"):re&&(Et.to!=null&&(Ie=rn(gt)),Et.from!=null&&(ke=rn(gt))),gt.markedSpans=Ft(gt.markedSpans,Et),Et.from==null&&this.collapsed&&!Sn(this.doc,gt)&&re&&Bn(gt,Cu(re.display))}if(re&&this.collapsed&&!re.options.lineWrapping)for(var Pt=0;Pt<this.lines.length;++Pt){var zt=br(this.lines[Pt]),mn=Ur(zt);mn>re.display.maxLineLength&&(re.display.maxLine=zt,re.display.maxLineLength=mn,re.display.maxLineChanged=!0)}ke!=null&&re&&this.collapsed&&Ds(re,ke,Ie+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,re&&fu(re.doc)),re&&Ei(re,"markerCleared",re,this,ke,Ie),de&&ni(re),this.parent&&this.parent.clear()}},ln.prototype.find=function(re,de){re==null&&this.type=="bookmark"&&(re=1);for(var Te,ke,Ie=0;Ie<this.lines.length;++Ie){var tt=this.lines[Ie],gt=jn(tt.markedSpans,this);if(gt.from!=null&&(Te=cn(de?tt:rn(tt),gt.from),re==-1))return Te;if(gt.to!=null&&(ke=cn(de?tt:rn(tt),gt.to),re==1))return ke}return Te&&{from:Te,to:ke}},ln.prototype.changed=function(){var re=this,de=this.find(-1,!0),Te=this,ke=this.doc.cm;!de||!ke||Xi(ke,function(){var Ie=de.line,tt=rn(de.line),gt=za(ke,tt);if(gt&&(Dd(gt),ke.curOp.selectionChanged=ke.curOp.forceUpdate=!0),ke.curOp.updateMaxLine=!0,!Sn(Te.doc,Ie)&&Te.height!=null){var Et=Te.height;Te.height=null;var Pt=Hs(Te)-Et;Pt&&Bn(Ie,Ie.height+Pt)}Ei(ke,"markerChanged",ke,re)})},ln.prototype.attachLine=function(re){if(!this.lines.length&&this.doc.cm){var de=this.doc.cm.curOp;(!de.maybeHiddenMarkers||lt(de.maybeHiddenMarkers,this)==-1)&&(de.maybeUnhiddenMarkers||(de.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(re)},ln.prototype.detachLine=function(re){if(this.lines.splice(lt(this.lines,re),1),!this.lines.length&&this.doc.cm){var de=this.doc.cm.curOp;(de.maybeHiddenMarkers||(de.maybeHiddenMarkers=[])).push(this)}},Qi(ln);function nh(re,de,Te,ke,Ie){if(ke&&ke.shared)return sc(re,de,Te,ke,Ie);if(re.cm&&!re.cm.curOp)return Ar(re.cm,nh)(re,de,Te,ke,Ie);var tt=new ln(re,Ie),gt=qn(de,Te);if(ke&&$t(ke,tt,!1),gt>0||gt==0&&tt.clearWhenEmpty!==!1)return tt;if(tt.replacedWith&&(tt.collapsed=!0,tt.widgetNode=$e("span",[tt.replacedWith],"CodeMirror-widget"),ke.handleMouseEvents||tt.widgetNode.setAttribute("cm-ignore-events","true"),ke.insertLeft&&(tt.widgetNode.insertLeft=!0)),tt.collapsed){if(co(re,de.line,de,Te,tt)||de.line!=Te.line&&co(re,Te.line,de,Te,tt))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ut()}tt.addToHistory&&du(re,{from:de,to:Te,origin:"markText"},re.sel,NaN);var Et=de.line,Pt=re.cm,zt;if(re.iter(Et,Te.line+1,function(Xt){Pt&&tt.collapsed&&!Pt.options.lineWrapping&&br(Xt)==Pt.display.maxLine&&(zt=!0),tt.collapsed&&Et!=de.line&&Bn(Xt,0),Yt(Xt,new en(tt,Et==de.line?de.ch:null,Et==Te.line?Te.ch:null)),++Et}),tt.collapsed&&re.iter(de.line,Te.line+1,function(Xt){Sn(re,Xt)&&Bn(Xt,0)}),tt.clearOnEnter&&Mn(tt,"beforeCursorEnter",function(){return tt.clear()}),tt.readOnly&&(ns(),(re.history.done.length||re.history.undone.length)&&re.clearHistory()),tt.collapsed&&(tt.id=++Hu,tt.atomic=!0),Pt){if(zt&&(Pt.curOp.updateMaxLine=!0),tt.collapsed)Ds(Pt,de.line,Te.line+1);else if(tt.className||tt.startStyle||tt.endStyle||tt.css||tt.attributes||tt.title)for(var mn=de.line;mn<=Te.line;mn++)zo(Pt,mn,"text");tt.atomic&&fu(Pt.doc),Ei(Pt,"markerAdded",Pt,tt)}return tt}var Ol=function(re,de){this.markers=re,this.primary=de;for(var Te=0;Te<re.length;++Te)re[Te].parent=this};Ol.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var re=0;re<this.markers.length;++re)this.markers[re].clear();Ei(this,"clear")}},Ol.prototype.find=function(re,de){return this.primary.find(re,de)},Qi(Ol);function sc(re,de,Te,ke,Ie){ke=$t(ke),ke.shared=!1;var tt=[nh(re,de,Te,ke,Ie)],gt=tt[0],Et=ke.widgetNode;return ua(re,function(Pt){Et&&(ke.widgetNode=Et.cloneNode(!0)),tt.push(nh(Pt,li(Pt,de),li(Pt,Te),ke,Ie));for(var zt=0;zt<Pt.linked.length;++zt)if(Pt.linked[zt].isParent)return;gt=on(tt)}),new Ol(tt,gt)}function pf(re){return re.findMarks(cn(re.first,0),re.clipPos(cn(re.lastLine())),function(de){return de.parent})}function gf(re,de){for(var Te=0;Te<de.length;Te++){var ke=de[Te],Ie=ke.find(),tt=re.clipPos(Ie.from),gt=re.clipPos(Ie.to);if(qn(tt,gt)){var Et=nh(re,tt,gt,ke.primary,ke.primary.type);ke.markers.push(Et),Et.parent=ke}}}function Rd(re){for(var de=function(ke){var Ie=re[ke],tt=[Ie.primary.doc];ua(Ie.primary.doc,function(Pt){return tt.push(Pt)});for(var gt=0;gt<Ie.markers.length;gt++){var Et=Ie.markers[gt];lt(tt,Et.doc)==-1&&(Et.parent=null,Ie.markers.splice(gt--,1))}},Te=0;Te<re.length;Te++)de(Te)}var Wp=0,tl=function(re,de,Te,ke,Ie){if(!(this instanceof tl))return new tl(re,de,Te,ke,Ie);Te==null&&(Te=0),Qr.call(this,[new ao([new Jr("",null)])]),this.first=Te,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=Te;var tt=cn(Te,0);this.sel=rr(tt),this.history=new Uo(null),this.id=++Wp,this.modeOption=de,this.lineSep=ke,this.direction=Ie=="rtl"?"rtl":"ltr",this.extend=!1,typeof re=="string"&&(re=this.splitLines(re)),Rs(this,{from:tt,to:tt,text:re}),ys(this,rr(tt),yt)};tl.prototype=ze(Qr.prototype,{constructor:tl,iter:function(re,de,Te){Te?this.iterN(re-this.first,de-re,Te):this.iterN(this.first,this.first+this.size,re)},insert:function(re,de){for(var Te=0,ke=0;ke<de.length;++ke)Te+=de[ke].height;this.insertInner(re-this.first,de,Te)},remove:function(re,de){this.removeInner(re-this.first,de)},getValue:function(re){var de=wi(this,this.first,this.first+this.size);return re===!1?de:de.join(re||this.lineSeparator())},setValue:kt(function(re){var de=cn(this.first,0),Te=this.first+this.size-1;Uu(this,{from:de,to:cn(Te,xn(this,Te).text.length),text:this.splitLines(re),origin:"setValue",full:!0},!0),this.cm&&eh(this.cm,0,0),ys(this,rr(de),yt)}),replaceRange:function(re,de,Te,ke){de=li(this,de),Te=Te?li(this,Te):de,th(this,re,de,Te,ke)},getRange:function(re,de,Te){var ke=Zn(this,li(this,re),li(this,de));return Te===!1?ke:ke.join(Te||this.lineSeparator())},getLine:function(re){var de=this.getLineHandle(re);return de&&de.text},getLineHandle:function(re){if(vi(this,re))return xn(this,re)},getLineNumber:function(re){return rn(re)},getLineHandleVisualStart:function(re){return typeof re=="number"&&(re=xn(this,re)),br(re)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(re){return li(this,re)},getCursor:function(re){var de=this.sel.primary(),Te;return re==null||re=="head"?Te=de.head:re=="anchor"?Te=de.anchor:re=="end"||re=="to"||re===!1?Te=de.to():Te=de.from(),Te},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:kt(function(re,de,Te){Ga(this,li(this,typeof re=="number"?cn(re,de||0):re),null,Te)}),setSelection:kt(function(re,de,Te){Ga(this,li(this,re),li(this,de||re),Te)}),extendSelection:kt(function(re,de,Te){$a(this,li(this,re),de&&li(this,de),Te)}),extendSelections:kt(function(re,de){ea(this,jr(this,re),de)}),extendSelectionsBy:kt(function(re,de){var Te=Jt(this.sel.ranges,re);ea(this,jr(this,Te),de)}),setSelections:kt(function(re,de,Te){if(re.length){for(var ke=[],Ie=0;Ie<re.length;Ie++)ke[Ie]=new hr(li(this,re[Ie].anchor),li(this,re[Ie].head));de==null&&(de=Math.min(re.length-1,this.sel.primIndex)),ys(this,wo(this.cm,ke,de),Te)}}),addSelection:kt(function(re,de,Te){var ke=this.sel.ranges.slice(0);ke.push(new hr(li(this,re),li(this,de||re))),ys(this,wo(this.cm,ke,ke.length-1),Te)}),getSelection:function(re){for(var de=this.sel.ranges,Te,ke=0;ke<de.length;ke++){var Ie=Zn(this,de[ke].from(),de[ke].to());Te=Te?Te.concat(Ie):Ie}return re===!1?Te:Te.join(re||this.lineSeparator())},getSelections:function(re){for(var de=[],Te=this.sel.ranges,ke=0;ke<Te.length;ke++){var Ie=Zn(this,Te[ke].from(),Te[ke].to());re!==!1&&(Ie=Ie.join(re||this.lineSeparator())),de[ke]=Ie}return de},replaceSelection:function(re,de,Te){for(var ke=[],Ie=0;Ie<this.sel.ranges.length;Ie++)ke[Ie]=re;this.replaceSelections(ke,de,Te||"+input")},replaceSelections:kt(function(re,de,Te){for(var ke=[],Ie=this.sel,tt=0;tt<Ie.ranges.length;tt++){var gt=Ie.ranges[tt];ke[tt]={from:gt.from(),to:gt.to(),text:this.splitLines(re[tt]),origin:Te}}for(var Et=de&&de!="end"&&Bo(this,ke,de),Pt=ke.length-1;Pt>=0;Pt--)Uu(this,ke[Pt]);Et?Kl(this,Et):this.cm&&ju(this.cm)}),undo:kt(function(){Lu(this,"undo")}),redo:kt(function(){Lu(this,"redo")}),undoSelection:kt(function(){Lu(this,"undo",!0)}),redoSelection:kt(function(){Lu(this,"redo",!0)}),setExtending:function(re){this.extend=re},getExtending:function(){return this.extend},historySize:function(){for(var re=this.history,de=0,Te=0,ke=0;ke<re.done.length;ke++)re.done[ke].ranges||++de;for(var Ie=0;Ie<re.undone.length;Ie++)re.undone[Ie].ranges||++Te;return{undo:de,redo:Te}},clearHistory:function(){var re=this;this.history=new Uo(this.history.maxGeneration),ua(this,function(de){return de.history=re.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(re){return re&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(re){return this.history.generation==(re||this.cleanGeneration)},getHistory:function(){return{done:Ms(this.history.done),undone:Ms(this.history.undone)}},setHistory:function(re){var de=this.history=new Uo(this.history.maxGeneration);de.done=Ms(re.done.slice(0),null,!0),de.undone=Ms(re.undone.slice(0),null,!0)},setGutterMarker:kt(function(re,de,Te){return bo(this,re,"gutter",function(ke){var Ie=ke.gutterMarkers||(ke.gutterMarkers={});return Ie[de]=Te,!Te&&nt(Ie)&&(ke.gutterMarkers=null),!0})}),clearGutter:kt(function(re){var de=this;this.iter(function(Te){Te.gutterMarkers&&Te.gutterMarkers[re]&&bo(de,Te,"gutter",function(){return Te.gutterMarkers[re]=null,nt(Te.gutterMarkers)&&(Te.gutterMarkers=null),!0})})}),lineInfo:function(re){var de;if(typeof re=="number"){if(!vi(this,re)||(de=re,re=xn(this,re),!re))return null}else if(de=rn(re),de==null)return null;return{line:de,handle:re,text:re.text,gutterMarkers:re.gutterMarkers,textClass:re.textClass,bgClass:re.bgClass,wrapClass:re.wrapClass,widgets:re.widgets}},addLineClass:kt(function(re,de,Te){return bo(this,re,de=="gutter"?"gutter":"class",function(ke){var Ie=de=="text"?"textClass":de=="background"?"bgClass":de=="gutter"?"gutterClass":"wrapClass";if(!ke[Ie])ke[Ie]=Te;else{if(Ce(Te).test(ke[Ie]))return!1;ke[Ie]+=" "+Te}return!0})}),removeLineClass:kt(function(re,de,Te){return bo(this,re,de=="gutter"?"gutter":"class",function(ke){var Ie=de=="text"?"textClass":de=="background"?"bgClass":de=="gutter"?"gutterClass":"wrapClass",tt=ke[Ie];if(tt)if(Te==null)ke[Ie]=null;else{var gt=tt.match(Ce(Te));if(!gt)return!1;var Et=gt.index+gt[0].length;ke[Ie]=tt.slice(0,gt.index)+(!gt.index||Et==tt.length?"":" ")+tt.slice(Et)||null}else return!1;return!0})}),addLineWidget:kt(function(re,de,Te){return yh(this,re,de,Te)}),removeLineWidget:function(re){re.clear()},markText:function(re,de,Te){return nh(this,li(this,re),li(this,de),Te,Te&&Te.type||"range")},setBookmark:function(re,de){var Te={replacedWith:de&&(de.nodeType==null?de.widget:de),insertLeft:de&&de.insertLeft,clearWhenEmpty:!1,shared:de&&de.shared,handleMouseEvents:de&&de.handleMouseEvents};return re=li(this,re),nh(this,re,re,Te,"bookmark")},findMarksAt:function(re){re=li(this,re);var de=[],Te=xn(this,re.line).markedSpans;if(Te)for(var ke=0;ke<Te.length;++ke){var Ie=Te[ke];(Ie.from==null||Ie.from<=re.ch)&&(Ie.to==null||Ie.to>=re.ch)&&de.push(Ie.marker.parent||Ie.marker)}return de},findMarks:function(re,de,Te){re=li(this,re),de=li(this,de);var ke=[],Ie=re.line;return this.iter(re.line,de.line+1,function(tt){var gt=tt.markedSpans;if(gt)for(var Et=0;Et<gt.length;Et++){var Pt=gt[Et];!(Pt.to!=null&&Ie==re.line&&re.ch>=Pt.to||Pt.from==null&&Ie!=re.line||Pt.from!=null&&Ie==de.line&&Pt.from>=de.ch)&&(!Te||Te(Pt.marker))&&ke.push(Pt.marker.parent||Pt.marker)}++Ie}),ke},getAllMarks:function(){var re=[];return this.iter(function(de){var Te=de.markedSpans;if(Te)for(var ke=0;ke<Te.length;++ke)Te[ke].from!=null&&re.push(Te[ke].marker)}),re},posFromIndex:function(re){var de,Te=this.first,ke=this.lineSeparator().length;return this.iter(function(Ie){var tt=Ie.text.length+ke;if(tt>re)return de=re,!0;re-=tt,++Te}),li(this,cn(Te,de))},indexFromPos:function(re){re=li(this,re);var de=re.ch;if(re.line<this.first||re.ch<0)return 0;var Te=this.lineSeparator().length;return this.iter(this.first,re.line,function(ke){de+=ke.text.length+Te}),de},copy:function(re){var de=new tl(wi(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return de.scrollTop=this.scrollTop,de.scrollLeft=this.scrollLeft,de.sel=this.sel,de.extend=!1,re&&(de.history.undoDepth=this.history.undoDepth,de.setHistory(this.getHistory())),de},linkedDoc:function(re){re||(re={});var de=this.first,Te=this.first+this.size;re.from!=null&&re.from>de&&(de=re.from),re.to!=null&&re.to<Te&&(Te=re.to);var ke=new tl(wi(this,de,Te),re.mode||this.modeOption,de,this.lineSep,this.direction);return re.sharedHist&&(ke.history=this.history),(this.linked||(this.linked=[])).push({doc:ke,sharedHist:re.sharedHist}),ke.linked=[{doc:this,isParent:!0,sharedHist:re.sharedHist}],gf(ke,pf(this)),ke},unlinkDoc:function(re){if(re instanceof Ps&&(re=re.doc),this.linked)for(var de=0;de<this.linked.length;++de){var Te=this.linked[de];if(Te.doc==re){this.linked.splice(de,1),re.unlinkDoc(this),Rd(pf(this));break}}if(re.history==this.history){var ke=[re.id];ua(re,function(Ie){return ke.push(Ie.id)},!0),re.history=new Uo(null),re.history.done=Ms(this.history.done,ke),re.history.undone=Ms(this.history.undone,ke)}},iterLinkedDocs:function(re){ua(this,re)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(re){return this.lineSep?re.split(this.lineSep):kn(re)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:kt(function(re){re!="rtl"&&(re="ltr"),re!=this.direction&&(this.direction=re,this.iter(function(de){return de.order=null}),this.cm&&ho(this.cm))})}),tl.prototype.eachLine=tl.prototype.iter;var id=0;function Id(re){var de=this;if(Bd(de),!(Cn(de,re)||Ks(de.display,re))){vr(re),Ee&&(id=+new Date);var Te=qa(de,re,!0),ke=re.dataTransfer.files;if(!(!Te||de.isReadOnly()))if(ke&&ke.length&&window.FileReader&&window.File)for(var Ie=ke.length,tt=Array(Ie),gt=0,Et=function(){++gt==Ie&&Ar(de,function(){Te=li(de.doc,Te);var Ln={from:Te,to:Te,text:de.doc.splitLines(tt.filter(function(Si){return Si!=null}).join(de.doc.lineSeparator())),origin:"paste"};Uu(de.doc,Ln),Kl(de.doc,rr(li(de.doc,Te),li(de.doc,$o(Ln))))})()},Pt=function(Ln,Si){if(de.options.allowDropFileTypes&<(de.options.allowDropFileTypes,Ln.type)==-1){Et();return}var Li=new FileReader;Li.onerror=function(){return Et()},Li.onload=function(){var Bi=Li.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Bi)){Et();return}tt[Si]=Bi,Et()},Li.readAsText(Ln)},zt=0;zt<ke.length;zt++)Pt(ke[zt],zt);else{if(de.state.draggingText&&de.doc.sel.contains(Te)>-1){de.state.draggingText(re),setTimeout(function(){return de.display.input.focus()},20);return}try{var mn=re.dataTransfer.getData("Text");if(mn){var Xt;if(de.state.draggingText&&!de.state.draggingText.copy&&(Xt=de.listSelections()),Wa(de.doc,rr(Te,Te)),Xt)for(var Nn=0;Nn<Xt.length;++Nn)th(de.doc,"",Xt[Nn].anchor,Xt[Nn].head,"drag");de.replaceSelection(mn,"around","paste"),de.display.input.focus()}}catch(Ln){}}}}function rd(re,de){if(Ee&&(!re.state.draggingText||+new Date-id<100)){kr(de);return}if(!(Cn(re,de)||Ks(re.display,de))&&(de.dataTransfer.setData("Text",re.getSelection()),de.dataTransfer.effectAllowed="copyMove",de.dataTransfer.setDragImage&&!he)){var Te=We("img",null,null,"position: fixed; left: 0; top: 0;");Te.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ge&&(Te.width=Te.height=1,re.display.wrapper.appendChild(Te),Te._top=Te.offsetTop),de.dataTransfer.setDragImage(Te,0,0),ge&&Te.parentNode.removeChild(Te)}}function Fd(re,de){var Te=qa(re,de);if(Te){var ke=document.createDocumentFragment();rs(re,Te,ke),re.display.dragCursor||(re.display.dragCursor=We("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),re.display.lineSpace.insertBefore(re.display.dragCursor,re.display.cursorDiv)),Re(re.display.dragCursor,ke)}}function Bd(re){re.display.dragCursor&&(re.display.lineSpace.removeChild(re.display.dragCursor),re.display.dragCursor=null)}function mf(re){if(document.getElementsByClassName){for(var de=document.getElementsByClassName("CodeMirror"),Te=[],ke=0;ke<de.length;ke++){var Ie=de[ke].CodeMirror;Ie&&Te.push(Ie)}Te.length&&Te[0].operation(function(){for(var tt=0;tt<Te.length;tt++)re(Te[tt])})}}var jd=!1;function Yl(){jd||(ac(),jd=!0)}function ac(){var re;Mn(window,"resize",function(){re==null&&(re=setTimeout(function(){re=null,mf(vf)},100))}),Mn(window,"blur",function(){return mf(mh)})}function vf(re){var de=re.display;de.cachedCharWidth=de.cachedTextHeight=de.cachedPaddingH=null,de.scrollbarsClipped=!1,re.setSize()}for(var Gu={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"},lc=0;lc<10;lc++)Gu[lc+48]=Gu[lc+96]=String(lc);for(var od=65;od<=90;od++)Gu[od]=String.fromCharCode(od);for(var uc=1;uc<=12;uc++)Gu[uc+111]=Gu[uc+63235]="F"+uc;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 yf(re){var de=re.split(/-(?!$)/);re=de[de.length-1];for(var Te,ke,Ie,tt,gt=0;gt<de.length-1;gt++){var Et=de[gt];if(/^(cmd|meta|m)$/i.test(Et))tt=!0;else if(/^a(lt)?$/i.test(Et))Te=!0;else if(/^(c|ctrl|control)$/i.test(Et))ke=!0;else if(/^s(hift)?$/i.test(Et))Ie=!0;else throw new Error("Unrecognized modifier name: "+Et)}return Te&&(re="Alt-"+re),ke&&(re="Ctrl-"+re),tt&&(re="Cmd-"+re),Ie&&(re="Shift-"+re),re}function fs(re){var de={};for(var Te in re)if(re.hasOwnProperty(Te)){var ke=re[Te];if(/^(name|fallthrough|(de|at)tach)$/.test(Te))continue;if(ke=="..."){delete re[Te];continue}for(var Ie=Jt(Te.split(" "),yf),tt=0;tt<Ie.length;tt++){var gt=void 0,Et=void 0;tt==Ie.length-1?(Et=Ie.join(" "),gt=ke):(Et=Ie.slice(0,tt+1).join(" "),gt="...");var Pt=de[Et];if(!Pt)de[Et]=gt;else if(Pt!=gt)throw new Error("Inconsistent bindings for "+Et)}delete re[Te]}for(var zt in de)re[zt]=de[zt];return re}function Yo(re,de,Te,ke){de=ku(de);var Ie=de.call?de.call(re,ke):de[re];if(Ie===!1)return"nothing";if(Ie==="...")return"multi";if(Ie!=null&&Te(Ie))return"handled";if(de.fallthrough){if(Object.prototype.toString.call(de.fallthrough)!="[object Array]")return Yo(re,de.fallthrough,Te,ke);for(var tt=0;tt<de.fallthrough.length;tt++){var gt=Yo(re,de.fallthrough[tt],Te,ke);if(gt)return gt}}}function Oa(re){var de=typeof re=="string"?re:Gu[re.keyCode];return de=="Ctrl"||de=="Alt"||de=="Shift"||de=="Mod"}function iu(re,de,Te){var ke=re;return de.altKey&&ke!="Alt"&&(re="Alt-"+re),(Se?de.metaKey:de.ctrlKey)&&ke!="Ctrl"&&(re="Ctrl-"+re),(Se?de.ctrlKey:de.metaKey)&&ke!="Mod"&&(re="Cmd-"+re),!Te&&de.shiftKey&&ke!="Shift"&&(re="Shift-"+re),re}function ul(re,de){if(ge&&re.keyCode==34&&re.char)return!1;var Te=Gu[re.keyCode];return Te==null||re.altGraphKey?!1:(re.keyCode==3&&re.code&&(Te=re.code),iu(Te,re,de))}function ku(re){return typeof re=="string"?Rl[re]:re}function ja(re,de){for(var Te=re.doc.sel.ranges,ke=[],Ie=0;Ie<Te.length;Ie++){for(var tt=de(Te[Ie]);ke.length&&qn(tt.from,on(ke).to)<=0;){var gt=ke.pop();if(qn(gt.from,tt.from)<0){tt.from=gt.from;break}}ke.push(tt)}Xi(re,function(){for(var Et=ke.length-1;Et>=0;Et--)th(re.doc,"",ke[Et].from,ke[Et].to,"+delete");ju(re)})}function Sh(re,de,Te){var ke=Ue(re.text,de+Te,Te);return ke<0||ke>re.text.length?null:ke}function aa(re,de,Te){var ke=Sh(re,de.ch,Te);return ke==null?null:new cn(de.line,ke,Te<0?"after":"before")}function hc(re,de,Te,ke,Ie){if(re){de.doc.direction=="rtl"&&(Ie=-Ie);var tt=vn(Te,de.doc.direction);if(tt){var gt=Ie<0?on(tt):tt[0],Et=Ie<0==(gt.level==1),Pt=Et?"after":"before",zt;if(gt.level>0||de.doc.direction=="rtl"){var mn=Tl(de,Te);zt=Ie<0?Te.text.length-1:0;var Xt=Al(de,mn,zt).top;zt=rt(function(Nn){return Al(de,mn,Nn).top==Xt},Ie<0==(gt.level==1)?gt.from:gt.to-1,zt),Pt=="before"&&(zt=Sh(Te,zt,1))}else zt=Ie<0?gt.to:gt.from;return new cn(ke,zt,Pt)}}return new cn(ke,Ie<0?Te.text.length:0,Ie<0?"before":"after")}function Zf(re,de,Te,ke){var Ie=vn(de,re.doc.direction);if(!Ie)return aa(de,Te,ke);Te.ch>=de.text.length?(Te.ch=de.text.length,Te.sticky="before"):Te.ch<=0&&(Te.ch=0,Te.sticky="after");var tt=mt(Ie,Te.ch,Te.sticky),gt=Ie[tt];if(re.doc.direction=="ltr"&>.level%2==0&&(ke>0?gt.to>Te.ch:gt.from<Te.ch))return aa(de,Te,ke);var Et=function(cr,Ir){return Sh(de,cr instanceof cn?cr.ch:cr,Ir)},Pt,zt=function(cr){return re.options.lineWrapping?(Pt=Pt||Tl(re,de),ed(re,de,Pt,cr)):{begin:0,end:de.text.length}},mn=zt(Te.sticky=="before"?Et(Te,-1):Te.ch);if(re.doc.direction=="rtl"||gt.level==1){var Xt=gt.level==1==ke<0,Nn=Et(Te,Xt?1:-1);if(Nn!=null&&(Xt?Nn<=gt.to&&Nn<=mn.end:Nn>=gt.from&&Nn>=mn.begin)){var Ln=Xt?"before":"after";return new cn(Te.line,Nn,Ln)}}var Si=function(cr,Ir,Pr){for(var Wr=function(da,il){return il?new cn(Te.line,Et(da,1),"before"):new cn(Te.line,da,"after")};cr>=0&&cr<Ie.length;cr+=Ir){var No=Ie[cr],wr=Ir>0==(No.level!=1),ts=wr?Pr.begin:Et(Pr.end,-1);if(No.from<=ts&&ts<No.to||(ts=wr?No.from:Et(No.to,-1),Pr.begin<=ts&&ts<Pr.end))return Wr(ts,wr)}},Li=Si(tt+ke,ke,mn);if(Li)return Li;var Bi=ke>0?mn.end:Et(mn.begin,-1);return Bi!=null&&!(ke>0&&Bi==de.text.length)&&(Li=Si(ke>0?0:Ie.length-1,ke,zt(Bi)),Li)?Li:null}var kc={selectAll:va,singleSelection:function(re){return re.setSelection(re.getCursor("anchor"),re.getCursor("head"),yt)},killLine:function(re){return ja(re,function(de){if(de.empty()){var Te=xn(re.doc,de.head.line).text.length;return de.head.ch==Te&&de.head.line<re.lastLine()?{from:de.head,to:cn(de.head.line+1,0)}:{from:de.head,to:cn(de.head.line,Te)}}else return{from:de.from(),to:de.to()}})},deleteLine:function(re){return ja(re,function(de){return{from:cn(de.from().line,0),to:li(re.doc,cn(de.to().line+1,0))}})},delLineLeft:function(re){return ja(re,function(de){return{from:cn(de.from().line,0),to:de.from()}})},delWrappedLineLeft:function(re){return ja(re,function(de){var Te=re.charCoords(de.head,"div").top+5,ke=re.coordsChar({left:0,top:Te},"div");return{from:ke,to:de.from()}})},delWrappedLineRight:function(re){return ja(re,function(de){var Te=re.charCoords(de.head,"div").top+5,ke=re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:Te},"div");return{from:de.from(),to:ke}})},undo:function(re){return re.undo()},redo:function(re){return re.redo()},undoSelection:function(re){return re.undoSelection()},redoSelection:function(re){return re.redoSelection()},goDocStart:function(re){return re.extendSelection(cn(re.firstLine(),0))},goDocEnd:function(re){return re.extendSelection(cn(re.lastLine()))},goLineStart:function(re){return re.extendSelectionsBy(function(de){return zd(re,de.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(re){return re.extendSelectionsBy(function(de){return Kp(re,de.head)},{origin:"+move",bias:1})},goLineEnd:function(re){return re.extendSelectionsBy(function(de){return Ud(re,de.head.line)},{origin:"+move",bias:-1})},goLineRight:function(re){return re.extendSelectionsBy(function(de){var Te=re.cursorCoords(de.head,"div").top+5;return re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:Te},"div")},Kt)},goLineLeft:function(re){return re.extendSelectionsBy(function(de){var Te=re.cursorCoords(de.head,"div").top+5;return re.coordsChar({left:0,top:Te},"div")},Kt)},goLineLeftSmart:function(re){return re.extendSelectionsBy(function(de){var Te=re.cursorCoords(de.head,"div").top+5,ke=re.coordsChar({left:0,top:Te},"div");return ke.ch<re.getLine(ke.line).search(/\S/)?Kp(re,de.head):ke},Kt)},goLineUp:function(re){return re.moveV(-1,"line")},goLineDown:function(re){return re.moveV(1,"line")},goPageUp:function(re){return re.moveV(-1,"page")},goPageDown:function(re){return re.moveV(1,"page")},goCharLeft:function(re){return re.moveH(-1,"char")},goCharRight:function(re){return re.moveH(1,"char")},goColumnLeft:function(re){return re.moveH(-1,"column")},goColumnRight:function(re){return re.moveH(1,"column")},goWordLeft:function(re){return re.moveH(-1,"word")},goGroupRight:function(re){return re.moveH(1,"group")},goGroupLeft:function(re){return re.moveH(-1,"group")},goWordRight:function(re){return re.moveH(1,"word")},delCharBefore:function(re){return re.deleteH(-1,"codepoint")},delCharAfter:function(re){return re.deleteH(1,"char")},delWordBefore:function(re){return re.deleteH(-1,"word")},delWordAfter:function(re){return re.deleteH(1,"word")},delGroupBefore:function(re){return re.deleteH(-1,"group")},delGroupAfter:function(re){return re.deleteH(1,"group")},indentAuto:function(re){return re.indentSelection("smart")},indentMore:function(re){return re.indentSelection("add")},indentLess:function(re){return re.indentSelection("subtract")},insertTab:function(re){return re.replaceSelection(" ")},insertSoftTab:function(re){for(var de=[],Te=re.listSelections(),ke=re.options.tabSize,Ie=0;Ie<Te.length;Ie++){var tt=Te[Ie].from(),gt=st(re.getLine(tt.line),tt.ch,ke);de.push(Dt(ke-gt%ke))}re.replaceSelections(de)},defaultTab:function(re){re.somethingSelected()?re.indentSelection("add"):re.execCommand("insertTab")},transposeChars:function(re){return Xi(re,function(){for(var de=re.listSelections(),Te=[],ke=0;ke<de.length;ke++)if(de[ke].empty()){var Ie=de[ke].head,tt=xn(re.doc,Ie.line).text;if(tt){if(Ie.ch==tt.length&&(Ie=new cn(Ie.line,Ie.ch-1)),Ie.ch>0)Ie=new cn(Ie.line,Ie.ch+1),re.replaceRange(tt.charAt(Ie.ch-1)+tt.charAt(Ie.ch-2),cn(Ie.line,Ie.ch-2),Ie,"+transpose");else if(Ie.line>re.doc.first){var gt=xn(re.doc,Ie.line-1).text;gt&&(Ie=new cn(Ie.line,1),re.replaceRange(tt.charAt(0)+re.doc.lineSeparator()+gt.charAt(gt.length-1),cn(Ie.line-1,gt.length-1),Ie,"+transpose"))}}Te.push(new hr(Ie,Ie))}re.setSelections(Te)})},newlineAndIndent:function(re){return Xi(re,function(){for(var de=re.listSelections(),Te=de.length-1;Te>=0;Te--)re.replaceRange(re.doc.lineSeparator(),de[Te].anchor,de[Te].head,"+input");de=re.listSelections();for(var ke=0;ke<de.length;ke++)re.indentLine(de[ke].from().line,null,!0);ju(re)})},openLine:function(re){return re.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(re){return re.toggleOverwrite()}};function zd(re,de){var Te=xn(re.doc,de),ke=br(Te);return ke!=Te&&(de=rn(ke)),hc(!0,re,ke,de,1)}function Ud(re,de){var Te=xn(re.doc,de),ke=ir(Te);return ke!=Te&&(de=rn(ke)),hc(!0,re,Te,de,-1)}function Kp(re,de){var Te=zd(re,de.line),ke=xn(re.doc,Te.line),Ie=vn(ke,re.doc.direction);if(!Ie||Ie[0].level==0){var tt=Math.max(Te.ch,ke.text.search(/\S/)),gt=de.line==Te.line&&de.ch<=tt&&de.ch;return cn(Te.line,gt?0:tt,Te.sticky)}return Te}function Hd(re,de,Te){if(typeof de=="string"&&(de=kc[de],!de))return!1;re.display.input.ensurePolled();var ke=re.display.shift,Ie=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Te&&(re.display.shift=!1),Ie=de(re)!=bt}finally{re.display.shift=ke,re.state.suppressEdits=!1}return Ie}function Vp(re,de,Te){for(var ke=0;ke<re.state.keyMaps.length;ke++){var Ie=Yo(de,re.state.keyMaps[ke],Te,re);if(Ie)return Ie}return re.options.extraKeys&&Yo(de,re.options.extraKeys,Te,re)||Yo(de,re.options.keyMap,Te,re)}var Ih=new et;function sd(re,de,Te,ke){var Ie=re.state.keySeq;if(Ie){if(Oa(de))return"handled";if(/\'$/.test(de)?re.state.keySeq=null:Ih.set(50,function(){re.state.keySeq==Ie&&(re.state.keySeq=null,re.display.input.reset())}),Yf(re,Ie+" "+de,Te,ke))return!0}return Yf(re,de,Te,ke)}function Yf(re,de,Te,ke){var Ie=Vp(re,de,ke);return Ie=="multi"&&(re.state.keySeq=de),Ie=="handled"&&Ei(re,"keyHandled",re,de,Te),(Ie=="handled"||Ie=="multi")&&(vr(Te),bs(re)),!!Ie}function Xf(re,de){var Te=ul(de,!0);return Te?de.shiftKey&&!re.state.keySeq?sd(re,"Shift-"+Te,de,function(ke){return Hd(re,ke,!0)})||sd(re,Te,de,function(ke){if(typeof ke=="string"?/^go[A-Z]/.test(ke):ke.motion)return Hd(re,ke)}):sd(re,Te,de,function(ke){return Hd(re,ke)}):!1}function Jf(re,de,Te){return sd(re,"'"+Te+"'",de,function(ke){return Hd(re,ke,!0)})}var ad=null;function Zp(re){var de=this;if(!(re.target&&re.target!=de.display.input.getField())&&(de.curOp.focus=St(),!Cn(de,re))){Ee&&me<11&&re.keyCode==27&&(re.returnValue=!1);var Te=re.keyCode;de.display.shift=Te==16||re.shiftKey;var ke=Xf(de,re);ge&&(ad=ke?Te:null,!ke&&Te==88&&!Tn&&(oe?re.metaKey:re.ctrlKey)&&de.replaceSelection("",null,"cut")),Le&&!oe&&!ke&&Te==46&&re.shiftKey&&!re.ctrlKey&&document.execCommand&&document.execCommand("cut"),Te==18&&!/\bCodeMirror-crosshair\b/.test(de.display.lineDiv.className)&&Yp(de)}}function Yp(re){var de=re.display.lineDiv;Mt(de,"CodeMirror-crosshair");function Te(ke){(ke.keyCode==18||!ke.altKey)&&(Ae(de,"CodeMirror-crosshair"),mi(document,"keyup",Te),mi(document,"mouseover",Te))}Mn(document,"keyup",Te),Mn(document,"mouseover",Te)}function Xp(re){re.keyCode==16&&(this.doc.sel.shift=!1),Cn(this,re)}function xh(re){var de=this;if(!(re.target&&re.target!=de.display.input.getField())&&!(Ks(de.display,re)||Cn(de,re)||re.ctrlKey&&!re.altKey||oe&&re.metaKey)){var Te=re.keyCode,ke=re.charCode;if(ge&&Te==ad){ad=null,vr(re);return}if(!(ge&&(!re.which||re.which<10)&&Xf(de,re))){var Ie=String.fromCharCode(ke==null?Te:ke);Ie!="\b"&&(Jf(de,re,Ie)||de.display.input.onKeyPress(re))}}}var om=400,Jp=function(re,de,Te){this.time=re,this.pos=de,this.button=Te};Jp.prototype.compare=function(re,de,Te){return this.time+om>re&&qn(de,this.pos)==0&&Te==this.button};var Gd,ld;function qp(re,de){var Te=+new Date;return ld&&ld.compare(Te,re,de)?(Gd=ld=null,"triple"):Gd&&Gd.compare(Te,re,de)?(ld=new Jp(Te,re,de),Gd=null,"double"):(Gd=new Jp(Te,re,de),ld=null,"single")}function wh(re){var de=this,Te=de.display;if(!(Cn(de,re)||Te.activeTouch&&Te.input.supportsTouch())){if(Te.input.ensurePolled(),Te.shift=re.shiftKey,Ks(Te,re)){be||(Te.scroller.draggable=!1,setTimeout(function(){return Te.scroller.draggable=!0},100));return}if(!$f(de,re)){var ke=qa(de,re),Ie=qo(re),tt=ke?qp(ke,Ie):"single";window.focus(),Ie==1&&de.state.selectingText&&de.state.selectingText(re),!(ke&&Qp(de,Ie,ke,tt,re))&&(Ie==1?ke?sm(de,ke,tt,re):vo(re)==Te.scroller&&vr(re):Ie==2?(ke&&$a(de.doc,ke),setTimeout(function(){return Te.input.focus()},20)):Ie==3&&(pe?de.display.input.onContextMenu(re):Ws(de)))}}}function Qp(re,de,Te,ke,Ie){var tt="Click";return ke=="double"?tt="Double"+tt:ke=="triple"&&(tt="Triple"+tt),tt=(de==1?"Left":de==2?"Middle":"Right")+tt,sd(re,iu(tt,Ie),Ie,function(gt){if(typeof gt=="string"&&(gt=kc[gt]),!gt)return!1;var Et=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Et=gt(re,Te)!=bt}finally{re.state.suppressEdits=!1}return Et})}function qf(re,de,Te){var ke=re.getOption("configureMouse"),Ie=ke?ke(re,de,Te):{};if(Ie.unit==null){var tt=ie?Te.shiftKey&&Te.metaKey:Te.altKey;Ie.unit=tt?"rectangle":de=="single"?"char":de=="double"?"word":"line"}return(Ie.extend==null||re.doc.extend)&&(Ie.extend=re.doc.extend||Te.shiftKey),Ie.addNew==null&&(Ie.addNew=oe?Te.metaKey:Te.ctrlKey),Ie.moveOnDrag==null&&(Ie.moveOnDrag=!(oe?Te.altKey:Te.ctrlKey)),Ie}function sm(re,de,Te,ke){Ee?setTimeout(ft(Os,re),0):re.curOp.focus=St();var Ie=qf(re,Te,ke),tt=re.doc.sel,gt;re.options.dragDrop&&Do&&!re.isReadOnly()&&Te=="single"&&(gt=tt.contains(de))>-1&&(qn((gt=tt.ranges[gt]).from(),de)<0||de.xRel>0)&&(qn(gt.to(),de)>0||de.xRel<0)?$p(re,ke,de,Ie):nv(re,ke,de,Ie)}function $p(re,de,Te,ke){var Ie=re.display,tt=!1,gt=Ar(re,function(zt){be&&(Ie.scroller.draggable=!1),re.state.draggingText=!1,mi(Ie.wrapper.ownerDocument,"mouseup",gt),mi(Ie.wrapper.ownerDocument,"mousemove",Et),mi(Ie.scroller,"dragstart",Pt),mi(Ie.scroller,"drop",gt),tt||(vr(zt),ke.addNew||$a(re.doc,Te,null,null,ke.extend),be&&!he||Ee&&me==9?setTimeout(function(){Ie.wrapper.ownerDocument.body.focus({preventScroll:!0}),Ie.input.focus()},20):Ie.input.focus())}),Et=function(zt){tt=tt||Math.abs(de.clientX-zt.clientX)+Math.abs(de.clientY-zt.clientY)>=10},Pt=function(){return tt=!0};be&&(Ie.scroller.draggable=!0),re.state.draggingText=gt,gt.copy=!ke.moveOnDrag,Ie.scroller.dragDrop&&Ie.scroller.dragDrop(),Mn(Ie.wrapper.ownerDocument,"mouseup",gt),Mn(Ie.wrapper.ownerDocument,"mousemove",Et),Mn(Ie.scroller,"dragstart",Pt),Mn(Ie.scroller,"drop",gt),Ws(re),setTimeout(function(){return Ie.input.focus()},20)}function eg(re,de,Te){if(Te=="char")return new hr(de,de);if(Te=="word")return re.findWordAt(de);if(Te=="line")return new hr(cn(de.line,0),li(re.doc,cn(de.line+1,0)));var ke=Te(re,de);return new hr(ke.from,ke.to)}function nv(re,de,Te,ke){var Ie=re.display,tt=re.doc;vr(de);var gt,Et,Pt=tt.sel,zt=Pt.ranges;if(ke.addNew&&!ke.extend?(Et=tt.sel.contains(Te),Et>-1?gt=zt[Et]:gt=new hr(Te,Te)):(gt=tt.sel.primary(),Et=tt.sel.primIndex),ke.unit=="rectangle")ke.addNew||(gt=new hr(Te,Te)),Te=qa(re,de,!0,!0),Et=-1;else{var mn=eg(re,Te,ke.unit);ke.extend?gt=Pa(gt,mn.anchor,mn.head,ke.extend):gt=mn}ke.addNew?Et==-1?(Et=zt.length,ys(tt,wo(re,zt.concat([gt]),Et),{scroll:!1,origin:"*mouse"})):zt.length>1&&zt[Et].empty()&&ke.unit=="char"&&!ke.extend?(ys(tt,wo(re,zt.slice(0,Et).concat(zt.slice(Et+1)),0),{scroll:!1,origin:"*mouse"}),Pt=tt.sel):Ha(tt,Et,gt,Vt):(Et=0,ys(tt,new Lr([gt],0),Vt),Pt=tt.sel);var Xt=Te;function Nn(Pr){if(qn(Xt,Pr)!=0)if(Xt=Pr,ke.unit=="rectangle"){for(var Wr=[],No=re.options.tabSize,wr=st(xn(tt,Te.line).text,Te.ch,No),ts=st(xn(tt,Pr.line).text,Pr.ch,No),da=Math.min(wr,ts),il=Math.max(wr,ts),wa=Math.min(Te.line,Pr.line),ou=Math.min(re.lastLine(),Math.max(Te.line,Pr.line));wa<=ou;wa++){var Il=xn(tt,wa).text,Va=gn(Il,da,No);da==il?Wr.push(new hr(cn(wa,Va),cn(wa,Va))):Il.length>Va&&Wr.push(new hr(cn(wa,Va),cn(wa,gn(Il,il,No))))}Wr.length||Wr.push(new hr(Te,Te)),ys(tt,wo(re,Pt.ranges.slice(0,Et).concat(Wr),Et),{origin:"*mouse",scroll:!1}),re.scrollIntoView(Pr)}else{var pu=gt,Pl=eg(re,Pr,ke.unit),Za=pu.anchor,Es;qn(Pl.anchor,Za)>0?(Es=Pl.head,Za=Ti(pu.from(),Pl.anchor)):(Es=Pl.anchor,Za=_r(pu.to(),Pl.head));var Ca=Pt.ranges.slice(0);Ca[Et]=am(re,new hr(li(tt,Za),Es)),ys(tt,wo(re,Ca,Et),Vt)}}var Ln=Ie.wrapper.getBoundingClientRect(),Si=0;function Li(Pr){var Wr=++Si,No=qa(re,Pr,!0,ke.unit=="rectangle");if(No)if(qn(No,Xt)!=0){re.curOp.focus=St(),Nn(No);var wr=Ko(Ie,tt);(No.line>=wr.to||No.line<wr.from)&&setTimeout(Ar(re,function(){Si==Wr&&Li(Pr)}),150)}else{var ts=Pr.clientY<Ln.top?-20:Pr.clientY>Ln.bottom?20:0;ts&&setTimeout(Ar(re,function(){Si==Wr&&(Ie.scroller.scrollTop+=ts,Li(Pr))}),50)}}function Bi(Pr){re.state.selectingText=!1,Si=1/0,Pr&&(vr(Pr),Ie.input.focus()),mi(Ie.wrapper.ownerDocument,"mousemove",cr),mi(Ie.wrapper.ownerDocument,"mouseup",Ir),tt.history.lastSelOrigin=null}var cr=Ar(re,function(Pr){Pr.buttons===0||!qo(Pr)?Bi(Pr):Li(Pr)}),Ir=Ar(re,Bi);re.state.selectingText=Ir,Mn(Ie.wrapper.ownerDocument,"mousemove",cr),Mn(Ie.wrapper.ownerDocument,"mouseup",Ir)}function am(re,de){var Te=de.anchor,ke=de.head,Ie=xn(re.doc,Te.line);if(qn(Te,ke)==0&&Te.sticky==ke.sticky)return de;var tt=vn(Ie);if(!tt)return de;var gt=mt(tt,Te.ch,Te.sticky),Et=tt[gt];if(Et.from!=Te.ch&&Et.to!=Te.ch)return de;var Pt=gt+(Et.from==Te.ch==(Et.level!=1)?0:1);if(Pt==0||Pt==tt.length)return de;var zt;if(ke.line!=Te.line)zt=(ke.line-Te.line)*(re.doc.direction=="ltr"?1:-1)>0;else{var mn=mt(tt,ke.ch,ke.sticky),Xt=mn-gt||(ke.ch-Te.ch)*(Et.level==1?-1:1);mn==Pt-1||mn==Pt?zt=Xt<0:zt=Xt>0}var Nn=tt[Pt+(zt?-1:0)],Ln=zt==(Nn.level==1),Si=Ln?Nn.from:Nn.to,Li=Ln?"after":"before";return Te.ch==Si&&Te.sticky==Li?de:new hr(new cn(Te.line,Si,Li),ke)}function Qf(re,de,Te,ke){var Ie,tt;if(de.touches)Ie=de.touches[0].clientX,tt=de.touches[0].clientY;else try{Ie=de.clientX,tt=de.clientY}catch(Nn){return!1}if(Ie>=Math.floor(re.display.gutters.getBoundingClientRect().right))return!1;ke&&vr(de);var gt=re.display,Et=gt.lineDiv.getBoundingClientRect();if(tt>Et.bottom||!Yn(re,Te))return Ci(de);tt-=Et.top-gt.viewOffset;for(var Pt=0;Pt<re.display.gutterSpecs.length;++Pt){var zt=gt.gutters.childNodes[Pt];if(zt&&zt.getBoundingClientRect().right>=Ie){var mn=Fn(re.doc,tt),Xt=re.display.gutterSpecs[Pt];return si(re,Te,re,mn,Xt.className,de),Ci(de)}}}function $f(re,de){return Qf(re,de,"gutterClick",!0)}function ep(re,de){Ks(re.display,de)||lm(re,de)||Cn(re,de,"contextmenu")||pe||re.display.input.onContextMenu(de)}function lm(re,de){return Yn(re,"gutterContextMenu")?Qf(re,de,"gutterContextMenu",!1):!1}function tp(re){re.display.wrapper.className=re.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+re.options.theme.replace(/(^|\s)\s*/g," cm-s-"),bu(re)}var Tc={toString:function(){return"CodeMirror.Init"}},tg={},Sf={};function um(re){var de=re.optionHandlers;function Te(ke,Ie,tt,gt){re.defaults[ke]=Ie,tt&&(de[ke]=gt?function(Et,Pt,zt){zt!=Tc&&tt(Et,Pt,zt)}:tt)}re.defineOption=Te,re.Init=Tc,Te("value","",function(ke,Ie){return ke.setValue(Ie)},!0),Te("mode",null,function(ke,Ie){ke.doc.modeOption=Ie,Ri(ke)},!0),Te("indentUnit",2,Ri,!0),Te("indentWithTabs",!1),Te("smartIndent",!0),Te("tabSize",4,function(ke){$s(ke),bu(ke),Ds(ke)},!0),Te("lineSeparator",null,function(ke,Ie){if(ke.doc.lineSep=Ie,!!Ie){var tt=[],gt=ke.doc.first;ke.doc.iter(function(Pt){for(var zt=0;;){var mn=Pt.text.indexOf(Ie,zt);if(mn==-1)break;zt=mn+Ie.length,tt.push(cn(gt,mn))}gt++});for(var Et=tt.length-1;Et>=0;Et--)th(ke.doc,Ie,tt[Et],cn(tt[Et].line,tt[Et].ch+Ie.length))}}),Te("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(ke,Ie,tt){ke.state.specialChars=new RegExp(Ie.source+(Ie.test(" ")?"":"| "),"g"),tt!=Tc&&ke.refresh()}),Te("specialCharPlaceholder",ss,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,Ie){return ke.getInputField().spellcheck=Ie},!0),Te("autocorrect",!1,function(ke,Ie){return ke.getInputField().autocorrect=Ie},!0),Te("autocapitalize",!1,function(ke,Ie){return ke.getInputField().autocapitalize=Ie},!0),Te("rtlMoveVisually",!se),Te("wholeLineUpdateBefore",!0),Te("theme","default",function(ke){tp(ke),Or(ke)},!0),Te("keyMap","default",function(ke,Ie,tt){var gt=ku(Ie),Et=tt!=Tc&&ku(tt);Et&&Et.detach&&Et.detach(ke,gt),gt.attach&>.attach(ke,Et||null)}),Te("extraKeys",null),Te("configureMouse",null),Te("lineWrapping",!1,hm,!0),Te("gutters",[],function(ke,Ie){ke.display.gutterSpecs=tr(Ie,ke.options.lineNumbers),Or(ke)},!0),Te("fixedGutter",!0,function(ke,Ie){ke.display.gutters.style.left=Ie?gh(ke.display)+"px":"0",ke.refresh()},!0),Te("coverGutterNextToScrollbar",!1,function(ke){return On(ke)},!0),Te("scrollbarStyle","native",function(ke){oi(ke),On(ke),ke.display.scrollbars.setScrollTop(ke.doc.scrollTop),ke.display.scrollbars.setScrollLeft(ke.doc.scrollLeft)},!0),Te("lineNumbers",!1,function(ke,Ie){ke.display.gutterSpecs=tr(ke.options.gutters,Ie),Or(ke)},!0),Te("firstLineNumber",1,Or,!0),Te("lineNumberFormatter",function(ke){return ke},Or,!0),Te("showCursorWhenSelecting",!1,sa,!0),Te("resetSelectionOnContextMenu",!0),Te("lineWiseCopyCut",!0),Te("pasteLinesPerSelection",!0),Te("selectionsMayTouch",!1),Te("readOnly",!1,function(ke,Ie){Ie=="nocursor"&&(mh(ke),ke.display.input.blur()),ke.display.input.readOnlyChanged(Ie)}),Te("screenReaderLabel",null,function(ke,Ie){Ie=Ie===""?null:Ie,ke.display.input.screenReaderLabelChanged(Ie)}),Te("disableInput",!1,function(ke,Ie){Ie||ke.display.input.reset()},!0),Te("dragDrop",!0,np),Te("allowDropFileTypes",null),Te("cursorBlinkRate",530),Te("cursorScrollMargin",0),Te("cursorHeight",1,sa,!0),Te("singleCursorHeightPerLine",!0,sa,!0),Te("workTime",100),Te("workDelay",100),Te("flattenSpans",!0,$s,!0),Te("addModeClass",!1,$s,!0),Te("pollInterval",100),Te("undoDepth",200,function(ke,Ie){return ke.doc.history.undoDepth=Ie}),Te("historyEventDelay",1250),Te("viewportMargin",10,function(ke){return ke.refresh()},!0),Te("maxHighlightLength",1e4,$s,!0),Te("moveInputWithCursor",!0,function(ke,Ie){Ie||ke.display.input.resetPosition()}),Te("tabindex",null,function(ke,Ie){return ke.display.input.getField().tabIndex=Ie||""}),Te("autofocus",null),Te("direction","ltr",function(ke,Ie){return ke.doc.setDirection(Ie)},!0),Te("phrases",null)}function np(re,de,Te){var ke=Te&&Te!=Tc;if(!de!=!ke){var Ie=re.display.dragFunctions,tt=de?Mn:mi;tt(re.display.scroller,"dragstart",Ie.start),tt(re.display.scroller,"dragenter",Ie.enter),tt(re.display.scroller,"dragover",Ie.over),tt(re.display.scroller,"dragleave",Ie.leave),tt(re.display.scroller,"drop",Ie.drop)}}function hm(re){re.options.lineWrapping?(Mt(re.display.wrapper,"CodeMirror-wrap"),re.display.sizer.style.minWidth="",re.display.sizerWidth=null):(Ae(re.display.wrapper,"CodeMirror-wrap"),Xr(re)),Kr(re),Ds(re),bu(re),setTimeout(function(){return On(re)},100)}function Ps(re,de){var Te=this;if(!(this instanceof Ps))return new Ps(re,de);this.options=de=de?$t(de):{},$t(tg,de,!1);var ke=de.value;typeof ke=="string"?ke=new tl(ke,de.mode,null,de.lineSeparator,de.direction):de.mode&&(ke.modeOption=de.mode),this.doc=ke;var Ie=new Ps.inputStyles[de.inputStyle](this),tt=this.display=new So(re,ke,Ie,de);tt.wrapper.CodeMirror=this,tp(this),de.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),oi(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 et,keySeq:null,specialChars:null},de.autofocus&&!z&&tt.input.focus(),Ee&&me<11&&setTimeout(function(){return Te.display.input.reset(!0)},20),Wd(this),Yl(),ci(this),this.curOp.forceUpdate=!0,Cs(this,ke),de.autofocus&&!z||this.hasFocus()?setTimeout(function(){Te.hasFocus()&&!Te.state.focused&&as(Te)},20):mh(this);for(var gt in Sf)Sf.hasOwnProperty(gt)&&Sf[gt](this,de[gt],Tc);sr(this),de.finishInit&&de.finishInit(this);for(var Et=0;Et<ud.length;++Et)ud[Et](this);ni(this),be&&de.lineWrapping&&getComputedStyle(tt.lineDiv).textRendering=="optimizelegibility"&&(tt.lineDiv.style.textRendering="auto")}Ps.defaults=tg,Ps.optionHandlers=Sf;function Wd(re){var de=re.display;Mn(de.scroller,"mousedown",Ar(re,wh)),Ee&&me<11?Mn(de.scroller,"dblclick",Ar(re,function(Pt){if(!Cn(re,Pt)){var zt=qa(re,Pt);if(!(!zt||$f(re,Pt)||Ks(re.display,Pt))){vr(Pt);var mn=re.findWordAt(zt);$a(re.doc,mn.anchor,mn.head)}}})):Mn(de.scroller,"dblclick",function(Pt){return Cn(re,Pt)||vr(Pt)}),Mn(de.scroller,"contextmenu",function(Pt){return ep(re,Pt)}),Mn(de.input.getField(),"contextmenu",function(Pt){de.scroller.contains(Pt.target)||ep(re,Pt)});var Te,ke={end:0};function Ie(){de.activeTouch&&(Te=setTimeout(function(){return de.activeTouch=null},1e3),ke=de.activeTouch,ke.end=+new Date)}function tt(Pt){if(Pt.touches.length!=1)return!1;var zt=Pt.touches[0];return zt.radiusX<=1&&zt.radiusY<=1}function gt(Pt,zt){if(zt.left==null)return!0;var mn=zt.left-Pt.left,Xt=zt.top-Pt.top;return mn*mn+Xt*Xt>20*20}Mn(de.scroller,"touchstart",function(Pt){if(!Cn(re,Pt)&&!tt(Pt)&&!$f(re,Pt)){de.input.ensurePolled(),clearTimeout(Te);var zt=+new Date;de.activeTouch={start:zt,moved:!1,prev:zt-ke.end<=300?ke:null},Pt.touches.length==1&&(de.activeTouch.left=Pt.touches[0].pageX,de.activeTouch.top=Pt.touches[0].pageY)}}),Mn(de.scroller,"touchmove",function(){de.activeTouch&&(de.activeTouch.moved=!0)}),Mn(de.scroller,"touchend",function(Pt){var zt=de.activeTouch;if(zt&&!Ks(de,Pt)&&zt.left!=null&&!zt.moved&&new Date-zt.start<300){var mn=re.coordsChar(de.activeTouch,"page"),Xt;!zt.prev||gt(zt,zt.prev)?Xt=new hr(mn,mn):!zt.prev.prev||gt(zt,zt.prev.prev)?Xt=re.findWordAt(mn):Xt=new hr(cn(mn.line,0),li(re.doc,cn(mn.line+1,0))),re.setSelection(Xt.anchor,Xt.head),re.focus(),vr(Pt)}Ie()}),Mn(de.scroller,"touchcancel",Ie),Mn(de.scroller,"scroll",function(){de.scroller.clientHeight&&(Ht(re,de.scroller.scrollTop),Qt(re,de.scroller.scrollLeft,!0),si(re,"scroll",re))}),Mn(de.scroller,"mousewheel",function(Pt){return Vr(re,Pt)}),Mn(de.scroller,"DOMMouseScroll",function(Pt){return Vr(re,Pt)}),Mn(de.wrapper,"scroll",function(){return de.wrapper.scrollTop=de.wrapper.scrollLeft=0}),de.dragFunctions={enter:function(Pt){Cn(re,Pt)||kr(Pt)},over:function(Pt){Cn(re,Pt)||(Fd(re,Pt),kr(Pt))},start:function(Pt){return rd(re,Pt)},drop:Ar(re,Id),leave:function(Pt){Cn(re,Pt)||Bd(re)}};var Et=de.input.getField();Mn(Et,"keyup",function(Pt){return Xp.call(re,Pt)}),Mn(Et,"keydown",Ar(re,Zp)),Mn(Et,"keypress",Ar(re,xh)),Mn(Et,"focus",function(Pt){return as(re,Pt)}),Mn(Et,"blur",function(Pt){return mh(re,Pt)})}var ud=[];Ps.defineInitHook=function(re){return ud.push(re)};function nl(re,de,Te,ke){var Ie=re.doc,tt;Te==null&&(Te="add"),Te=="smart"&&(Ie.mode.indent?tt=Io(re,de).state:Te="prev");var gt=re.options.tabSize,Et=xn(Ie,de),Pt=st(Et.text,null,gt);Et.stateAfter&&(Et.stateAfter=null);var zt=Et.text.match(/^\s*/)[0],mn;if(!ke&&!/\S/.test(Et.text))mn=0,Te="not";else if(Te=="smart"&&(mn=Ie.mode.indent(tt,Et.text.slice(zt.length),Et.text),mn==bt||mn>150)){if(!ke)return;Te="prev"}Te=="prev"?de>Ie.first?mn=st(xn(Ie,de-1).text,null,gt):mn=0:Te=="add"?mn=Pt+re.options.indentUnit:Te=="subtract"?mn=Pt-re.options.indentUnit:typeof Te=="number"&&(mn=Pt+Te),mn=Math.max(0,mn);var Xt="",Nn=0;if(re.options.indentWithTabs)for(var Ln=Math.floor(mn/gt);Ln;--Ln)Nn+=gt,Xt+=" ";if(Nn<mn&&(Xt+=Dt(mn-Nn)),Xt!=zt)return th(Ie,Xt,cn(de,0),cn(de,zt.length),"+input"),Et.stateAfter=null,!0;for(var Si=0;Si<Ie.sel.ranges.length;Si++){var Li=Ie.sel.ranges[Si];if(Li.head.line==de&&Li.head.ch<zt.length){var Bi=cn(de,zt.length);Ha(Ie,Si,new hr(Bi,Bi));break}}}var ru=null;function hd(re){ru=re}function xf(re,de,Te,ke,Ie){var tt=re.doc;re.display.shift=!1,ke||(ke=tt.sel);var gt=+new Date-200,Et=Ie=="paste"||re.state.pasteIncoming>gt,Pt=kn(de),zt=null;if(Et&&ke.ranges.length>1)if(ru&&ru.text.join(`
|
|
|
`)==de){if(ke.ranges.length%ru.text.length==0){zt=[];for(var mn=0;mn<ru.text.length;mn++)zt.push(tt.splitLines(ru.text[mn]))}}else Pt.length==ke.ranges.length&&re.options.pasteLinesPerSelection&&(zt=Jt(Pt,function(cr){return[cr]}));for(var Xt=re.curOp.updateInput,Nn=ke.ranges.length-1;Nn>=0;Nn--){var Ln=ke.ranges[Nn],Si=Ln.from(),Li=Ln.to();Ln.empty()&&(Te&&Te>0?Si=cn(Si.line,Si.ch-Te):re.state.overwrite&&!Et?Li=cn(Li.line,Math.min(xn(tt,Li.line).text.length,Li.ch+on(Pt).length)):Et&&ru&&ru.lineWise&&ru.text.join(`
|
|
|
`)==Pt.join(`
|
|
|
`)&&(Si=Li=cn(Si.line,0)));var Bi={from:Si,to:Li,text:zt?zt[Nn%zt.length]:Pt,origin:Ie||(Et?"paste":re.state.cutIncoming>gt?"cut":"+input")};Uu(re.doc,Bi),Ei(re,"inputRead",re,Bi)}de&&!Et&&ig(re,de),ju(re),re.curOp.updateInput<2&&(re.curOp.updateInput=Xt),re.curOp.typing=!0,re.state.pasteIncoming=re.state.cutIncoming=-1}function ng(re,de){var Te=re.clipboardData&&re.clipboardData.getData("Text");if(Te)return re.preventDefault(),!de.isReadOnly()&&!de.options.disableInput&&Xi(de,function(){return xf(de,Te,0,null,"paste")}),!0}function ig(re,de){if(!(!re.options.electricChars||!re.options.smartIndent))for(var Te=re.doc.sel,ke=Te.ranges.length-1;ke>=0;ke--){var Ie=Te.ranges[ke];if(!(Ie.head.ch>100||ke&&Te.ranges[ke-1].head.line==Ie.head.line)){var tt=re.getModeAt(Ie.head),gt=!1;if(tt.electricChars){for(var Et=0;Et<tt.electricChars.length;Et++)if(de.indexOf(tt.electricChars.charAt(Et))>-1){gt=nl(re,Ie.head.line,"smart");break}}else tt.electricInput&&tt.electricInput.test(xn(re.doc,Ie.head.line).text.slice(0,Ie.head.ch))&&(gt=nl(re,Ie.head.line,"smart"));gt&&Ei(re,"electricInput",re,Ie.head.line)}}}function rg(re){for(var de=[],Te=[],ke=0;ke<re.doc.sel.ranges.length;ke++){var Ie=re.doc.sel.ranges[ke].head.line,tt={anchor:cn(Ie,0),head:cn(Ie+1,0)};Te.push(tt),de.push(re.getRange(tt.anchor,tt.head))}return{text:de,ranges:Te}}function og(re,de,Te,ke){re.setAttribute("autocorrect",Te?"":"off"),re.setAttribute("autocapitalize",ke?"":"off"),re.setAttribute("spellcheck",!!de)}function sg(){var re=We("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),de=We("div",[re],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return be?re.style.width="1000px":re.setAttribute("wrap","off"),ue&&(re.style.border="1px solid black"),og(re),de}function Ac(re){var de=re.optionHandlers,Te=re.helpers={};re.prototype={constructor:re,focus:function(){window.focus(),this.display.input.focus()},setOption:function(ke,Ie){var tt=this.options,gt=tt[ke];tt[ke]==Ie&&ke!="mode"||(tt[ke]=Ie,de.hasOwnProperty(ke)&&Ar(this,de[ke])(this,Ie,gt),si(this,"optionChange",this,ke))},getOption:function(ke){return this.options[ke]},getDoc:function(){return this.doc},addKeyMap:function(ke,Ie){this.state.keyMaps[Ie?"push":"unshift"](ku(ke))},removeKeyMap:function(ke){for(var Ie=this.state.keyMaps,tt=0;tt<Ie.length;++tt)if(Ie[tt]==ke||Ie[tt].name==ke)return Ie.splice(tt,1),!0},addOverlay:oo(function(ke,Ie){var tt=ke.token?ke:re.getMode(this.options,ke);if(tt.startState)throw new Error("Overlays may not be stateful.");jt(this.state.overlays,{mode:tt,modeSpec:ke,opaque:Ie&&Ie.opaque,priority:Ie&&Ie.priority||0},function(gt){return gt.priority}),this.state.modeGen++,Ds(this)}),removeOverlay:oo(function(ke){for(var Ie=this.state.overlays,tt=0;tt<Ie.length;++tt){var gt=Ie[tt].modeSpec;if(gt==ke||typeof ke=="string"&>.name==ke){Ie.splice(tt,1),this.state.modeGen++,Ds(this);return}}}),indentLine:oo(function(ke,Ie,tt){typeof Ie!="string"&&typeof Ie!="number"&&(Ie==null?Ie=this.options.smartIndent?"smart":"prev":Ie=Ie?"add":"subtract"),vi(this.doc,ke)&&nl(this,ke,Ie,tt)}),indentSelection:oo(function(ke){for(var Ie=this.doc.sel.ranges,tt=-1,gt=0;gt<Ie.length;gt++){var Et=Ie[gt];if(Et.empty())Et.head.line>tt&&(nl(this,Et.head.line,ke,!0),tt=Et.head.line,gt==this.doc.sel.primIndex&&ju(this));else{var Pt=Et.from(),zt=Et.to(),mn=Math.max(tt,Pt.line);tt=Math.min(this.lastLine(),zt.line-(zt.ch?0:1))+1;for(var Xt=mn;Xt<tt;++Xt)nl(this,Xt,ke);var Nn=this.doc.sel.ranges;Pt.ch==0&&Ie.length==Nn.length&&Nn[gt].from().ch>0&&Ha(this.doc,gt,new hr(Pt,Nn[gt].to()),yt)}}}),getTokenAt:function(ke,Ie){return yo(this,ke,Ie)},getLineTokens:function(ke,Ie){return yo(this,cn(ke),Ie,!0)},getTokenTypeAt:function(ke){ke=li(this.doc,ke);var Ie=cs(this,xn(this.doc,ke.line)),tt=0,gt=(Ie.length-1)/2,Et=ke.ch,Pt;if(Et==0)Pt=Ie[2];else for(;;){var zt=tt+gt>>1;if((zt?Ie[zt*2-1]:0)>=Et)gt=zt;else if(Ie[zt*2+1]<Et)tt=zt+1;else{Pt=Ie[zt*2+2];break}}var mn=Pt?Pt.indexOf("overlay "):-1;return mn<0?Pt:mn==0?null:Pt.slice(0,mn-1)},getModeAt:function(ke){var Ie=this.doc.mode;return Ie.innerMode?re.innerMode(Ie,this.getTokenAt(ke).state).mode:Ie},getHelper:function(ke,Ie){return this.getHelpers(ke,Ie)[0]},getHelpers:function(ke,Ie){var tt=[];if(!Te.hasOwnProperty(Ie))return tt;var gt=Te[Ie],Et=this.getModeAt(ke);if(typeof Et[Ie]=="string")gt[Et[Ie]]&&tt.push(gt[Et[Ie]]);else if(Et[Ie])for(var Pt=0;Pt<Et[Ie].length;Pt++){var zt=gt[Et[Ie][Pt]];zt&&tt.push(zt)}else Et.helperType&>[Et.helperType]?tt.push(gt[Et.helperType]):gt[Et.name]&&tt.push(gt[Et.name]);for(var mn=0;mn<gt._global.length;mn++){var Xt=gt._global[mn];Xt.pred(Et,this)&<(tt,Xt.val)==-1&&tt.push(Xt.val)}return tt},getStateAfter:function(ke,Ie){var tt=this.doc;return ke=bi(tt,ke==null?tt.first+tt.size-1:ke),Io(this,ke+1,Ie).state},cursorCoords:function(ke,Ie){var tt,gt=this.doc.sel.primary();return ke==null?tt=gt.head:typeof ke=="object"?tt=li(this.doc,ke):tt=ke?gt.from():gt.to(),Qs(this,tt,Ie||"page")},charCoords:function(ke,Ie){return Nl(this,li(this.doc,ke),Ie||"page")},coordsChar:function(ke,Ie){return ke=Th(this,ke,Ie||"page"),Nh(this,ke.left,ke.top)},lineAtHeight:function(ke,Ie){return ke=Th(this,{top:ke,left:0},Ie||"page").top,Fn(this.doc,ke+this.display.viewOffset)},heightAtLine:function(ke,Ie,tt){var gt=!1,Et;if(typeof ke=="number"){var Pt=this.doc.first+this.doc.size-1;ke<this.doc.first?ke=this.doc.first:ke>Pt&&(ke=Pt,gt=!0),Et=xn(this.doc,ke)}else Et=ke;return Aa(this,Et,{top:0,left:0},Ie||"page",tt||gt).top+(gt?this.doc.height-Wi(Et):0)},defaultTextHeight:function(){return Cu(this.display)},defaultCharWidth:function(){return Dh(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(ke,Ie,tt,gt,Et){var Pt=this.display;ke=Qs(this,li(this.doc,ke));var zt=ke.bottom,mn=ke.left;if(Ie.style.position="absolute",Ie.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Ie),Pt.sizer.appendChild(Ie),gt=="over")zt=ke.top;else if(gt=="above"||gt=="near"){var Xt=Math.max(Pt.wrapper.clientHeight,this.doc.height),Nn=Math.max(Pt.sizer.clientWidth,Pt.lineSpace.clientWidth);(gt=="above"||ke.bottom+Ie.offsetHeight>Xt)&&ke.top>Ie.offsetHeight?zt=ke.top-Ie.offsetHeight:ke.bottom+Ie.offsetHeight<=Xt&&(zt=ke.bottom),mn+Ie.offsetWidth>Nn&&(mn=Nn-Ie.offsetWidth)}Ie.style.top=zt+"px",Ie.style.left=Ie.style.right="",Et=="right"?(mn=Pt.sizer.clientWidth-Ie.offsetWidth,Ie.style.right="0px"):(Et=="left"?mn=0:Et=="middle"&&(mn=(Pt.sizer.clientWidth-Ie.offsetWidth)/2),Ie.style.left=mn+"px"),tt&&nc(this,{left:mn,top:zt,right:mn+Ie.offsetWidth,bottom:zt+Ie.offsetHeight})},triggerOnKeyDown:oo(Zp),triggerOnKeyPress:oo(xh),triggerOnKeyUp:Xp,triggerOnMouseDown:oo(wh),execCommand:function(ke){if(kc.hasOwnProperty(ke))return kc[ke].call(null,this)},triggerElectric:oo(function(ke){ig(this,ke)}),findPosH:function(ke,Ie,tt,gt){var Et=1;Ie<0&&(Et=-1,Ie=-Ie);for(var Pt=li(this.doc,ke),zt=0;zt<Ie&&(Pt=wf(this.doc,Pt,Et,tt,gt),!Pt.hitSide);++zt);return Pt},moveH:oo(function(ke,Ie){var tt=this;this.extendSelectionsBy(function(gt){return tt.display.shift||tt.doc.extend||gt.empty()?wf(tt.doc,gt.head,ke,Ie,tt.options.rtlMoveVisually):ke<0?gt.from():gt.to()},Kt)}),deleteH:oo(function(ke,Ie){var tt=this.doc.sel,gt=this.doc;tt.somethingSelected()?gt.replaceSelection("",null,"+delete"):ja(this,function(Et){var Pt=wf(gt,Et.head,ke,Ie,!1);return ke<0?{from:Pt,to:Et.head}:{from:Et.head,to:Pt}})}),findPosV:function(ke,Ie,tt,gt){var Et=1,Pt=gt;Ie<0&&(Et=-1,Ie=-Ie);for(var zt=li(this.doc,ke),mn=0;mn<Ie;++mn){var Xt=Qs(this,zt,"div");if(Pt==null?Pt=Xt.left:Xt.left=Pt,zt=Nc(this,Xt,Et,tt),zt.hitSide)break}return zt},moveV:oo(function(ke,Ie){var tt=this,gt=this.doc,Et=[],Pt=!this.display.shift&&!gt.extend&>.sel.somethingSelected();if(gt.extendSelectionsBy(function(mn){if(Pt)return ke<0?mn.from():mn.to();var Xt=Qs(tt,mn.head,"div");mn.goalColumn!=null&&(Xt.left=mn.goalColumn),Et.push(Xt.left);var Nn=Nc(tt,Xt,ke,Ie);return Ie=="page"&&mn==gt.sel.primary()&&Ec(tt,Nl(tt,Nn,"div").top-Xt.top),Nn},Kt),Et.length)for(var zt=0;zt<gt.sel.ranges.length;zt++)gt.sel.ranges[zt].goalColumn=Et[zt]}),findWordAt:function(ke){var Ie=this.doc,tt=xn(Ie,ke.line).text,gt=ke.ch,Et=ke.ch;if(tt){var Pt=this.getHelper(ke,"wordChars");(ke.sticky=="before"||Et==tt.length)&>?--gt:++Et;for(var zt=tt.charAt(gt),mn=ht(zt,Pt)?function(Xt){return ht(Xt,Pt)}:/\s/.test(zt)?function(Xt){return/\s/.test(Xt)}:function(Xt){return!/\s/.test(Xt)&&!ht(Xt)};gt>0&&mn(tt.charAt(gt-1));)--gt;for(;Et<tt.length&&mn(tt.charAt(Et));)++Et}return new hr(cn(ke.line,gt),cn(ke.line,Et))},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"),si(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==St()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:oo(function(ke,Ie){eh(this,ke,Ie)}),getScrollInfo:function(){var ke=this.display.scroller;return{left:ke.scrollLeft,top:ke.scrollTop,height:ke.scrollHeight-Ta(this)-this.display.barHeight,width:ke.scrollWidth-Ta(this)-this.display.barWidth,clientHeight:fh(this),clientWidth:al(this)}},scrollIntoView:oo(function(ke,Ie){ke==null?(ke={from:this.doc.sel.primary().head,to:null},Ie==null&&(Ie=this.options.cursorScrollMargin)):typeof ke=="number"?ke={from:cn(ke,0),to:null}:ke.from==null&&(ke={from:ke,to:null}),ke.to||(ke.to=ke.from),ke.margin=Ie||0,ke.from.line!=null?us(this,ke):_t(this,ke.from,ke.to,ke.margin)}),setSize:oo(function(ke,Ie){var tt=this,gt=function(Pt){return typeof Pt=="number"||/^\d+$/.test(String(Pt))?Pt+"px":Pt};ke!=null&&(this.display.wrapper.style.width=gt(ke)),Ie!=null&&(this.display.wrapper.style.height=gt(Ie)),this.options.lineWrapping&&Qh(this);var Et=this.display.viewFrom;this.doc.iter(Et,this.display.viewTo,function(Pt){if(Pt.widgets){for(var zt=0;zt<Pt.widgets.length;zt++)if(Pt.widgets[zt].noHScroll){zo(tt,Et,"widget");break}}++Et}),this.curOp.forceUpdate=!0,si(this,"refresh",this)}),operation:function(ke){return Xi(this,ke)},startOperation:function(){return ci(this)},endOperation:function(){return ni(this)},refresh:oo(function(){var ke=this.display.cachedTextHeight;Ds(this),this.curOp.forceUpdate=!0,bu(this),eh(this,this.doc.scrollLeft,this.doc.scrollTop),Oi(this.display),(ke==null||Math.abs(ke-Cu(this.display))>.5||this.options.lineWrapping)&&Kr(this),si(this,"refresh",this)}),swapDoc:oo(function(ke){var Ie=this.doc;return Ie.cm=null,this.state.selectingText&&this.state.selectingText(),Cs(this,ke),bu(this),this.display.input.reset(),eh(this,ke.scrollLeft,ke.scrollTop),this.curOp.forceScroll=!0,Ei(this,"swapDoc",this,Ie),Ie}),phrase:function(ke){var Ie=this.options.phrases;return Ie&&Object.prototype.hasOwnProperty.call(Ie,ke)?Ie[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}},Qi(re),re.registerHelper=function(ke,Ie,tt){Te.hasOwnProperty(ke)||(Te[ke]=re[ke]={_global:[]}),Te[ke][Ie]=tt},re.registerGlobalHelper=function(ke,Ie,tt,gt){re.registerHelper(ke,Ie,gt),Te[ke]._global.push({pred:tt,val:gt})}}function wf(re,de,Te,ke,Ie){var tt=de,gt=Te,Et=xn(re,de.line),Pt=Ie&&re.direction=="rtl"?-Te:Te;function zt(){var Ir=de.line+Pt;return Ir<re.first||Ir>=re.first+re.size?!1:(de=new cn(Ir,de.ch,de.sticky),Et=xn(re,Ir))}function mn(Ir){var Pr;if(ke=="codepoint"){var Wr=Et.text.charCodeAt(de.ch+(ke>0?0:-1));isNaN(Wr)?Pr=null:Pr=new cn(de.line,Math.max(0,Math.min(Et.text.length,de.ch+Te*(Wr>=55296&&Wr<56320?2:1))),-Te)}else Ie?Pr=Zf(re.cm,Et,de,Te):Pr=aa(Et,de,Te);if(Pr==null)if(!Ir&&zt())de=hc(Ie,re.cm,Et,de.line,Pt);else return!1;else de=Pr;return!0}if(ke=="char"||ke=="codepoint")mn();else if(ke=="column")mn(!0);else if(ke=="word"||ke=="group")for(var Xt=null,Nn=ke=="group",Ln=re.cm&&re.cm.getHelper(de,"wordChars"),Si=!0;!(Te<0&&!mn(!Si));Si=!1){var Li=Et.text.charAt(de.ch)||`
|
|
|
`,Bi=ht(Li,Ln)?"w":Nn&&Li==`
|
|
|
`?"n":!Nn||/\s/.test(Li)?null:"p";if(Nn&&!Si&&!Bi&&(Bi="s"),Xt&&Xt!=Bi){Te<0&&(Te=1,mn(),de.sticky="after");break}if(Bi&&(Xt=Bi),Te>0&&!mn(!Si))break}var cr=ic(re,de,tt,gt,!0);return Ii(tt,cr)&&(cr.hitSide=!0),cr}function Nc(re,de,Te,ke){var Ie=re.doc,tt=de.left,gt;if(ke=="page"){var Et=Math.min(re.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Pt=Math.max(Et-.5*Cu(re.display),3);gt=(Te>0?de.bottom:de.top)+Te*Pt}else ke=="line"&&(gt=Te>0?de.bottom+3:de.top-3);for(var zt;zt=Nh(re,tt,gt),!!zt.outside;){if(Te<0?gt<=0:gt>=Ie.height){zt.hitSide=!0;break}gt+=Te*5}return zt}var Zs=function(re){this.cm=re,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new et,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Zs.prototype.init=function(re){var de=this,Te=this,ke=Te.cm,Ie=Te.div=re.lineDiv;og(Ie,ke.options.spellcheck,ke.options.autocorrect,ke.options.autocapitalize);function tt(Et){for(var Pt=Et.target;Pt;Pt=Pt.parentNode){if(Pt==Ie)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Pt.className))break}return!1}Mn(Ie,"paste",function(Et){!tt(Et)||Cn(ke,Et)||ng(Et,ke)||me<=11&&setTimeout(Ar(ke,function(){return de.updateFromDOM()}),20)}),Mn(Ie,"compositionstart",function(Et){de.composing={data:Et.data,done:!1}}),Mn(Ie,"compositionupdate",function(Et){de.composing||(de.composing={data:Et.data,done:!1})}),Mn(Ie,"compositionend",function(Et){de.composing&&(Et.data!=de.composing.data&&de.readFromDOMSoon(),de.composing.done=!0)}),Mn(Ie,"touchstart",function(){return Te.forceCompositionEnd()}),Mn(Ie,"input",function(){de.composing||de.readFromDOMSoon()});function gt(Et){if(!(!tt(Et)||Cn(ke,Et))){if(ke.somethingSelected())hd({lineWise:!1,text:ke.getSelections()}),Et.type=="cut"&&ke.replaceSelection("",null,"cut");else if(ke.options.lineWiseCopyCut){var Pt=rg(ke);hd({lineWise:!0,text:Pt.text}),Et.type=="cut"&&ke.operation(function(){ke.setSelections(Pt.ranges,0,yt),ke.replaceSelection("",null,"cut")})}else return;if(Et.clipboardData){Et.clipboardData.clearData();var zt=ru.text.join(`
|
|
|
`);if(Et.clipboardData.setData("Text",zt),Et.clipboardData.getData("Text")==zt){Et.preventDefault();return}}var mn=sg(),Xt=mn.firstChild;ke.display.lineSpace.insertBefore(mn,ke.display.lineSpace.firstChild),Xt.value=ru.text.join(`
|
|
|
`);var Nn=document.activeElement;wt(Xt),setTimeout(function(){ke.display.lineSpace.removeChild(mn),Nn.focus(),Nn==Ie&&Te.showPrimarySelection()},50)}}Mn(Ie,"copy",gt),Mn(Ie,"cut",gt)},Zs.prototype.screenReaderLabelChanged=function(re){re?this.div.setAttribute("aria-label",re):this.div.removeAttribute("aria-label")},Zs.prototype.prepareSelection=function(){var re=$u(this.cm,!1);return re.focus=document.activeElement==this.div,re},Zs.prototype.showSelection=function(re,de){!re||!this.cm.display.view.length||((re.focus||de)&&this.showPrimarySelection(),this.showMultipleSelections(re))},Zs.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Zs.prototype.showPrimarySelection=function(){var re=this.getSelection(),de=this.cm,Te=de.doc.sel.primary(),ke=Te.from(),Ie=Te.to();if(de.display.viewTo==de.display.viewFrom||ke.line>=de.display.viewTo||Ie.line<de.display.viewFrom){re.removeAllRanges();return}var tt=_f(de,re.anchorNode,re.anchorOffset),gt=_f(de,re.focusNode,re.focusOffset);if(!(tt&&!tt.bad&>&&!gt.bad&&qn(Ti(tt,gt),ke)==0&&qn(_r(tt,gt),Ie)==0)){var Et=de.display.view,Pt=ke.line>=de.display.viewFrom&&ip(de,ke)||{node:Et[0].measure.map[2],offset:0},zt=Ie.line<de.display.viewTo&&ip(de,Ie);if(!zt){var mn=Et[Et.length-1].measure,Xt=mn.maps?mn.maps[mn.maps.length-1]:mn.map;zt={node:Xt[Xt.length-1],offset:Xt[Xt.length-2]-Xt[Xt.length-3]}}if(!Pt||!zt){re.removeAllRanges();return}var Nn=re.rangeCount&&re.getRangeAt(0),Ln;try{Ln=Je(Pt.node,Pt.offset,zt.offset,zt.node)}catch(Si){}Ln&&(!Le&&de.state.focused?(re.collapse(Pt.node,Pt.offset),Ln.collapsed||(re.removeAllRanges(),re.addRange(Ln))):(re.removeAllRanges(),re.addRange(Ln)),Nn&&re.anchorNode==null?re.addRange(Nn):Le&&this.startGracePeriod()),this.rememberSelection()}},Zs.prototype.startGracePeriod=function(){var re=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){re.gracePeriod=!1,re.selectionChanged()&&re.cm.operation(function(){return re.cm.curOp.selectionChanged=!0})},20)},Zs.prototype.showMultipleSelections=function(re){Re(this.cm.display.cursorDiv,re.cursors),Re(this.cm.display.selectionDiv,re.selection)},Zs.prototype.rememberSelection=function(){var re=this.getSelection();this.lastAnchorNode=re.anchorNode,this.lastAnchorOffset=re.anchorOffset,this.lastFocusNode=re.focusNode,this.lastFocusOffset=re.focusOffset},Zs.prototype.selectionInEditor=function(){var re=this.getSelection();if(!re.rangeCount)return!1;var de=re.getRangeAt(0).commonAncestorContainer;return pt(this.div,de)},Zs.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Zs.prototype.blur=function(){this.div.blur()},Zs.prototype.getField=function(){return this.div},Zs.prototype.supportsTouch=function(){return!0},Zs.prototype.receivedFocus=function(){var re=this;this.selectionInEditor()?this.pollSelection():Xi(this.cm,function(){return re.cm.curOp.selectionChanged=!0});function de(){re.cm.state.focused&&(re.pollSelection(),re.polling.set(re.cm.options.pollInterval,de))}this.polling.set(this.cm.options.pollInterval,de)},Zs.prototype.selectionChanged=function(){var re=this.getSelection();return re.anchorNode!=this.lastAnchorNode||re.anchorOffset!=this.lastAnchorOffset||re.focusNode!=this.lastFocusNode||re.focusOffset!=this.lastFocusOffset},Zs.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var re=this.getSelection(),de=this.cm;if(ee&&we&&this.cm.display.gutterSpecs.length&&ag(re.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var Te=_f(de,re.anchorNode,re.anchorOffset),ke=_f(de,re.focusNode,re.focusOffset);Te&&ke&&Xi(de,function(){ys(de.doc,rr(Te,ke),yt),(Te.bad||ke.bad)&&(de.curOp.selectionChanged=!0)})}}},Zs.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var re=this.cm,de=re.display,Te=re.doc.sel.primary(),ke=Te.from(),Ie=Te.to();if(ke.ch==0&&ke.line>re.firstLine()&&(ke=cn(ke.line-1,xn(re.doc,ke.line-1).length)),Ie.ch==xn(re.doc,Ie.line).text.length&&Ie.line<re.lastLine()&&(Ie=cn(Ie.line+1,0)),ke.line<de.viewFrom||Ie.line>de.viewTo-1)return!1;var tt,gt,Et;ke.line==de.viewFrom||(tt=Dl(re,ke.line))==0?(gt=rn(de.view[0].line),Et=de.view[0].node):(gt=rn(de.view[tt].line),Et=de.view[tt-1].node.nextSibling);var Pt=Dl(re,Ie.line),zt,mn;if(Pt==de.view.length-1?(zt=de.viewTo-1,mn=de.lineDiv.lastChild):(zt=rn(de.view[Pt+1].line)-1,mn=de.view[Pt+1].node.previousSibling),!Et)return!1;for(var Xt=re.doc.splitLines(Vd(re,Et,mn,gt,zt)),Nn=Zn(re.doc,cn(gt,0),cn(zt,xn(re.doc,zt).text.length));Xt.length>1&&Nn.length>1;)if(on(Xt)==on(Nn))Xt.pop(),Nn.pop(),zt--;else if(Xt[0]==Nn[0])Xt.shift(),Nn.shift(),gt++;else break;for(var Ln=0,Si=0,Li=Xt[0],Bi=Nn[0],cr=Math.min(Li.length,Bi.length);Ln<cr&&Li.charCodeAt(Ln)==Bi.charCodeAt(Ln);)++Ln;for(var Ir=on(Xt),Pr=on(Nn),Wr=Math.min(Ir.length-(Xt.length==1?Ln:0),Pr.length-(Nn.length==1?Ln:0));Si<Wr&&Ir.charCodeAt(Ir.length-Si-1)==Pr.charCodeAt(Pr.length-Si-1);)++Si;if(Xt.length==1&&Nn.length==1&>==ke.line)for(;Ln&&Ln>ke.ch&&Ir.charCodeAt(Ir.length-Si-1)==Pr.charCodeAt(Pr.length-Si-1);)Ln--,Si++;Xt[Xt.length-1]=Ir.slice(0,Ir.length-Si).replace(/^\u200b+/,""),Xt[0]=Xt[0].slice(Ln).replace(/\u200b+$/,"");var No=cn(gt,Ln),wr=cn(zt,Nn.length?on(Nn).length-Si:0);if(Xt.length>1||Xt[0]||qn(No,wr))return th(re.doc,Xt,No,wr,"+input"),!0},Zs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Zs.prototype.reset=function(){this.forceCompositionEnd()},Zs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Zs.prototype.readFromDOMSoon=function(){var re=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(re.readDOMTimeout=null,re.composing)if(re.composing.done)re.composing=null;else return;re.updateFromDOM()},80))},Zs.prototype.updateFromDOM=function(){var re=this;(this.cm.isReadOnly()||!this.pollContent())&&Xi(this.cm,function(){return Ds(re.cm)})},Zs.prototype.setUneditable=function(re){re.contentEditable="false"},Zs.prototype.onKeyPress=function(re){re.charCode==0||this.composing||(re.preventDefault(),this.cm.isReadOnly()||Ar(this.cm,xf)(this.cm,String.fromCharCode(re.charCode==null?re.keyCode:re.charCode),0))},Zs.prototype.readOnlyChanged=function(re){this.div.contentEditable=String(re!="nocursor")},Zs.prototype.onContextMenu=function(){},Zs.prototype.resetPosition=function(){},Zs.prototype.needsContentAttribute=!0;function ip(re,de){var Te=za(re,de.line);if(!Te||Te.hidden)return null;var ke=xn(re.doc,de.line),Ie=ph(Te,ke,de.line),tt=vn(ke,re.doc.direction),gt="left";if(tt){var Et=mt(tt,de.ch);gt=Et%2?"right":"left"}var Pt=Pc(Ie.map,de.ch,gt);return Pt.offset=Pt.collapse=="right"?Pt.end:Pt.start,Pt}function ag(re){for(var de=re;de;de=de.parentNode)if(/CodeMirror-gutter-wrapper/.test(de.className))return!0;return!1}function Kd(re,de){return de&&(re.bad=!0),re}function Vd(re,de,Te,ke,Ie){var tt="",gt=!1,Et=re.doc.lineSeparator(),Pt=!1;function zt(Ln){return function(Si){return Si.id==Ln}}function mn(){gt&&(tt+=Et,Pt&&(tt+=Et),gt=Pt=!1)}function Xt(Ln){Ln&&(mn(),tt+=Ln)}function Nn(Ln){if(Ln.nodeType==1){var Si=Ln.getAttribute("cm-text");if(Si){Xt(Si);return}var Li=Ln.getAttribute("cm-marker"),Bi;if(Li){var cr=re.findMarks(cn(ke,0),cn(Ie+1,0),zt(+Li));cr.length&&(Bi=cr[0].find(0))&&Xt(Zn(re.doc,Bi.from,Bi.to).join(Et));return}if(Ln.getAttribute("contenteditable")=="false")return;var Ir=/^(pre|div|p|li|table|br)$/i.test(Ln.nodeName);if(!/^br$/i.test(Ln.nodeName)&&Ln.textContent.length==0)return;Ir&&mn();for(var Pr=0;Pr<Ln.childNodes.length;Pr++)Nn(Ln.childNodes[Pr]);/^(pre|p)$/i.test(Ln.nodeName)&&(Pt=!0),Ir&&(gt=!0)}else Ln.nodeType==3&&Xt(Ln.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Nn(de),de!=Te;)de=de.nextSibling,Pt=!1;return tt}function _f(re,de,Te){var ke;if(de==re.display.lineDiv){if(ke=re.display.lineDiv.childNodes[Te],!ke)return Kd(re.clipPos(cn(re.display.viewTo-1)),!0);de=null,Te=0}else for(ke=de;;ke=ke.parentNode){if(!ke||ke==re.display.lineDiv)return null;if(ke.parentNode&&ke.parentNode==re.display.lineDiv)break}for(var Ie=0;Ie<re.display.view.length;Ie++){var tt=re.display.view[Ie];if(tt.node==ke)return cm(tt,de,Te)}}function cm(re,de,Te){var ke=re.text.firstChild,Ie=!1;if(!de||!pt(ke,de))return Kd(cn(rn(re.line),0),!0);if(de==ke&&(Ie=!0,de=ke.childNodes[Te],Te=0,!de)){var tt=re.rest?on(re.rest):re.line;return Kd(cn(rn(tt),tt.text.length),Ie)}var gt=de.nodeType==3?de:null,Et=de;for(!gt&&de.childNodes.length==1&&de.firstChild.nodeType==3&&(gt=de.firstChild,Te&&(Te=gt.nodeValue.length));Et.parentNode!=ke;)Et=Et.parentNode;var Pt=re.measure,zt=Pt.maps;function mn(Bi,cr,Ir){for(var Pr=-1;Pr<(zt?zt.length:0);Pr++)for(var Wr=Pr<0?Pt.map:zt[Pr],No=0;No<Wr.length;No+=3){var wr=Wr[No+2];if(wr==Bi||wr==cr){var ts=rn(Pr<0?re.line:re.rest[Pr]),da=Wr[No]+Ir;return(Ir<0||wr!=Bi)&&(da=Wr[No+(Ir?1:0)]),cn(ts,da)}}}var Xt=mn(gt,Et,Te);if(Xt)return Kd(Xt,Ie);for(var Nn=Et.nextSibling,Ln=gt?gt.nodeValue.length-Te:0;Nn;Nn=Nn.nextSibling){if(Xt=mn(Nn,Nn.firstChild,0),Xt)return Kd(cn(Xt.line,Xt.ch-Ln),Ie);Ln+=Nn.textContent.length}for(var Si=Et.previousSibling,Li=Te;Si;Si=Si.previousSibling){if(Xt=mn(Si,Si.firstChild,-1),Xt)return Kd(cn(Xt.line,Xt.ch+Li),Ie);Li+=Si.textContent.length}}var Ka=function(re){this.cm=re,this.prevInput="",this.pollingFast=!1,this.polling=new et,this.hasSelection=!1,this.composing=null};Ka.prototype.init=function(re){var de=this,Te=this,ke=this.cm;this.createField(re);var Ie=this.textarea;re.wrapper.insertBefore(this.wrapper,re.wrapper.firstChild),ue&&(Ie.style.width="0px"),Mn(Ie,"input",function(){Ee&&me>=9&&de.hasSelection&&(de.hasSelection=null),Te.poll()}),Mn(Ie,"paste",function(gt){Cn(ke,gt)||ng(gt,ke)||(ke.state.pasteIncoming=+new Date,Te.fastPoll())});function tt(gt){if(!Cn(ke,gt)){if(ke.somethingSelected())hd({lineWise:!1,text:ke.getSelections()});else if(ke.options.lineWiseCopyCut){var Et=rg(ke);hd({lineWise:!0,text:Et.text}),gt.type=="cut"?ke.setSelections(Et.ranges,null,yt):(Te.prevInput="",Ie.value=Et.text.join(`
|
|
|
`),wt(Ie))}else return;gt.type=="cut"&&(ke.state.cutIncoming=+new Date)}}Mn(Ie,"cut",tt),Mn(Ie,"copy",tt),Mn(re.scroller,"paste",function(gt){if(!(Ks(re,gt)||Cn(ke,gt))){if(!Ie.dispatchEvent){ke.state.pasteIncoming=+new Date,Te.focus();return}var Et=new Event("paste");Et.clipboardData=gt.clipboardData,Ie.dispatchEvent(Et)}}),Mn(re.lineSpace,"selectstart",function(gt){Ks(re,gt)||vr(gt)}),Mn(Ie,"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"})}}),Mn(Ie,"compositionend",function(){Te.composing&&(Te.poll(),Te.composing.range.clear(),Te.composing=null)})},Ka.prototype.createField=function(re){this.wrapper=sg(),this.textarea=this.wrapper.firstChild},Ka.prototype.screenReaderLabelChanged=function(re){re?this.textarea.setAttribute("aria-label",re):this.textarea.removeAttribute("aria-label")},Ka.prototype.prepareSelection=function(){var re=this.cm,de=re.display,Te=re.doc,ke=$u(re);if(re.options.moveInputWithCursor){var Ie=Qs(re,Te.sel.primary().head,"div"),tt=de.wrapper.getBoundingClientRect(),gt=de.lineDiv.getBoundingClientRect();ke.teTop=Math.max(0,Math.min(de.wrapper.clientHeight-10,Ie.top+gt.top-tt.top)),ke.teLeft=Math.max(0,Math.min(de.wrapper.clientWidth-10,Ie.left+gt.left-tt.left))}return ke},Ka.prototype.showSelection=function(re){var de=this.cm,Te=de.display;Re(Te.cursorDiv,re.cursors),Re(Te.selectionDiv,re.selection),re.teTop!=null&&(this.wrapper.style.top=re.teTop+"px",this.wrapper.style.left=re.teLeft+"px")},Ka.prototype.reset=function(re){if(!(this.contextMenuPending||this.composing)){var de=this.cm;if(de.somethingSelected()){this.prevInput="";var Te=de.getSelection();this.textarea.value=Te,de.state.focused&&wt(this.textarea),Ee&&me>=9&&(this.hasSelection=Te)}else re||(this.prevInput=this.textarea.value="",Ee&&me>=9&&(this.hasSelection=null))}},Ka.prototype.getField=function(){return this.textarea},Ka.prototype.supportsTouch=function(){return!1},Ka.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!z||St()!=this.textarea))try{this.textarea.focus()}catch(re){}},Ka.prototype.blur=function(){this.textarea.blur()},Ka.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ka.prototype.receivedFocus=function(){this.slowPoll()},Ka.prototype.slowPoll=function(){var re=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){re.poll(),re.cm.state.focused&&re.slowPoll()})},Ka.prototype.fastPoll=function(){var re=!1,de=this;de.pollingFast=!0;function Te(){var ke=de.poll();!ke&&!re?(re=!0,de.polling.set(60,Te)):(de.pollingFast=!1,de.slowPoll())}de.polling.set(20,Te)},Ka.prototype.poll=function(){var re=this,de=this.cm,Te=this.textarea,ke=this.prevInput;if(this.contextMenuPending||!de.state.focused||qe(Te)&&!ke&&!this.composing||de.isReadOnly()||de.options.disableInput||de.state.keySeq)return!1;var Ie=Te.value;if(Ie==ke&&!de.somethingSelected())return!1;if(Ee&&me>=9&&this.hasSelection===Ie||oe&&/[\uf700-\uf7ff]/.test(Ie))return de.display.input.reset(),!1;if(de.doc.sel==de.display.selForContextMenu){var tt=Ie.charCodeAt(0);if(tt==8203&&!ke&&(ke="\u200B"),tt==8666)return this.reset(),this.cm.execCommand("undo")}for(var gt=0,Et=Math.min(ke.length,Ie.length);gt<Et&&ke.charCodeAt(gt)==Ie.charCodeAt(gt);)++gt;return Xi(de,function(){xf(de,Ie.slice(gt),ke.length-gt,null,re.composing?"*compose":null),Ie.length>1e3||Ie.indexOf(`
|
|
|
`)>-1?Te.value=re.prevInput="":re.prevInput=Ie,re.composing&&(re.composing.range.clear(),re.composing.range=de.markText(re.composing.start,de.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ka.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ka.prototype.onKeyPress=function(){Ee&&me>=9&&(this.hasSelection=null),this.fastPoll()},Ka.prototype.onContextMenu=function(re){var de=this,Te=de.cm,ke=Te.display,Ie=de.textarea;de.contextMenuPending&&de.contextMenuPending();var tt=qa(Te,re),gt=ke.scroller.scrollTop;if(!tt||ge)return;var Et=Te.options.resetSelectionOnContextMenu;Et&&Te.doc.sel.contains(tt)==-1&&Ar(Te,ys)(Te.doc,rr(tt),yt);var Pt=Ie.style.cssText,zt=de.wrapper.style.cssText,mn=de.wrapper.offsetParent.getBoundingClientRect();de.wrapper.style.cssText="position: static",Ie.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(re.clientY-mn.top-5)+"px; left: "+(re.clientX-mn.left-5)+`px;
|
|
|
z-index: 1000; background: `+(Ee?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Xt;be&&(Xt=window.scrollY),ke.input.focus(),be&&window.scrollTo(null,Xt),ke.input.reset(),Te.somethingSelected()||(Ie.value=de.prevInput=" "),de.contextMenuPending=Ln,ke.selForContextMenu=Te.doc.sel,clearTimeout(ke.detectingSelectAll);function Nn(){if(Ie.selectionStart!=null){var Li=Te.somethingSelected(),Bi="\u200B"+(Li?Ie.value:"");Ie.value="\u21DA",Ie.value=Bi,de.prevInput=Li?"":"\u200B",Ie.selectionStart=1,Ie.selectionEnd=Bi.length,ke.selForContextMenu=Te.doc.sel}}function Ln(){if(de.contextMenuPending==Ln&&(de.contextMenuPending=!1,de.wrapper.style.cssText=zt,Ie.style.cssText=Pt,Ee&&me<9&&ke.scrollbars.setScrollTop(ke.scroller.scrollTop=gt),Ie.selectionStart!=null)){(!Ee||Ee&&me<9)&&Nn();var Li=0,Bi=function(){ke.selForContextMenu==Te.doc.sel&&Ie.selectionStart==0&&Ie.selectionEnd>0&&de.prevInput=="\u200B"?Ar(Te,va)(Te):Li++<10?ke.detectingSelectAll=setTimeout(Bi,500):(ke.selForContextMenu=null,ke.input.reset())};ke.detectingSelectAll=setTimeout(Bi,200)}}if(Ee&&me>=9&&Nn(),pe){kr(re);var Si=function(){mi(window,"mouseup",Si),setTimeout(Ln,20)};Mn(window,"mouseup",Si)}else setTimeout(Ln,50)},Ka.prototype.readOnlyChanged=function(re){re||this.reset(),this.textarea.disabled=re=="nocursor",this.textarea.readOnly=!!re},Ka.prototype.setUneditable=function(){},Ka.prototype.needsContentAttribute=!1;function dm(re,de){if(de=de?$t(de):{},de.value=re.value,!de.tabindex&&re.tabIndex&&(de.tabindex=re.tabIndex),!de.placeholder&&re.placeholder&&(de.placeholder=re.placeholder),de.autofocus==null){var Te=St();de.autofocus=Te==re||re.getAttribute("autofocus")!=null&&Te==document.body}function ke(){re.value=Et.getValue()}var Ie;if(re.form&&(Mn(re.form,"submit",ke),!de.leaveSubmitMethodAlone)){var tt=re.form;Ie=tt.submit;try{var gt=tt.submit=function(){ke(),tt.submit=Ie,tt.submit(),tt.submit=gt}}catch(Pt){}}de.finishInit=function(Pt){Pt.save=ke,Pt.getTextArea=function(){return re},Pt.toTextArea=function(){Pt.toTextArea=isNaN,ke(),re.parentNode.removeChild(Pt.getWrapperElement()),re.style.display="",re.form&&(mi(re.form,"submit",ke),!de.leaveSubmitMethodAlone&&typeof re.form.submit=="function"&&(re.form.submit=Ie))}},re.style.display="none";var Et=Ps(function(Pt){return re.parentNode.insertBefore(Pt,re.nextSibling)},de);return Et}function Zd(re){re.off=mi,re.on=Mn,re.wheelEventPixels=Mi,re.Doc=tl,re.splitLines=kn,re.countColumn=st,re.findColumn=gn,re.isWordChar=it,re.Pass=bt,re.signal=si,re.Line=Jr,re.changeEnd=$o,re.scrollbarModel=Jn,re.Pos=cn,re.cmpPos=qn,re.modes=Gi,re.mimeModes=Vi,re.resolveMode=sn,re.getMode=He,re.modeExtensions=Ve,re.extendMode=ot,re.copyState=Lt,re.startState=an,re.innerMode=At,re.commands=kc,re.keyMap=Rl,re.keyName=ul,re.isModifierKey=Oa,re.lookupKey=Yo,re.normalizeKeyMap=fs,re.StringStream=Ot,re.SharedTextMarker=Ol,re.TextMarker=ln,re.LineWidget=Is,re.e_preventDefault=vr,re.e_stopPropagation=Dr,re.e_stop=kr,re.addClass=Mt,re.contains=pt,re.rmClass=Ae,re.keyNames=Gu}um(Ps),Ac(Ps);var cc="iter insert remove copy getEditor constructor".split(" ");for(var bf in tl.prototype)tl.prototype.hasOwnProperty(bf)&<(cc,bf)<0&&(Ps.prototype[bf]=function(re){return function(){return re.apply(this.doc,arguments)}}(tl.prototype[bf]));return Qi(tl),Ps.inputStyles={textarea:Ka,contenteditable:Zs},Ps.defineMode=function(re){!Ps.defaults.mode&&re!="null"&&(Ps.defaults.mode=re),Zi.apply(this,arguments)},Ps.defineMIME=qr,Ps.defineMode("null",function(){return{token:function(re){return re.skipToEnd()}}}),Ps.defineMIME("text/plain","null"),Ps.defineExtension=function(re,de){Ps.prototype[re]=de},Ps.defineDocExtension=function(re,de){tl.prototype[re]=de},Ps.fromTextArea=dm,Zd(Ps),Ps.version="5.58.2",Ps})},49047:function(_n,hn,De){(function(Le){Le(De(4631),De(29589),De(52539))})(function(Le){"use strict";Le.defineMode("markdown",function(ye,Fe){var Me=Le.getMode(ye,"text/html"),Ee=Me.name=="null";function me(st){if(Le.findModeByName){var et=Le.findModeByName(st);et&&(st=et.mime||et.mimes[0])}var lt=Le.getMode(ye,st);return lt.name=="null"?null:lt}Fe.highlightFormatting===void 0&&(Fe.highlightFormatting=!1),Fe.maxBlockquoteDepth===void 0&&(Fe.maxBlockquoteDepth=0),Fe.taskLists===void 0&&(Fe.taskLists=!1),Fe.strikethrough===void 0&&(Fe.strikethrough=!1),Fe.emoji===void 0&&(Fe.emoji=!1),Fe.fencedCodeBlockHighlighting===void 0&&(Fe.fencedCodeBlockHighlighting=!0),Fe.fencedCodeBlockDefaultMode===void 0&&(Fe.fencedCodeBlockDefaultMode="text/plain"),Fe.xml===void 0&&(Fe.xml=!0),Fe.tokenTypeOverrides===void 0&&(Fe.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 ve in be)be.hasOwnProperty(ve)&&Fe.tokenTypeOverrides[ve]&&(be[ve]=Fe.tokenTypeOverrides[ve]);var we=/^([*\-_])(?:\s*\1){2,}\s*$/,ge=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,he=/^\[(x| )\](?=\s)/i,xe=Fe.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]/,ie=" ";function se(st,et,lt){return et.f=et.inline=lt,lt(st,et)}function le(st,et,lt){return et.f=et.block=lt,lt(st,et)}function Se(st){return!st||!/\S/.test(st.string)}function pe(st){if(st.linkTitle=!1,st.linkHref=!1,st.linkText=!1,st.em=!1,st.strong=!1,st.strikethrough=!1,st.quote=0,st.indentedCode=!1,st.f==Ae){var et=Ee;if(!et){var lt=Le.innerMode(Me,st.htmlState);et=lt.mode.name=="xml"&<.state.tagStart===null&&!lt.state.context&<.state.tokenize.isInText}et&&(st.f=$e,st.block=Ce,st.htmlState=null)}return st.trailingSpace=0,st.trailingSpaceNewLine=!1,st.prevLine=st.thisLine,st.thisLine={stream:null},null}function Ce(st,et){var lt=st.column()===et.indentation,dt=Se(et.prevLine.stream),bt=et.indentedCode,yt=et.prevLine.hr,Vt=et.list!==!1,Kt=(et.listStack[et.listStack.length-1]||0)+3;et.indentedCode=!1;var gn=et.indentation;if(et.indentationDiff===null&&(et.indentationDiff=et.indentation,Vt)){for(et.list=null;gn<et.listStack[et.listStack.length-1];)et.listStack.pop(),et.listStack.length?et.indentation=et.listStack[et.listStack.length-1]:et.list=!1;et.list!==!1&&(et.indentationDiff=gn-et.listStack[et.listStack.length-1])}var Gt=!dt&&!yt&&!et.prevLine.header&&(!Vt||!bt)&&!et.prevLine.fencedCodeEnd,Dt=(et.list===!1||yt||dt)&&et.indentation<=Kt&&st.match(we),on=null;if(et.indentationDiff>=4&&(bt||et.prevLine.fencedCodeEnd||et.prevLine.header||dt))return st.skipToEnd(),et.indentedCode=!0,be.code;if(st.eatSpace())return null;if(lt&&et.indentation<=Kt&&(on=st.match(xe))&&on[1].length<=6)return et.quote=0,et.header=on[1].length,et.thisLine.header=!0,Fe.highlightFormatting&&(et.formatting="header"),et.f=et.inline,Re(et);if(et.indentation<=Kt&&st.eat(">"))return et.quote=lt?1:et.quote+1,Fe.highlightFormatting&&(et.formatting="quote"),st.eatSpace(),Re(et);if(!Dt&&!et.setext&<&&et.indentation<=Kt&&(on=st.match(ge))){var Jt=on[1]?"ol":"ul";return et.indentation=gn+st.current().length,et.list=!0,et.quote=0,et.listStack.push(et.indentation),et.em=!1,et.strong=!1,et.code=!1,et.strikethrough=!1,Fe.taskLists&&st.match(he,!1)&&(et.taskList=!0),et.f=et.inline,Fe.highlightFormatting&&(et.formatting=["list","list-"+Jt]),Re(et)}else{if(lt&&et.indentation<=Kt&&(on=st.match(ee,!0)))return et.quote=0,et.fencedEndRE=new RegExp(on[1]+"+ *$"),et.localMode=Fe.fencedCodeBlockHighlighting&&me(on[2]||Fe.fencedCodeBlockDefaultMode),et.localMode&&(et.localState=Le.startState(et.localMode)),et.f=et.block=Oe,Fe.highlightFormatting&&(et.formatting="code-block"),et.code=-1,Re(et);if(et.setext||(!Gt||!Vt)&&!et.quote&&et.list===!1&&!et.code&&!Dt&&!z.test(st.string)&&(on=st.lookAhead(1))&&(on=on.match(fe)))return et.setext?(et.header=et.setext,et.setext=0,st.skipToEnd(),Fe.highlightFormatting&&(et.formatting="header")):(et.header=on[0].charAt(0)=="="?1:2,et.setext=et.header),et.thisLine.header=!0,et.f=et.inline,Re(et);if(Dt)return st.skipToEnd(),et.hr=!0,et.thisLine.hr=!0,be.hr;if(st.peek()==="[")return se(st,et,ct)}return se(st,et,et.inline)}function Ae(st,et){var lt=Me.token(st,et.htmlState);if(!Ee){var dt=Le.innerMode(Me,et.htmlState);(dt.mode.name=="xml"&&dt.state.tagStart===null&&!dt.state.context&&dt.state.tokenize.isInText||et.md_inside&&st.current().indexOf(">")>-1)&&(et.f=$e,et.block=Ce,et.htmlState=null)}return lt}function Oe(st,et){var lt=et.listStack[et.listStack.length-1]||0,dt=et.indentation<lt,bt=lt+3;if(et.fencedEndRE&&et.indentation<=bt&&(dt||st.match(et.fencedEndRE))){Fe.highlightFormatting&&(et.formatting="code-block");var yt;return dt||(yt=Re(et)),et.localMode=et.localState=null,et.block=Ce,et.f=$e,et.fencedEndRE=null,et.code=0,et.thisLine.fencedCodeEnd=!0,dt?le(st,et,et.block):yt}else return et.localMode?et.localMode.token(st,et.localState):(st.skipToEnd(),be.code)}function Re(st){var et=[];if(st.formatting){et.push(be.formatting),typeof st.formatting=="string"&&(st.formatting=[st.formatting]);for(var lt=0;lt<st.formatting.length;lt++)et.push(be.formatting+"-"+st.formatting[lt]),st.formatting[lt]==="header"&&et.push(be.formatting+"-"+st.formatting[lt]+"-"+st.header),st.formatting[lt]==="quote"&&(!Fe.maxBlockquoteDepth||Fe.maxBlockquoteDepth>=st.quote?et.push(be.formatting+"-"+st.formatting[lt]+"-"+st.quote):et.push("error"))}if(st.taskOpen)return et.push("meta"),et.length?et.join(" "):null;if(st.taskClosed)return et.push("property"),et.length?et.join(" "):null;if(st.linkHref?et.push(be.linkHref,"url"):(st.strong&&et.push(be.strong),st.em&&et.push(be.em),st.strikethrough&&et.push(be.strikethrough),st.emoji&&et.push(be.emoji),st.linkText&&et.push(be.linkText),st.code&&et.push(be.code),st.image&&et.push(be.image),st.imageAltText&&et.push(be.imageAltText,"link"),st.imageMarker&&et.push(be.imageMarker)),st.header&&et.push(be.header,be.header+"-"+st.header),st.quote&&(et.push(be.quote),!Fe.maxBlockquoteDepth||Fe.maxBlockquoteDepth>=st.quote?et.push(be.quote+"-"+st.quote):et.push(be.quote+"-"+Fe.maxBlockquoteDepth)),st.list!==!1){var dt=(st.listStack.length-1)%3;dt?dt===1?et.push(be.list2):et.push(be.list3):et.push(be.list1)}return st.trailingSpaceNewLine?et.push("trailing-space-new-line"):st.trailingSpace&&et.push("trailing-space-"+(st.trailingSpace%2?"a":"b")),et.length?et.join(" "):null}function We(st,et){if(st.match(ue,!0))return Re(et)}function $e(st,et){var lt=et.text(st,et);if(typeof lt!="undefined")return lt;if(et.list)return et.list=null,Re(et);if(et.taskList){var dt=st.match(he,!0)[1]===" ";return dt?et.taskOpen=!0:et.taskClosed=!0,Fe.highlightFormatting&&(et.formatting="task"),et.taskList=!1,Re(et)}if(et.taskOpen=!1,et.taskClosed=!1,et.header&&st.match(/^#+$/,!0))return Fe.highlightFormatting&&(et.formatting="header"),Re(et);var bt=st.next();if(et.linkTitle){et.linkTitle=!1;var yt=bt;bt==="("&&(yt=")"),yt=(yt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Vt="^\\s*(?:[^"+yt+"\\\\]+|\\\\\\\\|\\\\.)"+yt;if(st.match(new RegExp(Vt),!0))return be.linkHref}if(bt==="`"){var Kt=et.formatting;Fe.highlightFormatting&&(et.formatting="code"),st.eatWhile("`");var gn=st.current().length;if(et.code==0&&(!et.quote||gn==1))return et.code=gn,Re(et);if(gn==et.code){var Gt=Re(et);return et.code=0,Gt}else return et.formatting=Kt,Re(et)}else if(et.code)return Re(et);if(bt==="\\"&&(st.next(),Fe.highlightFormatting)){var Dt=Re(et),on=be.formatting+"-escape";return Dt?Dt+" "+on:on}if(bt==="!"&&st.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return et.imageMarker=!0,et.image=!0,Fe.highlightFormatting&&(et.formatting="image"),Re(et);if(bt==="["&&et.imageMarker&&st.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return et.imageMarker=!1,et.imageAltText=!0,Fe.highlightFormatting&&(et.formatting="image"),Re(et);if(bt==="]"&&et.imageAltText){Fe.highlightFormatting&&(et.formatting="image");var Dt=Re(et);return et.imageAltText=!1,et.image=!1,et.inline=et.f=pt,Dt}if(bt==="["&&!et.image)return et.linkText&&st.match(/^.*?\]/)||(et.linkText=!0,Fe.highlightFormatting&&(et.formatting="link")),Re(et);if(bt==="]"&&et.linkText){Fe.highlightFormatting&&(et.formatting="link");var Dt=Re(et);return et.linkText=!1,et.inline=et.f=st.match(/\(.*?\)| ?\[.*?\]/,!1)?pt:$e,Dt}if(bt==="<"&&st.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){et.f=et.inline=Je,Fe.highlightFormatting&&(et.formatting="link");var Dt=Re(et);return Dt?Dt+=" ":Dt="",Dt+be.linkInline}if(bt==="<"&&st.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){et.f=et.inline=Je,Fe.highlightFormatting&&(et.formatting="link");var Dt=Re(et);return Dt?Dt+=" ":Dt="",Dt+be.linkEmail}if(Fe.xml&&bt==="<"&&st.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Jt=st.string.indexOf(">",st.pos);if(Jt!=-1){var jt=st.string.substring(st.start,Jt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(jt)&&(et.md_inside=!0)}return st.backUp(1),et.htmlState=Le.startState(Me),le(st,et,Ae)}if(Fe.xml&&bt==="<"&&st.match(/^\/\w*?>/))return et.md_inside=!1,"tag";if(bt==="*"||bt==="_"){for(var ut=1,ze=st.pos==1?" ":st.string.charAt(st.pos-2);ut<3&&st.eat(bt);)ut++;var je=st.peek()||" ",it=!/\s/.test(je)&&(!oe.test(je)||/\s/.test(ze)||oe.test(ze)),ht=!/\s/.test(ze)&&(!oe.test(ze)||/\s/.test(je)||oe.test(je)),nt=null,Ke=null;if(ut%2&&(!et.em&&it&&(bt==="*"||!ht||oe.test(ze))?nt=!0:et.em==bt&&ht&&(bt==="*"||!it||oe.test(je))&&(nt=!1)),ut>1&&(!et.strong&&it&&(bt==="*"||!ht||oe.test(ze))?Ke=!0:et.strong==bt&&ht&&(bt==="*"||!it||oe.test(je))&&(Ke=!1)),Ke!=null||nt!=null){Fe.highlightFormatting&&(et.formatting=nt==null?"strong":Ke==null?"em":"strong em"),nt===!0&&(et.em=bt),Ke===!0&&(et.strong=bt);var Gt=Re(et);return nt===!1&&(et.em=!1),Ke===!1&&(et.strong=!1),Gt}}else if(bt===" "&&(st.eat("*")||st.eat("_"))){if(st.peek()===" ")return Re(et);st.backUp(1)}if(Fe.strikethrough){if(bt==="~"&&st.eatWhile(bt)){if(et.strikethrough){Fe.highlightFormatting&&(et.formatting="strikethrough");var Gt=Re(et);return et.strikethrough=!1,Gt}else if(st.match(/^[^\s]/,!1))return et.strikethrough=!0,Fe.highlightFormatting&&(et.formatting="strikethrough"),Re(et)}else if(bt===" "&&st.match(/^~~/,!0)){if(st.peek()===" ")return Re(et);st.backUp(2)}}if(Fe.emoji&&bt===":"&&st.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){et.emoji=!0,Fe.highlightFormatting&&(et.formatting="emoji");var Be=Re(et);return et.emoji=!1,Be}return bt===" "&&(st.match(/^ +$/,!1)?et.trailingSpace++:et.trailingSpace&&(et.trailingSpaceNewLine=!0)),Re(et)}function Je(st,et){var lt=st.next();if(lt===">"){et.f=et.inline=$e,Fe.highlightFormatting&&(et.formatting="link");var dt=Re(et);return dt?dt+=" ":dt="",dt+be.linkInline}return st.match(/^[^>]+/,!0),be.linkInline}function pt(st,et){if(st.eatSpace())return null;var lt=st.next();return lt==="("||lt==="["?(et.f=et.inline=Mt(lt==="("?")":"]"),Fe.highlightFormatting&&(et.formatting="link-string"),et.linkHref=!0,Re(et)):"error"}var St={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Mt(st){return function(et,lt){var dt=et.next();if(dt===st){lt.f=lt.inline=$e,Fe.highlightFormatting&&(lt.formatting="link-string");var bt=Re(lt);return lt.linkHref=!1,bt}return et.match(St[st]),lt.linkHref=!0,Re(lt)}}function ct(st,et){return st.match(/^([^\]\\]|\\.)*\]:/,!1)?(et.f=wt,st.next(),Fe.highlightFormatting&&(et.formatting="link"),et.linkText=!0,Re(et)):se(st,et,$e)}function wt(st,et){if(st.match(/^\]:/,!0)){et.f=et.inline=ft,Fe.highlightFormatting&&(et.formatting="link");var lt=Re(et);return et.linkText=!1,lt}return st.match(/^([^\]\\]|\\.)+/,!0),be.linkText}function ft(st,et){return st.eatSpace()?null:(st.match(/^[^\s]+/,!0),st.peek()===void 0?et.linkTitle=!0:st.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),et.f=et.inline=$e,be.linkHref+" url")}var $t={startState:function(){return{f:Ce,prevLine:{stream:null},thisLine:{stream:null},block:Ce,htmlState:null,indentation:0,inline:$e,text:We,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(st){return{f:st.f,prevLine:st.prevLine,thisLine:st.thisLine,block:st.block,htmlState:st.htmlState&&Le.copyState(Me,st.htmlState),indentation:st.indentation,localMode:st.localMode,localState:st.localMode?Le.copyState(st.localMode,st.localState):null,inline:st.inline,text:st.text,formatting:!1,linkText:st.linkText,linkTitle:st.linkTitle,linkHref:st.linkHref,code:st.code,em:st.em,strong:st.strong,strikethrough:st.strikethrough,emoji:st.emoji,header:st.header,setext:st.setext,hr:st.hr,taskList:st.taskList,list:st.list,listStack:st.listStack.slice(0),quote:st.quote,indentedCode:st.indentedCode,trailingSpace:st.trailingSpace,trailingSpaceNewLine:st.trailingSpaceNewLine,md_inside:st.md_inside,fencedEndRE:st.fencedEndRE}},token:function(st,et){if(et.formatting=!1,st!=et.thisLine.stream){if(et.header=0,et.hr=!1,st.match(/^\s*$/,!0))return pe(et),null;if(et.prevLine=et.thisLine,et.thisLine={stream:st},et.taskList=!1,et.trailingSpace=0,et.trailingSpaceNewLine=!1,!et.localState&&(et.f=et.block,et.f!=Ae)){var lt=st.match(/^\s*/,!0)[0].replace(/\t/g,ie).length;if(et.indentation=lt,et.indentationDiff=null,lt>0)return null}}return et.f(st,et)},innerMode:function(st){return st.block==Ae?{state:st.htmlState,mode:Me}:st.localState?{state:st.localState,mode:st.localMode}:{state:st,mode:$t}},indent:function(st,et,lt){return st.block==Ae&&Me.indent?Me.indent(st.htmlState,et,lt):st.localState&&st.localMode.indent?st.localMode.indent(st.localState,et,lt):Le.Pass},blankLine:pe,getType:Re,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return $t},"xml"),Le.defineMIME("text/markdown","markdown"),Le.defineMIME("text/x-markdown","markdown")})},52539:function(_n,hn,De){(function(Le){Le(De(4631))})(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 ye=0;ye<Le.modeInfo.length;ye++){var Fe=Le.modeInfo[ye];Fe.mimes&&(Fe.mime=Fe.mimes[0])}Le.findModeByMIME=function(Me){Me=Me.toLowerCase();for(var Ee=0;Ee<Le.modeInfo.length;Ee++){var me=Le.modeInfo[Ee];if(me.mime==Me)return me;if(me.mimes){for(var be=0;be<me.mimes.length;be++)if(me.mimes[be]==Me)return me}}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 Ee=0;Ee<Le.modeInfo.length;Ee++){var me=Le.modeInfo[Ee];if(me.ext){for(var be=0;be<me.ext.length;be++)if(me.ext[be]==Me)return me}}},Le.findModeByFileName=function(Me){for(var Ee=0;Ee<Le.modeInfo.length;Ee++){var me=Le.modeInfo[Ee];if(me.file&&me.file.test(Me))return me}var be=Me.lastIndexOf("."),ve=be>-1&&Me.substring(be+1,Me.length);if(ve)return Le.findModeByExtension(ve)},Le.findModeByName=function(Me){Me=Me.toLowerCase();for(var Ee=0;Ee<Le.modeInfo.length;Ee++){var me=Le.modeInfo[Ee];if(me.name.toLowerCase()==Me)return me;if(me.alias){for(var be=0;be<me.alias.length;be++)if(me.alias[be].toLowerCase()==Me)return me}}}})},80785:function(_n,hn,De){(function(Le){Le(De(4631))})(function(Le){"use strict";Le.defineMode("stex",function(ye,Fe){"use strict";function Me(ue,ee){ue.cmdState.push(ee)}function Ee(ue){return ue.cmdState.length>0?ue.cmdState[ue.cmdState.length-1]:null}function me(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 ve(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=ve("importmodule","tag",["string","builtin"]),we.documentclass=ve("documentclass","tag",["","atom"]),we.usepackage=ve("usepackage","tag",["atom"]),we.begin=ve("begin","tag",["atom"]),we.end=ve("end","tag",["atom"]),we.label=ve("label","tag",["atom"]),we.ref=ve("ref","tag",["atom"]),we.eqref=ve("eqref","tag",["atom"]),we.cite=ve("cite","tag",["atom"]),we.bibitem=ve("bibitem","tag",["atom"]),we.Bibitem=ve("Bibitem","tag",["atom"]),we.RBibitem=ve("RBibitem","tag",["atom"]),we.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function ge(ue,ee){ue.f=ee}function he(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),ge(ee,fe),z.style}if(ue.match(/^\\[$&%#{}_]/)||ue.match(/^\\[,;!\/\\]/))return"tag";if(ue.match("\\["))return ge(ee,function(se,le){return xe(se,le,"\\]")}),"keyword";if(ue.match("\\("))return ge(ee,function(se,le){return xe(se,le,"\\)")}),"keyword";if(ue.match("$$"))return ge(ee,function(se,le){return xe(se,le,"$$")}),"keyword";if(ue.match("$"))return ge(ee,function(se,le){return xe(se,le,"$")}),"keyword";var ie=ue.next();if(ie=="%")return ue.skipToEnd(),"comment";if(ie=="}"||ie=="]"){if(z=Ee(ee),z)z.closeBracket(ie),ge(ee,fe);else return"error";return"bracket"}else return ie=="{"||ie=="["?(z=we.DEFAULT,z=new z,Me(ee,z),"bracket"):/\d/.test(ie)?(ue.eatWhile(/[\w.%]/),"atom"):(ue.eatWhile(/[\w\-_]/),z=be(ee),z.name=="begin"&&(z.argument=ue.current()),z.styleIdentifier())}function xe(ue,ee,z){if(ue.eatSpace())return null;if(z&&ue.match(z))return ge(ee,he),"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=Ee(ee),oe.openBracket(z),ue.eat(z),ge(ee,he),"bracket"):/[ \t\r]/.test(z)?(ue.eat(z),null):(ge(ee,he),me(ee),he(ue,ee))}return{startState:function(){var ue=Fe.inMathMode?function(ee,z){return xe(ee,z)}:he;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=he,ue.cmdState.length=0},lineComment:"%"}}),Le.defineMIME("text/x-stex","stex"),Le.defineMIME("text/x-latex","stex")})},29589:function(_n,hn,De){(function(Le){Le(De(4631))})(function(Le){"use strict";var ye={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},Fe={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Le.defineMode("xml",function(Me,Ee){var me=Me.indentUnit,be={},ve=Ee.htmlMode?ye:Fe;for(var we in ve)be[we]=ve[we];for(var we in Ee)be[we]=Ee[we];var ge,he;function xe(Je,pt){function St(wt){return pt.tokenize=wt,wt(Je,pt)}var Mt=Je.next();if(Mt=="<")return Je.eat("!")?Je.eat("[")?Je.match("CDATA[")?St(ee("atom","]]>")):null:Je.match("--")?St(ee("comment","-->")):Je.match("DOCTYPE",!0,!0)?(Je.eatWhile(/[\w\._\-]/),St(z(1))):null:Je.eat("?")?(Je.eatWhile(/[\w\._\-]/),pt.tokenize=ee("meta","?>"),"meta"):(ge=Je.eat("/")?"closeTag":"openTag",pt.tokenize=fe,"tag bracket");if(Mt=="&"){var ct;return Je.eat("#")?Je.eat("x")?ct=Je.eatWhile(/[a-fA-F\d]/)&&Je.eat(";"):ct=Je.eatWhile(/[\d]/)&&Je.eat(";"):ct=Je.eatWhile(/[\w\.\-:]/)&&Je.eat(";"),ct?"atom":"error"}else return Je.eatWhile(/[^&<]/),null}xe.isInText=!0;function fe(Je,pt){var St=Je.next();if(St==">"||St=="/"&&Je.eat(">"))return pt.tokenize=xe,ge=St==">"?"endTag":"selfcloseTag","tag bracket";if(St=="=")return ge="equals",null;if(St=="<"){pt.tokenize=xe,pt.state=le,pt.tagName=pt.tagStart=null;var Mt=pt.tokenize(Je,pt);return Mt?Mt+" tag error":"tag error"}else return/[\'\"]/.test(St)?(pt.tokenize=ue(St),pt.stringStartCol=Je.column(),pt.tokenize(Je,pt)):(Je.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ue(Je){var pt=function(St,Mt){for(;!St.eol();)if(St.next()==Je){Mt.tokenize=fe;break}return"string"};return pt.isInAttribute=!0,pt}function ee(Je,pt){return function(St,Mt){for(;!St.eol();){if(St.match(pt)){Mt.tokenize=xe;break}St.next()}return Je}}function z(Je){return function(pt,St){for(var Mt;(Mt=pt.next())!=null;){if(Mt=="<")return St.tokenize=z(Je+1),St.tokenize(pt,St);if(Mt==">")if(Je==1){St.tokenize=xe;break}else return St.tokenize=z(Je-1),St.tokenize(pt,St)}return"meta"}}function oe(Je,pt,St){this.prev=Je.context,this.tagName=pt,this.indent=Je.indented,this.startOfLine=St,(be.doNotIndent.hasOwnProperty(pt)||Je.context&&Je.context.noIndent)&&(this.noIndent=!0)}function ie(Je){Je.context&&(Je.context=Je.context.prev)}function se(Je,pt){for(var St;;){if(!Je.context||(St=Je.context.tagName,!be.contextGrabbers.hasOwnProperty(St)||!be.contextGrabbers[St].hasOwnProperty(pt)))return;ie(Je)}}function le(Je,pt,St){return Je=="openTag"?(St.tagStart=pt.column(),Se):Je=="closeTag"?pe:le}function Se(Je,pt,St){return Je=="word"?(St.tagName=pt.current(),he="tag",Oe):be.allowMissingTagName&&Je=="endTag"?(he="tag bracket",Oe(Je,pt,St)):(he="error",Se)}function pe(Je,pt,St){if(Je=="word"){var Mt=pt.current();return St.context&&St.context.tagName!=Mt&&be.implicitlyClosed.hasOwnProperty(St.context.tagName)&&ie(St),St.context&&St.context.tagName==Mt||be.matchClosing===!1?(he="tag",Ce):(he="tag error",Ae)}else return be.allowMissingTagName&&Je=="endTag"?(he="tag bracket",Ce(Je,pt,St)):(he="error",Ae)}function Ce(Je,pt,St){return Je!="endTag"?(he="error",Ce):(ie(St),le)}function Ae(Je,pt,St){return he="error",Ce(Je,pt,St)}function Oe(Je,pt,St){if(Je=="word")return he="attribute",Re;if(Je=="endTag"||Je=="selfcloseTag"){var Mt=St.tagName,ct=St.tagStart;return St.tagName=St.tagStart=null,Je=="selfcloseTag"||be.autoSelfClosers.hasOwnProperty(Mt)?se(St,Mt):(se(St,Mt),St.context=new oe(St,Mt,ct==St.indented)),le}return he="error",Oe}function Re(Je,pt,St){return Je=="equals"?We:(be.allowMissing||(he="error"),Oe(Je,pt,St))}function We(Je,pt,St){return Je=="string"?$e:Je=="word"&&be.allowUnquoted?(he="string",Oe):(he="error",Oe(Je,pt,St))}function $e(Je,pt,St){return Je=="string"?$e:Oe(Je,pt,St)}return{startState:function(Je){var pt={tokenize:xe,state:le,indented:Je||0,tagName:null,tagStart:null,context:null};return Je!=null&&(pt.baseIndent=Je),pt},token:function(Je,pt){if(!pt.tagName&&Je.sol()&&(pt.indented=Je.indentation()),Je.eatSpace())return null;ge=null;var St=pt.tokenize(Je,pt);return(St||ge)&&St!="comment"&&(he=null,pt.state=pt.state(ge||St,Je,pt),he&&(St=he=="error"?St+" error":he)),St},indent:function(Je,pt,St){var Mt=Je.context;if(Je.tokenize.isInAttribute)return Je.tagStart==Je.indented?Je.stringStartCol+1:Je.indented+me;if(Mt&&Mt.noIndent)return Le.Pass;if(Je.tokenize!=fe&&Je.tokenize!=xe)return St?St.match(/^(\s*)/)[0].length:0;if(Je.tagName)return be.multilineTagIndentPastTag!==!1?Je.tagStart+Je.tagName.length+2:Je.tagStart+me*(be.multilineTagIndentFactor||1);if(be.alignCDATA&&/<!\[CDATA\[/.test(pt))return 0;var ct=pt&&/^<(\/)?([\w_:\.-]*)/.exec(pt);if(ct&&ct[1])for(;Mt;)if(Mt.tagName==ct[2]){Mt=Mt.prev;break}else if(be.implicitlyClosed.hasOwnProperty(Mt.tagName))Mt=Mt.prev;else break;else if(ct)for(;Mt;){var wt=be.contextGrabbers[Mt.tagName];if(wt&&wt.hasOwnProperty(ct[2]))Mt=Mt.prev;else break}for(;Mt&&Mt.prev&&!Mt.startOfLine;)Mt=Mt.prev;return Mt?Mt.indent+me:Je.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:be.htmlMode?"html":"xml",helperType:be.htmlMode?"html":"xml",skipAttribute:function(Je){Je.state==We&&(Je.state=Oe)},xmlCurrentTag:function(Je){return Je.tagName?{name:Je.tagName,close:Je.type=="closeTag"}:null},xmlCurrentContext:function(Je){for(var pt=[],St=Je.context;St;St=St.prev)St.tagName&&pt.push(St.tagName);return pt.reverse()}}}),Le.defineMIME("text/xml","xml"),Le.defineMIME("application/xml","xml"),Le.mimeModes.hasOwnProperty("text/html")||Le.defineMIME("text/html",{name:"xml",htmlMode:!0})})},82702:function(_n,hn,De){var Le=De(34155);(function(ye,Fe){_n.exports=Fe()})(this,function(){"use strict";function ye(Ue){var rt=typeof Ue;return Ue!==null&&(rt==="object"||rt==="function")}function Fe(Ue){return typeof Ue=="function"}var Me=void 0;Array.isArray?Me=Array.isArray:Me=function(Ue){return Object.prototype.toString.call(Ue)==="[object Array]"};var Ee=Me,me=0,be=void 0,ve=void 0,we=function(rt,Ze){pe[me]=rt,pe[me+1]=Ze,me+=2,me===2&&(ve?ve(Ce):Oe())};function ge(Ue){ve=Ue}function he(Ue){we=Ue}var xe=typeof window!="undefined"?window:void 0,fe=xe||{},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(Ce)}}function ie(){return typeof be!="undefined"?function(){be(Ce)}:Se()}function se(){var Ue=0,rt=new ue(Ce),Ze=document.createTextNode("");return rt.observe(Ze,{characterData:!0}),function(){Ze.data=Ue=++Ue%2}}function le(){var Ue=new MessageChannel;return Ue.port1.onmessage=Ce,function(){return Ue.port2.postMessage(0)}}function Se(){var Ue=setTimeout;return function(){return Ue(Ce,1)}}var pe=new Array(1e3);function Ce(){for(var Ue=0;Ue<me;Ue+=2){var rt=pe[Ue],Ze=pe[Ue+1];rt(Ze),pe[Ue]=void 0,pe[Ue+1]=void 0}me=0}function Ae(){try{var Ue=Function("return this")().require("vertx");return be=Ue.runOnLoop||Ue.runOnContext,ie()}catch(rt){return Se()}}var Oe=void 0;ee?Oe=oe():ue?Oe=se():z?Oe=le():xe===void 0?Oe=Ae():Oe=Se();function Re(Ue,rt){var Ze=this,Xe=new this.constructor(Je);Xe[$e]===void 0&&Jt(Xe);var mt=Ze._state;if(mt){var Rt=arguments[mt-1];we(function(){return gn(mt,Xe,Rt,Ze._result)})}else Vt(Ze,Xe,Ue,rt);return Xe}function We(Ue){var rt=this;if(Ue&&typeof Ue=="object"&&Ue.constructor===rt)return Ue;var Ze=new rt(Je);return lt(Ze,Ue),Ze}var $e=Math.random().toString(36).substring(2);function Je(){}var pt=void 0,St=1,Mt=2;function ct(){return new TypeError("You cannot resolve a promise with itself")}function wt(){return new TypeError("A promises callback cannot return that same promise.")}function ft(Ue,rt,Ze,Xe){try{Ue.call(rt,Ze,Xe)}catch(mt){return mt}}function $t(Ue,rt,Ze){we(function(Xe){var mt=!1,Rt=ft(Ze,rt,function(vn){mt||(mt=!0,rt!==vn?lt(Xe,vn):bt(Xe,vn))},function(vn){mt||(mt=!0,yt(Xe,vn))},"Settle: "+(Xe._label||" unknown promise"));!mt&&Rt&&(mt=!0,yt(Xe,Rt))},Ue)}function st(Ue,rt){rt._state===St?bt(Ue,rt._result):rt._state===Mt?yt(Ue,rt._result):Vt(rt,void 0,function(Ze){return lt(Ue,Ze)},function(Ze){return yt(Ue,Ze)})}function et(Ue,rt,Ze){rt.constructor===Ue.constructor&&Ze===Re&&rt.constructor.resolve===We?st(Ue,rt):Ze===void 0?bt(Ue,rt):Fe(Ze)?$t(Ue,rt,Ze):bt(Ue,rt)}function lt(Ue,rt){if(Ue===rt)yt(Ue,ct());else if(ye(rt)){var Ze=void 0;try{Ze=rt.then}catch(Xe){yt(Ue,Xe);return}et(Ue,rt,Ze)}else bt(Ue,rt)}function dt(Ue){Ue._onerror&&Ue._onerror(Ue._result),Kt(Ue)}function bt(Ue,rt){Ue._state===pt&&(Ue._result=rt,Ue._state=St,Ue._subscribers.length!==0&&we(Kt,Ue))}function yt(Ue,rt){Ue._state===pt&&(Ue._state=Mt,Ue._result=rt,we(dt,Ue))}function Vt(Ue,rt,Ze,Xe){var mt=Ue._subscribers,Rt=mt.length;Ue._onerror=null,mt[Rt]=rt,mt[Rt+St]=Ze,mt[Rt+Mt]=Xe,Rt===0&&Ue._state&&we(Kt,Ue)}function Kt(Ue){var rt=Ue._subscribers,Ze=Ue._state;if(rt.length!==0){for(var Xe=void 0,mt=void 0,Rt=Ue._result,vn=0;vn<rt.length;vn+=3)Xe=rt[vn],mt=rt[vn+Ze],Xe?gn(Ze,Xe,mt,Rt):mt(Rt);Ue._subscribers.length=0}}function gn(Ue,rt,Ze,Xe){var mt=Fe(Ze),Rt=void 0,vn=void 0,An=!0;if(mt){try{Rt=Ze(Xe)}catch(Mn){An=!1,vn=Mn}if(rt===Rt){yt(rt,wt());return}}else Rt=Xe;rt._state!==pt||(mt&&An?lt(rt,Rt):An===!1?yt(rt,vn):Ue===St?bt(rt,Rt):Ue===Mt&&yt(rt,Rt))}function Gt(Ue,rt){try{rt(function(Xe){lt(Ue,Xe)},function(Xe){yt(Ue,Xe)})}catch(Ze){yt(Ue,Ze)}}var Dt=0;function on(){return Dt++}function Jt(Ue){Ue[$e]=Dt++,Ue._state=void 0,Ue._result=void 0,Ue._subscribers=[]}function jt(){return new Error("Array Methods must be provided an Array")}var ut=function(){function Ue(rt,Ze){this._instanceConstructor=rt,this.promise=new rt(Je),this.promise[$e]||Jt(this.promise),Ee(Ze)?(this.length=Ze.length,this._remaining=Ze.length,this._result=new Array(this.length),this.length===0?bt(this.promise,this._result):(this.length=this.length||0,this._enumerate(Ze),this._remaining===0&&bt(this.promise,this._result))):yt(this.promise,jt())}return Ue.prototype._enumerate=function(Ze){for(var Xe=0;this._state===pt&&Xe<Ze.length;Xe++)this._eachEntry(Ze[Xe],Xe)},Ue.prototype._eachEntry=function(Ze,Xe){var mt=this._instanceConstructor,Rt=mt.resolve;if(Rt===We){var vn=void 0,An=void 0,Mn=!1;try{vn=Ze.then}catch(mi){Mn=!0,An=mi}if(vn===Re&&Ze._state!==pt)this._settledAt(Ze._state,Xe,Ze._result);else if(typeof vn!="function")this._remaining--,this._result[Xe]=Ze;else if(mt===Ke){var hi=new mt(Je);Mn?yt(hi,An):et(hi,Ze,vn),this._willSettleAt(hi,Xe)}else this._willSettleAt(new mt(function(mi){return mi(Ze)}),Xe)}else this._willSettleAt(Rt(Ze),Xe)},Ue.prototype._settledAt=function(Ze,Xe,mt){var Rt=this.promise;Rt._state===pt&&(this._remaining--,Ze===Mt?yt(Rt,mt):this._result[Xe]=mt),this._remaining===0&&bt(Rt,this._result)},Ue.prototype._willSettleAt=function(Ze,Xe){var mt=this;Vt(Ze,void 0,function(Rt){return mt._settledAt(St,Xe,Rt)},function(Rt){return mt._settledAt(Mt,Xe,Rt)})},Ue}();function ze(Ue){return new ut(this,Ue).promise}function je(Ue){var rt=this;return Ee(Ue)?new rt(function(Ze,Xe){for(var mt=Ue.length,Rt=0;Rt<mt;Rt++)rt.resolve(Ue[Rt]).then(Ze,Xe)}):new rt(function(Ze,Xe){return Xe(new TypeError("You must pass an array to race."))})}function it(Ue){var rt=this,Ze=new rt(Je);return yt(Ze,Ue),Ze}function ht(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function nt(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var Ke=function(){function Ue(rt){this[$e]=on(),this._result=this._state=void 0,this._subscribers=[],Je!==rt&&(typeof rt!="function"&&ht(),this instanceof Ue?Gt(this,rt):nt())}return Ue.prototype.catch=function(Ze){return this.then(null,Ze)},Ue.prototype.finally=function(Ze){var Xe=this,mt=Xe.constructor;return Fe(Ze)?Xe.then(function(Rt){return mt.resolve(Ze()).then(function(){return Rt})},function(Rt){return mt.resolve(Ze()).then(function(){throw Rt})}):Xe.then(Ze,Ze)},Ue}();Ke.prototype.then=Re,Ke.all=ze,Ke.race=je,Ke.resolve=We,Ke.reject=it,Ke._setScheduler=ge,Ke._setAsap=he,Ke._asap=we;function Be(){var Ue=void 0;if(typeof De.g!="undefined")Ue=De.g;else if(typeof self!="undefined")Ue=self;else try{Ue=Function("return this")()}catch(Xe){throw new Error("polyfill failed because global object is unavailable in this environment")}var rt=Ue.Promise;if(rt){var Ze=null;try{Ze=Object.prototype.toString.call(rt.resolve())}catch(Xe){}if(Ze==="[object Promise]"&&!rt.cast)return}Ue.Promise=Ke}return Ke.polyfill=Be,Ke.Promise=Ke,Ke})},17187:function(_n){"use strict";var hn=typeof Reflect=="object"?Reflect:null,De=hn&&typeof hn.apply=="function"?hn.apply:function(le,Se,pe){return Function.prototype.apply.call(le,Se,pe)},Le;hn&&typeof hn.ownKeys=="function"?Le=hn.ownKeys:Object.getOwnPropertySymbols?Le=function(le){return Object.getOwnPropertyNames(le).concat(Object.getOwnPropertySymbols(le))}:Le=function(le){return Object.getOwnPropertyNames(le)};function ye(se){console&&console.warn&&console.warn(se)}var Fe=Number.isNaN||function(le){return le!==le};function Me(){Me.init.call(this)}_n.exports=Me,_n.exports.once=z,Me.EventEmitter=Me,Me.prototype._events=void 0,Me.prototype._eventsCount=0,Me.prototype._maxListeners=void 0;var Ee=10;function me(se){if(typeof se!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof se)}Object.defineProperty(Me,"defaultMaxListeners",{enumerable:!0,get:function(){return Ee},set:function(se){if(typeof se!="number"||se<0||Fe(se))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+se+".");Ee=se}}),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||Fe(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(se){return se._maxListeners===void 0?Me.defaultMaxListeners:se._maxListeners}Me.prototype.getMaxListeners=function(){return be(this)},Me.prototype.emit=function(le){for(var Se=[],pe=1;pe<arguments.length;pe++)Se.push(arguments[pe]);var Ce=le==="error",Ae=this._events;if(Ae!==void 0)Ce=Ce&&Ae.error===void 0;else if(!Ce)return!1;if(Ce){var Oe;if(Se.length>0&&(Oe=Se[0]),Oe instanceof Error)throw Oe;var Re=new Error("Unhandled error."+(Oe?" ("+Oe.message+")":""));throw Re.context=Oe,Re}var We=Ae[le];if(We===void 0)return!1;if(typeof We=="function")De(We,this,Se);else for(var $e=We.length,Je=fe(We,$e),pe=0;pe<$e;++pe)De(Je[pe],this,Se);return!0};function ve(se,le,Se,pe){var Ce,Ae,Oe;if(me(Se),Ae=se._events,Ae===void 0?(Ae=se._events=Object.create(null),se._eventsCount=0):(Ae.newListener!==void 0&&(se.emit("newListener",le,Se.listener?Se.listener:Se),Ae=se._events),Oe=Ae[le]),Oe===void 0)Oe=Ae[le]=Se,++se._eventsCount;else if(typeof Oe=="function"?Oe=Ae[le]=pe?[Se,Oe]:[Oe,Se]:pe?Oe.unshift(Se):Oe.push(Se),Ce=be(se),Ce>0&&Oe.length>Ce&&!Oe.warned){Oe.warned=!0;var Re=new Error("Possible EventEmitter memory leak detected. "+Oe.length+" "+String(le)+" listeners added. Use emitter.setMaxListeners() to increase limit");Re.name="MaxListenersExceededWarning",Re.emitter=se,Re.type=le,Re.count=Oe.length,ye(Re)}return se}Me.prototype.addListener=function(le,Se){return ve(this,le,Se,!1)},Me.prototype.on=Me.prototype.addListener,Me.prototype.prependListener=function(le,Se){return ve(this,le,Se,!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 ge(se,le,Se){var pe={fired:!1,wrapFn:void 0,target:se,type:le,listener:Se},Ce=we.bind(pe);return Ce.listener=Se,pe.wrapFn=Ce,Ce}Me.prototype.once=function(le,Se){return me(Se),this.on(le,ge(this,le,Se)),this},Me.prototype.prependOnceListener=function(le,Se){return me(Se),this.prependListener(le,ge(this,le,Se)),this},Me.prototype.removeListener=function(le,Se){var pe,Ce,Ae,Oe,Re;if(me(Se),Ce=this._events,Ce===void 0)return this;if(pe=Ce[le],pe===void 0)return this;if(pe===Se||pe.listener===Se)--this._eventsCount===0?this._events=Object.create(null):(delete Ce[le],Ce.removeListener&&this.emit("removeListener",le,pe.listener||Se));else if(typeof pe!="function"){for(Ae=-1,Oe=pe.length-1;Oe>=0;Oe--)if(pe[Oe]===Se||pe[Oe].listener===Se){Re=pe[Oe].listener,Ae=Oe;break}if(Ae<0)return this;Ae===0?pe.shift():ue(pe,Ae),pe.length===1&&(Ce[le]=pe[0]),Ce.removeListener!==void 0&&this.emit("removeListener",le,Re||Se)}return this},Me.prototype.off=Me.prototype.removeListener,Me.prototype.removeAllListeners=function(le){var Se,pe,Ce;if(pe=this._events,pe===void 0)return this;if(pe.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):pe[le]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete pe[le]),this;if(arguments.length===0){var Ae=Object.keys(pe),Oe;for(Ce=0;Ce<Ae.length;++Ce)Oe=Ae[Ce],Oe!=="removeListener"&&this.removeAllListeners(Oe);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Se=pe[le],typeof Se=="function")this.removeListener(le,Se);else if(Se!==void 0)for(Ce=Se.length-1;Ce>=0;Ce--)this.removeListener(le,Se[Ce]);return this};function he(se,le,Se){var pe=se._events;if(pe===void 0)return[];var Ce=pe[le];return Ce===void 0?[]:typeof Ce=="function"?Se?[Ce.listener||Ce]:[Ce]:Se?ee(Ce):fe(Ce,Ce.length)}Me.prototype.listeners=function(le){return he(this,le,!0)},Me.prototype.rawListeners=function(le){return he(this,le,!1)},Me.listenerCount=function(se,le){return typeof se.listenerCount=="function"?se.listenerCount(le):xe.call(se,le)},Me.prototype.listenerCount=xe;function xe(se){var le=this._events;if(le!==void 0){var Se=le[se];if(typeof Se=="function")return 1;if(Se!==void 0)return Se.length}return 0}Me.prototype.eventNames=function(){return this._eventsCount>0?Le(this._events):[]};function fe(se,le){for(var Se=new Array(le),pe=0;pe<le;++pe)Se[pe]=se[pe];return Se}function ue(se,le){for(;le+1<se.length;le++)se[le]=se[le+1];se.pop()}function ee(se){for(var le=new Array(se.length),Se=0;Se<le.length;++Se)le[Se]=se[Se].listener||se[Se];return le}function z(se,le){return new Promise(function(Se,pe){function Ce(Oe){se.removeListener(le,Ae),pe(Oe)}function Ae(){typeof se.removeListener=="function"&&se.removeListener("error",Ce),Se([].slice.call(arguments))}ie(se,le,Ae,{once:!0}),le!=="error"&&oe(se,Ce,{once:!0})})}function oe(se,le,Se){typeof se.on=="function"&&ie(se,"error",le,Se)}function ie(se,le,Se,pe){if(typeof se.on=="function")pe.once?se.once(le,Se):se.on(le,Se);else if(typeof se.addEventListener=="function")se.addEventListener(le,function Ce(Ae){pe.once&&se.removeEventListener(le,Ce),Se(Ae)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof se)}},23495:function(_n,hn,De){"use strict";De.d(hn,{$u:function(){return we},BD:function(){return ut},E9:function(){return ve},FF:function(){return Oo},FJ:function(){return le},Hn:function(){return se},KX:function(){return pe},NB:function(){return Ze},S0:function(){return on},UL:function(){return ge},Vk:function(){return ie},Vm:function(){return mt},YI:function(){return Jt},ZA:function(){return Fe},Zt:function(){return he},al:function(){return nt},bn:function(){return ht},bx:function(){return ze},g2:function(){return jt},h1:function(){return We},hD:function(){return Qi},l4:function(){return me},rU:function(){return Xe},s_:function(){return je},uz:function(){return rt},z6:function(){return xe}}),_n=De.hmd(_n),function(){var qe;function Tn(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function In(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Tn(a)}}function zi(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var Gi=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Vi;if(typeof Object.setPrototypeOf=="function")Vi=Object.setPrototypeOf;else{var Zi;e:{var qr={a:!0},sn={};try{sn.__proto__=qr,Zi=sn.a;break e}catch(a){}Zi=!1}Vi=Zi?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var He=Vi;function Ve(a,y){if(a.prototype=Gi(y.prototype),a.prototype.constructor=a,He)He(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 De.g!="undefined"&&De.g!=null?De.g:self,Lt=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},At=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function an(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&&At(x,a,{writable:!0,value:y})}}an("Object.assign",function(a){return a||Lt}),an("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 Ot=typeof globalThis=="object"&&globalThis||typeof De.g=="object"&&De.g.global===De.g&&De.g||typeof self=="object"&&self.self===self&&self||{};Ot.requestAnimationFrame===void 0&&(Ot.setImmediate===void 0?Ot.requestAnimationFrame=function(a){Ot.setTimeout(a,0)}:Ot.requestAnimationFrame=Ot.setImmediate);function xn(){}function Zn(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&Ot.clearTimeout(x),x=wi(function(){x=-1,a.apply(b,E)},y)}}function wi(a,y){return Ot.setTimeout(a,y)}function Bn(a){return Ot.document.createElement(a)}function rn(a){throw Error(a)}function Fn(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),rn(a)}function vi(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),rn(x+" is not in the range "+y+": "+a)}function _i(a){Ot.console&&Ot.console.log(a)}function cn(a){return typeof a=="object"&&a!==null}function qn(a){return Array.isArray(a)||Ot.NodeList&&a instanceof Ot.NodeList||Ot.HTMLCollection&&a instanceof Ot.HTMLCollection}function Ii(a){return Array.prototype.slice.call(a)}function lr(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):rn("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function _r(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):rn("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Ti(){var a=Io.pop();return a===void 0?[]:a}function bi(a){a.length=0,Io.push(a)}function li(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(cn(a)&&a.constructor)return li(a.constructor);return typeof a}function dr(a){var y=a;return cn(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 jr(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 ei(a,y,x){Object.defineProperty(Ko.prototype,a,{get:y,set:x})}function Ui(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 ws=Ot.navigator!==void 0&&0<Ot.navigator.userAgent.indexOf("Trident/7"),cs=Ot.navigator!==void 0&&Ot.navigator.platform!==void 0&&Ot.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Io=[];Object.freeze([]),xn.className="Util",xn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",xn.adym="gojs.net",xn.vfo="28e645fdb266",xn.className="Util";function dn(a,y,x){en(this),this.j=a,this.xa=y,this.o=x}dn.prototype.toString=function(){return"EnumValue."+this.xa};function gr(a,y){return y==null||y===""?null:a[y]}ot.Object.defineProperties(dn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),dn.className="EnumValue";function Zr(){this.ew=[]}Zr.prototype.toString=function(){return this.ew.join("")},Zr.prototype.add=function(a){a!==""&&this.ew.push(a)},Zr.className="StringBuilder";function $i(){}$i.className="PropertyCollection";var yo={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){Ot.console&&Ot.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,ae){return function(){throw Error("Property "+ne.Zl[ae.Tj]+" of "+ne.x+" is read-only.")}}(y,E)})}}}y={Zl:y.Zl,x:y.x}}}};function Rr(){}Rr.prototype.reset=function(){},Rr.prototype.next=function(){return!1},Rr.prototype.Ad=function(){return!1},Rr.prototype.first=function(){return null},Rr.prototype.any=function(){return!1},Rr.prototype.all=function(){return!0},Rr.prototype.each=function(){return this},Rr.prototype.map=function(){return this},Rr.prototype.filter=function(){return this},Rr.prototype.de=function(){},Rr.prototype.toString=function(){return"EmptyIterator"},ot.Object.defineProperties(Rr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Rr.prototype.first=Rr.prototype.first,Rr.prototype.hasNext=Rr.prototype.Ad,Rr.prototype.next=Rr.prototype.next,Rr.prototype.reset=Rr.prototype.reset;var uo=null;Rr.className="EmptyIterator",uo=new Rr;function to(a){this.key=-1,this.value=a}to.prototype.reset=function(){this.key=-1},to.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},to.prototype.Ad=function(){return this.next()},to.prototype.first=function(){return this.key=0,this.value},to.prototype.any=function(a){return this.key=-1,a(this.value)},to.prototype.all=function(a){return this.key=-1,a(this.value)},to.prototype.each=function(a){return this.key=-1,a(this.value),this},to.prototype.map=function(a){return new to(a(this.value))},to.prototype.filter=function(a){return a(this.value)?new to(this.value):uo},to.prototype.de=function(){this.value=null},to.prototype.toString=function(){return"SingletonIterator("+this.value+")"},ot.Object.defineProperties(to.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),to.prototype.first=to.prototype.first,to.prototype.hasNext=to.prototype.Ad,to.prototype.next=to.prototype.next,to.prototype.reset=to.prototype.reset,to.className="SingletonIterator";function Yr(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}Yr.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},Yr.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},Yr.prototype.Ad=function(){return this.next()},Yr.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},Yr.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},Yr.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},Yr.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},Yr.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 zn,a.s=x,a.xb(),a.iterator},Yr.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 zn,a.s=x,a.xb(),a.iterator},Yr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},Yr.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},ot.Object.defineProperties(Yr.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}}}),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="ListIterator";function Fo(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}Fo.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},Fo.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)},Fo.prototype.Ad=function(){return this.next()},Fo.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},Fo.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},Fo.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},Fo.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},Fo.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 zn,a.s=x,a.xb(),a.iterator},Fo.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 zn,a.s=x,a.xb(),a.iterator},Fo.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},Fo.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},ot.Object.defineProperties(Fo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),Fo.prototype.first=Fo.prototype.first,Fo.prototype.hasNext=Fo.prototype.Ad,Fo.prototype.next=Fo.prototype.next,Fo.prototype.reset=Fo.prototype.reset,Fo.className="ListIteratorBackwards";function zn(a){en(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&rn("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}qe=zn.prototype,qe.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},qe.freeze=function(){return this._isFrozen=!0,this},qe.ka=function(){return this._isFrozen=!1,this},qe.toString=function(){return"List()#"+Ft(this)},qe.add=function(a){return a===null?this:(this._isFrozen&&Fn(this,a),this.s.push(a),this.xb(),this)},qe.push=function(a){this.add(a)},qe.addAll=function(a){if(a===null)return this;this._isFrozen&&Fn(this);var y=this.s;if(qn(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},qe.clear=function(){this._isFrozen&&Fn(this),this.s.length=0,this.xb()},qe.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},qe.has=function(a){return this.contains(a)},qe.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},qe.M=function(a){var y=this.s;return(0>a||a>=y.length)&&vi(a,"0 <= i < length",zn,"elt:i"),y[a]},qe.get=function(a){return this.M(a)},qe.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&vi(a,"0 <= i < length",zn,"setElt:i"),this._isFrozen&&Fn(this,a),x[a]=y},qe.set=function(a,y){this.cd(a,y)},qe.first=function(){var a=this.s;return a.length===0?null:a[0]},qe.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},qe.pop=function(){this._isFrozen&&Fn(this);var a=this.s;return 0<a.length?a.pop():null},zn.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},zn.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},zn.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},zn.prototype.map=function(a){for(var y=new zn,x=[],b=this.s,E=b.length,te=0;te<E;te++)x.push(a(b[te]));return y.s=x,y.xb(),y},zn.prototype.filter=function(a){for(var y=new zn,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},qe=zn.prototype,qe.Gb=function(a,y){0>a&&vi(a,">= 0",zn,"insertAt:i"),this._isFrozen&&Fn(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},qe.remove=function(a){if(a===null)return!1;this._isFrozen&&Fn(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)},qe.delete=function(a){return this.remove(a)},qe.mb=function(a){var y=this.s;(0>a||a>=y.length)&&vi(a,"0 <= i < length",zn,"removeAt:i"),this._isFrozen&&Fn(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},qe.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&&Fn(this);for(var E=a,te=y+1;te<b;)x[E++]=x[te++];return x.length=b-(y-a+1),this.xb(),this},zn.prototype.copy=function(){var a=new zn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},qe=zn.prototype,qe.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},qe.Iv=function(){for(var a=new Ut,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},qe.sort=function(a){return this._isFrozen&&Fn(this),this.s.sort(a),this.xb(),this},qe.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&Fn(this);var te=x-y;if(1>=te)return this;if((0>y||y>=E-1)&&vi(y,"0 <= from < length",zn,"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},qe.reverse=function(){return this._isFrozen&&Fn(this),this.s.reverse(),this.xb(),this},ot.Object.defineProperties(zn.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 uo;var a=this.Sa;return a!==null?(a.reset(),a):new Yr(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return uo;var a=this.Hg;return a!==null?(a.reset(),a):new Fo(this)}}}),zn.prototype.reverse=zn.prototype.reverse,zn.prototype.sortRange=zn.prototype.zi,zn.prototype.sort=zn.prototype.sort,zn.prototype.toSet=zn.prototype.Iv,zn.prototype.toArray=zn.prototype.Fa,zn.prototype.removeRange=zn.prototype.removeRange,zn.prototype.removeAt=zn.prototype.mb,zn.prototype.delete=zn.prototype.delete,zn.prototype.remove=zn.prototype.remove,zn.prototype.insertAt=zn.prototype.Gb,zn.prototype.pop=zn.prototype.pop,zn.prototype.last=zn.prototype.jc,zn.prototype.first=zn.prototype.first,zn.prototype.set=zn.prototype.set,zn.prototype.setElt=zn.prototype.cd,zn.prototype.get=zn.prototype.get,zn.prototype.elt=zn.prototype.M,zn.prototype.indexOf=zn.prototype.indexOf,zn.prototype.has=zn.prototype.has,zn.prototype.contains=zn.prototype.contains,zn.prototype.clear=zn.prototype.clear,zn.prototype.addAll=zn.prototype.addAll,zn.prototype.push=zn.prototype.push,zn.prototype.add=zn.prototype.add,zn.prototype.thaw=zn.prototype.ka,zn.prototype.freeze=zn.prototype.freeze,zn.className="List";function ns(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}ns.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},ns.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)},ns.prototype.Ad=function(){return this.next()},ns.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},ns.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},ns.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},ns.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},ns.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new zn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},ns.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new zn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},ns.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},ns.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},ot.Object.defineProperties(ns.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),ns.prototype.first=ns.prototype.first,ns.prototype.hasNext=ns.prototype.Ad,ns.prototype.next=ns.prototype.next,ns.prototype.reset=ns.prototype.reset,ns.className="SetIterator";function Ut(a){en(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&rn("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}qe=Ut.prototype,qe.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},qe.freeze=function(){return this._isFrozen=!0,this},qe.ka=function(){return this._isFrozen=!1,this},qe.toString=function(){return"Set()#"+Ft(this)},qe.add=function(a){if(a===null)return this;this._isFrozen&&Fn(this,a);var y=a;return cn(a)&&(y=jn(a)),this.Tb[y]===void 0&&(this.Sb++,a=new yi(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},qe.addAll=function(a){if(a===null)return this;if(this._isFrozen&&Fn(this),qn(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},qe.contains=function(a){if(a===null)return!1;var y=a;return cn(a)&&(y=Ft(a),y===void 0)?!1:this.Tb[y]!==void 0},qe.has=function(a){return this.contains(a)},qe.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},qe.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},qe.first=function(){var a=this.ea;return a===null?null:a.value},Ut.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Ut.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Ut.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},Ut.prototype.map=function(a){for(var y=new Ut,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},Ut.prototype.filter=function(a){for(var y=new Ut,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},qe=Ut.prototype,qe.remove=function(a){if(a===null)return!1;this._isFrozen&&Fn(this,a);var y=a;if(cn(a)&&(y=Ft(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},qe.delete=function(a){return this.remove(a)},qe.hp=function(a){if(a===null)return this;if(this._isFrozen&&Fn(this),qn(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},qe.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&Fn(this);var y=new Ut;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},qe.clear=function(){this._isFrozen&&Fn(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},Ut.prototype.copy=function(){var a=new Ut,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},Ut.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},Ut.prototype.Hv=function(){var a=new zn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function en(a){a.__gohashid=Yt++}function jn(a){var y=a.__gohashid;return y===void 0&&(y=Yt++,a.__gohashid=y),y}function Ft(a){return a.__gohashid}ot.Object.defineProperties(Ut.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return uo;var a=this.Sa;return a!==null?(a.reset(),a):new ns(this)}}}),Ut.prototype.toList=Ut.prototype.Hv,Ut.prototype.toArray=Ut.prototype.Fa,Ut.prototype.clear=Ut.prototype.clear,Ut.prototype.retainAll=Ut.prototype.pA,Ut.prototype.removeAll=Ut.prototype.hp,Ut.prototype.delete=Ut.prototype.delete,Ut.prototype.remove=Ut.prototype.remove,Ut.prototype.first=Ut.prototype.first,Ut.prototype.containsAny=Ut.prototype.Ty,Ut.prototype.containsAll=Ut.prototype.Sy,Ut.prototype.has=Ut.prototype.has,Ut.prototype.contains=Ut.prototype.contains,Ut.prototype.addAll=Ut.prototype.addAll,Ut.prototype.add=Ut.prototype.add,Ut.prototype.thaw=Ut.prototype.ka,Ut.prototype.freeze=Ut.prototype.freeze;var Yt=1;Ut.className="Set",Ut.uniqueHash=en,Ut.hashIdUnique=jn,Ut.hashId=Ft;function nn(a){this.ma=a,this.qa=a.Ja,this.sa=null}nn.prototype.reset=function(){this.qa=this.ma.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.value=this.key=a=y.key,!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.value=this.key=a=a.key):null},nn.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},nn.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},nn.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},nn.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new zn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},nn.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new zn;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},nn.prototype.de=function(){this.value=this.key=null,this.qa=-1},nn.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},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="MapKeySetIterator";function yn(a){Ut.call(this),en(this),this._isFrozen=!0,this.ma=a}Ve(yn,Ut),qe=yn.prototype,qe.freeze=function(){return this},qe.ka=function(){return this},qe.toString=function(){return"MapKeySet("+this.ma.toString()+")"},qe.add=function(){rn("This Set is read-only: "+this.toString())},qe.contains=function(a){return this.ma.contains(a)},qe.has=function(a){return this.contains(a)},qe.remove=function(){rn("This Set is read-only: "+this.toString())},qe.delete=function(a){return this.remove(a)},qe.clear=function(){rn("This Set is read-only: "+this.toString())},qe.first=function(){var a=this.ma.ea;return a!==null?a.key:null},yn.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},yn.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},yn.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},yn.prototype.map=function(a){for(var y=new Ut,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},yn.prototype.filter=function(a){for(var y=new Ut,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},yn.prototype.copy=function(){return new yn(this.ma)},yn.prototype.Iv=function(){var a=new Ut,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},yn.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},yn.prototype.Hv=function(){var a=new zn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},ot.Object.defineProperties(yn.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?uo:new nn(this.ma)}}}),yn.prototype.toList=yn.prototype.Hv,yn.prototype.toArray=yn.prototype.Fa,yn.prototype.toSet=yn.prototype.Iv,yn.prototype.first=yn.prototype.first,yn.prototype.clear=yn.prototype.clear,yn.prototype.delete=yn.prototype.delete,yn.prototype.remove=yn.prototype.remove,yn.prototype.has=yn.prototype.has,yn.prototype.contains=yn.prototype.contains,yn.prototype.add=yn.prototype.add,yn.prototype.thaw=yn.prototype.ka,yn.prototype.freeze=yn.prototype.freeze,yn.className="MapKeySet";function Xn(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Xn.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Xn.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)},Xn.prototype.Ad=function(){return this.next()},Xn.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},Xn.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},Xn.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},Xn.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},Xn.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new zn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Xn.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new zn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Xn.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Xn.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},ot.Object.defineProperties(Xn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Xn.prototype.first=Xn.prototype.first,Xn.prototype.hasNext=Xn.prototype.Ad,Xn.prototype.next=Xn.prototype.next,Xn.prototype.reset=Xn.prototype.reset,Xn.className="MapValueSetIterator";function yi(a,y){this.key=a,this.value=y,this.ll=this.va=null}yi.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},yi.className="KeyValuePair";function gi(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}gi.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},gi.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)},gi.prototype.Ad=function(){return this.next()},gi.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},gi.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},gi.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},gi.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},gi.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new zn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},gi.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new zn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},gi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},gi.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},ot.Object.defineProperties(gi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),gi.prototype.first=gi.prototype.first,gi.prototype.hasNext=gi.prototype.Ad,gi.prototype.next=gi.prototype.next,gi.prototype.reset=gi.prototype.reset,gi.className="MapIterator";function Dn(a){en(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"&&rn("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}qe=Dn.prototype,qe.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},qe.freeze=function(){return this._isFrozen=!0,this},qe.ka=function(){return this._isFrozen=!1,this},qe.toString=function(){return"Map()#"+Ft(this)},qe.add=function(a,y){this._isFrozen&&Fn(this,a);var x=a;cn(a)&&(x=jn(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new yi(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},qe.set=function(a,y){return this.add(a,y)},qe.addAll=function(a){if(a===null)return this;if(qn(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 Dn)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},qe.first=function(){return this.ea},Dn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Dn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Dn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Dn.prototype.map=function(a){for(var y=new Dn,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Dn.prototype.filter=function(a){for(var y=new Dn,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},qe=Dn.prototype,qe.contains=function(a){var y=a;return cn(a)&&(y=Ft(a),y===void 0)?!1:this.Tb[y]!==void 0},qe.has=function(a){return this.contains(a)},qe.I=function(a){var y=a;return cn(a)&&(y=Ft(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},qe.get=function(a){return this.I(a)},qe.remove=function(a){if(a===null)return!1;this._isFrozen&&Fn(this,a);var y=a;if(cn(a)&&(y=Ft(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},qe.delete=function(a){return this.remove(a)},qe.clear=function(){this._isFrozen&&Fn(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()},Dn.prototype.copy=function(){var a=new Dn,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},Dn.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 yi(E.key,E.value),x++}return y},Dn.prototype.Lf=function(){return new yn(this)},ot.Object.defineProperties(Dn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return uo;var a=this.Sa;return a!==null?(a.reset(),a):new gi(this)}},iteratorKeys:{get:function(){return 0>=this.count?uo:new nn(this)}},iteratorValues:{get:function(){if(0>=this.count)return uo;var a=this.jf;return a!==null?(a.reset(),a):new Xn(this)}}}),Dn.prototype.toKeySet=Dn.prototype.Lf,Dn.prototype.toArray=Dn.prototype.Fa,Dn.prototype.clear=Dn.prototype.clear,Dn.prototype.delete=Dn.prototype.delete,Dn.prototype.remove=Dn.prototype.remove,Dn.prototype.get=Dn.prototype.get,Dn.prototype.getValue=Dn.prototype.I,Dn.prototype.has=Dn.prototype.has,Dn.prototype.contains=Dn.prototype.contains,Dn.prototype.first=Dn.prototype.first,Dn.prototype.addAll=Dn.prototype.addAll,Dn.prototype.set=Dn.prototype.set,Dn.prototype.add=Dn.prototype.add,Dn.prototype.thaw=Dn.prototype.ka,Dn.prototype.freeze=Dn.prototype.freeze,Dn.className="Map";function vt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):rn("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Sr,Er,no,io,ro;vt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},vt.prototype.h=function(a,y){return this.x=a,this.y=y,this},vt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},vt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},vt.prototype.copy=function(){var a=new vt;return a.x=this.x,a.y=this.y,a},qe=vt.prototype,qe.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},qe.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},qe.freeze=function(){return this._isFrozen=!0,this},qe.ka=function(){return Object.isFrozen(this)&&rn("cannot thaw constant: "+this),this._isFrozen=!1,this};function zr(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 vt(x,E)}return new vt}function Go(a){return a.x.toString()+" "+a.y.toString()}qe.toString=function(){return"Point("+this.x+","+this.y+")"},qe.D=function(a){return a instanceof vt?this.x===a.x&&this.y===a.y:!1},qe.hi=function(a,y){return this.x===a&&this.y===y},qe.Xa=function(a){return tn.B(this.x,a.x)&&tn.B(this.y,a.y)},qe.add=function(a){return this.x+=a.x,this.y+=a.y,this},qe.re=function(a){return this.x-=a.x,this.y-=a.y,this},qe.offset=function(a,y){return this.x+=a,this.y+=y,this},vt.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},qe=vt.prototype,qe.scale=function(a,y){return this.x*=a,this.y*=y,this},qe.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},qe.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},qe.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},qe.ab=function(a){return co(a.x-this.x,a.y-this.y)},qe.direction=function(a,y){return co(a-this.x,y-this.y)};function co(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}qe.Ry=function(a,y){return tn.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},qe.fA=function(a,y,x,b){return tn.qh(a,y,x,b,this.x,this.y,this),this},qe.gA=function(a,y){return tn.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},qe.uA=function(a,y,x,b){return tn.No(this.x,this.y,a,y,x,b,this),this},qe.vA=function(a,y){return tn.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},qe.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},qe.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},qe.transform=function(a){return a.Ga(this),this};function br(a,y){return y.Cd(a),a}function ir(a,y,x,b,E,te){var ne=E-x,ae=te-b,ce=ne*ne+ae*ae;x-=a,b-=y;var _e=-x*ne-b*ae;return 0>=_e||_e>=ce?(ne=E-a,ae=te-y,Math.min(x*x+b*b,ne*ne+ae*ae)):(a=ne*b-ae*x,a*a/ce)}function Pi(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function ui(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)}qe.w=function(){return isFinite(this.x)&&isFinite(this.y)},vt.alloc=function(){var a=Di.pop();return a===void 0?new vt:a},vt.allocAt=function(a,y){var x=Di.pop();return x===void 0?new vt(a,y):(x.x=a,x.y=y,x)},vt.free=function(a){Di.push(a)},vt.prototype.isReal=vt.prototype.w,vt.prototype.setSpot=vt.prototype.yi,vt.prototype.setRectSpot=vt.prototype.xi,vt.prototype.snapToGridPoint=vt.prototype.vA,vt.prototype.snapToGrid=vt.prototype.uA,vt.prototype.projectOntoLineSegmentPoint=vt.prototype.gA,vt.prototype.projectOntoLineSegment=vt.prototype.fA,vt.intersectingLineSegments=function(a,y,x,b,E,te,ne,ae){return tn.Rl(a,y,x,b,E,te,ne,ae)},vt.prototype.compareWithLineSegmentPoint=vt.prototype.Ry,vt.compareWithLineSegment=function(a,y,x,b,E,te){return tn.Fl(a,y,x,b,E,te)},vt.prototype.direction=vt.prototype.direction,vt.prototype.directionPoint=vt.prototype.ab,vt.prototype.normalize=vt.prototype.normalize,vt.prototype.distanceSquared=vt.prototype.zd,vt.prototype.distanceSquaredPoint=vt.prototype.Bf,vt.prototype.scale=vt.prototype.scale,vt.prototype.rotate=vt.prototype.rotate,vt.prototype.offset=vt.prototype.offset,vt.prototype.subtract=vt.prototype.re,vt.prototype.add=vt.prototype.add,vt.prototype.equalsApprox=vt.prototype.Xa,vt.prototype.equalTo=vt.prototype.hi,vt.prototype.equals=vt.prototype.D,vt.prototype.set=vt.prototype.set,vt.prototype.setTo=vt.prototype.sg;var Di=[];vt.className="Point",vt.parse=zr,vt.stringify=Go,vt.distanceLineSegmentSquared=ir,vt.distanceSquared=Pi,vt.direction=ui,vt.Origin=Sr=new vt(0,0).ja(),vt.InfiniteTopLeft=Er=new vt(-1/0,-1/0).ja(),vt.InfiniteBottomRight=no=new vt(1/0,1/0).ja(),vt.SixPoint=io=new vt(6,6).ja(),vt.NoPoint=ro=new vt(NaN,NaN).ja(),vt.parse=zr,vt.stringify=Go,vt.distanceLineSegmentSquared=ir,vt.distanceSquared=Pi,vt.direction=ui;function Sn(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):rn("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var ji,Wi,Ur,Xr,Jr,xo,Qo;Sn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},Sn.prototype.h=function(a,y){return this.width=a,this.height=y,this},Sn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},Sn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},Sn.prototype.copy=function(){var a=new Sn;return a.width=this.width,a.height=this.height,a},qe=Sn.prototype,qe.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},qe.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},qe.freeze=function(){return this._isFrozen=!0,this},qe.ka=function(){return Object.isFrozen(this)&&rn("cannot thaw constant: "+this),this._isFrozen=!1,this};function Wo(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 Sn(x,E)}return new Sn}function _s(a){return a.width.toString()+" "+a.height.toString()}qe.toString=function(){return"Size("+this.width+","+this.height+")"},qe.D=function(a){return a instanceof Sn?this.width===a.width&&this.height===a.height:!1},qe.hi=function(a,y){return this.width===a&&this.height===y},qe.Xa=function(a){return tn.B(this.width,a.width)&&tn.B(this.height,a.height)},qe.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},qe.w=function(){return isFinite(this.width)&&isFinite(this.height)},Sn.alloc=function(){var a=As.pop();return a===void 0?new Sn:a},Sn.free=function(a){As.push(a)},Sn.prototype.isReal=Sn.prototype.w,Sn.prototype.inflate=Sn.prototype.Bc,Sn.prototype.equalsApprox=Sn.prototype.Xa,Sn.prototype.equalTo=Sn.prototype.hi,Sn.prototype.equals=Sn.prototype.D,Sn.prototype.set=Sn.prototype.set,Sn.prototype.setTo=Sn.prototype.sg;var As=[];Sn.className="Size",Sn.parse=Wo,Sn.stringify=_s,Sn.ZeroSize=ji=new Sn(0,0).ja(),Sn.OneSize=Wi=new Sn(1,1).ja(),Sn.SixSize=Ur=new Sn(6,6).ja(),Sn.EightSize=Xr=new Sn(8,8).ja(),Sn.TenSize=Jr=new Sn(10,10).ja(),Sn.InfiniteSize=xo=new Sn(1/0,1/0).ja(),Sn.NoSize=Qo=new Sn(NaN,NaN).ja(),Sn.parse=Wo,Sn.stringify=_s;function pn(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 vt?(x=a.x,a=a.y,y instanceof vt?(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 Sn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):rn("Incorrect second argument supplied to Rect constructor "+y)):rn("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}qe=pn.prototype,qe.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},qe.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function ss(a,y,x){a.width=y,a.height=x}qe.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},qe.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},qe.dd=function(a){return this.x=a.x,this.y=a.y,this},qe.tA=function(a){return this.width=a.width,this.height=a.height,this},pn.prototype.copy=function(){var a=new pn;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},qe=pn.prototype,qe.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},qe.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},qe.freeze=function(){return this._isFrozen=!0,this},qe.ka=function(){return Object.isFrozen(this)&&rn("cannot thaw constant: "+this),this._isFrozen=!1,this};function ps(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 pn(x,E,te,ne)}return new pn}function Ts(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}qe.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},qe.D=function(a){return a instanceof pn?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},qe.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},qe.Xa=function(a){return tn.B(this.x,a.x)&&tn.B(this.y,a.y)&&tn.B(this.width,a.width)&&tn.B(this.height,a.height)};function mo(a,y){return tn.$(a.x,y.x)&&tn.$(a.y,y.y)&&tn.$(a.width,y.width)&&tn.$(a.height,y.height)}qe.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},qe.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},qe.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},qe.offset=function(a,y){return this.x+=a,this.y+=y,this},qe.Bc=function(a,y){return Ns(this,y,a,y,a)},qe.Co=function(a){return Ns(this,a.top,a.right,a.bottom,a.left)},qe.Fv=function(a){return Ns(this,-a.top,-a.right,-a.bottom,-a.left)},qe.Hz=function(a,y,x,b){return Ns(this,a,y,x,b)};function Ns(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}qe.Ex=function(a){return Ss(this,a.x,a.y,a.width,a.height)},qe.Uu=function(a,y,x,b){return Ss(this,a,y,x,b)};function Ss(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}qe.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},qe.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 Us(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))}qe.Ye=function(a){return fo(this,a.x,a.y,0,0)},qe.ed=function(a){return fo(this,a.x,a.y,a.width,a.height)},qe.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),fo(this,a,y,x,b)};function fo(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}qe.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 Co(a,y,x,b,E,te,ne,ae){return ne===void 0&&(ne=0),ae===void 0&&(ae=0),a<=E&&E+ne<=a+x&&y<=te&&te+ae<=y+b}function pr(a,y,x,b,E,te,ne,ae){return a>ne+E||E>x+a?!1:!(y>ae+te||te>b+y)}qe.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},qe.Mz=function(){return this.width===0&&this.height===0},pn.alloc=function(){var a=Ro.pop();return a===void 0?new pn:a},pn.allocAt=function(a,y,x,b){var E=Ro.pop();return E===void 0?new pn(a,y,x,b):E.h(a,y,x,b)},pn.free=function(a){Ro.push(a)},ot.Object.defineProperties(pn.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 vt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new Sn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new vt(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}}}),pn.prototype.isEmpty=pn.prototype.Mz,pn.prototype.isReal=pn.prototype.w,pn.intersectsLineSegment=function(a,y,x,b,E,te,ne,ae){return tn.Fx(a,y,x,b,E,te,ne,ae)},pn.prototype.setSpot=pn.prototype.yi,pn.prototype.union=pn.prototype.Kv,pn.prototype.unionRect=pn.prototype.ed,pn.prototype.unionPoint=pn.prototype.Ye,pn.prototype.intersects=pn.prototype.Vu,pn.prototype.intersectsRect=pn.prototype.Yc,pn.prototype.intersect=pn.prototype.Uu,pn.prototype.intersectRect=pn.prototype.Ex,pn.prototype.grow=pn.prototype.Hz,pn.prototype.subtractMargin=pn.prototype.Fv,pn.prototype.addMargin=pn.prototype.Co,pn.prototype.inflate=pn.prototype.Bc,pn.prototype.offset=pn.prototype.offset,pn.prototype.contains=pn.prototype.contains,pn.prototype.containsRect=pn.prototype.Re,pn.prototype.containsPoint=pn.prototype.ca,pn.prototype.equalsApprox=pn.prototype.Xa,pn.prototype.equalTo=pn.prototype.hi,pn.prototype.equals=pn.prototype.D,pn.prototype.setSize=pn.prototype.tA,pn.prototype.setPoint=pn.prototype.dd,pn.prototype.set=pn.prototype.set,pn.prototype.setTo=pn.prototype.sg;var Gr=null,po=null,Ro=[];pn.className="Rect",pn.parse=ps,pn.stringify=Ts,pn.contains=Co,pn.intersects=pr,pn.ZeroRect=Gr=new pn(0,0,0,0).ja(),pn.NoRect=po=new pn(NaN,NaN,NaN,NaN).ja(),pn.parse=ps,pn.stringify=Ts,pn.contains=Co,pn.intersects=pr;function Ei(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):rn("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Ei.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Ei.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Ei.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Ei.prototype.copy=function(){var a=new Ei;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},qe=Ei.prototype,qe.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},qe.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},qe.freeze=function(){return this._isFrozen=!0,this},qe.ka=function(){return Object.isFrozen(this)&&rn("cannot thaw constant: "+this),this._isFrozen=!1,this};function ms(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 Ei;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Ei(x);for(var te=NaN;a[y]==="";)y++;if((b=a[y++])&&(te=parseFloat(b)),isNaN(te))return new Ei(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new Ei(x,E):new Ei(x,E,te,ne)}return new Ei}function hs(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}qe.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},qe.D=function(a){return a instanceof Ei?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},qe.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},qe.Xa=function(a){return tn.B(this.top,a.top)&&tn.B(this.right,a.right)&&tn.B(this.bottom,a.bottom)&&tn.B(this.left,a.left)},qe.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Ei.alloc=function(){var a=ra.pop();return a===void 0?new Ei:a},Ei.free=function(a){ra.push(a)},Ei.prototype.isReal=Ei.prototype.w,Ei.prototype.equalsApprox=Ei.prototype.Xa,Ei.prototype.equalTo=Ei.prototype.hi,Ei.prototype.equals=Ei.prototype.D,Ei.prototype.set=Ei.prototype.set,Ei.prototype.setTo=Ei.prototype.sg;var ds=null,ia=null,ra=[];Ei.className="Margin",Ei.parse=ms,Ei.stringify=hs,Ei.ZeroMargin=ds=new Ei(0,0,0,0).ja(),Ei.TwoMargin=ia=new Ei(2,2,2,2).ja(),Ei.parse=ms,Ei.stringify=hs;function di(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 xs,Ls,ga,vs,oa,Hr,Xa,Hs,Ks,ka,Hl,cu,Ta,al,fh,kh,ph,qh,Ia,za,Tl,Al,Gl,Pc,Cc,ma,ff,Dd,Qh,bu,Ja,Ua,xa,Aa,Th,Nl;di.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},di.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},di.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},di.prototype.copy=function(){var a=new di;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},qe=di.prototype,qe.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},qe.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},qe.freeze=function(){return this._isFrozen=!0,this},qe.ka=function(){return Object.isFrozen(this)&&rn("cannot thaw constant: "+this),this._isFrozen=!1,this};function Qs(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function Ah(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return xs;if(a==="TopLeft")return Ls;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return ga;if(a==="TopRight")return vs;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return oa;if(a==="Center")return Hr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Xa;if(a==="BottomLeft")return Hs;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Ks;if(a==="BottomRight")return ka;if(a==="TopSide")return Hl;if(a==="LeftSide")return cu;if(a==="RightSide")return Ta;if(a==="BottomSide")return al;if(a==="TopBottomSides")return fh;if(a==="LeftRightSides")return kh;if(a==="TopLeftSides")return ph;if(a==="TopRightSides")return qh;if(a==="BottomLeftSides")return Ia;if(a==="BottomRightSides")return za;if(a==="NotTopSide")return Tl;if(a==="NotLeftSide")return Al;if(a==="NotRightSide")return Gl;if(a==="NotBottomSide")return Pc;if(a==="AllSides")return Cc;if(a==="Default")return ma;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 di(x,E,te,ne)}return new di}function $h(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}qe.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(xs)?"None":this.D(Ls)?"TopLeft":this.D(ga)?"Top":this.D(vs)?"TopRight":this.D(oa)?"Left":this.D(Hr)?"Center":this.D(Xa)?"Right":this.D(Hs)?"BottomLeft":this.D(Ks)?"Bottom":this.D(ka)?"BottomRight":this.D(Hl)?"TopSide":this.D(cu)?"LeftSide":this.D(Ta)?"RightSide":this.D(al)?"BottomSide":this.D(fh)?"TopBottomSides":this.D(kh)?"LeftRightSides":this.D(ph)?"TopLeftSides":this.D(qh)?"TopRightSides":this.D(Ia)?"BottomLeftSides":this.D(za)?"BottomRightSides":this.D(Tl)?"NotTopSide":this.D(Al)?"NotLeftSide":this.D(Gl)?"NotRightSide":this.D(Pc)?"NotBottomSide":this.D(Cc)?"AllSides":this.D(ma)?"Default":"None"},qe.D=function(a){return a instanceof di?(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},qe.gv=function(){return new di(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},qe.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(ff))a=cu;else if(a.D(Dd))a=Ta;else if(a.D(Qh))a=Hl;else if(a.D(bu))a=al;else return!1;return a=a.offsetY,(this.offsetY&a)===a},qe.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},qe.Mc=function(){return isNaN(this.x)||isNaN(this.y)},qe.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},qe.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},qe.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},di.alloc=function(){var a=Nh.pop();return a===void 0?new di:a},di.free=function(a){Nh.push(a)},di.prototype.isDefault=di.prototype.Xb,di.prototype.isNone=di.prototype.ys,di.prototype.isSide=di.prototype.$c,di.prototype.isNoSpot=di.prototype.Mc,di.prototype.isSpot=di.prototype.sb,di.prototype.includesSide=di.prototype.Hf,di.prototype.opposite=di.prototype.gv,di.prototype.equals=di.prototype.D,di.prototype.set=di.prototype.set,di.prototype.setTo=di.prototype.sg;var Nh=[];di.className="Spot",di.parse=Ah,di.stringify=$h,di.None=xs=Qs(new di(0,0,0,0),0).ja(),di.Default=ma=Qs(new di(0,0,-1,0),-1).ja(),di.TopLeft=Ls=new di(0,0,0,0).ja(),di.TopCenter=ga=new di(.5,0,0,0).ja(),di.TopRight=vs=new di(1,0,0,0).ja(),di.LeftCenter=oa=new di(0,.5,0,0).ja(),di.Center=Hr=new di(.5,.5,0,0).ja(),di.RightCenter=Xa=new di(1,.5,0,0).ja(),di.BottomLeft=Hs=new di(0,1,0,0).ja(),di.BottomCenter=Ks=new di(.5,1,0,0).ja(),di.BottomRight=ka=new di(1,1,0,0).ja(),di.MiddleTop=Ja=ga,di.MiddleLeft=Ua=oa,di.MiddleRight=xa=Xa,di.MiddleBottom=Aa=Ks,di.Top=Qh=ga,di.Left=ff=oa,di.Right=Dd=Xa,di.Bottom=bu=Ks,di.TopSide=Hl=Qs(new di(0,0,1,1),1).ja(),di.LeftSide=cu=Qs(new di(0,0,1,2),1).ja(),di.RightSide=Ta=Qs(new di(0,0,1,4),1).ja(),di.BottomSide=al=Qs(new di(0,0,1,8),1).ja(),di.TopBottomSides=fh=Qs(new di(0,0,1,9),1).ja(),di.LeftRightSides=kh=Qs(new di(0,0,1,6),1).ja(),di.TopLeftSides=ph=Qs(new di(0,0,1,3),1).ja(),di.TopRightSides=qh=Qs(new di(0,0,1,5),1).ja(),di.BottomLeftSides=Ia=Qs(new di(0,0,1,10),1).ja(),di.BottomRightSides=za=Qs(new di(0,0,1,12),1).ja(),di.NotTopSide=Tl=Qs(new di(0,0,1,14),1).ja(),di.NotLeftSide=Al=Qs(new di(0,0,1,13),1).ja(),di.NotRightSide=Gl=Qs(new di(0,0,1,11),1).ja(),di.NotBottomSide=Pc=Qs(new di(0,0,1,7),1).ja(),di.AllSides=Cc=Qs(new di(0,0,1,15),1).ja(),Th=new di(.156,.156).ja(),Nl=new di(.844,.844).ja(),di.parse=Ah,di.stringify=$h;function xr(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}xr.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},xr.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},xr.prototype.copy=function(){var a=new xr;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},xr.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},xr.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},xr.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},xr.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},xr.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},xr.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},xr.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},xr.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},qe=xr.prototype,qe.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},qe.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},qe.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)},qe.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))},qe.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))},qe.pp=function(a){var y=a.x,x=a.y,b=y+a.width,E=x+a.height,te=this.m11,ne=this.m12,ae=this.m21,ce=this.m22,_e=this.dx,Pe=this.dy,Ne=y*te+x*ae+_e,Ge=y*ne+x*ce+Pe,Ye=b*te+x*ae+_e,Qe=b*ne+x*ce+Pe;return x=y*te+E*ae+_e,y=y*ne+E*ce+Pe,te=b*te+E*ae+_e,b=b*ne+E*ce+Pe,E=Math.min(Ne,Ye),Ne=Math.max(Ne,Ye),Ye=Math.min(Ge,Qe),Ge=Math.max(Ge,Qe),E=Math.min(E,x),Ne=Math.max(Ne,x),Ye=Math.min(Ye,y),Ge=Math.max(Ge,y),E=Math.min(E,te),Ne=Math.max(Ne,te),Ye=Math.min(Ye,b),Ge=Math.max(Ge,b),a.h(E,Ye,Ne-E,Ge-Ye),a},xr.alloc=function(){var a=ed.pop();return a===void 0?new xr:a},xr.free=function(a){ed.push(a)},xr.prototype.transformRect=xr.prototype.pp,xr.prototype.transformPoint=xr.prototype.Ga,xr.prototype.scale=xr.prototype.scale,xr.prototype.translate=xr.prototype.translate,xr.prototype.rotate=xr.prototype.rotate,xr.prototype.invert=xr.prototype.Vj,xr.prototype.multiplyInverted=xr.prototype.bv,xr.prototype.multiply=xr.prototype.multiply,xr.prototype.reset=xr.prototype.reset,xr.prototype.isIdentity=xr.prototype.ws,xr.prototype.equals=xr.prototype.D,xr.prototype.setTransform=xr.prototype.setTransform,xr.prototype.set=xr.prototype.set;var ed=[];xr.className="Transform",xr.xF="54a702f3e53909c447824c6706603faf4c";var tn={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=tn.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);tn.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 ae=a,ce=x;else ae=x,ce=a;if(y<b)var _e=y,Pe=b;else _e=b,Pe=y;if(a===x)return _e<=ne&&ne<=Pe&&a-E<=te&&te<=a+E;if(y===b)return ae<=te&&te<=ce&&y-E<=ne&&ne<=y+E;if(ce+=E,ae-=E,ae<=te&&te<=ce&&(Pe+=E,_e-=E,_e<=ne&&ne<=Pe))if(ce-ae>Pe-_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,ae,ce,_e,Pe,Ne){if(tn.Yb(a,y,ne,ae,Ne,x,b)&&tn.Yb(a,y,ne,ae,Ne,E,te))return tn.Yb(a,y,ne,ae,Ne,_e,Pe);var Ge=(a+x)/2,Ye=(y+b)/2,Qe=(x+E)/2,at=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(Ge+Qe)/2,x=(Ye+at)/2,Qe=(Qe+E)/2,at=(at+te)/2;var Ct=(b+Qe)/2,xt=(x+at)/2;return tn.cs(a,y,Ge,Ye,b,x,Ct,xt,ce,_e,Pe,Ne)||tn.cs(Ct,xt,Qe,at,E,te,ne,ae,ce,_e,Pe,Ne)},ax:function(a,y,x,b,E,te,ne,ae,ce){var _e=(x+E)/2,Pe=(b+te)/2;return ce.h((((a+x)/2+_e)/2+(_e+(E+ne)/2)/2)/2,(((y+b)/2+Pe)/2+(Pe+(te+ae)/2)/2)/2),ce},My:function(a,y,x,b,E,te,ne,ae){var ce=(x+E)/2,_e=(b+te)/2;return ui(((a+x)/2+ce)/2,((y+b)/2+_e)/2,(ce+(E+ne)/2)/2,(_e+(te+ae)/2)/2)},Dl:function(a,y,x,b,E,te,ne,ae,ce,_e){if(tn.Yb(a,y,ne,ae,ce,x,b)&&tn.Yb(a,y,ne,ae,ce,E,te))fo(_e,a,y,0,0),fo(_e,ne,ae,0,0);else{var Pe=(a+x)/2,Ne=(y+b)/2,Ge=(x+E)/2,Ye=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(Pe+Ge)/2,x=(Ne+Ye)/2,Ge=(Ge+E)/2,Ye=(Ye+te)/2;var Qe=(b+Ge)/2,at=(x+Ye)/2;tn.Dl(a,y,Pe,Ne,b,x,Qe,at,ce,_e),tn.Dl(Qe,at,Ge,Ye,E,te,ne,ae,ce,_e)}return _e},Qe:function(a,y,x,b,E,te,ne,ae,ce,_e){if(tn.Yb(a,y,ne,ae,ce,x,b)&&tn.Yb(a,y,ne,ae,ce,E,te))_e.length===0&&(_e.push(a),_e.push(y)),_e.push(ne),_e.push(ae);else{var Pe=(a+x)/2,Ne=(y+b)/2,Ge=(x+E)/2,Ye=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(Pe+Ge)/2,x=(Ne+Ye)/2,Ge=(Ge+E)/2,Ye=(Ye+te)/2;var Qe=(b+Ge)/2,at=(x+Ye)/2;tn.Qe(a,y,Pe,Ne,b,x,Qe,at,ce,_e),tn.Qe(Qe,at,Ge,Ye,E,te,ne,ae,ce,_e)}return _e},jv:function(a,y,x,b,E,te,ne,ae,ce,_e){if(tn.Yb(a,y,E,te,_e,x,b))return tn.Yb(a,y,E,te,_e,ae,ce);var Pe=(a+x)/2,Ne=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Ge=(Pe+x)/2,Ye=(Ne+b)/2;return tn.jv(a,y,Pe,Ne,Ge,Ye,ne,ae,ce,_e)||tn.jv(Ge,Ye,x,b,E,te,ne,ae,ce,_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,ae){if(tn.Yb(a,y,E,te,ne,x,b))fo(ae,a,y,0,0),fo(ae,E,te,0,0);else{var ce=(a+x)/2,_e=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Pe=(ce+x)/2,Ne=(_e+b)/2;tn.iv(a,y,ce,_e,Pe,Ne,ne,ae),tn.iv(Pe,Ne,x,b,E,te,ne,ae)}return ae},ep:function(a,y,x,b,E,te,ne,ae){if(tn.Yb(a,y,E,te,ne,x,b))ae.length===0&&(ae.push(a),ae.push(y)),ae.push(E),ae.push(te);else{var ce=(a+x)/2,_e=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Pe=(ce+x)/2,Ne=(_e+b)/2;tn.ep(a,y,ce,_e,Pe,Ne,ne,ae),tn.ep(Pe,Ne,x,b,E,te,ne,ae)}return ae},Eo:function(a,y,x,b,E,te,ne,ae,ce,_e,Pe,Ne,Ge,Ye){if(tn.Yb(a,y,ne,ae,Ge,x,b)&&tn.Yb(a,y,ne,ae,Ge,E,te))return!tn.Rl(a,y,ne,ae,ce,_e,Pe,Ne)||(Ge=(a-ne)*(_e-Ne)-(y-ae)*(ce-Pe),Ge===0)?!1:(Ye.h(((a*ae-y*ne)*(ce-Pe)-(a-ne)*(ce*Ne-_e*Pe))/Ge,((a*ae-y*ne)*(_e-Ne)-(y-ae)*(ce*Ne-_e*Pe))/Ge),!0);var Qe=(a+x)/2,at=(y+b)/2,Ct=(x+E)/2,xt=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(Qe+Ct)/2,x=(at+xt)/2,Ct=(Ct+E)/2,xt=(xt+te)/2;var Tt=(b+Ct)/2,Nt=(x+xt)/2,It=1/0,Zt=!1,un=0,$n=0;return tn.Eo(a,y,Qe,at,b,x,Tt,Nt,ce,_e,Pe,Ne,Ge,Ye)&&(a=(Ye.x-ce)*(Ye.x-ce)+(Ye.y-_e)*(Ye.y-_e),a<It&&(It=a,Zt=!0,un=Ye.x,$n=Ye.y)),tn.Eo(Tt,Nt,Ct,xt,E,te,ne,ae,ce,_e,Pe,Ne,Ge,Ye)&&(Ye.x-ce)*(Ye.x-ce)+(Ye.y-_e)*(Ye.y-_e)<It&&(Zt=!0,un=Ye.x,$n=Ye.y),Zt&&(Ye.x=un,Ye.y=$n),Zt},Fo:function(a,y,x,b,E,te,ne,ae,ce,_e,Pe,Ne,Ge){var Ye=0;if(tn.Yb(a,y,ne,ae,Ge,x,b)&&tn.Yb(a,y,ne,ae,Ge,E,te)){if(Ge=(a-ne)*(_e-Ne)-(y-ae)*(ce-Pe),Ge===0)return Ye;var Qe=((a*ae-y*ne)*(ce-Pe)-(a-ne)*(ce*Ne-_e*Pe))/Ge,at=((a*ae-y*ne)*(_e-Ne)-(y-ae)*(ce*Ne-_e*Pe))/Ge;if(Qe>=Pe)return Ye;if((ce>Pe?ce-Pe:Pe-ce)<(_e>Ne?_e-Ne:Ne-_e)){if(y<ae?(ce=y,a=ae):(ce=ae,a=y),at<ce||at>a)return Ye}else if(a<ne?(ce=a,a=ne):ce=ne,Qe<ce||Qe>a)return Ye;0<Ge?Ye++:0>Ge&&Ye--}else{Qe=(a+x)/2,at=(y+b)/2;var Ct=(x+E)/2,xt=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(Qe+Ct)/2,x=(at+xt)/2,Ct=(Ct+E)/2,xt=(xt+te)/2;var Tt=(b+Ct)/2,Nt=(x+xt)/2;Ye+=tn.Fo(a,y,Qe,at,b,x,Tt,Nt,ce,_e,Pe,Ne,Ge),Ye+=tn.Fo(Tt,Nt,Ct,xt,E,te,ne,ae,ce,_e,Pe,Ne,Ge)}return Ye},qh:function(a,y,x,b,E,te,ne){return tn.$(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)):tn.$(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,ae,ce){return tn.B(a,x)&&tn.B(y,b)?(ce.h(a,y),!1):tn.$(E,ne)?tn.$(a,x)?(tn.qh(a,y,x,b,E,te,ce),!1):tn.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,ce):(ae=(ae-te)/(ne-E),tn.$(a,x)?(x=ae*(a-E)+te,y<b?(E=y,y=b):E=b,x<E?(ce.h(a,E),!1):x>y?(ce.h(a,y),!1):(ce.h(a,x),!0)):(ne=(b-y)/(x-a),tn.$(ae,ne)?(tn.qh(a,y,x,b,E,te,ce),!1):(E=(ne*a-ae*E+te-y)/(ne-ae),tn.$(ne,0)?(a<x?(b=a,a=x):b=x,E<b?(ce.h(b,y),!1):E>a?(ce.h(a,y),!1):(ce.h(E,y),!0)):tn.qh(a,y,x,b,E,ne*(E-a)+y,ce))))},MA:function(a,y,x,b,E){return tn.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,ae,ce,_e){function Pe(Ct,xt){var Tt=(Ct-a)*(Ct-a)+(xt-y)*(xt-y);Tt<Ne&&(Ne=Tt,ce.h(Ct,xt))}var Ne=1/0;Pe(ce.x,ce.y);var Ge=0,Ye=0,Qe=0,at=0;if(E<ne?(Ge=E,Ye=ne):(Ge=ne,Ye=E),te<ae?(Qe=E,at=ne):(Qe=ne,at=E),Ge=(Ye-Ge)/2+_e,_e=(at-Qe)/2+_e,E=(E+ne)/2,te=(te+ae)/2,Ge===0||_e===0)return ce;if(.5>(x>a?x-a:a-x)){if(Ge=1-(x-E)*(x-E)/(Ge*Ge),0>Ge)return ce;Ge=Math.sqrt(Ge),b=-_e*Ge+te,Pe(x,_e*Ge+te),Pe(x,b)}else{if(x=(b-y)/(x-a),b=1/(Ge*Ge)+x*x/(_e*_e),ae=2*x*(y-x*a)/(_e*_e)-2*x*te/(_e*_e)-2*E/(Ge*Ge),Ge=ae*ae-4*b*(2*x*a*te/(_e*_e)-2*y*te/(_e*_e)+te*te/(_e*_e)+E*E/(Ge*Ge)-1+(y-x*a)*(y-x*a)/(_e*_e)),0>Ge)return ce;Ge=Math.sqrt(Ge),_e=(-ae+Ge)/(2*b),Pe(_e,x*_e-x*a+y),Ge=(-ae-Ge)/(2*b),Pe(Ge,x*Ge-x*a+y)}return ce},Ff:function(a,y,x,b,E,te,ne,ae,ce){var _e=1e21,Pe=a,Ne=y;if(tn.Ve(a,y,a,b,E,te,ne,ae,ce)){var Ge=(ce.x-E)*(ce.x-E)+(ce.y-te)*(ce.y-te);Ge<_e&&(_e=Ge,Pe=ce.x,Ne=ce.y)}return tn.Ve(x,y,x,b,E,te,ne,ae,ce)&&(Ge=(ce.x-E)*(ce.x-E)+(ce.y-te)*(ce.y-te),Ge<_e&&(_e=Ge,Pe=ce.x,Ne=ce.y)),tn.Ve(a,y,x,y,E,te,ne,ae,ce)&&(y=(ce.x-E)*(ce.x-E)+(ce.y-te)*(ce.y-te),y<_e&&(_e=y,Pe=ce.x,Ne=ce.y)),tn.Ve(a,b,x,b,E,te,ne,ae,ce)&&(a=(ce.x-E)*(ce.x-E)+(ce.y-te)*(ce.y-te),a<_e&&(_e=a,Pe=ce.x,Ne=ce.y)),ce.h(Pe,Ne),1e21>_e},us:function(a,y,x){return tn.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,ae){var ce=a+x,_e=y+b;return E===ne?(te<ae?(ne=te,te=ae):ne=ae,a<=E&&E<=ce&&ne<=_e&&te>=y):te===ae?(E<ne?(ae=E,E=ne):ae=ne,y<=te&&te<=_e&&ae<=ce&&E>=a):!!(Co(a,y,x,b,E,te)||Co(a,y,x,b,ne,ae)||tn.Rl(a,y,ce,y,E,te,ne,ae)||tn.Rl(ce,y,ce,_e,E,te,ne,ae)||tn.Rl(ce,_e,a,_e,E,te,ne,ae)||tn.Rl(a,_e,a,y,E,te,ne,ae))},Rl:function(a,y,x,b,E,te,ne,ae){return a===x&&y===b&&E===ne&&te===ae?a===E&&y===te:0>=tn.Fl(a,y,x,b,E,te)*tn.Fl(a,y,x,b,ne,ae)&&0>=tn.Fl(E,te,ne,ae,a,y)*tn.Fl(E,te,ne,ae,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 ae=b>E?-1:1;te=[];var ce=ne/2,_e=b;if(b=Math.min(2*ne,Math.abs(E-b)),1e-5>b)return ce=_e+ae*Math.min(b,ce),ae=a+x*Math.cos(_e),_e=y+x*Math.sin(_e),a+=x*Math.cos(ce),y+=x*Math.sin(ce),x=(ae+a)/2,ce=(_e+y)/2,te.push([ae,_e,x,ce,x,ce,a,y]),te;for(;1e-5<b;)E=_e+ae*Math.min(b,ce),te.push(tn.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),ae=a*Math.sin(te),ce=-ae,_e=ne*ne+ce*ce,Pe=_e+ne*ne+ce*ae;return _e=4/3*(Math.sqrt(2*_e*Pe)-Pe)/(ne*ae-ce*ne),ae=ne-_e*ce,ne=ce+_e*ne,ce=-ne,_e=te+y,te=Math.cos(_e),_e=Math.sin(_e),[b+a*Math.cos(y),E+a*Math.sin(y),b+ae*te-ne*_e,E+ae*_e+ne*te,b+ae*te-ce*_e,E+ae*_e+ce*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 ae=x;return x+E-a<E/2&&(ae=x+E),a=b,b+te-y<te/2&&(a=b+te),ne.h(ae,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,ae=0;else ne=0,ae=1;var ce=ne===0?a:y,_e=ne===0?x:b;return(ne===0?E:te)&&(_e=-_e),ne=ae,x=ne===0?x:b,(ne===0?E:te)&&(x=-x),tn.az(ce,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,ae=-te+ne,ce=-te+Math.sqrt(a*a+ne*ne);y=ae;for(var _e=0;9999999999>_e&&(y=.5*(ae+ce),!(y===ae||y===ce));++_e){var Pe=a/(y+E),Ne=ne/(y+te);if(Pe=Pe*Pe+Ne*Ne-1,0<Pe)ae=y;else if(0>Pe)ce=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 $i,um:new $i,Mf:new $i,Nf:0,vm:100};tn.za=tn.AA;function Kn(a){en(this),this.l=2,a===void 0&&(a=Kn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Kn.o?this.ee=new zn:(Kn.V===null&&(Kn.V=new zn().freeze()),this.ee=Kn.V),this.aq=this.ee.Ja,this.Ip=new pn().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Ls,this.gg=ka,this.Rk=this.Sk=NaN,this.Uf=Nn}Kn.prototype.copy=function(){var a=new Kn;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===Kn.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},Kn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Kn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Kn.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},Kn.prototype.ka=function(){if(Object.isFrozen(this)&&rn("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Kn.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},Kn.prototype.Xa=function(a){if(!(a instanceof Kn))return!1;if(this.type!==a.type)return this.type===Kn.j&&a.type===Kn.o?Od(this,a):a.type===Kn.j&&this.type===Kn.o?Od(a,this):!1;if(this.type===Kn.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 tn.B(this.startX,a.startX)&&tn.B(this.startY,a.startY)&&tn.B(this.endX,a.endX)&&tn.B(this.endY,a.endY)};function Od(a,y){return a.type!==Kn.j||y.type!==Kn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&tn.B(a.startX,y.startX)&&tn.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===zo&&tn.B(a.endX,y.endX)&&tn.B(a.endY,y.endY))))}Kn.ia=function(a){return a.toString()},Kn.prototype.qb=function(a){a.classType===Kn&&(this.type=a)},Kn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Kn.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 Kn.u:var y=new pn(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 Kn.F:if(y=new pn(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 Kn.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()}},Kn.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},Kn.parse=function(a,y){function x(){return at>=It-1?!0:_e[at+1].match(Zt)!==null}function b(){return at++,_e[at]}function E(ar){var Ji=parseFloat(b()),lo=parseFloat(b());Ct===Ct.toLowerCase()&&(Ji=Nt.x+Ji,lo=Nt.y+lo),ar.h(Ji,lo)}function te(){return E(Nt),Nt}function ne(){return E(Tt),Tt}function ae(){var ar=xt.toLowerCase();return ar!=="c"&&ar!=="s"&&ar!=="q"&&ar!=="t"?Nt:new vt(2*Nt.x-Tt.x,2*Nt.y-Tt.y)}y===void 0&&(y=!1);var ce=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(ce,"$1 $2"),a=a.replace(ce,"$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 Pe=_e[a];if(Pe.match(/(\.[0-9]*)(\.)/gm)!==null){ce=Ti();for(var Ne="",Ge=!1,Ye=0;Ye<Pe.length;Ye++){var Qe=Pe[Ye];Qe!=="."||Ge?Qe==="."?(ce.push(Ne),Ne="."):Ne+=Qe:(Ge=!0,Ne+=Qe)}for(ce.push(Ne),_e.splice(a,1),Pe=0;Pe<ce.length;Pe++)_e.splice(a+Pe,0,ce[Pe]);a+=ce.length-1,bi(ce)}}var at=-1,Ct="",xt="";ce=new vt(0,0);var Tt=new vt(0,0),Nt=new vt(0,0),It=_e.length;a=A1(null),Ge=Ne=Pe=!1,Ye=!0,Qe=null;for(var Zt=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(at>=It-1);)if(xt=Ct,Ct=b(),Ct!=="")switch(Ct.toUpperCase()){case"X":Ye=!0,Ne=Pe=!1;break;case"M":for(Qe=te(),a.mc===null||Ye===!0?(vp(a,Qe.x,Qe.y,Pe,!Ne,Ge),Ye=!1):a.moveTo(Qe.x,Qe.y),ce.assign(Nt);!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();)Nt=new vt((Ct===Ct.toLowerCase()?Nt.x:0)+parseFloat(b()),Nt.y),a.lineTo(Nt.x,Nt.y);break;case"V":for(;!x();)Nt=new vt(Nt.x,(Ct===Ct.toLowerCase()?Nt.y:0)+parseFloat(b())),a.lineTo(Nt.x,Nt.y);break;case"C":for(;!x();){Qe=new vt,E(Qe);var un=ne(),$n=te();Ic(a,Qe.x,Qe.y,un.x,un.y,$n.x,$n.y)}break;case"S":for(;!x();)Qe=ae(),un=ne(),$n=te(),Ic(a,Qe.x,Qe.y,un.x,un.y,$n.x,$n.y);break;case"Q":for(;!x();)Qe=ne(),un=te(),Hm(a,Qe.x,Qe.y,un.x,un.y);break;case"T":for(;!x();)Tt=Qe=ae(),un=te(),Hm(a,Qe.x,Qe.y,un.x,un.y);break;case"B":for(;!x();){Qe=parseFloat(b()),un=parseFloat(b()),$n=parseFloat(b());var fi=parseFloat(b()),ai=parseFloat(b()),Un=ai,Pn=!1;x()||(Un=parseFloat(b()),x()||(Pn=parseFloat(b())!==0)),Ct===Ct.toLowerCase()&&($n+=Nt.x,fi+=Nt.y),a.arcTo(Qe,un,$n,fi,ai,Un,Pn)}break;case"A":for(;!x();)Qe=Math.abs(parseFloat(b())),un=Math.abs(parseFloat(b())),$n=parseFloat(b()),ai=fi=!1,Pn=Un=0,Un=b(),Un.length===1?(fi=!!parseFloat(Un),ai=!!parseFloat(b()),Un=parseFloat(b())):Un.length===2?(fi=!!parseFloat(Un[0]),ai=!!parseFloat(Un[1]),Un=parseFloat(b())):(fi=!!parseFloat(Un[0]),ai=!!parseFloat(Un[1]),Un=parseFloat(Un.slice(2))),Pn=parseFloat(b()),Ct===Ct.toLowerCase()&&(Un=Nt.x+Un,Pn=Nt.y+Pn),Nt.h(Un,Pn),bx(a,Qe,un,$n,fi,ai,Un,Pn);break;case"Z":_x(a),Nt.assign(ce);break;case"F":for(Qe="",un=1;_e[at+un];)if(_e[at+un]==="0")Ge=!0,un++;else if(_e[at+un].match(/[Uu]/)!==null)un++;else if(_e[at+un].match(Zt)===null)un++;else{Qe=_e[at+un];break}Qe.match(/[Mm]/)?Pe=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Qe="",un=1;_e[at+un];)if(_e[at+un].match(/[Ff]/)!==null)un++;else if(_e[at+un].match(Zt)===null)un++;else{Qe=_e[at+un];break}Qe.match(/[Mm]/)?Ne=!0:a.mc.isShadowed=!1}if(ce=a.os,Gm=a,y)for(y=ce.figures.iterator;y.next();)y.value.isFilled=!0;return ce},Kn.Ha=function(a,y){for(var x=a.length,b=vt.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}vt.free(b)},Kn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Kn.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},Kn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Kn.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),td(this,a,!1),fo(a,0,0,0,0),a.freeze()},Kn.prototype.ix=function(){var a=new pn;return td(this,a,!0),a};function td(a,y,x){switch(a.type){case Kn.j:case Kn.u:case Kn.F:x?y.h(a.od,a.pd,0,0):fo(y,a.od,a.pd,0,0),fo(y,a.Dc,a.Ec,0,0);break;case Kn.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):fo(y,te.startX,te.startY,0,0);for(var ne=te.segments.s,ae=ne.length,ce=te.startX,_e=te.startY,Pe=0;Pe<ae;Pe++){var Ne=ne[Pe];switch(Ne.type){case zo:case Ds:ce=Ne.endX,_e=Ne.endY,fo(y,ce,_e,0,0);break;case la:tn.Dl(ce,_e,Ne.point1X,Ne.point1Y,Ne.point2X,Ne.point2Y,Ne.endX,Ne.endY,.5,y),ce=Ne.endX,_e=Ne.endY;break;case Qa:tn.iv(ce,_e,Ne.point1X,Ne.point1Y,Ne.endX,Ne.endY,.5,y),ce=Ne.endX,_e=Ne.endY;break;case is:case wl:var Ge=Ne.type===is?qa(Ne,te):Dl(Ne,te,ce,_e),Ye=Ge.length;if(Ye===0){ce=Ne.type===is?Ne.centerX:Ne.endX,_e=Ne.type===is?Ne.centerY:Ne.endY,fo(y,ce,_e,0,0);break}Ne=null;for(var Qe=0;Qe<Ye;Qe++)Ne=Ge[Qe],tn.Dl(Ne[0],Ne[1],Ne[2],Ne[3],Ne[4],Ne[5],Ne[6],Ne[7],.5,y);Ne!==null&&(ce=Ne[6],_e=Ne[7]);break;default:rn("Unknown Segment type: "+Ne.type)}}}break;default:rn("Unknown Geometry type: "+a.type)}}Kn.prototype.normalize=function(){this._isFrozen&&Fn(this);var a=this.ix();return this.offset(-a.x,-a.y),new vt(-a.x,-a.y)},Kn.prototype.offset=function(a,y){return this._isFrozen&&Fn(this),this.transform(1,0,0,1,a,y),this},Kn.prototype.scale=function(a,y){return this._isFrozen&&Fn(this),this.transform(a,0,0,y,0,0),this},Kn.prototype.rotate=function(a,y,x){this._isFrozen&&Fn(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=xr.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),xr.free(b),this},qe=Kn.prototype,qe.transform=function(a,y,x,b,E,te){switch(this.type){case Kn.j:case Kn.u:case Kn.F:var ne=this.od,ae=this.pd;this.od=ne*a+ae*x+E,this.pd=ne*y+ae*b+te,ne=this.Dc,ae=this.Ec,this.Dc=ne*a+ae*x+E,this.Ec=ne*y+ae*b+te;break;case Kn.o:for(var ce=this.figures.s,_e=ce.length,Pe=0;Pe<_e;Pe++){var Ne=ce[Pe];ne=Ne.startX,ae=Ne.startY,Ne.startX=ne*a+ae*x+E,Ne.startY=ne*y+ae*b+te,Ne=Ne.segments.s;for(var Ge=Ne.length,Ye=0;Ye<Ge;Ye++){var Qe=Ne[Ye];switch(Qe.type){case zo:case Ds:ne=Qe.endX,ae=Qe.endY,Qe.endX=ne*a+ae*x+E,Qe.endY=ne*y+ae*b+te;break;case la:ne=Qe.point1X,ae=Qe.point1Y,Qe.point1X=ne*a+ae*x+E,Qe.point1Y=ne*y+ae*b+te,ne=Qe.point2X,ae=Qe.point2Y,Qe.point2X=ne*a+ae*x+E,Qe.point2Y=ne*y+ae*b+te,ne=Qe.endX,ae=Qe.endY,Qe.endX=ne*a+ae*x+E,Qe.endY=ne*y+ae*b+te;break;case Qa:ne=Qe.point1X,ae=Qe.point1Y,Qe.point1X=ne*a+ae*x+E,Qe.point1Y=ne*y+ae*b+te,ne=Qe.endX,ae=Qe.endY,Qe.endX=ne*a+ae*x+E,Qe.endY=ne*y+ae*b+te;break;case is:ne=Qe.centerX,ae=Qe.centerY,Qe.centerX=ne*a+ae*x+E,Qe.centerY=ne*y+ae*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 wl:if(ne=Qe.endX,ae=Qe.endY,Qe.endX=ne*a+ae*x+E,Qe.endY=ne*y+ae*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:rn("Unknown Segment type: "+Qe.type)}}}}return this._isInvalidBounds=!0,this},qe.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 Kn.j:return tn.Yb(x,b,E,te,y,a.x,a.y);case Kn.u:var ne=pn.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),pn.free(ne),a;case Kn.F:ne=Math.min(x,E)-y;var ae=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),ae=a.y-(ae+y),1>=ne*ne/(x*x)+ae*ae/(y*y));case Kn.o:return Pu(this,a,y,!0,!1);default:return!1}};function Pu(a,y,x,b,E){var te=y.x;y=y.y;for(var ne=a.bounds.x-20,ae=0,ce,_e,Pe,Ne,Ge=a.figures.s,Ye=Ge.length,Qe=0;Qe<Ye;Qe++){var at=Ge[Qe],Ct=!at.isEvenOdd;if(at.isFilled){if(b&&at.ca(te,y,x))return!0;var xt=at.segments;ce=at.startX,_e=at.startY;for(var Tt=ce,Nt=_e,It=xt.s,Zt=0;Zt<=xt.length;Zt++){var un=void 0;if(Zt!==xt.length){un=It[Zt];var $n=un.type;a=un.endX,Ne=un.endY}else $n=zo,a=Tt,Ne=Nt;switch($n){case Ds:if(Tt=Cu(te,y,ne,y,ce,_e,Tt,Nt),isNaN(Tt))return!0;ae+=Tt,Tt=a,Nt=Ne;break;case zo:if(ce=Cu(te,y,ne,y,ce,_e,a,Ne),isNaN(ce))return!0;ae+=ce;break;case la:Pe=tn.Fo(ce,_e,un.point1X,un.point1Y,un.point2X,un.point2Y,a,Ne,ne,y,te,y,.5),ae+=Pe;break;case Qa:Pe=tn.Fo(ce,_e,(ce+2*un.point1X)/3,(_e+2*un.point1Y)/3,(2*un.point1X+a)/3,(2*un.point1Y+Ne)/3,a,Ne,ne,y,te,y,.5),ae+=Pe;break;case is:case wl:$n=un.type===is?qa(un,at):Dl(un,at,ce,_e);var fi=$n.length;if(fi===0){if(ce=Cu(te,y,ne,y,ce,_e,un.type===is?un.centerX:un.endX,un.type===is?un.centerY:un.endY),isNaN(ce))return!0;ae+=ce;break}un=null;for(var ai=0;ai<fi;ai++){if(un=$n[ai],ai===0){if(Pe=Cu(te,y,ne,y,ce,_e,un[0],un[1]),isNaN(Pe))return!0;ae+=Pe}Pe=tn.Fo(un[0],un[1],un[2],un[3],un[4],un[5],un[6],un[7],ne,y,te,y,.5),ae+=Pe}un!==null&&(a=un[6],Ne=un[7]);break;default:rn("Unknown Segment type: "+un.type)}ce=a,_e=Ne}if(Ct){if(ae!==0)return!0}else if(ae%2!==0)return!0;ae=0}else if(at.ca(te,y,E?x:x+2))return!0}return!1}function Cu(a,y,x,b,E,te,ne,ae){if(tn.Yb(E,te,ne,ae,.05,a,y))return NaN;var ce=(a-x)*(te-ae);if(ce===0)return 0;var _e=((a*b-y*x)*(E-ne)-(a-x)*(E*ae-te*ne))/ce;if(y=(a*b-y*x)*(te-ae)/ce,_e>=a)return 0;if((E>ne?E-ne:ne-E)<(te>ae?te-ae:ae-te)){if(te<ae){if(y<te||y>ae)return 0}else if(y<ae||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<ce?1:-1}function Dh(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}qe.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new vt),this.type===Kn.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,ae=0;ae<E;ae++){var ce=b[ae],_e=ce.length;for(a=0;a<_e;a++){var Pe=ce[a];if(ne+Pe>=te)return b=te-ne,b=Pe===0?0:b/Pe,x=x[ae],ae=x[2*a],E=x[2*a+1],y.h(ae+(x[2*a+2]-ae)*b,E+(x[2*a+3]-E)*b),y;ne+=Pe}}return y},qe.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Kn.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 ae=x[ne],ce=ae.length;for(a=0;a<ce;a++){var _e=ae[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},qe.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===Kn.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,ae=0;ae<E;ae++){var ce=b[ae],_e=ce.length;for(a=0;a<_e;a++){var Pe=ce[a];if(ne+Pe>=te)return b=te-ne,b=Pe===0?0:b/Pe,Pe=x[ae],x=Pe[2*a],ae=Pe[2*a+1],E=Pe[2*a+2],a=Pe[2*a+3],y[0]=x+(E-x)*b,y[1]=ae+(a-ae)*b,y[2]=1>Math.abs(E-x)&&1>Math.abs(a-ae)?0:1>Math.abs(E-x)?0<=a-ae?90:270:1>Math.abs(a-ae)?0<=E-x?0:180:180*Math.atan2(a-ae,E-x)/Math.PI,y;ne+=Pe}}return y},qe.xx=function(a){if(this.type===Kn.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 ae=vt.alloc();return tn.qh(y,x,b,E,te,a,ae),a=ae.x,te=ae.y,vt.free(ae),Math.sqrt(((a-y)*(a-y)+(te-x)*(te-x))/ne)}}else if(this.type===Kn.u){ne=this.startX,ae=this.startY;var ce=this.endX;if(E=this.endY,ne!==ce||ae!==E){y=ce-ne,x=E-ae,te=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,ne),ce),a=Math.min(Math.max(a,ae),E),ne=Math.abs(b-ne),ce=Math.abs(b-ce),ae=Math.abs(a-ae),E=Math.abs(a-E);var _e=Math.min(ne,ce,ae,E);if(_e===ae)return b/te;if(_e===ce)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=vt.alloc(),E=1/0,ae=ne=0,ce=y.length;for(var Pe=_e=0,Ne=0;Ne<ce;Ne++)for(var Ge=y[Ne],Ye=x[Ne],Qe=Ge.length,at=0;at<Qe;at+=2){var Ct=Ge[at],xt=Ge[at+1];if(at!==0){tn.qh(_e,Pe,Ct,xt,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=ae,ne+=Math.sqrt((b.x-_e)*(b.x-_e)+(b.y-Pe)*(b.y-Pe))),ae+=Ye[(at-2)/2]}_e=Ct,Pe=xt}return vt.free(b),a=ne/te,0>a?0:1<a?1:a}return 0};function ec(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===Kn.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===Kn.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===Kn.F){var te=new Gs;te.startX=a.endX,te.startY=(a.startY+a.endY)/2;var ne=new Kr(is);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=qa(ne,te),E=a.length,E===0)b.push(ne.centerX),b.push(ne.centerY);else{ne=te.startX,te=te.startY;for(var ae=0;ae<E;ae++){var ce=a[ae];tn.Qe(ne,te,ce[2],ce[3],ce[4],ce[5],ce[6],ce[7],.5,b),ne=ce[6],te=ce[7]}}y.push(b),x.push(gh(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,ae=ne,ce=te;for(var _e=E.segments.s,Pe=_e.length,Ne=0;Ne<Pe;Ne++){var Ge=_e[Ne];switch(Ge.type){case Ds:4<=b.length&&(y.push(b),x.push(gh(b))),b=[],b.push(Ge.endX),b.push(Ge.endY),ne=Ge.endX,te=Ge.endY,ae=ne,ce=te;break;case zo:b.push(Ge.endX),b.push(Ge.endY),ne=Ge.endX,te=Ge.endY;break;case la:tn.Qe(ne,te,Ge.point1X,Ge.point1Y,Ge.point2X,Ge.point2Y,Ge.endX,Ge.endY,.5,b),ne=Ge.endX,te=Ge.endY;break;case Qa:tn.ep(ne,te,Ge.point1X,Ge.point1Y,Ge.endX,Ge.endY,.5,b),ne=Ge.endX,te=Ge.endY;break;case is:var Ye=qa(Ge,E),Qe=Ye.length;if(Qe===0){b.push(Ge.centerX),b.push(Ge.centerY),ne=Ge.centerX,te=Ge.centerY;break}for(var at=0;at<Qe;at++){var Ct=Ye[at];tn.Qe(ne,te,Ct[2],Ct[3],Ct[4],Ct[5],Ct[6],Ct[7],.5,b),ne=Ct[6],te=Ct[7]}break;case wl:if(Ye=Dl(Ge,E,ne,te),Qe=Ye.length,at=Ge.endX,Ct=Ge.endY,Qe===0){b.push(at),b.push(Ct),ne=at,te=Ct;break}for(at=0;at<Qe;at++)Ct=Ye[at],tn.Qe(ne,te,Ct[2],Ct[3],Ct[4],Ct[5],Ct[6],Ct[7],.5,b),ne=Ct[6],te=Ct[7];break;default:rn("Segment not of valid type: "+Ge.type)}Ge.isClosed&&(b.push(ae),b.push(ce))}4<=b.length&&(y.push(b),x.push(gh(b)))}}}function gh(a){for(var y=[],x=0,b=0,E=a.length,te=0;te<E;te+=2){var ne=a[te],ae=a[te+1];te!==0&&y.push(Math.sqrt(Pi(x,b,ne,ae))),x=ne,b=ae}return y}qe.add=function(a){return this.ee.add(a),this},qe.pm=function(a,y,x,b,E,te,ne,ae){return this._isFrozen&&Fn(this),this.fg=new di(a,y,E,te).freeze(),this.gg=new di(x,b,ne,ae).freeze(),this},ot.Object.defineProperties(Kn.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 ec(this),this.tk}},flattenedLengths:{get:function(){return ec(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===Kn.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===Kn.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&&Fn(this,a),this.na=a,a===Kn.o?this.ee=new zn:(Kn.V===null&&(Kn.V=new zn().freeze()),this.ee=Kn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&Fn(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&Fn(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&Fn(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&Fn(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&Fn(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&Fn(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&Fn(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&Fn(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Kn.prototype.setSpots=Kn.prototype.pm,Kn.prototype.add=Kn.prototype.add,Kn.prototype.getFractionForPoint=Kn.prototype.xx,Kn.prototype.getPointAndAngleAlongPath=Kn.prototype.Qu,Kn.prototype.getAngleAlongPath=Kn.prototype.wx,Kn.prototype.getPointAlongPath=Kn.prototype.Pu,Kn.prototype.containsPoint=Kn.prototype.ca,Kn.prototype.transform=Kn.prototype.transform,Kn.prototype.rotate=Kn.prototype.rotate,Kn.prototype.scale=Kn.prototype.scale,Kn.prototype.offset=Kn.prototype.offset,Kn.prototype.normalize=Kn.prototype.normalize,Kn.prototype.computeBoundsWithoutOrigin=Kn.prototype.ix,Kn.prototype.equalsApprox=Kn.prototype.Xa,Kn.className="Geometry",Kn.j=new dn(Kn,"Line",0),Kn.u=new dn(Kn,"Rectangle",1),Kn.F=new dn(Kn,"Ellipse",2),Kn.o=new dn(Kn,"Path",3),Kn.V=null,Kn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Kn.className="Geometry",Kn.stringify=Kn.ia,Kn.fillPath=Kn.nb,Kn.parse=Kn.parse,Kn.Line=Kn.j,Kn.Rectangle=Kn.u,Kn.Ellipse=Kn.F,Kn.Path=Kn.o;function Gs(a,y,x,b,E){en(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 zn,this.sr=this.pl.Ja,this.fw=null}Gs.prototype.copy=function(){var a=new Gs;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},qe=Gs.prototype,qe.Xa=function(a){if(!(a instanceof Gs&&tn.B(this.startX,a.startX)&&tn.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},qe.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},qe.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},qe.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},qe.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},qe.add=function(a){return this.pl.add(a),this},qe.ca=function(a,y,x){for(var b=this.startX,E=this.startY,te=b,ne=E,ae=this.segments.s,ce=ae.length,_e=0;_e<ce;_e++){var Pe=ae[_e];switch(Pe.type){case Ds:te=Pe.endX,ne=Pe.endY,b=Pe.endX,E=Pe.endY;break;case zo:if(tn.Yb(b,E,Pe.endX,Pe.endY,x,a,y))return!0;b=Pe.endX,E=Pe.endY;break;case la:if(tn.cs(b,E,Pe.point1X,Pe.point1Y,Pe.point2X,Pe.point2Y,Pe.endX,Pe.endY,.5,a,y,x))return!0;b=Pe.endX,E=Pe.endY;break;case Qa:if(tn.jv(b,E,Pe.point1X,Pe.point1Y,Pe.endX,Pe.endY,.5,a,y,x))return!0;b=Pe.endX,E=Pe.endY;break;case is:case wl:var Ne=Pe.type===is?qa(Pe,this):Dl(Pe,this,b,E),Ge=Ne.length,Ye=Pe.type===is?Pe.centerX:Pe.endX,Qe=Pe.type===is?Pe.centerY:Pe.endY;if(Ge===0){if(tn.Yb(b,E,Ye,Qe,x,a,y))return!0;b=Ye,E=Qe;break}for(Ye=null,Qe=0;Qe<Ge;Qe++)if(Ye=Ne[Qe],Qe===0&&tn.Yb(b,E,Ye[0],Ye[1],x,a,y)||tn.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:rn("Unknown Segment type: "+Pe.type)}if(Pe.isClosed&&(b!==te||E!==ne)&&tn.Yb(b,E,te,ne,x,a,y))return!0}return!1},ot.Object.defineProperties(Gs.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&&Fn(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&Fn(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Fn(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&Fn(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&Fn(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&Fn(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Gs.prototype.add=Gs.prototype.add,Gs.prototype.equalsApprox=Gs.prototype.Xa,Gs.className="PathFigure";function Kr(a,y,x,b,E,te,ne,ae){en(this),a===void 0&&(a=zo),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===wl?(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),ae&&(this.isClockwiseArc=!0)):(this.Ne=b,this.Vh=E,a===is&&(te=Math.max(te,0)),this.Wh=te,typeof ne=="number"?(a===is&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}Kr.prototype.copy=function(){var a=new Kr;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},qe=Kr.prototype,qe.Xa=function(a){if(!(a instanceof Kr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Ds:case zo:return tn.B(this.endX,a.endX)&&tn.B(this.endY,a.endY);case la:return tn.B(this.endX,a.endX)&&tn.B(this.endY,a.endY)&&tn.B(this.point1X,a.point1X)&&tn.B(this.point1Y,a.point1Y)&&tn.B(this.point2X,a.point2X)&&tn.B(this.point2Y,a.point2Y);case Qa:return tn.B(this.endX,a.endX)&&tn.B(this.endY,a.endY)&&tn.B(this.point1X,a.point1X)&&tn.B(this.point1Y,a.point1Y);case is:return tn.B(this.startAngle,a.startAngle)&&tn.B(this.sweepAngle,a.sweepAngle)&&tn.B(this.centerX,a.centerX)&&tn.B(this.centerY,a.centerY)&&tn.B(this.radiusX,a.radiusX)&&tn.B(this.radiusY,a.radiusY);case wl:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&tn.B(this.xAxisRotation,a.xAxisRotation)&&tn.B(this.endX,a.endX)&&tn.B(this.endY,a.endY)&&tn.B(this.radiusX,a.radiusX)&&tn.B(this.radiusY,a.radiusY);default:return!1}},qe.qb=function(a){a.classType===Kr&&(this.type=a)},qe.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Ds:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case zo:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case la: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 Qa: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 is: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 wl: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":"")},qe.freeze=function(){return this._isFrozen=!0,this},qe.ka=function(){return this._isFrozen=!1,this},qe.close=function(){return this.isClosed=!0,this};function qa(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=tn.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var ne=xr.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),Kn.Ha(te,ne),xr.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 Dl(a,y,x,b){function E(at,Ct,xt,Tt){return(at*Tt<Ct*xt?-1:1)*Math.acos((at*xt+Ct*Tt)/(Math.sqrt(at*at+Ct*Ct)*Math.sqrt(xt*xt+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,ae=a.isLargeArc,ce=a.isClockwiseArc,_e=a.Dc,Pe=a.Ec,Ne=Math.cos(ne),Ge=Math.sin(ne),Ye=Ne*(x-_e)/2+Ge*(b-Pe)/2;ne=-Ge*(x-_e)/2+Ne*(b-Pe)/2;var Qe=Ye*Ye/(y*y)+ne*ne/(te*te);return 1<Qe&&(y*=Math.sqrt(Qe),te*=Math.sqrt(Qe)),Qe=(ae===ce?-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),ae=Qe*y*ne/te,Qe=Qe*-te*Ye/y,isNaN(ae)&&(ae=0),isNaN(Qe)&&(Qe=0),x=(x+_e)/2+Ne*ae-Ge*Qe,b=(b+Pe)/2+Ge*ae+Ne*Qe,Pe=E(1,0,(Ye-ae)/y,(ne-Qe)/te),Ne=(Ye-ae)/y,_e=(ne-Qe)/te,Ye=(-Ye-ae)/y,ae=(-ne-Qe)/te,ne=E(Ne,_e,Ye,ae),Ye=(Ne*Ye+_e*ae)/(Math.sqrt(Ne*Ne+_e*_e)*Math.sqrt(Ye*Ye+ae*ae)),-1>=Ye?ne=Math.PI:1<=Ye&&(ne=0),!ce&&0<ne&&(ne-=2*Math.PI),ce&&0>ne&&(ne+=2*Math.PI),ce=y>te?1:y/te,Ye=y>te?te/y:1,y=tn.jx(0,0,y>te?y:te,Pe,Pe+ne,!0),te=xr.alloc(),te.reset(),te.translate(x,b),te.rotate(a.Ne,0,0),te.scale(ce,Ye),Kn.Ha(y,te),xr.free(te),a.ae=y,a.ae}ot.Object.defineProperties(Kr.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&&Fn(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Fn(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Fn(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Fn(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Fn(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&Fn(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&Fn(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Fn(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Fn(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&vi(a,">= zero",Kr,"radiusX"),this._isFrozen&&Fn(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&vi(a,">= zero",Kr,"radiusY"),this._isFrozen&&Fn(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Fn(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&&Fn(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&&Fn(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&&Fn(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&&Fn(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Kr.prototype.equalsApprox=Kr.prototype.Xa;var Ds=new dn(Kr,"Move",0),zo=new dn(Kr,"Line",1),la=new dn(Kr,"Bezier",2),Qa=new dn(Kr,"QuadraticBezier",3),is=new dn(Kr,"Arc",4),wl=new dn(Kr,"SvgArc",4);Kr.className="PathSegment",Kr.Move=Ds,Kr.Line=zo,Kr.Bezier=la,Kr.QuadraticBezier=Qa,Kr.Arc=is,Kr.SvgArc=wl;function sa(){this.H=null,this.xu=new vt(0,0).freeze(),this.mt=new vt(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}sa.prototype.copy=function(){var a=new sa;return this.clone(a)},sa.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},sa.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},sa.prototype.So=function(a,y){var x=this.diagram;return x===null||iu(x,a,y),y},sa.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(iu(x,a,y),y.assign(x.Ps(y))),y},ot.Object.defineProperties(sa.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}}}),sa.prototype.getMultiTouchDocumentPoint=sa.prototype.Bz,sa.prototype.getMultiTouchViewPoint=sa.prototype.So,sa.className="InputEvent";function $u(){this.H=null,this.xa="",this.ar=this.Lr=null}$u.prototype.copy=function(){var a=new $u;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},$u.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($u.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}}}),$u.className="DiagramEvent";function rs(){this.Fm=Jo,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}rs.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},rs.prototype.copy=function(){var a=new rs;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=cn(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=cn(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=cn(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=cn(y)&&typeof y.J=="function"?y.J():y,a},rs.prototype.qb=function(a){a.classType===rs&&(this.change=a)},rs.prototype.toString=function(){var a="";return a=this.change===ba?a+"* ":this.change===Jo?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===ba?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=dr(this.object)),this.oldValue!==null&&(a+=" old: "+dr(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+dr(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},rs.prototype.I=function(a){return a?this.oldValue:this.newValue},rs.prototype.Dz=function(a){return a?this.oldParam:this.newParam},rs.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},rs.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},rs.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},rs.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},ot.Object.defineProperties(rs.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===ba&&(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}}}),rs.prototype.redo=rs.prototype.redo,rs.prototype.canRedo=rs.prototype.canRedo,rs.prototype.undo=rs.prototype.undo,rs.prototype.canUndo=rs.prototype.canUndo,rs.prototype.getParam=rs.prototype.Dz,rs.prototype.getValue=rs.prototype.I,rs.prototype.clear=rs.prototype.clear;var ba=new dn(rs,"Transaction",-1),Jo=new dn(rs,"Property",0),bs=new dn(rs,"Insert",1),Os=new dn(rs,"Remove",2);rs.className="ChangedEvent",rs.Transaction=ba,rs.Property=Jo,rs.Insert=bs,rs.Remove=Os;function Ws(){this.o=new zn().freeze(),this.xa="",this.j=!1}Ws.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},Ws.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()},Ws.prototype.canUndo=function(){return this.isComplete},Ws.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()}},Ws.prototype.canRedo=function(){return this.isComplete},Ws.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()}},Ws.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new Dn,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===Jo&&b.object){var E=y.get(b.object);E||(E=new Dn,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(Ws.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}}}),Ws.prototype.optimize=Ws.prototype.ak,Ws.prototype.redo=Ws.prototype.redo,Ws.prototype.canRedo=Ws.prototype.canRedo,Ws.prototype.undo=Ws.prototype.undo,Ws.prototype.canUndo=Ws.prototype.canUndo,Ws.prototype.clear=Ws.prototype.clear,Ws.className="Transaction";function as(){this.Pt=new Ut,this.Jd=!1,this.u=new zn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new zn().freeze(),this.hl=new zn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}as.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},as.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},as.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},qe=as.prototype,qe.Xw=function(a){this.Pt.add(a)},qe.Rx=function(a){this.Pt.remove(a)},qe.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},qe.eb=function(a){return a===void 0&&(a=""),mh(this,!0,a)},qe.Kf=function(){return mh(this,!1,"")};function mh(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&_i("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}qe.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()}},as.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},as.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){_i("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},as.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},as.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){_i("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},as.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new rs;for(b.change=ba,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},as.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Ws);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||_i("Change not within a transaction: "+x.toString()))}},as.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(as.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}}}),as.prototype.handleChanged=as.prototype.Tu,as.prototype.redo=as.prototype.redo,as.prototype.undo=as.prototype.undo,as.prototype.canUndo=as.prototype.canUndo,as.prototype.discardHistoryAfterIndex=as.prototype.lx,as.prototype.rollbackTransaction=as.prototype.Kf,as.prototype.commitTransaction=as.prototype.eb,as.prototype.startTransaction=as.prototype.Ea,as.prototype.removeModel=as.prototype.Rx,as.prototype.addModel=as.prototype.Xw,as.prototype.clear=as.prototype.clear,as.className="UndoManager";function Fr(){en(this),this.H=Ol,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new sa,this.Zr=-1}Fr.prototype.toString=function(){return this.name!==""?this.name+" Tool":li(this.constructor)},Fr.prototype.updateAdornments=function(){},Fr.prototype.canStart=function(){return this.isEnabled},Fr.prototype.doStart=function(){},Fr.prototype.doActivate=function(){this.isActive=!0},Fr.prototype.doDeactivate=function(){this.isActive=!1},Fr.prototype.doStop=function(){},Fr.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Fr.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Fr.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Fr.prototype.doMouseMove=function(){},Fr.prototype.doMouseUp=function(){this.stopTool()},Fr.prototype.doMouseWheel=function(){},Fr.prototype.canStartMultiTouch=function(){return!0},Fr.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,vt.allocAt(NaN,NaN)),b=y.So(1,vt.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}vt.free(x),vt.free(b)},Fr.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,vt.allocAt(NaN,NaN)),b=y.So(1,vt.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 vt((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 ae=a.zoomPoint;a.zoomPoint=E,ne.resetZoom(te),a.zoomPoint=ae}y.bubbles=!1}vt.free(x),vt.free(b)},Fr.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Fr.prototype.doKeyUp=function(){},Fr.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Fr.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Fr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(cs?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||(cs?y.meta:y.control)||y.shift||a.clearSelection()}},Fr.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,Bu(a,b,x),b.handled};function Bu(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)}}}Fr.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 ae=te.mouseLeave;if(ae!==null&&(b===te||b!==null&&b.rg(te)||(ae(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}},Fr.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Fr.prototype.doCurrentObjectChanged=function(){},Fr.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===nc&&!y.shift||E===tc&&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===nc&&y.shift||E===tc&&!y.control){b=a.position.copy();var te=y.event;E=te.deltaMode;var ne=te.deltaX;te=te.deltaY;var ae="pixel";if(ne===0&&te===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(ae,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(ae,0<x?"left":"right",Math.abs(x)));else{switch(E){case 0:ae="pixel";break;case 1:ae="line";break;case 2:ae="page"}ne!==0&&a.allowHorizontalScroll&&(ne*=a.scrollHorizontalLineChange/16,a.scroll(ae,0<ne?"right":"left",Math.abs(ne))),te!==0&&a.allowVerticalScroll&&(te*=a.scrollVerticalLineChange/16,a.scroll(ae,0<te?"down":"up",Math.abs(te)))}this.doWheelChange(a,b,y)}}},Fr.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Fr.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=wi(function(){x.doWaitAfter(b)},a)},Fr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&Ot.clearTimeout(this.Zr),this.Zr=-1},Fr.prototype.doWaitAfter=function(){},Fr.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof $r);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},Fr.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(Fr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof ln&&(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}}}),Fr.prototype.startTransaction=Fr.prototype.Ea,Fr.className="Tool";function Ko(){Fr.call(this),this.name="ToolManager",this.hb=new zn,this.ob=new zn,this.Hb=new zn,this.F=this.V=850,this.o=new Sn(2,2).ja(),this.Ha=5e3,this.ia=tc,this.u=Ec,this.Mp=this.j=null,this.zj=-1}Ve(Ko,Fr),Ko.prototype.initializeStandardTools=function(){},Ko.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof $r&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Ko.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===ju&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===eh){y.bubbles=!0;return}if(this.gestureBehavior===ju)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===tc?this.mouseWheelBehavior=nc:this.mouseWheelBehavior===nc&&(this.mouseWheelBehavior=tc)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Ko.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===eh){y.bubbles=!0;return}if(this.gestureBehavior===ju)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}}Oh(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Oh(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Ko.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof $r&&(y===a||y.rg(a))||this.hideToolTip()},Ko.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()))},Ko.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)},Ko.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 $r)||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()},Ko.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof $r){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 Tr&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(Ot.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=wi(function(){E.hideToolTip()},a)}},Ko.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}},Ko.prototype.hideToolTip=function(){this.zj!==-1&&(Ot.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof $r?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Tr&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Ko.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()},Ko.prototype.doMouseWheel=function(){this.standardMouseWheel()},Ko.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Ko.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Ko.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},Ko.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},Ko.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(Ko.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 $r?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}}}),Ko.prototype.replaceStandardTool=Ko.prototype.gb;var tc=new dn(Ko,"WheelScroll",0),nc=new dn(Ko,"WheelZoom",1),nd=new dn(Ko,"WheelNone",2),Ec=new dn(Ko,"GestureZoom",3),ju=new dn(Ko,"GestureCancel",4),eh=new dn(Ko,"GestureNone",5);Ko.className="ToolManager",Ko.WheelScroll=tc,Ko.WheelZoom=nc,Ko.WheelNone=nd,Ko.GestureZoom=Ec,Ko.GestureCancel=ju,Ko.GestureNone=eh;function us(){Fr.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 vt(NaN,NaN),this.Fr=new vt,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new Ut().freeze(),this.ia=new de,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var zu;Ve(us,Fr),us.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},us.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},us.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,(cs?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},us.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),Fi=null,this.isActive=!0,this.tl.set(a.position),_t(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&&tl(a),Jf(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,Fi=this,fr=this.diagram,this.doSimulatedDragOut()))};function _t(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Gn?(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 Vn,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}us.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},us.prototype.Pd=function(a){return a===void 0?new cc(Sr):this.isGridSnapEnabled?new cc(new vt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new cc(a.copy())},us.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Ht(this),ad(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<zu.count){for(var y=zu,x=y.length,b=0;b<x;b++){var E=y.M(b);wn(E),fn(E),Ht(E),E.diagram.ug()}y.clear()}wn(this),this.tl.h(NaN,NaN),fr!==null&&(fr.currentCursor=""),Fi=fr=null,fn(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),id(a,!0)},us.prototype.stopTransaction=function(){var a=this.diagram,y=Fr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Ht(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,Jn(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function Bt(){var a=Fi;fn(a),On(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}us.prototype.doCancel=function(){fn(this),On(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},us.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},us.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function Qt(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")):On(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 Dn,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 Gn&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,_t(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,jc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function fn(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 Gn&&(x.value.point=new vt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function wn(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 bn(a,y,x){var b=a.diagram,E=a.startPoint,te=vt.alloc();te.assign(b.lastInput.documentPoint),a.moveParts(y,te.re(E),x),vt.free(te),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(tl(b),b.hk())}us.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&sd(b,a,y,this.dragOptions,x)};function On(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 Gn&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),jc(b,-E.x,-E.y)}y.bd()}}function ti(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),ci(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=Jn(a,E,b),!a.isActive&&Fi===null)return;var ae=b!==null?b.part:null;if(ae===null||x.handlesDragDropForTopLevelParts&&ae.isTopLevel&&!(ae instanceof ur)){var ce=x.mouseDragOver;ce!==null&&(ce(E),ne=!0)}if(!a.isActive&&Fi===null||(a.doDragOver(y,b),!a.isActive&&Fi===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)}us.prototype.findDragOverObject=function(a){var y=this;return Gu(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof $r||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},us.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 Jn(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 ae=a.Cg[ne],ce=ae.mouseDragLeave;if(ce!==null&&(ce(y,ae,x),b=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&Fi===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=oi(E);for(E=a.Cg.length,x=0;x<E&&(ne=a.Cg[x],ae=ne.mouseDragEnter,ae===null||(ae(y,ne,te),b=!0,!y.handled));x++);return b}function oi(a){var y=a.panel;return y!==null?y:a instanceof Ni&&!(a instanceof ur)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Wn(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=vt.alloc();var te=1/0,ne=null;for(E=E.iterator;E.next();){var ae=E.value;if(ae.part!==null){var ce=ae.ga(Hr,a);ce=y.Bf(ce),ce<te&&(ne=ae,te=ce)}}return vt.free(a),ne}function ci(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=Wn(a,x.i(0),!1),te!==null&&(ne=te.part));var ae=null,ce=null;x.toNode===null&&(ae=Wn(a,x.i(x.pointsCount-1),!0),ae!==null&&(ce=ae.part)),E.isValidLink(ne,te,ce,ae)?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=ce,ae!==null&&(x.toPortId=ae.portId),x.fromPort!==b.Mx&&b.R("LinkRelinked",x,b.Mx),x.toPort!==b.Nx&&b.R("LinkRelinked",x,b.Nx)):Hn(E,ne,te,ce,ae):Hn(E,null,null,null,null)}}}}us.prototype.doDragOver=function(){};function ni(a,y){var x=a.diagram;a.dragsLink&&ci(a,!0),Ht(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;Ai(a,E,te),te=oi(te)}}else te=x.mouseDrop,te!==null&&te(E);if(a.isActive||Fi!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)te=E.key,te instanceof ii&&te.linksConnected.each(function(ae){ae.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||Fi!==null){for(a=pn.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof ii&&qi(x,b,a);pn.free(a)}}}function Ai(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof ur||(x=a.mouseDrop,x!==null&&x(y))}function qi(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 Gn},!0,function(E){return E instanceof Gn},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}us.prototype.doDropOnto=function(){},us.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()?(Qt(this,!1),Jf(a,this.copiedParts),bn(this,this.copiedParts,!1),ad(a,this.copiedParts)):this.mayMove()?(fn(this),bn(this,this.draggedParts,!0)):this.mayDragOut()?(Qt(this,!1),bn(this,this.copiedParts,!1)):fn(this),ti(this,a.lastInput.documentPoint))}},us.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?(fn(this),Qt(this,!0),Jf(a,this.copiedParts),bn(this,this.copiedParts,!1),ad(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,fn(this),this.mayMove()&&(bn(this,this.draggedParts,!0),ti(this,a.lastInput.documentPoint))),this.Ym=!0,ni(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&yr(this),a.Ya(),ad(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},us.prototype.simulatedMouseMove=function(a,y,x){if(Fi===null)return!1;var b=Fi.diagram;x instanceof ln||(x=null);var E=fr;return x!==E&&(E!==null&&E!==b&&(E.ug(),Fi.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),fr=x,x!==null&&x!==b&&(Bt(),E=x.toolManager.findTool("Dragging"),E!==null&&(zu.contains(E)||zu.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)},us.prototype.simulatedMouseUp=function(a,y,x){if(Fi===null)return!1;var b=fr,E=Fi.diagram;if(x===null)return Fi.doCancel(),!0;if(x!==b){var te=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&te!==null)return b.ug(),Fi.isDragOutStarted=!1,te.doSimulatedDragLeave(),!1;fr=x,b=x.toolManager.findTool("Dragging"),b!==null&&(Bt(),zu.contains(b)||zu.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 vt),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=Fi,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function yr(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof ii&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}us.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(cs?!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())},us.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())},us.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())},us.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},us.prototype.Az=function(){return Fi},us.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=Fi;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},us.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),ja(a),a.animationManager.Cc(),a=Fi,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},us.prototype.doSimulatedDragLeave=function(){var a=Fi;a!==null&&a.doSimulatedDragOut(),this.doCancel()},us.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Fi;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;Mr(this,y.draggedParts.Lf(),!1,a.firstInput),bn(this,this.copiedParts,!1),ti(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},us.prototype.doSimulatedDrop=function(){var a=this.diagram,y=Fi;if(y!==null){var x=y.diagram;if(y.Ym=!0,fn(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),Mr(this,y.draggedParts.Lf(),!0,a.lastInput),bn(this,this.copiedParts,!1);var b=new Ut;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),ni(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 Mr(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=pn.alloc();E=b=1/0;for(var ne=-1/0,ae=-1/0,ce=y.iterator;ce.next();){var _e=ce.value;if(_e.isVisible()){var Pe=_e.location;_e=Pe.x,Pe=Pe.y,isNaN(_e)||isNaN(Pe)||(_e<b&&(b=_e),Pe<E&&(E=Pe),_e>ne&&(ne=_e),Pe>ae&&(ae=Pe))}}for(b===1/0?te.h(0,0,0,0):te.h(b,E,ne-b,ae-E),b=te.x+te.width/2,E=te.y+te.height/2,pn.free(te),te=a.Fr,ne=new Dn,ae=vt.alloc(),ce=y.iterator;ce.next();)_e=ce.value,_e instanceof Gn&&_e.canCopy()&&(Pe=x.I(_e),Pe!==null&&(Pe.points=_e.points,jc(Pe,te.x-b,te.y-E),Pe.suspendsRouting=!0,ne.add(Pe,a.Pd())));for(y=y.iterator;y.next();)_e=y.value,_e.Zc()&&_e.canCopy()&&(ce=x.I(_e),ce!==null&&(_e=_e.location,ae.h(te.x-(b-_e.x),te.y-(E-_e.y)),ce.location=ae,ce.Va(),ne.add(ce,a.Pd(ae))));vt.free(ae),a.copiedParts=ne,_t(a,ne.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,jc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}us.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},us.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new vt},ot.Object.defineProperties(us.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}}}),us.prototype.getDraggingSource=us.prototype.Az;var Fi=null,fr=null;us.className="DraggingTool",zu=new zn,ei("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Ko.prototype.doCancel=function(){Fi!==null&&Fi.doCancel(),Fr.prototype.doCancel.call(this)};function Xi(){Fr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Gn,y=new mr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new mr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new ii,y=new mr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Wi,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new ii,y=new mr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Wi,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 Dn,this.Of=this.gj=this.Pf=null}Ve(Xi,Fr),Xi.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Xi.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var te=y.Df(),ne=Sn.alloc();ne.width=y.naturalBounds.width*te,ne.height=y.naturalBounds.height*te,b.desiredSize=ne,Sn.free(ne),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Hr,te=vt.alloc(),x.location=y.ga(Hr,te),vt.free(te),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},Xi.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Wi,y.fromSpot=xs,y.toSpot=xs),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Xi.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Xi.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof ii){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)}},Xi.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof ii))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof ii)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},Xi.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,ae=ne.part;if(ae instanceof ii){var ce=ne.ga(Hr,vt.alloc()),_e=x.x-ce.x,Pe=x.y-ce.y;vt.free(ce),ce=_e*_e+Pe*Pe,ce<b&&(_e=this.validPortsCache.I(ne),_e!==null?_e&&(y=ne,b=ce):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,ae,ne)||!a&&this.isValidLink(ae,ne,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(ne,!0),y=ne,b=ce):this.validPortsCache.add(ne,!1))}}return y!==null&&(x=y.part,x instanceof ii&&(x.layer===null||x.layer.allowLink))?y:null},Xi.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},Xi.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},Xi.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Xi.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof ii))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof ii))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},Xi.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)},Xi.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 Ut;return b.add(a),Ar(this,x,y,b)};function Ar(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),Ar(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),Ar(a,y.labeledLink,x,b))))}Xi.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!==xf){if(b===og){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!oo(this,a,y,x,!0)}if(b===sg){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!oo(this,a,y,x,!0)}if(b===ng)return a===y?a=!0:(b=new Ut,b.add(y),a=kt(this,b,a,y,x)),!a;if(b===ig)return!oo(this,a,y,x,!1);if(b===rg)return a===y?a=!0:(b=new Ut,b.add(y),a=Wt(this,b,a,y,x)),!a}return!0};function oo(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&&oo(a,ne,x,b,E)))return!0}return!1}function kt(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&&kt(a,y,ne,b,E)))return!0}return!1}function Wt(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 ae=ne.fromNode;if(ne=ne.toNode,ae=ae===x?ne:ae,ae!==x&&Wt(a,y,ae,b,E))return!0}}return!1}ot.Object.defineProperties(Xi.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}}}),Xi.className="LinkingBaseTool";function qt(){Xi.call(this),this.name="Linking",this.V={},this.F=null,this.K=ki,this.Xd=null}Ve(qt,Xi),qt.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},qt.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 ii)))return null;var x=this.direction;if(x===ki||x===pi){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===ki||x===Qn)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},qt.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 ii&&(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 ii&&(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)},qt.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()},qt.prototype.doStop=function(){Xi.prototype.doStop.call(this),this.startObject=null},qt.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 ae=ne.part;ae instanceof ii&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),b=ae,E=ne):(y=ae,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)}}},qt.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Gn)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)},qt.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},qt.prototype.doNoLink=function(){},ot.Object.defineProperties(qt.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 ki=new dn(qt,"Either",0),pi=new dn(qt,"ForwardsOnly",0),Qn=new dn(qt,"BackwardsOnly",0);qt.className="LinkingTool",qt.Either=ki,qt.ForwardsOnly=pi,qt.BackwardsOnly=Qn;function Vn(){Xi.call(this),this.name="Relinking";var a=new mr;a.figure="Diamond",a.desiredSize=Xr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new mr,a.figure="Diamond",a.desiredSize=Xr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new pn}Ve(Vn,Xi),Vn.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Gn){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)}},Vn.prototype.makeAdornment=function(a,y){var x=new $r;return x.type=Rn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Vn.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},Vn.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 $r&&x.adornedPart instanceof Gn))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=ji),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=ji),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},Vn.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===xp||x===zc)&&(x=pl),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}},Vn.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()},Vn.prototype.doStop=function(){Xi.prototype.doStop.call(this),this.handle=null},Vn.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 ii&&(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()}}},Vn.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},Vn.prototype.doNoRelink=function(){};function Hn(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(Vn.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 $r))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Vn.className="RelinkingTool",ei("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),ei("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function En(){Fr.call(this),this.name="LinkReshaping";var a=new mr;a.figure="Rectangle",a.desiredSize=Ur,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new mr,a.figure="Diamond",a.desiredSize=Xr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new vt,this.Yq=new zn}Ve(En,Fr),En.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:Yi},En.prototype.om=function(a,y){a.reshapingBehavior=y},En.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Gn){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)}},En.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new $r,E.type=Rn.Link,x=y.firstPickIndex;var te=y.lastPickIndex,ne=b?1:0;if(y.resegmentable&&y.computeCurve()!==lu)for(var ae=x+ne;ae<te-ne;ae++){var ce=this.makeResegmentHandle(a,ae);ce!==null&&(ce.segmentIndex=ae,ce.segmentFraction=.5,ce.fromMaxLinks=999,E.add(ce))}for(ne=x+1;ne<te;ne++)if(ae=this.makeHandle(a,ne),ae!==null){if(ae.segmentIndex=ne,ne!==x)if(ne===x+1&&b){ce=y.i(x);var _e=y.i(x+1);tn.B(ce.x,_e.x)&&tn.B(ce.y,_e.y)&&(_e=y.i(x-1)),tn.B(ce.x,_e.x)?(this.om(ae,er),ae.cursor="n-resize"):tn.B(ce.y,_e.y)&&(this.om(ae,Oi),ae.cursor="w-resize")}else ne===te-1&&b?(ce=y.i(te-1),_e=y.i(te),tn.B(ce.x,_e.x)&&tn.B(ce.y,_e.y)&&(ce=y.i(te+1)),tn.B(ce.x,_e.x)?(this.om(ae,er),ae.cursor="n-resize"):tn.B(ce.y,_e.y)&&(this.om(ae,Oi),ae.cursor="w-resize")):ne!==te&&(this.om(ae,Hi),ae.cursor="move");E.add(ae)}E.adornedObject=a}return E},En.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},En.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},En.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},En.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 Gn){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}}},En.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},En.prototype.stopTransaction=function(){var a=this.diagram,y=Fr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},En.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},En.prototype.getResegmentingPoint=function(){return this.handle.ga(Hr)},En.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},En.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&&(ri(this,ne,b,E,te,!0)||ri(this,ne,b,E,te,!1))){var ae=y.points.copy();ri(this,ne,b,E,te,!0)?(ae.cd(x-2,new vt(ne.x,(te.y+ne.y)/2)),ae.cd(x+1,new vt(te.x,(te.y+ne.y)/2))):(ae.cd(x-2,new vt((te.x+ne.x)/2,ne.y)),ae.cd(x+1,new vt((te.x+ne.x)/2,te.y))),ae.mb(x),ae.mb(x-1),y.points=ae,y.Wb()}else ne=y.i(x+2),Math.abs(E.x-te.x)<this.resegmentingDistance&&Math.abs(E.y-te.y)<this.resegmentingDistance&&(ri(this,b,E,te,ne,!0)||ri(this,b,E,te,ne,!1))&&(ae=y.points.copy(),ri(this,b,E,te,ne,!0)?(ae.cd(x-1,new vt(b.x,(b.y+ne.y)/2)),ae.cd(x+2,new vt(ne.x,(b.y+ne.y)/2))):(ae.cd(x-1,new vt((b.x+ne.x)/2,b.y)),ae.cd(x+2,new vt((b.x+ne.x)/2,ne.y))),ae.mb(x+1),ae.mb(x),y.points=ae,y.Wb())}}else ne=vt.alloc(),tn.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()),vt.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function ri(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}En.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===er?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===Oi&&(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===er?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===Oi&&(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);tn.B(te.x,E.x)&&tn.B(E.y,ne.y)?(tn.B(te.x,y.i(b-2).x)&&!tn.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),tn.B(ne.y,y.i(b+2).y)&&!tn.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)):tn.B(te.y,E.y)&&tn.B(E.x,ne.x)?(tn.B(te.y,y.i(b-2).y)&&!tn.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),tn.B(ne.x,y.i(b+2).x)&&!tn.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):tn.B(te.x,E.x)&&tn.B(E.x,ne.x)?(tn.B(te.x,y.i(b-2).x)&&!tn.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),tn.B(ne.x,y.i(b+2).x)&&!tn.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):tn.B(te.y,E.y)&&tn.B(E.y,ne.y)&&(tn.B(te.y,y.i(b-2).y)&&!tn.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),tn.B(ne.y,y.i(b+2).y)&&!tn.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(Hr,vt.alloc()),b=y.getLinkPointFromPoint(b,E,te,a,!0,vt.alloc()),y.L(0,b.x,b.y),vt.free(te),vt.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(Hr,vt.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,vt.alloc()),y.L(y.pointsCount-1,a.x,a.y),vt.free(x),vt.free(a));y.zf()},En.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case Hi:return a;case er:return new vt(y.i(x).x,a.y);case Oi:return new vt(a.x,y.i(x).y);default:case Yi:return y.i(x)}},ot.Object.defineProperties(En.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 $r))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}}}),En.prototype.setReshapingBehavior=En.prototype.om,En.prototype.getReshapingBehavior=En.prototype.Ru;var Yi=new dn(En,"None",0),Oi=new dn(En,"Horizontal",1),er=new dn(En,"Vertical",2),Hi=new dn(En,"All",3);En.className="LinkReshapingTool",En.None=Yi,En.Horizontal=Oi,En.Vertical=er,En.All=Hi,ei("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function sr(){Fr.call(this),this.name="Resizing",this.o=new Sn(1,1).freeze(),this.j=new Sn(9999,9999).freeze(),this.yg=new Sn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new mr;a.alignmentFocus=Hr,a.figure="Rectangle",a.desiredSize=Ur,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new vt,this.Dw=new Sn,this.Tn=new vt,this.rt=new Sn(0,0),this.qt=new Sn(1/0,1/0),this.pt=new Sn(1,1)}Ve(sr,Fr),sr.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Gn)){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(),fd(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},sr.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new $r,y.type=Rn.Spot,y.locationSpot=Hr;var x=new fl;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Ls)),y.add(this.makeHandle(a,vs)),y.add(this.makeHandle(a,ka)),y.add(this.makeHandle(a,Hs)),y.add(this.makeHandle(a,Ja)),y.add(this.makeHandle(a,xa)),y.add(this.makeHandle(a,Aa)),y.add(this.makeHandle(a,Ua))}else if(Nu(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},sr.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},sr.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=Hr),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 Rn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},sr.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},sr.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))},sr.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},sr.prototype.stopTransaction=function(){var a=this.diagram,y=Fr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},sr.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},sr.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,vt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),a.bd(),vt.free(E)}},sr.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,vt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),vt.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},sr.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 ur){var b=new zn;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new de;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()}},sr.prototype.computeResize=function(a,y,x,b,E,te){y.Mc()&&(y=Hr);var ne=this.adornedObject.naturalBounds,ae=ne.x,ce=ne.y,_e=ne.x+ne.width,Pe=ne.y+ne.height,Ne=1;if(!te){Ne=ne.width;var Ge=ne.height;0>=Ne&&(Ne=1),0>=Ge&&(Ge=1),Ne=Ge/Ne}return Ge=vt.alloc(),tn.No(a.x,a.y,ae,ce,E.width,E.height,Ge),a=ne.copy(),0>=y.x?0>=y.y?(a.x=Math.max(Ge.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(Ge.y,Pe-b.height),a.y=Math.min(a.y,Pe-x.height),a.height=Math.max(Pe-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=Pe-a.height)):1<=y.y?(a.x=Math.max(Ge.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(Ge.y-ce,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(Ge.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=ce+.5*(Pe-ce-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(Ge.x-ae,b.width),x.width),a.y=Math.max(Ge.y,Pe-b.height),a.y=Math.min(a.y,Pe-x.height),a.height=Math.max(Pe-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=Pe-a.height)):1<=y.y?(a.width=Math.max(Math.min(Ge.x-ae,b.width),x.width),a.height=Math.max(Math.min(Ge.y-ce,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(Ge.x-ae,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=ce+.5*(Pe-ce-a.height))):0>=y.y?(a.y=Math.max(Ge.y,Pe-b.height),a.y=Math.min(a.y,Pe-x.height),a.height=Pe-a.y,te||(a.width=Math.max(Math.min(a.height/Ne,b.width),x.width),a.height=Ne*a.width,a.x=ae+.5*(_e-ae-a.width))):1<=y.y&&(a.height=Math.max(Math.min(Ge.y-ce,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=ae+.5*(_e-ae-a.width))),vt.free(Ge),a},sr.prototype.computeReshape=function(){var a=Ln;return this.adornedObject instanceof mr&&(a=Cv(this.adornedObject)),!(a===Si||this.diagram.lastInput.shift)},sr.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},sr.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},sr.prototype.computeCellSize=function(){var a=new Sn(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(sr.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 $r))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 $r)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}}}),sr.className="ResizingTool",ei("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function tr(){Fr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new vt,this.ue=null;var a=new mr;a.figure="Ellipse",a.desiredSize=Xr,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new vt(NaN,NaN),this.u=0,this.F=50}Ve(tr,Fr),tr.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)}},tr.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new $r,y.type=Rn.Position,y.locationSpot=Hr;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},tr.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},tr.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)},tr.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(Hr)},tr.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)},tr.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new vt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},tr.prototype.stopTransaction=function(){var a=this.diagram,y=Fr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},tr.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},tr.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},tr.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()},tr.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()}},tr.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(tr.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 $r))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 $r)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}}}),tr.className="RotatingTool",ei("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function so(){Fr.call(this),this.name="ClickSelecting"}Ve(so,Fr),so.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},so.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},so.className="ClickSelectingTool";function Or(){Fr.call(this),this.name="Action",this.pk=null}Ve(Or,Fr),Or.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},Or.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()},Or.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))}},Or.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()},Or.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())},Or.prototype.doStop=function(){this.pk=null},Or.className="ActionTool";function So(){Fr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new vt(0,0)}Ve(So,Fr),So.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)},So.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},So.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 Ni)x.Zc()&&(Nu(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);cn(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var te=vt.allocAt(a.x,a.y);this.isGridSnapEnabled&&Xf(this.diagram,b,a,te),b.location=te,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),vt.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(So.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}}}),So.className="ClickCreatingTool";function To(){Fr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Ni;a.layerName="Tool",a.selectable=!1;var y=new mr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Ve(To,Fr),To.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))},To.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},To.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},To.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=Sn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),Sn.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},To.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()},To.prototype.computeBoxBounds=function(){var a=this.diagram;return new pn(a.firstInput.documentPoint,a.lastInput.documentPoint)},To.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),cs?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 zn,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(To.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}}}),To.className="DragSelectingTool";function nr(){Fr.call(this),this.name="Panning",this.Xt=new vt,this.xy=new vt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(Ot.document,"scroll",a.Kw,!1),a.stopTool()}}Ve(nr,Fr),nr.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())},nr.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(Ot.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},nr.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},nr.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},nr.prototype.doMouseMove=function(){this.move()},nr.prototype.doMouseUp=function(){this.move(),this.stopTool()},nr.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(nr.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),nr.className="PanningTool",ei("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),ei("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),ei("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),ei("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),ei("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Tr(){this.F=this.u=this.j=this.o=null}ot.Object.defineProperties(Tr.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}}}),Tr.className="HTMLInfo";function Mi(a,y,x){this.text=a,this.hx=y,this.visible=x}Mi.className="ContextMenuButtonInfo";function Vr(){Fr.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new vt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Ve(Vr,Fr);function Lr(a){var y=new Tr;y.show=function(E,te,ne){ne.showDefaultContextMenu()},y.hide=function(E,te){te.hideDefaultContextMenu()},ko=y,a.tu=function(){a.stopTool()},y=Bn("div");var x=Bn("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=Bn("style");Ot.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",hr,!1),b.addEventListener(y,"selectstart",hr,!1),b.addEventListener(x,"contextmenu",hr,!1)),y.className="goCXforeground",x.className="goCXbackground",Ot.document.body&&(Ot.document.body.appendChild(y),Ot.document.body.appendChild(x)),Bo=y,eo=x,Ao=!0}function hr(a){return a.preventDefault(),!1}Vr.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)},Vr.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Vr.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Vr.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof ln||(a instanceof Xt?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},Vr.prototype.doActivate=function(){},Vr.prototype.doMouseDown=function(){if(Fr.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof $r){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&wo(this)},Vr.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof $r){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}wo(this)};function wo(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof Tr||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(rr(a,!0),a.isActive||a.stopTool())}Vr.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function rr(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=ko,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof Xt?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof $r&&!a.currentContextMenu.visible&&a.stopTool()}}Vr.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Vr.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof $r){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 Tr&&a.show(y,x,this);this.currentContextMenu=a},Vr.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}},Vr.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof $r?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Tr&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function $o(a){var y=new zn;return y.add(new Mi("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new Mi("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new Mi("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new Mi("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new Mi("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new Mi("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new Mi("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new Mi("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new Mi("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new Mi("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new Mi("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new Mi("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new Mi("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Vr.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=$o(this)),Bo.innerHTML="",eo.addEventListener("pointerdown",this.tu,!1);var y=this,x=Bn("ul");x.className="goCXul",Bo.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=Bn("li"),te.className="goCXli";var ne=Bn("a");ne.className="goCXa",ne.href="#",ne.ky=E.hx,ne.addEventListener("pointerdown",function(ae){return this.ky(a),y.stopTool(),ae.preventDefault(),!1},!1),ne.textContent=E.text,te.appendChild(ne),x.appendChild(te)}}Bo.style.display="block",eo.style.display="block"},Vr.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===ko){Bo.style.display="none",eo.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(eo,"pointerdown",this.tu,!1),this.currentContextMenu=null}},ot.Object.defineProperties(Vr.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof $r?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Ao===!1&&ko===null&&Ps&&Lr(this),ko},set:function(a){a===null&&(Ao=!0),ko=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var ko=null,Ao=!1,eo=null,Bo=null;Vr.className="ContextMenuTool",ei("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Ri(){Fr.call(this),this.name="TextEditing",this.Zh=new Vo,this.ia=null,this.V=Uo,this.vj=null,this.qa=Na,this.u=1,this.F=!0,this.o=null,this.j=new Tr,this.kt=null,$s(this,this.j)}Ve(Ri,Fr);function $s(a,y){if(Ps){var x=Bn("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(_l)):E==="Tab"?(a.acceptText(Cs),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Na){var b=a.kt;a.qa===ha&&(a.qa=du),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Na){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 Vo&&te instanceof Ri)if(te.state===Vs)x.style.border="3px solid red",x.focus();else{var ne=b.ga(Hr),ae=E.position,ce=E.scale,_e=b.Df()*ce;_e<te.minimumEditorScale&&(_e=te.minimumEditorScale);var Pe=b.naturalBounds.width*_e+6,Ne=b.naturalBounds.height*_e+2,Ge=(ne.x-ae.x)*ce;ne=(ne.y-ae.y)*ce,ae=b.verticalAlignment,ce=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*_e,Ne=ae.y*Ne-ae.y*ce+ae.offsetY-(.5*Ne-.5*ce)-ce/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=Pe+"px",x.style.left=(Ge-Pe/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)}}}Ri.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Eu&&Eu!==this&&(Eu.acceptText(ua),Eu&&Eu!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Vo&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===Uo&&!y.isSelected||this.starting===es&&2>a.lastInput.clickCount)):!1},Ri.prototype.doStart=function(){Eu=this,this.textBlock!==null&&this.doActivate()},Ri.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 Vo&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=ha;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new pn(this.textBlock.ga(Ls),this.textBlock.ga(ka));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},Ri.prototype.doCancel=function(){this.stopTool()},Ri.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Ri.prototype.doMouseDown=function(){this.isActive&&this.acceptText(ua)},Ri.prototype.acceptText=function(a){switch(a){case ua:this.qa===ca?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===ha||this.qa===Vs||this.qa===du)&&(this.qa=bl,_o(this));break;case Rs:case _l:case Cs:(_l!==a||this.textBlock.isMultiline!==!0)&&(this.qa===ha||this.qa===Vs||this.qa===du)&&(this.qa=bl,_o(this))}};function _o(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=ca,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=Vs,a.doError(E,te))}}Ri.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)},Ri.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Ri.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Na,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Ri.prototype.doStop=function(){Eu=null},Ri.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)))},Ri.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},ot.Object.defineProperties(Ri.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)}}}),Ri.prototype.measureTemporaryTextBlock=Ri.prototype.Lx;var Rs=new dn(Ri,"LostFocus",0),ua=new dn(Ri,"MouseDown",1),Cs=new dn(Ri,"Tab",2),_l=new dn(Ri,"Enter",3),ho=new dn(Ri,"SingleClick",0),Uo=new dn(Ri,"SingleClickSelected",1),es=new dn(Ri,"DoubleClick",2),Na=new dn(Ri,"StateNone",0),ha=new dn(Ri,"StateActive",1),du=new dn(Ri,"StateEditing",2),bl=new dn(Ri,"StateValidating",3),Vs=new dn(Ri,"StateInvalid",4),ca=new dn(Ri,"StateValidated",5),Eu=null;Ri.className="TextEditingTool",Ri.LostFocus=Rs,Ri.MouseDown=ua,Ri.Tab=Cs,Ri.Enter=_l,Ri.SingleClick=ho,Ri.SingleClickSelected=Uo,Ri.DoubleClick=es,Ri.StateNone=Na,Ri.StateActive=ha,Ri.StateEditing=du,Ri.StateValidating=bl,Ri.StateInvalid=Vs,Ri.StateValidated=ca,ei("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Da(a){Vl||(ll(),Vl=!0),this.H=Ol,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=el,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new Ut,this.ce=new va,this.ce.Yd=this,this.Ei=new Ut,this.pu=new Ut,this.Sr=new Ut,this.pr=new Ut,a&&Object.assign(this,a)}Da.prototype.Xe=function(a){this.H=a},Da.prototype.canStart=function(){return!0};function Wl(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),aa(a.H),a.zb=!0)}function Eo(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===el?(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===rc&&y.vc.clear(),a.Qw=!!(a.Pk===ic&&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(),oc(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==nl&&b!==null&&(delete b.start.scale,delete b.end.scale),Ot.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&tl(x),Id(x),a.zb=!1,y.start(),y.bc&&(Ha(a),x.Ya(),Rh(y,0),ja(x,!0),Ga(a),x.R("AnimationStarting",a)))}))}}function Ms(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function Pa(a,y,x,b){a.isTicking||Ms(a)||y instanceof Gn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}qe=Da.prototype,qe.fv=function(a){return this.ce.fv(a)},qe.Xu=function(a){return this.ce.Xu(a)};function $a(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 ae=!0;else{for(ae=ne.vc.iterator;ae.next();){var ce=ae.key;if(ce instanceof Xt&&ce.diagram!==null||ce instanceof ln){ae=!0;break e}}ae=!1}ae?Lu(ne,!1):ne.Xk=!0}}E.pu.clear(),E.bc!==!1&&(Ha(E),ja(E.H),Ga(E)),Ot.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),Ot.requestAnimationFrame(function(){x()}))}function ea(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function Ha(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 Ga(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}qe.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(),oc(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),oc(y,this.H)},qe.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))},qe.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),ys(this,a))},qe.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),Uu(this.ce,y,"position",y.position,y.position),ys(this,a))};function nu(a,y,x){!a.zb||y.D(x)||Ms(a)||(a.H.pi||(y=x.copy()),Uu(a.ce,a.H,"position",y,x))}function Kl(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function ys(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function Wa(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],ae=a[2];a=a[3];var ce=y[0],_e=y[1],Pe=y[2];return y=y[3],ae===0||ae===100?(te=ce,ne=_e):(Pe===0||Pe===100)&&(ce=te,_e=ne),180<Math.abs(ce-te)&&(ce>te?te+=360:ce+=360),te=E(x,te,ce-te,b)%360,ne=E(x,ne,_e-ne,b),ae=E(x,ae,Pe-ae,b),x=E(x,a,y-a,b),"hsla("+te+", "+ne+"%, "+ae+"%, "+x+")"}function ll(){function a(x,b,E,te,ne,ae){x.position=new vt(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae))}var y=new Dn;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,b,E,te,ne,ae){ne<ae?x.mm(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae),!1):x.position=new vt(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae))}),y.add("location",function(x,b,E,te,ne,ae){ne<ae?x.mm(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae),!0):x.location=new vt(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae))}),y.add("position:placeholder",function(x,b,E,te,ne,ae){ne<ae?x.mm(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae),!1):x.position=new vt(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae))}),y.add("position:nodeCollapse",function(x,b,E,te,ne,ae){var ce=x.actualBounds,_e=E.actualBounds;E=_e.x+_e.width/2-ce.width/2,ce=_e.y+_e.height/2-ce.height/2,ne<ae?x.mm(te(ne,b.x,E-b.x,ae),te(ne,b.y,ce-b.y,ae),!1):x.position=new vt(te(ne,b.x,E-b.x,ae),te(ne,b.y,ce-b.y,ae))}),y.add("desiredSize",function(x,b,E,te,ne,ae){x.desiredSize=new pn(te(ne,b.width,E.width-b.width,ae),te(ne,b.height,E.height-b.height,ae))}),y.add("width",function(x,b,E,te,ne,ae){x.width=te(ne,b,E-b,ae)}),y.add("height",function(x,b,E,te,ne,ae){x.height=te(ne,b,E-b,ae)}),y.add("fill",function(x,b,E,te,ne,ae){x.fill=Wa(b,E,ne,ae,te)}),y.add("stroke",function(x,b,E,te,ne,ae){x.stroke=Wa(b,E,ne,ae,te)}),y.add("strokeWidth",function(x,b,E,te,ne,ae){x.strokeWidth=te(ne,b,E-b,ae)}),y.add("strokeDashOffset",function(x,b,E,te,ne,ae){x.strokeDashOffset=te(ne,b,E-b,ae)}),y.add("background",function(x,b,E,te,ne,ae){x.background=Wa(b,E,ne,ae,te)}),y.add("areaBackground",function(x,b,E,te,ne,ae){x.areaBackground=Wa(b,E,ne,ae,te)}),y.add("opacity",function(x,b,E,te,ne,ae){x.opacity=te(ne,b,E-b,ae)}),y.add("scale",function(x,b,E,te,ne,ae){x.scale=te(ne,b,E-b,ae)}),y.add("angle",function(x,b,E,te,ne,ae){x.angle=te(ne,b,E-b,ae)}),fu=y}ot.Object.defineProperties(Da.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&&vi(a,">= 1",Da,"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}}}),Da.prototype.stopAnimation=Da.prototype.Cc;var fu=null,Vl=!1,el=new dn(Da,"Default",1),ic=new dn(Da,"AnimateLocations",2),rc=new dn(Da,"None",3);Da.className="AnimationManager",Da.defineAnimationEffect=function(a,y){Vl||(ll(),Vl=!0),fu.add(a,y)},Da.Default=el,Da.AnimateLocations=ic,Da.None=rc;function va(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=Mu,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Sr,this.vc=new Dn,this.Tt=new Dn,this.yl=new Ut,this.Ut=new Ut,this.dw=Ac,a&&Object.assign(this,a)}va.prototype.suspend=function(){this.Xk=!0},va.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,Lu(this,!0),Ha(this.Yd),ja(this.H),Ga(this.Yd),this.H.redraw()};function oc(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}qe=va.prototype,qe.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 ln?a=x:x instanceof Xt&&(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===el&&this===y.defaultAnimation&&(this.Lp=Lc,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=wf),Ha(y),this.yl.each(function(b){b.data=null,a.add(b)}),Ga(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,$a(y,this),this)},qe.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},qe.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof ln?this.H=a:a instanceof Xt&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Ni){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return Uu(this,a,y,x,b,E),this};function Uu(a,y,x,b,E,te){var ne=a.vc;if(y instanceof ln&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(fc(b),av(),b=[au.j,au.u,au.o,au.F],fc(E),av(),E=[au.j,au.u,au.o,au.F]),ne.contains(y)){var ae=ne.I(y),ce=ae.start,_e=ae.end;ce[x]===void 0&&(ce[x]=Fa(b)),_e[x]=Fa(E)}else ce={},_e={},ce[x]=Fa(b),_e[x]=Fa(E),ae=ce.position,y instanceof Xt&&ae instanceof vt&&!ae.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&ae.assign(_e.position),ae=new th(ce,_e,te),ne.add(y,ae);ne=ce[x],ne instanceof vt&&!ne.w()&&ne.assign(a.o),te&&x.indexOf("position:")===0&&y instanceof Ni?ae.Ku.location=Fa(y.location):te&&(ae.Ku[x]=Fa(b))}function Fa(a){return a instanceof vt||a instanceof Sn?a.copy():a}qe.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},qe.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function Lu(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),Ha(x),Rh(a,E),ja(a.H,!0),Ga(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 Rh(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var te=b.key;if(!(te instanceof Xt&&te.diagram===null)){var ne=b.value,ae=E?ne.end:ne.start;ne=E?ne.start:ne.end;var ce=fu,_e;for(_e in ne)_e==="position"&&(ne["position:placeholder"]||ne["position:nodeCollapse"])||ce.get(_e)===null||ce.get(_e)(te,ae[_e],ne[_e],a.Lp,y,x,a)}}}qe.stop=function(){return this.bc?(this.Ml(!0),this):this},qe.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,Ha(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=fu;b.next();){var ne=b.key,ae=b.value,ce=E?ae.end:ae.start,_e=E?ae.start:ae.end,Pe=ae.Ku,Ne;for(Ne in _e)if(te.get(Ne)!==null){var Ge=Ne;!ae.Hu||Ge!=="position:nodeCollapse"&&Ge!=="position:placeholder"||(Ge="position"),te.get(Ge)(ne,ce[Ne],Pe[Ne]!==void 0?Pe[Ne]:ae.Hu?ce[Ne]:_e[Ne],this.Lp,this.Gd,this.Gd,this)}ae.Hu&&Pe.location!==void 0&&ne instanceof Ni&&(ne.location=Pe.location),ae.nv&&ne instanceof Ni&&ne.Zb(!1)}if(y.As.clear(),id(y,!1),y.Ya(),y.N(),ja(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()}ja(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Ga(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),oc(this,null),x.Ml(this),y.$b())}},qe.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof ur&&(b=y.placeholder),b!==null?(x=b.ga(Ls),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new vt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof ur)for(a=a.memberParts;a.next();)b=a.value,b instanceof ii&&this.Cj(b,y)},qe.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof ur&&(x=y.placeholder),x!==null){var b=x.ga(Ls);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 ur)for(a=a.memberParts;a.next();)b=a.value,b instanceof ii&&this.Aj(b,y)}},qe.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},ot.Object.defineProperties(va.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&vi(a,">= 1",va,"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:rn("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}}}),va.prototype.getTemporaryState=va.prototype.Ez,va.prototype.stop=va.prototype.stop,va.prototype.add=va.prototype.add,va.prototype.addTemporaryPart=va.prototype.Iy;function Mu(a,y,x,b){return a/=b/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Lc(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}va.className="Animation",va.EaseLinear=function(a,y,x,b){return x*a/b+y},va.EaseInOutQuad=Mu,va.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},va.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},va.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},va.EaseOutExpo=Lc;function th(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}th.className="AnimationState";function Zl(a,y,x){this.xd=null,this.rf=a,this.so=x||Mc,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=bo))}Zl.prototype.copy=function(){var a=new Zl(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 vh(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(Zl.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 Mc=new dn(Zl,"Default",1),bo=new dn(Zl,"Immediate",2),ao=new dn(Zl,"Bundled",3);Zl.className="AnimationTrigger",Zl.Default=Mc,Zl.Immediate=bo,Zl.Bundled=ao;function Qr(a){en(this),this.H=null,this.Pa=new zn,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)}qe=Qr.prototype,qe.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,Za(x)}a.clear(),this.Zq.length=0},qe.Xe=function(a){this.H=a},qe.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,ae=this.Pa.iterator;ae.next();){var ce=ae.value;ce instanceof ur?E++:ce instanceof ii?b++:ce instanceof Gn?te++:ce instanceof $r?ne++:x++}if(ae="",0<x&&(ae+=x+" Parts "),0<b&&(ae+=b+" Nodes "),0<E&&(ae+=E+" Groups "),0<te&&(ae+=te+" Links "),0<ne&&(ae+=ne+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,ae+=`
|
|
|
`+x.toString(),b=x.data,b!==null&&Ft(b)&&(ae+=" #"+Ft(b)),x instanceof ii?ae+=" "+dr(b):x instanceof Gn&&(ae+=" "+dr(x.fromNode)+" "+dr(x.toNode));return y+" "+this.Pa.count+": "+ae},qe.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=vt.alloc(),te=this.Pa.s,ne=te.length;ne--;){var ae=te[ne];if((b!==!0||fd(ae)!==!1)&&ae.isVisible()&&(E.assign(a),br(E,ae.oe),ae=ae.ic(E,y,x),ae!==null&&(y!==null&&(ae=y(ae)),ae!==null&&(x===null||x(ae)))))return vt.free(E),ae}return vt.free(E),null},qe.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof zn||b instanceof Ut||(b=new Ut),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var te=vt.alloc(),ne=this.Pa.s,ae=ne.length;ae--;){var ce=ne[ae];if((E!==!0||fd(ce)!==!1)&&ce.isVisible()){te.assign(a),br(te,ce.oe);var _e=ce;ce.ji(te,y,x,b)&&(y!==null&&(_e=y(_e)),_e===null||x!==null&&!x(_e)||b.add(_e))}}return vt.free(te),b},qe.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 zn||E instanceof Ut||(E=new Ut),this.Uh===!1)return E;var te=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(te=!0);for(var ne=this.Pa.s,ae=ne.length;ae--;){var ce=ne[ae];if((te!==!0||fd(ce)!==!1)&&ce.isVisible()){var _e=ce;ce.Cf(a,y,x,b,E)&&(y!==null&&(_e=y(_e)),_e===null||x!==null&&!x(_e)||E.add(_e))}}return E},qe.Nu=function(a,y,x,b,E,te,ne){if(this.Uh===!1)return E;for(var ae=this.Pa.s,ce=ae.length;ce--;){var _e=ae[ce];if((ne!==!0||fd(_e)!==!1)&&te(_e)&&_e.isVisible()){var Pe=_e;_e.Cf(a,y,x,b,E)&&(y!==null&&(Pe=y(Pe)),Pe===null||x!==null&&!x(Pe)||E.add(Pe))}}return E},qe.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 zn||E instanceof Ut)&&(te=E),E=!0),te instanceof zn||te instanceof Ut||(te=new Ut),this.Uh===!1)return te;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var ae=vt.alloc(),ce=vt.alloc(),_e=this.Pa.s,Pe=_e.length;Pe--;){var Ne=_e[Pe];if((ne!==!0||fd(Ne)!==!1)&&Ne.isVisible()){ae.assign(a),br(ae,Ne.oe),ce.h(a.x+y,a.y),br(ce,Ne.oe);var Ge=Ne;Ne.og(ae,ce,x,b,E,te)&&(x!==null&&(Ge=x(Ge)),Ge===null||b!==null&&!b(Ge)||te.add(Ge))}}return vt.free(ae),vt.free(ce),te},qe.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=Ti();for(var E=Ti(),te=0;te<b;te++){var ne=x[te];if(ne.vw=te,ne instanceof Gn){if(ne.fd===!1)continue}else if(ne instanceof $r&&ne.adornedPart!==null)continue;var ae=ne.actualBounds;ne.isVisible()&&Us(ae,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],Iv(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++)Iv(E[y]);bi(a),bi(E)}}};function Is(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}qe.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=Is(this,a);var te=this.Zq;te.length=0;for(var ne=y.scale,ae=pn.alloc(),ce=0;ce<b;ce++)this.Oj(a,x[ce],y,te,ne,ae,!0);if(pn.free(ae),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function Ba(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=Is(a,y),ae=a.Zq;ae.length=0;for(var ce=x.scale,_e=pn.alloc(),Pe=0;Pe<te;Pe++){var Ne=E[Pe];b.contains(Ne)&&a.Oj(y,Ne,x,ae,ce,_e,!1)}pn.free(_e),y.globalAlpha=ne}}}qe.Oj=function(a,y,x,b,E,te,ne){if(ne&&!fd(y))a.Hs(y);else{if(b!==null&&y instanceof Gn&&(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 ae=y.actualBounds;if(b=!1,ne&&y.isVisible()){if(!te.Yc(ae)){a.Hs(y);return}b=!te.Re(ae)}b&&(a.save(),a instanceof Xl?a.bk=te.copy():(a.beginPath(),a.rect(te.x,te.y,te.width,te.height),a.clip())),ae.width*E>x.Oq||ae.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&&(Es(y,a,y.areaBackground,!0,!0,te,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(Es(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),Es(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))}},qe.g=function(a,y,x,b,E){var te=this.diagram;te!==null&&te.cb(Jo,a,this,y,x,b,E)},qe.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&Za(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)),yh(this,a,y),a},qe.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,Za(y),a};function yh(a,y,x){if(y=Hu(a,y,x),x instanceof ur&&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 ae=E[ne];if(ae===x&&(y=ne,0<=b)||0>b&&ae.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&&yh(a,-1,y)}x.svg!==null&&x.svg.remove()}function Hu(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 ae=y+1,ce=NaN;ae<E&&(ce=a.M(ae).zOrder,!!isNaN(ce));)ae++;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(ce)&&ce<b)for(;;){if(ae===E||ce>=b){if(ae--,ae===y)break;return a.mb(y),a.Gb(ae,x),ae}for(ce=NaN;++ae<E&&(ce=a.M(ae).zOrder,isNaN(ce)););}return y}ot.Object.defineProperties(Qr.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===""&&rn("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&rn("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)&&vi(a,"0 <= value <= 1",Qr,"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))}}}),Qr.prototype.findObjectsNear=Qr.prototype.og,Qr.prototype.findObjectsIn=Qr.prototype.Cf,Qr.prototype.findObjectsAt=Qr.prototype.ji,Qr.prototype.findObjectAt=Qr.prototype.ic,Qr.className="Layer";function ln(a,y){if(cm||(Ka(),cm=!0),en(this),Ol=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,Ps){var x=this,b=function(){x.removeEventListener(Ot.document,"DOMContentLoaded",b,!1),x.setRTL()};Ot.document.body!==null?this.setRTL():x.addEventListener(Ot.document,"DOMContentLoaded",b,!1)}this.ol=null,np.add("Model",Lo);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 ae=te.change;te.modelChange===""&&ae===Jo&&ne.updateDataBindings(te.object,te.propertyName)}finally{ne.diagram.aa=!0}}},this.Oc=function(te){E.partManager.doModelChanged(te)},this.hu=this.ku=null,sc(this),this.model=cy(),this.Wg=!0,rd(this),this.layout=new ls,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 dm,a!==void 0&&(typeof a=="string"||Ot.Element&&a instanceof Element?Rd(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var nh,Ol;function sc(a){a.Yd=new Da,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new zn,a.pj=new Dn,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new vt(NaN,NaN).freeze(),a.du=new vt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new vt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new xr,a.zu=new vt(NaN,NaN).freeze(),a.ut=new pn(NaN,NaN,NaN,NaN).freeze(),a.rj=new Ei(0,0,0,0).freeze(),a.sj=Ac,a.nu=!1,a.Zt=null,a.fu=null,a.yh=nl,a.zk=ma,a.Fg=nl,a.pq=ma,a.yt=Ls,a.Bt=Ls,a.Fc=!0,a.pn=!1,a.De=new Ut,a.Eh=new Dn,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Ei(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new sa,a.bq.diagram=a,a.Qg=new sa,a.Qg.diagram=a,a.cj=new sa,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,nv(a),a.ai=new Ut,a.Ht=!0,a.uu=Nc,a.pw=!1,a.wu=xf,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 Dn,a.Xn=new zn,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 Ei(5).freeze(),a.Hw=new Ut().freeze(),a.Nt=999999999,a.nw=new Ut().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 Ut,a.ow=new Ut,a.Xh=null,a.aw=new Sn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new vt,bounds:new pn,Py:new Sn,bA:new Sn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new pn(NaN,NaN,NaN,NaN).freeze(),a.wo=new Sn(NaN,NaN).freeze(),a.Sp=new pn(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Dn;var y=new ii,x=new Vo;x.bind(new Bs("text","",dr)),y.add(x),a.ny=y,a.Lg.add("",y),y=new ii,x=new Vo,x.stroke="brown",x.bind(new Bs("text","",dr)),y.add(x),a.Lg.add("Comment",y),y=new ii,y.selectable=!1,y.avoidable=!1,x=new mr,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new Sn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new Dn,y=new ur,y.selectionObjectName="GROUPPANEL",y.type=Rn.Vertical,x=new Vo,x.font="bold 12pt sans-serif",x.bind(new Bs("text","",dr)),y.add(x),x=new Rn(Rn.Auto),x.name="GROUPPANEL";var b=new mr;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new fl,b.padding=new Ei(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Dn,y=new Gn,x=new mr,x.isPanelMain=!0,y.add(x),x=new mr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Gn,x=new mr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new $r,y.type=Rn.Auto,x=new mr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new fl,x.margin=new Ei(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new $r,y.type=Rn.Link,x=new mr,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 Lo,a.toolManager=new Ko,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new de,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=gf(),a.eq=null,a.fq=ro,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 vt,a.zy=500,a.wp=new vt,a.wq=!1}ln.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Wd=null,ud="",pf(this,!1),this.Xn.clear(),gp(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function pf(a,y){a.animationManager.Cc(!0),a.Hw=new Ut().freeze(),a.nw=new Ut().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 ae=a.Wa.s[y].parts;ae.next();){var ce=ae.value;ce!==E&&ce.data===null&&te.push(ce)}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(),gp(),a.Og.clear(),Io=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),te}function gf(){return null}ln.prototype.reset=function(){this.clear(),this.vb=!0,sc(this),wh(this),this.Wg=!0,rd(this),this.layout=new ls,this.Wg=!1,this.model=cy(),this.model.undoManager=new as,this.vb=this.rn=!1,this.N()},ln.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=Ot.document.body);var y=Bn("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},ln.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=Ot.document.body);var y=0;if(Ps){var x=hm;y=nh,x===null&&(x=hm=Bn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=nh=Bn("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||cs||(y=11)}this.Db=y,this.Gw=!0},ln.prototype.qb=function(a){a.classType===ln&&(this.autoScale=a)},ln.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 Rd(a,y){if(Ps){if(y!=null||rn("Diagram setup requires an argument DIV."),a.Ka!==null&&rn("Diagram has already completed setup."),typeof y=="string"?a.Ka=Ot.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:rn("No DIV or DIV id supplied: "+y),a.Ka===null&&rn("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&rn("Invalid div id; div already has a Diagram associated with it."),!a.ol&&Ot.ResizeObserver){var x=Zn(function(){a.$b()},250);a.ol=new Ot.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}Ot.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=Ot.go;var E=new Au(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",Ot.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),Kp(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new Au(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,Ps){E=Bn("div");var te=Bn("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=Bd,E.addEventListener("pointerdown",mf),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=te}a.hk=Zn(function(){a.Yh=null,a.N()},300),a.Ov=Zn(function(){Id(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var ae=Rl(a,ne,!0);ae.bubbles=!0;var ce=0,_e=0;ae.delta=0,ne.deltaX!==void 0?(ne.deltaX!==0&&(ce=0<ne.deltaX?1:-1),ne.deltaY!==0&&(_e=0<ne.deltaY?1:-1),ae.delta=Math.abs(ne.deltaX)>Math.abs(ne.deltaY)?-ce:-_e):ne.wheelDeltaX!==void 0?(ne.wheelDeltaX!==0&&(ce=0<ne.wheelDeltaX?-1:1),ne.wheelDeltaY!==0&&(_e=0<ne.wheelDeltaY?-1:1),ae.delta=Math.abs(ne.wheelDeltaX)>Math.abs(ne.wheelDeltaY)?-ce:-_e):ne.wheelDelta!==void 0&&ne.wheelDelta!==0&&(ae.delta=0<ne.wheelDelta?1:-1),a.doMouseWheel(),Yo(ae,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 ae=a.Yt;ae[ne.pointerId]===void 0&&(ae[ne.pointerId]=ne),ae=a.oj;var ce=!1;if(ae[0]===null||ae[0].pointerId!==ne.pointerId&&ae[0].pointerType===ne.pointerType)if(ae[1]!==null&&ae[1].pointerId===ne.pointerId)ae[1]=ne,ce=!0;else if(ae[0]===null)ae[0]=ne;else if(ae[1]===null)ae[1]=ne,ce=!0;else{ne.preventDefault();return}else ae[0]=ne;(ae=ne.pointerType==="touch"||ne.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var _e=ce;ce=fs(a,ne,!0,!1,!0,_e),Oa(a,ne,ce),ce.targetDiagram=yf(ne,ne.target),ce.targetObject=null,_e||ce.clone(a.bq),_e=a.uw,ae=ae?25:10,ne.timeStamp-a.tw<a.zy&&!(Math.abs(_e.x-ne.screenX)>ae||Math.abs(_e.y-ne.screenY)>ae)?a.yq++:a.yq=1,ce.clickCount=a.yq,a.tw=ne.timeStamp,a.uw.sg(ne.screenX,ne.screenY),a.doMouseDown(),ne.button===1?ne.preventDefault():Yo(ce,ne)}},a.dk=function(ne){if(a.isEnabled){a.Vk=!0;var ae=a.oj;if(ae[0]===null||ae[0].pointerId!==ne.pointerId&&ae[0].pointerType===ne.pointerType){if(ae[1]!==null&&ae[1].pointerId===ne.pointerId){ae[1]=ne;return}if(ae[0]===null)ae[0]=ne;else return}else ae[0]=ne;if(ae[0].pointerId===ne.pointerId){ae=fs(a,ne,!1,!1,!1,ae[1]!==null);var ce=Ot.document.elementFromPoint(ne.clientX,ne.clientY)||null;ce!==null&&ce.shadowRoot!==void 0&&ce.shadowRoot!==null&&(ce=ce.shadowRoot.elementFromPoint(ne.clientX,ne.clientY));var _e=a,Pe=ne;ce&&ce.H&&(Pe=ne,_e=ce.H),ae.targetDiagram=_e,Oa(a,Pe,ae),ae.targetObject=null,a.doMouseMove(),Yo(ae,ne)}}},a.fk=function(ne){if(a.isEnabled){a.Vk=!0;var ae=ne.pointerType==="touch"||ne.pointerType==="pen",ce=a.Yt;if(ae&&a.qu)delete ce[ne.pointerId],ne.preventDefault();else if(ce=a.oj,ce[0]===null||ce[0].pointerId!==ne.pointerId&&ce[0].pointerType===ne.pointerType)ce[1]!==null&&ce[1].pointerId===ne.pointerId&&(ce[1]=null);else{ce[0]=null,ce=fs(a,ne,!1,!0,!0,!1);var _e=Ot.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 ln&&_e.H!==a&&Oa(_e.H,ne,ce),_e===null&&(_e=ne.target),Oa(a,ne,ce),ce.clickCount=a.yq,ce.targetDiagram=yf(ne,_e),ce.targetObject=null,a.doMouseUp(),Yo(ce,ne),ae&&(a.wq=!1)}}},a.ek=function(ne){if(a.isEnabled){a.Vk=!1;var ae=a.Yt;ae[ne.pointerId]&&delete ae[ne.pointerId],ae=a.oj,ae[0]!==null&&ae[0].pointerId===ne.pointerId&&(ae[0]=null),ae[1]!==null&&ae[1].pointerId===ne.pointerId&&(ae[1]=null),ne.pointerType!=="touch"&&ne.pointerType!=="pen"&&(ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())}},a.ck=function(ne){var ae=a.oj;ae[0]!==null&&ae[0].pointerId===ne.pointerId?(ae[0]=null,a.wq=!1):ae[1]!==null&&ae[1].pointerId===ne.pointerId&&(ae[1]=null)},a.Vp=b.Z["d"+bf[1]+bf[2]+"wI"+Vd.slice(1,5)]["b"+Dx.slice(1,y)](b.Z,_f,y,y),b.Vc(!0),Wp(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}ln.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},ln.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function Wp(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(Ot,"resize",a.Ov,!1)}function tl(a){30<a.Sq&&(a.Yh=1)}function id(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),yo&&yo.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}ln.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:Ot.devicePixelRatio||1},ln.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},ln.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},ln.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},ln.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},ln.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},ln.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},ln.prototype.doFocus=function(){this.focus()},ln.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=Ot.scrollX||Ot.pageXOffset,y=Ot.scrollY||Ot.pageYOffset;this.ta.focus(),Ot.scrollTo(a,y)}},ln.prototype.Oy=function(){this.H.R("GainedFocus")},ln.prototype.Ny=function(){this.H.R("LostFocus")};function Id(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===nl&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function rd(a){var y=new Qr;y.name="Background",a.Al(y),y=new Qr,y.name="",a.Al(y),y=new Qr,y.name="Foreground",a.Al(y),y=new Qr,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new Qr,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new Qr,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function Fd(a){var y=new Rn(Rn.Grid);y.name="GRID";var x=new mr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new mr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new mr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new mr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new mr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new mr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Ni,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 Bd(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):Hd(this.H)}function mf(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Hd(this.H)}ln.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,ae=b.y-te.top,ce=b.width+te.left+te.right,_e=b.height+te.top+te.bottom,Pe=b.right+te.right;te=b.bottom+te.bottom;var Ne=E.x;b=E.y;var Ge=E.width,Ye=E.height,Qe=E.right,at=E.bottom;E=this.scale;var Ct=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Ct=Ct+a.scrollWidth-a.clientWidth;break;case"reverse":Ct=a.scrollWidth-Ct-a.clientWidth}var xt=Ct;Ge<ce||Ye<_e?(Ct=vt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==xt&&(Ct.x=xt/E+ne,this.ju=xt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Ct.y=a.scrollTop/E+ae,this.lu=a.scrollTop),this.position=Ct,vt.free(Ct),this.Ee=this.qr=!1):(Ct=vt.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<Ne&&(this.position=Ct.h(xt+ne,this.position.y)),Pe>Qe&&(this.position=Ct.h(-(y.scrollWidth-this.Aa)+xt-this.Aa/E+Pe,this.position.y))),a.vy&&this.allowVerticalScroll&&(ae<b&&(this.position=Ct.h(this.position.x,a.scrollTop+ae)),te>at&&(this.position=Ct.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+te))),vt.free(Ct),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,Pe=b.right,Qe=E.right,te=b.bottom,at=E.bottom,ne=b.x,Ne=E.x,ae=b.y,b=E.y,Ge>=ce&&ne>=Ne&&Pe<=Qe&&(x.style.width="1px"),Ye>=_e&&ae>=b&&te<=at&&(x.style.height="1px"))}},ln.prototype.computeBounds=function(a){return a===void 0&&(a=new pn),aa(this),jd(this,a)};function jd(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 ae=ne.length,ce=0;ce<ae;ce++){var _e=ne[ce];_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}ln.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(qn(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof Gn||(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 Gn||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new pn(NaN,NaN,0,0):x};function Yl(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=vt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=pn.allocAt(0,0,b.width,b.height);var E=vt.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,pn.free(b),vt.free(E),vt.free(x)}x=a.yh,y&&a.Fg!==nl&&(x=a.Fg);var te=x!==nl?ac(a,x):a.scale;x=a.pa.x,b=a.pa.y,E=a.Aa/te;var ne=a.ya/te,ae=a.zk,ce=a.pq;y&&!ae.sb()&&(ce.sb()||ce.Xb())&&(ae=ce.Xb()?Hr:ce),vf(a,a.documentBounds,E,ne,ae,y),y=a.scale,a.scale=te,a.vb=!1,te=a.viewportBounds,tn.B(te.x,x)&&tn.B(te.y,b)&&tn.B(te.width,E)&&tn.B(te.height,ne)||a.onViewportBoundsChanged(new pn(x,b,E,ne),te,y,!1)}}function ac(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),ae=te/E,ce=ne/b;return y===ru?(y=Math.min(ce,ae),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===hd?(y=ce>ae?(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}ln.prototype.zoomToFit=function(){var a=this.sj;this.sj=Ac,this.scale=ac(this,ru),a!==Ac&&(Yl(this,!1),vf(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},qe=ln.prototype,qe.BA=function(a,y){y===void 0&&(y=ru);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===ru||y===hd)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===hd?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 vt(a.x,a.y)}},qe.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new vt(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))},qe.zz=function(a){if(a instanceof Xt){this.eq=a;var y=vt.alloc();this.fq=this.op(a.ga(Ls,y)),vt.free(y)}else this.eq=null,this.fq=ro};function vf(a,y,x,b,E,te){var ne=vt.allocAt(a.pa.x,a.pa.y),ae=ne.x,ce=ne.y;if(a.eq!==null){var _e=vt.alloc();_e=a.eq.ga(Ls,_e),ae=_e.x-a.fq.x/a.scale,ce=_e.y-a.fq.y/a.scale,E=xs,vt.free(_e)}(te||a.scrollMode===Ac)&&(E.sb()&&(x>y.width&&(ae=y.x+(E.x*y.width+E.offsetX)-(E.x*x-E.offsetX)),b>y.height&&(ce=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?(ae=Math.min(ae+x/2,y.right+Math.max(te,E.right)-x/2),ae=Math.max(ae,y.left-Math.max(te,E.left)+x/2),ae-=x/2):ae>y.left?ae=y.left:ae<y.right-x&&(ae=y.right-x),x=b-y.height,b<y.height+E.top+E.bottom?(ce=Math.min(ce+b/2,y.bottom+Math.max(x,E.bottom)-b/2),ce=Math.max(ce,y.top-Math.max(x,E.top)+b/2),ce-=b/2):ce>y.top?ce=y.top:ce<y.bottom-b&&(ce=y.bottom-b)),ne.x=isFinite(ae)?ae:-a.yb.left,ne.y=isFinite(ce)?ce:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,ne),ne.x=y.x,ne.y=y.y),nu(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),wh(a),vt.free(ne)}qe.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=Gu(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Ni)return a}else if(a=Gu(this,a,function(x){return x.part}),a instanceof Ni)return a;return null},qe.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),aa(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 Gu(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),aa(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}qe.lz=function(a,y,x){return y===void 0&&(y=!0),lc(this,a,function(b){return b.part},y?function(b){return b instanceof Ni&&b.canSelect()}:null,x)};function lc(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof zn||E instanceof Ut||(E=new Ut),aa(a),a=a.Wa.iteratorBackwards;a.next();){var te=a.value;te.visible&&!te.isTemporary&&te.ji(y,x,b,E)}return E}qe.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof zn||b instanceof Ut||(b=new Ut),aa(this);for(var E=this.Wa.iteratorBackwards;E.next();){var te=E.value;te.visible&&te.ji(a,y,x,b)}return b},qe.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),od(this,a,function(E){return E instanceof Ni&&(!x||E.canSelect())},y,b)},qe.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof zn||E instanceof Ut||(E=new Ut),aa(this);for(var te=this.Wa.iteratorBackwards;te.next();){var ne=te.value;ne.visible&&ne.Cf(a,y,x,b,E)}return E},qe.Nu=function(a,y,x,b,E,te){var ne=new Ut;aa(this);for(var ae=this.Wa.iteratorBackwards;ae.next();){var ce=ae.value;ce.visible&&ce.Nu(a,y,x,b,ne,E,te)}return ne};function od(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 zn||E instanceof Ut||(E=new Ut),aa(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,te,x,b,E)}return E}qe.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),uc(this,a,y,function(te){return te instanceof Ni&&(!b||te.canSelect())},x,E)},qe.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 zn||E instanceof Ut)&&(te=E),E=!0),te instanceof zn||te instanceof Ut||(te=new Ut),aa(this);for(var ne=this.Wa.iteratorBackwards;ne.next();){var ae=ne.value;ae.visible&&ae.og(a,y,x,b,E,te)}return te};function uc(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 zn||E instanceof Ut)&&(te=E),E=!0),te instanceof zn||te instanceof Ut||(te=new Ut),aa(a),a=a.Wa.iteratorBackwards;a.next();){var ae=a.value;ae.visible&&!ae.isTemporary&&ae.og(y,x,ne,b,E,te)}return te}ln.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?Oa(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),cs&&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=yf(y,y.target),b.targetObject=null,b}function yf(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 fs(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,cs&&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 Yo(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}ln.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(),Yo(x,a)},ln.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(),Yo(x,a)},ln.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(),Yo(x,a)},ln.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),Yo(x,a)},ln.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new vt(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?br(new vt(y,a),this.Ab):new vt(y,a)};function Oa(a,y,x){var b=a.ta,E=a.Aa,te=a.ya,ne=0,ae=0;b!==null&&(b=b.getBoundingClientRect(),ne=y.clientX-E/b.width*b.left,ae=y.clientY-te/b.height*b.top),x.viewPoint.h(ne,ae),a.Ab!==null?(y=vt.allocAt(ne,ae),a.Ab.Cd(y),x.documentPoint.assign(y),vt.free(y)):x.documentPoint.h(ne,ae)}function iu(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))}}ln.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function ul(a){a.ld||aa(a),a.Va()}ln.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},qe=ln.prototype,qe.Pz=function(){return this.kg},qe.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,ja(this),this.hf=!1,this.du=new vt(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&wi(function(){b.ld=!1,Wl(y,"Model"),a(b)},1)},qe.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;Ot.requestAnimationFrame(function(){y.kg&&y.bd()})}},qe.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),ja(this))};function ku(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Hd(a)||(y&&aa(a),x&&Yl(a,!1))}function ja(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 ae=E[ne];Ys(ae,!1),ae.v()}b.clear()}b=a.ow,0<b.count&&(b.each(function(ce){ce.Nv()}),b.clear()),E=b=!1,x.defaultAnimation.isAnimating&&(E=!0,b=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||Id(a),ku(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(xh(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),aa(a),te=!1,(!a.hf||a.xh)&&(a.hf?$p(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),$p(a,!1)),te=!0),a.Jk=!1,aa(a),a.ou||ul(a),ku(a,!0,!1),ne=!1,te?(x=pn.alloc(),x.assign(a.viewportBounds),a.hf||(ne=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Sh(a)),a.R("LayoutCompleted"),ku(a,!0,!1),pn.free(x)):x.Ok&&x.Qw&&(a.Fg!==nl?a.scale=ac(a,a.Fg):a.yh!==nl?a.scale=ac(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),Yl(a,!0)),te&&ne&&a.eb("Initial Layout"),aa(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function Sh(a){if(a.Fg!==nl)a.scale=ac(a,a.Fg);else if(a.yh!==nl)a.scale=ac(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}Yl(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),xh(a)}function aa(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 Ut,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof ur&&b.U&65536&&(b.U=b.U^65536)})}}qe.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof ur||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof ur&&x.isVisible()&&hc(this,x);for(a.reset();a.next();)x=a.value,x instanceof Gn&&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 $r&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function hc(a,y){for(var x=Ti(),b=Ti(),E=y.memberParts;E.next();){var te=E.value;te.isVisible()&&(te instanceof ur?(su(te)||cl(te)||dd(te))&&hc(a,te):te instanceof Gn?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(bi(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();bi(b)}qe.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},qe.gc=function(a){if(this.Ka!==null){if(this.ta===null&&rn("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){Ud(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,ae=this.Ab;for(ae.reset(),E!==1&&ae.scale(E),y.x===0&&y.y===0||ae.translate(-te,-ne),a.ti=null,Xy(a,ae.m11,ae.m12,ae.m21,ae.m22,ae.dx,ae.dy),this.pb!==1&&(a.globalAlpha=this.pb),kc(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?Zd(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(xr.prototype.Cd=xr.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(te=this.animationManager,!te.zb&&(!te.isAnimating||te.isTicking)&&(x=new Date,Ud(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,ae=this.pa;var ce=this.Ca,_e=Math.round(ae.x*ce)/ce,Pe=Math.round(ae.y*ce)/ce;for(ce!==1&&te.scale(ce),ae.x===0&&ae.y===0||te.translate(-_e,-Pe),a.setTransform(ne,0,0,ne,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),kc(this,a),ae=0;ae<E;ae++)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[ae].gc(a,this);if(y=!1,this.Yf?Zd(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(xr.prototype.Cd=xr.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=yo&&yo.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 Zf(a,y,x,b,E,te,ne,ae,ce,_e){if(a.Ka!==null){a.ta===null&&rn("No canvas specified"),ne===void 0&&(ne=null),ae===void 0&&(ae=null),ce===void 0&&(ce=!1),_e===void 0&&(_e=!1),Ud(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var Pe=a.Ca;a.Ca=E;var Ne=a.Wa.s,Ge=Ne.length;try{var Ye=new pn(te.x,te.y,b.width/E,b.height/E),Qe=Ye.copy();Qe.Co(x),xh(a,Qe),aa(a),a.Fd(Ne,Ge,a,Ye),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,b.width,b.height),ae!==null&&ae!==""&&(y.fillStyle=ae,y.ox(0,0,b.width,b.height));var at=a.Mb;y.scale(at,at);var Ct=xr.alloc();Ct.reset(),Ct.translate(x.left,x.top),Ct.scale(E),te.x===0&&te.y===0||Ct.translate(-te.x,-te.y),y.setTransform(Ct.m11,Ct.m12,Ct.m21,Ct.m22,Ct.dx,Ct.dy),y.yc(),y instanceof Xl&&Xy(y,Ct.m11,Ct.m12,Ct.m21,Ct.m22,Ct.dx,Ct.dy),xr.free(Ct),kc(a,y),y.globalAlpha=a.pb;var xt=a.Qj("Grid");if(ne){var Tt=new Ut,Nt=ne.iterator;for(Nt.reset();Nt.next();){var It=Nt.value;It instanceof Ni&&(_e||It.layer!==xt)&&(It.Gj(),Tt.add(It))}for(_e=0;_e<Ge;_e++)Ba(Ne[_e],y,a,Tt,ce);Tt.each(function(un){return un.Gj()})}else for(Tt=0;Tt<Ge;Tt++){var Zt=Ne[Tt];Zt===xt?_e&&Zt.gc(y,a,!0):Zt.gc(y,a,ce)}a.$i=!1,a.Yf&&Zd(a.Yf,a)&&a.Vp()}finally{a.Ca=Pe,a.ib.Vc(!0),a.vd=!0,a.Fd(Ne,Ge,a,a.viewportBounds),xh(a),a.ib instanceof Xl&&(a.ib.Nj.PA(),a.redraw())}}}qe.Gf=function(a){return this.Rg[a]},qe.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},qe.Tx=function(){this.Rg=new $i,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(cs||ws),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function kc(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}qe.Ql=function(a){return this.on[a]},qe.sA=function(a,y){this.on[a]=y},qe.Sx=function(){this.on=new $i,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},qe.set=function(a){return Object.assign(this,a),this},qe.Du=function(a){return this.nm(a)},qe.nm=function(a){return zd(this,a),this};function zd(a,y){var x=a instanceof Rn,b=a instanceof ln,E;for(E in y){E===""&&rn("Setting properties requires non-empty property names");var te=a,ne=E;if(x||b){var ae=E.indexOf(".");if(0<ae){var ce=E.substring(0,ae);x?te=a.fb(ce):(te=a[ce],te==null&&(te=a.toolManager[ce])),cn(te)?ne=E.substr(ae+1):rn("Unable to find object named: "+ce+" in "+a.toString()+" when trying to set property: "+E)}}if(ne[0]!=="_"&&!jr(te,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&jr(a.toolManager,ne))te=a.toolManager;else if(b&&am(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof xi&&ne==="Changed"){a.Pe(y[ne]);continue}else rn('Trying to set undefined property "'+ne+'" on object: '+te.toString());te[ne]=y[E],ne[0]==="_"&&te instanceof Xt&&te.Vw(ne)}}qe.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new Dn,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},qe.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")},ln.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!==wf&&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=pn.alloc(),Qp(this,this.computeBounds(b)),pn.free(b)),b=this.ta,b===null||b instanceof _h)))){var ne=this.Mb;E=this.Aa*ne;var ae=this.ya*ne,ce=this.scale*ne;te=Math.round(Math.round(y.x*ce)-Math.round(a.x*ce)),y=Math.round(Math.round(y.y*ce)-Math.round(a.y*ce)),ce=this.jw,a=this.oy,ce.width!==E&&(ce.width=E),ce.height!==ae&&(ce.height=ae),a.clearRect(0,0,E,ae),ce=190*ne;var _e=70*ne,Pe=Math.max(te,0),Ne=Math.max(y,0),Ge=Math.floor(E-Pe),Ye=Math.floor(ae-Ne);a.drawImage(b.Oa,Pe,Ne,Ge,Ye,0,0,Ge,Ye),Zd(this.Yf,this)&&a.clearRect(0,0,ce,_e),b=Ti(),a=Ti(),Ye=Math.abs(te),Ge=Math.abs(y);var Qe=Pe===0?0:E-Ye;Pe=vt.allocAt(Qe,0),Ye=vt.allocAt(Ye+Qe,ae),a.push(new pn(Math.min(Pe.x,Ye.x),Math.min(Pe.y,Ye.y),Math.abs(Pe.x-Ye.x),Math.abs(Pe.y-Ye.y)));var at=this.Ab;if(at.reset(),at.scale(ne,ne),this.Ca!==1&&at.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&at.translate(-ne.x,-ne.y),br(Pe,at),br(Ye,at),b.push(new pn(Math.min(Pe.x,Ye.x),Math.min(Pe.y,Ye.y),Math.abs(Pe.x-Ye.x),Math.abs(Pe.y-Ye.y))),Qe=Ne===0?0:ae-Ge,Pe.h(0,Qe),Ye.h(E,Ge+Qe),a.push(new pn(Math.min(Pe.x,Ye.x),Math.min(Pe.y,Ye.y),Math.abs(Pe.x-Ye.x),Math.abs(Pe.y-Ye.y))),br(Pe,at),br(Ye,at),b.push(new pn(Math.min(Pe.x,Ye.x),Math.min(Pe.y,Ye.y),Math.abs(Pe.x-Ye.x),Math.abs(Pe.y-Ye.y))),Zd(this.Yf,this)&&(E=0<te?0:-te,ae=0<y?0:-y,Pe.h(E,ae),Ye.h(ce+E,_e+ae),a.push(new pn(Math.min(Pe.x,Ye.x),Math.min(Pe.y,Ye.y),Math.abs(Pe.x-Ye.x),Math.abs(Pe.y-Ye.y))),br(Pe,at),br(Ye,at),b.push(new pn(Math.min(Pe.x,Ye.x),Math.min(Pe.y,Ye.y),Math.abs(Pe.x-Ye.x),Math.abs(Pe.y-Ye.y)))),vt.free(Pe),vt.free(Ye),ku(this,!1,!0),this.Ka===null&&rn("No div specified"),this.ta===null&&rn("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(Ud(this),ae=this.Mb,E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,this.Aa*ae,this.ya*ae),E.drawImage(this.jw.Oa,0<te?0:Math.round(-te),0<y?0:Math.round(-y)),te=this.pa,ne=this.Ca,ce=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(-ce,-_e),E.save(),E.beginPath(),te=a.length,ne=0;ne<te;ne++)ce=a[ne],ce.width!==0&&ce.height!==0&&E.rect(Math.floor(ce.x),Math.floor(ce.y),Math.ceil(ce.width),Math.ceil(ce.height));for(E.clip(),E.setTransform(ae,0,0,ae,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),kc(this,E),E.globalAlpha=this.pb,ae=0;ae<te;ae++)if(ne=y[ae],ce=b,ne.visible&&ne.pb!==0){_e=Is(ne,E),Ne=ne.Zq,Ne.length=0,Pe=this.scale,Ge=pn.alloc(),Ye=ne.Pa.s,at=Ye.length,Qe=ce.length;for(var Ct=0;Ct<at;Ct++){var xt=Ye[Ct],Tt=ef(xt,xt.actualBounds);e:{for(var Nt=2/Pe,It=4/Pe,Zt=0;Zt<Qe;Zt++){var un=ce[Zt];if(un.width!==0&&un.height!==0&&Tt.Vu(un.x-Nt,un.y-Nt,un.width+It,un.height+It)){Tt=!0;break e}}Tt=!1}Tt&&ne.Oj(E,xt,this,Ne,Pe,Ge,!0)}pn.free(Ge),E.globalAlpha=_e}E.restore(),E.Vc(!0),this.Yf&&Zd(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}bi(b),bi(a),this.ld=!1}}else this.bd();x&&(tl(this),this.bd(),id(this,!0))}else x?(tl(this),this.bd(),id(this,!0)):this.bd()}};function Ud(a){a.pn!==!1&&(a.pn=!1,Kp(a,a.Aa,a.ya))}function Kp(a,y,x){wh(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Hd(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,ae=a.Be?a.Db:0,ce=E.clientWidth||x+ne,_e=E.clientHeight||b+ae,Pe=a.viewportBounds;E=Pe.x;var Ne=Pe.y,Ge=Pe.width,Ye=Pe.height;if((ce!==x+ne||_e!==b+ae)&&(a.gf=!1,a.Be=!1,ae=ne=0,a.Aa=ce,a.ya=_e,te=a.pn=!0,wh(a)),!a.hf||!a.viewportBounds.w())return!0;var Qe=a.ku,at=a.hu;if(a.Ee=!1,!(te||a.gf||a.Be||a.mn||a.nn))return!0;var Ct=a.documentBounds,xt=0,Tt=0,Nt=0,It=0,Zt=Pe.width,un=Pe.height,$n=a.rj;a.contentAlignment.sb()?(Ct.width>Zt&&(xt=$n.left,Tt=$n.right),Ct.height>un&&(Nt=$n.top,It=$n.bottom)):(xt=$n.left,Tt=$n.right,Nt=$n.top,It=$n.bottom);var fi=Ct.width+xt+Tt,ai=Ct.height+Nt+It;$n=a.scale;var Un=fi>ce/$n,Pn=ai>_e/$n;if(!(te||a.gf||a.Be||Un||Pn))return!0;xt=Ct.x-xt,ce=Pe.x,Tt=Ct.right+Tt,_e=Pe.right+ne,Nt=Ct.y-Nt;var ar=Pe.y;Ct=Ct.bottom+It,Pe=Pe.bottom+ae;var Ji="1px";if(It="1px",a.scrollMode===Ac&&(Un||Pn)&&(Un&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Un=1,xt+1<ce&&(Un=Math.max((ce-xt)*$n+a.Aa,Un)),Tt>_e+1&&(Un=Math.max((Tt-_e)*$n+a.Aa,Un)),Zt+ne+1<fi&&(Un=Math.max((fi-Zt)*$n+a.Aa,Un)),Ji=Un.toString()+"px"),Pn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Un=1,Nt+1<ar&&(Un=Math.max((ar-Nt)*$n+a.ya,Un)),Ct>Pe+1&&(Un=Math.max((Ct-Pe)*$n+a.ya,Un)),un+ae+1<ai&&(Un=Math.max((ai-un)*$n+a.ya,Un)),It=Un.toString()+"px")),Un=Ji!=="1px",Pn=It!=="1px",Un&&Pn||!Un&&!Pn||(Pn&&(_e-=a.Db),Un&&(Pe-=a.Db),fi<Zt+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,xt+1<ce&&(ne=Math.max((ce-xt)*$n+a.Aa,ne)),Tt>_e+1&&(ne=Math.max((Tt-_e)*$n+a.Aa,ne)),Zt+1<fi&&(ne=Math.max((fi-Zt)*$n+a.Aa,ne)),Ji=ne.toString()+"px"),Un=Ji!=="1px",ne=a.ya,Un!==a.Be&&(ne=Un?a.ya-a.Db:a.ya+a.Db),ai<un+ae||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(ae=1,Nt+1<ar&&(ae=Math.max((ar-Nt)*$n+ne,ae)),Ct>Pe+1&&(ae=Math.max((Ct-Pe)*$n+ne,ae)),un+1<ai&&(ae=Math.max((ai-un)*$n+ne,ae)),It=ae.toString()+"px"),Pn=It!=="1px"),a.qr&&Un===a.Be&&Pn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(Un!==a.Be&&(Ji==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),te=!0),a.Be=Un,at.style.width=Ji,Pn!==a.gf&&(It==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),te=!0,a.tn&&(ae=vt.alloc(),Pn?(y.style.left=a.Db+"px",a.position=ae.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=ae.h(a.pa.x-a.Db/a.scale,a.pa.y)),vt.free(ae))),te&&wh(a),a.gf=Pn,at.style.height=It,a.gu=!0,te&&(a.pn=!0),y=Qe.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Zt+1<fi?y=(a.position.x-xt)*$n:xt+1<ce?y=Qe.scrollWidth-Qe.clientWidth:Tt>_e+1&&(y=a.position.x*$n)),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&&(un+1<ai?Qe.scrollTop=(a.position.y-Nt)*$n:Nt+1<ar?Qe.scrollTop=Qe.scrollHeight-Qe.clientHeight:Ct>Pe+1&&(Qe.scrollTop=a.position.y*$n)),ce=a.Aa,_e=a.ya,Qe.style.width=ce+(a.gf?a.Db:0)+"px",Qe.style.height=_e+(a.Be?a.Db:0)+"px",x!==ce||b!==_e||a.animationManager.zb?(x=pn.allocAt(E,Ne,Ge,Ye),a.onViewportBoundsChanged(x,a.viewportBounds,$n,te),pn.free(x),!1):!0}qe=ln.prototype,qe.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&rn("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&&rn('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(bs,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},qe.oi=function(a){this.partManager.oi(a);var y=this;qd(a,function(x){Gd(y,x)}),(a instanceof $r||a instanceof ur&&a.placeholder!==null)&&a.v(),a.data!==null&&qd(a,function(x){ly(y.partManager,x)}),cl(a)!==!0&&dd(a)!==!0||this.De.add(a),B1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N(ef(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(ef(a,a.actualBounds)),this.$b()},qe.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&qd(a,function(x){uy(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N(ef(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(ef(a,a.actualBounds)),this.$b()},qe.remove=function(a){Vp(this,a,!0)};function Vp(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(Os,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}qe.Is=function(a,y){if(y===void 0&&(y=!1),qn(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 Ut,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},qe.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},ln.prototype.moveParts=function(a,y,x,b){if(x===void 0&&(x=!1),b===void 0&&(b=Yf(this)),this.toolManager!==null){var E=new Dn;if(a!==null)if(qn(a))for(var te=0;te<a.length;te++)Ih(this,E,a[te],x,b);else for(a=a.iterator;a.next();)Ih(this,E,a.value,x,b);else{for(a=this.parts;a.next();)Ih(this,E,a.value,x,b);for(a=this.nodes;a.next();)Ih(this,E,a.value,x,b);for(a=this.links;a.next();)Ih(this,E,a.value,x,b)}sd(this,E,y,b,x)}};function Ih(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=Yf(a)),x instanceof ii){if(y.add(x,a.Pd(E,x,x.location)),x instanceof ur&&(x.placeholder!==null||E.dragsMembers))for(te=x.memberParts;te.next();)Ih(a,y,te.value,b,E,E.groupsAlwaysMove);for(te=x.linksConnected;te.next();){var ne=te.value;if(!y.contains(ne)){var ae=ne.fromNode,ce=ne.toNode;ae!==null&&y.contains(ae)&&ce!==null&&y.contains(ce)&&Ih(a,y,ne,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)Ih(a,y,x.value,b,E)}else if(x instanceof Gn)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)Ih(a,y,x.value,b,E);else x instanceof $r||y.add(x,a.Pd(E,x,x.location))}function sd(a,y,x,b,E){if(y!==null&&y.count!==0){var te=vt.alloc(),ne=vt.alloc();ne.assign(x),isNaN(ne.x)&&(ne.x=0),isNaN(ne.y)&&(ne.y=0),(x=a.Mr)||Jf(a,y);for(var ae=Ti(),ce=Ti(),_e=y.iterator,Pe=vt.alloc();_e.next();){var Ne=_e.key,Ge=_e.value;if(Ne.Zc()){var Ye=Zp(a,Ne,y);Ye!==null?ae.push(new re(Ne,Ge,Ye)):(!E||Ne.canMove())&&(Ye=Ge.point,te.assign(Ye),a.computeMove(Ne,te.add(ne),b,Pe),Ne.location=Pe,Ge.shifted===void 0&&(Ge.shifted=new vt),Ge.shifted.assign(Pe.re(Ye)))}else _e.key instanceof Gn&&ce.push(_e.sa)}for(vt.free(Pe),E=ae.length,_e=0;_e<E;_e++)Ne=ae[_e],te.assign(Ne.info.point),Ne.Su.shifted===void 0&&(Ne.Su.shifted=new vt),Ne.node.location=te.add(Ne.Su.shifted);for(E=vt.alloc(),_e=vt.alloc(),Ne=ce.length,Ge=0;Ge<Ne;Ge++){var Qe=ce[Ge];if(Ye=Qe.key,Ye instanceof Gn)if(Ye.suspendsRouting){Ye.Tg=null,Pe=Ye.fromNode;var at=Ye.toNode;if(a.draggedLink!==null&&b.dragsLink)if(at=Qe.value.point,Ye.dragComputation===null)y.add(Ye,a.Pd(b,Ye,ne)),jc(Ye,ne.x-at.x,ne.y-at.y);else{Qe=vt.allocAt(0,0),(Pe=Ye.i(0))&&Pe.w()&&Qe.assign(Pe);var Ct=Pe=vt.alloc().assign(Qe).add(ne);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(Ct=vt.alloc(),Xf(a,Ye,Pe,Ct,b)),Pe.assign(Ye.dragComputation(Ye,Pe,Ct)).re(Qe),y.add(Ye,a.Pd(b,Ye,Pe)),jc(Ye,Pe.x-at.x,Pe.y-at.y),vt.free(Qe),vt.free(Pe),Ct!==Pe&&vt.free(Ct)}else Pe!==null&&(E.assign(Pe.location),Ct=y.I(Pe),Ct!==null&&E.re(Ct.point)),at!==null&&(_e.assign(at.location),Ct=y.I(at),Ct!==null&&_e.re(Ct.point)),Pe!==null&&at!==null?E.Xa(_e)?(Pe=Qe.value.point,at=te,at.assign(E),at.re(Pe),y.add(Ye,a.Pd(b,Ye,E)),jc(Ye,at.x,at.y)):(Ye.suspendsRouting=!1,Ye.bb()):(Qe=Qe.value.point,Pe=Pe!==null?E:at!==null?_e:ne,y.add(Ye,a.Pd(b,Ye,Pe)),jc(Ye,Pe.x-Qe.x,Pe.y-Qe.y))}else(Ye.fromNode===null||Ye.toNode===null)&&(Pe=Qe.value.point,y.add(Ye,a.Pd(b,Ye,ne)),jc(Ye,ne.x-Pe.x,ne.y-Pe.y))}vt.free(te),vt.free(ne),vt.free(E),vt.free(_e),bi(ae),bi(ce),x||(aa(a),ad(a,y))}}ln.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new vt),b.assign(y),a===null)return b;var E=y,te=x.isGridSnapEnabled;te&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=vt.alloc(),Xf(this,a,y,E,x)),x=a.dragComputation!==null?a.dragComputation(a,y,E):E;var ne=a.minLocation,ae=ne.x;isNaN(ae)&&(ae=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 ce=a.maxLocation,_e=ce.x;return isNaN(_e)&&(_e=te?Math.round(1e3*a.location.x)/1e3:a.location.x),ce=ce.y,isNaN(ce)&&(ce=te?Math.round(1e3*a.location.y)/1e3:a.location.y),b.h(Math.max(ae,Math.min(x.x,_e)),Math.max(ne,Math.min(x.y,ce))),E!==y&&vt.free(E),b};function Yf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Xf(a,y,x,b,E){if(E===void 0&&(E=Yf(a)),b.assign(x),y!==null){var te=a.grid;y=E.gridSnapCellSize,a=y.width,y=y.height;var ne=E.gridSnapOrigin,ae=ne.x;if(ne=ne.y,E=E.gridSnapCellSpot,te!==null){var ce=te.gridCellSize;isNaN(a)&&(a=ce.width),isNaN(y)&&(y=ce.height),te=te.gridOrigin,isNaN(ae)&&(ae=te.x),isNaN(ne)&&(ne=te.y)}te=vt.allocAt(0,0),te.yi(0,0,a,y,E),tn.No(x.x,x.y,ae+te.x,ne+te.y,a,y,b),vt.free(te)}}function Jf(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Gn&&(y.suspendsRouting=!0)}function ad(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Gn&&(x.suspendsRouting=!1,Yv(x)&&x.bb())}a.Mr=!1}}function Zp(a,y,x){return y=y.containingGroup,y!==null&&(a=Zp(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}qe=ln.prototype,qe.Pd=function(a,y,x){if(x===void 0)return new cc(Sr);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new cc(new vt(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new cc(x.copy())};function Yp(a,y,x){if(y.diagram!==null&&y.diagram!==a&&rn("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&rn("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&rn("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&rn("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&&rn("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}qe.Al=function(a){Yp(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(bs,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},qe.Ww=function(a,y){Yp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(Os,"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(bs,"layers",this,null,a,null,te),this.N(),0>b&&this.Ya(),this},qe.Cy=function(a,y){Yp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(Os,"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(bs,"layers",this,null,a,null,te+1),this.N(),0>b&&this.Ya(),this},qe.kA=function(a){if(a.diagram!==this&&rn("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(Os,"layers",this,a,null,x,null),this.N(),this.Ya()}}},qe.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},qe.Yw=function(a){return this.pf===null&&(this.pf=new zn),this.pf.add(a),this.model.Pe(a),this},qe.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},qe.Pe=function(a){return this.zg===null&&(this.zg=new zn),this.zg.add(a),this},qe.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},qe.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==ba&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},qe.cb=function(a,y,x,b,E,te,ne){te===void 0&&(te=null),ne===void 0&&(ne=null);var ae=new rs;ae.diagram=this,ae.change=a,ae.propertyName=y,ae.object=x,ae.oldValue=b,ae.oldParam=te,ae.newValue=E,ae.newParam=ne,this.ds(ae)},qe.g=function(a,y,x,b,E){this.cb(Jo,a,this,y,x,b,E)},ln.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===Jo){var E=a.object;if(os(E,a.propertyName,a.I(y)),E instanceof Xt){var te=E.part;te!==null&&te.Wb()}this.isModified=!0}else if(b===bs){var ne=a.object,ae=a.newParam,ce=a.newValue;if(ne instanceof Rn)if(typeof ae=="number"&&ce instanceof Xt){y?ne.pc(ae):ne.Gb(ae,ce);var _e=ne.part;_e!==null&&_e.Wb()}else typeof ae=="number"&&ce instanceof Xs&&(ce.isRow?c1(ne,ae,y?void 0:ce):d1(ne,ae,y?void 0:ce));else if(ne instanceof Qr){var Pe=a.oldParam===!0;typeof ae=="number"&&ce instanceof Ni&&(y?(ce.isSelected=!1,ce.isHighlighted=!1,ce.Wb(),ne.pc(Pe?ae:-1,ce,Pe)):ne.oi(ae,ce,Pe))}else ne instanceof ln?typeof ae=="number"&&ce instanceof Qr&&(y?this.Wa.mb(ae):(ce.Xe(this),this.Wa.Gb(ae,ce))):rn("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===Os){var Ne=a.object,Ge=a.oldParam,Ye=a.oldValue;if(Ne instanceof Rn)typeof Ge=="number"&&Ye instanceof Xt?y?Ne.Gb(Ge,Ye):Ne.pc(Ge):typeof Ge=="number"&&Ye instanceof Xs&&(Ye.isRow?c1(Ne,Ge,y?Ye:void 0):d1(Ne,Ge,y?Ye:void 0));else if(Ne instanceof Qr){var Qe=a.newParam===!0;typeof Ge=="number"&&Ye instanceof Ni&&(y?0>Ne.Pa.indexOf(Ye)&&Ne.oi(Ge,Ye,Qe):(Ye.isSelected=!1,Ye.isHighlighted=!1,Ye.Wb(),Ne.pc(Qe?Ge:-1,Ye,Qe)))}else Ne instanceof ln?typeof Ge=="number"&&Ye instanceof Qr&&(y?(Ye.Xe(this),this.Wa.Gb(Ge,Ye)):this.Wa.mb(Ge)):rn("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==ba&&rn("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},ln.prototype.Ea=function(a){return this.undoManager.Ea(a)},ln.prototype.eb=function(a){return this.undoManager.eb(a)},ln.prototype.Kf=function(){return this.undoManager.Kf()},ln.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}},ln.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},ln.prototype.rp=function(){this.partManager.rp()};function Xp(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,wh(a),a.N(),a.Ee=!0,b.zb&&(Ms(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,wh(a);else{a.vb=!0;var E=a.viewportBounds.copy(),te=a.Aa,ne=a.ya,ae=a.zoomPoint.x,ce=a.zoomPoint.y,_e=a.contentAlignment;isNaN(ae)&&(_e.$c()?_e.Hf(cu)?ae=0:_e.Hf(Ta)&&(ae=te-1):ae=_e.sb()?_e.x*(te-1):te/2),isNaN(ce)&&(_e.$c()?_e.Hf(Hl)?ce=0:_e.Hf(al)&&(ce=ne-1):ce=_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=vt.allocAt(a.pa.x+ae/y-ae/x,a.pa.y+ce/y-ce/x),a.position=te,vt.free(te),a.Ca=x,wh(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),Yl(a,!1),b.zb&&(Ms(b)||b.ce.add(b.H,"scale",y,a.Ca))}}ln.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!==nl||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof Ko&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Oh(E,this)),this.vb||this.invalidateViewport(a,y),xh(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 xh(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=Sn.alloc(),E=1,te=1,ne=x.O.s,ae=ne.length,ce=0;ce<ae;ce++){var _e=ne[ce],Pe=Math.abs(_e.interval);2>Pe||(mv(_e.figure)?te=te*Pe/tn.vx(te,Pe):E=E*Pe/tn.vx(E,Pe))}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=pn.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){pn.free(y);return}E=y.width,te=y.height,a=y.x,ne=y.y,pn.free(y)}x.width=E+2*b.width,x.height=te+2*b.height,y=vt.alloc(),tn.No(a,ne,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),Sn.free(b),x.part.location=y,vt.free(y)}}ln.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)}},ln.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))},ln.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),qn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof Ni||rn("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 Ni||rn("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},ln.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()}},qe=ln.prototype,qe.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},qe.Jz=function(a){a=new Ut().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 Ni||rn("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},qe.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,te=vt.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)),vt.free(te);return}rn("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):rn("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),vt.free(te)},qe.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)},qe.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},qe.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)},qe.zA=function(a){var y=this.Ab,x=a.x,b=a.y,E=x+a.width,te=b+a.height,ne=y.m11,ae=y.m12,ce=y.m21,_e=y.m22,Pe=y.dx,Ne=y.dy,Ge=x*ne+b*ce+Pe;y=x*ae+b*_e+Ne;var Ye=E*ne+b*ce+Pe;return a=E*ae+b*_e+Ne,b=x*ne+te*ce+Pe,x=x*ae+te*_e+Ne,ne=E*ne+te*ce+Pe,E=E*ae+te*_e+Ne,te=Math.min(Ge,Ye),Ge=Math.max(Ge,Ye),Ye=Math.min(y,a),y=Math.max(y,a),te=Math.min(te,b),Ge=Math.max(Ge,b),Ye=Math.min(Ye,x),y=Math.max(y,x),te=Math.min(te,ne),Ge=Math.max(Ge,ne),Ye=Math.min(Ye,E),y=Math.max(y,E),new pn(te,Ye,Ge-te,y-Ye)},qe.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),br(a.copy(),this.Ab)};function om(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Jp(a){return a=np.get(a),a!==null?new a:new Lo}ln.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===ba&&b[0]==="S")if(b==="StartingFirstTransaction"){var E=this;a=this.toolManager,a.mouseDownTools.each(function(ce){return ce.diagram=E}),a.mouseMoveTools.each(function(ce){return ce.diagram=E}),a.mouseUpTools.each(function(ce){return ce.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===ba){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),aa(this));var te=this.animationManager;b==="RolledBackTransaction"&&te.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||Eo(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&&(om(this),this.As.clear(),ea(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var ae=this;wi(function(){ae.currentTool.standardMouseOver(),ae.Rt=!1},10)}}}finally{this.aa=!0}}}};function Gd(a,y){y=y.O.s;for(var x=y.length,b=0;b<x;b++)ld(a,y[b])}function ld(a,y){if(y instanceof Ll){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof Ut&&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 qp(a,y){if(y instanceof Ll){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 Ut&&x.Bg.remove(a),gp(b));break}}}}}ln.prototype.Wd=function(){this.partManager.Wd()},ln.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},ln.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},ln.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},ln.prototype.Vb=function(a){return this.partManager.Vb(a)},ln.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},qe=ln.prototype,qe.Lc=function(a){return this.partManager.Lc(a)},qe.ii=function(a){return this.partManager.ii(a)},qe.Kc=function(a){return this.partManager.Kc(a)},qe.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:zi(In(y)))},qe.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:zi(In(y)))};function wh(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 Qp(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),Yl(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}qe.Va=function(){if(this.Zi){var a=pn.alloc();Qp(this,this.computeBounds(a)),pn.free(a)}},qe.rz=function(){for(var a=new Ut,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},qe.qz=function(){return this.ai.iterator},qe.Uz=function(a){aa(this),a&&qf(this,!0),this.ld?$p(this,!1):(this.Jk=!0,ja(this))};function qf(a,y){for(var x=a.ai.iterator;x.next();)sm(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function sm(a,y,x){if(y!==null){for(var b=y.gl.iterator;b.next();)sm(a,b.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function $p(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||Wl(te,"Layout")),a.xh=!1;for(var ne=a.ai.iterator;ne.next();)eg(a,ne.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),aa(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||Eo(te),a.aa=x}}}function eg(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)eg(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),hc(a,y),E.isValidLayout=!0):a.xh=!0)}}qe.yz=function(){for(var a=new zn,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 zn;x.add(E,ne),x.add(te,ne),b.add(E,E),b.add(te,E)}var x=new Dn,b=new Dn;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 am(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function Qf(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;rn("Unknown DiagramEvent name: "+y)}qe.Bj=function(a,y){return a=Qf(this,a),a!==null&&a.add(y),this},qe.am=function(a,y){a=Qf(this,a),a!==null&&a.remove(y)},qe.R=function(a,y,x){var b=Qf(this,a),E=new $u;if(E.diagram=this,a=am(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 $f(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}qe.Yj=function(a,y){return ep(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},ln.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?jd(this,a):a.assign(this.documentBounds)};function ep(a,y,x,b){var E=a.Xh;if(E===null&&(a.Xh=E=new kg(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=lm(a,x)),x===null){y=pn.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),E.initialize(y);for(var te=a.nodes;te.next();){var ne=te.value,ae=ne.layer;ae!==null&&ae.visible&&!ae.isTemporary&&tp(a,ne,b,y)}pn.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=pn.alloc(),te=x.memberParts;te.next();)ne=te.value,ne instanceof ii&&tp(a,ne,b,y);pn.free(y)}E.group=x,E.Yx=b,E.vs=!1}else y&&oS(E);return E}function lm(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?lm(a,y.containingGroup):null}function tp(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(wp(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(Uc,x,y+1);else for(var ne=x;ne<=y;ne++)te[ne]=Uc}else if(y instanceof ur)for(y=y.memberParts;y.next();)E=y.value,E instanceof ii&&tp(a,E,x,b)}}function Tc(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}ln.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():tg(this)};function tg(a){a.vk===-1&&(a.vk=wi(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=pn.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Qp(a,y),pn.free(y),a.Fc=!0,a.bd(),tg(a))}},a.vp))}ln.prototype.ug=function(){this.vk!==-1&&(Ot.clearTimeout(this.vk),this.vk=-1)},ln.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=pn.allocAt(0,0,b.width*E,b.height*E);var te=vt.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(Sr)||(y=new vt(y.x+te.x/E,y.y+te.y/E)),pn.free(b),vt.free(te),y},qe=ln.prototype,qe.Cs=function(){return null},qe.av=function(){return null},qe.bs=function(a,y){this.pj.add(a,y)},qe.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof ur&&(y.$p=null)})};function Sf(a,y,x){function b(){var Pe=+new Date;for(te=!0,ne.reset();ne.next();)if(!ne.value[0].al){te=!1;break}te||Pe-_e>ce?y(x,E,ae):Ot.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 ae=a,ce=x.callbackTimeout||300,_e=+new Date;return Ot.requestAnimationFrame(function(){b()}),null}qe.Wz=function(a){return Ps?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},qe.Jx=function(a){return a===void 0&&(a={}),Sf(this,this.Xz,a)},qe.Xz=function(a,y,x){var b=um(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 Vd+"data":E=b.getImageData(0,0,x.width,x.height);break;case Vd:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&rn('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 um(a,y,x,b){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&rn("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 Sn(1/0,1/0):new Sn(2e3,2e3));var ae=y.position||null,ce=y.parts||null,_e=y.padding===void 0?1:y.padding,Pe=y.background||null,Ne=y.omitTemporary;Ne===void 0&&(Ne=!0);var Ge=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 Ei(_e):_e instanceof Ei||rn("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 Au(null,Ge,void 0,!0);var at=Ne.context;if(!(E||te||ce||ae))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=Ge,b.hs=Ye,Zf(a,b.context,_e,new Sn(Ne.width,Ne.height),a.Ca,a.pa,ce,Pe,Qe,y),b.context):(a.Xm=!1,Zf(a,at,_e,new Sn(Ne.width,Ne.height),a.Ca,a.pa,ce,Pe,Qe,y),a.Xm=!0,Ne.context);var Ct=a.Pp,xt=a.documentBounds.copy();if(xt.Fv(a.yb),Qe)for(var Tt=a.Wa.s,Nt=Tt.length,It=0;It<Nt;It++){var Zt=Tt[It];if(Zt.visible&&Zt.isTemporary){Zt=Zt.Pa.s;for(var un=Zt.length,$n=0;$n<un;$n++){var fi=Zt[$n];fi.isInDocumentBounds&&fi.isVisible()&&(fi=fi.actualBounds,fi.w()&&xt.ed(fi))}}}if(Tt=new vt(xt.x,xt.y),ce!==null){for(Nt=new pn(0,0,0,0),It=!0,Zt=ce.iterator,Zt.reset();Zt.next();)un=Zt.value,un instanceof Ni&&($n=un.layer,$n!==null&&!$n.visible||$n!==null&&!Qe&&$n.isTemporary||!un.isVisible()||(un=un.actualBounds,un.w()&&(It?(It=!1,Nt.assign(un)):Nt.ed(un))));xt.width=Nt.width,xt.height=Nt.height,Tt.x=Nt.x,Tt.y=Nt.y}return ae!==null&&ae.w()&&(Tt=ae,te||(te=Ct)),Nt=ae=0,_e!==null&&(ae=_e.left+_e.right,Nt=_e.top+_e.bottom),It=Zt=0,E!==null&&(Zt=E.width,It=E.height,isFinite(Zt)&&(Zt=Math.max(0,Zt-ae)),isFinite(It)&&(It=Math.max(0,It-Nt))),E!==null&&te!==null?(te==="NaN"&&(te=Ct),E.w()?(E=Zt,xt=It):isNaN(It)?(E=Zt,xt=xt.height*te):(E=xt.width*te,xt=It)):E!==null?E.w()?(te=Math.min(Zt/xt.width,It/xt.height),E=Zt,xt=It):isNaN(It)?(te=Zt/xt.width,E=Zt,xt=xt.height*te):(te=It/xt.height,E=xt.width*te,xt=It):te!==null?te==="NaN"&&ne.w()?(te=Math.min((ne.width-ae)/xt.width,(ne.height-Nt)/xt.height),te>Ct?(te=Ct,E=xt.width,xt=xt.height):(E=ne.width,xt=ne.height)):(E=xt.width*te,xt=xt.height*te):(te=Ct,E=xt.width,xt=xt.height),_e!==null?(E+=ae,xt+=Nt):_e=new Ei(0),ne!==null&&(Ct=ne.width,ne=ne.height,isNaN(Ct)&&(Ct=2e3),isNaN(ne)&&(ne=2e3),isFinite(Ct)&&(E=Math.min(E,Ct)),isFinite(ne)&&(xt=Math.min(xt,ne))),Ne.width=Math.ceil(E),Ne.height=Math.ceil(xt),x==="SVG"?b===null?null:(b.resize(Ne.width,Ne.height,Ne.width,Ne.height),b.ownerDocument=Ge,b.hs=Ye,Zf(a,b.context,_e,new Sn(Math.ceil(E),Math.ceil(xt)),te,Tt,ce,Pe,Qe,y),b.context):(a.Xm=!1,Zf(a,at,_e,new Sn(Math.ceil(E),Math.ceil(xt)),te,Tt,ce,Pe,Qe,y),a.Xm=!0,Ne.context)}ot.Object.defineProperties(ln.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof Ie||(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 _h(this,Ot.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 _h(this,Ot.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(Ot,"resize",this.Ov,!1),this.removeEventListener(Ot,"wheel",this.$j,!0),Ol===this&&(Ol=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Rd(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)&&vi(a,"0 <= value <= 1",ln,"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),Yl(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),Yl(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),Yl(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),Yl(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&vi(a,">= 0",ln,"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&&vi(a,">= 0",ln,"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 vi(a,">= 0",ln,"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||om(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&&rn("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=pf(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,Wl(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=Jp(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(Ot,"pointermove",this.dk,!0),this.addEventListener(Ot,"pointerdown",this.ui,!0),this.addEventListener(Ot,"pointerup",this.fk,!0),this.addEventListener(Ot,"pointerout",this.ek,!0),this.addEventListener(Ot,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(Ot,"wheel",this.$j,!0),this.addEventListener(Ot,"selectstart",this.preventDefault,!1)):(this.removeEventListener(Ot,"pointermove",this.dk,!0),this.removeEventListener(Ot,"pointerdown",this.ui,!0),this.removeEventListener(Ot,"pointerup",this.fk,!0),this.removeEventListener(Ot,"pointerout",this.ek,!0),this.removeEventListener(Ot,"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(Ot,"wheel",this.$j,!0),this.removeEventListener(Ot,"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=vt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),nu(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?wh(this):(this.vb=!0,a=this.scale,vf(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)}vt.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=Fd(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=Fd(this)),a.type!==Rn.Grid&&rn("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),xh(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),wh(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||rn("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 Ei(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===Ac&&Yl(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,Yl(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,Xp(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&&Xp(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!==nl&&Yl(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()||rn("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()||rn("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)):vi(a,"> 0",ln,"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)):vi(a,"> 0",ln,"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),Yl(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 Ei(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&&rn("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();)Sg(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==Nc&&a!==Zs&&a!==ip&&rn("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 Sn(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 Ei(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),ot.Object.defineProperties(ln,{licenseKey:{get:function(){return ag.jc()},set:function(a){ag.add(a.replace(/\s/g,""))}},version:{get:function(){return Kd}}}),ln.prototype.makeImageData=ln.prototype.Jx,ln.prototype.makeImage=ln.prototype.Wz,ln.prototype.cacheGroupExternalLinks=ln.prototype.Fu,ln.prototype.addRenderer=ln.prototype.bs,ln.prototype.makeSVG=ln.prototype.av,ln.prototype.makeSvg=ln.prototype.Cs,ln.prototype.stopAutoScroll=ln.prototype.ug,ln.prototype.doAutoScroll=ln.prototype.gs,ln.prototype.isUnoccupied=ln.prototype.Yj,ln.prototype.raiseDiagramEvent=ln.prototype.R,ln.prototype.removeDiagramListener=ln.prototype.am,ln.prototype.addDiagramListener=ln.prototype.Bj,ln.prototype.findTreeRoots=ln.prototype.yz,ln.prototype.layoutDiagram=ln.prototype.Uz,ln.prototype.findTopLevelGroups=ln.prototype.qz,ln.prototype.findTopLevelNodesAndLinks=ln.prototype.rz,ln.prototype.ensureBounds=ln.prototype.Va,ln.prototype.findLinksByExample=ln.prototype.ls,ln.prototype.findNodesByExample=ln.prototype.ms,ln.prototype.findLinkForData=ln.prototype.Kc,ln.prototype.findNodeForData=ln.prototype.ii,ln.prototype.findPartForData=ln.prototype.Lc,ln.prototype.findLinkForKey=ln.prototype.findLinkForKey,ln.prototype.findNodeForKey=ln.prototype.Vb,ln.prototype.findPartForKey=ln.prototype.findPartForKey,ln.prototype.rebuildParts=ln.prototype.Wd,ln.prototype.transformViewToDoc=ln.prototype.Ps,ln.prototype.transformRectDocToView=ln.prototype.zA,ln.prototype.transformDocToView=ln.prototype.op,ln.prototype.centerRect=ln.prototype.es,ln.prototype.scrollToRect=ln.prototype.tv,ln.prototype.scroll=ln.prototype.scroll,ln.prototype.highlightCollection=ln.prototype.Jz,ln.prototype.highlight=ln.prototype.Iz,ln.prototype.selectCollection=ln.prototype.rA,ln.prototype.select=ln.prototype.select,ln.prototype.updateAllRelationshipsFromData=ln.prototype.rp,ln.prototype.updateAllTargetBindings=ln.prototype.updateAllTargetBindings,ln.prototype.commit=ln.prototype.commit,ln.prototype.rollbackTransaction=ln.prototype.Kf,ln.prototype.commitTransaction=ln.prototype.eb,ln.prototype.startTransaction=ln.prototype.Ea,ln.prototype.raiseChanged=ln.prototype.g,ln.prototype.raiseChangedEvent=ln.prototype.cb,ln.prototype.removeChangedListener=ln.prototype.ik,ln.prototype.addChangedListener=ln.prototype.Pe,ln.prototype.removeModelChangedListener=ln.prototype.mA,ln.prototype.addModelChangedListener=ln.prototype.Yw,ln.prototype.findLayer=ln.prototype.Qj,ln.prototype.removeLayer=ln.prototype.kA,ln.prototype.addLayerAfter=ln.prototype.Cy,ln.prototype.addLayerBefore=ln.prototype.Ww,ln.prototype.addLayer=ln.prototype.Al,ln.prototype.moveParts=ln.prototype.moveParts,ln.prototype.copyParts=ln.prototype.Kj,ln.prototype.removeParts=ln.prototype.Is,ln.prototype.remove=ln.prototype.remove,ln.prototype.add=ln.prototype.add,ln.prototype.clearDelayedGeometries=ln.prototype.bx,ln.prototype.setProperties=ln.prototype.nm,ln.prototype.attach=ln.prototype.Du,ln.prototype.set=ln.prototype.set,ln.prototype.resetInputOptions=ln.prototype.Sx,ln.prototype.setInputOption=ln.prototype.sA,ln.prototype.getInputOption=ln.prototype.Ql,ln.prototype.resetRenderingHints=ln.prototype.Tx,ln.prototype.setRenderingHint=ln.prototype.Xx,ln.prototype.getRenderingHint=ln.prototype.Gf,ln.prototype.maybeUpdate=ln.prototype.bd,ln.prototype.requestUpdate=ln.prototype.$b,ln.prototype.delayInitialization=ln.prototype.Xy,ln.prototype.isUpdateRequested=ln.prototype.Pz,ln.prototype.invalidateDocumentBounds=ln.prototype.Ya,ln.prototype.findObjectsNear=ln.prototype.og,ln.prototype.findPartsNear=ln.prototype.mz,ln.prototype.findObjectsIn=ln.prototype.Cf,ln.prototype.findPartsIn=ln.prototype.ux,ln.prototype.findObjectsAt=ln.prototype.ji,ln.prototype.findPartsAt=ln.prototype.lz,ln.prototype.findObjectAt=ln.prototype.ic,ln.prototype.findPartAt=ln.prototype.Ol,ln.prototype.focusObject=ln.prototype.zz,ln.prototype.alignDocument=ln.prototype.Jy,ln.prototype.zoomToRect=ln.prototype.BA,ln.prototype.zoomToFit=ln.prototype.zoomToFit,ln.prototype.diagramScroll=ln.prototype.kx,ln.prototype.focus=ln.prototype.focus;var np=new Dn,hm=null,Ps=Ot.document!==void 0,Wd=null,ud="",nl=new dn(ln,"None",0),ru=new dn(ln,"Uniform",1),hd=new dn(ln,"UniformToFill",2),xf=new dn(ln,"CycleAll",10),ng=new dn(ln,"CycleNotDirected",11),ig=new dn(ln,"CycleNotDirectedFast",12),rg=new dn(ln,"CycleNotUndirected",13),og=new dn(ln,"CycleDestinationTree",14),sg=new dn(ln,"CycleSourceTree",15),Ac=new dn(ln,"DocumentScroll",1),wf=new dn(ln,"InfiniteScroll",2),Nc=new dn(ln,"TreeParentCollapsed",21),Zs=new dn(ln,"AllParentsCollapsed",22),ip=new dn(ln,"AnyParentsCollapsed",23),ag=new zn,Kd="2.3.10",Vd="image",_f=null,cm=!1;function Ka(){if(Ps){var a=Ot.document.createElement("canvas"),y=a.getContext("2d"),x=Ui("7ca11abfd022028846");y[x]=Ui("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",xn.Dx+"4ae6247590da4bb21c324ba3a84e385776",xr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",tn.za],E=1;5>E;E++)y[Ui("7ca11abfd7330390")](Ui(b[E-1]),10,15*E);for(y[x]=Ui("39f046ebb36e4b"),x=1;5>x;x++)y[Ui("7ca11abfd7330390")](Ui(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(xr.prototype.Cd=xr.prototype.Eu),_f=a}}ln.className="Diagram",ln.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=Ot.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof ln?y.H:null},ln.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},ln.useDOM=function(a){Ps=a?Ot.document!==void 0:!1},ln.isUsingDOM=function(){return Ps},ln.None=nl,ln.Uniform=ru,ln.UniformToFill=hd,ln.CycleAll=xf,ln.CycleNotDirected=ng,ln.CycleNotDirectedFast=ig,ln.CycleNotUndirected=rg,ln.CycleDestinationTree=og,ln.CycleSourceTree=sg,ln.DocumentScroll=Ac,ln.InfiniteScroll=wf,ln.TreeParentCollapsed=Nc,ln.AllParentsCollapsed=Zs,ln.AnyParentsCollapsed=ip;function dm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Zd(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=Ot[Ui("76a715b2f73f148a")][Ui("72ba13b5")]||"";if(a.Rc=!0,Ps){var b=ln[Ui("76a115b6ed251eaf4692")];if(b)for(var E=ag.iterator;E.next()&&(b=E.value,b=Ui(b).split(Ui("39e9")),!(6>b.length));){var te=Ui(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=Ui(xn[Ui("6cae19")]).split(".");if(te[0]>ne[0]||te[0]===ne[0]&&te[1]>=ne[1]){var ae=Ot[Ui("74a900bae4370f8b51")][Ui("6fbb13a1c2311e8a57")].toLowerCase();if(ne=ae[Ui("73a612b6fb191d")](Ui("3aad1ab6e022098b4dc4")),te=Ui(b[2]),-1<ne&&(ae=ae[Ui("73a612b6fb191d")](te.toLowerCase()+"/"),a.Rc=!(-1<ae&&ae<ne),!a.Rc))break;for(ne=x[Ui("76ad18b4f73e")],ae=x[Ui("73a612b6fb191d")](Ui("35e7"))+2;ae<ne;ae++)y+=x[ae];if(ne=y[Ui("73a612b6fb191d")](te),0>ne&&te!==Ui("7da71ca0ad381e90")&&(ne=y[Ui("73a612b6fb191d")](Ui("76a715b2ef3e149757"))),0>ne&&(ne=y[Ui("73a612b6fb191d")](Ui("76a715b2ef3e149757"))),0>ne&&(ne=y[Ui("73a612b6fb191d")](Ui("2bfa41fdb3784bca12"))),0>ne&&(ne=x[Ui("73a612b6fb191d")](Ui("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[Ui("73a612b6fb191d")](Ui("35"))||y[Ui("73a612b6fb191d")](Ui("35"))===-1),!a.Rc||x[Ui("73a612b6fb191d")](Ui("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[Ui("73a612b6fb191d")](te)),!a.Rc)||(ne=Ot[Ui("76a715b2f73f148a")][Ui("69ad17a1e03e")],ae=ne[Ui("73a612b6fb191d")](Ui("7fb002b6ed25128b4da25b2e")),-1<ae&&(a.Rc=!(ne[Ui("73a612b6fb191d")](te)>ae),!a.Rc)))break;if(te[0]==="#"){ne=Ot.document.createElement("div");for(var ce=b[0].replace(/[A-Za-z]/g,"");4>ce.length;)ce+="9";if(ae=ce,ce=ce.substr(ce.length-4),b="",b+=["gsh","gsf"][parseInt(ce.substr(0,1),10)%2],b+=["Header","Background","Display","Feedback"][parseInt(ce.substr(0,1),10)%4],ne[Ui("79a417a0f0181a8946")]=b,Ot.document[Ui("78a712aa")]){Ot.document[Ui("78a712aa")][Ui("7bb806b6ed32388c4a875b")](ne),ce=Ot.getComputedStyle(ne).getPropertyValue(Ui("78a704b7e62456904c9b12701b6532a8"));var _e=Ot.getComputedStyle(ne).getPropertyValue(Ui("75b817b0ea2202"));if(Ot.document[Ui("78a712aa")][Ui("68ad1bbcf533388c4a875b")](ne),ce){if(ne=Ot[Ui("77a902b0eb1b1e804a8a")],_e==="0."+parseInt(ae,10)%100||ce.indexOf(parseInt(te[1]+te[2],16))!==-1&&ce.indexOf(parseInt(te[3]+te[4],16))!==-1){a.Rc=!1;break}else if(ne&&ne(Ui("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,te=0;te<document.styleSheets.length;te++){ne=document.styleSheets[te].rules||document.styleSheets[te].cssRules;for(var Pe in ne)if(b===ne[Pe].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(Pe=x[Ui("76ad18b4f73e")],E=x[Ui("73a612b6fb191d")](Ui("35e7"))+2;E<Pe;E++)y+=x[E];x=y[Ui("73a612b6fb191d")](Ui("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[Ui("73a612b6fb191d")](Ui("35")))}}}return 0<a.Rc&&a!==a.wy}dm.className="DiagramHelper";function cc(a){this.j=a===void 0?new vt:a,this.o=new vt}ot.Object.defineProperties(cc.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 bf="DraggingInfo";cc.className="DraggingInfo";function re(a,y,x){this.node=a,this.info=y,this.Su=x}re.className="DraggingNodeInfoPair";function de(){this.reset()}de.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new Sn(NaN,NaN).freeze(),this.gridSnapCellSpot=Ls,this.gridSnapOrigin=new vt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},de.className="DraggingOptions";function Te(a,y){if(typeof a=="string"||Ot.Element&&a instanceof Element)var x=ln.call(this,a)||this;else x=ln.call(this)||this,y=a;return ke(x),y&&x.nm(y),x}Ve(Te,ln);function ke(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=ga,a.layout=new Ea}Te.prototype.reset=function(){ln.prototype.reset.call(this),ke(this)},Te.className="Palette";function Ie(a,y){if(typeof a=="string"||Ot.Element&&a instanceof Element)var x=ln.call(this,a)||this;else x=ln.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 Ni;var E=new mr;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 Ei(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Et,x.toolManager.mouseMoveTools),x.click=function(){var te=b.observed;if(te!==null){var ne=te.viewportBounds,ae=b.lastInput.documentPoint;te.position=new vt(ae.x-ne.width/2,ae.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=ru,x.vb=!1,y&&Object.assign(x,y),x}Ve(Ie,ln),Ie.prototype.computePixelRatio=function(){return 1},Ie.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(Ud(this),this.ql===null){var x=new Au(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),tt(this)}finally{this.ta=a,this.ib=y}}}ln.prototype.redraw.call(this)},Ie.prototype.gc=function(){if(this.Ka===null&&rn("No div specified"),this.ta===null&&rn("No canvas specified"),!(this.ta instanceof _h)&&(Iv(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Ud(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?tt(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 tt(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=pn.alloc().assign(a.viewportBounds).ed(y.viewportBounds),xh(y,E),pn.free(E),aa(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 ae=y[ne],ce=a;if(ae.visible&&ae.opacity!==0){var _e=ae.diagram.grid.part;if(!x&&ae.isTemporary)b&&_e.layer===ae&&(ae=Is(ae,E),_e.gc(E,ce),E.globalAlpha=ae);else{for(var Pe=Is(ae,E),Ne=ce.scale,Ge=pn.alloc(),Ye=ae.Pa.s,Qe=Ye.length,at=0;at<Qe;at++){var Ct=Ye[at];(b||Ct!==_e)&&ae.Oj(E,Ct,ce,null,Ne,Ge,!1)}pn.free(Ge),E.globalAlpha=Pe}}}}}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=Sn.alloc();E.h(x.width,x.height),b.desiredSize=E,Sn.free(E),a=2/a.scale,b instanceof mr&&(b.strokeWidth=a),y.location=new vt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}Ie.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Gr;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},Ie.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},Ie.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(Ie.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Ie&&rn("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)}}}),Ie.className="Overview";function Et(){us.call(this),this.j=null}Ve(Et,us),Et.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 vt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new vt(a.x-this.j.x,a.y-this.j.y)),!0)},Et.prototype.doActivate=function(){this.j=null,us.prototype.doActivate.call(this)},Et.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Et.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 vt(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new vt(a.x-this.j.x,a.y-this.j.y)}}},Et.className="OverviewDraggingTool";function Pt(){en(this),this.H=Ol,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=Gr,this.hb=!0,this.cg=null,this.ob=200}Pt.prototype.toString=function(){return"CommandHandler"},Pt.prototype.Xe=function(a){this.H=a},Pt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=cs?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()},Pt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Pt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Ko&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Pt.prototype.canStopCommand=function(){return!0},Pt.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=""}},Pt.prototype.canSelectAll=function(){return this.diagram.allowSelect},Pt.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 Ut,x=a.selection.iterator;x.next();)pd(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=""}},Pt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Pt.prototype.copySelection=function(){var a=this.diagram,y=new Ut;for(a=a.selection.iterator;a.next();)pd(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},Pt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Pt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Pt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Pt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Wd=null,ud="";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 zn,x.addAll(te),Wd=x,ud=y.model.dataFormat}}y.R("ClipboardChanged",x)},Pt.prototype.pasteFromClipboard=function(){var a=new Ut,y=Wd;if(y===null)return a;var x=this.diagram;if(ud!==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},Pt.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);sd(y,te,new vt(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=""}},Pt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Wd===null||Wd.count===0||ud!==a.model.dataFormat)},Pt.prototype.undo=function(){this.diagram.undoManager.undo()},Pt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Pt.prototype.redo=function(){this.diagram.undoManager.redo()},Pt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Pt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===nl&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Pt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==nl?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Pt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===nl&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Pt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==nl?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Pt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Pt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Pt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;Wl(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=Gr):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),Eo(y)},Pt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Pt.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(ce){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;Wl(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=zt(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 ce=E.pop();0<E.length&&ce instanceof ii&&ce.isTreeExpanded&&(!(ce instanceof ur)||ce.isSubGraphExpanded);)ce=E.pop();0<E.length?(ce instanceof Ni&&y.tv(ce.actualBounds),ce instanceof ii&&!ce.isTreeExpanded&&(ce.isTreeExpanded=!0),ce instanceof ur&&!ce.isSubGraphExpanded&&(ce.isSubGraphExpanded=!0)):(ce instanceof Ni&&y.es(ce.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){wi(te,(x.isEnabled?x.duration:0)+b)};y.Bj("LayoutCompleted",ne),te()}}else{var ae=y.position.copy();y.es(a.actualBounds),ae.Xa(y.position)&&x.Cc()}}};function zt(a,y,x){if(y.isVisible())return x;if(y instanceof $r)zt(a,y.adornedPart,x);else if(y instanceof Gn){var b=y.fromNode;b!==null&&zt(a,b,x),y=y.toNode,y!==null&&zt(a,y,x)}else y instanceof ii&&(b=y.labeledLink,b!==null&&zt(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),zt(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),zt(a,y,x));return x}Pt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Ni)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Pt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Wl(y.animationManager,"Collapse Tree");var x=new zn;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 ii&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Pt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof ii&&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 ii&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Pt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Wl(y.animationManager,"Expand Tree");var x=new zn;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 ii&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Pt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof ii)||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 ii&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Pt.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 zn,te=a.selection.iterator;te.next();){var ne=te.value;ne.Zc()&&ne.canGroup()&&E.add(ne)}for(var ae=new zn,ce=E.iterator;ce.next();){var _e=ce.value;te=!1;for(var Pe=E.iterator;Pe.next();)if(_e.Td(Pe.value)){te=!0;break}te||ae.add(_e)}if(0<ae.count){var Ne=ae.first().containingGroup;if(Ne!==null)for(;Ne!==null;){E=!1;for(var Ge=ae.iterator;Ge.next();)if(!Ge.value.Td(Ne)){E=!0;break}if(E)Ne=Ne.containingGroup;else break}if(x instanceof ur)Nu(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Ye=y.copyNodeData(x);cn(Ye)&&(y.xf(Ye),b=a.ii(Ye))}if(b!==null){Ne!==null&&this.isValidMember(Ne,b)&&(b.containingGroup=Ne);for(var Qe=ae.iterator;Qe.next();){var at=Qe.value;this.isValidMember(b,at)&&(at.containingGroup=b)}a.clearSelection(!0),b.isSelected=!0}}a.R("SelectionGrouped",b)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},Pt.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 mn(a){var y=Ti();for(a=a.iterator;a.next();){var x=a.value;x instanceof Gn||y.push(x)}a=new Ut,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 bi(y),a}Pt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Gn)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},Pt.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 zn;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var te=E.value;te instanceof ur&&te.canUngroup()&&b.add(te)}var ne=new zn;if(0<b.count){y.clearSelection(!0);for(var ae=b.iterator;ae.next();){var ce=ae.value;ce.expandSubGraph();var _e=ce.containingGroup,Pe=_e!==null&&_e.data!==null?x.wa(_e.data):void 0;ne.addAll(ce.memberParts);for(var Ne=ne.iterator;Ne.next();){var Ge=Ne.value;if(Ge.isSelected=!0,!(Ge instanceof Gn)){var Ye=Ge.data;Ye!==null?x.mp(Ye,Pe):Ge.containingGroup=_e}}y.remove(ce)}}y.R("SelectionUngrouped",b,ne)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Pt.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 ur))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ur&&y.canUngroup())return!0;return!1},Pt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=mn(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},Pt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Wl(y.animationManager,"Collapse SubGraph");var x=new zn;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 ur&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Pt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof ur&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ur&&y.isSubGraphExpanded)return!0;return!1},Pt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Wl(y.animationManager,"Expand SubGraph");var x=new zn;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 ur&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Pt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof ur&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ur&&!y.isSubGraphExpanded)return!0;return!1},Pt.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 Vo&&te.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Pt.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 Vo))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 Vo&&x.editable}),a!==null))return!0;return!1},Pt.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 Xt?E=a.ga(Hr):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new vt(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,rr(x,!1,a)}},Pt.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)},Pt.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 Dn,a===null)return b;for(var te=a.iterator;te.next();)Ih(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 Gn&&(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(Pt.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||rn("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}}}),Pt.className="CommandHandler",gf=function(){return new Pt};function Xt(){en(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new vt(NaN,NaN).freeze(),this.jd=Qo,this.Ab=new xr,this.wh=new xr,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=ds,this.uc=new pn(NaN,NaN,NaN,NaN).freeze(),this.Ib=new pn(NaN,NaN,NaN,NaN).freeze(),this.dc=new pn(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=ma,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 Nn,Ln,Si,Li,Bi,cr,Ir,Pr,Wr,No;Xt.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=Ii(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},Xt.prototype.Vw=function(a){var y=this.Dh;if(qn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},Xt.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Xt.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},Xt.prototype.copy=function(){return this.clone()},qe=Xt.prototype,qe.qb=function(a){a.classType===Gn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:rn("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Xt&&(this.stretch=a)},qe.toString=function(){return li(this.constructor)+"#"+Ft(this)},qe.th=function(){this.A!==null&&(this.A.nc=!0)};function wr(a){a.A===null?a.A=new Cf:a.A.nc&&(a.A=a.A.copy())}qe.Xc=function(){if(this.ba===null){var a=new lg;a.Xi=xs,a.yj=xs,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},qe.cb=function(a,y,x,b,E,te,ne){var ae=this.part;if(ae!==null&&(ae.gk(a,y,x,b,E,te,ne),x===this&&a===Jo&&Ma(this)&&ts(this,ae,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 Dn),ne=te.undoManager.transactionLevel===0,a.startCondition===bo?ne=!0:a.startCondition===ao&&(ne=!1),ne?(te=new va,vh(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()):(Wl(te.animationManager,"Trigger"),te.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof Rn&&x===ae&&(ae.l&16777216)!==0&&ae.data!==null))for(x=this.O.s,b=x.length,E=0;E<b;E++)ae=x[E],ae instanceof Rn&&qd(ae,function(ce){ce.data!==null&&ce.l&16777216&&ce.La(y)})};function ts(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 ae=y.diagram;ae===null||ae.skipsModelSourceBindings||te.sp(a,ae.model.modelData,x,b)}else{if(ae=b.data,ae===null)continue;var ce=y.diagram;ce===null||ce.skipsModelSourceBindings||te.sp(a,ae,x,b)}ne===a&&(ae=b.ks(te.Ai),ae!==null&&te.Mv(ae,ne,x))}}qe.ks=function(a){return this.bindingId===a?this:null},qe.g=function(a,y,x){this.cb(Jo,a,this,y,x)},qe.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 xr);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),te.pp(E)}};function da(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}qe.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?ir(a.x,a.y,0,0,0,b.height)<=y||ir(a.x,a.y,0,b.height,b.width,b.height)<=y||ir(a.x,a.y,b.width,b.height,b.width,0)<=y||ir(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},qe.se=function(){return!0},qe.ca=function(a){var y=vt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return vt.free(y),!1;var b=this.diagram;if(b!==null&&b.wq){var E=b.Ql("extraTouchThreshold"),te=b.Ql("extraTouchArea"),ne=te/2,ae=this.naturalBounds;b=this.Df()*b.scale;var ce=1/b;if(ae.width*b<E&&ae.height*b<E)return a=Co(x.x-ne*ce,x.y-ne*ce,x.width+te*ce,x.height+te*ce,y.x,y.y),vt.free(y),a}return E=!1,(this instanceof $r||this instanceof mr?Co(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)),vt.free(y),E},qe.gh=function(a){var y=this.naturalBounds;return Co(0,0,y.width,y.height,a.x,a.y)},qe.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=pn.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=vt.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)))),vt.free(E),pn.free(y),b},qe.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=vt.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)))),vt.free(E),b},qe.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=vt.allocAt(0,0),E=vt.allocAt(0,x.height),te=vt.allocAt(x.width,x.height),ne=vt.allocAt(x.width,0),ae=!1;if(a.ca(y.Ga(b))||a.ca(y.Ga(E))||a.ca(y.Ga(te))||a.ca(y.Ga(ne)))ae=!0;else{x=pn.allocAt(0,0,x.width,x.height);var ce=vt.allocAt(a.x,a.y);x.ca(y.Cd(ce))?ae=!0:(ce.h(a.x,a.bottom),x.ca(y.Cd(ce))?ae=!0:(ce.h(a.right,a.bottom),x.ca(y.Cd(ce))?ae=!0:(ce.h(a.right,a.y),x.ca(y.Cd(ce))&&(ae=!0)))),vt.free(ce),pn.free(x),!ae&&(tn.us(a,b,E)||tn.us(a,E,te)||tn.us(a,te,ne)||tn.us(a,ne,b))&&(ae=!0)}return vt.free(b),vt.free(E),vt.free(te),vt.free(ne),ae},qe.ga=function(a,y){if(y===void 0&&(y=new vt),a instanceof di){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},qe.mi=function(a){a===void 0&&(a=new pn);var y=this.naturalBounds,x=this.oe,b=vt.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),fo(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),fo(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),fo(a,b.x,b.y,0,0),vt.free(b),a},qe.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},qe.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},qe.qs=function(a,y){return y===void 0&&(y=new vt),y.assign(a),this.oe.Cd(y),y},qe.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},qe.Sj=function(a,y,x,b,E){var te=this.transform,ne=1/(te.m11*te.m22-te.m12*te.m21),ae=te.m22*ne,ce=-te.m12*ne,_e=-te.m21*ne,Pe=te.m11*ne,Ne=ne*(te.m21*te.dy-te.m22*te.dx),Ge=ne*(te.m12*te.dx-te.m11*te.dy);return this.areaBackground!==null?(te=this.actualBounds,tn.Ff(te.left,te.top,te.right,te.bottom,a,y,x,b,E)):(ne=a*ae+y*_e+Ne,a=a*ce+y*Pe+Ge,y=x*ae+b*_e+Ne,x=x*ce+b*Pe+Ge,E.h(0,0),b=this.naturalBounds,x=tn.Ff(0,0,b.width,b.height,ne,a,y,x,E),E.transform(te),x)},Xt.prototype.measure=function(a,y,x,b){if(su(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 ae=this instanceof Rn;switch(Cl(this,!0)){case Ln:ne=E=0,ae&&(y=a=1/0);break;case Nn:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(ne=y);break;case Li:isFinite(a)&&a>x&&(E=a),ne=0,ae&&(y=1/0);break;case Bi:isFinite(y)&&y>b&&(ne=y),E=0,ae&&(a=1/0)}ae=this.maxSize;var ce=this.minSize;E>ae.width&&ce.width<ae.width&&(E=ae.width),ne>ae.height&&ce.height<ae.height&&(ne=ae.height),x=Math.max(E,ce.width),b=Math.max(ne,ce.height),ae.width<x&&(x=Math.min(ce.width,x)),ae.height<b&&(b=Math.min(ce.height,b)),a=Math.min(ae.width,a),y=Math.min(ae.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()||rn("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Ys(this,!1)}},Xt.prototype.Wl=function(){},Xt.prototype.Dd=function(){return!1},Xt.prototype.arrange=function(a,y,x,b,E){this.Uk();var te=pn.alloc();te.assign(this.Ib),this.Ib.ka(),cl(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&&Rc(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 Vo&&(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()||rn("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(te,this.Ib),Fh(this,!1),pn.free(te)},qe=Xt.prototype,qe.eh=function(){};function il(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=Cl(a,!0),x===b&&te===E&&(y=Ln),y){case Ln:(x>b||te>E)&&(Ys(a,!0),a.measure(x>b?b:x,te>E?E:te,0,0));break;case Nn:Ys(a,!0),a.measure(b,E,0,0);break;case Li:Ys(a,!0),a.measure(b,te,0,0);break;case Bi:Ys(a,!0),a.measure(x,E,0,0)}}}qe.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(),mo(a,y)||(x.oh(),this.Pn(x)))},qe.Pn=function(a){this.portId!==null&&(jv(a,!0),a instanceof ii&&W1(a,this))},qe.gc=function(a,y){if(!pu(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 Rn&&Rc(this),ne=this.Ib;if(te){var ae=this.Ib,ce=this.dc,_e=this.areaBackground,Pe=this.Ma;_e===null&&Pe===null||a.yc(),_e!==null&&(Es(this,a,_e,!0,!0,ce,ae),_e instanceof Po&&_e.type===vu?(a.beginPath(),a.rect(ae.x,ae.y,ae.width,ae.height),a.ng(_e)):a.fillRect(ae.x,ae.y,ae.width,ae.height)),Pe!==null&&(Es(this,a,Pe,!0,!1,ce,ae),Pe instanceof Po&&Pe.type===vu?(a.beginPath(),a.rect(ae.x,ae.y,ae.width,ae.height),a.ng(Pe)):a.fillRect(ae.x,ae.y,ae.width,ae.height)),this.hh(a,y)}if(!te&&(te||ne.width!==0&&ne.height!==0&&!isNaN(ne.x)&&!isNaN(ne.y))){te=this.transform,ae=this.panel,this.l&4096&&Ca(this),_e=this.part,ce=!1;var Ne=0;_e&&y.Gf("drawShadows")&&(ce=_e.isShadowed)&&(Pe=_e.shadowOffset,Ne=Math.max(Pe.y,Pe.x)*y.scale*y.Mb),Pe=this.Dd();var Ge;if(!(Ge=y.$i||!Pe)){var Ye=this.naturalBounds;Ge=this.wh;var Qe=Ge.m11,at=Ge.m21,Ct=Ge.dx,xt=Ge.m12,Tt=Ge.m22,Nt=Ge.dy,It,Zt=It=0;Ge=It*Qe+Zt*at+Ct;var un=It*xt+Zt*Tt+Nt;It=Ye.width+Ne,Zt=0;var $n=It*Qe+Zt*at+Ct;It=It*xt+Zt*Tt+Nt,Zt=Math.min(Ge,$n);var fi=Math.min(un,It),ai=Math.max(Ge+0,$n)-Zt,Un=Math.max(un+0,It)-fi;Ge=Zt,un=fi,It=Ye.width+Ne,Zt=Ye.height+Ne,$n=It*Qe+Zt*at+Ct,It=It*xt+Zt*Tt+Nt,Zt=Math.min(Ge,$n),fi=Math.min(un,It),ai=Math.max(Ge+ai,$n)-Zt,Un=Math.max(un+Un,It)-fi,Ge=Zt,un=fi,It=0,Zt=Ye.height+Ne,$n=It*Qe+Zt*at+Ct,It=It*xt+Zt*Tt+Nt,Zt=Math.min(Ge,$n),fi=Math.min(un,It),ai=Math.max(Ge+ai,$n)-Zt,Un=Math.max(un+Un,It)-fi,Ge=Zt,un=fi,Ne=y.viewportBounds,Ye=Ne.x,Qe=Ne.y,Ge=!(Ge>Ne.width+Ye||Ye>ai+Ge||un>Ne.height+Qe||Qe>Un+un)}if(Ge){if(Ge=(this.l&256)!==0,a.clipInsteadOfFill&&(Ge=!1),this instanceof Vo&&(a.font=this.font),Ge){if(un=ae.se()?ae.naturalBounds:ae.actualBounds,ai=Math.max(ne.x,un.x),Un=Math.max(ne.y,un.y),Ne=Math.min(ne.right,un.right)-ai,Ye=Math.min(ne.bottom,un.bottom)-Un,Qe=this.tb,Qe!==null&&(ai=Qe.x,Un=Qe.y,Ne=Qe.width,Ye=Qe.height),ai>ne.width+ne.x||ne.x>un.width+un.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(ai,Un,Ne,Ye),a.clip()}if(Pe){if(!_e.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}ce&&(un=_e.shadowOffset,a.Ev(un.x*y.scale*this.scale*y.Mb,un.y*y.scale*this.scale*y.Mb,_e.shadowBlur),dc(a),a.shadowColor=_e.shadowColor)}ce&&this.shadowVisible===!0?dc(a):ce&&this.shadowVisible===!1&&Bh(a),_e=this.naturalBounds,this.areaBackground!==null&&(a.yc(),ou(this,a,_e,ne)),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),ce&&wa(this,ae)&&this.shadowVisible===null&&Bh(a),this.Ma!==null&&(a.yc(),Il(this,a,_e,ne)),ce&&(this.Ma!==null||this.areaBackground!==null||wa(this,ae))?(Wu(this,!0),this.shadowVisible===null&&Bh(a)):Wu(this,!1),this.hh(a,y),ce&&this.l&512&&dc(a),Pe&&ce&&Bh(a),Ge&&(a.restore(),a.Vc(this instanceof Rn)),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 wa(a,y){return y===null?!1:(Rc(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Rn.Auto||y.type===Rn.Spot)&&y.Pb()!==a)}qe.Dv=function(){};function ou(a,y,x,b){Es(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof Po&&a.areaBackground.type===vu?(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 Il(a,y,x,b){var E=a.kq(),te=x.x,ne=x.y,ae=x.width+E,ce=x.height+E;Es(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof Po&&a.Ma.type===vu?(y.beginPath(),y.rect(te-E/2,ne-E/2,ae,ce),y.ng(a.Ma)):y.fillRect(te-E/2,ne-E/2,ae,ce)}function Va(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===Rn.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 pu(a,y,x){if(!(y instanceof Xl))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&&Va(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),dc(y),y.shadowColor=a.shadowColor}a instanceof Vo&&(y.font=a.font),y.yd=null;var ne=a.transform;te=a instanceof Rn;var ae=a instanceof Rn?Rc(a):!1;a.l&4096&&Ca(a);var ce=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,te&&ae?(ug(y,1,0,0,1,0,0),a.svg=y.ad):te?(ug(y,ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy),a.svg=y.ad):ug(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],ou(a,y,E,ce),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?(ae&&(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),Il(a,y,E,ce),ae&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],Il(a,y,E,ce)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),ne=y.yd,E=a.part,ae=!1,E&&x.Gf("drawShadows")&&(ae=E.isShadowed),y.clipInsteadOfFill&&(ae=!1),a.Dd()&&ae&&dc(y),ae&&a.shadowVisible===!0?dc(y):ae&&a.shadowVisible===!1&&Bh(y),E=a.panel,ae&&wa(a,E)&&a.shadowVisible===null&&Bh(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)),ae&&(a.Ma!==null||a.areaBackground!==null||wa(a,E))?(Wu(a,!0),a.shadowVisible===null&&Bh(y)):Wu(a,!1),E=ae,a.hh(y,x),te&&y.nh.pop(),y.o&&y.nh.pop(),ne=y.Gv.hs,ae=te?a.svg:y.yd,_e=a.svg,!te&&_e!==null&&ae!==_e&&_e.parentNode===a.panel.svg?(a.svg.replaceWith(ae),a.svg=ae,ae!==null&&a.$o(y,b,ce,ae),Pl(y,_e),!0):(a.svg=ae,ne!==null&&ae===null&&(pm(y),y.nh.pop()),ae===null||(a.$o(y,b,ce,ae),y.Il&&(x=x.computePixelRatio(),a.Dv(ae,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),E&&a.l&512&&dc(y),a.Dd()&&Bh(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&ae.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&ae.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(ae):y.Nj.prepend(ae),y.ti=ae):b!==null&&Va(a,b,ae),ne!==null&&ne(a,ae)),!0)}qe.$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 ae=null;te!==null&&(ae=a.svg.getElementById(te.split("#")[1].slice(0,-1))),ae===null?(te="CLIP"+Yt++,ae=a.Ud("clipPath",{id:te}),y=a.Ud("rect",{x:y,y:E,width:ne,height:x}),this instanceof Rn&&(E=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")),ae.appendChild(y),a.svg.appendChild(ae),b.setAttributeNS(null,"clip-path","url(#"+te+")")):(a=ae.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"),Pl(a,b)};function Pl(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function Za(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=In(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()}}qe.hh=function(){},qe.lv=function(){this.Uc=!0},qe.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 Rn?Rc(this):!1;if(!(this instanceof Rn&&E))if(this instanceof Ll){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 Rn)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof mr){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],ou(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&&gm(a,te)),(this.background!==null||y.Ma!==void 0)&&(te=y.Ma,this.background===null?(gm(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((E||x&&!(this instanceof Rn))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),Il(this,a,this.naturalBounds,this.actualBounds),y.Ma?(gm(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&&gm(a,te)),this.$o(a,this.panel,this.actualBounds,y),!0},qe.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 Es(a,y,x,b,E,te,ne){if(x!==null){var ae=1,ce=1;if(typeof x=="string")b?y.fillStyle=x:y.strokeStyle=x;else if(x.type===Oc)b?y.fillStyle=x.color:y.strokeStyle=x.color;else{var _e=a.kq();if(ae=te.width,ce=te.height,E?(ae=ne.width,ce=ne.height):b||(ae+=_e,ce+=_e),(te=y instanceof Jd)&&x.xe&&(x.type===hp||x.yk===ae&&x.ft===ce))var Pe=x.xe;else{var Ne=0,Ge=0,Ye=0,Qe=0,at=0,Ct=0;if(Ct=at=0,E?(at=ne.x,Ct=ne.y):b||(at-=_e/2,Ct-=_e/2),Ne=x.start.x*ae+x.start.offsetX,Ge=x.start.y*ce+x.start.offsetY,Ye=x.end.x*ae+x.end.offsetX,Qe=x.end.y*ce+x.end.offsetY,Ne+=at,Ye+=at,Ge+=Ct,Qe+=Ct,x.type===pc)Pe=y.createLinearGradient(Ne,Ge,Ye,Qe);else if(x.type===vu)Ct=isNaN(x.endRadius)?Math.max(ae,ce)/2:x.endRadius,isNaN(x.startRadius)?(at=0,Ct=Math.max(ae,ce)/2):at=x.startRadius,Pe=y.createRadialGradient(Ne,Ge,at,Ye,Qe,Ct);else if(x.type===hp)try{Pe=y.createPattern(x.pattern,"repeat")}catch(Tt){Pe=null}if(x.type!==hp&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)Pe.addColorStop(E.key,E.value);if(te&&(x.xe=Pe,Pe!==null&&(x.yk=ae,x.ft=ce),Pe===null&&x.type===hp&&x.yk!==-1)){x.yk=-1;var xt=a.diagram;xt!==null&&x.yk===-1&&wi(function(){xt.redraw()},600)}}b?y.fillStyle=Pe:y.strokeStyle=Pe}}}qe.rg=function(a){if(a instanceof Rn)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},qe.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},qe.If=function(){for(var a=this instanceof Rn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Ca(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Tu(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)}Tu(a,!1),gu(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,gu(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,gu(a,!1)))}qe.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=vt.alloc();te.yi(y,x,b,E,Hr),a.rotate(this.Kb,te.x,te.y),vt.free(te)}},qe.v=function(a){if(!su(this)){a===void 0&&(a=!1),Ys(this,!0),Fh(this,!0);var y=this.panel;y===null||a||y.v()}},qe.Uj=function(){su(this)||(Ys(this,!0),Fh(this,!0))};function hl(a){if(!cl(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof ii&&a.Bd(),y.$b())),Fh(a,!0)}}qe.Uk=function(){!(this.l&2048)&&(Tu(this,!0),gu(this,!0))},qe.Wu=function(){gu(this,!0)},qe.N=function(){var a=this.part;a!==null&&a.N()};function Cl(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===Rn.Table?ih(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===Rn.Auto&&b.Pb()===a?_a(a,Nn,y):x===cr?b!==null?b.type===Rn.Spot&&b.Pb()===a?_a(a,Nn,y):(x=b.defaultStretch,x===cr?_a(a,Ln,y):_a(a,x,y)):_a(a,Ln,y):_a(a,x,y)}function ih(a,y,x,b){var E=a.stretch;if(E!==cr)return _a(a,E,b);var te=E=null;switch(y.stretch){case Bi:te=!0;break;case Nn:te=!0}switch(x.stretch){case Li:E=!0;break;case Nn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===Li||y===Nn),te===null&&(te=y===Bi||y===Nn),E===!0&&te===!0?_a(a,Nn,b):E===!0?_a(a,Li,b):te===!0?_a(a,Bi,b):_a(a,Ln,b)}function _a(a,y,x){if(x)return y;if(y===Ln||(x=a.desiredSize,x.w()))return Ln;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===Li)return Ln;if(y===Nn)return Bi}else{if(y===Bi)return Ln;if(y===Nn)return Li}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Bi)return Ln;if(y===Nn)return Li}else{if(y===Li)return Ln;if(y===Nn)return Bi}return y}function Wu(a,y){a.l=y?a.l|512:a.l&-513}function Ma(a){return(a.l&1024)!==0}function Pf(a,y){a.l=y?a.l|1024:a.l&-1025}function Tu(a,y){a.l=y?a.l|2048:a.l&-2049}function gu(a,y){a.l=y?a.l|4096:a.l&-4097}function su(a){return(a.l&8192)!==0}function Ys(a,y){a.l=y?a.l|8192:a.l&-8193}function cl(a){return(a.l&16384)!==0}function Fh(a,y){a.l=y?a.l|16384:a.l&-16385}qe.Gj=function(){this.svg=null},qe.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},qe.Av=function(){},qe.zv=function(a){return this.pa=a,hl(this),!0},qe.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},qe.kq=function(){return 0};function Yd(a){var y=a.part;if(y instanceof ii&&(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 Rn?a instanceof ii?a.Bd():a.qm(a,function(x){Yd(x)}):Yd(a))}qe.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Bs(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&f1(a)&&rn("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new zn),this.localBindings.add(E),this},qe.set=function(a){return Object.assign(this,a),this},qe.Du=function(a){return iv(this,a),this},qe.apply=function(a){return a(this),this},qe.nm=function(a){return zd(this,a),this},qe.pz=function(){return this.ih()},qe.ih=function(){for(var a=this instanceof Rn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},qe.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new Dn),this.animationTriggers.add(a.propertyName,a),this};function mu(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=rp.I(a);typeof te=="function"?(x=Ii(arguments),b=te(x),cn(b)||rn('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=Ot.go[a]}if(b===null&&(E!=null&&E.constructor||rn("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 ln&&1<x.length){te=b;var ne=x[1];(typeof ne=="string"||ne instanceof HTMLDivElement)&&(Rd(te,ne),E++)}for(;E<x.length;E++)te=x[E],te===void 0?rn("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 Vo)a.text=y;else if(a instanceof mr)a.figure=y;else if(a instanceof Ll)a.source=y;else if(a instanceof Rn)y=Ku.I(y),y!==null&&(a.type=y);else if(a instanceof Po){var x=gr(Po,y);x!==null?a.type=x:rn("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Kn?(y=gr(Kn,y),y!==null&&(a.type=y)):a instanceof Kr&&(y=gr(Kr,y),y!==null&&(a.type=y));else if(y instanceof Xt)a instanceof Rn||rn("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Xs){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 Xs?Am(b,y):rn("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof dn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof ta)a.type=y;else if(y instanceof Bs)a instanceof Xt||a instanceof Xs?a.bind(y):rn("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof Zl)a instanceof Xt?a.Jv(y):rn("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Gs)a instanceof Kn&&a.type===Kn.o?a.figures.add(y):rn("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Kr)a instanceof Gs?a.segments.add(y):rn("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof ls)a instanceof ln||a instanceof ur?a.layout=y:rn("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 Po){x=new $i;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);zd(a,x)}else if(a instanceof Xs){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&rn("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)&&rn("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new $i;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);zd(a,E)}else zd(a,y);else rn('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function Dc(a,y){rp.add(a,y)}function fm(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(Xt.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new Cf),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 Cf),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 Cf),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(wr(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&&(wr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:pl},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new cd),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===pl&&(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 cd),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 cd),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Sr},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new cd),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:cr},set:function(a){var y=this.stretch;y!==a&&(wr(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&&(wr(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)&&vi(a,"0 <= value <= 1",Xt,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(ef(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(ef(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&&Lf(a,"GraphObject.areaBackground"),a instanceof Po&&a.freeze(),wr(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&&Lf(a,"GraphObject.background"),a instanceof Po&&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 Ni)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 vt(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&&rn("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 mr&&this.qc(),this.g("desiredSize",b,a),Ma(this)&&(a=this.part,a!==null&&(ts(this,a,"width"),ts(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 Sn(a,this.jd.height).freeze(),this.v(),this instanceof mr&&this.qc(),this.g("desiredSize",y,a),Ma(this)&&(a=this.part,a!==null&&ts(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 Sn(this.jd.width,a).freeze(),this.v(),this instanceof mr&&this.qc(),this.g("desiredSize",y,a),Ma(this)&&(a=this.part,a!==null&&ts(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:ji},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(),wr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:xo},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(),wr(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 Ei(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&&Ca(this),this.Ab}},oe:{get:function(){return this.l&4096&&Ca(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(wr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:Ln},set:function(a){this.reshapingBehavior!==a&&(wr(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()&&rn("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),hl(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&&vi(a,">= 0",Xt,"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&&vi(a,">= 1",Xt,"columnSpan"),wr(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&&vi(a,">= 0",Xt,"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&&vi(a,">= 1",Xt,"rowSpan"),wr(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&&(wr(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 ii||rn("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Gv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,Z1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:xs},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Yd(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&vi(a,">= 0",Xt,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Yd(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),Yd(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&&vi(a,">= 0",Xt,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:xs},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Yd(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&vi(a,">= 0",Xt,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Yd(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),Yd(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&&vi(a,">= 0",Xt,"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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Xt.prototype.trigger=Xt.prototype.Jv,Xt.prototype.findBindingPanel=Xt.prototype.ih,Xt.prototype.findTemplateBinder=Xt.prototype.pz,Xt.prototype.setProperties=Xt.prototype.nm,Xt.prototype.apply=Xt.prototype.apply,Xt.prototype.attach=Xt.prototype.Du,Xt.prototype.set=Xt.prototype.set,Xt.prototype.isEnabledObject=Xt.prototype.If,Xt.prototype.isVisibleObject=Xt.prototype.Ed,Xt.prototype.isContainedBy=Xt.prototype.rg,Xt.prototype.getNearestIntersectionPoint=Xt.prototype.rs,Xt.prototype.getLocalPoint=Xt.prototype.qs,Xt.prototype.getDocumentScale=Xt.prototype.Df,Xt.prototype.getDocumentAngle=Xt.prototype.li,Xt.prototype.getDocumentBounds=Xt.prototype.mi,Xt.prototype.getDocumentPoint=Xt.prototype.ga,Xt.prototype.intersectsRect=Xt.prototype.Yc,Xt.prototype.containedInRect=Xt.prototype.fh,Xt.prototype.containsRect=Xt.prototype.Re,Xt.prototype.containsPoint=Xt.prototype.ca,Xt.prototype.raiseChanged=Xt.prototype.g,Xt.prototype.raiseChangedEvent=Xt.prototype.cb,Xt.prototype.addCopyProperty=Xt.prototype.Vw;var rp=null;Xt.className="GraphObject",rp=new Dn,Dc("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=mu(Rn,Rn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof Rn){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"},mu(mr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new di(0,0,2.76142374915397,2.761423749153969),spot2:new di(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 Rn&&(x=b.fb("ButtonBorder"),x instanceof mr)){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 Rn&&(x=b.fb("ButtonBorder"),x instanceof mr&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof Rn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof mr){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 Rn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof mr){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 Rn&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof mr){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 Rn&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof mr))){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}),Dc("TreeExpanderButton",function(){var a=mu("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},mu(mr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Xr},new Bs("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Bs("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof $r&&(x=x.adornedPart),x instanceof ii){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}),Dc("SubGraphExpanderButton",function(){var a=mu("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},mu(mr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Xr},new Bs("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 $r&&(x=x.adornedPart),x instanceof ur){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}),Dc("ToolTip",function(){return mu($r,Rn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new vt(0,3),shadowBlur:5},mu(mr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new di(0,0,4,6),spot2:new di(1,1,-4,-4)}))}),Dc("ContextMenu",function(){return mu($r,Rn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new vt(0,3),shadowBlur:5},new Bs("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Dc("ContextMenuButton",function(){var a=mu("Button");a.stretch=Li;var y=a.fb("ButtonBorder");return y instanceof mr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new di(0,0,2,3),y.spot2=new di(1,1,-2,-2)),a}),Dc("PanelExpanderButton",function(a){var y=fm(a,"COLLAPSIBLE"),x=mu("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},mu(mr,{name:"ButtonIcon",strokeWidth:2},new Bs("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof mr&&(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}),Dc("CheckBoxButton",function(a){var y=fm(a);return a=mu("Button",{desiredSize:new Sn(14,14)},mu(mr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Nn,geometryStretch:Si,visible:!1},y!==""?new Bs("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof Rn){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}),Dc("CheckBox",function(a){a=fm(a),a=mu("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Ei(0,1,0,0)});var y=mu(Rn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Ei(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}),Xt.None=Ln=new dn(Xt,"None",0),Xt.Default=cr=new dn(Xt,"Default",0),Xt.Vertical=Bi=new dn(Xt,"Vertical",4),Xt.Horizontal=Li=new dn(Xt,"Horizontal",5),Xt.Fill=Nn=new dn(Xt,"Fill",3),Xt.Uniform=Si=new dn(Xt,"Uniform",1),Xt.UniformToFill=Ir=new dn(Xt,"UniformToFill",2),Xt.FlipVertical=Pr=new dn(Xt,"FlipVertical",1),Xt.FlipHorizontal=Wr=new dn(Xt,"FlipHorizontal",2),Xt.FlipBoth=No=new dn(Xt,"FlipBoth",3),Xt.make=mu,Xt.getBuilders=function(){var a=new Dn,y;for(y in rp)if(y!==y.toLowerCase()){var x=rp.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},Xt.defineBuilder=Dc,Xt.build=function(a,y,x){for(var b=[],E=2;E<arguments.length;++E)b[E-2]=arguments[E];if(E=rp.I(a),typeof E=="function"&&(b=E([a].concat(b)),b instanceof Xt))return y&&b.set(y),b;rn('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Xt.takeBuilderArgument=fm;function Cf(){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=ji,this.o=xo,this.hg=cr,this.ob=this.Bi=1,this.Pf=Ln,this.Pc=this.Ci=this.gd=null,this.Oc="category"}Cf.prototype.copy=function(){var a=new Cf;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 cd(){this.u=-1/0,this.o=0,this.F=Sr,this.rr=pl,this.j=this.V="None"}cd.prototype.copy=function(){var a=new cd;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},cd.className="LinkElementSettings";function lg(){this.yj=this.Xi=ma,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}lg.prototype.copy=function(){var a=new lg;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},lg.className="LinkSettings";function Xd(){this.ha=[1,0,0,1,0,0]}Xd.prototype.copy=function(){var a=new Xd;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},Xd.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},Xd.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Xd.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)}},Xd.className="STransform";function Ef(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Ef.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Ef.className="SGradient";function _h(a,y,x){this.ownerDocument=a=y===void 0?Ot.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 Xl(this,x)}_h.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},_h.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),cn(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},_h.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},_h.prototype.focus=function(){this.Oa.focus()},_h.prototype.mx=function(){this.ownerDocument=null},ot.Object.defineProperties(_h.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}}}),_h.className="SVGSurface";function Xl(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 Xd,this.j=pm(this),this.Nj=pm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Yt++,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?ug(a,y,x,b,E,te,ne):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+te+", "+ne+")")}qe=Xl.prototype,qe.arc=function(a,y,x,b,E,te,ne,ae){var ce=2*Math.PI,_e=ce-1e-6,Pe=x*Math.cos(b),Ne=x*Math.sin(b),Ge=a+Pe,Ye=y+Ne,Qe=te?0:1;b=te?b-E:E-b,(1e-6<Math.abs(ne-Ge)||1e-6<Math.abs(ae-Ye))&&this.path.push(["L",Ge,+Ye]),0>b&&(b=b%ce+ce),b>_e?(this.path.push(["A",x,x,0,1,Qe,a-Pe,y-Ne]),this.path.push(["A",x,x,0,1,Qe,Ge,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)])},qe.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},qe.Se=function(a){this.addPath(this.path,this.rb,a||0)},qe.bezierCurveTo=function(a,y,x,b,E,te){this.path.push(["C",a,y,x,b,E,te])},qe.clearRect=function(){},qe.clip=function(){this.Yl.clipPath=!0},qe.closePath=function(){this.path.push(["z"])},qe.createLinearGradient=function(a,y,x,b){var E=new Ef("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},qe.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"+Yt++,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(Vd,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},qe.createRadialGradient=function(a,y,x,b,E,te){var ne=new Ef("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,ae,ce){b=ae/b,E=ce/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)}qe.drawImage=function(a,y,x,b,E,te,ne,ae,ce){var _e="";a instanceof HTMLCanvasElement&&(_e=a.toDataURL()),a instanceof HTMLImageElement&&(_e=a.getAttribute("src"));var Pe=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(te=y,ne=x,ae=b=Pe,ce=E=a),b=b||0,E=E||0,ae=ae||0,ce=ce||0,Jy(this,y,x,b,E,te||0,ne||0,ae,ce),te={x:0,y:0,width:Pe||b,height:a||E,href:_e},tn.$(b,ae)&&tn.$(E,ce)?_e.toLowerCase().indexOf(".svg")===-1&&_e.toLowerCase().indexOf("data:image/svg")===-1&&(te.preserveAspectRatio="xMidYMid slice"):te.preserveAspectRatio="none",(y!==0||x!==0||b!==Pe||E!==a)&&(b+=y,E+=x,te["clip-path"]="path('M "+y+","+x+" L "+b+" "+x+" L "+b+" "+E+" L "+y+" "+E+" z')"),op(this,Vd,te,this.rb),this.addElement(Vd,te)},qe.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),rv(this,this.Yl)},qe.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},qe.fillRect=function(a,y,x,b){a=[a,y,x,b],a={x:a[0],y:a[1],width:a[2],height:a[3]},op(this,"fill",a,this.rb),this.addElement("rect",a)},qe.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},op(this,"fill",a,this.rb),rv(this,a),this.svg.prepend(this.Ud("rect",a))},qe.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},op(this,"fill",y,this.rb),this.addElement("text",y,a[0])},qe.lineTo=function(a,y){this.path.push(["L",a,y])},qe.moveTo=function(a,y){this.path.push(["M",a,y])},qe.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},qe.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"])},qe.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},qe.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())},qe.setTransform=function(a,y,x,b,E,te){a===1&&y===0&&x===0&&b===1&&E===0&&te===0||ug(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]+")"}qe.scale=function(a,y){this.rb.scale(a,y)},qe.translate=function(a,y){this.rb.translate(a,y)},qe.transform=function(){},qe.yc=function(){},qe.stroke=function(){$y(this,this.Yl)},qe.jk=function(){this.clipInsteadOfFill||this.stroke()},qe.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},qe.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 op(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 Ef?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 Ef?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 Ef)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"+Yt++,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 ae=E[ne],ce=ae.color;ae={offset:ae.offset,"stop-color":ce},/^rgba\(/.test(ce)&&(ce=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(ce),ae["stop-color"]="rgb("+ce[1]+","+ce[2]+","+ce[3]+")",ae["stop-opacity"]=ce[4]),te.push(ae)}for(te.sort(function(_e,Pe){return _e.offset>Pe.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",te[E]));return a.svg.appendChild(x),"url(#"+b+")"}qe.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var te=Ii(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,op(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var ae in a)ae!=="transform"&&y.setAttributeNS(null,ae,a[ae]);else{ae=y.getElementsByTagName("path");for(var ce in a)ce!=="transform"&&ae[x].setAttributeNS(null,ce,a[ce])}else this.addElement("path",a)};function ug(a,y,x,b,E,te,ne){var ae=new Xd;ae.ha=[y,x,b,E,te,ne],y={},op(a,"g",y,ae),ae=a.addElement("g",y),a.nh.push(ae)}function pm(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}qe.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Bh(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function dc(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}qe.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},qe.fs=function(){this.Ct=!1},qe.Vc=function(){},qe.Wx=function(){},Xl.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Xl.prototype.getImageData=function(){return null},Xl.prototype.measureText=function(){return null};function gm(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()))}Xl.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Xl.className="SVGContext",ln.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new _h(this,Ot.document));var y=new _h(this,Ot.document,!0);a===void 0&&(a=new $i);var x=this;return Sf(this,function(b,E){return b=um(x,b,"SVG",y),b=b!==null?b.svg:null,typeof E=="function"?(E(b),null):b},a)},ln.prototype.makeSvg=ln.prototype.Cs,ln.prototype.av=function(a){return this.Cs(a)},ln.prototype.makeSVG=ln.prototype.av;function Au(a,y,x,b){this.ownerDocument=y=y===void 0?Ot.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Jd(y,x,b),y.H=a}Au.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},Au.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Au.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Au.prototype.focus=function(){this.Oa.focus()},Au.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},ot.Object.defineProperties(Au.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}}}),Au.className="CanvasSurface";function Jd(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&rn("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 xr,this.isTemporary=!!x}qe=Jd.prototype,qe.Wx=function(a){this.Z.imageSmoothingEnabled=a},qe.arc=function(a,y,x,b,E,te){this.Z.arc(a,y,x,b,E,te)},qe.beginPath=function(){this.Z.beginPath()},qe.Se=function(){},qe.bezierCurveTo=function(a,y,x,b,E,te){this.Z.bezierCurveTo(a,y,x,b,E,te)},qe.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},qe.clip=function(){this.Z.clip()},qe.closePath=function(){this.Z.closePath()},qe.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},qe.createPattern=function(a,y){return this.Z.createPattern(a,y)},qe.createRadialGradient=function(a,y,x,b,E,te){return this.Z.createRadialGradient(a,y,x,b,E,te)},qe.drawImage=function(a,y,x,b,E,te,ne,ae,ce){b===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,b,E,te,ne,ae,ce)},qe.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},qe.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},qe.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},qe.fillText=function(a,y,x){this.Z.fillText(a,y,x)},qe.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},qe.lineTo=function(a,y){this.Z.lineTo(a,y)},qe.measureText=function(a){return this.Z.measureText(a)},qe.moveTo=function(a,y){this.Z.moveTo(a,y)},qe.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},qe.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},qe.restore=function(){this.Z.restore()},qe.save=function(){this.yc(),this.Z.save()},Jd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},qe=Jd.prototype,qe.setTransform=function(a,y,x,b,E,te){this.El.setTransform(a,y,x,b,E,te)},qe.scale=function(a,y){this.El.scale(a,y)},qe.translate=function(a,y){this.El.translate(a,y)},qe.stroke=function(){this.Z.stroke()},qe.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,ae=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=ae,ne.m12=a,ne.m21=y,ne.m22=x}},qe.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},qe.ng=function(a,y){if(a instanceof Po&&a.type===vu){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)},qe.jk=function(){this.Hm||this.stroke()},qe.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},qe.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},qe.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},qe.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},qe.Hs=function(){},ot.Object.defineProperties(Jd.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([]);Jd.className="CanvasSurfaceContext";function hg(){this.F=this.o=this.u=this.j=0}hg.className="ColorNumbers";function Po(a,y){up||(cv(),up=!0),en(this),this._isFrozen=!1,a===void 0?(this.na=Oc,this.xk="black"):typeof a=="string"?(this.na=Oc,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===pc?(this.Qd=ga,this.Lk=Ks):this.Lk=a===vu?this.Qd=Hr:this.Qd=xs,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Po.prototype.copy=function(){var a=new Po;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},qe=Po.prototype,qe.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},qe.ka=function(){return Object.isFrozen(this)&&rn("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},qe.qb=function(a){a.classType===Po&&(this.type=a)},qe.toString=function(){var a="Brush(";if(this.type===Oc)a+=this.color;else if(a=this.type===pc?a+"Linear ":this.type===vu?a+"Radial ":this.type===hp?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+")"},qe.addColorStop=function(a,y){return this._isFrozen&&Fn(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&vi(a,"0 <= loc <= 1",Po,"addColorStop:loc"),this.we===null&&(this.we=new Dn),this.we.add(a,y),this.na===Oc&&(this.type=pc),this.xe=null,this},qe.Vz=function(a,y){if(this._isFrozen&&Fn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?cp:y,this.type===Oc)fc(this.color),this.color=ap(a,y);else if((this.type===pc||this.type===vu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)fc(x.value),this.addColorStop(x.key,ap(a,y));return this};function e1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?cp:x,fc(a),ap(y,x)}qe.Wy=function(a,y){if(this._isFrozen&&Fn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?cp:y,this.type===Oc)fc(this.color),this.color=ap(-a,y);else if((this.type===pc||this.type===vu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)fc(x.value),this.addColorStop(x.key,ap(-a,y));return this};function t1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?cp:x,fc(a),ap(-y,x)}function sv(a,y,x){fc(a),a=Xo.j;var b=Xo.u,E=Xo.o,te=Xo.F;return fc(y),x===void 0&&(x=.5),"rgba("+Math.round((Xo.j-a)*x+a)+", "+Math.round((Xo.u-b)*x+b)+", "+Math.round((Xo.o-E)*x+E)+", "+Math.round((Xo.F-te)*x+te)+")"}qe.Gx=function(){if(this.type===Oc)return sp(this.color);if((this.type===pc||this.type===vu)&&this.colorStops!==null){var a=this.colorStops;if(this.type===vu)return sp(a.first().value);if(a.get(.5)!==null)return sp(a.get(.5));if(a.count===2)return a=a.Fa(),sp(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,ae=Math.abs(.5-y.key);E>te&&ae<E?(x=ne,E=ae):te>=E&&ae<te&&(b=ne,te=ae)}return x>b&&(te=x,x=b,b=te,te=E),E=b-x,sp(sv(a.get(x),a.get(b),1-te/E))}return!1};function sp(a){return a?a instanceof Po?a.Gx():(fc(a),128>(299*Xo.j+587*Xo.u+114*Xo.o)/1e3):!1}function ap(a,y){switch(y){case cp:y=100*lv(Xo.j);var x=100*lv(Xo.u),b=100*lv(Xo.o);return dl.j=.4124564*y+.3575761*x+.1804375*b,dl.u=.2126729*y+.7151522*x+.072175*b,dl.o=.0193339*y+.119192*x+.9503041*b,dl.F=Xo.F,y=hv(dl.j/lp[0]),x=hv(dl.u/lp[1]),b=hv(dl.o/lp[2]),jh.j=116*x-16,jh.u=500*(y-x),jh.o=200*(x-b),jh.F=dl.F,jh.j=Math.min(100,Math.max(0,jh.j+100*a)),a=(jh.j+16)/116,y=a-jh.o/200,dl.j=lp[0]*n1(jh.u/500+a),dl.u=lp[1]*(jh.j>mm*dv?Math.pow(a,3):jh.j/mm),dl.o=lp[2]*n1(y),dl.F=jh.F,a=-.969266*dl.j+1.8760108*dl.u+.041556*dl.o,y=.0556434*dl.j+-.2040259*dl.u+1.0572252*dl.o,Xo.j=255*uv((3.2404542*dl.j+-1.5371385*dl.u+-.4985314*dl.o)/100),Xo.u=255*uv(a/100),Xo.o=255*uv(y/100),Xo.F=dl.F,Xo.j=Math.round(Xo.j),255<Xo.j?Xo.j=255:0>Xo.j&&(Xo.j=0),Xo.u=Math.round(Xo.u),255<Xo.u?Xo.u=255:0>Xo.u&&(Xo.u=0),Xo.o=Math.round(Xo.o),255<Xo.o?Xo.o=255:0>Xo.o&&(Xo.o=0),"rgba("+Xo.j+", "+Xo.u+", "+Xo.o+", "+Xo.F+")";case i1:return av(),au.o=Math.min(100,Math.max(0,au.o+100*a)),"hsla("+au.j+", "+au.u+"%, "+au.o+"%, "+au.F+")";default:rn("Unknown color space: "+y)}}function fc(a){up||(cv(),up=!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,Xo.j=a[0],Xo.u=a[1],Xo.o=a[2],Xo.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Xo.j=0,Xo.u=0,Xo.o=0,Xo.F=1)}}function av(){var a=Xo.j/255,y=Xo.u/255,x=Xo.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))}au.j=Math.round(ne),au.u=Math.round(100*a),au.o=Math.round(100*E),au.F=Xo.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):(mm*a+16)/116}function n1(a){var y=a*a*a;return y>dv?y:(116*a-16)/mm}function Lf(a,y){typeof a!="string"&&(a instanceof Po||rn("Value for "+y+" must be a color string or a Brush, not "+a))}function cv(){fv=Ps?new Au(null,void 0,{willReadFrequently:!0}).context:null}ot.Object.defineProperties(Po.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&Fn(this,a),this.na=a,this.start.Mc()&&(a===pc?this.start=ga:a===vu&&(this.start=Hr)),this.end.Mc()&&(a===pc?this.end=Ks:a===vu&&(this.end=Hr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&Fn(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&Fn(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&Fn(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&Fn(this,a),0>a&&vi(a,">= zero",Po,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Fn(this,a),0>a&&vi(a,">= zero",Po,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&Fn(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&Fn(this,a),this.cr=a,this.xe=null}}}),Po.prototype.isDark=Po.prototype.Gx,Po.prototype.darkenBy=Po.prototype.Wy,Po.prototype.lightenBy=Po.prototype.Vz,Po.prototype.addColorStop=Po.prototype.addColorStop;var dv=216/24389,mm=24389/27,lp=[95.047,100,108.883],fv=null,Xo=new hg,au=new hg,dl=new hg,jh=new hg,up=!1;Po.className="Brush";var Oc;Po.Solid=Oc=new dn(Po,"Solid",0);var pc;Po.Linear=pc=new dn(Po,"Linear",1);var vu;Po.Radial=vu=new dn(Po,"Radial",2);var hp;Po.Pattern=hp=new dn(Po,"Pattern",4);var cp;Po.Lab=cp=new dn(Po,"Lab",5);var i1;Po.HSL=i1=new dn(Po,"HSL",6),Po.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},Po.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;up||(cv(),up=!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)},Po.lighten=function(a){return e1(a)},Po.lightenBy=e1,Po.darken=function(a){return t1(a)},Po.darkenBy=t1,Po.mix=sv,Po.isDark=sp;function ta(){this.xa="Base"}ta.prototype.measure=function(){},ta.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},ta.prototype.arrange=function(){},ta.prototype.Ly=function(a,y,x,b,E,te){a.arrange(y,x,b,E,te)},ta.prototype.iA=function(a){a.Uj()},ta.prototype.gc=function(){},ot.Object.defineProperties(ta.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Rn}}}),ta.prototype.remeasureObject=ta.prototype.iA,ta.prototype.arrangeElement=ta.prototype.Ly,ta.prototype.measureElement=ta.prototype.Yz,ta.className="PanelLayout";function vm(){this.xa="Base"}Ve(vm,ta),vm.prototype.measure=function(a,y,x,b,E,te,ne){var ae=b.length;a=gc(a);for(var ce=0;ce<ae;ce++){var _e=b[ce];if(_e.visible||_e===a){var Pe=_e.margin,Ne=Pe.right+Pe.left;Pe=Pe.top+Pe.bottom,_e.measure(y,x,te,ne);var Ge=_e.measuredBounds;Ne=Math.max(Ge.width+Ne,0),Pe=Math.max(Ge.height+Pe,0),Ge=_e.position.x;var Ye=_e.position.y;isFinite(Ge)||(Ge=0),isFinite(Ye)||(Ye=0),_e instanceof mr&&_e.isGeometryPositioned&&(_e=_e.strokeWidth/2,Ge-=_e,Ye-=_e),fo(E,Ge,Ye,Ne,Pe)}}},vm.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,ae=te.margin,ce=te.position.x,_e=te.position.y;if(ce=isNaN(ce)?-a:ce-a,_e=isNaN(_e)?-x:_e-x,te instanceof mr&&te.isGeometryPositioned){var Pe=te.strokeWidth/2;ce-=Pe,_e-=Pe}te.visible&&te.arrange(ce+ae.left,_e+ae.top,ne.width,ne.height)}};function ym(){this.xa="Base"}Ve(ym,ta),ym.prototype.measure=function(a,y,x,b,E,te,ne){var ae=b.length;y=Ti(),te=gc(a);for(var ce=0;ce<ae;ce++){var _e=b[ce];if(_e.visible||_e===te){var Pe=Cl(_e,!1);if(Pe!==Ln&&Pe!==Li)y.push(_e);else{_e.measure(1/0,x,0,ne),Pe=_e.margin,_e=_e.measuredBounds;var Ne=Math.max(_e.height+Pe.top+Pe.bottom,0);E.width+=Math.max(_e.width+Pe.right+Pe.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++)ce=y[a],(ce.visible||ce===te)&&(Pe=ce.margin,ae=Pe.right+Pe.left,Pe=Pe.top+Pe.bottom,ce.measure(1/0,x,0,ne),ce=ce.measuredBounds,Pe=Math.max(ce.height+Pe,0),E.width+=Math.max(ce.width+ae,0),E.height=Math.max(E.height,Pe));bi(y)},ym.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,te=E.top,ne=a.isOpposite,ae=ne?x.width:E.left,ce=0;ce<b;ce++){var _e=te,Pe=y[ce];if(Pe.visible){var Ne=Pe.measuredBounds,Ge=Pe.margin,Ye=Ge.top+Ge.bottom,Qe=te+E.bottom,at=Ne.height,Ct=Cl(Pe,!1);(isNaN(Pe.desiredSize.height)&&Ct===Nn||Ct===Bi)&&(at=Math.max(x.height-Ye-Qe,0)),Ye=at+Ye+Qe,Qe=Pe.alignment,Qe.Xb()&&(Qe=a.defaultAlignment),Qe.sb()||(Qe=Hr),ne&&(ae-=Ne.width+Ge.left+Ge.right),Pe.arrange(ae+Qe.offsetX+Ge.left,_e+Qe.offsetY+Ge.top+(x.height*Qe.y-Ye*Qe.y),Ne.width,at),ne||(ae+=Ne.width+Ge.left+Ge.right)}}};function Sm(){this.xa="Base"}Ve(Sm,ta),Sm.prototype.measure=function(a,y,x,b,E,te){var ne=b.length;x=Ti();for(var ae=gc(a),ce=0;ce<ne;ce++){var _e=b[ce];if(_e.visible||_e===ae){var Pe=Cl(_e,!1);if(Pe!==Ln&&Pe!==Bi)x.push(_e);else{var Ne=_e.margin;Pe=Ne.right+Ne.left,Ne=Ne.top+Ne.bottom,_e.measure(y,1/0,te,0),_e=_e.measuredBounds,ss(E,Math.max(E.width,Math.max(_e.width+Pe,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++)ce=x[a],(ce.visible||ce===ae)&&(_e=ce.margin,ne=_e.right+_e.left,_e=_e.top+_e.bottom,ce.measure(y,1/0,te,0),ce=ce.measuredBounds,_e=Math.max(ce.height+_e,0),E.width=Math.max(E.width,Math.max(ce.width+ne,0)),E.height+=_e);bi(x)}},Sm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,te=E.left,ne=a.isOpposite,ae=ne?x.height:E.top,ce=0;ce<b;ce++){var _e=te,Pe=y[ce];if(Pe.visible){var Ne=Pe.measuredBounds,Ge=Pe.margin,Ye=Ge.left+Ge.right,Qe=te+E.right,at=Ne.width,Ct=Cl(Pe,!1);(isNaN(Pe.desiredSize.width)&&Ct===Nn||Ct===Li)&&(at=Math.max(x.width-Ye-Qe,0)),Ye=at+Ye+Qe,Qe=Pe.alignment,Qe.Xb()&&(Qe=a.defaultAlignment),Qe.sb()||(Qe=Hr),ne&&(ae-=Ne.height+Ge.bottom+Ge.top),Pe.arrange(_e+Qe.offsetX+Ge.left+(x.width*Qe.x-Ye*Qe.x),ae+Qe.offsetY+Ge.top,at,Ne.height),ne||(ae+=Ne.height+Ge.bottom+Ge.top)}}};function xm(){this.xa="Base"}Ve(xm,ta),xm.prototype.measure=function(a,y,x,b,E,te,ne){var ae=b.length,ce=a.Pb(),_e=ce.margin,Pe=_e.right+_e.left,Ne=_e.top+_e.bottom;ce.measure(y,x,te,ne);var Ge=ce.measuredBounds;te=Ge.width,ne=Ge.height;var Ye=Math.max(te+Pe,0),Qe=Math.max(ne+Ne,0),at=a.isClipping,Ct=pn.allocAt(-_e.left,-_e.top,Ye,Qe),xt=pn.allocAt(0,0,te,ne);pv(ce,xt,!0),te=xt.width,ne=xt.height;for(var Tt=!0,Nt=gc(a),It=0;It<ae;It++){var Zt=b[It];Ge=y;var un=x;if(Zt!==ce&&(Zt.visible||Zt===Nt)){_e=Zt.margin;var $n=_e.left,fi=_e.top;switch(Ye=_e.right+_e.left,Qe=_e.top+_e.bottom,_e=Cl(Zt,!1),_e){case Nn:Ge=te,un=ne,fi=$n=Qe=Ye=0;break;case Li:Ge=te,$n=Ye=0;break;case Bi:un=ne,fi=Qe=0}Zt.measure(Ge,un,0,0),Ge=Zt.measuredBounds,Ye=Math.max(Ge.width+Ye,0),Qe=Math.max(Ge.height+Qe,0),_e=Zt.alignment,_e.Xb()&&(_e=a.defaultAlignment),_e.sb()||(_e=Hr);var ai=Zt.alignmentFocus;if(ai.Xb()&&(ai=Hr),un=null,Zt instanceof Rn&&Zt.$e!==""&&(un=Zt.fb(Zt.$e),un===Zt&&(un=null)),$n=xt.x-$n,fi=xt.y-fi,un!==null){for(Zt.arrange(0,0,Ge.width,Ge.height),Ge=un.actualBounds,Ge=vt.allocAt(Ge.x+(ai.x*Ge.width-ai.offsetX),Ge.y+(ai.y*Ge.height-ai.offsetY)),un=un.panel;un!==Zt;)un.transform.Ga(Ge),un=un.panel;$n+=_e.x*te+_e.offsetX-Ge.x,fi+=_e.y*ne+_e.offsetY-Ge.y,vt.free(Ge)}else $n+=_e.x*te+_e.offsetX-(ai.x*Ge.width+ai.offsetX),fi+=_e.y*ne+_e.offsetY-(ai.y*Ge.height+ai.offsetY);Tt?(Tt=!1,E.h($n,fi,Ye,Qe)):fo(E,$n,fi,Ye,Qe)}}switch(Tt?E.assign(Ct):at?E.Uu(xt.x,xt.y,xt.width,xt.height):fo(E,Ct.x,Ct.y,Ct.width,Ct.height),pn.free(Ct),pn.free(xt),_e=ce.stretch,_e===cr&&(_e=Cl(ce,!1)),_e){case Ln:return;case Nn:if(!isFinite(y)&&!isFinite(x))return;break;case Li:if(!isFinite(y))return;break;case Bi:if(!isFinite(x))return}for(Ge=ce.measuredBounds,te=Ge.width,ne=Ge.height,Ye=Math.max(te+Pe,0),Qe=Math.max(ne+Ne,0),_e=ce.margin,xt=pn.allocAt(-_e.left,-_e.top,Ye,Qe),pv(ce,xt,!0),te=xt.width,ne=xt.height,y=0;y<ae;y++)x=b[y],x===ce||!x.visible&&x!==Nt||(_e=x.margin,Ye=_e.right+_e.left,Qe=_e.top+_e.bottom,Ge=x.measuredBounds,Ye=Math.max(Ge.width+Ye,0),Qe=Math.max(Ge.height+Qe,0),Pe=x.alignment,Pe.Xb()&&(Pe=a.defaultAlignment),Pe.sb()||(Pe=Hr),x=x.alignmentFocus,x.Xb()&&(x=Hr),Tt?(Tt=!1,E.h(Pe.x*te+Pe.offsetX-(x.x*Ge.width+x.offsetX)-_e.left,Pe.y*ne+Pe.offsetY-(x.y*Ge.height+x.offsetY)-_e.top,Ye,Qe)):fo(E,Pe.x*te+Pe.offsetX-(x.x*Ge.width+x.offsetX)-_e.left,Pe.y*ne+Pe.offsetY-(x.y*Ge.height+x.offsetY)-_e.top,Ye,Qe));Tt?E.assign(Ct):at?E.Uu(xt.x,xt.y,xt.width,xt.height):fo(E,Ct.x,Ct.y,Ct.width,Ct.height),pn.free(xt)},xm.prototype.arrange=function(a,y,x){var b=y.length,E=a.Pb(),te=E.measuredBounds,ne=te.width,ae=te.height,ce=a.padding;te=ce.left,ce=ce.top;var _e=te-x.x,Pe=ce-x.y;for(E.arrange(_e,Pe,ne,ae),ne=pn.allocAt(0,0,ne,ae),pv(E,ne,!1),ae=0;ae<b;ae++){var Ne=y[ae];if(Ne!==E){_e=Ne.measuredBounds;var Ge=_e.width,Ye=_e.height;Pe=Ne.alignment,Pe.Xb()&&(Pe=a.defaultAlignment),Pe.sb()||(Pe=Hr);var Qe=Ne.alignmentFocus;if(Qe.Xb()&&(Qe=Hr),_e=null,Ne instanceof Rn&&Ne.$e!==""&&(_e=Ne.fb(Ne.$e),_e===Ne&&(_e=null)),_e!==null){var at=_e.actualBounds;for(Qe=vt.allocAt(at.x+(Qe.x*at.width-Qe.offsetX),at.y+(Qe.y*at.height-Qe.offsetY)),_e=_e.panel;_e!==Ne;)_e.transform.Ga(Qe),_e=_e.panel;_e=Pe.x*ne.width+Pe.offsetX-Qe.x,Pe=Pe.y*ne.height+Pe.offsetY-Qe.y,vt.free(Qe)}else _e=Pe.x*ne.width+Pe.offsetX-(Qe.x*Ge+Qe.offsetX),Pe=Pe.y*ne.height+Pe.offsetY-(Qe.y*Ye+Qe.offsetY);_e+=ne.x-x.x,Pe+=ne.y-x.y,Ne.visible&&Ne.arrange(te+_e,ce+Pe,Ge,Ye)}}pn.free(ne)};function pv(a,y,x){var b=null;if(a instanceof Rn&&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 wm(){this.xa="Base"}Ve(wm,ta),wm.prototype.measure=function(a,y,x,b,E,te,ne){var ae=b.length,ce=a.Pb(),_e=ce.margin,Pe=y,Ne=x,Ge=_e.right+_e.left,Ye=_e.top+_e.bottom;ce.measure(y,x,te,ne),_e=ce.measuredBounds;var Qe=0,at=null;ce instanceof mr&&(at=ce,Qe=at.strokeWidth*at.scale);var Ct=Math.max(_e.width+Ge,0);_e=Math.max(_e.height+Ye,0);var xt=yv(ce),Tt=xt.x*Ct+xt.offsetX;xt=xt.y*_e+xt.offsetY;var Nt=Sv(ce),It=Nt.x*Ct+Nt.offsetX;for(Nt=Nt.y*_e+Nt.offsetY,isFinite(y)&&(Pe=Math.max(Math.abs(Tt-It)-Qe,0)),isFinite(x)&&(Ne=Math.max(Math.abs(xt-Nt)-Qe,0)),Qe=Sn.alloc(),Qe.h(0,0),a=gc(a),Nt=0;Nt<ae;Nt++)xt=b[Nt],xt===ce||!xt.visible&&xt!==a||(_e=xt.margin,Ct=_e.right+_e.left,Tt=_e.top+_e.bottom,xt.measure(Pe,Ne,0,0),_e=xt.measuredBounds,Ct=Math.max(_e.width+Ct,0),_e=Math.max(_e.height+Tt,0),Qe.h(Math.max(Ct,Qe.width),Math.max(_e,Qe.height)));if(ae===1)E.width=Ct,E.height=_e,Sn.free(Qe);else{switch(xt=yv(ce),Nt=Sv(ce),ae=b=0,Nt.x!==xt.x&&Nt.y!==xt.y&&(b=Qe.width/Math.abs(Nt.x-xt.x),ae=Qe.height/Math.abs(Nt.y-xt.y)),Sn.free(Qe),Qe=0,at!==null&&(Qe=at.strokeWidth*at.scale,Cv(at)===Si&&(b=ae=Math.max(b,ae))),b+=Math.abs(xt.offsetX)+Math.abs(Nt.offsetX)+Qe,ae+=Math.abs(xt.offsetY)+Math.abs(Nt.offsetY)+Qe,at=ce.stretch,at===cr&&(at=Cl(ce,!1)),at){case Ln:ne=te=0;break;case Nn:isFinite(y)&&(b=y),isFinite(x)&&(ae=x);break;case Li:isFinite(y)&&(b=y),ne=0;break;case Bi:te=0,isFinite(x)&&(ae=x)}ce.Uj(),ce.measure(b,ae,te,ne),E.width=ce.measuredBounds.width+Ge,E.height=ce.measuredBounds.height+Ye}},wm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,te=pn.alloc();te.h(0,0,1,1);var ne=b.margin,ae=ne.left;ne=ne.top;var ce=a.padding,_e=ce.left;ce=ce.top,b.arrange(_e+ae,ce+ne,E.width,E.height);var Pe=yv(b),Ne=Sv(b),Ge=Pe.y*E.height+Pe.offsetY,Ye=Ne.x*E.width+Ne.offsetX;for(Ne=Ne.y*E.height+Ne.offsetY,te.x=Pe.x*E.width+Pe.offsetX,te.y=Ge,fo(te,Ye,Ne,0,0),te.x+=ae+_e,te.y+=ne+ce,E=0;E<x;E++)ae=y[E],ae!==b&&(_e=ae.measuredBounds,ne=ae.margin,ce=Math.max(_e.width+ne.right+ne.left,0),Pe=Math.max(_e.height+ne.top+ne.bottom,0),Ge=ae.alignment,Ge.Xb()&&(Ge=a.defaultAlignment),Ge.sb()||(Ge=Hr),ce=te.width*Ge.x+Ge.offsetX-ce*Ge.x+ne.left+te.x,ne=te.height*Ge.y+Ge.offsetY-Pe*Ge.y+ne.top+te.y,ae.visible&&(Co(te.x,te.y,te.width,te.height,ce,ne,_e.width,_e.height)?ae.arrange(ce,ne,_e.width,_e.height):ae.arrange(ce,ne,_e.width,_e.height,new pn(te.x,te.y,te.width,te.height))));pn.free(te)};function _m(){this.xa="Base",this.name="Table"}Ve(_m,ta),_m.prototype.measure=function(a,y,x,b,E){for(var te=b.length,ne=Ti(),ae=Ti(),ce=0;ce<te;ce++){var _e=b[ce],Pe=_e instanceof Rn?_e:null;if(Pe!==null&&Rc(Pe)&&_e.visible){ae.push(Pe);for(var Ne=Pe.O.s,Ge=Ne.length,Ye=0;Ye<Ge;Ye++){var Qe=Ne[Ye];Pe.type===Rn.TableRow?Qe.row=_e.row:Pe.type===Rn.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 at=[],Ct=0;Ct<te;Ct++){var xt=ne[Ct];xt.visible&&(Ys(xt,!0),Fh(xt,!0),at[xt.row]||(at[xt.row]=[]),at[xt.row][xt.column]||(at[xt.row][xt.column]=[]),at[xt.row][xt.column].push(xt))}bi(ne);var Tt=Ti(),Nt=Ti(),It=Ti(),Zt={count:0},un={count:0},$n=y,fi=x,ai=a.rowDefs,Un=a.colDefs,Pn=null;te=ai.length;for(var ar=0;ar<te;ar++)Pn=ai[ar],Pn!==void 0&&(Pn.actual=0);te=Un.length;for(var Ji=0;Ji<te;Ji++)Pn=Un[Ji],Pn!==void 0&&(Pn.actual=0);for(var lo=at.length,Ho=0,fa=0;fa<lo;fa++)at[fa]&&(Ho=Math.max(Ho,at[fa].length));var Sa=Math.min(a.topIndex,lo-1),rl=Math.min(a.leftIndex,Ho-1),pa=0;lo=at.length;for(var Kc=gc(a),js=0;js<lo;js++)if(at[js]){Ho=at[js].length;var lh=a.Fb(js);lh.actual=0;for(var ol=lh.oc=0;ol<Ho;ol++)if(at[js][ol]){var Vc=a.Eb(ol);Tt[ol]===void 0&&(Vc.actual=0,Vc.oc=0,Tt[ol]=!0);for(var hu=at[js][ol],Ru=hu.length,Ql=0;Ql<Ru;Ql++){var Bl=hu[Ql];if(Bl.visible||Bl===Kc){var Cd=1<Bl.rowSpan||1<Bl.columnSpan;Cd&&(js<Sa||ol<rl||Nt.push(Bl));var uh=Bl.margin,Op=uh.right+uh.left,$l=uh.top+uh.bottom,sl=ih(Bl,lh,Vc,!1),qg=Bl.desiredSize,jf=!isNaN(qg.height),Ch=!isNaN(qg.width)&&jf;if(Cd||sl===Ln||Ch||js<Sa||ol<rl||(Zt[ol]!==void 0||sl!==Nn&&sl!==Li||(Zt[ol]=-1,Zt.count++),un[js]!==void 0||sl!==Nn&&sl!==Bi||(un[js]=-1,un.count++),It.push(Bl)),Bl.measure(1/0,1/0,0,0),!(js<Sa||ol<rl)){var jl=Bl.measuredBounds,sf=Math.max(jl.width+Op,0),eu=Math.max(jl.height+$l,0);if(Bl.rowSpan===1&&(sl===Ln||sl===Li)){Pn=a.Fb(js);var Ed=Pn.Wc();pa=Math.max(eu-Pn.actual,0),pa+Ed>fi&&(pa=Math.max(fi-Ed,0));var K0=Pn.oa===0;Pn.oc=Pn.oc+pa,Pn.actual=Pn.oa+pa,fi=Math.max(fi-(pa+(K0?Ed:0)),0)}if(Bl.columnSpan===1&&(sl===Ln||sl===Bi)){Pn=a.Eb(ol);var Qg=Pn.Wc();pa=Math.max(sf-Pn.actual,0),pa+Qg>$n&&(pa=Math.max($n-Qg,0));var Uy=Pn.oa===0;Pn.oc=Pn.oc+pa,Pn.actual=Pn.oa+pa,$n=Math.max($n-(pa+(Uy?Qg:0)),0)}Cd&&Bl.Uj()}}}}}bi(Tt);var Yh=0,yc=0;te=a.columnCount;for(var zf=0;zf<te;zf++){var Ld=Un[zf];Ld!==void 0&&(Yh+=isNaN(Ld.Hc)?Ld.oc:Ld.Hc,Ld.oc!==0&&(Yh+=Ld.Wc()))}te=a.rowCount;for(var Rp=0;Rp<te;Rp++){var Md=ai[Rp];Md!==void 0&&(yc+=isNaN(Md.Hc)?Md.oc:Md.Hc,Md.oc!==0&&(yc+=Md.Wc()))}$n=Math.max(y-Yh,0);var Xh=fi=Math.max(x-yc,0),Zc=$n;te=It.length;for(var zl=0;zl<te;zl++){var Eh=It[zl],V0=a.Fb(Eh.row),Sc=a.Eb(Eh.column),Ip=Eh.measuredBounds,hh=Eh.margin,af=hh.right+hh.left,Lh=hh.top+hh.bottom;Zt[Eh.column]=Sc.oc===0&&Zt[Eh.column]!==void 0?Math.max(Ip.width+af,Zt[Eh.column]):null,un[Eh.row]=V0.oc===0&&un[Eh.row]!==void 0?Math.max(Ip.height+Lh,un[Eh.row]):null}var Uf=0,Fp=0,qu;for(qu in un)qu!=="count"&&(Uf+=un[qu]);for(qu in Zt)qu!=="count"&&(Fp+=Zt[qu]);for(var La=Sn.alloc(),$g=0;$g<te;$g++){var Sl=It[$g];if(Sl.visible||Sl===Kc){var zs=a.Fb(Sl.row),xl=a.Eb(Sl.column),xc=0;isFinite(xl.width)?xc=xl.width:(isFinite($n)&&Zt[Sl.column]!==null?Fp===0?xc=xl.actual+$n:xc=Zt[Sl.column]/Fp*Zc:Zt[Sl.column]!==null?xc=$n:xc=xl.actual||$n,xc=Math.max(0,xc-xl.Wc()));var Yc=0;switch(isFinite(zs.height)?Yc=zs.height:(isFinite(fi)&&un[Sl.row]!==null?Uf===0?Yc=zs.actual+fi:Yc=un[Sl.row]/Uf*Xh:un[Sl.row]!==null?Yc=fi:Yc=zs.actual||fi,Yc=Math.max(0,Yc-zs.Wc())),La.h(Math.max(xl.minimum,Math.min(xc,xl.maximum)),Math.max(zs.minimum,Math.min(Yc,zs.maximum))),sl=ih(Sl,zs,xl,!1),sl){case Li:La.height=Math.max(La.height,zs.actual+fi);break;case Bi:La.width=Math.max(La.width,xl.actual+$n)}var lf=Sl.margin,Hy=lf.right+lf.left,Z0=lf.top+lf.bottom;Sl.Uj(),Sl.measure(La.width,La.height,xl.minimum,zs.minimum);var Bp=Sl.measuredBounds,uf=Math.max(Bp.width+Hy,0),Hf=Math.max(Bp.height+Z0,0);isFinite($n)&&(uf=Math.min(uf,La.width)),isFinite(fi)&&(Hf=Math.min(Hf,La.height));var Ul=0;Ul=zs.actual,zs.actual=Math.max(zs.actual,Hf),zs.oc=Math.max(zs.oc,Hf),pa=zs.actual-Ul,fi=Math.max(fi-pa,0),un[Sl.row]===null&&(Xh=Math.max(Xh-pa,0)),Ul=xl.actual,xl.actual=Math.max(xl.actual,uf),xl.oc=Math.max(xl.oc,uf),pa=xl.actual-Ul,$n=Math.max($n-pa,0),Zt[Sl.column]===null&&(Zc=Math.max(Zc-pa,0))}}bi(It);var wc=Sn.alloc(),ch=Ti(),_u=Ti();if(te=Nt.length,te!==0){for(var kd=0;kd<lo;kd++)if(at[kd]){Ho=at[kd].length;var jp=a.Fb(kd);ch[kd]=jp.actual;for(var Td=0;Td<Ho;Td++)if(at[kd][Td]){var Y0=a.Eb(Td);_u[Td]=Y0.actual}}}for(var zp=0;zp<te;zp++){var ks=Nt[zp];if(ks.visible||ks===Kc){var Qu=a.Fb(ks.row),Iu=a.Eb(ks.column);switch(La.h(Math.max(Iu.minimum,Math.min(y,Iu.maximum)),Math.max(Qu.minimum,Math.min(x,Qu.maximum))),sl=ih(ks,Qu,Iu,!1),sl){case Nn:_u[Iu.index]!==0&&(La.width=Math.min(La.width,_u[Iu.index])),ch[Qu.index]!==0&&(La.height=Math.min(La.height,ch[Qu.index]));break;case Li:_u[Iu.index]!==0&&(La.width=Math.min(La.width,_u[Iu.index]));break;case Bi:ch[Qu.index]!==0&&(La.height=Math.min(La.height,ch[Qu.index]))}isFinite(Iu.width)&&(La.width=Iu.width),isFinite(Qu.height)&&(La.height=Qu.height),wc.h(0,0);for(var X0=Iu.minimum,tu=Qu.minimum,Xc=1;Xc<ks.rowSpan&&!(ks.row+Xc>=a.rowCount);Xc++)Pn=a.Fb(ks.row+Xc),pa=0,pa=sl===Nn||sl===Bi?Math.max(Pn.minimum,ch[ks.row+Xc]===0?Pn.maximum:Math.min(ch[ks.row+Xc],Pn.maximum)):Math.max(Pn.minimum,isNaN(Pn.Hc)?Pn.maximum:Math.min(Pn.Hc,Pn.maximum)),wc.height+=pa,tu+=Pn.minimum;for(var Fu=1;Fu<ks.columnSpan&&!(ks.column+Fu>=a.columnCount);Fu++)Pn=a.Eb(ks.column+Fu),pa=0,pa=sl===Nn||sl===Li?Math.max(Pn.minimum,_u[ks.column+Fu]===0?Pn.maximum:Math.min(_u[ks.column+Fu],Pn.maximum)):Math.max(Pn.minimum,isNaN(Pn.Hc)?Pn.maximum:Math.min(Pn.Hc,Pn.maximum)),wc.width+=pa,X0+=Pn.minimum;La.width+=wc.width,La.height+=wc.height;var Up=ks.margin,Ad=Up.right+Up.left,em=Up.top+Up.bottom;ks.measure(La.width,La.height,X0,tu);for(var Hp=ks.measuredBounds,Mh=Math.max(Hp.width+Ad,0),hf=Math.max(Hp.height+em,0),Nd=0,Gp=0;Gp<ks.rowSpan&&!(ks.row+Gp>=a.rowCount);Gp++)Pn=a.Fb(ks.row+Gp),Nd+=Pn.total||0;if(Nd<hf){var Jc=hf-Nd,Jh=hf-Nd;if(ks.spanAllocation!==null)for(var qc=ks.spanAllocation,_c=0;_c<ks.rowSpan&&!(0>=Jc)&&!(ks.row+_c>=a.rowCount);_c++){Pn=a.Fb(ks.row+_c);var Qc=Pn.oa||0,cf=qc(ks,Pn,Jh);Pn.actual=Math.min(Pn.maximum,Qc+cf),Pn.oa!==Qc&&(Jc-=Pn.oa-Qc)}for(;0<Jc;){var dh=Pn.oa||0;if(isNaN(Pn.height)&&Pn.maximum>dh&&(Pn.actual=Math.min(Pn.maximum,dh+Jc),Pn.oa!==dh&&(Jc-=Pn.oa-dh)),Pn.index===0)break;Pn=a.Fb(Pn.index-1)}}for(var Gf=0,$c=0;$c<ks.columnSpan&&!(ks.column+$c>=a.columnCount);$c++)Pn=a.Eb(ks.column+$c),Gf+=Pn.total||0;if(Gf<Mh){var Wf=Mh-Gf,Gy=Mh-Gf;if(ks.spanAllocation!==null)for(var bc=ks.spanAllocation,df=0;df<ks.columnSpan&&!(0>=Wf)&&!(ks.column+df>=a.columnCount);df++){Pn=a.Eb(ks.column+df);var tm=Pn.oa||0,Wy=bc(ks,Pn,Gy);Pn.actual=Math.min(Pn.maximum,tm+Wy),Pn.oa!==tm&&(Wf-=Pn.oa-tm)}for(;0<Wf;){var J0=Pn.oa||0;if(isNaN(Pn.width)&&Pn.maximum>J0&&(Pn.actual=Math.min(Pn.maximum,J0+Wf),Pn.oa!==J0&&(Wf-=Pn.oa-J0)),Pn.index===0)break;Pn=a.Eb(Pn.index-1)}}}}bi(Nt),Sn.free(wc),Sn.free(La),ch!==void 0&&bi(ch),_u!==void 0&&bi(_u);var Kf=0,Vf=0,q0=a.desiredSize,gx=a.maxSize;sl=Cl(a,!0);var nm=yc=Yh=0,im=0;te=a.columnCount;for(var Q0=0;Q0<te;Q0++)Un[Q0]!==void 0&&(Pn=a.Eb(Q0),isFinite(Pn.width)?(nm+=Pn.width,nm+=Pn.Wc()):Nm(Pn)===pg?(nm+=Pn.oa,nm+=Pn.Wc()):Pn.oa!==0&&(Yh+=Pn.oa,Yh+=Pn.Wc()));isFinite(q0.width)?Kf=Math.min(q0.width,gx.width):Kf=sl!==Ln&&isFinite(y)?y:Yh,Kf=Math.max(Kf,a.minSize.width),Kf=Math.max(Kf-nm,0);for(var Qx=Yh===0?1:Math.max(Kf/Yh,1),$0=0;$0<te;$0++)Un[$0]!==void 0&&(Pn=a.Eb($0),isFinite(Pn.width)||Nm(Pn)===pg||(Pn.actual=Pn.oa*Qx),Pn.position=E.width,Pn.oa!==0&&(E.width+=Pn.oa,E.width+=Pn.Wc()));te=a.rowCount;for(var ev=0;ev<te;ev++)ai[ev]!==void 0&&(Pn=a.Fb(ev),isFinite(Pn.height)?(im+=Pn.height,im+=Pn.Wc()):Nm(Pn)===pg?(im+=Pn.oa,im+=Pn.Wc()):Pn.oa!==0&&(yc+=Pn.oa,yc+=Pn.Wc()));isFinite(q0.height)?Vf=Math.min(q0.height,gx.height):Vf=sl!==Ln&&isFinite(x)?x:yc,Vf=Math.max(Vf,a.minSize.height),Vf=Math.max(Vf-im,0);for(var $x=yc===0?1:Math.max(Vf/yc,1),tv=0;tv<te;tv++)ai[tv]!==void 0&&(Pn=a.Fb(tv),isFinite(Pn.height)||Nm(Pn)===pg||(Pn.actual=Pn.oa*$x),Pn.position=E.height,Pn.oa!==0&&(E.height+=Pn.oa,E.height+=Pn.Wc()));te=ae.length;for(var Ky=0;Ky<te;Ky++){var rm=ae[Ky],Vy=0,Zy=0;rm.type===Rn.TableRow?(Vy=E.width,Pn=a.Fb(rm.row),Zy=Pn.actual):(Pn=a.Eb(rm.column),Vy=Pn.actual,Zy=E.height),rm.measuredBounds.h(0,0,Vy,Zy),Ys(rm,!1)}bi(ae),a.inRowsCols=at},_m.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 ae,ce,_e=ne.length,Pe=0,Ne=0;Ne<_e;Ne++)ne[Ne]&&(Pe=Math.max(Pe,ne[Ne].length));ce=a.rowDefs,ae=a.colDefs;var Ge=Ne=0,Ye=Math.min(a.topIndex,_e-1);if(0<ce.length){for(;Ye!==_e&&(ce[Ye]===void 0||ce[Ye].oa===0);)Ye++;Ye=Math.max(Math.min(Ye,_e-1),0),Ne=-ce[Ye].position}var Qe=Math.min(a.leftIndex,Pe-1);if(0<ae.length){for(;Qe!==Pe&&(ae[Qe]===void 0||ae[Qe].oa===0);)Qe++;Qe=Math.max(Math.min(Qe,Pe-1),0),Ge=-ae[Qe].position}for(var at=0,Ct=0;at!==_e&&ce[at]===void 0;)at++;for(;Ct!==_e&&ae[Ct]===void 0;)Ct++;Pe=a.part,a.Fb(at),a.Eb(Ct);for(var xt=0;xt<y.length;xt++){var Tt=y[xt];if(Tt instanceof Rn&&Tt.visible&&Rc(Tt)){if(Tt.type===Rn.TableRow){ae=a.Fb(Tt.row);var Nt=a.Eb(Ct)}else ae=a.Fb(at),Nt=a.Eb(Tt.column);ce=ae.position+Ne+E,ae.oa!==0&&(ce+=ae.Io(Math.max(at,Ye))),ae=Nt.position+Ge+te,Nt.oa!==0&&(ae+=Nt.Io(Math.max(Ct,Qe))),Nt=Tt.measuredBounds,Tt.Uk(),Tt.actualBounds.ka();var It=Tt.actualBounds,Zt=pn.allocAt(It.x,It.y,It.width,It.height);It.x=Tt.type===Rn.TableRow?te:ae,It.y=Tt.type===Rn.TableColumn?E:ce,It.width=Nt.width,It.height=Nt.height,Tt.actualBounds.freeze(),Fh(Tt,!1),mo(Zt,It)||Pe===null||(Pe.oh(),Tt.Pn(Pe)),pn.free(Zt)}}for(xt=Sn.alloc(),Tt=0;Tt<_e;Tt++)if(ne[Tt]){for(Pe=ne[Tt].length,Nt=a.Fb(Tt),ce=Nt.position+Ne+E,Nt.oa!==0&&(ce+=Nt.Io(Math.max(at,Ye))),It=0;It<Pe;It++)if(ne[Tt][It]){Zt=a.Eb(It),ae=Zt.position+Ge+te,Zt.oa!==0&&(ae+=Zt.Io(Math.max(Ct,Qe)));for(var un=ne[Tt][It],$n=un.length,fi=0;fi<$n;fi++){var ai=un[fi],Un=ai.measuredBounds;xt.h(0,0);for(var Pn=1;Pn<ai.rowSpan&&!(Tt+Pn>=a.rowCount);Pn++){var ar=a.Fb(Tt+Pn);ar.oa!==0&&(xt.height+=ar.total)}for(Pn=1;Pn<ai.columnSpan&&!(It+Pn>=a.columnCount);Pn++)ar=a.Eb(It+Pn),ar.oa!==0&&(xt.width+=ar.total);var Ji=Zt.oa+xt.width,lo=Nt.oa+xt.height;Pn=ae,ar=ce;var Ho=Ji,fa=lo,Sa=ae,rl=ce,pa=Ji,Kc=lo;ae+Ji>x.width&&(pa=Math.max(x.width-ae,0)),ce+lo>x.height&&(Kc=Math.max(x.height-ce,0));var js=ai.alignment;if(js.Xb()){js=a.defaultAlignment,js.sb()||(js=Hr);var lh=js.x,ol=js.y,Vc=js.offsetX;js=js.offsetY;var hu=Zt.alignment,Ru=Nt.alignment;hu.sb()&&(lh=hu.x,Vc=hu.offsetX),Ru.sb()&&(ol=Ru.y,js=Ru.offsetY)}else lh=js.x,ol=js.y,Vc=js.offsetX,js=js.offsetY;(isNaN(lh)||isNaN(ol))&&(ol=lh=.5,js=Vc=0),hu=Un.width,Ru=Un.height;var Ql=ai.margin,Bl=Ql.left+Ql.right,Cd=Ql.top+Ql.bottom,uh=ih(ai,Nt,Zt,!1);!isNaN(ai.desiredSize.width)||uh!==Nn&&uh!==Li||(hu=Math.max(Ji-Bl,0)),!isNaN(ai.desiredSize.height)||uh!==Nn&&uh!==Bi||(Ru=Math.max(lo-Cd,0)),Ji=ai.maxSize,lo=ai.minSize,hu=Math.min(Ji.width,hu),Ru=Math.min(Ji.height,Ru),hu=Math.max(lo.width,hu),Ru=Math.max(lo.height,Ru),Ji=Ru+Cd,Pn+=Ho*lh-(hu+Bl)*lh+Vc+Ql.left,ar+=fa*ol-Ji*ol+js+Ql.top,ai.visible&&(Co(Sa,rl,pa,Kc,Pn,ar,Un.width,Un.height)?ai.arrange(Pn,ar,hu,Ru):ai.arrange(Pn,ar,hu,Ru,new pn(Sa,rl,pa,Kc)))}}}for(Sn.free(xt),a=0;a<b;a++)x=y[a],te=x instanceof Rn?x:null,te!==null&&Rc(te)&&(te=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,te.width,te.height),x.naturalBounds.freeze())}};function bm(){this.xa="Base"}Ve(bm,ta),bm.prototype.measure=function(){},bm.prototype.arrange=function(){};function Pm(){this.xa="Base"}Ve(Pm,ta),Pm.prototype.measure=function(){},Pm.prototype.arrange=function(){};function Cm(){this.xa="Base"}Ve(Cm,ta),Cm.prototype.measure=function(a,y,x,b,E,te,ne){1<b.length&&rn("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 ae=b.measuredBounds,ce=b.margin,_e=ce.right+ce.left;if(ce=ce.top+ce.bottom,isFinite(y)||isFinite(x)){var Pe=b.scale,Ne=ae.width;ae=ae.height;var Ge=Math.max(y-_e,0),Ye=Math.max(x-ce,0),Qe=1;a.viewboxStretch===Si?Ne!==0&&ae!==0&&(Qe=Math.min(Ge/Ne,Ye/ae)):Ne!==0&&ae!==0&&(Qe=Math.max(Ge/Ne,Ye/ae)),Qe===0&&(Qe=1e-4),b.Ca*=Qe,Pe!==b.scale&&(Ys(b,!0),b.measure(1/0,1/0,te,ne))}ae=b.measuredBounds,E.width=isFinite(y)?y:Math.max(ae.width+_e,0),E.height=isFinite(x)?x:Math.max(ae.height+ce,0)},Cm.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=Hr),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 cg(){this.xa="Base"}Ve(cg,ta),cg.prototype.measure=function(){},cg.prototype.arrange=function(){},cg.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,ae=te.width,ce=te.height,_e=Math.ceil(ae/E),Pe=Math.ceil(ce/b),Ne=a.gridOrigin,Ge=Ne.x;Ne=Ne.y,y.save(),y.beginPath(),y.rect(0,0,ae,ce),y.clip(),y.Se();for(var Ye=[],Qe=a.O.s,at=Qe.length,Ct=0;Ct<at;Ct++){var xt=Qe[Ct],Tt=[];if(Ye.push(Tt),xt.visible){var Nt=xt.interval;if(!(0>Nt)){xt=mv(xt.figure);for(var It=0;It<at;It++)if(It!==Ct){var Zt=Qe[It];Zt.visible&&mv(Zt.figure)===xt&&(Zt=Zt.interval,Zt>Nt&&Tt.push(Zt))}}}}for(Qe=a.O.s,at=Qe.length,Ct=0;Ct<at;Ct++){var un=Qe[Ct];if(un.visible&&(Tt=un.interval||1,xt=Math.abs(Tt),!(2>E*xt*x))){if(Nt=un.segmentIndex,(!isFinite(Nt)||isNaN(Nt))&&(Nt=0),0>Nt&&(Nt=xt-Math.min(-Nt,xt)),Nt=Math.round(Nt%xt),xt=un.opacity,It=1,xt!==1){if(xt===0)continue;It=y.globalAlpha,y.globalAlpha=It*xt}Zt=Ye[Ct];var $n=!1,fi=un.strokeDashArray;if(fi!==null&&($n=!0,y.js(fi,un.strokeDashOffset)),un.figure==="LineV"&&un.stroke!==null&&0<un.strokeWidth){for(y.lineWidth=un.strokeWidth,Es(a,y,un.stroke,!1,!1,te,ne),y.beginPath(),fi=un=Math.floor((Ge-E)/E);fi<=un+_e;fi++){var ai=fi*E+Ge;0<=ai&&ai<=ae&&Em(fi,Tt,Nt,Zt)&&(y.moveTo(ai,0),y.lineTo(ai,ce))}y.stroke(),y.Se()}else if(un.figure==="LineH"&&un.stroke!==null&&0<un.strokeWidth){for(y.lineWidth=un.strokeWidth,Es(a,y,un.stroke,!1,!1,te,ne),y.beginPath(),fi=un=Math.floor((Ne-b)/b);fi<=un+Pe;fi++)ai=fi*b+Ne,0<=ai&&ai<=ce&&Em(fi,Tt,Nt,Zt)&&(y.moveTo(0,ai),y.lineTo(ae,ai));y.stroke(),y.Se()}else if(un.figure==="BarV"&&un.fill!==null)for(Es(a,y,un.fill,!0,!1,te,ne),un=un.width,isNaN(un)&&(un=E),ai=fi=Math.floor((Ge-E)/E);ai<=fi+_e;ai++){var Un=ai*E+Ge;0<=Un+un&&Un<=ae&&Em(ai,Tt,Nt,Zt)&&y.fillRect(Un,0,un,ce)}else if(un.figure==="BarH"&&un.fill!==null)for(Es(a,y,un.fill,!0,!1,te,ne),un=un.height,isNaN(un)&&(un=b),ai=fi=Math.floor((Ne-b)/b);ai<=fi+Pe;ai++)Un=ai*b+Ne,0<=Un+un&&Un<=ce&&Em(ai,Tt,Nt,Zt)&&y.fillRect(0,Un,ae,un);$n&&y.fs(),xt!==1&&(y.globalAlpha=It)}}y.restore(),y.Vc(!1)};function Em(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 Lm(){this.xa="Base"}Ve(Lm,ta),Lm.prototype.measure=function(a,y,x,b,E){var te=b.length;if(a instanceof $r||a instanceof Gn){var ne=null,ae=null;if(a instanceof Gn&&(ne=a),a instanceof $r&&(ae=a,ne=ae.adornedPart,a.j===null&&(a.j=[])),ne instanceof Gn){var ce=ne;if(te===0)ss(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var _e=a instanceof $r?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var Pe=ce.points,Ne=ne.pointsCount;ae!==null?ae.Ul(!1):ne!==null&&ne.Ul(!1),ae=y.width;var Ge=y.height,Ye=a.j;if(Ye.length=0,_e!==null){r1(a,ae,Ge,_e);var Qe=_e.measuredBounds;x.ed(Qe),Ye.push(Qe)}Qe=xr.alloc();for(var at=vt.alloc(),Ct=vt.alloc(),xt=0;xt<te;xt++){var Tt=b[xt];if(Tt!==_e)if(Tt.isPanelMain&&Tt instanceof mr){r1(a,ae,Ge,Tt);var Nt=Tt.measuredBounds;x.ed(Nt),Ye.push(Nt)}else if(2>Ne)Tt.measure(1/0,1/0,0,0),Nt=Tt.measuredBounds,x.ed(Nt),Ye.push(Nt);else{var It=Tt.segmentIndex,Zt=Tt.segmentFraction,un=Tt.alignmentFocus;un.Mc()&&(un=Hr);var $n=Tt.segmentOrientation,fi=Tt.segmentOffset;if(isNaN(It)){var ai=ce.ua;Nt=Ti(),ai.Qu(Zt,Nt);var Un=vt.allocAt(Nt[0],Nt[1]);if(Un.add(ce.i(0)),ai.type===Kn.j?Un.offset(-ai.startX,-ai.startY):(ai=ai.figures.first(),ai!==null&&Un.offset(-ai.startX,-ai.startY)),ai=Nt[2],$n!==pl){var Pn=ce.computeAngle(Tt,$n,ai);Tt.Kb=Pn}Pn=Un.x-y.x;var ar=Un.y-y.y;vt.free(Un),bi(Nt)}else if(It<-Ne||It>=Ne)Nt=vt.alloc(),ce.vg(),ce.computeMidPoint(Nt),ai=ce.midAngle,$n!==pl&&(Pn=ce.computeAngle(Tt,$n,ai),Tt.Kb=Pn),Pn=Nt.x-y.x,ar=Nt.y-y.y,vt.free(Nt);else{if(Pn=0,0<=It?(ar=Pe.M(It),Nt=It<Ne-1?Pe.M(It+1):ar):(Pn=Ne+It,ar=Pe.M(Pn),Nt=0<Pn?Pe.M(Pn-1):ar),ar.Xa(Nt)){0<=It?(ai=0<It?Pe.M(It-1):ar,Pn=It<Ne-2?Pe.M(It+2):Nt):(ai=Pn<Ne-1?Pe.M(Pn+1):ar,Pn=1<Pn?Pe.M(Pn-2):Nt),Un=ai.Bf(ar);var Ji=Nt.Bf(Pn);ai=Un>Ji+10?0<=It?ai.ab(ar):ar.ab(ai):Ji>Un+10?0<=It?Nt.ab(Pn):Pn.ab(Nt):0<=It?ai.ab(Pn):Pn.ab(ai)}else ai=0<=It?ar.ab(Nt):Nt.ab(ar);$n!==pl&&(Pn=ce.computeAngle(Tt,$n,ai),Tt.Kb=Pn),Pn=ar.x+(Nt.x-ar.x)*Zt-y.x,ar=ar.y+(Nt.y-ar.y)*Zt-y.y}Tt.measure(1/0,1/0,0,0),Nt=Tt.measuredBounds,Un=Tt.naturalBounds;var lo=0;Tt instanceof mr&&(lo=Tt.strokeWidth),Ji=Un.width+lo;var Ho=Un.height+lo;Qe.reset(),Qe.translate(-Nt.x,-Nt.y),Qe.scale(Tt.scale,Tt.scale),Qe.rotate($n===pl?Tt.angle:ai,Ji/2,Ho/2),$n!==Pg&&$n!==Eg||Qe.rotate(90,Ji/2,Ho/2),$n!==Cg&&$n!==Lg||Qe.rotate(-90,Ji/2,Ho/2),$n===i0&&(45<ai&&135>ai||225<ai&&315>ai)&&Qe.rotate(-ai,Ji/2,Ho/2),Un=new pn(0,0,Ji,Ho),at.xi(Un,un),Qe.Ga(at),un=-at.x+lo/2*Tt.scale,Tt=-at.y+lo/2*Tt.scale,Ct.assign(fi),lo=isNaN(fi.x);var fa=isNaN(fi.y);if(lo||fa){Ji=Ji/2+3,Ho=Ho/2+3;var Sa=45<=ai&&135>=ai,rl=225<=ai&&315>=ai;$n===pl&&(Sa||rl)?(Ct.x=fa?Ji:fi.y,Ct.y=lo?Ho:fi.x,Sa?0<=It||isNaN(It)&&.5>Zt||!lo||(Ct.y=-Ho):rl&&((0<=It||isNaN(It)&&.5>Zt)&&lo&&(Ct.y=-Ho),fa&&(Ct.x=-Ji))):(lo&&(Ct.x=0<=It||isNaN(It)&&.5>Zt?Ji:-Ji),fa&&(Ct.y=-Ho),Ct.rotate(ai))}else Ct.rotate(ai);Pn+=Ct.x,ar+=Ct.y,Un.set(Nt),Un.h(Pn+un,ar+Tt,Nt.width,Nt.height),Ye.push(Un),x.ed(Un)}}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),ss(E,x.width||0,x.height||0),xr.free(Qe),vt.free(at),vt.free(Ct)}}}},Lm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof $r||a instanceof Gn){var b=a,E=null;a instanceof $r&&(E=a,b=E.adornedPart);var te=a instanceof $r?null:b.path,ne=a.j;if(ne.length!==0){var ae=0;if(te!==null&&ae<ne.length){var ce=ne[ae];ae++,te.arrange(ce.x-a.jg.x,ce.y-a.jg.y,ce.width,ce.height)}for(ce=0;ce<x;ce++){var _e=y[ce];if(_e!==te&&ae<ne.length){var Pe=ne[ae];ae++,_e.arrange(Pe.x-a.jg.x,Pe.y-a.jg.y,Pe.width,Pe.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof Gn)for(te=a.labelNodes;te.next();){var Ne=a;ne=te.value,ae=ne.segmentIndex,ce=ne.segmentFraction;var Ge=ne.alignmentFocus;if(_e=ne.segmentOrientation,Pe=ne.segmentOffset,isNaN(ae)){var Ye=Ne.ua,Qe=Ti();Ye.Qu(ce,Qe);var at=vt.allocAt(Qe[0],Qe[1]);at.add(Ne.i(0)),Ye.type===Kn.j||(Ye=Ye.figures.first()),at.offset(-Ye.startX,-Ye.startY),Ye=Qe[2],_e!==pl&&(Ne=Ne.computeAngle(ne,_e,Ye),ne.angle=Ne),Ne=at.x;var Ct=at.y;vt.free(at),bi(Qe)}else if(ae<-x||ae>=x)Qe=vt.alloc(),Ye=Ne,Ct=Qe,Ye.vg(),Ye.computeMidPoint(Ct),Ye=Ne.midAngle,_e!==pl&&(Ne=Ne.computeAngle(ne,_e,Ye),ne.angle=Ne),Ne=Qe.x,Ct=Qe.y,vt.free(Qe);else{if(at=0,0<=ae?(Qe=y.s[ae],Ct=ae<x-1?y.s[ae+1]:Qe):(at=x+ae,Qe=y.s[at],Ct=0<at?y.s[at-1]:Qe),Qe.Xa(Ct)){0<=ae?(Ye=0<ae?y.s[ae-1]:Qe,at=ae<x-2?y.s[ae+2]:Ct):(Ye=at<x-1?y.s[at+1]:Qe,at=1<at?y.s[at-2]:Ct);var xt=Ye.Bf(Qe),Tt=Ct.Bf(at);Ye=xt>Tt+10?0<=ae?Ye.ab(Qe):Qe.ab(Ye):Tt>xt+10?0<=ae?Ct.ab(at):at.ab(Ct):0<=ae?Ye.ab(at):at.ab(Ye)}else Ye=0<=ae?Qe.ab(Ct):Ct.ab(Qe);_e!==pl&&(Ne=Ne.computeAngle(ne,_e,Ye),ne.angle=Ne),Ne=Qe.x+(Ct.x-Qe.x)*ce,Ct=Qe.y+(Ct.y-Qe.y)*ce}if(Ge.ys())ne.location=new vt(Ne,Ct);else{Ge.Mc()&&(Ge=Hr),Qe=xr.alloc(),Qe.reset(),Qe.scale(ne.scale,ne.scale),Qe.rotate(ne.angle,0,0);var Nt=ne.naturalBounds;at=pn.allocAt(0,0,Nt.width,Nt.height),xt=vt.alloc(),xt.xi(at,Ge),Qe.Ga(xt),Ge=-xt.x,Tt=-xt.y;var It=Nt.width,Zt=Nt.height;Nt=vt.alloc(),Nt.assign(Pe);var un=isNaN(Pe.x),$n=isNaN(Pe.y);if(un||$n){It=It/2+3,Zt=Zt/2+3;var fi=45<=Ye&&135>=Ye,ai=225<=Ye&&315>=Ye;_e===pl&&(fi||ai)?(Nt.x=$n?It:Pe.y,Nt.y=un?Zt:Pe.x,fi?0<=ae||isNaN(ae)&&.5>ce||!un||(Nt.y=-Zt):ai&&((0<=ae||isNaN(ae)&&.5>ce)&&un&&(Nt.y=-Zt),$n&&(Nt.x=-It))):(un&&(Nt.x=0<=ae||isNaN(ae)&&.5>ce?It:-It),$n&&(Nt.y=-Zt),Nt.rotate(Ye))}else Nt.rotate(Ye);Ne+=Nt.x,Ct+=Nt.y,Qe.pp(at),Ge+=at.x,Tt+=at.y,ae=vt.allocAt(Ne+Ge,Ct+Tt),ne.move(ae),vt.free(ae),vt.free(Nt),vt.free(xt),pn.free(at),xr.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),vt.free(b)}};function r1(a,y,x,b){if(su(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof $r&&a.type===Rn.Link&&a.adornedObject instanceof mr&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof Gn&&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 $r&&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),Ys(b,!1)}}function dg(){this.xa="Base"}Ve(dg,ta),dg.prototype.measure=function(a,y,x,b,E,te,ne){var ae=a.Pb();a.graduatedBounds=[];var ce=ae.margin,_e=ce.right+ce.left,Pe=ce.top+ce.bottom;ae.measure(y,x,te,ne);var Ne=ae.measuredBounds,Ge=new pn(-ce.left,-ce.top,Math.max(Ne.width+_e,0),Math.max(Ne.height+Pe,0));a.graduatedBounds.push(Ge),E.assign(Ge);for(var Ye=ae.geometry,Qe=ae.strokeWidth,at=Ye.flattenedSegments,Ct=Ye.flattenedLengths,xt=Ye.flattenedTotalLength,Tt=at.length,Nt=0,It=0,Zt=Ti(),un=0;un<Tt;un++){var $n=at[un],fi=[];It=Nt=0;for(var ai=$n.length,Un=0;Un<ai;Un+=2){var Pn=$n[Un],ar=$n[Un+1];if(Un!==0){var Ji=180*Math.atan2(ar-It,Pn-Nt)/Math.PI;0>Ji&&(Ji+=360),fi.push(Ji)}Nt=Pn,It=ar}Zt.push(fi)}if(a.graduatedIntervals===null){for(var lo=[],Ho=a.O.s,fa=Ho.length,Sa=0;Sa<fa;Sa++){var rl=Ho[Sa],pa=[];if(lo.push(pa),rl.visible){var Kc=rl.interval;if(!(0>Kc)){for(var js=0;js<fa;js++)if(js!==Sa){var lh=Ho[js];if(lh.visible&&rl.constructor===lh.constructor){var ol=lh.interval;ol>Kc&&pa.push(ol)}}}}}a.graduatedIntervals=lo}var Vc=a.graduatedIntervals,hu=a.O.s,Ru=hu.length,Ql=0,Bl=0,Cd=xt;a.graduatedMarks=[];for(var uh,Op=0;Op<Ru;Op++){var $l=hu[Op];if(uh=[],$l.visible&&$l!==ae){var sl=Math.abs($l.interval),qg=a.graduatedTickUnit;if(!(2>qg*sl*xt/a.graduatedRange&&$l.graduatedSkip===null)){var jf=Ct[0][0],Ch=0,jl=0;Bl=xt*$l.graduatedStart-1e-4,Cd=xt*$l.graduatedEnd+1e-4;var sf=qg*sl,eu=a.graduatedTickBase;if(eu<a.graduatedMin){var Ed=(a.graduatedMin-eu)/sf;Ed=Ed%1===0?Ed:Math.floor(Ed+1),eu+=Ed*sf}else eu>a.graduatedMin+sf&&(eu-=Math.floor((eu-a.graduatedMin)/sf)*sf);for(var K0=Vc[Op],Qg=eu,Uy=1e-6*a.graduatedMax,Yh=1;eu<=a.graduatedMax+Uy;Yh++){e:{for(var yc=K0.length,zf=0;zf<yc;zf++){var Ld=(eu-a.graduatedTickBase)%(K0[zf]*a.graduatedTickUnit),Rp=1e-6*a.graduatedTickUnit;if(Ld<Rp&&Ld>-Rp){var Md=!1;break e}}Md=!0}if(Md&&(eu>a.graduatedMax&&(eu=a.graduatedMax),$l.graduatedSkip===null||$l instanceof Vo&&!$l.graduatedSkip(eu,$l)||$l instanceof mr&&!$l.graduatedSkip(eu,$l))&&(Ql=(eu-a.graduatedMin)*xt/a.graduatedRange,Ql>xt&&(Ql=xt),Bl<=Ql&&Ql<=Cd)){for(var Xh=Zt[Ch][jl],Zc=Ct[Ch][jl];Ch<Ct.length;){for(;Ql>jf&&jl<Ct[Ch].length-1;)jl++,Xh=Zt[Ch][jl],Zc=Ct[Ch][jl],jf+=Zc;if(Ql<=jf)break;Ch++,jl=0,Xh=Zt[Ch][jl],Zc=Ct[Ch][jl],jf+=Zc}var zl=at[Ch],Eh=zl[2*jl],V0=zl[2*jl+1],Sc=(Ql-(jf-Zc))/Zc,Ip=new vt(Eh+(zl[2*jl+2]-Eh)*Sc+Qe/2-Ye.bounds.x,V0+(zl[2*jl+3]-V0)*Sc+Qe/2-Ye.bounds.y);Ip.scale(ae.scale,ae.scale);e:{var hh=Xh,af=Zt[Ch];if(!(.5005>Sc&&.4995<Sc)){var Lh=hh;if(.5>Sc?0<jl?Lh=af[jl-1]:tn.$(zl[0],zl[zl.length-2])&&tn.$(zl[1],zl[zl.length-1])&&(Lh=af[af.length-1]):.5<Sc&&(jl+1<af.length?Lh=af[jl+1]:tn.$(zl[0],zl[zl.length-2])&&tn.$(zl[1],zl[zl.length-1])&&(Lh=af[0])),hh!==Lh){var Uf=Math.abs(hh-Lh);if(180<Uf&&(hh<Lh?hh+=360:Lh+=360,Uf=Math.abs(hh-Lh)),5e-4>Sc||.9995<Sc){Xh=(hh+Lh)/2%360;break e}if(10>Uf){var Fp=1-Math.abs(.5-Sc);Xh=(hh*Fp+Lh*(1-Fp))%360;break e}}}Xh=hh}if($l instanceof Vo){var qu="";$l.graduatedFunction!==null?(qu=$l.graduatedFunction(eu,$l),qu=qu!=null?qu.toString():""):qu=(+eu.toFixed(2)).toString(),qu!==""&&uh.push({$l:Ip,angle:Xh,text:qu})}else uh.push({$l:Ip,angle:Xh})}eu=Qg+Yh*sf}}}a.graduatedMarks.push(uh)}bi(Zt);var La=a.graduatedMarks;if(La!==null)for(var $g=b.length,Sl=0;Sl<$g;Sl++){var zs=b[Sl],xl=La[Sl];if(zs.visible&&zs!==ae&&xl.length!==0){if(zs instanceof mr){var xc=a,Yc=E,lf=zs.alignmentFocus;lf.Mc()&&(lf=ga);var Hy=zs.angle;zs.Kb=0,zs.measure(1/0,1/0,0,0),zs.Kb=Hy;var Z0=zs.measuredBounds,Bp=Z0.width,uf=Z0.height,Hf=pn.allocAt(0,0,Bp,uf),Ul=vt.alloc();Ul.xi(Hf,lf),pn.free(Hf);for(var wc=-Ul.x,ch=-Ul.y,_u=new pn,kd=xl.length,jp=0;jp<kd;jp++)for(var Td=xl[jp],Y0=Td.$l.x,zp=Td.$l.y,ks=Td.angle,Qu=0;4>Qu;Qu++){switch(Qu){case 0:Ul.h(wc,ch);break;case 1:Ul.h(wc+Bp,ch);break;case 2:Ul.h(wc,ch+uf);break;case 3:Ul.h(wc+Bp,ch+uf)}Ul.rotate(ks+zs.angle),Ul.offset(Y0,zp),jp===0&&Qu===0?_u.h(Ul.x,Ul.y,0,0):_u.Ye(Ul),Ul.offset(-Y0,-zp),Ul.rotate(-ks-zs.angle)}vt.free(Ul),xc.graduatedBounds!==null&&xc.graduatedBounds.push(_u),fo(Yc,_u.x,_u.y,_u.width,_u.height)}else if(zs instanceof Vo){var Iu=a,X0=E;Iu.temporaryTextBlock===null&&(Iu.temporaryTextBlock=new Vo);var tu=Iu.temporaryTextBlock;S1(tu,zs);var Xc=zs.alignmentFocus;Xc.Mc()&&(Xc=ga);for(var Fu=zs.segmentOrientation,Up=zs.segmentOffset,Ad=new pn,em=0,Hp=0,Mh=0,hf=0,Nd=0,Gp=xl.length,Jc=0;Jc<Gp;Jc++){var Jh=xl[Jc];em=Jh.$l.x,Hp=Jh.$l.y,Mh=Jh.angle,Nd=hf=zs.angle,Fu!==pl&&(Nd=Fu===bg||Fu===n0?Mh+zs.angle:Mh,hf=Gn.computeAngle(Fu,Nd)),tu.Kb=hf,tu.text=Jh.text||"",tu.measure(1/0,1/0,0,0);var qc=tu.measuredBounds,_c=tu.naturalBounds,Qc=_c.width,cf=_c.height,dh=xr.alloc();dh.reset(),dh.translate(-qc.x,-qc.y),dh.scale(tu.scale,tu.scale),dh.rotate(Nd,Qc/2,cf/2),Fu!==Pg&&Fu!==Eg||dh.rotate(90,Qc/2,cf/2),Fu!==Cg&&Fu!==Lg||dh.rotate(-90,Qc/2,cf/2),Fu===i0&&(45<Mh&&135>Mh||225<Mh&&315>Mh)&&dh.rotate(-Mh,Qc/2,cf/2);var Gf=pn.allocAt(0,0,Qc,cf),$c=vt.alloc();$c.xi(Gf,Xc),dh.Ga($c);var Wf=-$c.x,Gy=-$c.y,bc=vt.alloc();bc.assign(Up),isNaN(bc.x)&&(bc.x=Qc/2+3),isNaN(bc.y)&&(bc.y=-(cf/2+3)),bc.rotate(Mh),em+=bc.x+Wf,Hp+=bc.y+Gy;var df=new pn(em,Hp,qc.width,qc.height),tm=new pn(qc.x,qc.y,qc.width,qc.height),Wy=new pn(_c.x,_c.y,_c.width,_c.height);Jh.Sz=hf,Jh.lineCount=tu.lineCount,Jh.lines=[tu.Cb,tu.Ih,tu.df,tu.Le,tu.Qc,tu.Qb,tu.ze],Jh.actualBounds=df,Jh.measuredBounds=tm,Jh.naturalBounds=Wy,Jc===0?Ad.assign(df):Ad.ed(df),vt.free(bc),vt.free($c),pn.free(Gf),xr.free(dh)}Iu.graduatedBounds!==null&&Iu.graduatedBounds.push(Ad),fo(X0,Ad.x,Ad.y,Ad.width,Ad.height)}Ys(zs,!1)}}},dg.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,ae=te[ne];ne++,b!==null&&b.arrange(ae.x-x.x,ae.y-x.y,ae.width,ae.height);for(var ce=y.length,_e=0;_e<ce;_e++){var Pe=y[_e];ae=E[_e],Pe.visible&&Pe!==b&&ae.length!==0&&(ae=te[ne],ne++,Pe.arrange(ae.x-x.x,ae.y-x.y,ae.width,ae.height))}a.graduatedBounds=null}}},dg.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 Xl,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 ae=te.actualBounds,ce=a.O.s,_e=a.graduatedMarks,Pe=ce.length,Ne=0;Ne<Pe;Ne++){var Ge=ce[Ne],Ye=_e[Ne],Qe=Ye.length;if(Ge.visible&&Ge!==te&&Ye.length!==0){if(Ge instanceof mr){if(!(2>a.graduatedTickUnit*Ge.interval*te.geometry.flattenedTotalLength/a.graduatedRange*ne&&Ge.graduatedSkip===null)){var at=Ge.measuredBounds,Ct=Ge.strokeWidth*Ge.scale,xt=Ge.alignmentFocus;xt.Mc()&&(xt=ga);for(var Tt=0;Tt<Qe;Tt++){var Nt=Ye[Tt].$l,It=Ye[Tt].angle,Zt=xt,un=Ge.Ab;un.reset(),un.translate(Nt.x+ae.x,Nt.y+ae.y),un.rotate(It+Ge.angle,0,0),un.translate(-at.width*Zt.x+Zt.offsetX+Ct/2,-at.height*Zt.y+Zt.offsetY+Ct/2),un.scale(Ge.scale,Ge.scale),Tu(Ge,!1),Ge.wh.set(Ge.Ab),Ge.Kk=Ge.scale,gu(Ge,!1),Ge.gc(y,x),E&&(a.svg.appendChild(Ge.svg),Ge.svg=null),Ge.Ab.reset()}}}else if(Ge instanceof Vo)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Vo),at=a.temporaryTextBlock,S1(at,Ge),Ct=0;Ct<Qe;Ct++)xt=Ye[Ct],xt.actualBounds&&xt.measuredBounds&&xt.naturalBounds&&(at.ec=xt.text||"",at.Kb=xt.Sz||0,at.Gc=xt.lineCount||0,Tt=xt.lines,Tt!==void 0&&(at.Cb=Tt[0],at.Ih=Tt[1],at.df=Tt[2],at.Le=Tt[3],at.Qc=Tt[4],at.Qb=Tt[5],at.ze=Tt[6]),xt.naturalBounds&&(at.dc=xt.naturalBounds),xt.actualBounds&&(Tt=xt.actualBounds,at.arrange(Tt.x,Tt.y,Tt.width,Tt.height)),Tt=xt.actualBounds,at.arrange(Tt.x,Tt.y,Tt.width,Tt.height),Nt=xt.measuredBounds,xt=xt.naturalBounds,It=at.Ab,It.reset(),It.translate(Tt.x+ae.x,Tt.y+ae.y),It.translate(-Nt.x,-Nt.y),at.no(It,xt.x,xt.y,xt.width,xt.height),Tu(at,!1),at.wh.set(at.Ab),at.Kk=at.scale,gu(at,!1),at.Ng=Ge.part,at.Me=Ge.panel,at.gc(y,x),at.Me=null,at.Ng=null,E&&(a.svg.appendChild(at.svg),at.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function Rn(a,y){if(Xt.call(this),this.na=null,a===void 0)this.na=Rn.Position;else if(typeof a=="string"){var x=Ku.I(a);x!==null&&(this.na=x)}else a instanceof ta?this.na=a:a&&(this.na=Rn.Position,y=a);this.na===null&&rn("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Rn.Grid?1048576:0),this.O=new zn,this.yb=ds,this.Tm=ma,this.Uf=cr,this.$g=null,this.$e="",this.jg=new pn(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=Si,this.jn=Jr,this.kn=Sr,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Ve(Rn,Xt),Rn.prototype.cloneProtected=function(a){Xt.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},Rn.prototype.Af=function(a){Xt.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},Rn.prototype.copy=function(){var a=Xt.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 ii&&(te.Te=!0);var ae=a.diagram;ae!==null&&ae.undoManager.isUndoingRedoing||te.cb(bs,"elements",a,null,E,null,ne)}}return a}return null},qe=Rn.prototype,qe.toString=function(){return"Panel("+this.type.name+")#"+Ft(this)},qe.Pn=function(a){Xt.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},qe.hh=function(a,y){if(this.na===Rn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Rn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Rn.Table)if(a.yc(),a instanceof Xl){var x=a.yd;a.yd=pm(a,"gojs-ts"),gv(this,a),a.nh.pop(),a.yd=x}else gv(this,a);(x=this.isClipping&&this.na===Rn.Spot)&&a.save();for(var b=this.Pb(),E=this.O.s,te=E.length,ne=0;ne<te;ne++){var ae=E[ne];x&&ae===b&&(a.clipInsteadOfFill=!0),ae.gc(a,y),x&&ae===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&&Mm(a,y,!0,x,!0),b!==null&&Mm(a,y,!1,b,!0),x!==null&&o1(a,y,!0,x),b!==null&&o1(a,y,!1,b),x!==null&&Mm(a,y,!0,x,!1),b!==null&&Mm(a,y,!1,b,!1)}function o1(a,y,x,b){for(var E=b.length,te=a.actualBounds,ne=a.naturalBounds,ae=!0,ce=0;ce<E;ce++){var _e=b[ce];if(_e!==void 0&&_e.actual!==0)if(ae)ae=!1;else{if(x){if(_e.position>ne.height)continue}else if(_e.position>ne.width)continue;var Pe=_e.separatorStrokeWidth;isNaN(Pe)&&(Pe=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Ne=_e.separatorStroke;if(Ne===null&&(Ne=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),Pe!==0&&Ne!==null){Es(a,y,Ne,!1,!1,ne,te),Ne=!1;var Ge=_e.separatorDashArray;Ge===null&&(Ge=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),Ge!==null&&(Ne=!0,y.js(Ge,0)),y.beginPath(),Ge=_e.position+Pe,x?Ge>ne.height&&(Pe-=Ge-ne.height):Ge>ne.width&&(Pe-=Ge-ne.width),_e=_e.position+Pe/2,y.lineWidth=Pe,Pe=a.yb,x?(_e+=Pe.top,Ge=ne.width-Pe.right,y.moveTo(Pe.left,_e),y.lineTo(Ge,_e)):(_e+=Pe.left,Ge=ne.height-Pe.bottom,y.moveTo(_e,Pe.top),y.lineTo(_e,Ge)),y.stroke(),y.Se(),Ne&&y.fs()}}}}function Mm(a,y,x,b,E){for(var te=b.length,ne=a.actualBounds,ae=a.naturalBounds,ce=s1(a,!0),_e=s1(a,!1),Pe=0;Pe<te;Pe++){var Ne=b[Pe];if(Ne!==void 0&&Ne.background!==null&&Ne.coversSeparators!==E&&Ne.actual!==0){var Ge=x?ne.height:ne.width;if(!(Ne.position>Ge)){var Ye=Ne.Wc(),Qe=Ne.separatorStrokeWidth;isNaN(Qe)&&(Qe=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var at=Ne.separatorStroke;at===null&&(at=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(at===null||Ne.index===(x?ce:_e))&&(Qe=0),Ye-=Qe,Qe=Ne.position+Qe,Ye+=Ne.actual,Qe+Ye>Ge&&(Ye=Ge-Qe),0>=Ye||(Ge=a.yb,Es(a,y,Ne.background,!0,!1,ae,ne),x?y.fillRect(Ge.left,Qe+Ge.top,ne.width-(Ge.left+Ge.right),Ye):y.fillRect(Qe+Ge.left,Ge.top,Ye,ne.height-(Ge.top+Ge.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"}qe.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},qe.kk=function(a,y,x){if(!Xt.prototype.kk.call(this,a,y,x))return!1;if(this.type===Rn.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===Rn.Grid||this.na===Rn.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},qe.nk=function(){return!0},qe.$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 ae=y[ne].actualBounds;E=ne===0?ae.x:Math.min(ae.x,E),te=ne===0?ae.y:Math.min(ae.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 Xt.prototype.$o.call(this,a,y,x,b)},qe.Sj=function(a,y,x,b,E){var te=this.se(),ne=this.transform,ae=1/(ne.m11*ne.m22-ne.m12*ne.m21),ce=ne.m22*ae,_e=-ne.m12*ae,Pe=-ne.m21*ae,Ne=ne.m11*ae,Ge=ae*(ne.m21*ne.dy-ne.m22*ne.dx),Ye=ae*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,tn.Ff(ne.left,ne.top,ne.right,ne.bottom,a,y,x,b,E);if(this.background!==null)return te=a*ce+y*Pe+Ge,ae=a*_e+y*Ne+Ye,a=x*ce+b*Pe+Ge,ce=x*_e+b*Ne+Ye,E.h(0,0),x=this.naturalBounds,te=tn.Ff(0,0,x.width,x.height,te,ae,a,ce,E),E.transform(ne),te;te||(ce=1,Pe=_e=0,Ne=1,Ye=Ge=0),ae=a*ce+y*Pe+Ge,a=a*_e+y*Ne+Ye,ce=x*ce+b*Pe+Ge,x=x*_e+b*Ne+Ye,E.h(ce,x),b=(ce-ae)*(ce-ae)+(x-a)*(x-a),_e=!1,Ne=this.O.s,Ye=Ne.length,Pe=vt.alloc(),Ge=null,y=1/0;var Qe=null,at=this.isClipping&&this.na===Rn.Spot;at&&(Qe=vt.alloc(),Ge=this.Pb(),(_e=Ge.Sj(ae,a,ce,x,Qe))&&(y=(ae-Qe.x)*(ae-Qe.x)+(a-Qe.y)*(a-Qe.y)));for(var Ct=0;Ct<Ye;Ct++){var xt=Ne[Ct];xt.visible&&xt!==Ge&&xt.Sj(ae,a,ce,x,Pe)&&(_e=!0,xt=(ae-Pe.x)*(ae-Pe.x)+(a-Pe.y)*(a-Pe.y),xt<b&&(b=xt,E.set(Pe)))}return at&&(y>b&&E.set(Qe),vt.free(Qe)),vt.free(Pe),te&&E.transform(ne),_e},qe.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Xt.prototype.Gj.call(this)},qe.v=function(a){if(!su(this)){Xt.prototype.v.call(this,a),a=null,(this.na===Rn.Auto||this.na===Rn.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=Cl(E,!1);(E instanceof fl||E instanceof Rn||E instanceof Vo||te!==Ln)&&E.v(!0)}}}},qe.Uj=function(){if(!su(this)){Ys(this,!0),Fh(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},qe.Uk=function(){if(!(this.l&2048)){Tu(this,!0),gu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},qe.Wu=function(){gu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},qe.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 ae=this.maxSize;isNaN(te.width)||(a=Math.min(te.width,ae.width)),isNaN(te.height)||(y=Math.min(te.height,ae.height)),a=Math.max(x,a),y=Math.max(b,y);var ce=this.yb;a=Math.max(a-ce.left-ce.right,0),y=Math.max(y-ce.top-ce.bottom,0);var _e=this.O.s;_e.length!==0&&this.na.measure(this,a,y,_e,E,x,b),a=E.width+ce.left+ce.right,ce=E.height+ce.top+ce.bottom,isFinite(te.width)&&(a=te.width),isFinite(te.height)&&(ce=te.height),a=Math.min(ae.width,a),ce=Math.min(ae.height,ce),a=Math.max(ne.width,a),ce=Math.max(ne.height,ce),a=Math.max(x,a),ce=Math.max(b,ce),ss(E,a,ce),ss(this.naturalBounds,a,ce),this.Ge(0,0,a,ce)},qe.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 gc(a){return a.part!==null?a.part.locationObject:null}qe.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=Cl(this,!0);var te=this.measuredBounds;y=te.width,te=te.height;var ne=this.Kg,ae=ne.left+ne.right;switch(ne=ne.top+ne.bottom,y===x&&te===b&&(a=Ln),a){case Ln:(y>x||te>b)&&(this.v(),this.measure(y>x?x:y,te>b?b:te,0,0));break;case Nn:this.v(!0),this.measure(x+ae,b+ne,0,0);break;case Li:this.v(!0),this.measure(x+ae,te+ne,0,0);break;case Bi:this.v(!0),this.measure(y+ae,b+ne,0,0)}}this.na.arrange(this,E,this.jg)}},qe.gh=function(a){var y=this.naturalBounds,x=gc(this);if(Co(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=vt.allocAt(0,0);b--;){var te=y[b];if((te.visible||te===x)&&(br(E.set(a),te.transform),te.ca(E)))return vt.free(E),!0}return vt.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},qe.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},qe.qm=function(a,y){if(y(this,a),a instanceof Rn){a=a.O.s;for(var x=a.length,b=0;b<x;b++)this.qm(a[b],y)}};function qd(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 Rn&&a1(a,te,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof Rn){y=y.O.s;for(var b=y.length,E=0;E<b;E++)l1(a,y[E],x)}}qe.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof Rn){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}qe.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=fg(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof Rn){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 Rn?x=Math.max(x,h1(E)):E instanceof mr&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}qe.se=function(){return!(this.type===Rn.TableRow||this.type===Rn.TableColumn)};function Rc(a){return a.type===Rn.TableRow||a.type===Rn.TableColumn}qe.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),cl(this)))return null;var b=this.naturalBounds,E=1/this.Df(),te=this.se(),ne=te?a:br(vt.allocAt(a.x,a.y),this.transform),ae=this.diagram,ce=10,_e=5;if(ae!==null&&(ce=ae.Ql("extraTouchArea"),_e=ce/2),Co(-(_e*E),-(_e*E),b.width+ce*E,b.height+ce*E,ne.x,ne.y)){if(!this.isAtomic){E=this.O.s;var Pe=E.length;if(ae=vt.alloc(),_e=(ce=this.isClipping&&this.na===Rn.Spot)?this.Pb():null,ce&&(_e.se()?br(ae.set(a),_e.transform):ae.set(a),!_e.ca(ae)))return vt.free(ae),te||vt.free(ne),null;for(var Ne=gc(this);Pe--;){var Ge=E[Pe];if((Ge.visible||Ge===Ne)&&(Ge.se()?br(ae.set(a),Ge.transform):ae.set(a),!ce||Ge!==_e)){var Ye=null;if(Ge instanceof Rn?Ye=Ge.ic(ae,y,x):Ge.pickable===!0&&Ge.ca(ae)&&(Ye=Ge),Ye!==null&&(y!==null&&(Ye=y(Ye)),Ye!==null&&(x===null||x(Ye))))return vt.free(ae),te||vt.free(ne),Ye}}vt.free(ae)}return this.background===null&&this.areaBackground===null?(te||vt.free(ne),null):(a=Co(0,0,b.width,b.height,ne.x,ne.y)?this:null,te||vt.free(ne),a)}return te||vt.free(ne),null},qe.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:br(vt.allocAt(a.x,a.y),this.transform);if(E=Co(0,0,E.width,E.height,ne.x,ne.y),Rc(this)||E){if(!this.isAtomic){for(var ae=this.O.s,ce=ae.length,_e=vt.alloc(),Pe=gc(this);ce--;){var Ne=ae[ce];if(Ne.visible||Ne===Pe){Ne.se()?br(_e.set(a),Ne.transform):_e.set(a);var Ge=Ne;Ne=Ne instanceof Rn?Ne:null,(Ne!==null?Ne.ji(_e,y,x,b):Ge.ca(_e))&&Ge.pickable!==!1&&(y!==null&&(Ge=y(Ge)),Ge===null||x!==null&&!x(Ge)||b.add(Ge))}}vt.free(_e)}return te||vt.free(ne),E&&(this.background!==null||this.areaBackground!==null)}return te||vt.free(ne),!1},qe.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=xr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&xr.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var ae=gc(this),ce=this.O.s,_e=ce.length;_e--;){var Pe=ce[_e];if(Pe.visible||Pe===ae){var Ne=Pe.actualBounds,Ge=this.naturalBounds;Ne.x>Ge.width||Ne.y>Ge.height||0>Ne.x+Ne.width||0>Ne.y+Ne.height||(Ne=Pe,Pe=Pe instanceof Rn?Pe:null,Ge=xr.alloc(),Ge.set(ne),(Pe!==null?Pe.Cf(a,y,x,b,E,Ge):da(Ne,a,b,Ge))&&(y!==null&&(Ne=y(Ne)),Ne===null||x!==null&&!x(Ne)||E.add(Ne)),xr.free(Ge))}}return te===void 0&&xr.free(ne),b}return te===void 0&&xr.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 ae=ne.actualBounds,ce=a.naturalBounds;ae.x>ce.width||ae.y>ce.height||0>ae.x+ae.width||0>ae.y+ae.height||(ne instanceof Rn&&vv(ne,y,x,b),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||b.add(ne))}}}qe.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,ae=this.se(),ce=ae?a:br(vt.allocAt(a.x,a.y),this.transform),_e=ae?y:br(vt.allocAt(y.x,y.y),this.transform),Pe=ce.Bf(_e),Ne=0<ce.x&&ce.x<ne.width&&0<ce.y&&ce.y<ne.height||ir(ce.x,ce.y,0,0,0,ne.height)<=Pe||ir(ce.x,ce.y,0,ne.height,ne.width,ne.height)<=Pe||ir(ce.x,ce.y,ne.width,ne.height,ne.width,0)<=Pe||ir(ce.x,ce.y,ne.width,0,0,0)<=Pe;if(ne=ce.zd(0,0)<=Pe&&ce.zd(0,ne.height)<=Pe&&ce.zd(ne.width,0)<=Pe&&ce.zd(ne.width,ne.height)<=Pe,ae||(vt.free(ce),vt.free(_e)),Ne){if(!this.isAtomic){ce=vt.alloc(),_e=vt.alloc(),Pe=gc(this);for(var Ge=this.O.s,Ye=Ge.length;Ye--;){var Qe=Ge[Ye];if(Qe.visible||Qe===Pe){var at=Qe.actualBounds,Ct=this.naturalBounds;(!ae||!(at.x>Ct.width||at.y>Ct.height||0>at.x+at.width||0>at.y+at.height))&&(Qe.se()?(at=Qe.transform,br(ce.set(a),at),br(_e.set(y),at)):(ce.set(a),_e.set(y)),at=Qe,Qe=Qe instanceof Rn?Qe:null,(Qe!==null?Qe.og(ce,_e,x,b,E,te):at.tx(ce,_e,E))&&(x!==null&&(at=x(at)),at===null||b!==null&&!b(at)||te.add(at)))}}vt.free(ce),vt.free(_e)}return E?Ne:ne}return!1};function yv(a){var y=null;return a instanceof mr&&(y=a.spot1,y===ma&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Ls),y}function Sv(a){var y=null;return a instanceof mr&&(y=a.spot2,y===ma&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=ka),y}qe.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},qe.M=function(a){return this.O.M(a)},qe.Gb=function(a,y){y instanceof Ni&&rn("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&rn("Cannot make a Panel contain itself: "+this.toString()),rn("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&rn("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!==Rn.Grid||y instanceof mr||rn("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Rn.Graduated||y instanceof mr||y instanceof Vo||rn("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 Dn),this.ge.add(b,y))}var E=this.O;if(b=-1,x===this){for(var te=-1,ne=this.O.s,ae=ne.length,ce=0;ce<ae;ce++)if(ne[ce]===y){te=ce;break}if(te!==-1){if(te===a||te+1>=E.count&&a>=E.count)return;E.mb(te),b=te}else rn("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),su(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Rn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Tm(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof ii&&(x.Te=!0),x.Te&&x instanceof ii&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(Os,"elements",this,y,null,b,null),x.cb(bs,"elements",this,null,y,null,a)))};function xv(a,y){a.l=y?a.l|16777216:a.l&-16777217}qe.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)},qe.mb=function(a){0<=a&&this.pc(a,!0)},qe.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),Ys(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 ii&&(b instanceof Rn?b.qm(b,function(ne,ae){Gv(te,ae,y)}):Gv(te,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||te.cb(Os,"elements",this,b,null,a,null))},qe.Fb=function(a){0>a&&vi(a,">= 0",Rn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Xs;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(bs,"rowdefs",this,null,x,null,a)}return y[a]},qe.oA=function(a){if(0>a&&vi(a,">= 0",Rn,"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(Os,"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 Xs?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}qe.Eb=function(a){0>a&&vi(a,">= 0",Rn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Xs;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(bs,"coldefs",this,null,x,null,a)}return y[a]},qe.jA=function(a){if(0>a&&vi(a,">= 0",Rn,"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(Os,"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 Xs?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}qe.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Am(y,a),this},qe.Hy=function(a,y){return(a=this.Fb(a))&&Am(a,new Xs(y)),this},qe.By=function(a,y){return(a=this.Eb(a))&&Am(a,new Xs(y)),this},qe.nz=function(a){if(0>a||this.type!==Rn.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},qe.fz=function(a){if(0>a||this.type!==Rn.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},qe.Fz=function(a,y){if(y===void 0&&(y=new vt(NaN,NaN)),this.type!==Rn.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)},qe.Gz=function(a){if(this.type!==Rn.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&&rn("Template cannot have .data be non-null: "+a),a.allBindings=y=new zn;else if(y._isFrozen)return;var x=new zn;xv(a,!1),a.qm(a,function(_e,Pe){Pe.th();var Ne=Pe.localBindings;if(Ne!==null)for(Pf(Pe,!1),Ne=Ne.iterator;Ne.next();){var Ge=Ne.value;Ge.mode===Rg&&Pf(Pe,!0);var Ye=Ge.sourceName;Ye!==null&&(Ye==="/"&&xv(_e,!0),Ye=LS(Ge,_e,Pe),Ye!==null&&(x.add(Ye),Ye.srcBindings===null&&(Ye.srcBindings=new zn),Ye.srcBindings.add(Ge))),y.add(Ge)}if(Pe instanceof Rn&&Pe.type===Rn.Table){if(0<Pe.rowCount){for(_e=Pe.rowDefs,Ne=_e.length,Ge=0;Ge<Ne;Ge++)if(Ye=_e[Ge],Ye!==void 0&&Ye.be!==null)for(var Qe=Ye.be.iterator;Qe.next();){var at=Qe.value;at.xd=Ye,at.to=2,at.wl=Ye.index,y.add(at)}}if(0<Pe.columnCount){for(Pe=Pe.colDefs,_e=Pe.length,Ne=0;Ne<_e;Ne++)if(Ge=Pe[Ne],Ge!==void 0&&Ge.be!==null)for(Ye=Ge.be.iterator;Ye.next();)Qe=Ye.value,Qe.xd=Ge,Qe.to=1,Qe.wl=Ge.index,y.add(Qe)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){Pf(E,!0);for(var te=E.srcBindings.iterator;te.next();){var ne=te.value;E.localBindings===null&&(E.localBindings=new zn),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 ae=E.targetProperty,ce=ae.indexOf(".");0<ce&&te instanceof Rn&&(ne=ae.substring(0,ce),ae=ae.substr(ce+1),ce=te.fb(ne),ce!==null?(te=ce,E.targetProperty=ae):_i('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),te instanceof Xs?(ne=Ft(te.panel),E.Ai=ne===void 0?-1:ne,te.panel.bindingId=E.Ai):te instanceof Xt?(ne=Ft(te),E.Ai=ne===void 0?-1:ne,te.bindingId=E.Ai):rn("Unknown type of binding target: "+te)}y.freeze(),a instanceof Ni&&a.Zc()&&a.Va()}qe.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof Rn&&(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},qe.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 Rn))continue;E===1?te=te.Eb(x.wl):E===2&&(te=te.Fb(x.wl))}te!==void 0&&x.Mv(te,b)}}},qe.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 Rn&&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 Rn)||te.data!==y[ne])return!0;E++,ne++}return!1}function fg(a){if(a.type===Rn.Spot||a.type===Rn.Auto)return Math.min(a.O.length,1);if(a.type===Rn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof mr&&b.isPanelMain))break}return x}return a.type===Rn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Rn&&Rc(a))?1:0}qe.mv=function(){for(var a=fg(this);this.O.length>a;)this.pc(this.O.length-1,!1);p1(this,this.itemArray)};function p1(a,y){var x=fg(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++)km(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 Rn){if(ne.data!==te){var ae=_v(a,ne.data),ce=_v(a,te),_e=ce!==ae;_e||(ae=bv(a,ae),_e=bv(a,ce)!==ae),_e?(a.pc(b,!1),km(a,te,E,!1)):ne.data=te}}else km(a,te,E,!1)}for(;b<a.O.length;)a.pc(b,!1);a.$g=null,wv(a,x,0),su(a)||a.v(),a.graduatedIntervals=null,a.If()||Tm(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof ii&&(y.Te=!0),y.Te&&y instanceof ii&&(y.wc=null))}}function km(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 Dn),a.ge.add(y,E)),te=x+fg(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 Rn){var E=y,te=x;b.type===Rn.TableRow?b.row=E:b.type===Rn.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=Fs(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;rn("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,_i('No item template Panel found for category "'+y+'" on '+a),_i(" Using default item template."),a=new Rn,y=new Vo,y.bind(new Bs("text","",dr)),a.add(y),m1=a),b=m1)),b}function Tm(a,y,x){var b=y.enabledChanged;if(b!==null&&b(y,x),y instanceof Rn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var te=y[E];x&&te instanceof Rn&&!te.isEnabled||Tm(a,te,x)}}}function bh(a,y){y.name=a,Ku.add(a,y)}ot.Object.defineProperties(Rn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Rn.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&&vi(a,">= 0",Rn,"padding"),a=new Ei(a)):(0>a.left&&vi(a.left,">= 0",Rn,"padding:value.left"),0>a.right&&vi(a.right,">= 0",Rn,"padding:value.right"),0>a.top&&vi(a.top,">= 0",Rn,"padding:value.top"),0>a.bottom&&vi(a.bottom,">= 0",Rn,"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:ds},set:function(a){typeof a=="number"&&(a=new Ei(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new yu),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 Po)&&(a instanceof Po&&a.freeze(),this.T===null&&(this.T=new yu),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 yu),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)||rn("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 yu),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 Po)&&(a instanceof Po&&a.freeze(),this.T===null&&(this.T=new yu),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 yu),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)||rn("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 yu),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 yu),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||rn("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&xh(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()||rn("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&xh(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 mc),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),Ma(this)&&(a=this.part,a!==null&&ts(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 mc),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),Ma(this)&&(a=this.part,a!==null&&ts(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 mc),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 mc),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 mc,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 mc,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 mc,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 mc,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 yu),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new yu),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:Dm},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new yu),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:Dm},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new yu),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)&&rn("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new yu),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)&&rn("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new yu),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 Ni&&!(this instanceof $r);Nu(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof Gn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Ni&&(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 Cf),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 Dn}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Ni||a.isPanelMain)&&rn("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(););wr(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&&(wr(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 ur&&(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&&Tm(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(Rn,{Position:{get:function(){return Ku.I("Position")}},Horizontal:{get:function(){return Ku.I("Horizontal")}},Vertical:{get:function(){return Ku.I("Vertical")}},Spot:{get:function(){return Ku.I("Spot")}},Auto:{get:function(){return Ku.I("Auto")}},Table:{get:function(){return Ku.I("Table")}},Viewbox:{get:function(){return Ku.I("Viewbox")}},TableRow:{get:function(){return Ku.I("TableRow")}},TableColumn:{get:function(){return Ku.I("TableColumn")}},Link:{get:function(){return Ku.I("Link")}},Grid:{get:function(){return Ku.I("Grid")}},Graduated:{get:function(){return Ku.I("Graduated")}}}),Rn.prototype.rebuildItemElements=Rn.prototype.mv,Rn.prototype.findItemPanelForData=Rn.prototype.sx,Rn.prototype.updateTargetBindings=Rn.prototype.La,Rn.prototype.copyTemplate=Rn.prototype.Uy,Rn.prototype.graduatedValueForPoint=Rn.prototype.Gz,Rn.prototype.graduatedPointForValue=Rn.prototype.Fz,Rn.prototype.findColumnForLocalX=Rn.prototype.fz,Rn.prototype.findRowForLocalY=Rn.prototype.nz,Rn.prototype.addColumnDefinition=Rn.prototype.By,Rn.prototype.addRowDefinition=Rn.prototype.Hy,Rn.prototype.addRowColumnDefinition=Rn.prototype.Gy,Rn.prototype.removeColumnDefinition=Rn.prototype.jA,Rn.prototype.getColumnDefinition=Rn.prototype.Eb,Rn.prototype.removeRowDefinition=Rn.prototype.oA,Rn.prototype.getRowDefinition=Rn.prototype.Fb,Rn.prototype.removeAt=Rn.prototype.mb,Rn.prototype.remove=Rn.prototype.remove,Rn.prototype.insertAt=Rn.prototype.Gb,Rn.prototype.elt=Rn.prototype.M,Rn.prototype.add=Rn.prototype.add,Rn.prototype.findObject=Rn.prototype.fb,Rn.prototype.findInVisualTree=Rn.prototype.Nl,Rn.prototype.walkVisualTreeFrom=Rn.prototype.qm,Rn.prototype.findMainElement=Rn.prototype.Pb;var g1=!1,m1=null,Ku=new Dn;Rn.className="Panel",Rn.definePanelLayout=bh,bh("Position",new vm),bh("Vertical",new Sm),bh("Auto",new wm),bh("Link",new Lm);function mc(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}mc.prototype.copy=function(){var a=new mc;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},mc.className="GradPanelSettings";function yu(){this.Pc=[],this.Oc=[],this.j=this.ob=Dm,this.hb=this.Hb=0,this.Qp=ds,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}yu.prototype.copy=function(a){for(var y=new yu,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},yu.className="TablePanelSettings";function Xs(a){en(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=ma,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Pv,this.hg=cr,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))}Xs.prototype.copy=function(){var a=new Xs;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=Ii(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Am(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=Ii(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}qe=Xs.prototype,qe.qb=function(a){a.classType===Xs&&(this.sizing=a)},qe.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Ft(this)},qe.wi=function(a){this.Me=a},qe.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)},qe.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===Rn.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)},qe.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(Jo,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 Nm(a){if(a.sizing===Pv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}qe.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Bs(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&f1(y)&&rn("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new zn),this.be.add(E),this},ot.Object.defineProperties(Xs.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&&vi(a,">= 0",Xs,"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&&vi(a,">= 0",Xs,"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))&&vi(a,">= 0",Xs,"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&&vi(a,">= 0",Xs,"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 Ei(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&&Lf(a,"RowColumnDefinition.separatorStroke"),a instanceof Po&&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)||rn("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&&Lf(a,"RowColumnDefinition.background"),a instanceof Po&&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}}}),Xs.prototype.computeEffectiveSpacing=Xs.prototype.Wc,Xs.prototype.computeEffectiveSpacingTop=Xs.prototype.Io;var Pv=new dn(Xs,"Default",0),pg=new dn(Xs,"None",1),Dm=new dn(Xs,"ProportionalExtra",2);Xs.className="RowColumnDefinition",Xs.Default=Pv,Xs.None=pg,Xs.ProportionalExtra=Dm;function mr(a,y){Xt.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)}Ve(mr,Xt),mr.prototype.cloneProtected=function(a){Xt.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=Ii(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 Qd(a){a.Na===null?a.Na=new Lv:a.Na.nc&&(a.Na=a.Na.copy())}qe=mr.prototype,qe.th=function(){Xt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},qe.qb=function(a){a===Ln||a===Si||a===Ir||a===cr?this.geometryStretch=a:Xt.prototype.qb.call(this,a)},qe.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Ft(this)};function dp(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 ae=x[0],ce=x[1],_e,Pe,Ne,Ge,Ye,Qe,at=0,Ct=Ti(),xt=2;xt<E;xt+=2)_e=x[xt],Pe=x[xt+1],Ne=_e-ae,ae=Pe-ce,Ne===0&&(Ne=.001),Ge=ae/Ne,Ye=Math.atan2(ae,Ne),Qe=Math.sqrt(Ne*Ne+ae*ae),Ct.push([Ne,Ye,Ge,Qe]),at+=Qe,ae=_e,ce=Pe;ae=x[0],ce=x[1],Ne=b.measuredBounds.width,b instanceof mr&&(Ne-=b.strokeWidth),1>Ne&&(Ne=1),E=x=Ne,_e=ne/2,Pe=_e!==0,xt=0,Qe=Ct[xt],Ne=Qe[0],Ye=Qe[1],Ge=Qe[2],Qe=Qe[3];for(var Tt=0;.1<=at;){if(Tt===0&&(Pe?(E=x,E-=_e,at-=_e,Pe=!1):E=x,E===0&&(E=1)),E>at){bi(Ct);return}E>Qe?(Tt=E-Qe,E=Qe):Tt=0;var Nt=Math.sqrt(E*E/(1+Ge*Ge));if(0>Ne&&(Nt=-Nt),ae+=Nt,ce+=Ge*Nt,a.translate(ae,ce),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(-ae,-ce),at-=E,Qe-=E,Tt!==0){if(xt++,xt===Ct.length){bi(Ct);return}Qe=Ct[xt],Ne=Qe[0],Ye=Qe[1],Ge=Qe[2],Qe=Qe[3],E=Tt}}bi(Ct)}}qe.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&&Es(this,a,b,!0,!1,ne,te);var ae=this.part,ce=this.ig;if(x===null||ce!==0||ae===null||!this.isPanelMain&&ae.Pb()!==this||(ce=ae.type===Rn.Link&&ae instanceof $r&&ae.category==="Selection"&&ae.adornedObject instanceof mr&&ae.adornedPart.Pb()===ae.adornedObject?ae.adornedObject.strokeWidth:0),ce===0&&(x=null),x!==null&&ce!==0&&(Es(this,a,x,!1,!1,ne,te),a.lineWidth=ce,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),te=!1,ae&&y.Gf("drawShadows")&&(te=ae.isShadowed),a.Il===!1&&(te=!1),ae=!0,x===null||b!==null&&b!=="transparent"||(ae=!1),ne=!1,ce=this.strokeDashArray,ce!==null&&(ne=!0,a.js(ce,this.strokeDashOffset)),E.type===Kn.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===Kn.u){var _e=E.startX;ce=E.startY;var Pe=E.endX,Ne=E.endY;E=Math.min(_e,Pe);var Ge=Math.min(ce,Ne);_e=Math.abs(Pe-_e),ce=Math.abs(Ne-ce),a.beginPath(),a.rect(E,Ge,_e,ce),b!==null&&a.ng(b),x!==null&&(ae&&te&&Bh(a),a.jk(),ae&&te&&dc(a)),a.Se()}else if(E.type===Kn.F)_e=E.startX,ce=E.startY,Pe=E.endX,Ne=E.endY,E=Math.abs(Pe-_e)/2,Ge=Math.abs(Ne-ce)/2,_e=Math.min(_e,Pe)+E,ce=Math.min(ce,Ne)+Ge,a.beginPath(),a.moveTo(_e,ce-Ge),a.bezierCurveTo(_e+tn.wg*E,ce-Ge,_e+E,ce-tn.wg*Ge,_e+E,ce),a.bezierCurveTo(_e+E,ce+tn.wg*Ge,_e+tn.wg*E,ce+Ge,_e,ce+Ge),a.bezierCurveTo(_e-tn.wg*E,ce+Ge,_e-E,ce+tn.wg*Ge,_e-E,ce),a.bezierCurveTo(_e-E,ce-tn.wg*Ge,_e-tn.wg*E,ce-Ge,_e,ce-Ge),a.closePath(),b!==null&&a.ng(b),x!==null&&(ae&&te&&Bh(a),a.jk(),ae&&te&&dc(a)),a.Se();else if(E.type===Kn.o)for(E=E.figures,ce=E.length,Ge=0;Ge<ce;Ge++){_e=E.s[Ge],a.beginPath(),a.moveTo(_e.startX,_e.startY),Pe=_e.segments.s,Ne=Pe.length;for(var Ye=null,Qe=0;Qe<Ne;Qe++){var at=Pe[Qe];switch(at.type){case Ds:a.moveTo(at.endX,at.endY);break;case zo:a.lineTo(at.endX,at.endY);break;case la:a.bezierCurveTo(at.point1X,at.point1Y,at.point2X,at.point2Y,at.endX,at.endY);break;case Qa:a.quadraticCurveTo(at.point1X,at.point1Y,at.endX,at.endY);break;case is:if(at.radiusX===at.radiusY){var Ct=Math.PI/180;a.arc(at.point1X,at.point1Y,at.radiusX,at.startAngle*Ct,(at.startAngle+at.sweepAngle)*Ct,0>at.sweepAngle,Ye!==null?Ye.endX:_e.startX,Ye!==null?Ye.endY:_e.startY)}else if(Ye=qa(at,_e),Ct=Ye.length,Ct===0)a.lineTo(at.centerX,at.centerY);else for(var xt=0;xt<Ct;xt++){var Tt=Ye[xt];xt===0&&a.lineTo(Tt[0],Tt[1]),a.bezierCurveTo(Tt[2],Tt[3],Tt[4],Tt[5],Tt[6],Tt[7])}break;case wl:if(xt=Ct=0,Ye!==null&&Ye.type===is){if(Ye=qa(Ye,_e),Tt=Ye.length,Tt===0){a.lineTo(at.endX,at.endY);break}Ye=Ye[Tt-1]||null,Ye!==null&&(Ct=Ye[6],xt=Ye[7])}else Ct=Ye!==null?Ye.endX:_e.startX,xt=Ye!==null?Ye.endY:_e.startY;if(Ye=Dl(at,_e,Ct,xt),Ct=Ye.length,Ct===0){a.lineTo(at.endX,at.endY);break}for(xt=0;xt<Ct;xt++)Tt=Ye[xt],a.bezierCurveTo(Tt[2],Tt[3],Tt[4],Tt[5],Tt[6],Tt[7]);break;default:rn("Segment not of valid type: "+at.type)}at.isClosed&&a.closePath(),Ye=at}Pe=_e.isFilled,te?_e.isShadowed?(Pe===!0&&b!=="transparent"&&b!==null&&a.ng(b,_e.isEvenOdd),x!==null&&(Pe&&ae&&Bh(a),a.jk(),Pe&&ae&&dc(a))):(Bh(a),Pe&&b!=="transparent"&&b!==null&&a.ng(b,_e.isEvenOdd),x!==null&&a.jk(),dc(a)):(Pe&&b!==null&&a.ng(b,_e.isEvenOdd),x!==null&&a.jk()),a.Se(Ge)}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=Ti(),te.type===Kn.j)b.push(te.startX),b.push(te.startY),b.push(te.endX),b.push(te.endY),dp(a,y,b,x);else if(te.type===Kn.o)for(te=te.figures.iterator;te.next();){for(ae=te.value,b.length=0,b.push(ae.startX),b.push(ae.startY),ne=ae.startX,E=ae.startY,ce=ne,Ge=E,_e=ae.segments.s,Pe=_e.length,Ne=0;Ne<Pe;Ne++){switch(Qe=_e[Ne],Qe.type){case Ds:dp(a,y,b,x),b.length=0,b.push(Qe.endX),b.push(Qe.endY),ne=Qe.endX,E=Qe.endY,ce=ne,Ge=E;break;case zo:b.push(Qe.endX),b.push(Qe.endY),ne=Qe.endX,E=Qe.endY;break;case la:tn.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 Qa:tn.ep(ne,E,Qe.point1X,Qe.point1Y,Qe.endX,Qe.endY,.5,b),ne=Qe.endX,E=Qe.endY;break;case is:if(at=qa(Qe,ae),Ye=at.length,Ye===0){b.push(Qe.centerX),b.push(Qe.centerY),ne=Qe.centerX,E=Qe.centerY;break}for(Ct=0;Ct<Ye;Ct++)xt=at[Ct],tn.Qe(ne,E,xt[2],xt[3],xt[4],xt[5],xt[6],xt[7],.5,b),ne=xt[6],E=xt[7];break;case wl:if(at=Dl(Qe,ae,ne,E),Ye=at.length,Ye===0){b.push(Qe.endX),b.push(Qe.endY),ne=Qe.endX,E=Qe.endY;break}for(Ct=0;Ct<Ye;Ct++)xt=at[Ct],tn.Qe(ne,E,xt[2],xt[3],xt[4],xt[5],xt[6],xt[7],.5,b),ne=xt[6],E=xt[7];break;default:rn("Segment not of valid type: "+Qe.type)}Qe.isClosed&&(b.push(ce),b.push(Ge),dp(a,y,b,x))}dp(a,y,b,x)}else if(te.type===Kn.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),dp(a,y,b,x);else if(te.type===Kn.F){if(E=new Gs,E.startX=te.endX,E.startY=(te.startY+te.endY)/2,ne=new Kr(is),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=qa(ne,E),ae=te.length,ae===0)b.push(ne.centerX),b.push(ne.centerY);else for(ne=E.startX,E=E.startY,ce=0;ce<ae;ce++)Ge=te[ce],tn.Qe(ne,E,Ge[2],Ge[3],Ge[4],Ge[5],Ge[6],Ge[7],.5,b),ne=Ge[6],E=Ge[7];dp(a,y,b,x)}bi(b),a.restore(),a.Vc(!1)}}}},qe.kk=function(a,y,x){return!Xt.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)},qe.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:Xt.prototype.nk.call(this,a)},qe.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)}},qe.ga=function(a,y){if(y===void 0&&(y=new vt),a instanceof di){a.Mc()&&rn("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},qe.mi=function(a){a===void 0&&(a=new pn);var y=this.naturalBounds,x=this.oe;y=pn.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=vt.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),fo(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),fo(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),fo(a,b.x,b.y,0,0),pn.free(y),vt.free(b),a},qe.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!==Kn.j||y||(E+=2);var te=pn.alloc();if(te.assign(b),te.Bc(E+2,E+2),!te.ca(a))return pn.free(te),!1;if(b=E+1e-4,x.type===Kn.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:(pn.free(te),tn.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===Kn.u){y=x.startX;var ne=x.startY,ae=x.endX;if(x=x.endY,te.x=Math.min(y,ae),te.y=Math.min(ne,x),te.width=Math.abs(ae-y),te.height=Math.abs(x-ne),this.fill===null){if(te.Bc(-b,-b),te.ca(a))return pn.free(te),!1;te.Bc(b,b)}return this.stroke!==null&&te.Bc(E,E),a=te.ca(a),pn.free(te),a}if(x.type===Kn.F){ne=x.startX,E=x.startY,ae=x.endX;var ce=x.endY;if(x=Math.min(ne,ae),y=Math.min(E,ce),ne=Math.abs(ae-ne)/2,E=Math.abs(ce-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 pn.free(te),!1;ne+=b,E+=b}return this.stroke!==null&&(ne+=b,E+=b),pn.free(te),0>=ne||0>=E?!1:1>=x*x/(ne*ne)+y*y/(E*E)}if(x.type===Kn.o)return pn.free(te),this.fill===null?Dh(x,a.x,a.y,E):Pu(x,a,E,1<this.strokeWidth,y);rn("Unknown Geometry type: "+x.type)},qe.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 ae=this.figure,ce=Ev[ae];if(ce===void 0){var _e=tn.Ze[ae];typeof _e=="string"&&(_e=tn.Ze[_e]),typeof _e=="function"?(ce=_e(null,100,100),Ev[ae]=ce):rn("Unsupported Figure: "+ae)}ne=ce.bounds}ae=ne.width,ce=ne.height,_e=ne.width;var Pe=ne.height;switch(Cl(this,!0)){case Ln:b=x=0;break;case Nn:_e=Math.max(a-te,0),Pe=Math.max(y-te,0);break;case Li:_e=Math.max(a-te,0),b=0;break;case Bi:x=0,Pe=Math.max(y-te,0)}isFinite(E.width)&&(_e=E.width),isFinite(E.height)&&(Pe=E.height);var Ne=this.maxSize,Ge=this.minSize;switch(x=Math.max(x-te,Ge.width),b=Math.max(b-te,Ge.height),_e=Math.min(Ne.width,_e),Pe=Math.min(Ne.height,Pe),_e=isFinite(_e)?Math.max(x,_e):Math.max(ae,x),Pe=isFinite(Pe)?Math.max(b,Pe):Math.max(ce,b),x=Cv(this),x){case Ln:break;case Nn:ae=_e,ce=Pe;break;case Si:x=Math.min(_e/ae,Pe/ce),isFinite(x)||(x=1),ae*=x,ce*=x;break;default:rn(x+" is not a valid geometryStretch.")}this.Rd!==null?(ae===0&&(ae=.001),ce===0&&(ce=.001),x=this.Rd!==null?this.Rd:this.ua,ne=x.bounds,b=ae/ne.width,ne=ce/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&&tn.$(this.ua.Sk,a-te)&&tn.$(this.ua.Rk,y-te)||(this.ua=mr.makeGeometry(this,ae,ce)),ne=this.ua.bounds,a===1/0||y===1/0?this.Ge(ne.x-te/2,ne.y-te/2,a===0&&ae===0?0:ne.width+te,y===0&&ce===0?0:ne.height+te):this.Ge(-(te/2),-(te/2),_e+te,Pe+te),E.w()?(_e=E.width,Pe=E.height,_e=Math.min(Ne.width,_e),Pe=Math.min(Ne.height,Pe),_e=Math.max(Ge.width,_e),Pe=Math.max(Ge.height,Pe),this.dc.h(0,0,_e,Pe)):this.dc.assign(ne)};function Cv(a){var y=a.geometryStretch;return a.Rd!==null?y===cr?Nn:y:y===cr?Ev[a.figure].defaultStretch:y}qe.eh=function(a,y,x,b){il(this,a,y,x,b)},qe.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},qe.Sj=function(a,y,x,b,E){var te=this.transform,ne=1/(te.m11*te.m22-te.m12*te.m21),ae=te.m22*ne,ce=-te.m12*ne,_e=-te.m21*ne,Pe=te.m11*ne,Ne=ne*(te.m21*te.dy-te.m22*te.dx),Ge=ne*(te.m12*te.dx-te.m11*te.dy);te=a*ae+y*_e+Ne,ne=a*ce+y*Pe+Ge,ae=x*ae+b*_e+Ne,ce=x*ce+b*Pe+Ge,Ne=this.ig/2,_e=this.ua,_e===null&&(this.measure(1/0,1/0),_e=this.ua);var Ye=_e.bounds;if(Pe=!1,_e.type===Kn.j)if(1.5>=this.strokeWidth)Pe=tn.Ve(_e.startX,_e.startY,_e.endX,_e.endY,te,ne,ae,ce,E);else{if(_e.startX===_e.endX?(b=Ne,Pe=0):(y=(_e.endY-_e.startY)/(_e.endX-_e.startX),Pe=Ne/Math.sqrt(1+y*y),b=Pe*y),y=Ti(),a=new vt,tn.Ve(_e.startX+b,_e.startY+Pe,_e.endX+b,_e.endY+Pe,te,ne,ae,ce,a)&&y.push(a),a=new vt,tn.Ve(_e.startX-b,_e.startY-Pe,_e.endX-b,_e.endY-Pe,te,ne,ae,ce,a)&&y.push(a),a=new vt,tn.Ve(_e.startX+b,_e.startY+Pe,_e.startX-b,_e.startY-Pe,te,ne,ae,ce,a)&&y.push(a),a=new vt,tn.Ve(_e.endX+b,_e.endY+Pe,_e.endX-b,_e.endY-Pe,te,ne,ae,ce,a)&&y.push(a),ae=y.length,ae===0)return bi(y),!1;for(Pe=!0,ce=1/0,b=0;b<ae;b++)a=y[b],x=(a.x-te)*(a.x-te)+(a.y-ne)*(a.y-ne),x<ce&&(ce=x,E.x=a.x,E.y=a.y);bi(y)}else if(_e.type===Kn.u)Pe=tn.Ff(Ye.x-Ne,Ye.y-Ne,Ye.x+Ye.width+Ne,Ye.y+Ye.height+Ne,te,ne,ae,ce,E);else if(_e.type===Kn.F){y=pn.allocAt(Ye.x,Ye.y,Ye.width,Ye.height).Bc(Ne,Ne);e:if(y.width===0)Pe=tn.Ve(y.x,y.y,y.x,y.y+y.height,te,ne,ae,ce,E);else if(y.height===0)Pe=tn.Ve(y.x,y.y,y.x+y.width,y.y,te,ne,ae,ce,E);else{if(a=y.width/2,_e=y.height/2,b=y.x+a,Pe=y.y+_e,x=9999,te!==ae&&(x=(ne-ce)/(te-ae)),9999>Math.abs(x)){if(ce=ne-Pe-x*(te-b),0>a*a*x*x+_e*_e-ce*ce){E.x=NaN,E.y=NaN,Pe=!1;break e}Ne=Math.sqrt(a*a*x*x+_e*_e-ce*ce),ae=(-(a*a*x*ce)+a*_e*Ne)/(_e*_e+a*a*x*x)+b,a=(-(a*a*x*ce)-a*_e*Ne)/(_e*_e+a*a*x*x)+b,_e=x*(ae-b)+ce+Pe,ce=x*(a-b)+ce+Pe,Math.abs((te-ae)*(te-ae))+Math.abs((ne-_e)*(ne-_e))<Math.abs((te-a)*(te-a))+Math.abs((ne-ce)*(ne-ce))?(E.x=ae,E.y=_e):(E.x=a,E.y=ce)}else{if(ae=_e*_e,ce=te-b,ae-=ae/(a*a)*ce*ce,0>ae){E.x=NaN,E.y=NaN,Pe=!1;break e}ce=Math.sqrt(ae),ae=Pe+ce,ce=Pe-ce,Math.abs(ae-ne)<Math.abs(ce-ne)?(E.x=te,E.y=ae):(E.x=te,E.y=ce)}Pe=!0}pn.free(y)}else if(_e.type===Kn.o){Ge=vt.alloc();var Qe=ae-te,at=ce-ne,Ct=Qe*Qe+at*at,xt=te,Tt=ne;if(0<Ct&&Ye.contains(xt,Tt)&&(Ge.x=xt,Ge.y=Tt,this.ca(Ge)))for(Qe!==0&&.5>Math.abs(Qe)?(at*=.5/Qe,Qe=.5):at!==0&&.5>Math.abs(at)&&(Qe*=.5/at,at=.5),xt-=Qe,Tt-=at;Ye.contains(xt,Tt);)xt-=Qe,Tt-=at;for(E.x=ae,E.y=ce,at=0;at<_e.figures.count;at++){var Nt=_e.figures.s[at],It=Nt.isFilled?xt:te,Zt=Nt.isFilled?Tt:ne,un=Nt.segments;Ye=Nt.startX,Qe=Nt.startY;for(var $n=Ye,fi=Qe,ai=0;ai<un.count;ai++){var Un=un.s[ai],Pn=Un.type,ar=Un.endX,Ji=Un.endY,lo=!1;switch(Pn){case Ds:$n=ar,fi=Ji;break;case zo:lo=Rm(Ye,Qe,ar,Ji,It,Zt,ae,ce,Ge);break;case la:lo=tn.Eo(Ye,Qe,Un.point1X,Un.point1Y,Un.point2X,Un.point2Y,ar,Ji,It,Zt,ae,ce,.6,Ge);break;case Qa:lo=tn.Eo(Ye,Qe,Ye+2/3*(Un.point1X-Ye),Qe+2/3*(Un.point1Y-Qe),ar+2/3*(Un.point1X-ar),Ji+2/3*(Un.point1Y-Ji),ar,Ji,It,Zt,ae,ce,.6,Ge);break;case is:case wl:Pn=Un.type===is?qa(Un,Nt):Dl(Un,Nt,Ye,Qe);var Ho=Pn.length;if(Ho===0){lo=Rm(Ye,Qe,Un.type===is?Un.centerX:Un.endX,Un.type===is?Un.centerY:Un.endY,It,Zt,ae,ce,Ge);break}for(Ji=null,ar=0;ar<Ho;ar++){if(Ji=Pn[ar],ar===0&&Rm(Ye,Qe,Ji[0],Ji[1],It,Zt,ae,ce,Ge)){var fa=Om(It,Zt,Ge,Ct,E);fa<Ct&&(Ct=fa,Pe=!0)}tn.Eo(Ji[0],Ji[1],Ji[2],Ji[3],Ji[4],Ji[5],Ji[6],Ji[7],It,Zt,ae,ce,.6,Ge)&&(fa=Om(It,Zt,Ge,Ct,E),fa<Ct&&(Ct=fa,Pe=!0))}ar=Ji[6],Ji=Ji[7];break;default:rn("Unknown Segment type: "+Pn)}Ye=ar,Qe=Ji,lo&&(lo=Om(It,Zt,Ge,Ct,E),lo<Ct&&(Ct=lo,Pe=!0)),Un.isClosed&&(ar=$n,Ji=fi,Rm(Ye,Qe,ar,Ji,It,Zt,ae,ce,Ge)&&(Un=Om(It,Zt,Ge,Ct,E),Un<Ct&&(Ct=Un,Pe=!0)))}}te=x-a,ne=b-y,ae=Math.sqrt(te*te+ne*ne),ae!==0&&(te/=ae,ne/=ae),E.x-=te*Ne,E.y-=ne*Ne,vt.free(Ge)}else rn("Unknown Geometry type: "+_e.type);return Pe?(this.transform.Ga(E),!0):!1};function Om(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 Rm(a,y,x,b,E,te,ne,ae,ce){if(tn.$(a,x)&&tn.$(y,b)||tn.$(E,ne)&&tn.$(te,ae))return!1;var _e=!1,Pe=(E-ne)*(y-b)-(te-ae)*(a-x);return Pe===0?!1:(ce.x=((E*ae-te*ne)*(a-x)-(E-ne)*(a*b-y*x))/Pe,ce.y=((E*ae-te*ne)*(y-b)-(te-ae)*(a*b-y*x))/Pe,(a>x?a-x:x-a)<(y>b?y-b:b-y)?(a=y<b?y:b,y=y<b?b:y,(ce.y>a||tn.$(ce.y,a))&&(ce.y<y||tn.$(ce.y,y))&&(_e=!0)):(y=a<x?a:x,a=a<x?x:a,(ce.x>y||tn.$(ce.x,y))&&(ce.x<a||tn.$(ce.x,a))&&(_e=!0)),_e)}qe.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=vt.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)))),vt.free(te),E},qe.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=xr.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,te=a.top;a=a.bottom;var ne=vt.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 vt.free(ne),!0;var ae=vt.alloc(),ce=vt.alloc();return x.set(y),x.bv(this.transform),x.Vj(),ae.x=E,ae.y=te,ae.transform(x),ne.x=b,ne.y=te,ne.transform(x),y=!1,$d(this,ne,ae,ce)?y=!0:(ne.x=E,ne.y=a,ne.transform(x),$d(this,ne,ae,ce)?y=!0:(ae.x=b,ae.y=a,ae.transform(x),$d(this,ne,ae,ce)?y=!0:(ne.x=b,ne.y=te,ne.transform(x),$d(this,ne,ae,ce)&&(y=!0)))),vt.free(ne),xr.free(x),vt.free(ae),vt.free(ce),y};function $d(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)}qe.tx=function(a,y,x){function b(Ct,xt){for(var Tt=Ct.length,Nt=0;Nt<Tt;Nt+=2)if(xt.zd(Ct[Nt],Ct[Nt+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,ae=ne.x,ce=ne.y,_e=ne.x+ne.width;if(ne=ne.y+ne.height,Pi(a.x,a.y,ae,ce)<=E&&Pi(a.x,a.y,_e,ce)<=E&&Pi(a.x,a.y,ae,ne)<=E&&Pi(a.x,a.y,_e,ne)<=E)return!0}if(ae=y.startX,ce=y.startY,_e=y.endX,ne=y.endY,y.type===Kn.j){if(x=(ae-_e)*(a.x-_e)+(ce-ne)*(a.y-ne),ir(a.x,a.y,ae,ce,_e,ne)<=(0<=(_e-ae)*(a.x-ae)+(ne-ce)*(a.y-ce)&&0<=x?E:te))return!0}else{if(y.type===Kn.u)return y=!1,x&&(y=ir(a.x,a.y,ae,ce,ae,ne)<=E||ir(a.x,a.y,ae,ce,_e,ce)<=E||ir(a.x,a.y,_e,ce,_e,ne)<=E||ir(a.x,a.y,ae,ne,_e,ne)<=E),y;if(y.type===Kn.F){y=a.x-(ae+_e)/2,te=a.y-(ce+ne)/2;var Pe=Math.abs(_e-ae)/2,Ne=Math.abs(ne-ce)/2;if(Pe===0||Ne===0)return ir(a.x,a.y,ae,ce,_e,ne)<=E;if(x){if(a=tn.$y(Pe,Ne,y,te),a*a<=E)return!0}else return!(Pi(y,te,-Pe,0)>=E||Pi(y,te,0,-Ne)>=E||Pi(y,te,0,Ne)>=E||Pi(y,te,Pe,0)>=E)}else if(y.type===Kn.o){if(_e=y.bounds,te=_e.x,ae=_e.y,ce=_e.x+_e.width,_e=_e.y+_e.height,a.x>ce&&a.x<te&&a.y>_e&&a.y<ae&&ir(a.x,a.y,te,ae,te,_e)>E&&ir(a.x,a.y,te,ae,ce,ae)>E&&ir(a.x,a.y,ce,_e,te,_e)>E&&ir(a.x,a.y,ce,_e,ce,ae)>E)return!1;if(te=Math.sqrt(E),x){if(this.fill===null?Dh(y,a.x,a.y,te):Pu(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,Pe=te.startY,a.zd(ne,Pe)>E)return!1;for(ae=te.segments.s,ce=ae.length,_e=0;_e<ce;_e++)switch(Ne=ae[_e],Ne.type){case Ds:case zo:if(ne=Ne.endX,Pe=Ne.endY,a.zd(ne,Pe)>E)return!1;break;case la:var Ge=Ti();if(tn.Qe(ne,Pe,Ne.point1X,Ne.point1Y,Ne.point2X,Ne.point2Y,Ne.endX,Ne.endY,.8,Ge),ne=b(Ge,a),bi(Ge),ne||(ne=Ne.endX,Pe=Ne.endY,a.zd(ne,Pe)>E))return!1;break;case Qa:if(Ge=Ti(),tn.ep(ne,Pe,Ne.point1X,Ne.point1Y,Ne.endX,Ne.endY,.8,Ge),ne=b(Ge,a),bi(Ge),ne||(ne=Ne.endX,Pe=Ne.endY,a.zd(ne,Pe)>E))return!1;break;case is:case wl:Ge=Ne.type===is?qa(Ne,te):Dl(Ne,te,ne,Pe);var Ye=Ge.length;if(Ye===0){if(ne=Ne.type===is?Ne.centerX:Ne.endX,Pe=Ne.type===is?Ne.centerY:Ne.endY,a.zd(ne,Pe)>E)return!1;break}Ne=null;for(var Qe=Ti(),at=0;at<Ye;at++)if(Ne=Ge[at],Qe.length=0,tn.Qe(Ne[0],Ne[1],Ne[2],Ne[3],Ne[4],Ne[5],Ne[6],Ne[7],.8,Qe),b(Qe,a))return bi(Qe),!1;bi(Qe),Ne!==null&&(ne=Ne[6],Pe=Ne[7]);break;default:rn("Unknown Segment type: "+Ne.type)}}return!0}}}return!1},qe.qc=function(){this.ua=null},qe.kq=function(){return this.ig};function v1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=bg,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=xa):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new di(1-xa.x,xa.y)))}mr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=zh[a.toArrow];else a.fromArrow!=="None"?b=zh[a.fromArrow]:(b=tn.Ze[a.figure],typeof b=="string"&&(b=tn.Ze[b]),b===void 0&&rn("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=tn.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function y1(a){var y=zh[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=zh[x],y===void 0){var b=null,E;for(E in tn.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=Kn.parse(tn.um[b],!1),zh[b]=a,x!==b&&(zh[x]=b),b}}return typeof y=="string"?y:y instanceof Kn?a:null}ot.Object.defineProperties(mr.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),Ma(this)&&(a=this.part,a!==null&&ts(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=Kn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=vt.allocAt(-y.x,-y.y),vt.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&&Lf(a,"Shape.fill"),a instanceof Po&&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&&Lf(a,"Shape.stroke"),a instanceof Po&&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 vi(a,"value >= 0",mr,"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"?vi(a,'"butt", "round", or "square"',mr,"strokeCap"):(Qd(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"?vi(a,'"miter", "bevel", or "round"',mr,"strokeJoin"):(Qd(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){Qd(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)||rn("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&&(Qd(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=tn.Ze[a];typeof x=="function"?x=a:(x=tn.Ze[a.toLowerCase()])||rn("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?rn("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new cd),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?rn("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new cd),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:ma},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Qd(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:ma},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Qd(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&&(Qd(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:cr},set:function(a){var y=this.geometryStretch;y!==a&&(Qd(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 Uh),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&xh(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 Uh),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 Uh),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 Uh),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),mr.prototype.intersectsRect=mr.prototype.Yc,mr.prototype.containedInRect=mr.prototype.fh,mr.prototype.getNearestIntersectionPoint=mr.prototype.rs,mr.prototype.getDocumentBounds=mr.prototype.mi,mr.prototype.getDocumentPoint=mr.prototype.ga;var zh=new $i,Ev=new $i;mr.className="Shape",mr.getFigureGenerators=function(){var a=new Dn,y;for(y in tn.Ze)y!==y.toLowerCase()&&a.add(y,tn.Ze[y]);return a.freeze(),a},mr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=tn.Ze;b[a]=y,b[x]=a},mr.getArrowheadGeometries=function(){var a=new Dn;for(b in tn.um)if(zh[b]===void 0){var y=Kn.parse(tn.um[b],!1);zh[b]=y,y=b.toLowerCase(),y!==b&&(zh[y]=b)}for(var x in zh)if(x!==x.toLowerCase()){var b=zh[x];b instanceof Kn&&a.add(x,b)}return a.freeze(),a},mr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Kn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||rn("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=zh;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=cr,this.gg=this.fg=ma}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 Vo(a,y){return Xt.call(this),zm||(El=Ps?new Au(null).context:null,zm=!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}Ve(Vo,Xt),Vo.prototype.cloneProtected=function(a){Xt.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 Ph(a){a.da===null?a.da=new Ov:a.da.nc&&(a.da=a.da.copy())}qe=Vo.prototype,qe.th=function(){Xt.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}qe.qb=function(a){a.classType===Vo?this.wrap=a:Xt.prototype.qb.call(this,a)},qe.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},qe.v=function(){Xt.prototype.v.call(this)},qe.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=mg(this),ae=a.textAlign=this.textAlign,ce=y.tn;ae==="start"?ae=ce?"right":"left":ae==="end"&&(ae=ce?"left":"right"),ce=this.isUnderline;var _e=this.isStrikethrough;Es(this,a,this.xc,!0,!1,x,b),(ce||_e)&&Es(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var Pe=this.oe,Ne=Pe.dx-(ne*Pe.m21+Pe.dx);Pe=Pe.dy-(ne*Pe.m22+Pe.dy);var Ge=y.scale;switch(8>(Ne*Ne+Pe*Pe)*Ge*Ge&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Xl&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,Ne=this.spacingBelow,this.flip){case Wr:a.translate(E,0),a.scale(-1,1);break;case Pr:a.translate(0,te),a.scale(1,-1);break;case No:a.translate(E,te),a.scale(-1,-1)}if(a.yc(),Pe=this.Gc,Ge=(y+ne+Ne)*Pe,te>Ge&&(b=this.verticalAlignment,b=b.y*te-b.y*Ge+b.offsetY),Pe===1&&this.ze!==null)Ne=this.Cb,Ne>E&&(Ne=E),this.Oj(this.ze,a,0,b+y,E,ne,Ne,x,ae,ce,_e);else if(this.Qc!==null&&this.Qb!==null)for(Ge=0;Ge<Pe;Ge++){var Ye=this.Qc[Ge];Ye>E&&(Ye=E),b+=y,this.Oj(this.Qb[Ge],a,0,b,E,ne,Ye,x,ae,ce,_e),b+=ne+Ne}switch(this.flip){case Wr:a.scale(-1,1),a.translate(-E,0);break;case Pr:a.scale(1,-1),a.translate(0,-te);break;case No:a.scale(-1,-1),a.translate(-E,-te)}}},qe.Oj=function(a,y,x,b,E,te,ne,ae,ce,_e,Pe){var Ne=0;if(ae)ce==="left"?Ne=0:ce==="right"?Ne=E-ne:ce==="center"&&(Ne=(E-ne)/2),y.fillRect(x+Ne,b+.25*te,ne,1);else{if(ce==="left"?Ne=0:ce==="right"?Ne=E:ce==="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),ce==="right"?Ne-=ne:ce==="center"&&(Ne-=ne/2),_e){ae=Fm!==null?Fm(this,te):.8*te,ce=x+Ne,_e=b+ae,E=x+Ne+ne,ae=b+ae;var Ge=a;y.beginPath(),y.lineWidth=Ge,y.moveTo(ce,_e),y.lineTo(E,ae),y.stroke(),y.Se(),y instanceof Xl&&y.ad.classList.add("gojs-td")}Pe&&(Pe=b+te-te/2.2|0,a%2!==0&&(Pe+=.5),b=x+Ne,te=Pe,x=x+Ne+ne,ne=Pe,Ne=a,y.beginPath(),y.lineWidth=Ne,y.moveTo(b,te),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof Xl&&y.ad.classList.add("gojs-td"))}},qe.kk=function(a,y,x){if(!Xt.prototype.kk.call(this,a,y,x))return!1;if(Es(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},qe.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Xt.prototype.nk.call(this,a)},qe.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)}},qe.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var te=this.Ae;El!==null&&E1!==te&&(E1=El.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 ae=ne=0,ce=!1;!ce;){var _e=te.indexOf(`
|
|
|
`,ae);_e===-1&&(_e=te.length,ce=!0),ae=te.substr(ae,_e-ae),this.formatting===vg&&(ae=ae.trim()),ne=Math.max(ne,Vu(ae)),ae=_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,ce=ne,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Bm&&(y=this.Ae,y=this.overflow===Bm?x1(y):0,_e=this.spacingAbove+this.spacingBelow,_e=Math.max(0,mg(this)+_e),ce=Math.min(this.maxLines-1,Math.max(Math.floor(ce/_e+.01)-1,0)),!(ce+1>=this.Qb.length))){for(this.l|=16777216,_e=this.Qb[ce],y=Math.max(1,a-y);Vu(_e)>y&&1<_e.length;)_e=_e.substr(0,_e.length-1);_e+=yg,y=Vu(_e),this.Qb[ce]=_e,this.Qb=this.Qb.slice(0,ce+1),this.Qc[ce]=y,this.Qc=this.Qc.slice(0,ce+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),ss(this.dc,te,ne),this.Ge(0,0,te,ne),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},qe.eh=function(a,y,x,b){il(this,a,y,x,b)};function gg(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===vg;E&&(y=y.trim());var te=0,ne=a.Ae,ae=a.spacingAbove+a.spacingBelow;ae=Math.max(0,mg(a)+ae);var ce=a.overflow===Bm?x1(ne):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,ae);else if(ne=y,a.wrap===kv){a.Le=1;var _e=Vu(y);if(ce===0||_e<=x)a.Cb=Math.max(a.Cb,_e),gg(a,y,a.Cb),b!==null&&b.h(_e,ae);else{for(te=fp(a,ne),ne=ne.substr(te.length),y=fp(a,ne),_e=Vu(te+y);0<y.length&&_e<=x;)te+=y,ne=ne.substr(y.length),y=fp(a,ne),_e=te+y,E&&(_e=_e.trim()),_e=Vu(_e);for(E&&(y=y.trim()),te+=y,x=Math.max(1,x-ce);Vu(te)>x&&1<te.length;)te=te.substr(0,te.length-1);a.l|=16777216,te+=yg;var Pe=Vu(te);a.Cb=Pe,gg(a,te,Pe),b!==null&&b.h(Pe,ae)}}else{for(ce=0,ne.length===0&&(ce=1,gg(a,ne,0));0<ne.length;){for(y=fp(a,ne),ne=ne.substr(y.length);Vu(y)>x;){var Ne=1;for(_e=Vu(y.substr(0,Ne)),Pe=0;_e<=x;)Ne++,Pe=_e,_e=Vu(y.substr(0,Ne));if(Ne===1){var Ge=_e;te=Math.max(te,_e)}else Ge=Pe,te=Math.max(te,Pe);if(Ne--,1>Ne&&(Ne=1),gg(a,y.substr(0,Ne),Ge),ce++,y=y.substr(Ne),a.Gc+ce>a.maxLines)break}for(Pe=fp(a,ne),_e=Vu(y+Pe);0<Pe.length&&_e<=x;)y+=Pe,ne=ne.substr(Pe.length),Pe=fp(a,ne),_e=y+Pe,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"),Pe.length===0?(Ne=_e,te=Math.max(te,_e)):(Ne=Pe=Vu(y),te=Math.max(te,Pe)),gg(a,y,Ne),ce++,a.Gc+ce>a.maxLines))break}a.Le=Math.min(a.maxLines,ce),a.Cb=Math.max(a.Cb,te),b!==null&&b.h(a.Cb,ae*a.Le)}}function fp(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 El===null?8*a.length:El.measureText(a).width}function mg(a){if(a.df!==null)return a.df;var y=a.Ae;if(El===null){var x=16;return a.df=x}return Nv[y]!==void 0&&5e3>C1?x=Nv[y]:(x=1.3*El.measureText("M").width,Nv[y]=x,C1++),a.df=x}function x1(a){if(El===null)return 6;if(jm[a]!==void 0&&5e3>Dv)var y=jm[a];else y=El.measureText(yg).width,jm[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,mg(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,ae=!1;!ae;){if(ne=x.indexOf(`
|
|
|
`,te),ne===-1&&(ne=x.length,ae=!0),te<=ne){if(te=x.substr(te,ne-te),a.wrap!==kv){a.Le=0;var ce=Sn.alloc();Mv(a,te,y,ce),E+=ce.height,Sn.free(ce),a.Gc+=a.Le}else Mv(a,te,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(ae=!0)}te=ne+1}return a.Lq=E}ot.Object.defineProperties(Vo.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"||(Ph(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:Ln},set:function(a){var y=this.flip;y!==a&&(Ph(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:Qh},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Ph(this),this.da.Yr=a,hl(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Sn.alloc();Mv(this,this.ec,999999,a);var y=a.width;Sn.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),ss(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&&(Ph(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&&(Ph(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&&Lf(a,"TextBlock.stroke"),a instanceof Po&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return mg(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&&(Ph(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&&(Ph(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 Uh),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 Uh),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 Uh),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 Uh),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 Uh),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&&(Ph(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&&(Ph(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&&(Ph(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&&(Ph(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:vg},set:function(a){var y=this.formatting;y!==a&&(Ph(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&&vi(a,"> 0",Vo,"maxLines"),Ph(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,Fm=null,kv=new dn(Vo,"None",0),_1=new dn(Vo,"WrapFit",1),Tv=new dn(Vo,"WrapDesiredSize",2),b1=new dn(Vo,"WrapBreakAll",3),Av=new dn(Vo,"OverflowClip",0),Bm=new dn(Vo,"OverflowEllipsis",1),vg=new dn(Vo,"FormatTrim",0),P1=new dn(Vo,"FormatNone",0),xx=/[ \u200b\u00ad]/,Nv=new $i,C1=0,jm=new $i,Dv=0,yg="...",E1="",El=null,zm=!1;Vo.className="TextBlock";function Ov(){this.nc=!1,this.Hd=null,this.Xf=Ln,this.gq=vg,this.Jq=1/0,this.$q=Av,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=Qh,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},Vo.getEllipsis=function(){return yg},Vo.setEllipsis=function(a){yg=a,jm=new $i,Dv=0},Vo.getBaseline=function(){return Im},Vo.setBaseline=function(a){Im=a},Vo.getUnderline=function(){return Fm},Vo.setUnderline=function(a){Fm=a},Vo.isValidFont=function(a){if(zm||(El=Ps?new Au(null).context:null,zm=!0),El===null)return!0;var y=El.font;if(a===y||a==="10px sans-serif")return!0;El.font="10px sans-serif",El.font=a;var x=El.font;if(x!=="10px sans-serif")return El.font=y,!0;El.font="19px serif";var b=El.font;return El.font=a,x=El.font,El.font=y,x!==b},Vo.FormatNone=P1,Vo.FormatTrim=vg,Vo.None=kv,Vo.OverflowClip=Av,Vo.OverflowEllipsis=Bm,Vo.WrapBreakAll=b1,Vo.WrapDesiredSize=Tv,Vo.WrapFit=_1;function Uh(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}Uh.prototype.copy=function(){var a=new Uh;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},Uh.className="GradElementSettings";function Ll(a,y){Xt.call(this),this.Eg=null,this.qo="",this.Xg=po,this.Nk=Nn,this.Zg=this.Hd=null,this.Mk=Hr,this.Xf=Ln,this.vl=null,this.qn=!1,this.en=!0,this.al=!1,this.bt=this.rl=null,typeof a=="string"?this.source=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}var pp;Ve(Ll,Xt),Ll.prototype.cloneProtected=function(a){Xt.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},Ll.prototype.qb=function(a){a===Ln||a===Si||a===Ir?this.imageStretch=a:Xt.prototype.qb.call(this,a)},Ll.prototype.toString=function(){return"Picture("+this.source+")#"+Ft(this)};function gp(a){a===void 0&&(a=""),a!==""?pp[a]&&(delete pp[a],Um--):(pp=new $i,Um=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 ae=ne.length,ce=0;ce<ae;ce++)te=ne[ce],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()||(Ys(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=Ti();for(var ae=0;ae<E;ae++)te.push(ne[ae]);if(y.hn)for(ae=0;ae<E;ae++)ne=te[ae],ne.Hd!==null&&ne.Hd(ne,x);bi(te)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}Ll.prototype.hA=function(){if(this.source!==""){gp(this.source);var a=this.source;this.source="",this.source=a}},Ll.prototype.redraw=function(){this.N(),this.Uc=!0},Ll.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 Jd)){var E=a instanceof Xl;b=this.naturalBounds;var te=0,ne=0,ae=this.qn,ce=ae?+x.width:x.naturalWidth;if(ae=ae?+x.height:x.naturalHeight,ce===void 0&&x.videoWidth&&(ce=x.videoWidth),ae===void 0&&x.videoHeight&&(ae=x.videoHeight),ce=ce||b.width,ae=ae||b.height,ce!==0&&ae!==0){var _e=ce,Pe=ae;this.sourceRect.w()&&(te=this.Xg.x,ne=this.Xg.y,ce=this.Xg.width,ae=this.Xg.height);var Ne=ce,Ge=ae,Ye=this.Nk,Qe=this.Mk;switch(Ye){case Ln:if(this.sourceRect.w())break;Ne>=b.width&&(te=te+Qe.offsetX+(Ne*Qe.x-b.width*Qe.x)),Ge>=b.height&&(ne=ne+Qe.offsetY+(Ge*Qe.y-b.height*Qe.y)),ce=Math.min(b.width,Ne),ae=Math.min(b.height,Ge);break;case Nn:Ne=b.width,Ge=b.height;break;case Si:case Ir:Ye===Si?(Ye=Math.min(b.height/Ge,b.width/Ne),Ne*=Ye,Ge*=Ye):Ye===Ir&&(Ye=Math.max(b.height/Ge,b.width/Ne),Ne*=Ye,Ge*=Ye,Ne>=b.width&&(te=(te+Qe.offsetX+(Ne*Qe.x-b.width*Qe.x)/Ne)*ce),Ge>=b.height&&(ne=(ne+Qe.offsetY+(Ge*Qe.y-b.height*Qe.y)/Ge)*ae),ce*=1/(Ne/b.width),ae*=1/(Ge/b.height),Ne=b.width,Ge=b.height)}Ye=this.Df()*y.scale;var at=Ne*Ye*Ge*Ye,Ct=ce*ae/at,xt=x.__goCache;Ye=null;var Tt=wx;if(!E){if(x.sq&&xt!==void 0&&4<at&&Ct>Tt*Tt)for(xt.gi===null&&(k1(xt,4,_e,Pe,x),k1(xt,16,_e,Pe,x)),E=xt.gi,_e=E.length,Pe=0;Pe<_e&&E[Pe].ratio*E[Pe].ratio<Ct;Pe++)Ye=E[Pe];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new Au(null).context;try{E.drawImage(this.Eg,0,0)}catch(Nt){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Nt){this.vl=!0}}if(this.vl)return}}switch(E=Ne<b.width?Qe.offsetX+(b.width*Qe.x-Ne*Qe.x):0,Qe=Ge<b.height?Qe.offsetY+(b.height*Qe.y-Ge*Qe.y):0,this.flip){case Wr:a.translate(Math.min(b.width,Ne),0),a.scale(-1,1);break;case Pr:a.translate(0,Math.min(b.height,Ge)),a.scale(1,-1);break;case No:a.translate(Math.min(b.width,Ne),Math.min(b.height,Ge)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&xt!==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,ce/y),Math.min(Ye.source.height,ae/y),E,Qe,Math.min(b.width,Ne),Math.min(b.height,Ge)),a instanceof Xl&&(this.bt=[te/y,ne/y,Math.min(Ye.source.width,ce/y),Math.min(Ye.source.height,ae/y),E,Qe,Math.min(b.width,Ne),Math.min(b.height,Ge)])}catch(Nt){this.en=!1}a.restore()}else try{a.drawImage(x,te,ne,ce,ae,E,Qe,Math.min(b.width,Ne),Math.min(b.height,Ge)),a instanceof Xl&&(this.bt=[te,ne,ce,ae,E,Qe,Math.min(b.width,Ne),Math.min(b.height,Ge)])}catch(Nt){this.en=!1}switch(this.flip){case Wr:a.scale(-1,1),a.translate(-Math.min(b.width,Ne),0);break;case Pr:a.scale(1,-1),a.translate(0,-Math.min(b.height,Ge));break;case No:a.scale(-1,-1),a.translate(-Math.min(b.width,Ne),-Math.min(b.height,Ge))}}}}},Ll.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,te=Cl(this,!0),ne=this.Eg,ae=this.qn,ce=0,_e=0;(ae||!this.al&&ne&&ne.complete)&&(this.al=!0),ne===null?(isFinite(E.width)||(a=0),isFinite(E.height)||(y=0)):(ce=ae?+ne.width:ne.naturalWidth,_e=ae?+ne.height:ne.naturalHeight),isFinite(E.width)||te===Nn||te===Li?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:ne!==null&&(a=ce)),x=0):ne!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:ce),isFinite(E.height)||te===Nn||te===Bi?(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)),ss(this.dc,a,y),this.Ge(0,0,a,y)},Ll.prototype.eh=function(a,y,x,b){il(this,a,y,x,b)},ot.Object.defineProperties(Ll.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||rn("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var b=this.diagram;b!==null&&qp(b,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new Ut),b!==null&&x&&ld(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()||(Ys(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=pp;if(Ps){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<Um&&(gp(),x=pp),b=Bn("img"),b.hn=!0,L1(this,b);var E=this.rl;E!==null&&(b.crossOrigin=E(this)),b.src=a,x[a]=b,Um++}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}}}),Ll.prototype.redraw=Ll.prototype.redraw,Ll.prototype.reloadSource=Ll.prototype.hA;var Um=0,wx=4;Ll.className="Picture",pp=new $i,Ll.clearCache=gp;function M1(){this.gi=null}function k1(a,y,x,b,E){a.gi===null&&(a.gi=[]);var te=new Au(null),ne=te.context,ae=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(ae*x,0,0,ae*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 mp(){this.os=new Kn,this.mc=null}mp.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Kn,this.mc=null};function vp(a,y,x,b,E,te){a.mc=new Gs,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()}mp.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new Kr(Ds);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},mp.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new Kr(zo);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function Ic(a,y,x,b,E,te,ne){var ae;ae===void 0&&(ae=!1);var ce=new Kr(la);ce.point1X=y,ce.point1Y=x,ce.point2X=b,ce.point2Y=E,ce.endX=te,ce.endY=ne,ae&&ce.close(),a.mc.segments.add(ce)}function Hm(a,y,x,b,E){var te;te===void 0&&(te=!1);var ne=new Kr(Qa);ne.point1X=y,ne.point1Y=x,ne.endX=b,ne.endY=E,te&&ne.close(),a.mc.segments.add(ne)}mp.prototype.arcTo=function(a,y,x,b,E,te,ne){te===void 0&&(te=0),ne===void 0&&(ne=!1);var ae=new Kr(is);ae.startAngle=a,ae.sweepAngle=y,ae.centerX=x,ae.centerY=b,ae.radiusX=E,ae.radiusY=te!==0?te:E,ne&&ae.close(),this.mc.segments.add(ae)};function bx(a,y,x,b,E,te,ne,ae){var ce;ce===void 0&&(ce=!1),y=new Kr(wl,ne,ae,y,x,b,E,te),ce&&y.close(),a.mc.segments.add(y)}function A1(a){var y=Gm;return y!==null?(Gm=null,y.reset(a),y):(y=new mp,y.reset(a),y)}var Gm=null;mp.className="StreamGeometryContext";function Ya(a,y){var x=a.toLowerCase(),b=tn.Ze;b[a]=y,b[x]=a}Ya("Rectangle",function(a,y,x){a="r"+y+","+x;var b=tn.Mf[a];return b!==void 0||(b=new Kn(Kn.u),b.endX=y,b.endY=x,tn.Nf<tn.vm&&(tn.Mf[a]=b,tn.Nf++)),b}),Ya("Square",function(a,y,x){a="s"+y+","+x;var b=tn.Mf[a];return b!==void 0||(b=new Kn(Kn.u),b.endX=y,b.endY=x,b.defaultStretch=Si,tn.Nf<tn.vm&&(tn.Mf[a]=b,tn.Nf++)),b}),Ya("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=tn.Mf[b];if(E!==void 0)return E;var te=a*tn.wg;return E=new Kn().add(new Gs(a,0,!0).add(new Kr(zo,y-a,0)).add(new Kr(la,y,a,y-te,0,y,te)).add(new Kr(zo,y,x-a)).add(new Kr(la,y-a,x,y,x-te,y-te,x)).add(new Kr(zo,a,x)).add(new Kr(la,0,x-a,te,x,0,x-te)).add(new Kr(zo,0,a)).add(new Kr(la,a,0,0,te,te,0).close())),1<te&&(E.spot1=new di(0,0,te,te),E.spot2=new di(1,1,-te,-te)),tn.Nf<tn.vm&&(tn.Mf[b]=E,tn.Nf++),E}),Ya("Border","RoundedRectangle"),Ya("Ellipse",function(a,y,x){a="e"+y+","+x;var b=tn.Mf[a];return b!==void 0||(b=new Kn(Kn.F),b.endX=y,b.endY=x,b.spot1=Th,b.spot2=Nl,tn.Nf<tn.vm&&(tn.Mf[a]=b,tn.Nf++)),b}),Ya("Circle",function(a,y,x){a="c"+y+","+x;var b=tn.Mf[a];return b!==void 0||(b=new Kn(Kn.F),b.endX=y,b.endY=x,b.spot1=Th,b.spot2=Nl,b.defaultStretch=Si,tn.Nf<tn.vm&&(tn.Mf[a]=b,tn.Nf++)),b}),Ya("TriangleRight",function(a,y,x){return new Kn().add(new Gs(0,0).add(new Kr(zo,y,.5*x)).add(new Kr(zo,0,x).close())).pm(0,.25,.5,.75)}),Ya("TriangleDown",function(a,y,x){return new Kn().add(new Gs(0,0).add(new Kr(zo,y,0)).add(new Kr(zo,.5*y,x).close())).pm(.25,0,.75,.5)}),Ya("TriangleLeft",function(a,y,x){return new Kn().add(new Gs(y,x).add(new Kr(zo,0,.5*x)).add(new Kr(zo,y,0).close())).pm(.5,.25,1,.75)}),Ya("TriangleUp",function(a,y,x){return new Kn().add(new Gs(y,x).add(new Kr(zo,0,x)).add(new Kr(zo,.5*y,0).close())).pm(.25,.5,.75,1)}),Ya("Triangle","TriangleUp"),Ya("Diamond",function(a,y,x){return new Kn().add(new Gs(.5*y,0).add(new Kr(zo,0,.5*x)).add(new Kr(zo,.5*y,x)).add(new Kr(zo,y,.5*x).close())).pm(.25,.25,.75,.75)}),Ya("LineH",function(a,y,x){return a=new Kn(Kn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),Ya("LineV",function(a,y,x){return a=new Kn(Kn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),Ya("None","Rectangle"),Ya("BarH","Rectangle"),Ya("BarV","Rectangle"),Ya("MinusLine","LineH"),Ya("PlusLine",function(a,y,x){return new Kn().add(new Gs(0,x/2,!1).add(new Kr(zo,y,x/2)).add(new Kr(Ds,y/2,0)).add(new Kr(zo,y/2,x)))}),Ya("XLine",function(a,y,x){return new Kn().add(new Gs(0,x,!1).add(new Kr(zo,y,0)).add(new Kr(Ds,0,0)).add(new Kr(zo,y,x)))}),Ya("LineRight",function(a,y,x){return new Kn().add(new Gs(.25*y,0,!1).add(new Kr(zo,.75*y,.5*x)).add(new Kr(zo,.25*y,x)))}),Ya("LineDown",function(a,y,x){return new Kn().add(new Gs(0,.25*x,!1).add(new Kr(zo,.5*y,.75*x)).add(new Kr(zo,y,.25*x)))}),Ya("LineLeft",function(a,y,x){return new Kn().add(new Gs(.75*y,0,!1).add(new Kr(zo,.25*y,.5*x)).add(new Kr(zo,.75*y,x)))}),Ya("LineUp",function(a,y,x){return new Kn().add(new Gs(0,.75*x,!1).add(new Kr(zo,.5*y,.25*x)).add(new Kr(zo,y,.75*x)))}),tn.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 Rv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=Qo,this.ir=null,this.jr="",this.lr=ma,this.Gq="",this.Hq=Ls,this.Pq=Er,this.Kq=no,this.Up=null,this.Cq=127,this.zr=io,this.yr="gray",this.Vg=4}Rv.prototype.copy=function(){var a=new Rv;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 Ni(a,y){a===void 0||a instanceof ta||typeof a=="string"?Rn.call(this,a):(Rn.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 vt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new pn,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Ve(Ni,Rn),Ni.prototype.cloneProtected=function(a){Rn.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},qe=Ni.prototype,qe.Af=function(a){Rn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},qe.toString=function(){var a=li(this.constructor)+"#"+Ft(this);return this.data!==null&&(a+="("+dr(this.data)+")"),a};function Ml(a){a.P===null?a.P=new Rv:a.P.nc&&(a.P=a.P.copy())}qe.th=function(){Rn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},qe.gk=function(a,y,x,b,E,te,ne){var ae=this.diagram;ae!==null&&(a===bs&&y==="elements"?E instanceof Rn?qd(E,function(ce){ly(ae.partManager,ce),Gd(ae,ce)}):ld(ae,E):a===Os&&y==="elements"&&(E instanceof Rn?qd(E,function(ce){uy(ae.partManager,ce,ae)}):qp(ae,E)),ae.cb(a,y,x,b,E,te,ne))},qe.La=function(a){if(Rn.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 Rn&&qd(E,function(te){te.data!==null&&te.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Ni.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Ni.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Ni.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 Dn),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)))}}},Ni.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)}},Ni.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Ti();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);bi(y)}},Ni.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 ur?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof $r))break e;Nu(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Rn.Link),x.adornedObject=y)}if(x!==null){x.type===Rn.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Px(this,a),y=this.adornments;y.next();)y.value.La()}},Ni.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Iv(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 Wm(a){if(dd(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,dd(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||R1(a,y,x),x=a.Ib;var b=pn.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),pn.free(b),Bv(a,!1)}}Ni.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new xr);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),this.Lb=te,te.ws()||te.pp(E)},Ni.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=Hr;this.locationSpot.sb()&&(te=this.locationSpot);var ne=vt.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),vt.free(ne)}},Ni.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Ni.prototype.moveTo=function(a,y,x){a=vt.allocAt(a,y),this.move(a,x),vt.free(a)},Ni.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())},Ni.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())},Ni.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new Dn),y.I(a)!==null)return y.I(a);var x=Rn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Fc(a,y,x,b){b===void 0&&(b=new vt),x=x.Mc()?Hr: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}Ni.prototype.mi=function(a){return a===void 0&&(a=new pn),a.assign(this.actualBounds)},Ni.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function D1(a){var y=vt.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof mr?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 ef(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}Ni.prototype.arrange=function(){if(cl(this)===!1)N1(this);else{Fh(this,!1);var a=this.Ib,y=pn.alloc();y.assign(a);var x=fd(this);this.eh(0,0,this.uc.width,this.uc.height);var b=this.position;R1(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()||tn.B(y.width,a.width)&&tn.B(y.height,a.height)||0<=this.vw&&this.C(16),pn.free(y),Bv(this,!1)}},qe=Ni.prototype,qe.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=pn.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),pn.free(E)}!(this.G&65536)&&a.D(y)||B1(this,b,x),x.N(),!a.w()&&!y.w()||mo(a,y)||(this instanceof ii&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},qe.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 vt(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),dd(this)===!1&&cl(this)===!1&&(Wm(this),N1(this)),!0};function O1(a,y,x,b,E){y===null||a instanceof $r||(y=y.animationManager,y.zb&&Pa(y,a,new vt(b,E),x))}qe.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;dd(this)||cl(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)}Wm(this)},qe.Av=function(){this.G&=-2097153,Wm(this)};function R1(a,y,x){var b=D1(a),E=a.diagram,te=x.w(),ne=y.w();te&&ne?a.G&2097152?I1(a,y,x,E,b):F1(a,y,x,E,b):te?I1(a,y,x,E,b):ne&&F1(a,y,x,E,b),a.G|=2097152,vt.free(b),a.Uk()}function I1(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 $r||Pa(x,a,new vt(te,ne),y),b||y.x===te&&y.y===ne||a.g("position",new vt(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 ii&&Tc(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?fd(a)?(Us(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}qe.si=function(){return!0},qe.Zc=function(){return!0},qe.ph=function(){return!1},qe.Dd=function(){return!0};function Fv(a,y,x,b){y.constructor===a.constructor||U1||(U1=!0,_i('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),_i(" Old class: "+li(a.constructor)+", new class: "+li(y.constructor)+", part: "+a.toString())),a.Ej();var E=a.data;x=a.layerName;var te=a.isSelected,ne=a.isHighlighted,ae=!0,ce=!0,_e=!1;a instanceof ii&&(ae=a.isTreeLeaf,ce=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 ii&&(a.U=ae?a.U|4:a.U&-5,a.U=ce?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)}Ni.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},Ni.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},Ni.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},Ni.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},Ni.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},Ni.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},Ni.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},Ni.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},Ni.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 dd(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 fd(a){return(a.G&131072)!==0}qe=Ni.prototype,qe.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function Km(a,y){a.G=y?a.G|1048576:a.G&-1048577}qe.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},qe.N=function(){var a=this.diagram;a!==null&&!cl(this)&&!dd(this)&&this.isVisible()&&this.Ib.w()&&a.N(ef(this,this.Ib))},qe.v=function(){Rn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof ii&&this.labeledLink!==null&&hl(this.labeledLink),a.$b(!0))},qe.Vo=function(a){a||(a=this.Ah,a!==null&&Kv(a,this))},qe.Wo=function(a){a||(a=this.Ah,a!==null&&Vv(a,this))},qe.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},qe.oz=function(){return zv(this,this)};function zv(a,y){var x=y.containingGroup;return x!==null?1+zv(a,x):y instanceof ii&&(y=y.labeledLink,y!==null)?zv(a,y):0}qe.sz=function(){return j1(this,this)};function j1(a,y){var x=y.containingGroup;return x!==null||y instanceof ii&&(x=y.labeledLink,x!==null)?j1(a,x):y}qe.Td=function(a){return a instanceof ur?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 ii&&(y=y.labeledLink,y!==null)?Uv(a,y,x):!1:!0}qe.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof ur&&Km(y,!0),y instanceof ii){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 ii&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof ur&&Km(y,!1),y instanceof ii&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Ni.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof ii&&this.isLinkLabel)},Ni.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 ii&&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 pd(a,y,x,b,E,te){if(te===void 0&&(te=null),!(a.contains(y)||te!==null&&!te(y)||y instanceof $r)){if(a.add(y),y instanceof ii){if(x&&y instanceof ur)for(var ne=y.memberParts;ne.next();)pd(a,ne.value,x,b,E,te);if(E!==!1)for(ne=y.linksConnected;ne.next();){var ae=ne.value;if(!a.contains(ae)){var ce=ae.fromNode,_e=ae.toNode;ce=ce===null||a.contains(ce),_e=_e===null||a.contains(_e),(E?ce&&_e:ce||_e)&&pd(a,ae,x,b,E,te)}}if(1<b)for(y=y.Ou();y.next();)pd(a,y.value,x,b-1,E,te)}else if(y instanceof Gn)for(y=y.labelNodes;y.next();)pd(a,y.value,x,b,E,te)}}ot.Object.defineProperties(Ni.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?uo: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(Os,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(bs,"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&&(Ml(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&&yh(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 $r?this.type!==Rn.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:Er},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),Ml(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:no},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),Ml(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&&(Ml(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:Ls},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),Ml(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,cl(this)===!1&&(Wm(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 $r)){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 $r?this instanceof $r&&(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 Gn||(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&&(Ml(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&&(Ml(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&&(Ml(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 Gn?(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&&(Ml(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&&(Ml(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&&(Ml(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:Qo},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),Ml(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&&(Ml(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&&(Ml(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:ma},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),Ml(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&&rn("Cannot make a Group a member of itself: "+this.toString()),rn("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 ur&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Kv(a,this):this instanceof ur&&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 ur){for(x=new Ut,pd(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof ii)for(b=b.linksConnected;b.next();)yp(b.value)}if(this instanceof ii){for(x=this.linksConnected;x.next();)yp(x.value);x=this.labeledLink,x!==null&&yp(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&yh(y,-1,a))}}else rn("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&&(Ml(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof ii&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(Ml(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&&(Ml(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:io},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),Ml(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&&(Ml(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&&(Ml(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Ni.prototype.invalidateLayout=Ni.prototype.C,Ni.prototype.findCommonContainingGroup=Ni.prototype.px,Ni.prototype.isMemberOf=Ni.prototype.Td,Ni.prototype.findTopLevelPart=Ni.prototype.sz,Ni.prototype.findSubGraphLevel=Ni.prototype.oz,Ni.prototype.ensureBounds=Ni.prototype.Va,Ni.prototype.getDocumentBounds=Ni.prototype.mi,Ni.prototype.findObject=Ni.prototype.fb,Ni.prototype.moveTo=Ni.prototype.moveTo,Ni.prototype.invalidateAdornments=Ni.prototype.Wb,Ni.prototype.clearAdornments=Ni.prototype.Ej,Ni.prototype.removeAdornment=Ni.prototype.Jf,Ni.prototype.addAdornment=Ni.prototype.bh,Ni.prototype.findAdornment=Ni.prototype.Pj,Ni.prototype.updateTargetBindings=Ni.prototype.La;var U1=!1;Ni.className="Part",Ni.LayoutNone=0,Ni.LayoutAdded=1,Ni.LayoutRemoved=2,Ni.LayoutShown=4,Ni.LayoutHidden=8,Ni.LayoutNodeSized=16,Ni.LayoutGroupLayout=32,Ni.LayoutNodeReplaced=64,Ni.LayoutStandard=127,Ni.LayoutAll=16777215;function $r(a,y){a===void 0||a instanceof ta||typeof a=="string"?Ni.call(this,a):(Ni.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)}Ve($r,Ni),$r.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},$r.prototype.updateRelationshipsFromData=function(){},$r.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Gn&&y instanceof mr){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 mr&&(E.ua=a)}}},$r.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!cl(a))},$r.prototype.Zc=function(){return!1},$r.prototype.gk=function(a,y,x,b,E,te,ne){if(a===bs&&y==="elements"){if(E instanceof fl)this.$a===null&&(this.$a=E);else if(E instanceof Rn){var ae=E.Nl(function(ce){return ce instanceof fl});ae instanceof fl&&this.$a===null&&(this.$a=ae)}}else a===Os&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Rn&&this.$a.rg(b)&&(this.$a=null));Ni.prototype.gk.call(this,a,y,x,b,E,te,ne)},$r.prototype.updateAdornments=function(){},$r.prototype.Lj=function(){},ot.Object.defineProperties($r.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}}}),$r.className="Adornment";function Hv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=ia,this.er=Ym,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 ii(a,y){a===void 0||a instanceof ta||typeof a=="string"?Ni.call(this,a):(Ni.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new zn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Ve(ii,Ni),ii.prototype.cloneProtected=function(a){Ni.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},qe=ii.prototype,qe.Af=function(a){Ni.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function Bc(a){a.Ba===null?a.Ba=new Hv:a.Ba.nc&&(a.Ba=a.Ba.copy())}qe.th=function(){Ni.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function H1(a,y){y!==null&&(a.af===null&&(a.af=new Ut),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}qe.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=G1(this,a,y,x),a!==null&&a.Sl()},qe.gk=function(a,y,x,b,E,te,ne){a===bs&&y==="elements"?this.wc=null:a===Os&&y==="elements"&&(this.wc=null),Ni.prototype.gk.call(this,a,y,x,b,E,te,ne)},qe.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Jl(x.fromPort),Jl(x.toPort),x.bb())}};function W1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Jl(x.fromPort),Jl(x.toPort),x.bb())}}function Jl(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Jl(y.port)}}qe.si=function(){return!0},ii.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},ii.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},ii.prototype.isVisible=function(){if(!Ni.prototype.isVisible.call(this))return!1;var a=!0,y=Nc,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===Nc){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Zs){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===ip&&(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},ii.prototype.Zb=function(a){Ni.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)}},ii.prototype.qx=function(){var a=new Ut,y=new Ut;return K1(this,this,a,y),y.iterator};function K1(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)&&K1(a,E?ne.toNode:ne.fromNode,x,b):b.add(ne)})}}ii.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new Yr(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},qe=ii.prototype,qe.Mo=function(a){a===void 0&&(a=null);var y=new Yr(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},qe.Sd=function(a){a===void 0&&(a=null);var y=new Yr(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},qe.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 Ut,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 Ut,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new to(x):uo},qe.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 Ut,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new to(x):uo},qe.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 Ut,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new to(x):uo},qe.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Yr(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},qe.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Yr(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 Vm(a,y,x){Jl(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 Zm(a,y,x){Jl(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)):Sg(y)))}function Sg(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}}}ii.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},qe=ii.prototype,qe.Vo=function(a){Ni.prototype.Vo.call(this,a),a||(Sg(this),a=this.Yk,a!==null&&eS(a,this))},qe.Wo=function(a){Ni.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},qe.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,Ni.prototype.Lj.call(this)},qe.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 Dn:a.wc.clear(),a.qm(a,function(y,x){Z1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function Z1(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=Ti()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);bi(x)}}}qe.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},qe.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}},qe.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)Km(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;)Km(y,!1),y=y.pg();return x},qe.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},qe.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof ii)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},qe.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 Ut;return a(this,y),y},qe.uz=function(){return Y1(this,this)};function Y1(a,y){return y=y.pg(),y===null?0:1+Y1(a,y)}qe.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new Yr(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},qe.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 zn,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 zn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new to(x):uo},qe.wz=function(a){a===void 0&&(a=1/0);var y=new Ut;return pd(y,this,!1,a,!0),y},ii.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 Ut;x.add(this),X1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Nc),y.Ue=!1}};function X1(a,y,x,b,E,te,ne){if(1<b)for(var ae=x?a.Mo():a.Sd();ae.next();){var ce=ae.value;ce.isTreeLink&&(ce=ce.To(a),ce===null||ce===a||y.contains(ce)||(y.add(ce),X1(ce,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,ae=x?a.Mo():a.Sd(),ce={};ae.next();){var _e=ae.value;if(_e.isTreeLink&&(_e=_e.To(a),_e!==null&&_e!==a)){var Pe=y.contains(_e);if(Pe||y.add(_e),ne){var Ne=x?_e.Oo():_e.Po();ce.uv=a,Ne.all(function(Ge){return function(Ye){return Ye===Ge.uv||!Ye.isTreeExpanded}}(ce))&&b.Aj(_e,E),_e.oh(),_e.Zb(!1)}_e.isTreeExpanded&&(_e.wasTreeExpanded=_e.isTreeExpanded,Pe||J1(_e,y,x,b,E,te))}ce={uv:ce.uv}}a.isTreeExpanded=!1}ii.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 Ut;x.add(this),q1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Nc),y.Ue=!1}};function q1(a,y,x,b,E,te,ne){for(var ae=te===a?!1:a.isTreeExpanded,ce=x?a.Mo():a.Sd(),_e={};ce.next();){var Pe=ce.value;if(Pe.isTreeLink&&(ae||Pe.fd||Pe.bb(),Pe=Pe.To(a),Pe!==null&&Pe!==a&&!y.contains(Pe))){if(y.add(Pe),!ae){Pe.Zb(!0),Pe.oh();var Ne=x?Pe.Oo():Pe.Po();_e.vv=a,Ne.all(function(Ge){return function(Ye){return Ye===Ge.vv||!Ye.isTreeExpanded}}(_e))&&E.Cj(Pe,te)}(2<b||Pe.wasTreeExpanded)&&(Pe.wasTreeExpanded=!1,q1(Pe,y,x,b-1,E,te,ne))}_e={vv:_e.vv}}a.isTreeExpanded=!0}ot.Object.defineProperties(ii.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Ym},set:function(a){var y=this.portSpreading;y!==a&&(Bc(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&&Tc(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:ia},set:function(a){typeof a=="number"&&(a=new Ei(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),Bc(this),this.Ba.yp=a;var x=this.diagram;x!==null&&Tc(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&&(Bc(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&&(Bc(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&&(Bc(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),hl(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&&(Bc(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))}}}),ii.prototype.expandTree=ii.prototype.expandTree,ii.prototype.collapseTree=ii.prototype.collapseTree,ii.prototype.findTreeParts=ii.prototype.wz,ii.prototype.findTreeChildrenNodes=ii.prototype.Ou,ii.prototype.findTreeChildrenLinks=ii.prototype.Qo,ii.prototype.findTreeLevel=ii.prototype.uz,ii.prototype.findTreeParentChain=ii.prototype.vz,ii.prototype.findTreeParentNode=ii.prototype.pg,ii.prototype.findTreeParentLink=ii.prototype.kh,ii.prototype.findCommonTreeParent=ii.prototype.gz,ii.prototype.findTreeRoot=ii.prototype.xz,ii.prototype.isInTreeOf=ii.prototype.Nz,ii.prototype.findPort=ii.prototype.ns,ii.prototype.findLinksTo=ii.prototype.kz,ii.prototype.findLinksBetween=ii.prototype.jz,ii.prototype.findNodesInto=ii.prototype.Oo,ii.prototype.findNodesOutOf=ii.prototype.Po,ii.prototype.findNodesConnected=ii.prototype.Mu,ii.prototype.findLinksInto=ii.prototype.Sd,ii.prototype.findLinksOutOf=ii.prototype.Mo,ii.prototype.findExternalTreeLinksConnected=ii.prototype.qx,ii.prototype.invalidateConnectedLinks=ii.prototype.Bd,ii.prototype.invalidateLinkBundle=ii.prototype.Lz;var Cx=new dn(ii,"SpreadingNone",10),Ym=new dn(ii,"SpreadingEvenly",11),Wv=new dn(ii,"SpreadingPacked",12);ii.className="Node",ii.SpreadingNone=Cx,ii.SpreadingEvenly=Ym,ii.SpreadingPacked=Wv;function ur(a,y){a===void 0||a instanceof ta||typeof a=="string"?ii.call(this,a):(ii.call(this),a&&(y=a)),this.U|=4608,this.Gn=new Ut,this.$a=null,this.Sc=new ls,this.Sc.group=this,this.gl=new Ut,this.tb=this.$p=null,y&&Object.assign(this,y)}Ve(ur,ii),ur.prototype.cloneProtected=function(a){ii.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof fl});y instanceof fl?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())},qe=ur.prototype,qe.Af=function(a){ii.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 ii)x.Bd(y);else if(x instanceof Gn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},qe.gk=function(a,y,x,b,E,te,ne){if(a===bs&&y==="elements"){if(E instanceof fl)this.$a===null?this.$a=E:this.$a!==E&&rn("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof Rn){var ae=E.Nl(function(ce){return ce instanceof fl});ae instanceof fl&&(this.$a===null?this.$a=ae:this.$a!==ae&&rn("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Os&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Rn&&this.$a.rg(b)&&(this.$a=null));ii.prototype.gk.call(this,a,y,x,b,E,te,ne)},qe.Xl=function(a,y){ii.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Rn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Rn&&(a=a.Pb()),this.tb===null&&(this.tb=new pn),a.mi(this.tb),a instanceof mr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},qe.eh=function(a,y,x,b){this.nf=this.$a,ii.prototype.eh.call(this,a,y,x,b)},qe.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Gn||y.Va()}),ii.prototype.Va.call(this)},qe.si=function(){if(!ii.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof ii){if(y.isVisible()&&cl(y))return!1}else if(y instanceof Gn&&y.isVisible()&&cl(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Kv(a,y){if(a.Gn.add(y)){y instanceof ur&&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 Gn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function Vv(a,y){if(a.Gn.remove(y)){y instanceof ur&&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 Gn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}qe.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)}ii.prototype.Lj.call(this)},ur.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=mn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},ur.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=mn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},ur.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))},qe=ur.prototype,qe.Bd=function(a){var y=(this.U&65536)!==0;if(ii.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()?(Jl(x.fromPort),Jl(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(Jl(x.fromPort),Jl(x.toPort),x.bb()))}}},qe.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 Ut,b=y.iterator;b.next();){var E=b.value;if(E instanceof ii)for(E=E.linksConnected;E.next();){var te=E.value;y.contains(te)||x.add(te)}}return a&&(this.$p=x),x.iterator},qe.iz=function(){var a=this.Rj();a.add(this);for(var y=new Ut,x=a.iterator;x.next();){var b=x.value;if(b instanceof ii)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},qe.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new Ut;return a(this,y),y},qe.Rj=function(){var a=new Ut;return pd(a,this,!0,0,!0),a.remove(this),a},qe.Zb=function(a){ii.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},ur.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 ur&&te.isSubGraphExpanded&&(te.wasSubGraphExpanded=te.isSubGraphExpanded,Q1(te,y,x,b)),te instanceof ii)te.Bd(y),x.Aj(te,b);else if(te instanceof Gn)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!1}ur.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 ur&&te.wasSubGraphExpanded&&(te.wasSubGraphExpanded=!1,$1(te,y,x,b)),te instanceof ii)te.Bd(y),x.Cj(te,b);else if(te instanceof Gn)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!0}ur.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=vt.alloc(),ii.prototype.move.call(this,a,y),a=new Ut,y=this.Rj().iterator;y.next();)E=y.value,E instanceof Gn&&(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 ii&&E.isLinkLabel)){var ne=E.position,ae=E.location;ne.w()?(te.x=ne.x+b,te.y=ne.y+x,E.position=te):ae.w()&&(te.x=ae.x+b,te.y=ae.y+x,E.location=te)}for(y.reset();y.next();)E=y.value,E instanceof Gn&&(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());vt.free(te)}},ot.Object.defineProperties(ur.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&&rn("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&&(Bc(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&&(Bc(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&&(Bc(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&&(Bc(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)}}}),ur.prototype.expandSubGraph=ur.prototype.expandSubGraph,ur.prototype.collapseSubGraph=ur.prototype.collapseSubGraph,ur.prototype.findSubGraphParts=ur.prototype.Rj,ur.prototype.findContainingGroupChain=ur.prototype.hz,ur.prototype.findExternalNodesConnected=ur.prototype.iz,ur.prototype.findExternalLinksConnected=ur.prototype.Lu,ur.prototype.ensureBounds=ur.prototype.Va,ur.className="Group";function fl(a){Xt.call(this),this.yb=ds,this.ko=new pn(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Ve(fl,Xt),fl.prototype.cloneProtected=function(a){Xt.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},fl.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Co(0,0,y.width,y.height,a.x,a.y)},fl.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof ur||a instanceof $r)||rn("Placeholder is not inside a Group or Adornment."),a instanceof ur){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(ss(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=vt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),vt.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 mr&&(ne=te.strokeWidth);var ae=te.Df(),ce=te.naturalBounds,_e=(ce.width+ne)*ae;ne=(ce.height+ne)*ae,a.type!==Rn.Link&&(ae=te.ga(a.category==="Selection"?Ls:a.locationSpot,vt.alloc()),a.location=ae,vt.free(ae)),isNaN(_e)||isNaN(ne)?(a=te.ga(Ls,vt.alloc()),_e=pn.allocAt(a.x,a.y,0,0),_e.Ye(te.ga(ka,a)),_e.Ye(te.ga(vs,a)),_e.Ye(te.ga(Hs,a)),ss(y,_e.width+b||0,_e.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),vt.free(a),pn.free(_e)):(ss(y,_e+b||0,ne+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},fl.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},fl.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof ur&&!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=pn.alloc(),E=this.computeMemberBounds(x);var te=this.yb;return y instanceof ur&&!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)),pn.free(x),b&&y instanceof ur&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},fl.prototype.computeMemberBounds=function(a){if(!(this.part instanceof ur))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 ae=ne.value;if(ae.isVisible()){if(ae instanceof Gn&&(!y.computesBoundsIncludingLinks||su(ae)||ae.fromNode===y||ae.toNode===y))continue;ae=ae.actualBounds,ae.left<x&&(x=ae.left),ae.top<b&&(b=ae.top),ae.right>E&&(E=ae.right),ae.bottom>te&&(te=ae.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(fl.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Ei(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),fl.className="Placeholder";function Gn(a){Ni.call(this,Rn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=pl,this.Om=0,this.Qm=pl,this.Rm=NaN,this.qj=qv,this.po=.5,this.wd=null,this.Nb=new zn().freeze(),this.Tg=this.Mg=null,this.ml=new pn,this.ua=new Kn,this.u=this.o=this.Sf=this.Wf=null,this.su=new vt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Ve(Gn,Ni),Gn.prototype.cloneProtected=function(a){Ni.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())},qe=Gn.prototype,qe.Af=function(a){Ni.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&&Jl(y),a=a.toPort,a!==null&&Jl(a)},qe.qb=function(a){a.classType===Gn?(a.value&2)===2?this.routing=a:a===lu||a===zc||a===xp?this.curve=a:a===_g||a===e0||a===t0?this.adjusting=a:a!==qv&&a!==pl&&rn("Unknown Link enum value for a Link property: "+a):Ni.prototype.qb.call(this,a)},qe.Xc=function(){this.ba===null&&(this.ba=new lg)},qe.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),cl(a)||dd(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),cl(a)||dd(a)))},qe.zv=function(){return!1},qe.Av=function(){},qe.Zc=function(){return!1},Gn.prototype.computeAngle=function(a,y,x){return Gn.computeAngle(y,x)},Gn.computeAngle=function(a,y){switch(a){default:case pl:a=0;break;case bg:a=y;break;case Pg:a=y+90;break;case Cg:a=y-90;break;case Qv:a=y+180;break;case n0:a=tn.bp(y),90<a&&270>a&&(a-=180);break;case Eg:a=tn.bp(y+90),90<a&&270>a&&(a-=180);break;case Lg:a=tn.bp(y-90),90<a&&270>a&&(a-=180);break;case i0:if(a=tn.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return tn.bp(a)};function yp(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&&Kv(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}qe=Gn.prototype,qe.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Ni.prototype.oh.call(this)},qe.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},qe.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function eS(a,y){a.wd===null&&(a.wd=new Ut),a.wd.add(y),a.v()}qe.Vo=function(a){if(Ni.prototype.Vo.call(this,a),tf(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)}xg(this)}},qe.Wo=function(a){if(Ni.prototype.Wo.call(this,a),tf(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)}wg(this)}},qe.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))},Gn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Gn.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?Ni.prototype.move.call(this,a,!1):(a=vt.allocAt(x.x+b,x.y+E),Ni.prototype.move.call(this,a,!1),vt.free(a)),jc(this,b,E),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+b,x.y+E)},Gn.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},Gn.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},Gn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(ro),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()===lu))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()===lu){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return tn.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),tn.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},Gn.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()===lu))return this.ua.wx(.5);if(this.computeCurve()===lu&&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),tn.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)},qe=Gn.prototype,qe.i=function(a){return this.Nb.s[a]},qe.dd=function(a,y){this.Nb.cd(a,y)},qe.L=function(a,y,x){this.Nb.cd(a,new vt(y,x))},qe.Kz=function(a,y){this.Nb.Gb(a,y)},qe.m=function(a,y,x){this.Nb.Gb(a,new vt(y,x))},qe.ne=function(a){this.Nb.add(a)},qe.yf=function(a,y){this.Nb.add(new vt(a,y))},qe.pv=function(a){this.Nb.mb(a)},qe.Fj=function(){this.Nb.clear()};function jc(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 zn,te=a.Nb.iterator;te.next();){var ne=te.value;E.add(new vt(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),hl(a)),b?Xm(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ne!==null&&ne.animationManager.zb&&Kl(ne.animationManager,a,E),a.g("points",te,E)}}qe.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},qe.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 ae=E[ne];x=Math.min(ae.x,x),b=Math.min(ae.y,b)}ae=ne=1/0;for(var ce=y.s,_e=ce.length,Pe=0;Pe<_e;Pe++){var Ne=ce[Pe];ne=Math.min(Ne.x,ne),ae=Math.min(Ne.y,ae),Ne.freeze()}if(y.freeze(),_e===te){for(te=0;te<_e;te++)if(Pe=E[te],Ne=ce[te],Pe.x-x!==Ne.x-ne||Pe.y-b!==Ne.y-ae){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&Kl(x.animationManager,this,y),Xm(this),this.g("points",a,y)}},qe.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function Xm(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),$m(a,!1))}qe.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())}},qe.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()}}},Gn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Tf||(Tf=new ii,Tf.desiredSize=ji,Tf.Va()),this.defaultFromPoint&&(Tf.location=this.defaultFromPoint,Tf.Va(),y=a=Tf)):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?(Af||(Af=new ii,Af.desiredSize=ji,Af.Va()),this.defaultToPoint&&(Af.location=this.defaultToPoint,Af.Va(),E=b=Af)):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 ae=Sp(ne),ce=Sp(x),_e=y===E&&y!==null,Pe=this.isOrthogonal,Ne=this.curve===lu;this.Wf=_e&&!Pe?Ne=!0:!1;var Ge=this.computeAdjusting()===pl||_e;if(!Pe&&!_e&&ae&&ce){if(ae=!1,!Ge&&3<=te&&(Ge=this.getLinkPoint(a,y,ne,!0,!1,b,E),ce=this.getLinkPoint(b,E,x,!1,!1,a,y),ae=this.adjustPoints(0,Ge,te-1,ce))&&(Ge=this.getLinkPoint(a,y,ne,!0,!1,b,E),ce=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,Ge,te-1,ce)),!ae)if(this.Fj(),Ne){te=this.getLinkPoint(a,y,ne,!0,!1,b,E),Ge=this.getLinkPoint(b,E,x,!1,!1,a,y),ae=Ge.x-te.x,ce=Ge.y-te.y,_e=this.computeCurviness(),Ne=Pe=0;var Ye=te.x+ae/3,Qe=te.y+ce/3,at=Ye,Ct=Qe;tn.B(ce,0)?Ct=0<ae?Ct-_e:Ct+_e:(Pe=-ae/ce,Ne=Math.sqrt(_e*_e/(Pe*Pe+1)),0>_e&&(Ne=-Ne),at=(0>ce?-1:1)*Ne+Ye,Ct=Pe*(at-Ye)+Qe),Ye=te.x+2*ae/3,Qe=te.y+2*ce/3;var xt=Ye,Tt=Qe;tn.B(ce,0)?Tt=0<ae?Tt-_e:Tt+_e:(xt=(0>ce?-1:1)*Ne+Ye,Tt=Pe*(xt-Ye)+Qe),this.Fj(),this.ne(te),this.yf(at,Ct),this.yf(xt,Tt),this.ne(Ge),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,Ge=E,b=this.getLinkPoint(a,y,ne,!0,!1,te,Ge),E=this.getLinkPoint(te,Ge,x,!1,!1,a,y),this.hasCurviness()?(Ge=E.x-b.x,x=E.y-b.y,ne=this.computeCurviness(),a=b.x+Ge/2,y=b.y+x/2,te=a,ae=y,tn.B(x,0)?ae=0<Ge?ae-ne:ae+ne:(Ge=-Ge/x,te=Math.sqrt(ne*ne/(Ge*Ge+1)),0>ne&&(te=-te),te=(0>x?-1:1)*te+a,ae=Ge*(te-a)+y),this.ne(b),this.yf(te,ae),this.ne(E)):(this.ne(b),this.ne(E),ae=pn.alloc(),y.mi(ae),ce=ae.ca(E),Ge.mi(ae),_e=ae.ca(b),(ce||_e)&&(ne=y.ga(qm(ne),new vt),this.dd(0,this.getLinkPointFromPoint(a,y,ne,E,!0,ne)),x=Ge.ga(qm(x),new vt),this.dd(1,this.getLinkPointFromPoint(te,Ge,x,b,!1,x))),pn.free(ae))}else{Ne=this.isAvoiding,Ge&&(Pe&&Ne||_e)&&this.Fj();var Nt=_e?this.computeCurviness():0;Ne=this.getLinkPoint(a,y,ne,!0,Pe,b,E),Ye=at=Qe=0,(Pe||!ae||_e)&&(Ct=this.computeEndSegmentLength(a,y,ne,!0),Ye=this.getLinkDirection(a,y,Ne,ne,!0,Pe,b,E),_e&&(ae||ne.D(x)||!Pe&&ne.x+x.x===1&&ne.y+x.y===1)&&(Ye-=Pe?90:30,0>Nt&&(Ye-=180)),0>Ye?Ye+=360:360<=Ye&&(Ye-=360),_e&&(Ct+=Math.abs(Nt)*(Pe?1:2)),Ye===0?Qe=Ct:Ye===90?at=Ct:Ye===180?Qe=-Ct:Ye===270?at=-Ct:(Qe=Ct*Math.cos(Ye*Math.PI/180),at=Ct*Math.sin(Ye*Math.PI/180)),ne.Mc()&&_e&&(Ct=y.ga(Hr,vt.alloc()),xt=vt.allocAt(Ct.x+1e3*Qe,Ct.y+1e3*at),this.getLinkPointFromPoint(a,y,Ct,xt,!0,Ne),vt.free(Ct),vt.free(xt))),Ct=this.getLinkPoint(b,E,x,!1,Pe,a,y);var It=Tt=xt=0;if(Pe||!ce||_e){var Zt=this.computeEndSegmentLength(b,E,x,!1);It=this.getLinkDirection(b,E,Ct,x,!1,Pe,a,y),_e&&(ce||ne.D(x)||!Pe&&ne.x+x.x===1&&ne.y+x.y===1)&&(It+=Pe?0:30,0>Nt&&(It+=180)),0>It?It+=360:360<=It&&(It-=360),_e&&(Zt+=Math.abs(Nt)*(Pe?1:2)),It===0?xt=Zt:It===90?Tt=Zt:It===180?xt=-Zt:It===270?Tt=-Zt:(xt=Zt*Math.cos(It*Math.PI/180),Tt=Zt*Math.sin(It*Math.PI/180)),x.Mc()&&_e&&(x=E.ga(Hr,vt.alloc()),ne=vt.allocAt(x.x+1e3*xt,x.y+1e3*Tt),this.getLinkPointFromPoint(b,E,x,ne,!1,Ct),vt.free(x),vt.free(ne))}x=Ne,(Pe||!ae||_e)&&(x=new vt(Ne.x+Qe,Ne.y+at)),ne=Ct,(Pe||!ce||_e)&&(ne=new vt(Ct.x+xt,Ct.y+Tt)),!Ge&&!Pe&&ae&&3<te&&this.adjustPoints(0,Ne,te-2,ne)?this.dd(te-1,Ct):!Ge&&!Pe&&ce&&3<te&&this.adjustPoints(1,x,te-1,Ct)?this.dd(0,Ne):!Ge&&(Pe?6<=te:4<te)&&this.adjustPoints(1,x,te-2,ne)?(this.dd(0,Ne),this.dd(te-1,Ct)):(this.Fj(),this.ne(Ne),(Pe||!ae||_e)&&this.ne(x),Pe&&this.addOrthoPoints(x,Ye,ne,It,a,b),(Pe||!ce||_e)&&this.ne(ne),this.ne(Ct))}return!0};function Zv(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}Gn.prototype.getLinkPointFromPoint=function(a,y,x,b,E,te){if(te===void 0&&(te=new vt),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 ae=-a.m12*E,ce=-a.m21*E,_e=a.m11*E,Pe=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*ce+Pe,b=b.x*ae+b.y*_e+Ne,ne=x.x*ne+x.y*ce+Pe,x=x.x*ae+x.y*_e+Ne}return y.Sj(E,b,ne,x,te),a!==null&&te.transform(a),te};function Jm(a,y){var x=y.Zn;return x===null&&(x=new Nf,x.port=y,x.node=y.part,y.Zn=x),lS(x,a)}Gn.prototype.getLinkPoint=function(a,y,x,b,E,te,ne,ae){if(ae===void 0&&(ae=new vt),x.sb()&&!Sp(x))return y.ga(x,ae),ae;if(x.$c()){var ce=Jm(this,y);if(ce!==null){if(ae.assign(ce.Zo),E&&this.routing===nS){var _e=Jm(this,ne);if(_e!==null&&ce.Gl<_e.Gl){ce=vt.alloc(),_e=vt.alloc();var Pe=new pn(y.ga(Ls,ce),y.ga(ka,_e)),Ne=this.computeSpot(!b,ne);a=this.getLinkPoint(te,ne,Ne,!b,E,a,y,_e),(x.Hf(cu)||x.Hf(Ta))&&a.y>=Pe.y&&a.y<=Pe.y+Pe.height?ae.y=a.y:(x.Hf(Hl)||x.Hf(al))&&a.x>=Pe.x&&a.x<=Pe.x+Pe.width&&(ae.x=a.x),vt.free(ce),vt.free(_e)}}return ae}}return x=y.ga(qm(x),vt.alloc()),this.pointsCount>(E?6:2)?(ne=b?this.i(1):this.i(this.pointsCount-2),E&&(ne=Zv(x,ne.copy()))):(ce=this.computeSpot(!b,ne),te=vt.alloc(),ne=ne.ga(qm(ce),te),E&&(ne=Zv(x,ne)),vt.free(te)),this.getLinkPointFromPoint(a,y,x,ne,b,ae),vt.free(x),ae},Gn.prototype.getLinkDirection=function(a,y,x,b,E,te,ne,ae){e:if(b.sb())var ce=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()&&(ce=Jm(this,y),ce!==null))switch(ce.Nc){case 1:ce=270;break e;case 2:ce=180;break e;default:case 4:ce=0;break e;case 8:ce=90;break e}ce=y.ga(Hr,vt.alloc()),this.pointsCount>(te?6:2)?(ae=E?this.i(1):this.i(this.pointsCount-2),ae=te?Zv(ce,ae.copy()):x):(x=vt.alloc(),ae=ae.ga(Hr,x),vt.free(x)),x=Math.abs(ae.x-ce.x)>Math.abs(ae.y-ce.y)?ae.x>=ce.x?0:180:ae.y>=ce.y?90:270,vt.free(ce),ce=x}return b.Mc()&&ne.Td(a)&&(ce+=180,360<=ce&&(ce-=360)),Sp(b)||(a=y.li(),a===0)||(45<=a&&135>a?ce+=90:135<=a&&225>a?ce+=180:225<=a&&315>a&&(ce+=270),360<=ce&&(ce-=360)),ce},Gn.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=Jm(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)},Gn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Hr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===ma?xs:y)):(a=y||this.toPort,a===null?a=Hr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===ma?xs:y)),a};function Sp(a){return a===xs||a.x===.5&&a.y===.5}function qm(a){return a.x===.5&&a.y===.5?a:Hr}Gn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==pl&&4<this.pointsCount?this.computeMidPoint(new vt):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(Hr))},Gn.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},Gn.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=xr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&xr.free(ne),!0;if(this.Yc(a,ne)){var ae=!1;if(!this.isAtomic)for(var ce=this.O.s,_e=ce.length;_e--;){var Pe=ce[_e];if(Pe.visible||Pe===this.locationObject){var Ne=Pe.actualBounds,Ge=this.naturalBounds;if(!(Ne.x>Ge.width||Ne.y>Ge.height||0>Ne.x+Ne.width||0>Ne.y+Ne.height)){if(Ne=xr.alloc(),Ne.set(ne),Pe instanceof Rn)ae=Pe.Cf(a,y,x,b,E,Ne);else if(this.path===Pe){if(Pe instanceof mr)if(ae=a,Ge=b,Pe.pickable===!1)ae=!1;else if(Ne.multiply(Pe.transform),Ge)e:{var Ye=ae,Qe=Ne;if(Pe.fh(Ye,Qe))ae=!0;else{if(Qe===void 0&&(Qe=Pe.transform,Ye.Re(Pe.actualBounds))){ae=!0;break e}ae=Ye.left,Ge=Ye.right;var at=Ye.top;Ye=Ye.bottom;var Ct=vt.alloc(),xt=vt.alloc(),Tt=vt.alloc(),Nt=xr.alloc();Nt.set(Qe),Nt.bv(Pe.transform),Nt.Vj(),xt.x=Ge,xt.y=at,xt.transform(Nt),Ct.x=ae,Ct.y=at,Ct.transform(Nt),Qe=!1,$d(Pe,Ct,xt,Tt)?Qe=!0:(Ct.x=Ge,Ct.y=Ye,Ct.transform(Nt),$d(Pe,Ct,xt,Tt)?Qe=!0:(xt.x=ae,xt.y=Ye,xt.transform(Nt),$d(Pe,Ct,xt,Tt)?Qe=!0:(Ct.x=ae,Ct.y=at,Ct.transform(Nt),$d(Pe,Ct,xt,Tt)&&(Qe=!0)))),xr.free(Nt),vt.free(Ct),vt.free(xt),vt.free(Tt),ae=Qe}}else ae=Pe.fh(ae,Ne)}else ae=da(Pe,a,b,Ne);ae&&(Ge=Pe,y!==null&&(Ge=y(Pe)),Ge&&(x===null||x(Ge))&&E.add(Ge)),xr.free(Ne)}}}return te===void 0&&xr.free(ne),ae||this.background!==null||this.areaBackground!==null}return te===void 0&&xr.free(ne),!1},Gn.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?lu:this.curve},Gn.prototype.computeCorner=function(){if(this.curve===lu)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Gn.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},Gn.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===bg||b===n0||b===Qv?a=Math.max(a,E):b===Cg||b===Lg||b===Pg||b===Eg?a=Math.max(a,ne):(y=y.ga(Hr).ab(x.ga(Hr))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ne)+Math.abs(Math.cos(y)*E)+1)),this.curve===lu&&(a*=1.333)}}return a},Gn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===pl&&x.bb()}},Gn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=iS;var y=this.Sf;if(y!==null){for(var x=Ti(),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),bi(x)}}return a},Gn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Gn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Gn.prototype.adjustPoints=function(a,y,x,b){var E=this.computeAdjusting();if(this.isOrthogonal){if(E===e0)return!1;E===t0&&(E=_g)}switch(E){case e0:var te=this.i(a),ne=this.i(x);if(!te.Xa(y)||!ne.Xa(b)){E=te.x,te=te.y;var ae=ne.x-E,ce=ne.y-te,_e=Math.sqrt(ae*ae+ce*ce);if(!tn.$(_e,0)){if(tn.$(ae,0))var Pe=0>ce?-Math.PI/2:Math.PI/2;else Pe=Math.atan(ce/Math.abs(ae)),0>ae&&(Pe=Math.PI-Pe);ne=y.x;var Ne=y.y;ae=b.x-ne;var Ge=b.y-Ne;for(ce=Math.sqrt(ae*ae+Ge*Ge),tn.$(ae,0)?Ge=0>Ge?-Math.PI/2:Math.PI/2:(Ge=Math.atan(Ge/Math.abs(ae)),0>ae&&(Ge=Math.PI-Ge)),_e=ce/_e,Pe=Ge-Pe,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),ae=y.x-E,ce=y.y-te,y=Math.sqrt(ae*ae+ce*ce),tn.$(y,0)||(tn.$(ae,0)?ce=0>ce?-Math.PI/2:Math.PI/2:(ce=Math.atan(ce/Math.abs(ae)),0>ae&&(ce=Math.PI-ce)),ae=ce+Pe,y*=_e,this.L(a,ne+y*Math.cos(ae),Ne+y*Math.sin(ae)));this.dd(x,b)}}return!0;case t0: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),ae=y.x,Pe=y.y,ce=b.x,Ge=b.y;var Ye=1;if(ce-ae!==0){var Qe=(Ge-Pe)/(ce-ae);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 at=y.x,Ct=y.y,xt=.5;_e!==0&&(xt=((E-at)*(E-ne)+(te-Ct)*(te-Ne))/_e);var Tt=E+xt*(ne-E),Nt=te+xt*(Ne-te);y=Math.sqrt((at-Tt)*(at-Tt)+(Ct-Nt)*(Ct-Nt)),Ct<Qe*(at-Tt)+Nt&&(y=-y),0<Qe&&(y=-y),at=ae+xt*(ce-ae),xt=Pe+xt*(Ge-Pe),Qe!==0?(y=at+y/Ye,this.L(a,y,xt-(y-at)/Qe)):this.L(a,at,xt+y)}this.dd(x,b)}return!0;case _g:e:{if(this.isOrthogonal&&(E=this.i(a),te=this.i(a+1),ne=this.i(a+2),ae=te.x,Pe=te.y,Ne=ae,_e=Pe,tn.B(E.y,te.y)?tn.B(te.x,ne.x)?Pe=y.y:tn.B(te.y,ne.y)&&(ae=y.x):tn.B(E.x,te.x)&&(tn.B(te.y,ne.y)?ae=y.x:tn.B(te.x,ne.x)&&(Pe=y.y)),this.L(a+1,ae,Pe),E=this.i(x),te=this.i(x-1),ne=this.i(x-2),ae=te.x,Pe=te.y,ce=ae,Ge=Pe,tn.B(E.y,te.y)?tn.B(te.x,ne.x)?Pe=b.y:tn.B(te.y,ne.y)&&(ae=b.x):tn.B(E.x,te.x)&&(tn.B(te.y,ne.y)?ae=b.x:tn.B(te.x,ne.x)&&(Pe=b.y)),this.L(x-1,ae,Pe),Yv(this))){this.L(a+1,Ne,_e),this.L(x-1,ce,Ge),x=!1;break e}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},Gn.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 ae=E.actualBounds.copy(),ce=te.actualBounds.copy();if(ae.w()&&ce.w()){ae.Bc(Mg,Mg),ce.Bc(Mg,Mg),ae.Ye(a),ce.Ye(x);var _e=vt.alloc(),Pe=vt.alloc();y===0?x.x>a.x||b===270&&x.y<a.y&&ce.right>a.x||b===90&&x.y>a.y&&ce.right>a.x?(_e.h(x.x,a.y),Pe.h(x.x,(a.y+x.y)/2),b===180?(_e.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),Pe.x=_e.x,Pe.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(_e.x=a.x<ce.left?this.computeMidOrthoPosition(a.x,a.y,ce.left,x.y,!1):a.x<ce.right&&(b===270&&a.y<ce.top||b===90&&a.y>ce.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ce.right,Pe.x=_e.x,Pe.y=x.y):b===0&&a.x<ce.left&&a.y>ce.top&&a.y<ce.bottom&&(_e.x=a.x,_e.y=a.y<x.y?Math.min(x.y,ce.top):Math.max(x.y,ce.bottom),Pe.y=_e.y)):(_e.h(a.x,x.y),Pe.h((a.x+x.x)/2,x.y),(b===180||b===90&&x.y<ae.top||b===270&&x.y>ae.bottom)&&(b===180&&(ce.ca(a)||ae.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,ae.top,x.x,Math.max(x.y,ce.bottom),!0):x.y>a.y&&(b===180||b===270)&&(_e.y=this.computeMidOrthoPosition(a.x,ae.bottom,x.x,Math.min(x.y,ce.top),!0)),Pe.x=x.x,Pe.y=_e.y),_e.y>ae.top&&_e.y<ae.bottom&&(x.x>=ae.left&&x.x<=a.x||a.x<=ce.right&&a.x>=x.x?(b===90||b===270)&&(_e.h(Math.max((a.x+x.x)/2,a.x),a.y),Pe.h(_e.x,x.y)):(_e.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===0?ae.top:Math.min(ae.top,ce.top)):Math.max(x.y,b===0?ae.bottom:Math.max(ae.bottom,ce.bottom)),Pe.x=x.x,Pe.y=_e.y))):y===180?x.x<a.x||b===270&&x.y<a.y&&ce.left<a.x||b===90&&x.y>a.y&&ce.left<a.x?(_e.h(x.x,a.y),Pe.h(x.x,(a.y+x.y)/2),b===0?(_e.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),Pe.x=_e.x,Pe.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(_e.x=a.x>ce.right?this.computeMidOrthoPosition(a.x,a.y,ce.right,x.y,!1):a.x>ce.left&&(b===270&&a.y<ce.top||b===90&&a.y>ce.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ce.left,Pe.x=_e.x,Pe.y=x.y):b===180&&a.x>ce.right&&a.y>ce.top&&a.y<ce.bottom&&(_e.x=a.x,_e.y=a.y<x.y?Math.min(x.y,ce.top):Math.max(x.y,ce.bottom),Pe.y=_e.y)):(_e.h(a.x,x.y),Pe.h((a.x+x.x)/2,x.y),(b===0||b===90&&x.y<ae.top||b===270&&x.y>ae.bottom)&&(b===0&&(ce.ca(a)||ae.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,ae.top,x.x,Math.max(x.y,ce.bottom),!0):x.y>a.y&&(b===0||b===270)&&(_e.y=this.computeMidOrthoPosition(a.x,ae.bottom,x.x,Math.min(x.y,ce.top),!0)),Pe.x=x.x,Pe.y=_e.y),_e.y>ae.top&&_e.y<ae.bottom&&(x.x<=ae.right&&x.x>=a.x||a.x>=ce.left&&a.x<=x.x?(b===90||b===270)&&(_e.h(Math.min((a.x+x.x)/2,a.x),a.y),Pe.h(_e.x,x.y)):(_e.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===180?ae.top:Math.min(ae.top,ce.top)):Math.max(x.y,b===180?ae.bottom:Math.max(ae.bottom,ce.bottom)),Pe.x=x.x,Pe.y=_e.y))):y===90?x.y>a.y||b===180&&x.x<a.x&&ce.bottom>a.y||b===0&&x.x>a.x&&ce.bottom>a.y?(_e.h(a.x,x.y),Pe.h((a.x+x.x)/2,x.y),b===270?(_e.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),Pe.x=x.x,Pe.y=_e.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(_e.y=a.y<ce.top?this.computeMidOrthoPosition(a.x,a.y,x.x,ce.top,!0):a.y<ce.bottom&&(b===180&&a.x<ce.left||b===0&&a.x>ce.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ce.bottom,Pe.x=x.x,Pe.y=_e.y):b===90&&a.y<ce.top&&a.x>ce.left&&a.x<ce.right&&(_e.x=a.x<x.x?Math.min(x.x,ce.left):Math.max(x.x,ce.right),_e.y=a.y,Pe.x=_e.x)):(_e.h(x.x,a.y),Pe.h(x.x,(a.y+x.y)/2),(b===270||b===0&&x.x<ae.left||b===180&&x.x>ae.right)&&(b===270&&(ce.ca(a)||ae.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(ae.left,a.y,Math.max(x.x,ce.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(_e.x=this.computeMidOrthoPosition(ae.right,a.y,Math.min(x.x,ce.left),x.y,!1)),Pe.x=_e.x,Pe.y=x.y),_e.x>ae.left&&_e.x<ae.right&&(x.y>=ae.top&&x.y<=a.y||a.y<=ce.bottom&&a.y>=x.y?(b===0||b===180)&&(_e.h(a.x,Math.max((a.y+x.y)/2,a.y)),Pe.h(x.x,_e.y)):(_e.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===90?ae.left:Math.min(ae.left,ce.left)):Math.max(x.x,b===90?ae.right:Math.max(ae.right,ce.right)),Pe.x=_e.x,Pe.y=x.y))):x.y<a.y||b===180&&x.x<a.x&&ce.top<a.y||b===0&&x.x>a.x&&ce.top<a.y?(_e.h(a.x,x.y),Pe.h((a.x+x.x)/2,x.y),b===90?(_e.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),Pe.x=x.x,Pe.y=_e.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(_e.y=a.y>ce.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,ce.bottom,!0):a.y>ce.top&&(b===180&&a.x<ce.left||b===0&&a.x>ce.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ce.top,Pe.x=x.x,Pe.y=_e.y):b===270&&a.y>ce.bottom&&a.x>ce.left&&a.x<ce.right&&(_e.x=a.x<x.x?Math.min(x.x,ce.left):Math.max(x.x,ce.right),_e.y=a.y,Pe.x=_e.x)):(_e.h(x.x,a.y),Pe.h(x.x,(a.y+x.y)/2),(b===90||b===0&&x.x<ae.left||b===180&&x.x>ae.right)&&(b===90&&(ce.ca(a)||ae.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(ae.left,a.y,Math.max(x.x,ce.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(_e.x=this.computeMidOrthoPosition(ae.right,a.y,Math.min(x.x,ce.left),x.y,!1)),Pe.x=_e.x,Pe.y=x.y),_e.x>ae.left&&_e.x<ae.right&&(x.y<=ae.bottom&&x.y>=a.y||a.y>=ce.top&&a.y<=x.y?(b===0||b===180)&&(_e.h(a.x,Math.min((a.y+x.y)/2,a.y)),Pe.h(x.x,_e.y)):(_e.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===270?ae.left:Math.min(ae.left,ce.left)):Math.max(x.x,b===270?ae.right:Math.max(ae.right,ce.right)),Pe.x=_e.x,Pe.y=x.y)));var Ne=x;if(this.isAvoiding){var Ge=this.diagram;if(Ge===null||E===te||this.layer.isTemporary||!$f(Ge)||ae.ca(Ne)&&!te.Td(E)||ce.ca(a)&&!E.Td(te))y=!1;else{var Ye=ep(Ge,!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,Pe.x),Math.min(_e.y,Pe.y),Math.abs(_e.x-Pe.x),Math.abs(_e.y-Pe.y))&&Ye.Yj(Math.min(Pe.x,Ne.x),Math.min(Pe.y,Ne.y),Math.abs(Pe.x-Ne.x),Math.abs(Pe.y-Ne.y)))y=!1;else{E=a,te=Ne;var Qe=x=null;if(Ge.isVirtualized){Ge=Ye.bounds.copy(),Ge.Bc(-Ye.Ho,-Ye.Go);var at=vt.alloc();wp(Ye,a.x,a.y)||(tn.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,a.x,a.y,_e.x,_e.y,at)?(x=a=at.copy(),y=at.ab(_e)):tn.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,_e.x,_e.y,Pe.x,Pe.y,at)?(x=a=at.copy(),y=at.ab(Pe)):tn.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,Pe.x,Pe.y,Ne.x,Ne.y,at)&&(x=a=at.copy(),y=at.ab(Ne))),wp(Ye,Ne.x,Ne.y)||(tn.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,Ne.x,Ne.y,Pe.x,Pe.y,at)?(Qe=Ne=at.copy(),b=Pe.ab(at)):tn.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,Pe.x,Pe.y,_e.x,_e.y,at)?(Qe=Ne=at.copy(),b=_e.ab(at)):tn.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,_e.x,_e.y,a.x,a.y,at)&&(Qe=Ne=at.copy(),b=a.ab(at))),vt.free(at)}ae=ae.copy().ed(ce),ae.Bc(Ye.Ho*Ye.Os,Ye.Go*Ye.Os),sS(Ye,a,y,Ne,b,ae,!0),ce=Hh(Ye,Ne.x,Ne.y),!Ye.abort&&ce>=_p&&(oS(Ye),ae.Bc(Ye.Ho*Ye.Hx,Ye.Go*Ye.Ix),sS(Ye,a,y,Ne,b,ae,!1),ce=Hh(Ye,Ne.x,Ne.y)),!Ye.abort&&ce<_p&&Hh(Ye,Ne.x,Ne.y)!==Uc?(Xv(this,Ye,Ne.x,Ne.y,b,!0,ne),ae=this.i(2),4>this.pointsCount?(y===0||y===180?(ae.x=a.x,ae.y=Ne.y):(ae.x=Ne.x,ae.y=a.y),this.L(2,ae.x,ae.y),this.m(3,ae.x,ae.y)):(ne=this.i(3),y===0||y===180?tn.B(ae.x,ne.x)?(ae=y===0?Math.max(ae.x,a.x):Math.min(ae.x,a.x),this.L(2,ae,a.y),this.L(3,ae,ne.y)):tn.B(ae.y,ne.y)?(Math.abs(a.y-ae.y)<=Ye.Go/2&&(this.L(2,ae.x,a.y),this.L(3,ne.x,a.y)),this.m(2,ae.x,a.y)):this.L(2,a.x,ae.y):(y===90||y===270)&&(tn.B(ae.y,ne.y)?(ae=y===90?Math.max(ae.y,a.y):Math.min(ae.y,a.y),this.L(2,a.x,ae),this.L(3,ne.x,ae)):tn.B(ae.x,ne.x)?(Math.abs(a.x-ae.x)<=Ye.Ho/2&&(this.L(2,a.x,ae.y),this.L(3,a.x,ne.y)),this.m(2,a.x,ae.y)):this.L(2,ae.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(Pe.copy())),vt.free(_e),vt.free(Pe)}},Gn.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||!$f(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=ep(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 ae=y.Ho,ce=y.Go,_e=Hh(y,x,b),Pe=x,Ne=b;for(E===0?Pe+=ae:E===90?Ne+=ce:E===180?Pe-=ae:Ne-=ce,E!==ne&&_e>nf&&Hh(y,Pe,Ne)!==_e-1&&(Hh(y,x-ae,b)===_e-1?(E=180,Pe=x-ae,Ne=b):Hh(y,x+ae,b)===_e-1?(E=0,Pe=x+ae,Ne=b):Hh(y,x,b-ce)===_e-1?(E=270,Pe=x,Ne=b-ce):Hh(y,x,b+ce)===_e-1&&(E=90,Pe=x,Ne=b+ce));_e>nf&&Hh(y,Pe,Ne)===_e-1;)x=Pe,b=Ne,E===0?Pe+=ae:E===90?Ne+=ce:E===180?Pe-=ae:Ne-=ce,--_e;te?_e>nf&&(E===180||E===0?x=Math.floor(x/ae)*ae+ae/2:(E===90||E===270)&&(b=Math.floor(b/ce)*ce+ce/2)):(x=Math.floor(x/ae)*ae+ae/2,b=Math.floor(b/ce)*ce+ce/2),_e>nf&&(te=E,ne=x,Pe=b,E===0?(te=90,Pe+=ce):E===90?(te=180,ne-=ae):E===180?(te=270,Pe-=ce):E===270&&(te=0,ne+=ae),Hh(y,ne,Pe)===_e-1?Xv(a,y,ne,Pe,te,!1,te):(ne=x,Pe=b,E===0?(te=270,Pe-=ce):E===90?(te=0,ne+=ae):E===180?(te=90,Pe+=ce):E===270&&(te=180,ne-=ae),Hh(y,ne,Pe)===_e-1&&Xv(a,y,ne,Pe,te,!1,te))),a.yf(x,b)}Gn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=ir(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 ae=ir(y,a,b.x,b.y,x.x,x.y);b=x,ae<E&&(te=ne,E=ae)}return te},Gn.prototype.qc=function(){this.lk=!1,this.v()},Gn.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 mr&&(E.ua=this.ua)}}},Gn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&tf(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===lu&&3<=y&&!tn.$(this.smoothness,0))if(y===3){var ae=this.i(1);b=Math.min(E.x,ae.x);var ce=Math.min(E.y,ae.y);ae=this.i(2),b=Math.min(b,ae.x),ce=Math.min(ce,ae.y)}else{if(this.isOrthogonal)for(ce=0;ce<y;ce++)ae=b[ce],te.x=Math.min(ae.x,te.x),te.y=Math.min(ae.y,te.y);else for(b=3;b<y;b+=3)b+3>=y&&(b=y-1),ce=this.i(b),te.x=Math.min(ce.x,te.x),te.y=Math.min(ce.y,te.y);b=te.x,ce=te.y}else{for(ce=0;ce<y;ce++)ae=b[ce],te.x=Math.min(ae.x,te.x),te.y=Math.min(ae.y,te.y);b=te.x,ce=te.y}if(b-=this.su.x,ce-=this.su.y,E.x-=b,E.y-=ce,y!==2||tf(this)){if(a.type=Kn.o,ae=A1(a),this.computeShortLength(!0)!==0&&(E=Mf(this,E,!0,te)),vp(ae,E.x,E.y,!1),ne===lu&&3<=y&&!tn.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-b,x=x.y-ce,E=this.i(2).copy(),E.x-=b,E.y-=ce,this.computeShortLength(!1)!==0&&(E=Mf(this,E,!1,te)),Ic(ae,y,x,y,x,E.x,E.y);else if(this.isOrthogonal){y=vt.allocAt(b,ce),x=vt.alloc(),x.assign(this.i(1)),te=vt.allocAt(b,ce),E=vt.allocAt(b,ce),ne=this.i(0);for(var _e,Pe=this.smoothness/3,Ne=1;Ne<this.pointsCount-1;Ne++){_e=this.i(Ne);var Ge=ne,Ye=_e,Qe=this.i(Jv(this,_e,Ne,!1));if((!tn.$(Ge.x,Ye.x)||!tn.$(Ye.x,Qe.x))&&(!tn.$(Ge.y,Ye.y)||!tn.$(Ye.y,Qe.y))){var at=Pe;isNaN(at)&&(at=this.smoothness/3);var Ct=Ge.x;Ge=Ge.y;var xt=Ye.x;Ye=Ye.y;var Tt=Qe.x;Qe=Qe.y;var Nt=at*Qm(Ct,Ge,xt,Ye);at*=Qm(xt,Ye,Tt,Qe),tn.$(Ge,Ye)&&tn.$(xt,Tt)&&(xt>Ct?Qe>Ye?(te.x=xt-Nt,te.y=Ye-Nt,E.x=xt+at,E.y=Ye+at):(te.x=xt-Nt,te.y=Ye+Nt,E.x=xt+at,E.y=Ye-at):Qe>Ye?(te.x=xt+Nt,te.y=Ye-Nt,E.x=xt-at,E.y=Ye+at):(te.x=xt+Nt,te.y=Ye+Nt,E.x=xt-at,E.y=Ye-at)),tn.$(Ct,xt)&&tn.$(Ye,Qe)&&(Ye>Ge?(Tt>xt?(te.x=xt-Nt,te.y=Ye-Nt,E.x=xt+at):(te.x=xt+Nt,te.y=Ye-Nt,E.x=xt-at),E.y=Ye+at):(Tt>xt?(te.x=xt-Nt,te.y=Ye+Nt,E.x=xt+at):(te.x=xt+Nt,te.y=Ye+Nt,E.x=xt-at),E.y=Ye-at)),(tn.$(Ct,xt)&&tn.$(xt,Tt)||tn.$(Ge,Ye)&&tn.$(Ye,Qe))&&(Ct=.5*(Ct+Tt),Ge=.5*(Ge+Qe),te.x=Ct,te.y=Ge,E.x=Ct,E.y=Ge),(Ne===1||Ne===2&&tn.$(ne.x,this.i(0).x)&&tn.$(ne.y,this.i(0).y))&&(x.x=.5*(ne.x+_e.x),x.y=.5*(ne.y+_e.y)),Ic(ae,x.x-b,x.y-ce,te.x-b,te.y-ce,_e.x-b,_e.y-ce),y.set(te),x.set(E),ne=_e}}_e=ne.x,ne=ne.y,Pe=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(Pe=Mf(this,Pe.copy(),!1,Sr)),_e=.5*(_e+Pe.x),ne=.5*(ne+Pe.y),Ic(ae,E.x-b,E.y-ce,_e-b,ne-ce,Pe.x-b,Pe.y-ce),vt.free(y),vt.free(x),vt.free(te),vt.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=Mf(this,ne.copy(),!1,Sr)),Ic(ae,te.x-b,te.y-ce,E.x-b,E.y-ce,ne.x-b,ne.y-ce);else{for(te=vt.alloc(),te.assign(this.i(0)),E=vt.alloc(),E.assign(te),ne=this.computeCorner(),Ne=1,_e=0;Ne<y;){if(Ne=Jv(this,te,Ne,1<Ne),Pe=this.i(Ne),Ne>=y-1){if(!te.D(Pe))this.computeShortLength(!1)!==0&&(Pe=Mf(this,Pe.copy(),!1,Sr)),kf(this,ae,-b,-ce,te,Pe,x);else if(_e===0)for(Ne=1;Ne<y;)E.assign(te),Pe=this.i(Ne++),kf(this,ae,-b,-ce,te,Pe,x),te.assign(Pe);break}if(_e=Jv(this,Pe,Ne+1,Ne<y-3),Ne=-b,Ct=-ce,Ge=Pe,xt=this.i(_e),at=x,tn.B(te.y,Ge.y)&&tn.B(Ge.x,xt.x))if(Qe=Math.min(ne,Math.abs(Ge.x-E.x)/2),Qe=Nt=Math.min(Qe,Math.abs(xt.y-Ge.y)/2),tn.B(Qe,0))kf(this,ae,Ne,Ct,te,Ge,at),te.assign(Ge);else{var It=Ge.x,Zt=Ge.y;Ye=It,Tt=Zt,Ge.x>te.x?It=Ge.x-Qe:It=Ge.x+Qe,xt.y>Ge.y?Tt=Ge.y+Nt:Tt=Ge.y-Nt,xt=vt.allocAt(It,Zt),kf(this,ae,Ne,Ct,te,xt,at),vt.free(xt),Hm(ae,Ge.x+Ne,Ge.y+Ct,Ye+Ne,Tt+Ct),te.h(Ye,Tt)}else tn.B(te.x,Ge.x)&&tn.B(Ge.y,xt.y)?(Qe=Math.min(ne,Math.abs(Ge.y-E.y)/2),Qe=Nt=Math.min(Qe,Math.abs(xt.x-Ge.x)/2),tn.B(Nt,0)?(kf(this,ae,Ne,Ct,te,Ge,at),te.assign(Ge)):(It=Ge.x,Zt=Ge.y,Ye=It,Tt=Zt,Ge.y>te.y?Zt=Ge.y-Qe:Zt=Ge.y+Qe,xt.x>Ge.x?Ye=Ge.x+Nt:Ye=Ge.x-Nt,xt=vt.allocAt(It,Zt),kf(this,ae,Ne,Ct,te,xt,at),vt.free(xt),Hm(ae,Ge.x+Ne,Ge.y+Ct,Ye+Ne,Tt+Ct),te.h(Ye,Tt))):(kf(this,ae,Ne,Ct,te,Ge,at),te.assign(Ge));E.assign(Pe),Ne=_e}vt.free(te)}Gm=ae}else ae=this.i(1).copy(),ae.x-=b,ae.y-=ce,this.computeShortLength(!0)!==0&&(E=Mf(this,E,!0,te)),this.computeShortLength(!1)!==0&&(ae=Mf(this,ae,!1,te)),a.type=Kn.j,a.startX=E.x,a.startY=E.y,a.endX=ae.x,a.endY=ae.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),tn.$(a,0)?y:tn.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Mf(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;tn.$(y.x,te.x)&&tn.$(y.y,te.y);){if(x>=E)return E-1;te=a.i(x++)}if(!tn.$(y.x,te.x)&&!tn.$(y.y,te.y))return x-1;for(var ne=te;tn.$(y.x,te.x)&&tn.$(te.x,ne.x)&&(!b||(y.y>=te.y?te.y>=ne.y:te.y<=ne.y))||tn.$(y.y,te.y)&&tn.$(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}Gn.prototype.computeJumpLength=function(){return 10};function kf(a,y,x,b,E,te,ne){if(!ne&&tf(a)){ne=a.computeJumpLength();var ae=ne/2,ce=[],_e=0;if(a.isVisible()&&(_e=Ex(a,E,te,ce)),0<_e){if(tn.B(E.y,te.y))if(E.x<te.x)for(var Pe=0;Pe<_e;){var Ne=Math.max(E.x,Math.min(ce[Pe++]-ae,te.x-ne));y.lineTo(Ne+x,te.y+b);for(var Ge=Ne+x,Ye=Math.min(Ne+ne,te.x);Pe<_e&&(Ne=ce[Pe],Ne<Ye+ne);)Pe++,Ye=Math.min(Ne+ae,te.x);Ne=te.y-ne+b,Ye+=x;var Qe=te.y+b;a.curve===zc?vp(y,Ye,Qe,!1):Ic(y,Ge,Ne,Ye,Ne,Ye,Qe)}else for(--_e;0<=_e;){for(Pe=Math.min(E.x,Math.max(ce[_e--]+ae,te.x+ne)),y.lineTo(Pe+x,te.y+b),Ge=Pe+x,Ne=Math.max(Pe-ne,te.x);0<=_e&&(Pe=ce[_e],Pe>Ne-ne);)_e--,Ne=Math.max(Pe-ae,te.x);Pe=te.y-ne+b,Ne+=x,Ye=te.y+b,a.curve===zc?vp(y,Ne,Ye,!1):Ic(y,Ge,Pe,Ne,Pe,Ne,Ye)}else if(tn.B(E.x,te.x))if(E.y<te.y)for(Pe=0;Pe<_e;){for(Ne=Math.max(E.y,Math.min(ce[Pe++]-ae,te.y-ne)),y.lineTo(te.x+x,Ne+b),Ge=Ne+b,Ne=Math.min(Ne+ne,te.y);Pe<_e&&(Ye=ce[Pe],Ye<Ne+ne);)Pe++,Ne=Math.min(Ye+ae,te.y);Ye=te.x-ne+x,Qe=te.x+x,Ne+=b,a.curve===zc?vp(y,Qe,Ne,!1):Ic(y,Ye,Ge,Ye,Ne,Qe,Ne)}else for(--_e;0<=_e;){for(Pe=Math.min(E.y,Math.max(ce[_e--]+ae,te.y+ne)),y.lineTo(te.x+x,Pe+b),Ge=Pe+b,Pe=Math.max(Pe-ne,te.y);0<=_e&&(Ne=ce[_e],Ne>Pe-ne);)_e--,Pe=Math.max(Ne-ae,te.y);Ne=te.x-ne+x,Ye=te.x+x,Pe+=b,a.curve===zc?vp(y,Ye,Pe,!1):Ic(y,Ne,Ge,Ne,Pe,Ye,Pe)}}}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,ae=0;ae<ne;ae++){var ce=te[ae];if(ce instanceof Gn){if(ce===a)return 0<b.length&&b.sort(function(Pe,Ne){return Pe-Ne}),b.length;if(ce.isVisible()&&tf(ce)){var _e=ce.routeBounds;_e.w()&&a.routeBounds.Yc(_e)&&!a.usesSamePort(ce)&&(_e=ce.path,_e!==null&&_e.Ed()&&Lx(y,x,b,ce))}}}}}return 0<b.length&&b.sort(function(Pe,Ne){return Pe-Ne}),b.length}function Lx(a,y,x,b){for(var E=tn.B(a.y,y.y),te=b.pointsCount,ne=b.i(0),ae=vt.alloc(),ce=1;ce<te;ce++){var _e=b.i(ce);if(ce<te-1){var Pe=b.i(ce+1);if(ne.y===_e.y&&_e.y===Pe.y){if(_e.x>ne.x&&Pe.x>=_e.x||_e.x<ne.x&&Pe.x<=_e.x)continue}else if(ne.x===_e.x&&_e.x===Pe.x&&(_e.y>ne.y&&Pe.y>=_e.y||_e.y<ne.y&&Pe.y<=_e.y))continue}e:{Pe=a.x;var Ne=a.y,Ge=y.x,Ye=y.y,Qe=ne.x;ne=ne.y;var at=_e.x,Ct=_e.y;if(tn.B(Pe,Ge)){if(!tn.B(Ne,Ye)&&tn.B(ne,Ct)&&Math.min(Ne,Ye)<ne&&Math.max(Ne,Ye)>ne&&Math.min(Qe,at)<Pe&&Math.max(Qe,at)>Pe&&!tn.B(Qe,at)){ae.x=Pe,ae.y=ne,Pe=!0;break e}}else if(tn.B(Ne,Ye)&&tn.B(Qe,at)&&Math.min(Pe,Ge)<Qe&&Math.max(Pe,Ge)>Qe&&Math.min(ne,Ct)<Ne&&Math.max(ne,Ct)>Ne&&!tn.B(ne,Ct)){ae.x=Qe,ae.y=Ne,Pe=!0;break e}ae.x=0,ae.y=0,Pe=!1}Pe&&(E?x.push(ae.x):x.push(ae.y)),ne=_e}vt.free(ae)}function tf(a){return a=a.curve,a===xp||a===zc}function $m(a,y){(y||tf(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()))}Gn.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,ae=0;ae<ne;ae++){var ce=E[ae];ce instanceof Gn&&(ce===this?te=!0:te&&tS(this,ce,a))}}else if(b)for(te=E.Pa.s,E=te.length,ne=0;ne<E;ne++)ae=te[ne],ae instanceof Gn&&tS(this,ae,a)}}}}};function tS(a,y,x){if(y!==null&&y.lk&&y.fd&&tf(y)){var b=y.routeBounds;b.w()&&(a.routeBounds.Yc(b)||x.Yc(b))&&(a.usesSamePort(y)||y.qc())}}Gn.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},Gn.prototype.isVisible=function(){if(!Ni.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},Gn.prototype.Zb=function(a){if(Ni.prototype.Zb.call(this,a),a&&$m(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},Gn.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?_g:this.qk};function xg(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,ae=ne.length,ce=0;ce<ae;ce++){var _e=ne[ce];(_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 r0(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 wg(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(_r(y.links,a),y.Sl()))}Gn.prototype.ph=function(){return!0},ot.Object.defineProperties(Gn.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&&Zm(y,this,x),wg(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&&Vm(a,this,E),xg(this),this.C(1)),this.g("fromNode",y,a),yp(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Jl(x),wg(this),this.ff=a;var b=this.fromPort;b!==null&&Jl(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))),xg(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&&Zm(y,this,x),wg(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&&Vm(a,this,E),xg(this),this.C(1)),this.g("toNode",y,a),yp(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Jl(x),wg(this),this.vf=a;var b=this.toPort;b!==null&&Jl(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))),xg(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:ma},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&&Jl(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&&vi(a,">= 0",Gn,"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:ma},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&&Jl(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&&vi(a,">= 0",Gn,"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?uo: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&&Sg(this.fromNode),this.toNode!==null&&Sg(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof mr?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()===lu&&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),tn.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 ae=this.i(te-1),ce=this.i(te);tn.Dl(E.x,E.y,ne.x,ne.y,ae.x,ae.y,ce.x,ce.y,.5,a),y=Math.min(ce.x,y),x=Math.min(ce.y,x),E=ce}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 vt)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||Xm(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);tn.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):tn.$(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 zn,b=0;b<a.length/2;b++)E=new vt(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(!cn(te)||typeof te.x!="number"||isNaN(te.x)||typeof te.y!="number"||isNaN(te.y)){b=!1;break}}if(b)for(x=new zn,b=0;b<a.length;b++)E=a[b],x.add(new vt(E.x,E.y).freeze())}}else if(a instanceof zn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else rn("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Xm(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&Kl(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||!Sp(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Sp(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(),$m(this,y===zc||y===xp||a===zc||a===xp),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(),$m(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)}}}),Gn.prototype.invalidateOtherJumpOvers=Gn.prototype.Xo,Gn.prototype.findClosestSegment=Gn.prototype.ez,Gn.prototype.updateRoute=Gn.prototype.vg,Gn.prototype.invalidateRoute=Gn.prototype.bb,Gn.prototype.rollbackRoute=Gn.prototype.rv,Gn.prototype.commitRoute=Gn.prototype.zf,Gn.prototype.startRoute=Gn.prototype.uh,Gn.prototype.clearPoints=Gn.prototype.Fj,Gn.prototype.removePoint=Gn.prototype.pv,Gn.prototype.addPointAt=Gn.prototype.yf,Gn.prototype.addPoint=Gn.prototype.ne,Gn.prototype.insertPointAt=Gn.prototype.m,Gn.prototype.insertPoint=Gn.prototype.Kz,Gn.prototype.setPointAt=Gn.prototype.L,Gn.prototype.setPoint=Gn.prototype.dd,Gn.prototype.getPoint=Gn.prototype.i,Gn.prototype.getOtherPort=Gn.prototype.Cz,Gn.prototype.getOtherNode=Gn.prototype.To;var Tf=null,Af=null,qv=new dn(Gn,"Normal",1),Mx=new dn(Gn,"Orthogonal",2),kx=new dn(Gn,"AvoidsNodes",6),nS=new dn(Gn,"AvoidsNodesStraight",7),pl=new dn(Gn,"None",0),lu=new dn(Gn,"Bezier",9),zc=new dn(Gn,"JumpGap",10),xp=new dn(Gn,"JumpOver",11),_g=new dn(Gn,"End",17),e0=new dn(Gn,"Scale",18),t0=new dn(Gn,"Stretch",19),bg=new dn(Gn,"OrientAlong",21),Pg=new dn(Gn,"OrientPlus90",22),Cg=new dn(Gn,"OrientMinus90",23),Qv=new dn(Gn,"OrientOpposite",24),n0=new dn(Gn,"OrientUpright",25),Eg=new dn(Gn,"OrientPlus90Upright",26),Lg=new dn(Gn,"OrientMinus90Upright",27),i0=new dn(Gn,"OrientUpright45",28),iS=16,rS=14,Mg=8;Gn.className="Link",Gn.Normal=qv,Gn.Orthogonal=Mx,Gn.AvoidsNodes=kx,Gn.AvoidsNodesStraight=nS,Gn.None=pl,Gn.Bezier=lu,Gn.JumpGap=zc,Gn.JumpOver=xp,Gn.End=_g,Gn.Scale=e0,Gn.Stretch=t0,Gn.OrientAlong=bg,Gn.OrientPlus90=Pg,Gn.OrientMinus90=Cg,Gn.OrientOpposite=Qv,Gn.OrientUpright=n0,Gn.OrientPlus90Upright=Eg,Gn.OrientMinus90Upright=Lg,Gn.OrientUpright45=i0,Gn.EndSegmentStep=8,Gn.CurvinessStart=iS,Gn.SpacingMin=rS,Gn.OrthoShortCut=Mg;function r0(a,y,x,b){en(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=b,this.links=[]}r0.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},r0.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))}},r0.className="LinkBundle";function kg(a){en(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}kg.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 wp(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function Hh(a,y,x){return wp(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]>=nf&&(x[b]=$v)}kg.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]===Uc)return!1}return!0};function Gh(a,y,x,b,E,te,ne,ae,ce){if(!(y<te||y>ne||x<ae||x>ce)){var _e=y|0,Pe=x|0,Ne=a.ac[_e][Pe];if(Ne>=nf&&Ne<_p)for(E?Pe+=b:_e+=b,Ne+=1;te<=_e&&_e<=ne&&ae<=Pe&&Pe<=ce&&!(Ne>=a.ac[_e][Pe]);)a.ac[_e][Pe]=Ne,Ne+=1,E?Pe+=b:_e+=b;if(_e=E?Pe:_e,E)if(0<b)for(x+=b;x<_e;x+=b)Gh(a,y,x,1,!E,te,ne,ae,ce),Gh(a,y,x,-1,!E,te,ne,ae,ce);else for(x+=b;x>_e;x+=b)Gh(a,y,x,1,!E,te,ne,ae,ce),Gh(a,y,x,-1,!E,te,ne,ae,ce);else if(0<b)for(y+=b;y<_e;y+=b)Gh(a,y,x,1,!E,te,ne,ae,ce),Gh(a,y,x,-1,!E,te,ne,ae,ce);else for(y+=b;y>_e;y+=b)Gh(a,y,x,1,!E,te,ne,ae,ce),Gh(a,y,x,-1,!E,te,ne,ae,ce)}}function o0(a,y,x,b,E,te,ne,ae,ce){y|=0,x|=0;var _e=Uc,Pe=nf;for(a.ac[y][x]=Pe;_e===Uc&&y>te&&y<ne&&x>ae&&x<ce;)Pe+=1,a.ac[y][x]=Pe,E?x+=b:y+=b,_e=a.ac[y][x]}function s0(a,y,x,b,E,te,ne,ae,ce){y|=0,x|=0;var _e=Uc,Pe=_p;for(a.ac[y][x]=Pe;_e===Uc&&y>te&&y<ne&&x>ae&&x<ce;)a.ac[y][x]=Pe,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 ae=y.x,ce=y.y;if(wp(a,ae,ce)){ae-=a.Nd,ae/=a.rc,ce-=a.Od,ce/=a.sc;var _e=b.x,Pe=b.y;if(wp(a,_e,Pe))if(_e-=a.Nd,_e/=a.rc,Pe-=a.Od,Pe/=a.sc,1>=Math.abs(ae-_e)&&1>=Math.abs(ce-Pe))a.abort=!0;else{var Ne=te.x;b=te.y,y=te.x+te.width;var Ge=te.y+te.height;Ne-=a.Nd,Ne/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,Ge-=a.Od,Ge/=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)),Ge=Math.min(a.ei,Math.max(0,Ge|0)),b=a.ac,ae|=0,ce|=0,_e|=0,Pe|=0;var Ye=x===0||x===90?1:-1;if(x=x===90||x===270,b[ae][ce]===Uc?(o0(a,ae,ce,Ye,x,te,y,Ne,Ge),o0(a,ae,ce,1,!x,te,y,Ne,Ge),o0(a,ae,ce,-1,!x,te,y,Ne,Ge)):o0(a,ae,ce,Ye,x,ae,ce,ae,ce),b[_e][Pe]===Uc?(s0(a,_e,Pe,E===0||E===90?1:-1,E===90||E===270,te,y,Ne,Ge),s0(a,_e,Pe,1,!(E===90||E===270),te,y,Ne,Ge),s0(a,_e,Pe,-1,!(E===90||E===270),te,y,Ne,Ge)):s0(a,_e,Pe,Ye,x,_e,Pe,_e,Pe),x=Ti(),ne&&aS(a,_e,Pe,E,ae,ce,x))for((x[0]!==_e||x[1]!==Pe)&&(x.unshift(Pe),x.unshift(_e)),(x[x.length-2]!==ae||x[x.length-1]!==ce)&&(x.push(ae),x.push(ce)),a=nf,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 Gh(a,ae,ce,1,!1,te,y,Ne,Ge),Gh(a,ae,ce,-1,!1,te,y,Ne,Ge),Gh(a,ae,ce,1,!0,te,y,Ne,Ge),Gh(a,ae,ce,-1,!0,te,y,Ne,Ge);bi(x)}}}}function aS(a,y,x,b,E,te,ne){for(var ae=a.ac,ce=y,_e=x;;){if(ce===E&&_e===te)return!0;var Pe=ce,Ne=_e;if(b===0)if(Pe<E)Pe++;else break;else if(b===90)if(Ne<te)Ne++;else break;else if(b===180)if(Pe>E)Pe--;else break;else if(Ne>te)Ne--;else break;var Ge=ae[Pe][Ne];if(Ge===0||Ge===ey)break;ce=Pe,_e=Ne}for(;;){if(Pe=b,Ne=ce,Ge=_e,b===0?Ge<te?(Pe=90,Ge++):Ge>te&&(Pe=270,Ge--):b===90?Ne<E?(Pe=0,Ne++):Ne>E&&(Pe=180,Ne--):b===180?Ge<te?(Pe=90,Ge++):Ge>te&&(Pe=270,Ge--):Ne<E?(Pe=0,Ne++):Ne>E&&(Pe=180,Ne--),Ne=ae[Ne][Ge],Pe!==b&&Ne!==0&&Ne!==ey){if(ne.push(ce),ne.push(_e),aS(a,ce,_e,Pe,E,te,ne))return!0;ne.pop(),ne.pop()}if(ae[ce][_e]=ey,b===0){if(ce===y)return!1;ce--}else if(b===90){if(_e===x)return!1;_e--}else if(b===180){if(ce===y)return!1;ce++}else{if(_e===x)return!1;_e++}}}ot.Object.defineProperties(kg.prototype,{bounds:{get:function(){return new pn(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 Uc=0,nf=1,_p=999999,$v=_p+1,ey=_p+2;kg.className="PositionArray";function Nf(){en(this),this.port=this.node=null,this.pe=[],this.ap=!1}Nf.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}Nf.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 ur?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 ae=a.port.ga(Ls,vt.alloc()),ce=a.port.ga(ka,vt.alloc());for(E=pn.allocAt(ae.x,ae.y,0,0),E.Ye(ce),vt.free(ae),vt.free(ce),ae=vt.allocAt(E.x+E.width/2,E.y+E.height/2),ce=a.port.li(),ne=ne.iterator;ne.next();){var _e=ne.value;if(_e.isVisible()&&_e.fromPort!==_e.toPort){var Pe=_e.fromPort===a.port||_e.fromNode!==null&&_e.fromNode.Td(b),Ne=_e.computeSpot(Pe,a.port);if(Ne.$c()&&(Pe=Pe?_e.toPort:_e.fromPort,Pe!==null)){var Ge=Pe.part;if(Ge!==null){var Ye=Ge.findVisibleNode();Ye!==null&&Ye!==Ge&&(Ge=Ye,Pe=Ge.port),Pe=_e.computeOtherPoint(Ge,Pe),Ge=ae.ab(Pe),Ge-=ce,0>Ge?Ge+=360:360<=Ge&&(Ge-=360),Ne=Tx(E,Ne,Ge,_e.isOrthogonal),Ne===0?(Ne=4,180<Ge&&(Ge-=360)):Ne===90?(Ne=8,270<Ge&&(Ge-=360)):Ne===180?Ne=2:(Ne=1,90>Ge&&(Ge+=360)),Ye=a.pe[te],Ye===void 0?(Ye=new ty(_e,Ge,Ne),a.pe[te]=Ye):(Ye.link=_e,Ye.angle=Ge,Ye.Nc=Ne),Ye.hv.set(Pe),te++}}}}for(vt.free(ae),a.pe.sort(Nf.prototype.j),ce=a.pe.length,b=-1,te=ae=0;te<ce;te++)ne=a.pe[te],ne!==void 0&&(ne.Nc!==b&&(b=ne.Nc,ae=0),ne.Uo=ae,ae++);for(b=-1,ae=0,te=ce-1;0<=te;te--)ce=a.pe[te],ce!==void 0&&(ce.Nc!==b&&(b=ce.Nc,ae=ce.Uo+1),ce.Gl=ae);if(te=a.pe,Ne=a.port,b=a.node.portSpreading,ae=vt.alloc(),ce=vt.alloc(),ne=vt.alloc(),_e=vt.alloc(),Ne.ga(Ls,ae),Ne.ga(vs,ce),Ne.ga(ka,ne),Ne.ga(Hs,_e),Ye=Ge=Pe=Ne=0,b===Wv)for(var Qe=0;Qe<te.length;Qe++){var at=te[Qe];if(at!==null){var Ct=at.link.computeThickness();switch(at.Nc){case 8:Ge+=Ct;break;case 2:Ye+=Ct;break;case 1:Ne+=Ct;break;default:case 4:Pe+=Ct}}}var xt=Qe=0,Tt=1,Nt=at=0;for(Ct=0;Ct<te.length;Ct++){var It=te[Ct];if(It!==null){if(Qe!==It.Nc){switch(Qe=It.Nc,Qe){case 8:var Zt=ne;xt=_e;break;case 2:Zt=_e,xt=ae;break;case 1:Zt=ae,xt=ce;break;default:case 4:Zt=ce,xt=ne}switch(at=xt.x-Zt.x,Nt=xt.y-Zt.y,Qe){case 8:Ge>Math.abs(at)?(Tt=Math.abs(at)/Ge,Ge=Math.abs(at)):Tt=1;break;case 2:Ye>Math.abs(Nt)?(Tt=Math.abs(Nt)/Ye,Ye=Math.abs(Nt)):Tt=1;break;case 1:Ne>Math.abs(at)?(Tt=Math.abs(at)/Ne,Ne=Math.abs(at)):Tt=1;break;default:case 4:Pe>Math.abs(Nt)?(Tt=Math.abs(Nt)/Pe,Pe=Math.abs(Nt)):Tt=1}xt=0}var un=It.Zo;if(b===Wv){switch(It=It.link.computeThickness(),It*=Tt,un.set(Zt),Qe){case 8:un.x=Zt.x+at/2+Ge/2-xt-It/2;break;case 2:un.y=Zt.y+Nt/2+Ye/2-xt-It/2;break;case 1:un.x=Zt.x+at/2-Ne/2+xt+It/2;break;default:case 4:un.y=Zt.y+Nt/2-Pe/2+xt+It/2}xt+=It}else{var $n=.5;b===Ym&&($n=(It.Uo+1)/(It.Gl+1)),un.x=Zt.x+at*$n,un.y=Zt.y+Nt*$n}}}for(vt.free(ae),vt.free(ce),vt.free(ne),vt.free(_e),Zt=a.pe,te=0;te<Zt.length;te++)b=Zt[te],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,pn.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}Nf.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},Nf.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,xs,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)},Nf.className="Knot";function ty(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new vt,this.Gl=this.Uo=0,this.Zo=new vt,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 ls(a){en(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new vt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}ls.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},ls.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},ls.prototype.qb=function(){},ls.prototype.toString=function(){var a=li(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},ls.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())}}},ls.prototype.createNetwork=function(){return new Zo(this)},ls.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof ln?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof ur?y.lg(a.memberParts):y.lg(a.iterator),y},ls.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")}},ls.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()}},ls.prototype.doLayout=function(a){var y=new Ut;a instanceof ln?(gd(this,y,a.nodes,!0,this.rh,!0,!1,!0),gd(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof ur?gd(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},ls.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 ae=a.value;Tg(ae);var ce=ae.measuredBounds,_e=ce.width;ce=ce.height,ae.moveTo(b,E),ae instanceof ur&&(ae.rh=!1),b+=Math.max(_e,50)+20,ne=Math.max(ne,Math.max(ce,50)),te>=y-1?(te=0,b=x,E+=ne+20,ne=0):te++}},ls.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 ae=ne.value.node;if(!(ae===null||ae instanceof Gn)&&(Tg(ae),this.rh(ae))){var ce=ae.measuredBounds,_e=ce.width;ce=ce.height,ae.moveTo(x,b),ae instanceof ur&&(ae.rh=!1),x+=Math.max(_e,50)+20,te=Math.max(te,Math.max(ce,50)),E>=a-1?(E=0,x=y,b+=te+20,te=0):E++}}},ls.prototype.rh=function(a){return!!(!a.location.w()||a instanceof ur&&a.rh)};function gd(a,y,x,b,E,te,ne,ae){for(x=x.iterator;x.next();){var ce=x.value;b&&!ce.isTopLevel||E!==null&&!E(ce)||!ce.canLayout()||(te&&ce instanceof ii?ce.isLinkLabel||(ce instanceof ur&&ce.layout===null?gd(a,y,ce.memberParts,!1,E,te,ne,ae):(Tg(ce),y.add(ce))):ne&&ce instanceof Gn?y.add(ce):!ae||!ce.Zc()||ce instanceof ii||(Tg(ce),y.add(ce)))}}function Tg(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}ls.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new pn),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},ls.prototype.ex=function(a){var y=new Ut;return a instanceof ln?(gd(this,y,a.nodes,!0,null,!0,!0,!0),gd(this,y,a.links,!0,null,!0,!0,!0),gd(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof ur?gd(this,y,a.memberParts,!1,null,!0,!0,!0):gd(this,y,a.iterator,!1,null,!0,!0,!0),y},ls.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(Ls),(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(ls.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())}}}),ls.prototype.collectParts=ls.prototype.ex,ls.prototype.getLayoutBounds=ls.prototype.ni,ls.prototype.invalidateLayout=ls.prototype.C,ls.className="Layout";function Zo(a){en(this),this.Sc=a,this.wf=new Ut,this.ye=new Ut,this.Es=new Dn,this.zs=new Dn}Zo.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 Ut,this.ye=new Ut,this.Es=new Dn,this.zs=new Dn},Zo.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},Zo.prototype.createVertex=function(){return new na(this)},Zo.prototype.createEdge=function(){return new ql(this)},Zo.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 ii)return!ne.isLinkLabel;if(ne instanceof Gn){var ae=ne.fromNode;return ae===null||ae.isLinkLabel?!1:(ne=ne.toNode,!(ne===null||ne.isLinkLabel))}return!1}),a=a.iterator;a.next();){var b=a.value;if(b instanceof ii&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof ur&&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 Gn&&(!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))}}},Zo.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},qe=Zo.prototype,qe.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},qe.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},qe.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}qe.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},qe.ki=function(a){return a===null?null:this.Es.I(a)},qe.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}}qe.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},qe.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))}qe.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},qe.Lo=function(a){return a===null?null:this.zs.I(a)},qe.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},qe.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))}},qe.Ko=function(){for(var a=Ti(),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]);bi(a)},Zo.prototype.deleteArtificialVertexes=function(){for(var a=Ti(),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=Ti(),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]);bi(a),bi(y)};function Ax(a){for(var y=Ti(),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]);bi(y)}Zo.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Ax(this),this.Ko()),a=new zn;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))}}Zo.prototype.dz=function(){for(var a=new Ut,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(Zo.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}}}),Zo.prototype.findAllParts=Zo.prototype.dz,Zo.prototype.splitIntoSubNetworks=Zo.prototype.Zx,Zo.prototype.deleteSelfEdges=Zo.prototype.Ko,Zo.prototype.reverseEdge=Zo.prototype.gm,Zo.prototype.linkVertexes=Zo.prototype.Zj,Zo.prototype.findEdge=Zo.prototype.Lo,Zo.prototype.deleteLink=Zo.prototype.Yy,Zo.prototype.deleteEdge=Zo.prototype.Mj,Zo.prototype.addLink=Zo.prototype.Dy,Zo.prototype.addEdge=Zo.prototype.Bo,Zo.prototype.findVertex=Zo.prototype.ki,Zo.prototype.deleteNode=Zo.prototype.Zy,Zo.prototype.deleteVertex=Zo.prototype.Iu,Zo.prototype.addNode=Zo.prototype.Bl,Zo.prototype.addVertex=Zo.prototype.dh,Zo.prototype.addParts=Zo.prototype.lg,Zo.className="LayoutNetwork";function na(a){en(this),this.ob=a,this.j=new pn(0,0,10,10).freeze(),this.o=new vt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new zn,this.mg=new zn}na.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new zn,this.mg=new zn},na.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Ft(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},na.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;cn(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 ur)){x=pn.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(Hr);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),pn.free(x);return}pn.free(x)}a.moveTo(y.x,y.y)}},na.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},na.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},na.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},na.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(na.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=pn.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),pn.free(x),!(a instanceof ur)&&(a=a.locationObject.ga(Hr),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 Ut,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Ut,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Ut,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 zn,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}}}),na.prototype.deleteDestinationEdge=na.prototype.Jl,na.prototype.addDestinationEdge=na.prototype.zl,na.prototype.deleteSourceEdge=na.prototype.Kl,na.prototype.addSourceEdge=na.prototype.Cl,na.className="LayoutVertex",na.standardComparer=oy,na.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 ql(a){en(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}ql.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},ql.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Ft(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},ql.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},ql.prototype.commit=function(){},ql.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},ot.Object.defineProperties(ql.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)}}}),ql.prototype.getOtherVertex=ql.prototype.Ax,ql.className="LayoutEdge";function Ea(a){ls.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new Sn(NaN,NaN).freeze(),this.tf=new Sn(10,10).freeze(),this.Jb=Ag,this.Rb=l0,this.nd=Ng,this.hd=hS,a&&Object.assign(this,a)}Ve(Ea,ls),Ea.prototype.cloneProtected=function(a){ls.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},Ea.prototype.qb=function(a){a.classType===Ea?a===Ng||a===h0||a===sy||a===u0?this.sorting=a:a===l0||a===rh?this.arrangement=a:a===Ag||a===a0?this.alignment=a:rn("Unknown enum value: "+a):ls.prototype.qb.call(this,a)},Ea.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 ur)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 u0:E.reverse();break;case Ng:E.sort(this.comparer);break;case h0: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 a0:var ae=y,ce=x,_e=pn.alloc(),Pe=Math.max(this.cellSize.width,1);if(!isFinite(Pe))for(var Ne=Pe=0;Ne<E.length;Ne++){var Ge=this.ni(E[Ne],_e);Pe=Math.max(Pe,Ge.width)}if(Pe=Math.max(Pe+ae,1),Ne=Math.max(this.cellSize.height,1),!isFinite(Ne))for(Ge=Ne=0;Ge<E.length;Ge++){var Ye=this.ni(E[Ge],_e);Ne=Math.max(Ne,Ye.height)}Ne=Math.max(Ne+ce,1),Ge=this.arrangement;for(var Qe=Ye=this.arrangementOrigin.x,at=this.arrangementOrigin.y,Ct=0,xt=0,Tt=0;Tt<E.length;Tt++){var Nt=E[Tt],It=this.ni(Nt,_e),Zt=Math.ceil((It.width+ae)/Pe)*Pe,un=Math.ceil((It.height+ce)/Ne)*Ne;switch(Ge){case rh:var $n=Math.abs(Qe-It.width);break;default:$n=Qe+It.width}switch((0<te&&Ct>te-1||0<ne&&0<Ct&&$n-Ye>ne)&&(b.push(new pn(0,at,ne+ae,xt)),Ct=0,Qe=Ye,at+=xt,xt=0),xt=Math.max(xt,un),Ge){case rh:It=-It.width;break;default:It=0}switch(Nt.moveTo(Qe+It,at),Ge){case rh:Qe-=Zt;break;default:Qe+=Zt}Ct++}b.push(new pn(0,at,ne+ae,xt)),pn.free(_e);break;case Ag:for(ce=ne,Pe=te,Ne=y,Ge=x,ne=pn.alloc(),Ye=Math.max(this.cellSize.width,1),te=at=_e=0,ae=vt.alloc(),Qe=0;Qe<E.length;Qe++)xt=E[Qe],Ct=this.ni(xt,ne),xt=Fc(xt,xt.locationObject,xt.locationSpot,ae),_e=Math.max(_e,xt.x),at=Math.max(at,Ct.width-xt.x),te=Math.max(te,xt.y);switch(Qe=this.arrangement,Qe){case rh:_e+=Ne;break;default:at+=Ne}Ye=isFinite(Ye)?Math.max(Ye+Ne,1):Math.max(_e+at,1);var fi=xt=this.arrangementOrigin.x;for(Tt=this.arrangementOrigin.y,at=0,ce>=_e&&(ce-=_e),_e=Nt=0,Zt=Math.max(this.cellSize.height,1),It=te=0,un=!0,Ct=vt.alloc(),$n=0;$n<E.length;$n++){var ai=E[$n],Un=this.ni(ai,ne),Pn=Fc(ai,ai.locationObject,ai.locationSpot,ae);if(0<at)switch(Qe){case rh:fi=(fi-xt-(Un.width-Pn.x))/Ye,fi=tn.$(Math.round(fi),fi)?Math.round(fi):Math.floor(fi),fi=fi*Ye+xt;break;default:fi=(fi-xt+Pn.x)/Ye,fi=tn.$(Math.round(fi),fi)?Math.round(fi):Math.ceil(fi),fi=fi*Ye+xt}else switch(Qe){case rh:Nt=fi+Pn.x+Un.width;break;default:Nt=fi-Pn.x}switch(Qe){case rh:var ar=-(fi+Pn.x)+Nt;break;default:ar=fi+Un.width-Pn.x-Nt}if(0<Pe&&at>Pe-1||0<ce&&0<at&&ar>ce){for(b.push(new pn(0,un?Tt-te:Tt,ce+Ne,It+te+Ge)),fi=0;fi<at&&$n!==at;fi++){ar=E[$n-at+fi];var Ji=Fc(ar,ar.locationObject,ar.locationSpot,Ct);ar.moveTo(ar.position.x,ar.position.y+te-Ji.y)}It+=Ge,Tt=un?Tt+It:Tt+(It+te),at=It=te=0,fi=xt,un=!1}switch(fi===xt&&(_e=Qe===rh?Math.max(_e,Un.width-Pn.x):Math.min(_e,-Pn.x)),te=Math.max(te,Pn.y),It=Math.max(It,Un.height-Pn.y),isFinite(Zt)&&(It=Math.max(It,Math.max(Un.height,Zt)-Pn.y)),un?ai.moveTo(fi-Pn.x,Tt-Pn.y):ai.moveTo(fi-Pn.x,Tt),Qe){case rh:fi-=Pn.x+Ne;break;default:fi+=Un.width-Pn.x+Ne}at++}if(b.push(new pn(0,Tt,ce+Ne,(un?It:It+te)+Ge)),E.length!==at)for(ce=0;ce<at;ce++)Pe=E[E.length-at+ce],Ne=Fc(Pe,Pe.locationObject,Pe.locationSpot,ae),Pe.moveTo(Pe.position.x,Pe.position.y+te-Ne.y);if(vt.free(ae),vt.free(Ct),Qe===rh)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);pn.free(ne)}for(ae=te=ne=E=0;ae<b.length;ae++)ce=b[ae],E=Math.min(E,ce.x),ne=Math.min(ne,ce.y),te=Math.max(te,ce.x+ce.width);this.arrangement===rh?this.commitLayers(b,new vt(E+y/2-(te+E),ne-x/2)):this.commitLayers(b,new vt(E-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},Ea.prototype.commitLayers=function(){};function hS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}ot.Object.defineProperties(Ea.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!==Ag&&a!==a0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==l0&&a!==rh||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==sy&&a!==u0&&a!==Ng&&a!==h0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var a0=new dn(Ea,"Position",0),Ag=new dn(Ea,"Location",1),l0=new dn(Ea,"LeftToRight",2),rh=new dn(Ea,"RightToLeft",3),sy=new dn(Ea,"Forward",4),u0=new dn(Ea,"Reverse",5),Ng=new dn(Ea,"Ascending",6),h0=new dn(Ea,"Descending",7);Ea.className="GridLayout",Ea.standardComparer=hS,Ea.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},Ea.Position=a0,Ea.Location=Ag,Ea.LeftToRight=l0,Ea.RightToLeft=rh,Ea.Forward=sy,Ea.Reverse=u0,Ea.Ascending=Ng,Ea.Descending=h0;function Lo(){this.On=new Ut,this.Dn=new Ut,this.Pa=new Ut,this.cf=new Dn,this.bf=new Dn,this.aj=new Dn,this.H=null,this.tp=!1}qe=Lo.prototype,qe.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},qe.Xe=function(a){this.H=a},qe.oi=function(a){if(a instanceof ii){if(this.On.add(a),a instanceof ur){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 Gn?this.Dn.add(a):a instanceof $r||this.Pa.add(a);y=a.data,y===null||a instanceof $r||(a instanceof Gn?this.bf.add(y,a):this.cf.add(y,a))},qe.pc=function(a){if(a.Ej(),a instanceof ii){if(this.On.remove(a),a instanceof ur){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 Gn?this.Dn.remove(a):a instanceof $r||this.Pa.remove(a);y=a.data,y===null||a instanceof $r||(a instanceof Gn?this.bf.remove(y):this.cf.remove(y))},qe.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 ur)&&rn('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 ur||rn('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 Gn||rn('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Ti(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=Ti(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=Ti(),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]);bi(y),bi(x),bi(a)}},Lo.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},Lo.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&&qf(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)}}Lo.prototype.insertLink=function(){return null},Lo.prototype.resolveReferencesForData=function(){},Lo.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,_i('No Group template found for category "'+x+'"'),_i(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,_i('No Node template found for category "'+x+'"'),_i(" Using default node template")),y=a.ny))),y}Lo.prototype.getLinkCategoryForData=function(){return""},Lo.prototype.setLinkCategoryForData=function(){},Lo.prototype.setFromNodeForLink=function(){},Lo.prototype.setToNodeForLink=function(){},Lo.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,_i('No Link template found for category "'+a+'"'),_i(" Using default link template")),x=y.my)),x},Lo.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},Lo.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},Lo.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Vp(this.diagram,a,!1),this.unresolveReferencesForPart(a))},Lo.prototype.unresolveReferencesForPart=function(){},Lo.prototype.removeDataForLink=function(){},Lo.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},Lo.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof ii?a:null)},Lo.prototype.findLinkForKey=function(){return null},qe=Lo.prototype,qe.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},qe.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof ii?a:null)},qe.Kc=function(a){return a===null?null:this.bf.I(a)},qe.ms=function(a){for(var y=0;y<arguments.length;++y);y=new Ut;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(cn(ne)&&ay(this,E,ne)){y.add(b);break}}}return y.iterator},qe.ls=function(a){for(var y=0;y<arguments.length;++y);y=new Ut;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(cn(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(qn(te)){if(!qn(E)||E.length<te.length)return!1;for(var ne=0;ne<E.length;ne++){var ae=te[ne];if(ae!==void 0&&!fS(a,E[ne],ae))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(cn(y)&&cn(x)){if(!ay(a,y,x))return!1}else if(y!==x)return!1;return!0}Lo.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===Jo){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===bs){var ne=a.newValue;b==="nodeDataArray"&&cn(ne)&&cS(this,ne),y.isModified=!0}else if(x===Os){var ae=a.oldValue;b==="nodeDataArray"&&cn(ae)&&this.ip(ae),y.isModified=!0}else x===ba&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===Jo){var ce=a.propertyName,_e=a.object;_e===y.model?(ce==="nodeKeyProperty"||ce==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(_e,ce),y.isModified=!0}else if(x===bs||x===Os){var Pe=a.change===bs,Ne=Pe?a.newParam:a.oldParam,Ge=Pe?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(Pe)km(Qe,Ge,Ne,!0);else if(!(0>Ne)){var at=Ne+fg(Qe);Qe.pc(at,!0),wv(Qe,at,Ne)}}y.isModified=!0}}finally{y.aa=!0}}}}},Lo.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)},Lo.prototype.rp=function(){for(var a=this.H.model,y=new Ut,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()},Lo.prototype.refreshDataBoundLinks=function(){},Lo.prototype.updateRelationshipsFromData=function(){},Lo.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=Ti()),x.push(ne))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);bi(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(qn(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){qd(y,function(ne){ne=ne.O.s;for(var ae=ne.length,ce=0;ce<ae;ce++)qp(x,ne[ce])});var b=y.Hh;if(qn(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}}}}Lo.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new Dn;if(qn(a))for(var E=0;E<a.length;E++)c0(this,a[E],y,b,x);else for(a=a.iterator;a.next();)c0(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 Ut;for(var te=new Dn,ne=b.iterator;ne.next();){var ae=ne.value;if(ae instanceof Gn)a||ae.fromNode!==null&&ae.toNode!==null||E.add(ae);else if(ae instanceof ii&&ae.data!==null&&x.Tl()){var ce=ae;ae=ne.key;var _e=ae.pg();_e!==null&&(_e=b.I(_e),_e!==null?(x.qe(ce.data,x.wa(_e.data)),ce=y.Kc(ce.data),ae=ae.kh(),ae!==null&&ce!==null&&te.add(ae,ce)):x.qe(ce.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 Pe=new Dn;b.each(function(Ne){Ne.key.data!==null&&Pe.add(Ne.key.data,Ne.value.data)}),x(Pe,y,this.H.model)}for(y=b.iterator;y.next();)y.value.La();return b};function c0(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 Ni))return null;if(te.isSelected=!1,te.isHighlighted=!1,b.add(y,te),y instanceof ii){for(var ne=y.linksConnected;ne.next();){var ae=ne.value;if(ae.fromNode===y){var ce=b.I(ae);ce!==null&&(ce.fromNode=te)}ae.toNode===y&&(ae=b.I(ae),ae!==null&&(ae.toNode=te))}if(y instanceof ur&&te instanceof ur)for(y=y.memberParts;y.next();)ne=c0(a,y.value,x,b,E),ne instanceof Gn||ne===null||(ne.containingGroup=te)}else if(y instanceof Gn&&te instanceof Gn)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=c0(a,y.value,x,b,E),ne!==null&&ne instanceof ii&&(ne.labeledLink=te);return te}Lo.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof Gn||(b=E.copyNodeData(b),cn(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 Gn||(E=y.copyNodeData(b)),cn(E)&&(x.data=E)));return x},ot.Object.defineProperties(Lo.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}}}),Lo.prototype.updateAllRelationshipsFromData=Lo.prototype.rp,Lo.prototype.findLinksByExample=Lo.prototype.ls,Lo.prototype.findNodesByExample=Lo.prototype.ms,Lo.prototype.findLinkForData=Lo.prototype.Kc,Lo.prototype.findNodeForData=Lo.prototype.ii,Lo.prototype.findPartForData=Lo.prototype.Lc,Lo.prototype.findNodeForKey=Lo.prototype.Vb,Lo.prototype.removeModeledPart=Lo.prototype.ip,Lo.prototype.removeModeledParts=Lo.prototype.Gs,Lo.prototype.rebuildParts=Lo.prototype.Wd;var pS=!1,gS=!1,mS=!1;Lo.className="PartManager";function ya(a){Lo.apply(this,arguments)}Ve(ya,Lo),ya.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},ya.prototype.addModeledParts=function(a){for(Lo.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)yp(a.value);qf(this.diagram,!1)};function vS(a,y){y.forEach(function(x){yS(a,x)}),qf(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=g0(x,y,!0);te!==""&&(E.fromPortId=te),te=uu(x,y,!0),te!==void 0&&(te=a.Vb(te),te instanceof ii&&(E.fromNode=te)),te=g0(x,y,!1),te!==""&&(E.toPortId=te),te=uu(x,y,!1),te!==void 0&&(te=a.Vb(te),te instanceof ii&&(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}}}}ya.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)})}ya.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},ya.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},ya.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},ya.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},ya.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},ya.prototype.findPartForKey=function(a){var y=Lo.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},ya.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},ya.prototype.doModelChanged=function(a){var y=this;if(Lo.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===Jo){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 ae=this.Kc(a.object);if(ae!==null){var ce=this.Vb(a.newValue);ae.toNode=ce}}else if(E==="linkFromPortId"){var _e=this.Kc(a.object);if(_e!==null){var Pe=a.newValue;typeof Pe=="string"&&(_e.fromPortId=Pe)}}else if(E==="linkToPortId"){var Ne=this.Kc(a.object);if(Ne!==null){var Ge=a.newValue;typeof Ge=="string"&&(Ne.toPortId=Ge)}}else if(E==="nodeGroupKey"){var Ye=this.Lc(a.object);if(Ye!==null){var Qe=a.newValue;if(Qe!==void 0){var at=this.Vb(Qe);at instanceof ur?Ye.containingGroup=at:Ye.containingGroup=null}else Ye.containingGroup=null}}else if(E==="linkLabelKeys"){var Ct=this.Kc(a.object);if(Ct!==null){var xt=a.oldValue,Tt=a.newValue;Array.isArray(xt)&&xt.forEach(function(Pn){0<=Tt.indexOf(Pn)||(Pn=y.Vb(Pn),Pn!==null&&(Pn.labeledLink=null))}),Array.isArray(Tt)&&Tt.forEach(function(Pn){Pn=y.Vb(Pn),Pn!==null&&(Pn.labeledLink=Ct)})}}else if(E==="linkCategory"){var Nt=this.Kc(a.object),It=a.newValue;Nt!==null&&typeof It=="string"&&(Nt.category=It)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===bs){var Zt=a.newValue;if(E==="linkDataArray"&&typeof Zt=="object"&&Zt!==null)yS(this,Zt);else if(E==="linkLabelKeys"&&vd(Zt)){var un=this.Kc(a.object),$n=this.Vb(Zt);un!==null&&$n!==null&&($n.labeledLink=un)}x.isModified=!0}else if(b===Os){var fi=a.oldValue;if(E==="linkDataArray"&&typeof fi=="object"&&fi!==null)this.ip(fi);else if(E==="linkLabelKeys"&&vd(fi)){var ai=this.Vb(fi);ai!==null&&(ai.labeledLink=null)}x.isModified=!0}}else if(b===Jo){var Un=a.propertyName;a.object!==x.model||Un!=="linkFromKeyProperty"&&Un!=="linkToKeyProperty"&&Un!=="linkFromPortIdProperty"&&Un!=="linkToPortIdProperty"&&Un!=="linkLabelKeysProperty"&&Un!=="nodeIsGroupProperty"&&Un!=="nodeGroupKeyProperty"&&Un!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},ya.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new Ut,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)})},ya.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 Gn){var E=uu(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=uu(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 Ut().addAll(y);var ne=new Ut;a.labelNodes.each(function(ae){ae.data!==null&&(ae=b.wa(ae.data),ae!==void 0&&ne.add(ae))}),y=ne.copy(),y.hp(E),E=E.copy(),E.hp(ne),(0<y.count||0<E.count)&&(y.each(function(ae){ae=x.Vb(ae),ae!==null&&ae.labeledLink===a&&(ae.labeledLink=null)}),E.each(function(ae){ae=x.Vb(ae),ae!==null&&ae.labeledLink!==a&&(ae.labeledLink=a)}))}}else!(a instanceof $r)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof ur)&&(a.containingGroup=y)}}},ya.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=Dg(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 ur&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=E)):(te.link=this.Kc(ne),te.link!==null&&E instanceof ii&&(uu(y,ne,!0)===x&&(te.link.fromNode=E),uu(y,ne,!1)===x&&(te.link.toNode=E),ne=y.Ef(ne),Array.isArray(ne)&&ne.some(function(ae){return function(ce){return ce===x?(E.labeledLink=ae.link,!0):!1}}(te)))),te={link:te.link}}sh(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof ur&&(E.containingGroup=a))}},ya.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof ii){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)oh(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&oh(y,x,b.data)),a instanceof ur)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&oh(y,x,b)}}},ya.prototype.copyPartData=function(a,y){var x=Lo.prototype.copyPartData.call(this,a,y);if(a instanceof Gn)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},ya.prototype.insertLink=function(a,y,x,b){var E=this.diagram,te=E.model,ne=E.toolManager.findTool("Linking"),ae="";if(a!==null&&(y===null&&(y=a),ae=y.portId,ae===null&&(ae="")),y="",x!==null&&(b===null&&(b=x),y=b.portId,y===null&&(y="")),b=ne.archetypeLinkData,b instanceof Gn){if(Nu(b),te=b.copy(),te!==null)return te.fromNode=a,te.fromPortId=ae,te.toNode=x,te.toPortId=y,E.add(te),a=ne.archetypeLabelNodeData,a instanceof ii&&(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&&Pp(te,b,te.wa(a.data),!0),Cp(te,b,ae,!0),x!==null&&Pp(te,b,te.wa(x.data),!1),Cp(te,b,y,!1),te.fi(b),a=ne.archetypeLabelNodeData,a===null||a instanceof ii||(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},ya.prototype.findLinkForKey=ya.prototype.findLinkForKey,ya.prototype.findPartForKey=ya.prototype.findPartForKey,ya.prototype.removeAllModeledParts=ya.prototype.removeAllModeledParts,ya.prototype.addModeledParts=ya.prototype.addModeledParts,ya.prototype.addAllModeledParts=ya.prototype.addAllModeledParts,ya.className="GraphLinksPartManager";function Su(){Lo.apply(this,arguments),this.Sg=null}Ve(Su,Lo);function d0(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||!oo(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}}}Su.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},Su.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},Su.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}},Su.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))},Su.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},Su.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},Su.prototype.doModelChanged=function(a){if(Lo.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===Jo){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 ae=ne.kh();ae!==null?te===null?y.remove(ae):y.isTreePathToChildren?ae.fromNode=te:ae.toNode=te:d0(this,te,ne)}}else if(b==="parentLinkCategory"){var ce=this.ii(a.object),_e=a.newValue;if(ce!==null&&typeof _e=="string"){var Pe=ce.kh();Pe!==null&&(Pe.category=_e)}}y.isModified=!0}}else if(x===Jo){var Ne=a.propertyName;a.object===y.model&&Ne==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},Su.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof ii&&(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:d0(this,y,a):b!==null&&Vp(x,b,!1)))}}},Su.prototype.updateDataBindings=function(a,y){Lo.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},Su.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=Dg(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 ii&&y.mh(te)===x&&d0(this,E,this.ii(te))}sh(y,x)}a=y.mh(a),a!==void 0&&E instanceof ii&&(a=this.Vb(a),d0(this,a,E))}},Su.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof ii){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(Os,"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)&&oh(y,x,E)}},Su.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},Su.prototype.findLinkForKey=Su.prototype.findLinkForKey,Su.className="TreePartManager";function xi(a,y){this.kl=new Ut,this.il=new Ut,this.Wv=`,
|
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
|
"removedNodeKeys": `,this.vh=null,en(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Dn,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 Dn,this.Lt=new zn,this.Wg=!1,this.o=null,this.undoManager=new as,a!==void 0&&(qn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}xi.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},xi.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},xi.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},xi.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)+":"+dr(E)}}return y},xi.prototype.xA=function(a){a.change!==ba&&rn("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Ws?(wS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},xi.prototype.Qv=function(a,y){var x=this,b=!1,E=new Ut,te=new Ut,ne=new Ut,ae=this.vh;a.changes.each(function(Ne){Ne.model===x&&(Ne.modelChange==="nodeDataArray"?Ne.change===bs?E.add(Ne.newValue):Ne.change===Os&&ne.add(Ne.oldValue):x.lb(Ne.object)?te.add(Ne.object):Ne.change!==Jo||x.modelData!==Ne.object&&Ne.propertyName!=="modelData"?Ne.object!==null&&(ae&&ae.contains(Ne.object)?ae.get(Ne.object).each(function(Ge){x.lb(Ge)&&te.add(Ge)}):Ne.object instanceof xi||x.ri()&&x.Jc(Ne.object)||_S(x,Ne.object).each(function(Ge){te.add(Ge)})):b=!0)});var ce=this.il;ce.clear(),E.each(function(Ne){ce.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 Pe=null;return b&&(Pe===null&&(Pe={}),Pe.modelData=this.cloneDeep(this.modelData)),0<ce.count&&(Pe===null&&(Pe={}),y?Pe.removedNodeKeys=ce.Fa():Pe.insertedNodeKeys=ce.Fa()),0<a.length&&(Pe===null&&(Pe={}),Pe.modifiedNodeData=a),0<_e.count&&(Pe===null&&(Pe={}),y?Pe.insertedNodeKeys=_e.Fa():Pe.removedNodeKeys=_e.Fa()),_e.clear(),ce.clear(),Pe},xi.prototype.cloneDeep=function(a){return bp(this,a,!0)};function bp(a,y,x,b,E,te){function ne(Ne,Ge){ae?(Ne.__gohashid===void 0&&te.push(Ne),b.set(Ne,Ge)):(Ne=Yt++,b.set(Ne,Ge),E.set(Ne,y))}if(!cn(y))return y;te||(te=[]);var ae=Object.isExtensible(y);if(b||(b=new Dn),ae){var ce=b.get(y);if(ce)return ce}else for(E||(E=new Dn),ce=E.iterator;ce.next();){var _e=ce.key;if(ce.value===y&&(_e=b.get(_e)))return _e}if(Array.isArray(y)){ce=[],ne(y,ce);for(var Pe=0;Pe<y.length;Pe++)ce.push(bp(a,y[Pe],!1,b,E,te))}else if(y instanceof vt||y instanceof Sn||y instanceof pn||y instanceof Ei||y instanceof di)ce=y.copy(),ne(y,ce);else{if(y instanceof Po||y instanceof Kn||y instanceof dn)return y;if(y instanceof zn)ce=new zn().addAll(bp(a,y.Fa(),!1,b,E,te)),ne(y,ce);else if(y instanceof Ut)ce=new Ut().addAll(bp(a,y.Fa(),!1,b,E,te)),ne(y,ce);else if(y instanceof Dn)ce=new Dn().addAll(bp(a,y.Fa(),!1,b,E,te)),ne(y,ce);else if(y instanceof Date)ce=new Date(y.getTime()),ne(y,ce);else if(y instanceof RegExp)ce=new RegExp(y),ne(y,ce),ce.lastIndex=y.lastIndex;else if(typeof y.copy=="function")ce=y.copy(),ne(y,ce);else for(Pe in ce={},ne(y,ce),y)Pe!=="__gohashid"&&(ce[Pe]=bp(a,y[Pe],!1,b,E,te))}return x&&te.forEach(function(Ne){delete Ne.__gohashid}),ce}qe=xi.prototype,qe.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},qe.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},qe.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,cn(y)&&(a.dm(y),a.modelData=y)}qe.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": `+md(this,this.nodeDataArray,!0)},qe.kv=function(a){xS(this,a),a=a.nodeDataArray,qn(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 Ut,ne.add(te),b.add(E,ne)):ne.add(te)}}var b=a.vh;b===null&&(b=new Dn,y.changes.each(function(E){if(E.diagram!==null){var te=E.change;te===Jo?(E=E.object.panel)&&(te=E.data)&&x(te,E):(te===bs||te===Os)&&(E=E.object,(te=E.itemArray)&&x(te,E))}}),a.vh=b)}function _S(a,y){for(var x=new Ut,b=0;b<a.nodeDataArray.length;b++){var E=a.nodeDataArray[b];f0(a,y,E,E,x)}return x}function f0(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(f0(a,y,ne,b,E))return!0}else if(cn(x)&&Object.getPrototypeOf(x)===Object.prototype)for(te in x){if(ne=x[te],ne===y)return E.add(b),!0;if(f0(a,y,ne,b,E))return!0}return!1}qe.Pv=function(a,y){var x=this,b=!1,E=new Ut,te=new Ut,ne=new Ut,ae=this.vh;a.changes.each(function(Pe){Pe.model===x&&(Pe.modelChange==="nodeDataArray"?Pe.change===bs?E.add(Pe.newValue):Pe.change===Os&&ne.add(Pe.oldValue):x.lb(Pe.object)?te.add(Pe.object):Pe.change!==Jo||x.modelData!==Pe.object&&Pe.propertyName!=="modelData"?Pe.object!==null&&(ae&&ae.contains(Pe.object)?ae.get(Pe.object).each(function(Ne){x.lb(Ne)&&te.add(Ne)}):Pe.object instanceof xi||x.ri()&&x.Jc(Pe.object)||_S(x,Pe.object).each(function(Ne){te.add(Ne)})):b=!0)});var ce=this.il;ce.clear(),E.each(function(Pe){ce.add(x.wa(Pe)),y||te.add(Pe)});var _e=this.kl;return _e.clear(),ne.each(function(Pe){_e.add(x.wa(Pe)),y&&te.add(Pe)}),a="",b&&(a+=`,
|
|
|
"modelData": `+hy(this,this.modelData)),0<ce.count&&(a+=(y?this.Yv:this.Wv)+md(this,ce.Fa(),!0)),0<te.count&&(a+=this.jy+md(this,te.Fa(),!0)),0<_e.count&&(a+=(y?this.Wv:this.Yv)+md(this,_e.Fa(),!0)),_e.clear(),ce.clear(),a},qe.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)&&rn("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new Dn;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 ae=this.hc(ne);ae===null&&(ae=(ae=b.get(ne))?ae:this.copyNodeData({}),this.km(ae,ne),this.xf(ae))}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 ce in E)ce==="__gohashid"||ce===this.nodeKeyProperty||this.Wj()&&ce===this.nodeIsGroupProperty||this.setDataProperty(te,ce,E[ce]);this.lm(E,te)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,ce=0;ce<x;ce++)y=this.hc(a[ce]),y!==null&&this.cm(y)},qe.$x=function(a,y){a.change!==ba&&rn("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Ws?(y===void 0&&(y=Og(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 }'},qe.yA=function(a,y){return this.$x(a,y)},qe.np=function(a){return a===void 0&&(a=Og(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},qe.toJSON=function(a){return this.np(a)},qe.Zw=function(a){var y=null;if(typeof a=="string")try{y=Ot.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:rn("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&rn("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},qe.Ky=function(a){return this.Zw(a)},xi.constructGraphLinksModel=function(){return new xi},qe=xi.prototype,qe.dm=function(a){if(qn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(cn(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:rn("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(cn(a)){for(y in a)if(x=a[y],cn(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 zn,b=0;b<x.length/2;b++)E.add(new vt(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return Nx(a)}return a},qe.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()):qn(a)?md(this,a):cn(a)?hy(this,a):typeof a=="function"?"null":a.toString()};function md(a,y,x){x===void 0&&(x=!1);var b=y.length;if(0>=b)return"[]";var E=new Zr;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 gl(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function hy(a,y){var x=y;if(x instanceof vt)y={class:"go.Point",x:gl(x.x),y:gl(x.y)};else if(x instanceof Sn)y={class:"go.Size",width:gl(x.width),height:gl(x.height)};else if(x instanceof pn)y={class:"go.Rect",x:gl(x.x),y:gl(x.y),width:gl(x.width),height:gl(x.height)};else if(x instanceof Ei)y={class:"go.Margin",top:gl(x.top),right:gl(x.right),bottom:gl(x.bottom),left:gl(x.left)};else if(x instanceof di)x.sb()?y={class:"go.Spot",x:gl(x.x),y:gl(x.y),offsetX:gl(x.offsetX),offsetY:gl(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof Po){if(y={class:"go.Brush",type:x.type.name},x.type===Oc?y.color=x.color:(x.type===pc||x.type===vu)&&(y.start=x.start,y.end=x.end,x.type===vu&&(x.startRadius!==0&&(y.startRadius=gl(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=gl(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 Kn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=gl(x.startX)),x.startY!==0&&(y.startY=gl(x.startY)),x.endX!==0&&(y.endX=gl(x.endX)),x.endY!==0&&(y.endY=gl(x.endY)),x.spot1.D(Ls)||(y.spot1=x.spot1),x.spot2.D(ka)||(y.spot2=x.spot2),x.type===Kn.o&&(y.path=Kn.ia(x))):x instanceof dn&&(y={class:"go.EnumValue",classType:Og(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var te=Fs(y,E);if(!bS(E,te))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&te instanceof zn){var ne="[";for(te=te.iterator;te.next();){var ae=te.value;1<ne.length&&(ne+=","),ne+=a.sm(ae.x),ne+=",",ne+=a.sm(ae.y)}ne+="]",b+=ne}else b+=a.sm(te)}return b+"}"}function ml(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 vt(ml(a.x),ml(a.y));else if(y==="Size")x=new Sn(ml(a.width),ml(a.height));else if(y==="Rect")x=new pn(ml(a.x),ml(a.y),ml(a.width),ml(a.height));else if(y==="Margin")x=new Ei(ml(a.top),ml(a.right),ml(a.bottom),ml(a.left));else if(y==="Spot")typeof a.enum=="string"?x=Ah(a.enum):x=new di(ml(a.x),ml(a.y),ml(a.offsetX),ml(a.offsetY));else if(y==="Brush"){if(x=new Po,x.type=gr(Po,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof di&&(x.start=a.start),a.end instanceof di&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=ml(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=ml(a.endRadius)),a=a.colorStops,cn(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Kn.parse(a.path):x=new Kn,x.type=gr(Kn,a.type),typeof a.startX=="number"&&(x.startX=ml(a.startX)),typeof a.startY=="number"&&(x.startY=ml(a.startY)),typeof a.endX=="number"&&(x.endX=ml(a.endX)),typeof a.endY=="number"&&(x.endY=ml(a.endY)),a.spot1 instanceof di&&(x.spot1=a.spot1),a.spot2 instanceof di&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=dy(b),typeof b=="function"&&(x=gr(b,a.name)));return x}qe.Pe=function(a){return this.Lt.add(a),this},qe.ik=function(a){this.Lt.remove(a)},qe.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)},qe.cb=function(a,y,x,b,E,te,ne){Js(this,"",a,y,x,b,E,te,ne)},qe.g=function(a,y,x,b,E){Js(this,"",Jo,a,this,y,x,b,E)},qe.Fs=function(a,y,x,b,E,te){Js(this,"",Jo,y,a,x,b,E,te)};function Js(a,y,x,b,E,te,ne,ae,ce){ae===void 0&&(ae=null),ce===void 0&&(ce=null);var _e=new rs;_e.model=a,_e.change=x,_e.modelChange=y,_e.propertyName=b,_e.object=E,_e.oldValue=te,_e.oldParam=ae,_e.newValue=ne,_e.newParam=ce,a.ds(_e)}xi.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===Jo){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)),os(x,b,E)}else a.change===bs?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,cn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&_r(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&lr(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!qn(b)&&a.propertyName&&(b=Fs(a.object,a.propertyName)),qn(b)&&typeof x=="number"&&(a=a.newValue,y?_r(b,x):lr(b,x,a))):rn("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Os?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,cn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&lr(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&_r(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!qn(b)&&a.propertyName&&(b=Fs(a.object,a.propertyName)),qn(b)&&typeof x=="number"&&(a=a.oldValue,y?lr(b,x,a):_r(b,x))):rn("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==ba&&rn("unknown ChangedEvent: "+a.toString())},xi.prototype.Ea=function(a){return this.undoManager.Ea(a)},xi.prototype.eb=function(a){return this.undoManager.eb(a)},xi.prototype.Kf=function(){return this.undoManager.Kf()},xi.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}},qe=xi.prototype,qe.La=function(a,y){y===void 0&&(y=""),Js(this,"SourceChanged",ba,y,a,null,null)},qe.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Fs(a,y),y!==void 0)){if(vd(y))return y;rn("Key value for node data "+a+" is not a number or a string: "+y)}}},qe.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=Fs(a,x);b!==y&&this.hc(y)===null&&(os(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),Js(this,"nodeKey",Jo,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else os(a,x,y)}};function vd(a){return typeof a=="number"||typeof a=="string"}qe.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},qe.hc=function(a){return a===null&&rn("Model.findNodeDataForKey:key must not be null"),a!==void 0&&vd(a)?this.kb.I(a):null},qe.$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))){os(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;os(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;os(a,y,x)}}}}},qe.xf=function(a){a!==null&&(jn(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&&rn("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,lr(a.Tc,b,y)),Js(a,"nodeDataArray",bs,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}qe.Fy=function(a){if(qn(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)},qe.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;_r(a.Tc,b)}Js(a,"nodeDataArray",Os,"nodeDataArray",a,y,null,b,null),a.qp(y)}qe.nA=function(a){if(qn(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)},qe.$z=function(a){if(a!==this.nodeDataArray&&qn(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 ae=this.hc(ne);ae!==te&&(ae!==null?(this.Do(ae,te),this.lm(te,ae)):(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()}},qe.jp=function(a,y){y!==void 0&&(a=Dg(this,a),a instanceof Ut&&this.Vf.add(y,a))},qe.Lv=function(){},qe.fm=function(){},qe.em=function(){},qe.qp=function(){};function oh(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new Ut,a.Vf.add(y,b)),b.add(x)}}function sh(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof Ut&&(x==null?a.Vf.remove(y):(b.remove(x),b.count===0&&a.Vf.remove(y)))}}function Dg(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof Ut?a:null)}qe.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},xi.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):p0(this,a,!0),cn(a)&&en(a),a};function p0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var b=[];for(x=0;x<y.length;x++){var E=p0(a,y[x],a.copiesArrayObjects);b.push(E)}return en(b),b}if(x&&cn(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=Fs(y,b),ne=Og(a,te);ne==="GraphObject"||ne==="Diagram"||ne==="Layer"||ne==="RowColumnDefinition"||ne==="AnimationManager"||ne==="Tool"||ne==="CommandHandler"||ne==="Layout"||ne==="InputEvent"||ne==="DiagramEvent"||te instanceof xi||te instanceof as||te instanceof Ws||te instanceof rs||(te=p0(a,te,!1)),os(x,b,te)}return en(x),x}return y instanceof vt||y instanceof Sn||y instanceof pn||y instanceof di||y instanceof Ei?y.copy():y}xi.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 Xt&&(ES=!0,_i('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),_i(" Is that really your intent?"));var b=Fs(a,y);b!==x&&(os(a,y,x),this.Fs(a,y,b,x))},qe=xi.prototype,qe.set=function(a,y,x){this.setDataProperty(a,y,x)},qe.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])}},qe.Ay=function(a,y){this.ts(a,-1,y)},qe.ts=function(a,y,x){0>y&&(y=a.length),lr(a,y,x),Js(this,"",bs,"",a,null,x,null,y)},qe.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&rn("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];_r(a,y),Js(this,"",Os,"",a,x,null,y,null)},qe.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Fs(a,y),y===void 0))return"";if(typeof y=="string")return y;rn("getCategoryForNodeData found a non-string category for "+a+": "+y)},qe.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=Fs(a,x);b===void 0&&(b=""),b!==y&&(os(a,x,y),Js(this,"nodeCategory",Jo,x,a,b,y))}else os(a,x,y)}},qe.lm=function(a,y){this.jm(y,this.Ro(a))},qe.Tl=function(){return!1},qe.Wj=function(){return!1},qe.ri=function(){return!1},qe.xs=function(){return!1},qe.Xj=function(){return!1};function cy(){return new xi}function Og(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 Og(a,y.constructor);return typeof y}function dy(a){return Zu[a]?Zu[a]:Ot.go!==void 0&&Ot.go[a]?Ot.go[a]:null}function Fs(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 os(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(xi.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===""&&rn("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&rn("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];cn(E)||rn("Model.nodeDataArray must only contain Objects, not: "+E),jn(E)}for(this.Tc=a,b=new zn,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(Js(this,"nodeDataArray",Jo,"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"}}}),xi.prototype.setCategoryForNodeData=xi.prototype.jm,xi.prototype.getCategoryForNodeData=xi.prototype.Ro,xi.prototype.removeArrayItem=xi.prototype.ov,xi.prototype.insertArrayItem=xi.prototype.ts,xi.prototype.addArrayItem=xi.prototype.Ay,xi.prototype.assignAllDataProperties=xi.prototype.Do,xi.prototype.set=xi.prototype.set,xi.prototype.clearUnresolvedReferences=xi.prototype.Qy,xi.prototype.mergeNodeDataArray=xi.prototype.$z,xi.prototype.removeNodeDataCollection=xi.prototype.nA,xi.prototype.removeNodeData=xi.prototype.cm,xi.prototype.addNodeDataCollection=xi.prototype.Fy,xi.prototype.addNodeData=xi.prototype.xf,xi.prototype.makeNodeDataKeyUnique=xi.prototype.$u,xi.prototype.findNodeDataForKey=xi.prototype.hc,xi.prototype.containsNodeData=xi.prototype.lb,xi.prototype.setKeyForNodeData=xi.prototype.km,xi.prototype.getKeyForNodeData=xi.prototype.wa,xi.prototype.updateTargetBindings=xi.prototype.La,xi.prototype.commit=xi.prototype.commit,xi.prototype.rollbackTransaction=xi.prototype.Kf,xi.prototype.commitTransaction=xi.prototype.eb,xi.prototype.startTransaction=xi.prototype.Ea,xi.prototype.raiseDataChanged=xi.prototype.Fs,xi.prototype.raiseChanged=xi.prototype.g,xi.prototype.raiseChangedEvent=xi.prototype.cb,xi.prototype.removeChangedListener=xi.prototype.ik,xi.prototype.addChangedListener=xi.prototype.Pe,xi.prototype.writeJsonValue=xi.prototype.sm,xi.prototype.replaceJsonObjects=xi.prototype.dm,xi.prototype.applyIncrementalJSON=xi.prototype.Ky,xi.prototype.applyIncrementalJson=xi.prototype.Zw,xi.prototype.toJSON=xi.prototype.toJSON,xi.prototype.toJson=xi.prototype.np,xi.prototype.toIncrementalJSON=xi.prototype.yA,xi.prototype.toIncrementalJson=xi.prototype.$x,xi.prototype.toIncrementalData=xi.prototype.xA,xi.prototype.clear=xi.prototype.clear;var ES=!1,Zu={};xi.className="Model",xi.fromJSON=xi.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=Ot.JSON.parse(a)}catch(te){}else typeof a=="object"?x=a:rn("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=Ot[b])),typeof E=="function"&&(a=new E)}catch(te){}a===null||a instanceof xi?y=a:rn("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=xi.constructGraphLinksModel()),y.gp(x),y.kv(x),y},xi.safePropertyValue=Fs,xi.safePropertySet=os,Zu.Brush=Po,Zu.ChangedEvent=rs,Zu.Geometry=Kn,Zu.Margin=Ei,Zu.Panel=Rn,Zu.Point=vt,Zu.Rect=pn,Zu.Size=Sn,Zu.Spot=di,Zu.Transaction=Ws,Zu.UndoManager=as;function Bs(a,y,x,b){en(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=Rg,this.wk=b),this.st=new Ut}Bs.prototype.copy=function(){var a=new Bs;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},qe=Bs.prototype,qe.qb=function(a){a.classType===Bs&&(this.mode=a)},qe.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},qe.freeze=function(){return this._isFrozen=!0,this},qe.ka=function(){return this._isFrozen=!1,this},qe.Kx=function(a){return a===void 0&&(a=null),this.mode=Rg,this.backConverter=a,this},qe.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},qe.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)}qe.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==="")_i("Binding error: target property is the empty string: "+this.toString());else{var te=y;if(b!==""&&(te=Fs(y,b)),te!==void 0)if(E===null)x!==""&&os(a,x,te);else try{if(x!==""){var ne=E(te,a);os(a,x,ne)}else E(te,a)}catch(ae){}}}},qe.sp=function(a,y,x,b){if(this.el===Rg){var E=this.xl;if(x===void 0||E===x){x=this.sl;var te=this.wk,ne=a;if(E!==""&&(ne=Fs(a,E)),ne!==void 0&&!this.st.contains(a))try{this.st.add(a);var ae=b!==null?b.diagram:null,ce=ae!==null?ae.model:null;if(te===null){if(x!=="")ce!==null?ce.setDataProperty(y,x,ne):os(y,x,ne);else if(ce!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var _e=b.itemIndex,Pe=b.panel.itemArray;ce.ov(Pe,_e),ce.ts(Pe,_e,ne)}}else try{if(x!==""){var Ne=te(ne,y,ce);ce!==null?ce.setDataProperty(y,x,Ne):os(y,x,Ne)}else{var Ge=te(ne,y,ce);if(Ge!==void 0&&ce!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var Ye=b.itemIndex,Qe=b.panel.itemArray;ce.ov(Qe,Ye),ce.ts(Qe,Ye,Ge)}}}catch(at){}}finally{this.st.remove(a)}}}},ot.Object.defineProperties(Bs.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&Fn(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&Fn(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&Fn(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&Fn(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&Fn(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&Fn(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&Fn(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&Fn(this),this.el=a}}}),Bs.prototype.updateSource=Bs.prototype.sp,Bs.prototype.updateTarget=Bs.prototype.Mv,Bs.prototype.ofModel=Bs.prototype.dA,Bs.prototype.ofObject=Bs.prototype.cp,Bs.prototype.makeTwoWay=Bs.prototype.Kx;var Dx="Binding",MS=new dn(Bs,"OneWay",1),Rg=new dn(Bs,"TwoWay",2);Bs.className="Binding",Bs.parseEnum=function(a,y){return function(x){return x=gr(a,x),x===null?y:x}},Bs.toString=dr,Bs.OneWay=MS,Bs.TwoWay=Rg;function Br(a,y,x){xi.call(this),this.Vv=`,
|
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
|
"removedLinkKeys": `,this.md=[],this.$f=new Ut,this.wb=new Dn,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&&(qn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Ve(Br,xi),Br.constructGraphLinksModel=xi.constructGraphLinksModel,Br.prototype.cloneProtected=function(a){xi.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},qe=Br.prototype,qe.clear=function(){xi.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},qe.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)+":"+dr(E)}for(y+=`
|
|
|
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+uu(this,E,!0)+"-->"+uu(this,E,!1)}return y},qe.Qv=function(a,y){this.linkKeyProperty===""&&rn("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=xi.prototype.Qv.call(this,a,y),b=this,E=new Ut,te=new Ut,ne=new Ut,ae=this.vh;a.changes.each(function(Pe){Pe.model===b&&(Pe.modelChange==="linkDataArray"?Pe.change===bs?E.add(Pe.newValue):Pe.change===Os&&ne.add(Pe.oldValue):b.Jc(Pe.object)?te.add(Pe.object):Pe.object!==null&&(Pe.object!==null&&ae&&ae.contains(Pe.object)?ae.get(Pe.object).each(function(Ne){b.Jc(Ne)&&te.add(Ne)}):Pe.object instanceof xi||b.lb(Pe.object)||kS(b,Pe.object).each(function(Ne){te.add(Ne)})))});var ce=this.il;ce.clear(),E.each(function(Pe){ce.add(b.Ac(Pe)),y||te.add(Pe)});var _e=this.kl;return _e.clear(),ne.each(function(Pe){_e.add(b.Ac(Pe)),y&&te.add(Pe)}),a=b.cloneDeep(te.Fa()),0<ce.count&&(x===null&&(x={}),y?x.removedLinkKeys=ce.Fa():x.insertedLinkKeys=ce.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(),ce.clear(),x},qe.rm=function(){var a=xi.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},qe.gp=function(a){xi.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)},qe.Rv=function(){var a=xi.prototype.Rv.call(this),y=`,
|
|
|
"linkDataArray": `+md(this,this.linkDataArray,!0);return a+y},qe.kv=function(a){xi.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 Ut,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];f0(a,y,E,E,x)}return x}qe.Pv=function(a,y){this.linkKeyProperty===""&&rn("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=xi.prototype.Pv.call(this,a,y),b=this,E=new Ut,te=new Ut,ne=new Ut,ae=this.vh;a.changes.each(function(Pe){Pe.model===b&&(Pe.modelChange==="linkDataArray"?Pe.change===bs?E.add(Pe.newValue):Pe.change===Os&&ne.add(Pe.oldValue):b.Jc(Pe.object)?te.add(Pe.object):Pe.object!==null&&(Pe.object!==null&&ae&&ae.contains(Pe.object)?ae.get(Pe.object).each(function(Ne){b.Jc(Ne)&&te.add(Ne)}):Pe.object instanceof xi||b.lb(Pe.object)||kS(b,Pe.object).each(function(Ne){te.add(Ne)})))});var ce=this.il;ce.clear(),E.each(function(Pe){ce.add(b.Ac(Pe)),y||te.add(Pe)});var _e=this.kl;return _e.clear(),ne.each(function(Pe){_e.add(b.Ac(Pe)),y&&te.add(Pe)}),a=x,0<ce.count&&(a+=(y?this.Xv:this.Vv)+md(this,ce.Fa(),!0)),0<te.count&&(a+=this.iy+md(this,te.Fa(),!0)),0<_e.count&&(a+=(y?this.Vv:this.Xv)+md(this,_e.Fa(),!0)),_e.clear(),ce.clear(),a},qe.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)&&rn("applyIncrementalJson cannot change Model properties"),xi.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)},Br.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===Jo){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),os(x,b,E);return}}else if(a.change===bs){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,cn(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===Os){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,cn(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}}xi.prototype.changeState.call(this,a,y)}},qe=Br.prototype,qe.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),os(x,this.nodeKeyProperty,a),this.xf(x))}return a}},qe.yx=function(a){return uu(this,a,!0)},qe.wv=function(a,y){Pp(this,a,y,!0)},qe.Bx=function(a){return uu(this,a,!1)},qe.Bv=function(a,y){Pp(this,a,y,!1)};function uu(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Fs(y,a),a!==void 0))){if(vd(a))return a;rn((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Pp(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=Fs(y,E);te!==x&&(sh(a,te,y),os(y,E,x),a.hc(x)===null&&oh(a,x,y),Js(a,b?"linkFromKey":"linkToKey",Jo,E,y,te,x),typeof E=="string"&&a.La(y,E))}else os(y,E,x)}}qe.zx=function(a){return g0(this,a,!0)},qe.xv=function(a,y){Cp(this,a,y,!0)},qe.Cx=function(a){return g0(this,a,!1)},qe.Cv=function(a,y){Cp(this,a,y,!1)};function g0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Fs(y,a),y===void 0?"":y)}function Cp(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var te=Fs(y,E);te===void 0&&(te=""),te!==x&&(os(y,E,x),Js(a,b?"linkFromPortId":"linkToPortId",Jo,E,y,te,x),typeof E=="string"&&a.La(y,E))}else os(y,E,x)}}qe.Ef=function(a){if(a===null)return m0;var y=this.je;return y===""?m0:(a=Fs(a,y),a===void 0?m0:a)},qe.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=Fs(a,x);if(b===void 0&&(b=m0),b!==y){if(Array.isArray(b))for(var E=b.length,te=0;te<E;te++)sh(this,b[te],a);for(os(a,x,y),E=y.length,te=0;te<E;te++){var ne=y[te];this.hc(ne)===null&&oh(this,ne,a)}Js(this,"linkLabelKeys",Jo,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else os(a,x,y)}},qe.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Fs(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&&oh(this,y,a),Js(this,"linkLabelKeys",bs,x,a,null,y,null,E)))}else rn(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},qe.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Fs(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(sh(this,y,a),Js(this,"linkLabelKeys",Os,x,a,y,null,E,null)))}else b!==void 0&&rn(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},qe.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Fs(a,y),y!==void 0)){if(vd(y))return y;rn("Key value for link data "+a+" is not a number or a string: "+y)}}},qe.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=Fs(a,x);b!==y&&this.jh(y)===null&&(os(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),Js(this,"linkKey",Jo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else os(a,x,y)}},qe.jh=function(a){return a===null&&rn("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&vd(a)?this.wb.I(a):null},qe.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))){os(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;os(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;os(a,y,x)}}}}},qe.Jc=function(a){return a===null?!1:this.$f.contains(a)},qe.fi=function(a){a!==null&&(jn(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&&rn("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)),Js(a,"linkDataArray",bs,"linkDataArray",a,null,y,null,b),fy(a,y)}qe.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)},qe.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(Js(a,"linkDataArray",Os,"linkDataArray",a,y,null,b,null),x=uu(a,y,!0),sh(a,x,y),x=uu(a,y,!1),sh(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,te=0;te<E;te++)x=b[te],sh(a,x,y)}qe.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)},qe.Zz=function(a){if(this.linkKeyProperty===""&&rn("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&qn(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 ae=this.jh(ne);ae!==te&&(ae!==null?(this.Do(ae,te),NS(this,te,ae)):(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=uu(a,y,!0);x=a.Vl(x),a.hc(x)===null&&oh(a,x,y),x=uu(a,y,!1),x=a.Vl(x),a.hc(x)===null&&oh(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&&oh(a,x,y)}qe.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):p0(this,a,!0),cn(a)&&(en(a),this.lf!==""&&os(a,this.lf,void 0),this.mf!==""&&os(a,this.mf,void 0),this.je!==""&&os(a,this.je,[])),a},qe.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Fs(a,y)},qe.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Fs(a,y),y!==void 0)){if(vd(y))return y;rn("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},qe.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=Fs(a,x);b!==y&&(sh(this,b,a),os(a,x,y),this.hc(y)===null&&oh(this,y,a),Js(this,"nodeGroupKey",Jo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else os(a,x,y)}},Br.prototype.copyNodeData=function(a){return a===null?null:(a=xi.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Fs(a,this.Je)===void 0||os(a,this.Je,void 0),a)},Br.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){Pp(this,a,x,!0);return}if(y===this.linkToKeyProperty){Pp(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Cp(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Cp(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=Fs(a,y);b!==x&&(os(a,y,x),this.Fs(a,y,b,x))},qe=Br.prototype,qe.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&&Fs(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},qe.jp=function(a,y){xi.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(uu(this,b,!0)===E){var ne=this.lf;os(b,ne,te),Js(this,"linkFromKey",Jo,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)}if(uu(this,b,!1)===E&&(ne=this.mf,os(b,ne,te),Js(this,"linkToKey",Jo,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)),ne=this.Ef(b),Array.isArray(ne))for(var ae=ne.length,ce=this.je,_e=0;_e<ae;_e++)ne[_e]===E&&(ne[_e]=te,Js(this,"linkLabelKeys",bs,ce,b,E,te,_e,_e))}},qe.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;os(a,b,x),Js(this,"nodeGroupKey",Jo,b,a,y,x),typeof b=="string"&&this.La(a,b)}},qe.Lv=function(){xi.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)fy(this,a[x])},qe.fm=function(a){xi.prototype.fm.call(this,a),a=this.wa(a);var y=Dg(this,a);if(y!==null){var x=Ti();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;Js(this,"nodeGroupKey",Jo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(uu(this,b,!0)===a&&(E=this.lf,Js(this,"linkFromKey",Jo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),uu(this,b,!1)===a&&(E=this.mf,Js(this,"linkToKey",Jo,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,ae=0;ae<te;ae++)E[ae]===a&&(Js(this,"linkLabelKeys",bs,ne,b,a,a,ae,ae),x.push(b))}for(y=0;y<x.length;y++)sh(this,a,x[y]);bi(x)}},qe.em=function(a){xi.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&oh(this,y,a)},qe.qp=function(a){xi.prototype.qp.call(this,a);var y=this.lh(a);sh(this,y,a)},qe.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Fs(a,y),y===void 0))return"";if(typeof y=="string")return y;rn("getCategoryForLinkData found a non-string category for "+a+": "+y)},Br.prototype.getLinkCategoryForData=function(a){return this.ps(a)},Br.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=Fs(a,x);b===void 0&&(b=""),b!==y&&(os(a,x,y),Js(this,"linkCategory",Jo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else os(a,x,y)}},Br.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},qe=Br.prototype,qe.lm=function(a,y){xi.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))}qe.Wj=function(){return!0},qe.ri=function(){return!0},qe.xs=function(){return!0},qe.Xj=function(){return!0},ot.Object.defineProperties(Br.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];cn(E)||rn("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),jn(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new zn,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 Ut,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,Js(this,"linkDataArray",Jo,"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"}}}),Br.prototype.setCategoryForLinkData=Br.prototype.lp,Br.prototype.getCategoryForLinkData=Br.prototype.ps,Br.prototype.assignAllDataProperties=Br.prototype.Do,Br.prototype.setGroupKeyForNodeData=Br.prototype.mp,Br.prototype.getGroupKeyForNodeData=Br.prototype.lh,Br.prototype.isGroupForNodeData=Br.prototype.Yu,Br.prototype.copyLinkData=Br.prototype.Jo,Br.prototype.mergeLinkDataArray=Br.prototype.Zz,Br.prototype.removeLinkDataCollection=Br.prototype.lA,Br.prototype.removeLinkData=Br.prototype.bm,Br.prototype.addLinkDataCollection=Br.prototype.Ey,Br.prototype.addLinkData=Br.prototype.fi,Br.prototype.containsLinkData=Br.prototype.Jc,Br.prototype.makeLinkDataKeyUnique=Br.prototype.Bs,Br.prototype.findLinkDataForKey=Br.prototype.jh,Br.prototype.setKeyForLinkData=Br.prototype.Ks,Br.prototype.getKeyForLinkData=Br.prototype.Ac,Br.prototype.removeLabelKeyForLinkData=Br.prototype.Qx,Br.prototype.addLabelKeyForLinkData=Br.prototype.Bu,Br.prototype.setLabelKeysForLinkData=Br.prototype.Ls,Br.prototype.getLabelKeysForLinkData=Br.prototype.Ef,Br.prototype.setToPortIdForLinkData=Br.prototype.Cv,Br.prototype.getToPortIdForLinkData=Br.prototype.Cx,Br.prototype.setFromPortIdForLinkData=Br.prototype.xv,Br.prototype.getFromPortIdForLinkData=Br.prototype.zx,Br.prototype.setToKeyForLinkData=Br.prototype.Bv,Br.prototype.getToKeyForLinkData=Br.prototype.Bx,Br.prototype.setFromKeyForLinkData=Br.prototype.wv,Br.prototype.getFromKeyForLinkData=Br.prototype.yx,Br.prototype.clear=Br.prototype.clear;var m0=Object.freeze([]);Br.className="GraphLinksModel",Zu.GraphLinksModel=Br,xi.constructGraphLinksModel=xi.constructGraphLinksModel=function(){return new Br},xi.initDiagramModel=cy=function(){return new Br};function vl(a,y){xi.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(qn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Ve(vl,xi),vl.constructGraphLinksModel=xi.constructGraphLinksModel,vl.prototype.cloneProtected=function(a){xi.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},qe=vl.prototype,qe.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)+":"+dr(E)}}return y},qe.rm=function(){var a=xi.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},qe.gp=function(a){xi.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},qe.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&rn("applyIncrementalJson cannot change Model properties"),xi.prototype.fp.call(this,a)},qe.Vl=function(a){return a},qe.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Fs(a,y),y!==void 0)){if(vd(y))return y;rn("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},qe.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=Fs(a,x);b!==y&&(sh(this,b,a),os(a,x,y),this.hc(y)===null&&oh(this,y,a),Js(this,"nodeParentKey",Jo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else os(a,x,y)}},qe.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Fs(a,y),y===void 0)?"":typeof y=="string"?y:(rn("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},vl.prototype.getLinkCategoryForData=function(a){return this.ss(a)},vl.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=Fs(a,x);b===void 0&&(b=""),b!==y&&(os(a,x,y),Js(this,"parentLinkCategory",Jo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else os(a,x,y)}},vl.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},vl.prototype.copyNodeData=function(a){return a===null?null:(a=xi.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Fs(a,this.Ke)===void 0||os(a,this.Ke,void 0),a)},vl.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=Fs(a,y);b!==x&&(os(a,y,x),this.Fs(a,y,b,x))},qe=vl.prototype,qe.jp=function(a,y){xi.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},qe.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;os(a,b,x),Js(this,"nodeParentKey",Jo,b,a,y,x),typeof b=="string"&&this.La(a,b)}},qe.fm=function(a){xi.prototype.fm.call(this,a),a=this.wa(a);var y=Dg(this,a);if(y!==null){var x=Ti();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;Js(this,"nodeParentKey",Jo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)sh(this,a,x[y]);bi(x)}},qe.em=function(a){xi.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&oh(this,y,a)},qe.qp=function(a){xi.prototype.qp.call(this,a);var y=this.mh(a);sh(this,y,a)},qe.lm=function(a,y){xi.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},qe.Tl=function(){return!0},qe.xs=function(){return!0},ot.Object.defineProperties(vl.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"}}}),vl.prototype.setParentLinkCategoryForNodeData=vl.prototype.Ms,vl.prototype.getParentLinkCategoryForNodeData=vl.prototype.ss,vl.prototype.setParentKeyForNodeData=vl.prototype.qe,vl.prototype.getParentKeyForNodeData=vl.prototype.mh,vl.className="TreeModel",Zu.TreeModel=vl;function gs(a){ls.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Yu,this.Ti=0,this.Zv=new vt,this.Jp=this.me=0,this.Xr=new jg,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=Yu,this.K=yl,this.nd=Lp,this.hd=oy,this.tf=6,this.Nn=b0,a&&Object.assign(this,a)}Ve(gs,ls),gs.prototype.cloneProtected=function(a){ls.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},gs.prototype.qb=function(a){a.classType===gs?a===w0||a===_0||a===S0||a===x0||a===Lp?this.sorting=a:a===rf||a===Ep||a===yl||a===Sd?this.direction=a:a===Hc||a===yd||a===Yu||a===Xu?this.arrangement=a:(a===Df||a===b0)&&(this.nodeDiameterFormula=a):ls.prototype.qb.call(this,a)},gs.prototype.createNetwork=function(){return new Mp(this)},gs.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 zn;y.addAll(a.iterator),a=new zn;var x=new zn,b=this.sort(y),E,te,ne=this.Jp,ae=this.arrangement,ce=this.nodeDiameterFormula,_e=this.radius;(!isFinite(_e)||0>=_e)&&(_e=NaN);var Pe=this.aspectRatio;(!isFinite(Pe)||0>=Pe)&&(Pe=1);var Ne=this.startAngle;isFinite(Ne)||(Ne=0);var Ge=this.sweepAngle;if((!isFinite(Ge)||360<Ge||1>Ge)&&(Ge=360),y=this.spacing,isFinite(y)||(y=NaN),ae===Xu&&ce===Df?ae=Yu:ae===Xu&&ce!==Df&&(ae=this.arrangement),(this.direction===rf||this.direction===Ep)&&this.sorting!==Lp){for(ce=0;!(ce>=b.length)&&(a.add(b.M(ce)),!(ce+1>=b.length));ce+=2)x.add(b.M(ce+1));this.direction===rf?(this.arrangement===Xu&&a.reverse(),b=new zn,b.addAll(a),b.addAll(x)):(this.arrangement===Xu&&x.reverse(),b=new zn,b.addAll(x),b.addAll(a))}ce=b.length;for(var Ye=te=E=0;Ye<b.length;Ye++){var Qe=Ne+Ge*te*(this.direction===yl?1:-1)/ce,at=b.M(Ye).diameter;isNaN(at)&&(at=xd(b.M(Ye),Qe)),360>Ge&&(Ye===0||Ye===b.length-1)&&(at/=2),E+=at,te++}if(isNaN(_e)||ae===Xu){if(isNaN(y)&&(y=6),ae!==Yu&&ae!==Xu){for(te=-1/0,ne=0;ne<ce;ne++)Ye=b.M(ne),E=b.M(ne===ce-1?0:ne+1),isNaN(Ye.diameter)&&xd(Ye,0),isNaN(E.diameter)&&xd(E,0),te=Math.max(te,(Ye.diameter+E.diameter)/2);ne=te+y,ae===Hc?_e=(te+y)/(2*Math.PI/ce):_e=v0(this,ne*(360<=Ge?ce:ce-1),Pe,Ne*Math.PI/180,Ge*Math.PI/180)}else _e=v0(this,E+(360<=Ge?ce:ce-1)*(ae!==Xu?y:1.6*y),Pe,Ne*Math.PI/180,Ge*Math.PI/180);te=_e*Pe}else if(te=_e*Pe,Ye=py(this,_e,te,Ne*Math.PI/180,Ge*Math.PI/180),isNaN(y))(ae===Yu||ae===Xu)&&(y=(Ye-E)/(360<=Ge?ce:ce-1));else if(ae===Yu||ae===Xu)Ye=(Ye-E)/(360<=Ge?ce:ce-1),Ye<y?(_e=v0(this,E+y*(360<=Ge?ce:ce-1),Pe,Ne*Math.PI/180,Ge*Math.PI/180),te=_e*Pe):y=Ye;else{for(ne=-1/0,E=0;E<ce;E++)Qe=b.M(E),at=b.M(E===ce-1?0:E+1),isNaN(Qe.diameter)&&xd(Qe,0),isNaN(at.diameter)&&xd(at,0),ne=Math.max(ne,(Qe.diameter+at.diameter)/2);ne+=y,E=v0(this,ne*(360<=Ge?ce:ce-1),Pe,Ne*Math.PI/180,Ge*Math.PI/180),E>_e?(_e=E,te=_e*Pe):ne=Ye/(360<=Ge?ce:ce-1)}if(this.kw=ae,this.lc=_e,this.Zm=Pe,this.lw=Ne,this.Wp=Ge,this.Ti=y,this.me=te,this.Jp=ne,y=b,b=this.kw,ae=this.lc,_e=this.lw,Pe=this.Wp,Ne=this.Ti,Ge=this.me,ce=this.Jp,this.direction!==rf&&this.direction!==Ep||b!==Xu)if(this.direction===rf||this.direction===Ep){switch(ne=0,b){case yd:ne=180*y0(this,ae,Ge,_e,ce)/Math.PI;break;case Yu:ce=y=0,ne=a.first(),ne!==null&&(y=xd(ne,Math.PI/2)),ne=x.first(),ne!==null&&(ce=xd(ne,Math.PI/2)),ne=180*y0(this,ae,Ge,_e,Ne+(y+ce)/2)/Math.PI;break;case Hc:ne=Pe/y.length}if(this.direction===rf){switch(b){case yd:Bg(this,a,_e,Sd);break;case Yu:Fg(this,a,_e,Sd);break;case Hc:Ig(this,a,Pe/2,_e,Sd)}switch(b){case yd:Bg(this,x,_e+ne,yl);break;case Yu:Fg(this,x,_e+ne,yl);break;case Hc:Ig(this,x,Pe/2,_e+ne,yl)}}else{switch(b){case yd:Bg(this,x,_e,Sd);break;case Yu:Fg(this,x,_e,Sd);break;case Hc:Ig(this,x,Pe/2,_e,Sd)}switch(b){case yd:Bg(this,a,_e+ne,yl);break;case Yu:Fg(this,a,_e+ne,yl);break;case Hc:Ig(this,a,Pe/2,_e+ne,yl)}}}else switch(b){case yd:Bg(this,y,_e,this.direction);break;case Yu:Fg(this,y,_e,this.direction);break;case Hc:Ig(this,y,Pe,_e,this.direction);break;case Xu:DS(this,y,Pe,_e,this.direction)}else DS(this,y,Pe,_e-Pe/2,yl)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Ig(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 ae=y.length,ce=0;ce<ae;ce++){var _e=b+(E===yl?ce*x/(360<=te?ae:ae-1):-(ce*x)/ae),Pe=y.M(ce),Ne=ne*Math.tan(_e)/a;Ne=Math.sqrt((ne*ne+a*a*Ne*Ne)/(1+Ne*Ne)),Pe.centerX=Ne*Math.cos(_e),Pe.centerY=Ne*Math.sin(_e),Pe.actualAngle=180*_e/Math.PI}}function Fg(a,y,x,b){var E=a.lc,te=a.me,ne=a.Ti;x=x*Math.PI/180;for(var ae=y.length,ce=0;ce<ae;ce++){var _e=y.M(ce),Pe=y.M(ce===ae-1?0:ce+1),Ne=te*Math.sin(x);_e.centerX=E*Math.cos(x),_e.centerY=Ne,_e.actualAngle=180*x/Math.PI,isNaN(_e.diameter)&&xd(_e,0),isNaN(Pe.diameter)&&xd(Pe,0),_e=y0(a,E,te,b===yl?x:-x,(_e.diameter+Pe.diameter)/2+ne),x+=b===yl?_e:-_e}}function Bg(a,y,x,b){var E=a.lc,te=a.me,ne=a.Jp;x=x*Math.PI/180;for(var ae=y.length,ce=0;ce<ae;ce++){var _e=y.M(ce);_e.centerX=E*Math.cos(x),_e.centerY=te*Math.sin(x),_e.actualAngle=180*x/Math.PI,_e=y0(a,E,te,b===yl?x:-x,ne),x+=b===yl?_e:-_e}}function DS(a,y,x,b,E){var te=a.Wp;if(a.mj=0,a.Xr=new jg,360>x){for(te=b+(E===yl?te:-te);0>te;)te+=360;te%=360,180<te&&(te-=360),te*=Math.PI/180,a.gt=te,RS(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,ae=a.Zm,ce=te*Math.cos(b*Math.PI/180),_e=a.me*Math.sin(b*Math.PI/180),Pe=y.Fa();if(Pe.length===3)Pe[0].centerX=te,Pe[0].centerY=0,Pe[1].centerX=Pe[0].centerX-Pe[0].width/2-Pe[1].width/2-ne,Pe[1].y=Pe[0].y,Pe[2].centerX=(Pe[0].centerX+Pe[1].centerX)/2,Pe[2].y=Pe[0].y-Pe[2].height-ne;else if(Pe.length===4)Pe[0].centerX=te,Pe[0].centerY=0,Pe[2].centerX=-Pe[0].centerX,Pe[2].centerY=Pe[0].centerY,Pe[1].centerX=0,Pe[1].y=Math.min(Pe[0].y,Pe[2].y)-Pe[1].height-ne,Pe[3].centerX=0,Pe[3].y=Math.max(Pe[0].y+Pe[0].height+ne,Pe[2].y+Pe[2].height+ne);else{te=vt.alloc();for(var Ne=0;Ne<Pe.length&&(Pe[Ne].centerX=ce,Pe[Ne].centerY=_e,!(Ne>=Pe.length-1));Ne++)IS(a,ce,_e,Pe,Ne,E,te)||FS(a,ce,_e,Pe,Ne,E,te),ce=te.x,_e=te.y;if(vt.free(te),a.mj++,!(23<a.mj)){ce=Pe[0].centerX,_e=Pe[0].centerY,te=Pe[Pe.length-1].centerX,Ne=Pe[Pe.length-1].centerY;var Ge=Math.abs(ce-te)-((Pe[0].width+Pe[Pe.length-1].width)/2+ne),Ye=Math.abs(_e-Ne)-((Pe[0].height+Pe[Pe.length-1].height)/2+ne);ne=0,1>Math.abs(Ye)?Math.abs(ce-te)<(Pe[0].width+Pe[Pe.length-1].width)/2&&(ne=0):ne=0<Ye?Ye:1>Math.abs(Ge)?0:Ge,ce=Math.abs(te)>Math.abs(Ne)?0<te!=_e>Ne:0<Ne!=ce<te,(ce=E===yl?ce:!ce)&&(ne=-Math.abs(ne),ne=Math.min(ne,-Pe[Pe.length-1].width),ne=Math.min(ne,-Pe[Pe.length-1].height)),a.Xr.compare(ne,Pe),1<Math.abs(ne)&&(a.lc=8>a.mj?a.lc-ne/(2*Math.PI):5>Pe.length&&10<ne?a.lc/2:a.lc-(0<ne?1.7:-2.3),a.me=a.lc*ae,OS(a,y,x,b,E))}}}function RS(a,y,x,b,E){for(var te=a.lc,ne=a.me,ae=a.Zm,ce=te*Math.cos(b*Math.PI/180),_e=ne*Math.sin(b*Math.PI/180),Pe=vt.alloc(),Ne=y.Fa(),Ge=0;Ge<Ne.length&&(Ne[Ge].centerX=ce,Ne[Ge].centerY=_e,!(Ge>=Ne.length-1));Ge++)IS(a,ce,_e,Ne,Ge,E,Pe)||FS(a,ce,_e,Ne,Ge,E,Pe),ce=Pe.x,_e=Pe.y;if(vt.free(Pe),a.mj++,!(23<a.mj)){if(ce=Math.atan2(_e,ce),ce=E===yl?a.gt-ce:ce-a.gt,ce=Math.abs(ce)<Math.abs(ce-2*Math.PI)?ce:ce-2*Math.PI,te=ce*(te+ne)/2,ne=a.Xr,Math.abs(te)<Math.abs(ne.Pl))for(ne.Pl=te,ne.mk=[],ne.tm=[],ce=0;ce<Ne.length;ce++)ne.mk[ce]=Ne[ce].bounds.x,ne.tm[ce]=Ne[ce].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*ae,RS(a,y,x,b,E))}}function IS(a,y,x,b,E,te,ne){var ae=a.lc,ce=a.me,_e=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var Pe=!1;if(0<=x!=(te===yl)){if(te=y+a,te>ae){if(te=y-a,te<-ae)return ne.x=te,ne.y=_e,!1;Pe=!0}}else if(te=y-a,te<-ae){if(te=y+a,te>ae)return ne.x=te,ne.y=_e,!1;Pe=!0}return _e=Math.sqrt(1-Math.min(1,te*te/(ae*ae)))*ce,0>x!==Pe&&(_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 ae=a.lc,ce=a.me,_e=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(te===yl)){if(te=x-a,te<-ce){if(te=x+a,te>ce){ne.x=_e,ne.y=te;return}b=!0}}else if(te=x+a,te>ce){if(te=x-a,te<-ce){ne.x=_e,ne.y=te;return}b=!0}_e=Math.sqrt(1-Math.min(1,te*te/(ce*ce)))*ae,0>y!==b&&(_e=-_e),ne.x=_e,ne.y=te}gs.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},gs.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 vt(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))},gs.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,ae=b!==void 0&&E!==void 0?E/(te+1):Math.PI/(2*(te+1)),ce=0,_e=0;_e<=te;_e++){b!==void 0&&E!==void 0?ce=b+_e*E/te:ce=_e*Math.PI/(2*te);var Pe=Math.sin(ce);ne+=Math.sqrt(1-a*a*Pe*Pe)*ae}return b!==void 0&&E!==void 0?(y>x?y:x)*ne:4*(y>x?y:x)*ne}function v0(a,y,x,b,E){return y/(b!==void 0&&E!==void 0?py(a,1,x,b,E):py(a,1,x))}function y0(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 ae=0;;ae++){var ce=Math.sin(b+ae*a);if(ne+=(y>x?y:x)*Math.sqrt(1-te*te*ce*ce)*a,ne>=E)return ae*a}}gs.prototype.sort=function(a){switch(this.sorting){case S0:break;case x0:a.reverse();break;case w0:a.sort(this.comparer);break;case _0:a.sort(this.comparer),a.reverse();break;case Lp:return this.ak(Ox(a));default:rn("Invalid sorting type.")}return a};function Ox(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new zn;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 ae=a.M(ne).edgesCount;ae>E&&(E=ae,te=ne)}else for(ne=0;ne<a.length;ne++)ae=y[ne],ae>E&&(E=ae,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}gs.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=[],ae=[];b=[],E=new zn;for(var ce=0,_e=0;_e<y.length;_e++){var Pe=y[_e].length;if(Pe===1)b.push(_e);else if(Pe===0)E.add(a.M(_e));else{if(ce===0)x.push(_e);else{for(var Ne=Pe=1/0,Ge=-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 at=Ye[Qe],Ct=y[_e],xt=0,Tt=0;Tt<ne.length;Tt++){var Nt=te[ne[Tt]],It=te[ae[Tt]];if(Nt<It){var Zt=Nt;Nt=It}else Zt=It;if(Zt<at&&at<=Nt)for(It=0;It<Ct.length;It++){var un=Ct[It];0>x.indexOf(un)||Zt<te[un]&&te[un]<Nt||Zt===te[un]||Nt===te[un]||xt++}else for(It=0;It<Ct.length;It++)un=Ct[It],0>x.indexOf(un)||Zt<te[un]&&te[un]<Nt&&Zt!==te[un]&&Nt!==te[un]&&xt++}for(Ct=xt,Tt=xt=0;Tt<y[_e].length;Tt++)Zt=x.indexOf(y[_e][Tt]),0<=Zt&&(Zt=Math.abs(at-(Zt>=at?Zt+1:Zt)),xt+=Zt<x.length+1-Zt?Zt:x.length+1-Zt);for(Tt=0;Tt<ne.length;Tt++)Zt=te[ne[Tt]],Nt=te[ae[Tt]],Zt>=at&&Zt++,Nt>=at&&Nt++,Zt>Nt&&(It=Nt,Nt=Zt,Zt=It),Nt-Zt<(x.length+2)/2==(Zt<at&&at<=Nt)&&xt++;(Ct<Pe||Ct===Pe&&xt<Ne)&&(Pe=Ct,Ne=xt,Ge=at)}for(x.splice(Ge,0,_e),Pe=0;Pe<x.length;Pe++)te[x[Pe]]=Pe;for(Pe=0;Pe<y[_e].length;Pe++)Ne=y[_e][Pe],0<=x.indexOf(Ne)&&(ne.push(_e),ae.push(Ne))}ce++}}for(ne=x.length;;){for(te=!0,ae=0;ae<b.length;ae++)if(ce=b[ae],_e=y[ce][0],Pe=x.indexOf(_e),0<=Pe){for(Ge=Ne=0;Ge<y[_e].length;Ge++)Ye=x.indexOf(y[_e][Ge]),0>Ye||Ye===Pe||(Qe=Ye>Pe?Ye-Pe:Pe-Ye,Ne+=Ye<Pe!=Qe>ne-Qe?1:-1);x.splice(0>Ne?Pe:Pe+1,0,ce),b.splice(ae,1),ae--}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(gs.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!==Yu&&a!==yd&&a!==Hc||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==yl&&a!==Sd&&a!==rf&&a!==Ep||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==S0&&a!==x0&&a!==w0&&!_0&&a!==Lp||(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!==b0&&a!==Df||(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 Yu=new dn(gs,"ConstantSpacing",0),yd=new dn(gs,"ConstantDistance",1),Hc=new dn(gs,"ConstantAngle",2),Xu=new dn(gs,"Packed",3),yl=new dn(gs,"Clockwise",4),Sd=new dn(gs,"Counterclockwise",5),rf=new dn(gs,"BidirectionalLeft",6),Ep=new dn(gs,"BidirectionalRight",7),S0=new dn(gs,"Forwards",8),x0=new dn(gs,"Reverse",9),w0=new dn(gs,"Ascending",10),_0=new dn(gs,"Descending",11),Lp=new dn(gs,"Optimized",12),b0=new dn(gs,"Pythagorean",13),Df=new dn(gs,"Circular",14);gs.className="CircularLayout",gs.ConstantSpacing=Yu,gs.ConstantDistance=yd,gs.ConstantAngle=Hc,gs.Packed=Xu,gs.Clockwise=yl,gs.Counterclockwise=Sd,gs.BidirectionalLeft=rf,gs.BidirectionalRight=Ep,gs.Forwards=S0,gs.Reverse=x0,gs.Ascending=w0,gs.Descending=_0,gs.Optimized=Lp,gs.Pythagorean=b0,gs.Circular=Df;function jg(){this.Pl=-1/0,this.tm=this.mk=null}jg.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},jg.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]}},jg.className="VertexArrangement";function Mp(a){Zo.call(this,a)}Ve(Mp,Zo),Mp.prototype.createVertex=function(){return new zg(this)},Mp.prototype.createEdge=function(){return new P0(this)},Mp.className="CircularNetwork";function zg(a){na.call(this,a),this.u=this.Si=NaN}Ve(zg,na);function xd(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===Df)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===Df?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}ot.Object.defineProperties(zg.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)}}}),zg.className="CircularVertex";function P0(a){ql.call(this,a)}Ve(P0,ql),P0.className="CircularEdge";function Ra(a){ls.call(this),this.ah=null,this.An=0,this.$d=new Sn(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)}Ve(Ra,ls),Ra.prototype.cloneProtected=function(a){ls.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},Ra.prototype.createNetwork=function(){return new Of(this)},Ra.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 ae=ne.count,ce=!0;te=E=0;for(var _e=Ti(),Pe=0;Pe<ae+y.vertexes.count+2;Pe++)_e[Pe]=null;ae=0,ne.reset();for(var Ne=pn.alloc();ne.next();)if(Pe=ne.value,this.computeBounds(Pe,Ne),ce)ce=!1,E=Ne.x+Ne.width/2,te=Ne.y+Ne.height/2,_e[0]=new vt(Ne.x+Ne.width+b.width,Ne.y),_e[1]=new vt(Ne.x,Ne.y+Ne.height+b.height),ae=2;else{var Ge=jS(_e,ae,E,te,Ne.width,Ne.height,b),Ye=_e[Ge],Qe=new vt(Ye.x+Ne.width+b.width,Ye.y),at=new vt(Ye.x,Ye.y+Ne.height+b.height);for(Ge+1<ae&&_e.splice(Ge+1,0,null),_e[Ge]=Qe,_e[Ge+1]=at,ae++,Ge=Ye.x-Ne.x,Ye=Ye.y-Ne.y,Pe=Pe.vertexes.iterator;Pe.next();)Qe=Pe.value,Qe.centerX+=Ge,Qe.centerY+=Ye}for(pn.free(Ne),Pe=y.vertexes.iterator;Pe.next();)ne=Pe.value,Ge=ne.bounds,2>ae?(E=Ge.x+Ge.width/2,te=Ge.y+Ge.height/2,_e[0]=new vt(Ge.x+Ge.width+b.width,Ge.y),_e[1]=new vt(Ge.x,Ge.y+Ge.height+b.height),ae=2):(ce=jS(_e,ae,E,te,Ge.width,Ge.height,b),Ne=_e[ce],Ye=new vt(Ne.x+Ge.width+b.width,Ne.y),Ge=new vt(Ne.x,Ne.y+Ge.height+b.height),ce+1<ae&&_e.splice(ce+1,0,null),_e[ce]=Ye,_e[ce+1]=Ge,ae++,ne.centerX=Ne.x+ne.width/2,ne.centerY=Ne.y+ne.height/2);for(bi(_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},Ra.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},Ra.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(Rx(a,y)){var b=a.Zf;a.Zf*=1+1/(y+1);var E=Ix(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,ae){return ne===null||ae===null||ne===ae?0:ae.Vd-ne.Vd}),x=0;x<y.length;x++)Bx(a,y[x]);a.Zf=b}}function Rx(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 Ix(a,y){for(var x=a.network,b=new Of(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 zn),te.We.add(ne),te.sv=te.We.count-1}else break}for(te=x.edges.iterator;te.next();){var ae=te.value;E=ae.fromVertex,ne=ae.toVertex,E.network===b&&ne.network===b?b.Bo(ae):E.network===b?(ae=E.Hj,ae===null&&(ae=new zn,E.Hj=ae),ae.add(ne),E.Vd--,E.sh+=ne.sh):ne.network===b&&(ae=ne.Hj,ae===null&&(ae=new zn,ne.Hj=ae),ae.add(E),ne.Vd--,ne.sh+=E.sh)}for(E=b.edges.iterator;E.next();)te=E.value,te.length*=Math.max(1,tn.sqrt((te.fromVertex.sh+te.toVertex.sh)/(4*y+1)));for(y=b.vertexes.iterator;y.next();){E=y.value;var ce=E.Hj;if(ce!==null&&0<ce.count&&(ne=E.We.M(E.We.count-1).Rs-E.Vd,!(0>=ne))){for(var _e=ae=0,Pe=ce.count-ne;Pe<ce.count;Pe++){var Ne=ce.M(Pe),Ge=null;for(te=Ne.edges.iterator;te.next();){var Ye=te.value;if(Ye.Ax(Ne)===E){Ge=Ye;break}}Ge!==null&&(_e+=Ge.length,ae+=Ne.width*Ne.height)}te=E.centerX,ce=E.centerY,Pe=E.width,Ne=E.height,Ge=E.focus,Ye=Pe*Ne,1>Ye&&(Ye=1),ae=tn.sqrt((ae+Ye+_e*_e*4/(ne*ne))/Ye),ne=(ae-1)*Pe/2,ae=(ae-1)*Ne/2,E.bounds=new pn(te-Ge.x-ne,ce-Ge.y-ae,Pe+2*ne,Ne+2*ae),E.focus=new vt(Ge.x+ne,Ge.y+ae)}}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 pn(b.centerX-te,b.centerY-ne,E.Ss,E.Qs),b.focus=new vt(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=tn.sqrt(te*te+ne*ne)/2;for(var ae=!1,ce=ne=0,_e=0,Pe=y.vertexes.iterator;Pe.next();){var Ne=Pe.value;1>=Ne.Vd?ce++:(ae=!0,_e++,ne+=Math.atan2(y.centerY-Ne.centerY,y.centerX-Ne.centerX))}if(ce!==0){for(0<_e&&(ne/=_e),_e=y=0,y=ae?2*Math.PI/(ce+1):2*Math.PI/ce,ce%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}),ae=ce%2===0?0:1,x=x.iterator;x.next();)if(ce=x.value,!(1<ce.Vd||a.isFixed(ce))){for(Pe=null,Ne=ce.edges.iterator;Ne.next();){Pe=Ne.value;break}Ne=ce.width;var Ge=ce.height;Ne=tn.sqrt(Ne*Ne+Ge*Ge)/2,Pe=te+Pe.length+Ne,Ne=ne+(y*(ae/2>>1)+_e)*(ae%2===0?1:-1),ce.centerX=b+Pe*Math.cos(Ne),ce.centerY=E+Pe*Math.sin(Ne),ae++}}}}function jS(a,y,x,b,E,te,ne){var ae=9e19,ce=-1,_e=0;e:for(;_e<y;_e++){var Pe=a[_e],Ne=Pe.x-x,Ge=Pe.y-b;if(Ne=Ne*Ne+Ge*Ge,Ne<ae){for(Ge=_e-1;0<=Ge;Ge--)if(a[Ge].y>Pe.y&&a[Ge].x-Pe.x<E+ne.width)continue e;for(Ge=_e+1;Ge<y;Ge++)if(a[Ge].x>Pe.x&&a[Ge].y-Pe.y<te+ne.height)continue e;ce=_e,ae=Ne}}return ce}Ra.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ra.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 ae=te.width;return te=te.height,b+E<ne?a>y+te?(x=b+E-ne,a=a-y-te,tn.sqrt(x*x+a*a)):a+x<y?(b=b+E-ne,a=a+x-y,tn.sqrt(b*b+a*a)):ne-(b+E):b>ne+ae?a>y+te?(x=b-ne-ae,a=a-y-te,tn.sqrt(x*x+a*a)):a+x<y?(b=b-ne-ae,a=a+x-y,tn.sqrt(b*b+a*a)):b-(ne+ae):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 ae=y[ne];ae.forceX=0,ae.forceY=0;var ce=ae.centerX;ae=ae.centerY,b=Math.min(b,ce),E=Math.max(E,ce),x=Math.min(x,ae),te=Math.max(te,ae)}(E=E-b>te-x)?y.sort(function(at,Ct){return at===null||Ct===null||at===Ct?0:at.centerX-Ct.centerX}):y.sort(function(at,Ct){return at===null||Ct===null||at===Ct?0:at.centerY-Ct.centerY}),x=a.Zf;var _e=b=ae=0;for(te=0;te<y.length;te++){ne=y[te],b=ne.bounds,ae=ne.focus,ce=b.x+ae.x;var Pe=b.y+ae.y;b=ne.charge*a.electricalFieldX(ce,Pe),_e=ne.charge*a.electricalFieldY(ce,Pe),b+=ne.mass*a.gravitationalFieldX(ce,Pe),_e+=ne.mass*a.gravitationalFieldY(ce,Pe),ne.forceX+=b,ne.forceY+=_e;for(var Ne=te+1;Ne<y.length;Ne++){var Ge=y[Ne];if(Ge!==ne){b=Ge.bounds,ae=Ge.focus,_e=b.x+ae.x;var Ye=b.y+ae.y;if(ce-_e>x||_e-ce>x){if(E)break}else if(Pe-Ye>x||Ye-Pe>x){if(!E)break}else{var Qe=zS(ne,Ge);1>Qe?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new C0),Qe=b.random(),ae=b.random(),ce>_e?(b=Math.abs(Ge.bounds.right-ne.bounds.x),b=(1+b)*Qe):ce<_e?(b=Math.abs(Ge.bounds.x-ne.bounds.right),b=-(1+b)*Qe):(b=Math.max(Ge.width,ne.width),b=(1+b)*Qe-b/2),Pe>Ye?(_e=Math.abs(Ge.bounds.bottom-ne.bounds.y),_e=(1+_e)*ae):ce<_e?(_e=Math.abs(Ge.bounds.y-ne.bounds.bottom),_e=-(1+_e)*ae):(_e=Math.max(Ge.height,ne.height),_e=(1+_e)*ae-_e/2)):(ae=-(ne.charge*Ge.charge)/(Qe*Qe),b=(_e-ce)/Qe*ae,_e=(Ye-Pe)/Qe*ae),ne.forceX+=b,ne.forceY+=_e,Ge.forceX-=b,Ge.forceY-=_e}}}}for(E=a.network.edges.iterator;E.next();)ae=E.value,x=ae.fromVertex,te=ae.toVertex,ne=x.bounds,ce=x.focus,b=ne.x+ce.x,ne=ne.y+ce.y,Pe=te.bounds,Ne=te.focus,ce=Pe.x+Ne.x,Pe=Pe.y+Ne.y,Ne=zS(x,te),1>Ne?(Ne=a.randomNumberGenerator,Ne===null&&(a.randomNumberGenerator=Ne=new C0),ae=Ne.random(),Ne=Ne.random(),b=(b>ce?1:-1)*(1+(te.width>x.width?te.width:x.width))*ae,_e=(ne>Pe?1:-1)*(1+(te.height>x.height?te.height:x.height))*Ne):(ae=ae.stiffness*(Ne-ae.length),b=(ce-b)/Ne*ae,_e=(Pe-ne)/Ne*ae),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}Ra.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},Ra.prototype.moveFixedVertex=function(){},Ra.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Ra.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=ma,y.toSpot=ma)}},Ra.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=pn.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,pn.free(x)}x=pn.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()}pn.free(x)},Ra.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ra.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Ra.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Ra.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Ra.prototype.electricalFieldX=function(){return 0},Ra.prototype.electricalFieldY=function(){return 0},Ra.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Ra.prototype.gravitationalFieldX=function(){return 0},Ra.prototype.gravitationalFieldY=function(){return 0},Ra.prototype.isFixed=function(a){return a.isFixed},ot.Object.defineProperties(Ra.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"&&rn('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())}}}),Ra.className="ForceDirectedLayout";function HS(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}HS.className="ForceDirectedSubnet";function Of(a){Zo.call(this,a)}Ve(Of,Zo),Of.prototype.createVertex=function(){return new Ug(this)},Of.prototype.createEdge=function(){return new Hg(this)},Of.className="ForceDirectedNetwork";function Ug(a){na.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}Ve(Ug,na),ot.Object.defineProperties(Ug.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)}}}),Ug.className="ForceDirectedVertex";function Hg(a){ql.call(this,a),this.j=this.o=NaN}Ve(Hg,ql),ot.Object.defineProperties(Hg.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)}}}),Hg.className="ForceDirectedEdge";function C0(){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()}C0.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},C0.className="RandomNumberGenerator";function Mo(a){ls.call(this),this.kc=this.ie=25,this.K=0,this.Dk=T0,this.Zk=A0,this.Qk=N0,this.bj=4,this.rk=D0,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 vt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Ve(Mo,ls),Mo.prototype.cloneProtected=function(a){ls.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},Mo.prototype.qb=function(a){a.classType===Mo?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:rn("Unknown enum value: "+a):ls.prototype.qb.call(this,a)},Mo.prototype.createNetwork=function(){return new Tp(this)},Mo.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!==Wg&&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===Wg&&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,ae=0,ce=0,_e=0;if(b.link!==null){if(ae=b.link,ae===null)continue;var Pe=E.node;if(ne=te.node,Pe===null||ne===null)continue;var Ne=ae.fromNode;ce=ae.toNode;for(var Ge=ae.fromPort;Ge!==null&&!Ge.Ed();)Ge=Ge.panel;for(ae=ae.toPort;ae!==null&&!ae.Ed();)ae=ae.panel;if(b.rev){_e=Ne;var Ye=Ge;Ne=ce,Ge=ae,ce=_e,ae=Ye}var Qe=E.focus;_e=te.focus;var at=b.rev?te.bounds:E.bounds;Ye=vt.alloc(),Pe!==Ne?at.w()&&Ne.isVisible()?Ne.actualBounds.w()?(Fc(Ne,Ge,Hr,Ye),Ye.x+=Ne.actualBounds.x-at.x,Ye.y+=Ne.actualBounds.y-at.y):(Fc(Ne,Ge,Hr,Ye),Ye.w()||Ye.assign(Qe)):Ye.assign(Qe):at.w()?(Fc(Ne,Ge,Hr,Ye),Ye.w()||Ye.assign(Qe)):Ye.assign(Qe),Ne=b.rev?E.bounds:te.bounds,Pe=vt.alloc(),ne!==ce?Ne.w()&&ce.isVisible()?ce.actualBounds.w()?(Fc(ce,ae,Hr,Pe),Pe.x+=ce.actualBounds.x-Ne.x,Pe.y+=ce.actualBounds.y-Ne.y):(Fc(ce,ae,Hr,Pe),Pe.w()||Pe.assign(_e)):Pe.assign(_e):Ne.w()?(Fc(ce,ae,Hr,Pe),Pe.w()||Pe.assign(_e)):Pe.assign(_e),this.K===90||this.K===270?(ne=Math.round((Ye.x-Qe.x)/this.kc),ce=Ye.x,ae=Math.round((Pe.x-_e.x)/this.kc),_e=Pe.x):(ne=Math.round((Ye.y-Qe.y)/this.kc),ce=Ye.y,ae=Math.round((Pe.y-_e.y)/this.kc),_e=Pe.y),vt.free(Ye),vt.free(Pe),b.portFromColOffset=ne,b.portFromPos=ce,b.portToColOffset=ae,b.portToPos=_e}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;if(Ye=E.layer,Pe=te.layer,Ne=0,at=b.link,at!==null){var Ct=at.fromPort,xt=at.toPort;if(Ct!==null&&xt!==null){var Tt=at.fromNode;if(Ge=at.toNode,Tt!==null&&Ge!==null){var Nt=k0(this,!0),It=k0(this,!1),Zt=this.setsPortSpots?Nt:at.computeSpot(!0,Ct);Qe=this.setsPortSpots?It:at.computeSpot(!1,xt);var un=at.isOrthogonal;Zt.$c()&&Zt.Hf(It)&&Qe.$c()&&Qe.Hf(Nt)?Ne=0:(Nt=at.getLinkPoint(Tt,Ct,Zt,!0,un,Ge,xt,vt.alloc()),It=at.getLinkDirection(Tt,Ct,Nt,Zt,!0,un,Ge,xt),vt.free(Nt),Zt.ys()||It!==qS(this,b,!0)?this.setsPortSpots&&Tt!==null&&Tt.ports.count===1&&b.rev&&(Ne+=1):Ne+=1,Zt=at.getLinkPoint(Ge,xt,Qe,!1,un,Tt,Ct,vt.alloc()),at=at.getLinkDirection(Ge,xt,Zt,Qe,!1,un,Tt,Ct),vt.free(Zt),Qe.ys()||at!==qS(this,b,!1)?this.setsPortSpots&&Ge!==null&&Ge.ports.count===1&&b.rev&&(Ne+=2):Ne+=2)}}}if(Ge=Ne,Ne=Ge===1||Ge===3,(Ge=Ge===2||Ge===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=ce,E.portToPos=0,E=Qe),at=1,Ne&&at--,Ye-Pe>at&&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=Ge?0:ne,E.portToColOffset=0,E.portFromPos=Ge?0:ce,E.portToPos=0,E=Qe,Ye--;Ye-Pe>at&&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=ae,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=wd(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),_d(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},Mo.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}Mo.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},Mo.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 kl(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 xu(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=wd(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 ae=0,ce=b[ne],_e=ce.near;if(_e!==null&&_e.layer===ce.layer)if(ce=_e.index,ce>ne)for(var Pe=ne+1;Pe<ce;Pe++){var Ne=b[Pe];Ne.near===_e&&Ne.Dj===_e.Dj||ae++}else for(Pe=ne-1;Pe>ce;Pe--)Ne=b[Pe],Ne.near===_e&&Ne.Dj===_e.Dj||ae++;var Ge;if(0<=x)for(ce=b[ne].sourceEdgesArrayAccess,_e=0;_e<ce.length;_e++){var Ye=ce[_e];if(Ye.valid&&Ye.fromVertex.layer!==y)for(Ne=Ye.fromVertex.index,Pe=Ye.portToPos,Ye=Ye.portFromPos,Ge=_e+1;Ge<ce.length;Ge++){var Qe=ce[Ge];if(Qe.valid&&Qe.fromVertex.layer!==y){var at=Qe.fromVertex.index,Ct=Qe.portToPos;Qe=Qe.portFromPos,Pe<Ct&&(Ne>at||Ne===at&&Ye>Qe)&&ae++,Ct<Pe&&(at>Ne||at===Ne&&Qe>Ye)&&ae++}}}if(0>=x){for(ce=b[ne].destinationEdgesArrayAccess,_e=0;_e<ce.length;_e++)if(Ye=ce[_e],Ye.valid&&Ye.toVertex.layer!==y)for(Ne=Ye.toVertex.index,Pe=Ye.portToPos,Ye=Ye.portFromPos,Ge=_e+1;Ge<ce.length;Ge++)Qe=ce[Ge],Qe.valid&&Qe.toVertex.layer!==y&&(at=Qe.toVertex.index,Ct=Qe.portToPos,Qe=Qe.portFromPos,Ye<Qe&&(Ne>at||Ne===at&&Pe>Ct)&&ae++,Qe<Ye&&(at>Ne||at===Ne&&Ct>Pe)&&ae++)}for(te[ne*E+ne]=ae,ce=ne+1;ce<E;ce++){var xt=0,Tt=0;if(0<=x){ae=b[ne].sourceEdgesArrayAccess;var Nt=b[ce].sourceEdgesArrayAccess;for(_e=0;_e<ae.length;_e++)if(Ye=ae[_e],Ye.valid&&Ye.fromVertex.layer!==y)for(Ne=Ye.fromVertex.index,Ye=Ye.portFromPos,Ge=0;Ge<Nt.length;Ge++)Qe=Nt[Ge],Qe.valid&&Qe.fromVertex.layer!==y&&(at=Qe.fromVertex.index,Qe=Qe.portFromPos,(Ne<at||Ne===at&&Ye<Qe)&&Tt++,(at<Ne||at===Ne&&Qe<Ye)&&xt++)}if(0>=x){for(ae=b[ne].destinationEdgesArrayAccess,Nt=b[ce].destinationEdgesArrayAccess,_e=0;_e<ae.length;_e++)if(Ye=ae[_e],Ye.valid&&Ye.toVertex.layer!==y)for(Ne=Ye.toVertex.index,Pe=Ye.portToPos,Ge=0;Ge<Nt.length;Ge++)Qe=Nt[Ge],Qe.valid&&Qe.toVertex.layer!==y&&(at=Qe.toVertex.index,Ct=Qe.portToPos,(Ne<at||Ne===at&&Pe<Ct)&&Tt++,(at<Ne||at===Ne&&Ct<Pe)&&xt++)}te[ne*E+ce]=xt,te[ce*E+ne]=Tt}}return _d(a,y,b),te}Mo.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 E0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,te=wd(b,E),ne=b.tc[E],ae=0,ce=0;ce<ne;ce++){var _e=te[ce].destinationEdgesArrayAccess;if(_e!==null)for(var Pe=0;Pe<_e.length;Pe++){var Ne=_e[Pe];if(Ne.valid&&Ne.toVertex.layer!==E){var Ge=Ne.fromVertex.column+Ne.portFromColOffset,Ye=Ne.toVertex.column+Ne.portToColOffset;ae+=(Math.abs(Ge-Ye)+1)*gy(Ne)}}}_d(b,E,te),y+=ae}return y}Mo.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=wd(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var ae=b[ne],ce=null;0>=x&&(ce=ae.sourceEdgesArrayAccess);var _e=null;0<=x&&(_e=ae.destinationEdgesArrayAccess);var Pe=0,Ne=0,Ge=ae.near;if(Ge!==null&&Ge.layer===ae.layer&&(Pe+=Ge.column-1,Ne++),ce!==null)for(Ge=0;Ge<ce.length;Ge++){ae=ce[Ge];var Ye=ae.fromVertex;ae.valid&&!ae.rev&&Ye.layer!==y&&(Pe+=Ye.column,Ne++)}if(_e!==null)for(ce=0;ce<_e.length;ce++)ae=_e[ce],Ge=ae.toVertex,ae.valid&&!ae.rev&&Ge.layer!==y&&(Pe+=Ge.column,Ne++);te[ne]=Ne===0?-1:Pe/Ne}return _d(a,y,b),te}function WS(a,y,x){for(var b=wd(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var ae=b[ne],ce=null;0>=x&&(ce=ae.sourceEdgesArrayAccess);var _e=null;0<=x&&(_e=ae.destinationEdgesArrayAccess);var Pe=0,Ne=[],Ge=ae.near;if(Ge!==null&&Ge.layer===ae.layer&&(Ne[Pe]=Ge.column-1,Pe++),ae=void 0,ce!==null)for(Ge=0;Ge<ce.length;Ge++){ae=ce[Ge];var Ye=ae.fromVertex;ae.valid&&!ae.rev&&Ye.layer!==y&&(Ne[Pe]=Ye.column+ae.portFromColOffset,Pe++)}if(_e!==null)for(ce=0;ce<_e.length;ce++)ae=_e[ce],Ge=ae.toVertex,ae.valid&&!ae.rev&&Ge.layer!==y&&(Ne[Pe]=Ge.column+ae.portToColOffset,Pe++);Pe===0?te[ne]=-1:(Ne.sort(function(Qe,at){return Qe-at}),_e=Pe>>1,te[ne]=Pe&1?Ne[_e]:Ne[_e-1]+Ne[_e]>>1)}return _d(a,y,b),te}function Gg(a,y,x,b,E,te){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();){var ae=ne.value,ce=ae.toVertex,_e=y.layer-ce.layer;ae=a.linkMinLength(ae),_e===ae&&Gg(a,ce,x,b,E,te)}if(te)for(ne=y.sourceEdges;ne.next();)ae=ne.value,ce=ae.fromVertex,_e=ce.layer-y.layer,ae=a.linkMinLength(ae),_e===ae&&Gg(a,ce,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)}}Mo.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=KS(a);E!==null;)b[x]=E,x--,E.valid=!1,E=KS(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 ae=ne.value;if(ae.valid){for(var ce=0,_e=ae.destinationEdges;_e.next();)_e.value.toVertex.valid&&ce++;_e=0;for(var Pe=ae.sourceEdges;Pe.next();)Pe.value.fromVertex.valid&&_e++;(E===null||te<ce-_e)&&(E=ae,te=ce-_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 T0: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 Wg: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 KS(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++}Mo.prototype.assignLayers=function(){switch(this.Zk){case wy:ZS(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 A0:for(ZS(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 ZS(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],ae=ne.fromVertex,ce=ne.toVertex;ne=a.linkMinLength(ne),ae.layer-ce.layer>ne&&Gg(a,ae,0,-1,!0,!1)}for(Gg(a,y,1,-1,!0,!0);y.component!==0;){for(te=0,b=1/0,ae=0,ce=null,ne=a.network.vertexes.iterator;ne.next();){var _e=ne.value;if(_e.component===1){var Pe=0,Ne=!1,Ge=_e.sourceEdgesArrayAccess;E=Ge.length;for(var Ye=0;Ye<E;Ye++){var Qe=Ge[Ye],at=Qe.fromVertex;Pe+=1,at.component!==1&&(te+=1,at=at.layer-_e.layer,Qe=a.linkMinLength(Qe),b=Math.min(b,at-Qe))}for(Ge=_e.destinationEdgesArrayAccess,E=Ge.length,Ye=0;Ye<E;Ye++)Qe=Ge[Ye].toVertex,--Pe,Qe.component!==1?--te:Ne=!0;(ce===null||Pe<ae)&&!Ne&&(ce=_e,ae=Pe)}}if(0<te){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer+=b);y.component=0}else ce.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(Gg(a,y,1,-1,!0,!1);y.component!==0;){for(b=0,E=1/0,te=0,ae=null,ce=a.network.vertexes.iterator;ce.next();)if(ne=ce.value,ne.component===1){for(_e=0,Pe=!1,Ge=ne.sourceEdgesArrayAccess,Ne=Ge.length,Ye=0;Ye<Ne;Ye++)Qe=Ge[Ye].fromVertex,_e+=1,Qe.component!==1?b+=1:Pe=!0;for(Ge=ne.destinationEdgesArrayAccess,Ne=Ge.length,Ye=0;Ye<Ne;Ye++)Qe=Ge[Ye],at=Qe.toVertex,--_e,at.component!==1&&(--b,at=ne.layer-at.layer,Qe=a.linkMinLength(Qe),E=Math.min(E,at-Qe));(ae===null||_e>te)&&!Pe&&(ae=ne,te=_e)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else ae.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}Mo.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 N0: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))}Mo.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=kl(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)L0(this,b,1),Du(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=kl(this)),b=this.Ia;0<=b;b--)L0(this,b,-1),Du(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=kl(this))}for(xu(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)L0(this,b,0),Du(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=kl(this)),b=this.Ia;0<=b;b--)L0(this,b,0),Du(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=kl(this))}xu(this,y);var te,ne,ae;switch(this.rk){case Cy:break;case Ey:for(ae=a+1;(b=this.countCrossings())<ae;)for(ae=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=Du(this,b,-1)||te;for(E=this.countCrossings(),E>=a?xu(this,y):(a=E,y=kl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Du(this,b,1)||te;for(E=this.countCrossings(),E>=a?xu(this,y):(a=E,y=kl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Du(this,b,1)||te;for(E>=a?xu(this,y):(a=E,y=kl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Du(this,b,-1)||te;for(E>=a?xu(this,y):(a=E,y=kl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Du(this,b,0)||te;for(E>=a?xu(this,y):(a=E,y=kl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Du(this,b,0)||te;E>=a?xu(this,y):(a=E,y=kl(this))}break;default:case D0:for(x=this.Ia,ne=0,ae=a+1;(b=this.countCrossings())<ae;){for(ae=b,te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Du(this,b,-1)||te;for(E=this.countCrossings(),E>=a?xu(this,y):(a=E,y=kl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Du(this,b,1)||te;for(E=this.countCrossings(),E>=a?xu(this,y):(a=E,y=kl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Du(this,b,1)||te;for(E>=a?xu(this,y):(a=E,y=kl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Du(this,b,-1)||te;for(E>=a?xu(this,y):(a=E,y=kl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Du(this,b,0)||te;for(E>=a?xu(this,y):(a=E,y=kl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Du(this,b,0)||te;E>=a?xu(this,y):(a=E,y=kl(this))}}xu(this,y)};function L0(a,y,x){var b=wd(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 ae=!0,ce;ae;)for(ae=!1,x=0;x<E-1;x++)(te[x+1]<te[x]||te[x+1]===te[x]&&ne[x+1]<ne[x])&&(ae=!0,ce=te[x],te[x]=te[x+1],te[x+1]=ce,ce=ne[x],ne[x]=ne[x+1],ne[x+1]=ce,ce=b[x],b[x]=b[x+1],b[x+1]=ce);for(x=te=0;x<E;x++)ce=b[x],ce.index=x,te+=a.nodeMinColumnSpace(ce,!0),ce.column=te,te+=1,te+=a.nodeMinColumnSpace(ce,!1);_d(a,y,b)}function Du(a,y,x){var b=wd(a,y),E=a.tc[y];x=GS(a,y,x);var te,ne=[];for(te=0;te<E;te++)ne[te]=-1;var ae=[];for(te=0;te<E;te++)ae[te]=-1;for(var ce=!1,_e=!0;_e;)for(_e=!1,te=0;te<E-1;te++){var Pe=x[b[te].index*E+b[te+1].index],Ne=x[b[te+1].index*E+b[te].index],Ge=0,Ye=0,Qe=b[te].column,at=b[te+1].column,Ct=a.nodeMinColumnSpace(b[te],!0),xt=a.nodeMinColumnSpace(b[te],!1),Tt=a.nodeMinColumnSpace(b[te+1],!0),Nt=a.nodeMinColumnSpace(b[te+1],!1);Ct=Qe-Ct+Tt,xt=at-xt+Nt;var It=b[te].sourceEdges.iterator;for(It.reset();It.next();)if(Tt=It.value,Nt=Tt.fromVertex,Tt.valid&&Nt.layer===y){for(Tt=0;b[Tt]!==Nt;)Tt++;Tt<te&&(Ge+=2*(te-Tt),Ye+=2*(te+1-Tt)),Tt===te+1&&(Ge+=1),Tt>te+1&&(Ge+=4*(Tt-te),Ye+=4*(Tt-(te+1)))}for(It=b[te].destinationEdges.iterator,It.reset();It.next();)if(Tt=It.value,Nt=Tt.toVertex,Tt.valid&&Nt.layer===y){for(Tt=0;b[Tt]!==Nt;)Tt++;Tt===te+1&&(Ye+=1)}for(It=b[te+1].sourceEdges.iterator,It.reset();It.next();)if(Tt=It.value,Nt=Tt.fromVertex,Tt.valid&&Nt.layer===y){for(Tt=0;b[Tt]!==Nt;)Tt++;Tt<te&&(Ge+=2*(te+1-Tt),Ye+=2*(te-Tt)),Tt===te&&(Ye+=1),Tt>te+1&&(Ge+=4*(Tt-(te+1)),Ye+=4*(Tt-te))}for(It=b[te+1].destinationEdges.iterator,It.reset();It.next();)if(Tt=It.value,Nt=Tt.toVertex,Tt.valid&&Nt.layer===y){for(Tt=0;b[Tt]!==Nt;)Tt++;Tt===te&&(Ge+=1)}Tt=Nt=0,It=ne[b[te].index];var Zt=ae[b[te].index],un=ne[b[te+1].index],$n=ae[b[te+1].index];It!==-1&&(Nt+=Math.abs(It-Qe),Tt+=Math.abs(It-xt)),Zt!==-1&&(Nt+=Math.abs(Zt-Qe),Tt+=Math.abs(Zt-xt)),un!==-1&&(Nt+=Math.abs(un-at),Tt+=Math.abs(un-Ct)),$n!==-1&&(Nt+=Math.abs($n-at),Tt+=Math.abs($n-Ct)),(Ye<Ge-.5||Ye===Ge&&Ne<Pe-.5||Ye===Ge&&Ne===Pe&&Tt<Nt-.5)&&(_e=ce=!0,b[te].column=xt,b[te+1].column=Ct,Pe=b[te],b[te]=b[te+1],b[te+1]=Pe)}for(te=0;te<E;te++)b[te].index=te;return _d(a,y,b),ce}Mo.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=kp(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=kp(this,y,-1)||x;x=kp(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=kp(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=kp(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=kp(this,y,0)||x}}else Wx(this)};function kp(a,y,x){for(var b=!1;Ux(a,y,x);)b=!0;return b}function Ux(a,y,x){var b,E=wd(a,y),te=a.tc[y],ne=my(a,y,-1);if(0<x)for(b=0;b<te;b++)ne[b]=-1;var ae=my(a,y,1);if(0>x)for(b=0;b<te;b++)ae[b]=-1;for(var ce=!1,_e=!0;_e;)for(_e=!1,b=0;b<te;b++){var Pe=E[b].column,Ne=a.nodeMinColumnSpace(E[b],!0),Ge=a.nodeMinColumnSpace(E[b],!1),Ye=0;0>b-1||Pe-E[b-1].column-1>Ne+a.nodeMinColumnSpace(E[b-1],!1)?Ye=Pe-1:Ye=Pe,Ne=b+1>=te||E[b+1].column-Pe-1>Ge+a.nodeMinColumnSpace(E[b+1],!0)?Pe+1:Pe;var Qe=Ge=0,at=0;if(0>=x)for(var Ct=E[b].sourceEdges.iterator;Ct.next();){var xt=Ct.value,Tt=xt.fromVertex;if(xt.valid&&Tt.layer!==y){var Nt=gy(xt),It=xt.portFromColOffset;xt=xt.portToColOffset,Tt=Tt.column,Ge+=(Math.abs(Pe+xt-(Tt+It))+1)*Nt,Qe+=(Math.abs(Ye+xt-(Tt+It))+1)*Nt,at+=(Math.abs(Ne+xt-(Tt+It))+1)*Nt}}if(0<=x)for(Ct=E[b].destinationEdges.iterator;Ct.next();)xt=Ct.value,Tt=xt.toVertex,xt.valid&&Tt.layer!==y&&(Nt=gy(xt),It=xt.portFromColOffset,xt=xt.portToColOffset,Tt=Tt.column,Ge+=(Math.abs(Pe+It-(Tt+xt))+1)*Nt,Qe+=(Math.abs(Ye+It-(Tt+xt))+1)*Nt,at+=(Math.abs(Ne+It-(Tt+xt))+1)*Nt);xt=It=Nt=0,Ct=ne[E[b].index],Tt=ae[E[b].index],Ct!==-1&&(Nt+=Math.abs(Ct-Pe),It+=Math.abs(Ct-Ye),xt+=Math.abs(Ct-Ne)),Tt!==-1&&(Nt+=Math.abs(Tt-Pe),It+=Math.abs(Tt-Ye),xt+=Math.abs(Tt-Ne)),Qe<Ge||Qe===Ge&&It<Nt?(_e=ce=!0,E[b].column=Ye):(at<Ge||at===Ge&&xt<Nt)&&(_e=ce=!0,E[b].column=Ne)}return _d(a,y,E),a.normalize(),ce}function Sy(a,y,x){var b=wd(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 ae=b[x].column,ce=a.nodeMinColumnSpace(b[x],!0),_e=a.nodeMinColumnSpace(b[x],!1),Pe=0;if(ne[x]===-1)if(x===0&&x===E-1)Pe=ae;else if(x===0){var Ne=b[x+1].column;Ne-ae===_e+a.nodeMinColumnSpace(b[x+1],!0)?Pe=ae-1:Pe=ae}else x===E-1?(Ne=b[x-1].column,Pe=ae-Ne===ce+a.nodeMinColumnSpace(b[x-1],!1)?ae+1:ae):(Ne=b[x-1].column,ce=Ne+a.nodeMinColumnSpace(b[x-1],!1)+ce+1,Ne=b[x+1].column,_e=Ne-a.nodeMinColumnSpace(b[x+1],!0)-_e-1,Pe=(ce+_e)/2|0);else x===0&&x===E-1?Pe=ne[x]:x===0?(Ne=b[x+1].column,_e=Ne-a.nodeMinColumnSpace(b[x+1],!0)-_e-1,Pe=Math.min(ne[x],_e)):x===E-1?(Ne=b[x-1].column,ce=Ne+a.nodeMinColumnSpace(b[x-1],!1)+ce+1,Pe=Math.max(ne[x],ce)):(Ne=b[x-1].column,ce=Ne+a.nodeMinColumnSpace(b[x-1],!1)+ce+1,Ne=b[x+1].column,_e=Ne-a.nodeMinColumnSpace(b[x+1],!0)-_e-1,ce<ne[x]&&ne[x]<_e?Pe=ne[x]:ce>=ne[x]?Pe=ce:_e<=ne[x]&&(Pe=_e));Pe!==ae&&(te=!0,b[x].column=Pe)}_d(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 ae=b.column-a.nodeMinColumnSpace(b,!0),ce=b.column+a.nodeMinColumnSpace(b,!1);ae<=y&&ce>=y&&(E[b.layer]=!0),ae<=x&&ce>=x&&(te[b.layer]=!0)}for(ae=!0,x=!1,b=0;b<=a.Ia;b++)ae=ae&&!(E[b]&&te[b]);if(ae)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=kl(a),te=E0(a);for(b=te+1;te<b;){b=te,tx(a,x,1);var ne=E0(a);ne>te?xu(a,E):ne<te&&(te=ne,E=kl(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=kl(a),te=E0(a),b=te+1;te<b;)b=te,tx(a,x,-1),ne=E0(a),ne>te?xu(a,E):ne<te&&(te=ne,E=kl(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,ae=Math.max(0,te.column-a.nodeMinColumnSpace(te,!0)),ce=Math.min(a.Ra,te.column+a.nodeMinColumnSpace(te,!1));ae<=ce;ae++)E[ne*(a.Ra+1)+ae]=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(ce=ne[ne.length-1],ne.pop(),E[ce])for(E[ce]=!1,te=0;te<a.le;te++)y[ce*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=Ti(),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 Ut,Kx(y,x);var te=null,ne=null,ae=null,ce=null,_e=(a.ve&1)!==0,Pe=(a.ve&2)!==0,Ne=(a.ve&4)!==0,Ge=(a.ve&8)!==0;for(_e&&(a.verticalAlignment(y,x,!0),te=M0(a,y,!0,!1)),y.reverse(),Ne&&(a.verticalAlignment(y,x,!1),ae=M0(a,y,!1,!1)),b=In(y),E=b.next();!E.done;E=b.next())E.value.reverse();Ge&&(a.verticalAlignment(y,x,!1),ce=M0(a,y,!1,!0)),y.reverse(),Pe&&(a.verticalAlignment(y,x,!0),ne=M0(a,y,!0,!0)),bi(y),a.u(te,ne,ae,ce),a.network.vertexes.each(function(Ye){var Qe=Ti();_e&&Qe.push(te.get(Ye)),Pe&&Qe.push(ne.get(Ye)),Ne&&Qe.push(ae.get(Ye)),Ge&&Qe.push(ce.get(Ye)),Qe.sort(function(Ct,xt){return Ct-xt});var at=Qe.length;at=(Qe[Math.floor((at-1)/2)]+Qe[Math.ceil((at-1)/2)])/2,bi(Qe),Ye.zc=at})}function Kx(a,y){for(var x=a.length,b=1;b<x-1;b++)for(var E=0,te=0,ne=a[b],ae=a[b+1],ce=0;te<ae.length;ce++){var _e=ae[ce];e:{if(_e.node===null){var Pe=Ly(_e);if(0<Pe.length){Pe=Pe[0].node===null;break e}}Pe=!1}var Ne=Pe;if(ce===ae.length-1||Ne){for(Pe=ne.length-1,Ne&&(Pe=Ly(_e)[0].index);te<=ce;){if(_e=ae[te],!_e.bo){Ne=[];for(var Ge=In(_e.sourceEdgesArrayAccess),Ye=Ge.next();!Ye.done;Ye=Ge.next())Ye=Ye.value,Ye.valid&&Ne.push(Ye);_e.bo=Ne}for(_e=In(_e.bo),Ne=_e.next();!Ne.done;Ne=_e.next())Ne=Ne.value,Ge=Ne.fromVertex.index,(Ge<E||Ge>Pe)&&y.add(Ne);te++}E=Pe}}}Mo.prototype.verticalAlignment=function(a,y,x){Vx(a),a=In(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=In(b.value);for(var te=b.next();!te.done;te=b.next()){te=te.value;var ne=x?Ly(te):Xx(te),ae=ne.length;if(0<ae){ne.sort(function(Ne,Ge){return Ne.vi-Ge.vi});var ce=(ae-1)/2;for(ae=Math.floor(ce),ce=Math.ceil(ce);ae<=ce;ae++)if(te.align===te){var _e=ne[ae],Pe=void 0;Pe=x?O0(_e,te):O0(te,_e),!y.contains(Pe)&&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 M0(a,y,x,b){for(var E=a.K===90||a.K===270,te=In(y),ne=te.next();!ne.done;ne=te.next()){var ae=In(ne.value);for(ne=ae.next();!ne.done;ne=ae.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=In(y),ae=te.next();!ae.done;ae=te.next()){ae=In(ae.value);for(var ce=ae.next();!ce.done;ce=ae.next())if(ce=ce.value,ce.root===ce){for(var _e=0,Pe=ce;Pe.align!==ce;){var Ne=Pe.align,Ge=ne?Pe.width:Pe.height,Ye=ne?Ne.width:Ne.height;if(x){var Qe=O0(Pe,Ne),at=Qe.portFromPos,Ct=Qe.portToPos;Qe.link!==null&&(Pe.node&&Pe.node!==Qe.link.fromNode&&(at=ne?Pe.focusX:Pe.focusY),Ne.node&&Ne.node!==Qe.link.toNode&&(Ct=ne?Ne.focusX:Ne.focusY))}else Qe=O0(Ne,Pe),at=Qe.portToPos,Ct=Qe.portFromPos,Qe.link!==null&&(Pe.node&&Pe.node!==Qe.link.toNode&&(at=ne?Pe.focusX:Pe.focusY),Ne.node&&Ne.node!==Qe.link.fromNode&&(Ct=ne?Ne.focusX:Ne.focusY));Ge=b?Pe.qg+(Ge-at)-(Ye-Ct):Pe.qg+at-Ct,Ne.qg=Ge,_e=Math.min(_e,Ge),Pe=Pe.align}Pe=ce;do Pe.qg=Pe.qg-_e,Pe=Pe.align;while(Pe!==ce)}}for(x=In(y),ne=x.next();!ne.done;ne=x.next())for(te=In(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,ae=0;do{for(te=y[ne][ae];te.align!==te.root;)te=te.align,ne++,0<te.vi&&(ae=ix(te,y),ae.sd.shift=Math.min(ae.sd.shift,te.sd.shift+te.zc+te.qg-(ae.zc+ae.qg+(E?ae.width:ae.height)+a.columnSpacing)));ae=te.vi+1}while(ne<y.length&&ae<y[ne].length&&te.sd===y[ne][ae].sd)}for(a=new Dn,y=In(y),ne=y.next();!ne.done;ne=y.next())for(x=In(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&&rn("Could not determine previous vertex in layer"),y[x][a-1]}Mo.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=Ti(),E=Ti(),te=1/0,ne=0;4>ne;ne++)if(y[ne]){var ae=Zx(this,y[ne],b,E,ne);ae<te&&(x=ne,te=ae)}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(ce){return function(_e){_e.value+=ce.delta}}(te)));bi(b),bi(E)};function Zx(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(ae){var ce=ae.key;ae=ae.value,ce=a.K===90||a.K===270?ce.width:ce.height,ae<te&&(te=ae),ae+ce>ne&&(ne=ae+ce)}),x[E]=te,b[E]=ne,ne-te}Mo.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=k0(this,!0),y=k0(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 k0(a,y){return a.K===270?y?Ja:Aa:a.K===90?y?Aa:Ja:a.K===180?y?Ua:xa:y?xa:Ua}Mo.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,ae=-1/0;a.next();){var ce=a.value,_e=ce.layer,Pe=ce.column|0;b?(ne=y.x+this.kc*Pe,_e=this.Kd[_e]):(ne=this.Kd[_e],_e=y.y+this.kc*Pe),ce.centerX=ne,ce.centerY=_e,x&&isFinite(ce.zc)&&(b?ce.node?ce.x=y.x+ce.zc:ce.centerX=y.x+ce.zc:ce.node?ce.y=y.y+ce.zc:ce.centerY=y.y+ce.zc),te=Math.min(ce.x,te),E=Math.min(ce.y,E),b?(ne=te,ae=Math.max(ae,ce.bounds.right)):(ne=E,ae=Math.max(ae,ce.bounds.bottom))}for(this.xw=ae-ne,te=y.x-te,y=y.y-E,this.Rf=new vt(x&&b?0:te,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=te,x.y+=y,x.commit()},Mo.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 pn(0,0,x,Math.abs(this.Ta[0]))):y.push(new pn(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new pn(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new pn(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new pn(0,0,Math.abs(this.Ta[0]),x)):y.push(new pn(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new pn(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new pn(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},Mo.prototype.commitLayers=function(){},Mo.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,ae=b.toPort;if(E!==null){var ce=E.findVisibleNode();ce!==null&&ce!==E&&(E=ce,ne=ce.port)}te!==null&&(ce=te.findVisibleNode(),ce!==null&&ce!==te&&(te=ce,ae=ce.port));var _e=y.computeSpot(!0,ne);ce=y.computeSpot(!1,ae);var Pe=x.fromVertex,Ne=x.toVertex;if(x.valid)y.curve===lu&&y.pointsCount===4&&(Pe.column===Ne.column&&this.alignOption===0?(x=y.getLinkPoint(E,ne,_e,!0,!1,te,ae),ae=y.getLinkPoint(te,ae,ce,!1,!1,E,ne),x.w()||x.set(E.actualBounds.center),ae.w()||ae.set(te.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+ae.x)/3,(2*x.y+ae.y)/3),y.yf((x.x+2*ae.x)/3,(x.y+2*ae.y)/3),y.yf(ae.x,ae.y)):(x=b=!1,ne!==null&&_e===xs&&(b=!0),ae!==null&&ce===xs&&(x=!0),(b||x)&&(ce=null,b&&(ce=y.getLinkPointFromPoint(E,ne,ne.ga(Hr),y.i(3),!0),ce.w()||ce.set(E.actualBounds.center),y.L(0,ce.x,ce.y)),E=null,x&&(E=y.getLinkPointFromPoint(te,ae,ae.ga(Hr),y.i(0),!1),E.w()||E.set(te.actualBounds.center),y.L(3,E.x,E.y)),ce&&(te=y.i(2),y.L(1,(2*ce.x+te.x)/3,(2*ce.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(Pe.layer===Ne.layer)y.zf();else{var Ge=!1,Ye=!1,Qe=this.ie,at=y.firstPickIndex+1;if(y.isOrthogonal){Ye=!0;var Ct=y.pointsCount;4<Ct&&y.points.removeRange(2,Ct-3)}else if(y.curve===lu)Ge=!0,Ct=y.pointsCount,4<Ct&&y.points.removeRange(2,Ct-3),Ct===4&&(at=2);else{Ct=y.pointsCount;var xt=_e===xs,Tt=ce===xs;2<Ct&&xt&&Tt?y.points.removeRange(1,Ct-2):3<Ct&&xt&&!Tt?y.points.removeRange(1,Ct-3):3<Ct&&!xt&&Tt?y.points.removeRange(2,Ct-2):4<Ct&&!xt&&!Tt&&y.points.removeRange(2,Ct-3)}if(x.rev){for(;Ne!==null&&Pe!==Ne;){var Nt=Ct=null;for(xt=Ne.sourceEdges.iterator;xt.next()&&(Tt=xt.value,Tt.link!==x.link||(Ct=Tt.fromVertex,Nt=Tt.toVertex,Ct.node!==null)););if(Ct===null)break;if(Ct!==Pe){xt=y.i(at-1).x,Tt=y.i(at-1).y;var It=Ct.centerX,Zt=Ct.centerY;if(Ye)this.K===180||this.K===0?at===y.firstPickIndex+1?(y.m(at++,xt,Tt),y.m(at++,xt,Zt)):(Nt!==null?Nt.centerY:Tt)!==Zt&&(Nt=this.Ta[Ct.layer-1]+this.Rf.x,y.m(at++,Nt,Tt),y.m(at++,Nt,Zt)):at===y.firstPickIndex+1?(y.m(at++,xt,Tt),y.m(at++,It,Tt)):(Nt!==null?Nt.centerX:xt)!==It&&(Nt=this.Ta[Ct.layer-1]+this.Rf.y,y.m(at++,xt,Nt),y.m(at++,It,Nt));else if(at===y.firstPickIndex+1){Nt=Math.max(10,this.he[Ne.layer]);var un=Math.max(10,this.Ld[Ne.layer]);if(Ge)this.K===180?It<=Ne.bounds.x?(Ne=Ne.bounds.x,y.m(at++,Ne-Nt,Zt),y.m(at++,Ne,Zt),y.m(at++,Ne+un,Zt)):(y.m(at++,It-Nt,Zt),y.m(at++,It,Zt),y.m(at++,It+un,Zt)):this.K===90?Zt>=Ne.bounds.bottom?(Ne=Ne.bounds.y+Ne.bounds.height,y.m(at++,It,Ne+un),y.m(at++,It,Ne),y.m(at++,It,Ne-Nt)):(y.m(at++,It,Zt+un),y.m(at++,It,Zt),y.m(at++,It,Zt-Nt)):this.K===270?Zt<=Ne.bounds.y?(Ne=Ne.bounds.y,y.m(at++,It,Ne-Nt),y.m(at++,It,Ne),y.m(at++,It,Ne+un)):(y.m(at++,It,Zt-Nt),y.m(at++,It,Zt),y.m(at++,It,Zt+un)):this.K===0&&(It>=Ne.bounds.right?(Ne=Ne.bounds.x+Ne.bounds.width,y.m(at++,Ne+un,Zt),y.m(at++,Ne,Zt),y.m(at++,Ne-Nt,Zt)):(y.m(at++,It+un,Zt),y.m(at++,It,Zt),y.m(at++,It-Nt,Zt)));else{y.m(at++,xt,Tt);var $n=0;this.K===180||this.K===0?((this.K===180?It>=Ne.bounds.right:It<=Ne.bounds.x)&&($n=(this.K===0?-Nt:un)/2),y.m(at++,xt+$n,Zt)):((this.K===270?Zt>=Ne.bounds.bottom:Zt<=Ne.bounds.y)&&($n=(this.K===90?-Nt:un)/2),y.m(at++,It,Tt+$n)),y.m(at++,It,Zt)}}else Nt=Math.max(10,this.he[Ct.layer]),un=Math.max(10,this.Ld[Ct.layer]),Ge?this.K===180?(y.m(at++,It-Nt-Qe,Zt),y.m(at++,Math.min(It-Nt+Qe/2,It),Zt),y.m(at++,It,Zt),y.m(at++,It,Zt),y.m(at++,Math.max(It+un-Qe/2,It),Zt),y.m(at++,It+un+Qe,Zt)):this.K===90?(y.m(at++,It,Zt+un+Qe),y.m(at++,It,Math.max(Zt+un-Qe/2,Zt)),y.m(at++,It,Zt),y.m(at++,It,Zt),y.m(at++,It,Math.min(Zt-Nt+Qe/2,Zt)),y.m(at++,It,Zt-Nt-Qe)):this.K===270?(y.m(at++,It,Zt-Nt-Qe),y.m(at++,It,Math.min(Zt-Nt+Qe/2,Zt)),y.m(at++,It,Zt),y.m(at++,It,Zt),y.m(at++,It,Math.max(Zt+un-Qe/2,Zt)),y.m(at++,It,Zt+un+Qe)):(y.m(at++,It+un+Qe,Zt),y.m(at++,Math.max(It+un-Qe/2,It),Zt),y.m(at++,It,Zt),y.m(at++,It,Zt),y.m(at++,Math.min(It-Nt+Qe/2,It),Zt),y.m(at++,It-Nt-Qe,Zt)):y.m(at++,It,Zt)}Ne=Ct}(ae===null||_e!==xs||Ye)&&(xt=y.i(at-1).x,Tt=y.i(at-1).y,It=y.i(at).x,Zt=y.i(at).y,Ye?(Qe=this.Ld[Pe.layer],this.K===180||this.K===0?(Ye=Tt,Ye>=Pe.bounds.y&&Ye<=Pe.bounds.bottom&&(this.K===180?It>=Pe.bounds.x:It<=Pe.bounds.right)&&(Ne=Pe.centerX+(this.K===180?-Qe:Qe),Ye<Pe.bounds.y+Pe.bounds.height/2?Ye=Pe.bounds.y-this.kc/2:Ye=Pe.bounds.bottom+this.kc/2,y.m(at++,Ne,Tt),y.m(at++,Ne,Ye)),y.m(at++,It,Ye)):(Ye=xt,Ye>=Pe.bounds.x&&Ye<=Pe.bounds.right&&(this.K===270?Zt>=Pe.bounds.y:Zt<=Pe.bounds.bottom)&&(Ne=Pe.centerY+(this.K===270?-Qe:Qe),Ye<Pe.bounds.x+Pe.bounds.width/2?Ye=Pe.bounds.x-this.kc/2:Ye=Pe.bounds.right+this.kc/2,y.m(at++,xt,Ne),y.m(at++,Ye,Ne)),y.m(at++,Ye,Zt)),y.m(at++,It,Zt)):Ge?(Nt=Math.max(10,this.he[Pe.layer]),un=Math.max(10,this.Ld[Pe.layer]),this.K===180&&It>=Pe.bounds.x?(Ne=Pe.bounds.x+Pe.bounds.width,y.L(at-2,Ne,Tt),y.L(at-1,Ne+un,Tt)):this.K===90&&Zt<=Pe.bounds.bottom?(Ne=Pe.bounds.y,y.L(at-2,xt,Ne),y.L(at-1,xt,Ne-Nt)):this.K===270&&Zt>=Pe.bounds.y?(Ne=Pe.bounds.y+Pe.bounds.height,y.L(at-2,xt,Ne),y.L(at-1,xt,Ne+un)):this.K===0&&It<=Pe.bounds.right&&(Ne=Pe.bounds.x,y.L(at-2,Ne,Tt),y.L(at-1,Ne-Nt,Tt))):(Nt=Math.max(10,this.he[Pe.layer]),un=Math.max(10,this.Ld[Pe.layer]),Ye=0,this.K===180||this.K===0?((this.K===180?It<=Pe.bounds.x:It>=Pe.bounds.right)&&(Ye=(this.K===0?un:-Nt)/2),y.m(at++,It+Ye,Tt)):((this.K===270?Zt<=Pe.bounds.y:Zt>=Pe.bounds.bottom)&&(Ye=(this.K===90?un:-Nt)/2),y.m(at++,xt,Zt+Ye)),y.m(at++,It,Zt)))}else{for(;Pe!==null&&Pe!==Ne;){for(Nt=Ct=null,Pe=Pe.destinationEdges.iterator;Pe.next()&&(xt=Pe.value,xt.link!==x.link||(Ct=xt.toVertex,Nt=xt.fromVertex,Nt.node!==null&&(Nt=null),Ct.node!==null)););if(Ct===null)break;Ct!==Ne&&(xt=y.i(at-1).x,Tt=y.i(at-1).y,It=Ct.centerX,Zt=Ct.centerY,Ye?this.K===180||this.K===0?(Nt!==null?Nt.centerY:Tt)!==Zt&&(Nt=this.Ta[Ct.layer]+this.Rf.x,at===y.firstPickIndex+1&&(Nt=this.K===0?Math.max(Nt,xt):Math.min(Nt,xt)),y.m(at++,Nt,Tt),y.m(at++,Nt,Zt)):(Nt!==null?Nt.centerX:xt)!==It&&(Nt=this.Ta[Ct.layer]+this.Rf.y,at===y.firstPickIndex+1&&(Nt=this.K===90?Math.max(Nt,Tt):Math.min(Nt,Tt)),y.m(at++,xt,Nt),y.m(at++,It,Nt)):(Nt=Math.max(10,this.he[Ct.layer]),un=Math.max(10,this.Ld[Ct.layer]),Ge?this.K===180?(y.m(at++,It+un+Qe,Zt),y.m(at++,Math.max(It+un-Qe/2,It),Zt),y.m(at++,It,Zt),y.m(at++,It,Zt),y.m(at++,Math.min(It-Nt+Qe/2,It),Zt),y.m(at++,It-Nt-Qe,Zt)):this.K===90?(y.m(at++,It,Zt-Nt-Qe),y.m(at++,It,Math.min(Zt-Nt+Qe/2,Zt)),y.m(at++,It,Zt),y.m(at++,It,Zt),y.m(at++,It,Math.max(Zt+un-Qe/2,Zt)),y.m(at++,It,Zt+un+Qe)):this.K===270?(y.m(at++,It,Zt+un+Qe),y.m(at++,It,Math.max(Zt+un-Qe/2,Zt)),y.m(at++,It,Zt),y.m(at++,It,Zt),y.m(at++,It,Math.min(Zt-Nt+Qe/2,Zt)),y.m(at++,It,Zt-Nt-Qe)):(y.m(at++,It-Nt-Qe,Zt),y.m(at++,Math.min(It-Nt+Qe/2,It),Zt),y.m(at++,It,Zt),y.m(at++,It,Zt),y.m(at++,Math.max(It+un-Qe/2,It),Zt),y.m(at++,It+un+Qe,Zt)):this.K===180?(y.m(at++,It+un,Zt),y.m(at++,It-Nt,Zt)):this.K===90?(y.m(at++,It,Zt-Nt),y.m(at++,It,Zt+un)):this.K===270?(y.m(at++,It,Zt+un),y.m(at++,It,Zt-Nt)):(y.m(at++,It-Nt,Zt),y.m(at++,It+un,Zt)))),Pe=Ct}Ye&&(xt=y.i(at-1).x,Tt=y.i(at-1).y,It=y.i(at).x,Zt=y.i(at).y,this.K===180||this.K===0?Tt!==Zt&&(Nt=this.K===0?Math.min(Math.max((It+xt)/2,this.Ta[Ne.layer]+this.Rf.x),It):Math.max(Math.min((It+xt)/2,this.Ta[Ne.layer]+this.Rf.x),It),y.m(at++,Nt,Tt),y.m(at++,Nt,Zt)):xt!==It&&(Nt=this.K===90?Math.min(Math.max((Zt+Tt)/2,this.Ta[Ne.layer]+this.Rf.y),Zt):Math.max(Math.min((Zt+Tt)/2,this.Ta[Ne.layer]+this.Rf.y),Zt),y.m(at++,xt,Nt),y.m(at++,It,Nt)))}b!==null&&Ge&&4<=y.pointsCount&&(ne!==null&&(ne=_e===xs?y.getLinkPointFromPoint(E,ne,ne.ga(Hr),y.i(3),!0):y.i(0),_e===xs&&(_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)),ae!==null&&(E=ce===xs?y.getLinkPointFromPoint(te,ae,ae.ga(Hr),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),ce===xs&&(ae=y.i(y.pointsCount-3),ce=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+ae.x)/2,ae.y),y.L(y.pointsCount-2,ce.x,(ae.y+ce.y)/2)):(y.L(y.pointsCount-2,ae.x,(E.y+ae.y)/2),y.L(y.pointsCount-3,(ae.x+ce.x)/2,ce.y))),E.w()||E.set(te.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},Mo.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new zn,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 ae=new bd;ae.layer=Math.floor(te.y/2);var ce=b.i(0),_e=b.i(b.pointsCount-1);if(ae.first=ce.x*ce.x+ce.y,ae.jc=_e.x*_e.x+_e.y,ae.rd=Math.min(te.x,ne.x),ae.Ic=Math.max(te.x,ne.x),ae.index=E,ae.link=b,E+2<b.pointsCount){ce=b.i(E-1),_e=b.i(E+2);var Pe=0;ce.y<te.y?Pe=_e.y<te.y?3:te.x<ne.x?2:1:ce.y>te.y&&(Pe=_e.y>te.y?0:ne.x<te.x?2:1),ae.j=Pe}x.push(ae)}}}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),Pe=1,ae=x[te].jc,ce=te;ce<E;ce++)_e=x[ce],_e.jc!==ae&&(Pe++,ae=_e.jc);this.zi(x,this.Ux,te,te+ne);var Ne=1;for(ae=x[te].first,ce=te;ce<E;ce++)_e=x[ce],_e.first!==ae&&(Ne++,ae=_e.first);for(ce=!0,_e=Ne,Pe<Ne?(ce=!1,_e=Pe,ae=x[te].jc,this.zi(x,this.Js,te,te+ne)):ae=x[te].first,Pe=0,Ne=te;Ne<E;Ne++){var Ge=x[Ne];(ce?Ge.first:Ge.jc)!==ae&&(Pe++,ae=ce?Ge.first:Ge.jc);var Ye=Ge.link;te=Ye.i(Ge.index),ne=Ye.i(Ge.index+1);var Qe=this.linkSpacing*(Pe-(_e-1)/2);y++,Ye.uh(),Ye.L(Ge.index,te.x,te.y+Qe),Ye.L(Ge.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)&&(ae=new bd,ae.layer=Math.floor(te.x/2),ce=b.i(0),_e=b.i(b.pointsCount-1),ae.first=ce.x+ce.y*ce.y,ae.jc=_e.x+_e.y*_e.y,ae.rd=Math.min(te.y,ne.y),ae.Ic=Math.max(te.y,ne.y),ae.index=E,ae.link=b,E+2<b.pointsCount&&(ce=b.i(E-1),_e=b.i(E+2),Pe=0,ce.x<te.x?Pe=_e.x<te.x?3:te.y<ne.y?2:1:ce.x>te.x&&(Pe=_e.x>te.x?0:ne.y<te.y?2:1),ae.j=Pe),x.push(ae));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),Pe=1,ae=x[te].jc,ce=te;ce<E;ce++)_e=x[ce],_e.jc!==ae&&(Pe++,ae=_e.jc);for(this.zi(x,this.Ux,te,te+ne),Ne=1,ae=x[te].first,ce=te;ce<E;ce++)_e=x[ce],_e.first!==ae&&(Ne++,ae=_e.first);for(ce=!0,_e=Ne,Pe<Ne?(ce=!1,_e=Pe,ae=x[te].jc,this.zi(x,this.Js,te,te+ne)):ae=x[te].first,Pe=0,Ne=te;Ne<E;Ne++)Ge=x[Ne],(ce?Ge.first:Ge.jc)!==ae&&(Pe++,ae=ce?Ge.first:Ge.jc),Ye=Ge.link,te=Ye.i(Ge.index),ne=Ye.i(Ge.index+1),Qe=this.linkSpacing*(Pe-(_e-1)/2),y++,Ye.uh(),Ye.L(Ge.index,te.x+Qe,te.y),Ye.L(Ge.index+1,ne.x+Qe,ne.y),Ye.zf()}te=E}a=b}}}},qe=Mo.prototype,qe.Vx=function(a,y){return a instanceof bd&&y instanceof bd&&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},qe.Ux=function(a,y){return a instanceof bd&&y instanceof bd&&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},qe.Js=function(a,y){return a instanceof bd&&y instanceof bd&&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},qe.B=function(a,y){return a-=y,-1<a&&1>a},qe.zi=function(a,y,x,b){var E=a.length,te=b-x;if(!(1>=te))if((0>x||x>=E-1)&&rn("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 wd(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 _d(a,y,x){a.He[a.tc[y]]=x}ot.Object.defineProperties(Mo.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()):rn("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==xy&&a!==T0&&a!==Wg||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==A0&&a!==wy&&a!==_y||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==N0&&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!==D0&&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 T0=new dn(Mo,"CycleDepthFirst",0),xy=new dn(Mo,"CycleGreedy",1),Wg=new dn(Mo,"CycleFromLayers",2),A0=new dn(Mo,"LayerOptimalLinkLength",0),wy=new dn(Mo,"LayerLongestPathSink",1),_y=new dn(Mo,"LayerLongestPathSource",2),N0=new dn(Mo,"InitDepthFirstOut",0),by=new dn(Mo,"InitDepthFirstIn",1),Py=new dn(Mo,"InitNaive",2),Cy=new dn(Mo,"AggressiveNone",0),D0=new dn(Mo,"AggressiveLess",1),Ey=new dn(Mo,"AggressiveMore",2),Yx=8;Mo.className="LayeredDigraphLayout",Mo.CycleDepthFirst=T0,Mo.CycleGreedy=xy,Mo.CycleFromLayers=Wg,Mo.LayerOptimalLinkLength=A0,Mo.LayerLongestPathSink=wy,Mo.LayerLongestPathSource=_y,Mo.InitDepthFirstOut=N0,Mo.InitDepthFirstIn=by,Mo.InitNaive=Py,Mo.AggressiveNone=Cy,Mo.AggressiveLess=D0,Mo.AggressiveMore=Ey,Mo.PackNone=0,Mo.PackExpand=1,Mo.PackStraighten=2,Mo.PackMedian=4,Mo.PackAll=15,Mo.AlignNone=0,Mo.AlignUpperLeft=1,Mo.AlignUpperRight=2,Mo.AlignLowerLeft=4,Mo.AlignLowerRight=8,Mo.AlignAll=15;function bd(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}bd.className="SegInfo";function Tp(a){Zo.call(this,a)}Ve(Tp,Zo),Tp.prototype.createVertex=function(){return new wu(this)},Tp.prototype.createEdge=function(){return new Kg(this)},Tp.className="LayeredDigraphNetwork";function wu(a){na.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}Ve(wu,na);function rx(a,y){return a.index-y.index}function O0(a,y){if(!a.$n){for(var x=[],b=In(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=In(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;rn("Unable to find destination edge to given vertex")}function Ly(a){if(!a.co){for(var y=[],x=In(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=In(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}wu.prototype.Cl=function(a){na.prototype.Cl.call(this,a),this.bo=this.co=null},wu.prototype.Kl=function(a){na.prototype.Kl.call(this,a),this.bo=this.co=null},wu.prototype.zl=function(a){na.prototype.zl.call(this,a),this.$n=this.ao=null},wu.prototype.Jl=function(a){na.prototype.Jl.call(this,a),this.$n=this.ao=null},ot.Object.defineProperties(wu.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)}}}),wu.prototype.deleteDestinationEdge=wu.prototype.Jl,wu.prototype.addDestinationEdge=wu.prototype.zl,wu.prototype.deleteSourceEdge=wu.prototype.Kl,wu.prototype.addSourceEdge=wu.prototype.Cl,wu.className="LayeredDigraphVertex";function Kg(a){ql.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Ve(Kg,ql),ot.Object.defineProperties(Kg.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)}}}),Kg.className="LayeredDigraphEdge";function Nr(a){ls.call(this),this.Ub=new Ut,this.Wn=B0,this.ud=Wh,this.vo=z0,this.Bq=By,this.$v=[],this.td=!0,this.Rb=U0,this.$d=new Sn(10,10).freeze();var y=new Bf(this);this.W=new Ou(y),this.Y=new Ou(y),this.ru=[],a&&Object.assign(this,a)}Ve(Nr,ls),Nr.prototype.cloneProtected=function(a){ls.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)},Nr.prototype.qb=function(a){a.classType===Nr?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:rn("Unknown enum value: "+a):ls.prototype.qb.call(this,a)},Nr.prototype.createNetwork=function(){return new Bf(this)},Nr.prototype.makeNetwork=function(a){function y(b){if(b instanceof ii)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof Gn){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 ln?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof ur?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Nr.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==H0&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof ln&&(y=a),this.path===B0&&y!==null?this.ud=y.isTreePathToChildren?Wh:If:this.ud=this.path===B0?Wh: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 Ut,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof ii?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof Ou&&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 Ou&&ax(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Ou&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Ou&&ux(this,y);if(this.Cu(),this.layerStyle===G0){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 Ou&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new Ut,this.isValidLayout=!0};function Jx(a){var y=new Ut;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Nr.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case Wh:x.sourceEdges.count===0&&this.Ub.add(x);break;case If:x.destinationEdges.count===0&&this.Ub.add(x);break;default:rn("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 Wh:E.sourceEdges.count<x&&(x=E.sourceEdges.count,b=E);break;case If:E.destinationEdges.count<x&&(x=E.destinationEdges.count,b=E);break;default:rn("Unhandled path value "+a.ud.toString())}}return b}function My(a,y){if(y!==null){switch(a.ud){case Wh:if(0<y.destinationEdges.count){for(var x=new zn,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 If:if(0<y.sourceEdges.count){for(x=new zn,b=y.sourceVertexes;b.next();)E=b.value,sx(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:rn("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}Nr.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===Zh&&a.sortTreeVertexChildren(y);for(var x=0,b=y.childrenCount,E=0,te=y.children,ne=te.length,ae=0;ae<ne;ae++){var ce=te[ae];ax(a,ce),x+=ce.descendantCount+1,b=Math.max(b,ce.maxChildrenCount),E=Math.max(E,ce.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=b,y.maxGenerationCount=0<b?E+1:0}}function qx(a,y){switch(a.vo){default:case z0:return y.parent!==null?y.parent:a.W;case Iy:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Ry: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}}Nr.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(qx(this,a)),a.parent!==null&&a.parent.alignment===Zh){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])}}Nr.prototype.assignTreeVertexValues=function(){};function ux(a,y){if(y!==null){y.alignment!==Zh&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)ux(a,y[b])}}Nr.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Ap:break;case Zg:a.children.reverse();break;case Yg:a.children.sort(a.comparer);break;case Xg:a.children.sort(a.comparer),a.children.reverse();break;default:rn("Unhandled sorting value "+a.sorting.toString())}},Nr.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Nr.prototype.addComments=function(a){var y=a.angle,x=a.parent,b=0,E=!1;x!==null&&(b=x.angle,E=x.alignment,E=Pd(E)),y=y===90||y===270,b=b===90||b===270,x=a.childrenCount===0;var te=0,ne=0,ae=0,ce=a.commentSpacing;if(a.node!==null)for(var _e=a.node.Mu();_e.next();){var Pe=_e.value;Pe.category==="Comment"&&Pe.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(Pe),Pe.Va(),Pe=Pe.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(te=Math.max(te,Pe.width),ne+=Pe.height+Math.abs(ae)):(te+=Pe.width+Math.abs(ae),ne=Math.max(ne,Pe.height)),ae=ce)}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=pn.allocAt(0,0,a.bounds.width+te,a.bounds.height+ne),a.bounds=E,pn.free(E))};function Pd(a){return a===Gc||a===Zh||a===Wc||a===vc}function Vg(a){return a===Gc||a===Zh}function ky(a){var y=a.parent;if(y!==null){var x=y.alignment;if(Pd(x)){if(Vg(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Wc)return!0}}return!1}Nr.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=Pd(te)),b=b===90||b===270,x=E===90||E===270;for(var ne=a.childrenCount===0,ae=ky(a),ce=0,_e=a.comments,Pe=_e.length,Ne=vt.alloc(),Ge=0;Ge<Pe;Ge++){var Ye=_e[Ge],Qe=Ye.measuredBounds;if(b&&!ne||!te&&!x&&ne||te&&x&&ne){if(135<E&&!te||x&&ae)if(0<=a.commentMargin)for(Ne.h(a.bounds.x-a.commentMargin-Qe.width,a.bounds.y+ce),Ye.move(Ne),Ye=Ye.Sd();Ye.next();){var at=Ye.value;at.fromSpot=Ua,at.toSpot=xa}else for(Ne.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+ce),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)at=Ye.value,at.fromSpot=xa,at.toSpot=Ua;else if(0<=a.commentMargin)for(Ne.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+ce),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)at=Ye.value,at.fromSpot=xa,at.toSpot=Ua;else for(Ne.h(a.bounds.x+a.commentMargin-Qe.width,a.bounds.y+ce),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)at=Ye.value,at.fromSpot=Ua,at.toSpot=xa;ce=0<=a.commentSpacing?ce+(Qe.height+a.commentSpacing):ce+(a.commentSpacing-Qe.height)}else{if(135<E&&!te||!x&&ae)if(0<=a.commentMargin)for(Ne.h(a.bounds.x+ce,a.bounds.y-a.commentMargin-Qe.height),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)at=Ye.value,at.fromSpot=Ja,at.toSpot=Aa;else for(Ne.h(a.bounds.x+ce,a.bounds.y+2*a.focus.y-a.commentMargin),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)at=Ye.value,at.fromSpot=Aa,at.toSpot=Ja;else if(0<=a.commentMargin)for(Ne.h(a.bounds.x+ce,a.bounds.y+2*a.focus.y+a.commentMargin),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)at=Ye.value,at.fromSpot=Aa,at.toSpot=Ja;else for(Ne.h(a.bounds.x+ce,a.bounds.y+a.commentMargin-Qe.height),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)at=Ye.value,at.fromSpot=Ja,at.toSpot=Aa;ce=0<=a.commentSpacing?ce+(Qe.width+a.commentSpacing):ce+(a.commentSpacing-Qe.width)}}if(vt.free(Ne),y=ce-a.commentSpacing-(b?y.height:y.width),this.ud===Wh)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)}},Nr.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 j0:hx(this,a);break;case Jg:if(a.alignment===Zh)hx(this,a);else if(a.childrenCount===0)b=a.parent,x=!1,y=0,b!==null&&(y=b.angle,x=b.alignment,x=Pd(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=Ju(a);y=E===90||E===270;var te=0,ne=a.children,ae=ne.length;for(x=0;x<ae;x++)b=ne[x],te=Math.max(te,y?b.Da.width:b.Da.height);var ce=a.alignment;b=ce===Kh;var _e=ce===Vh,Pe=Pd(ce),Ne=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var Ge=a.nodeSpacing,Ye=this.computeNodeIndent(a),Qe=a.rowSpacing,at=0;(b||_e||a.hm||a.im&&a.maxGenerationCount===1)&&(at=Math.max(0,a.rowIndent)),b=a.width;var Ct=a.height,xt=0,Tt=0,Nt=0,It=null,Zt=null,un=0,$n=0,fi=0,ai=0,Un=0,Pn=0,ar=0,Ji=0;if(Pe&&!Vg(ce)&&135<E&&ne.reverse(),Vg(ce))if(1<ae)for(var lo=0;lo<ae;lo++)lo%2===0&&lo!==ae-1&&(Ji=Math.max(Ji,y?ne[lo].Da.width:ne[lo].Da.height));else ae===1&&(Ji=y?ne[0].Da.width:ne[0].Da.height);if(Pe){switch(ce){case Gc:Tt=135>E?cx(this,a,ne,Ji,xt,Tt):dx(this,a,ne,Ji,xt,Tt),Ji=Tt.x,xt=Tt.width,Tt=Tt.height;break;case Wc:for(It=0;It<ae;It++)Zt=ne[It],Ne=Zt.Da,Nt=Pn===0?0:Qe,y?(Zt.S.h(te-Ne.width,ai+Nt),xt=Math.max(xt,Ne.width),Tt=Math.max(Tt,ai+Nt+Ne.height),ai+=Nt+Ne.height):(Zt.S.h(fi+Nt,te-Ne.height),xt=Math.max(xt,fi+Nt+Ne.width),Tt=Math.max(Tt,Ne.height),fi+=Nt+Ne.width),Pn++;break;case vc:for(It=0;It<ae;It++)Zt=ne[It],te=Zt.Da,Ne=Pn===0?0:Qe,y?(Zt.S.h(Ge/2+a.focus.x,ai+Ne),xt=Math.max(xt,te.width),Tt=Math.max(Tt,ai+Ne+te.height),ai+=Ne+te.height):(Zt.S.h(fi+Ne,Ge/2+a.focus.y),xt=Math.max(xt,fi+Ne+te.width),Tt=Math.max(Tt,te.height),fi+=Ne+te.width),Pn++}It=Fl(this,2),Zt=Fl(this,2),y?(It[0].h(0,0),It[1].h(0,Tt),Zt[0].h(xt,0)):(It[0].h(0,0),It[1].h(xt,0),Zt[0].h(0,Tt)),Zt[1].h(xt,Tt)}else for(lo=0;lo<ae;lo++){var Ho=ne[lo],fa=Ho.Da;if(y){0<Ne&&0<Pn&&fi+Ge+fa.width>Ne&&(fi<te&&of(a,ce,te-fi,0,ar,lo-1),Un++,Pn=0,ar=lo,Nt=Tt,fi=0,ai=135<E?-Tt-Qe:Tt+Qe),I0(this,Ho,0,ai);var Sa=0;if(Pn===0)It=Ho.Yo,Zt=Ho.kp,un=fa.width,$n=fa.height,(It===null||Zt===null||E!==Ju(Ho))&&(It=Fl(this,2),Zt=Fl(this,2),It[0].h(0,0),It[1].h(0,$n),Zt[0].h(un,0),Zt[1].h(un,$n));else{var rl=Ti();$n=fx(this,a,Ho,It,Zt,un,$n,rl),Sa=$n.x,It=rl[0],Zt=rl[1],un=$n.width,$n=$n.height,bi(rl),fi<fa.width&&0>Sa&&(Rf(a,-Sa,0,ar,lo-1),F0(It,-Sa,0),F0(Zt,-Sa,0),Sa=0)}Ho.S.h(Sa,ai),xt=Math.max(xt,un),Tt=Math.max(Tt,Nt+(Un===0?0:Qe)+fa.height),fi=un}else 0<Ne&&0<Pn&&ai+Ge+fa.height>Ne&&(ai<te&&of(a,ce,0,te-ai,ar,lo-1),Un++,Pn=0,ar=lo,Nt=xt,ai=0,fi=135<E?-xt-Qe:xt+Qe),I0(this,Ho,fi,0),Sa=0,Pn===0?(It=Ho.Yo,Zt=Ho.kp,un=fa.width,$n=fa.height,(It===null||Zt===null||E!==Ju(Ho))&&(It=Fl(this,2),Zt=Fl(this,2),It[0].h(0,0),It[1].h(un,0),Zt[0].h(0,$n),Zt[1].h(un,$n))):(rl=Ti(),$n=fx(this,a,Ho,It,Zt,un,$n,rl),Sa=$n.x,It=rl[0],Zt=rl[1],un=$n.width,$n=$n.height,bi(rl),ai<fa.height&&0>Sa&&(Rf(a,0,-Sa,ar,lo-1),F0(It,0,-Sa),F0(Zt,0,-Sa),Sa=0)),Ho.S.h(fi,Sa),Tt=Math.max(Tt,$n),xt=Math.max(xt,Nt+(Un===0?0:Qe)+fa.width),ai=$n;Pn++}switch(0<Un&&(y?(Tt+=Math.max(0,x),fi<xt&&of(a,ce,xt-fi,0,ar,ae-1),0<at&&(_e||Rf(a,at,0,0,ae-1),xt+=at)):(xt+=Math.max(0,x),ai<Tt&&of(a,ce,0,Tt-ai,ar,ae-1),0<at&&(_e||Rf(a,0,at,0,ae-1),Tt+=at))),at=_e=0,ce){case Np:y?_e+=xt/2-a.focus.x-Ye/2:at+=Tt/2-a.focus.y-Ye/2;break;case Ff:0<Un?y?_e+=xt/2-a.focus.x-Ye/2:at+=Tt/2-a.focus.y-Ye/2:y?(Ji=ne[0].S.x+ne[0].la.x,_e+=Ji+(ne[ae-1].S.x+ne[ae-1].la.x+2*ne[ae-1].focus.x-Ji)/2-a.focus.x-Ye/2):(Ji=ne[0].S.y+ne[0].la.y,at+=Ji+(ne[ae-1].S.y+ne[ae-1].la.y+2*ne[ae-1].focus.y-Ji)/2-a.focus.y-Ye/2);break;case Kh:y?(_e-=Ye,xt+=Ye):(at-=Ye,Tt+=Ye);break;case Vh:y?(_e+=xt-a.width+Ye,xt+=Ye):(at+=Tt-a.height+Ye,Tt+=Ye);break;case Gc:y?1<ae?_e+=Ji+Ge/2-a.focus.x:_e+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<ae?at+=Ji+Ge/2-a.focus.y:at+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case Wc:y?_e+=xt+Ge/2-a.focus.x:at+=Tt+Ge/2-a.focus.y;break;case vc:break;default:Tt=this.customAlignment(a,_e,at,xt,Tt),_e=Tt[0],at=Tt[1],xt=Tt[2],Tt=Tt[3]}for(Ye=0;Ye<ae;Ye++)Ji=ne[Ye],y?Ji.S.h(Ji.S.x+Ji.la.x-_e,Ji.S.y+(135<E?(Pe?-Tt:-Ji.Da.height)+Ji.la.y-x:Ct+x+Ji.la.y)):Ji.S.h(Ji.S.x+(135<E?(Pe?-xt:-Ji.Da.width)+Ji.la.x-x:b+x+Ji.la.x),Ji.S.y+Ji.la.y-at);if(ae=ne=0,Pe?y?(xt=Ty(a,xt,_e),0>_e&&(_e=0),135<E&&(at+=Tt+x),Tt+=Ct+x,ce===vc&&(ne+=Ge/2+a.focus.x),ae+=Ct+x):(135<E&&(_e+=xt+x),xt+=b+x,Tt=Ay(a,Tt,at),0>at&&(at=0),ce===vc&&(ae+=Ge/2+a.focus.y),ne+=b+x):y?(a.comments===null?b>xt&&(xt=Ny(ce,b-xt,0),ne=xt.x,ae=xt.y,xt=b,_e=0):xt=Ty(a,xt,_e),0>_e&&(ne-=_e,_e=0),135<E&&(at+=Tt+x),Tt=Math.max(Math.max(Tt,Ct),Tt+Ct+x),ae+=Ct+x):(135<E&&(_e+=xt+x),xt=Math.max(Math.max(xt,b),xt+b+x),a.comments===null?Ct>Tt&&(Tt=Ny(ce,0,Ct-Tt),ne=Tt.x,ae=Tt.y,Tt=Ct,at=0):Tt=Ay(a,Tt,at),0>at&&(ae-=at,at=0),ne+=b+x),0<Un)E=Fl(this,4),Un=Fl(this,4),y?(E[2].h(0,Ct+x),E[3].h(E[2].x,Tt),Un[2].h(xt,E[2].y),Un[3].h(Un[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(xt,E[2].y),Un[2].h(E[2].x,Tt),Un[3].h(E[3].x,Un[2].y));else{for(E=Fl(this,It.length+2),Un=Fl(this,Zt.length+2),ce=0;ce<It.length;ce++)Pe=It[ce],E[ce+2].h(Pe.x+ne,Pe.y+ae);for(ce=0;ce<Zt.length;ce++)Pe=Zt[ce],Un[ce+2].h(Pe.x+ne,Pe.y+ae)}y?(E[0].h(_e,0),E[1].h(E[0].x,Ct),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])),Un[0].h(_e+b,0),Un[1].h(Un[0].x,Ct),Un[2].y<Un[1].y&&(Un[2].x<Un[0].x?Un[2].assign(Un[1]):Un[1].assign(Un[2])),Un[3].y<Un[2].y&&(Un[3].x<Un[0].x?Un[3].assign(Un[2]):Un[2].assign(Un[3])),E[2].y-=x/2,Un[2].y-=x/2):(E[0].h(0,at),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])),Un[0].h(0,at+Ct),Un[1].h(b,Un[0].y),Un[2].x<Un[1].x&&(Un[2].y<Un[0].y?Un[2].assign(Un[1]):Un[1].assign(Un[2])),Un[3].x<Un[2].x&&(Un[3].y<Un[0].y?Un[3].assign(Un[2]):Un[2].assign(Un[3])),E[2].x-=x/2,Un[2].x-=x/2),ah(this,It),ah(this,Zt),a.Yo=E,a.kp=Un,a.la.h(_e,at),a.Da.h(xt,Tt)}break;default:rn("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=Pd(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=Ju(y),x=b===90||b===270;var te=0;E=y.children;for(var ne=E.length,ae=0;ae<ne;ae++){var ce=E[ae];te=Math.max(te,x?ce.Da.width:ce.Da.height)}var _e=y.alignment,Pe=_e===Kh,Ne=_e===Vh;ae=Pd(_e);var Ge=Math.max(0,y.breadthLimit);ce=a.computeLayerSpacing(y);var Ye=y.nodeSpacing,Qe=a.computeNodeIndent(y),at=Pe||Ne?0:Qe/2,Ct=y.rowSpacing,xt=0;(Pe||Ne||y.hm||y.im&&y.maxGenerationCount===1)&&(xt=Math.max(0,y.rowIndent)),Pe=y.width;var Tt=y.height,Nt=0,It=0,Zt=0,un=0,$n=0,fi=0,ai=0,Un=0,Pn=0,ar=0;if(ae&&!Vg(_e)&&135<b&&E.reverse(),Vg(_e))if(1<ne)for(var Ji=0;Ji<ne;Ji++){var lo=E[Ji],Ho=lo.Da;Ji%2===0&&Ji!==ne-1?Pn=Math.max(Pn,(x?Ho.width:Ho.height)+a.computeBusNodeSpacing(lo)-Ye):Ji%2!==0&&(ar=Math.max(ar,(x?Ho.width:Ho.height)+a.computeBusNodeSpacing(lo)-Ye))}else ne===1&&(Pn=x?E[0].Da.width:E[0].Da.height);if(ae)switch(_e){case Gc:case Zh:It=135>b?cx(a,y,E,Pn,Nt,It):dx(a,y,E,Pn,Nt,It),Pn=It.x,Nt=It.width,It=It.height;break;case Wc:for(Ge=0;Ge<ne;Ge++)at=E[Ge],Zt=at.Da,ar=ai===0?0:Ct,x?(at.S.h(te-Zt.width,$n+ar),Nt=Math.max(Nt,Zt.width),It=Math.max(It,$n+ar+Zt.height),$n+=ar+Zt.height):(at.S.h(un+ar,te-Zt.height),Nt=Math.max(Nt,un+ar+Zt.width),It=Math.max(It,Zt.height),un+=ar+Zt.width),ai++;break;case vc:for(te=0;te<ne;te++)Ge=E[te],at=Ge.Da,Zt=ai===0?0:Ct,x?(Ge.S.h(Ye/2+y.focus.x,$n+Zt),Nt=Math.max(Nt,at.width),It=Math.max(It,$n+Zt+at.height),$n+=Zt+at.height):(Ge.S.h(un+Zt,Ye/2+y.focus.y),Nt=Math.max(Nt,un+Zt+at.width),It=Math.max(It,at.height),un+=Zt+at.width),ai++}else for(ar=0;ar<ne;ar++)Ji=E[ar],lo=Ji.Da,x?(0<Ge&&0<ai&&un+Ye+lo.width>Ge&&(un<te&&of(y,_e,te-un,0,Un,ar-1),fi++,ai=0,Un=ar,Zt=It,un=0,$n=135<b?-It-Ct:It+Ct),Ho=ai===0?at:Ye,I0(a,Ji,0,$n),Ji.S.h(un+Ho,$n),Nt=Math.max(Nt,un+Ho+lo.width),It=Math.max(It,Zt+(fi===0?0:Ct)+lo.height),un+=Ho+lo.width):(0<Ge&&0<ai&&$n+Ye+lo.height>Ge&&($n<te&&of(y,_e,0,te-$n,Un,ar-1),fi++,ai=0,Un=ar,Zt=Nt,$n=0,un=135<b?-Nt-Ct:Nt+Ct),Ho=ai===0?at:Ye,I0(a,Ji,un,0),Ji.S.h(un,$n+Ho),It=Math.max(It,$n+Ho+lo.height),Nt=Math.max(Nt,Zt+(fi===0?0:Ct)+lo.width),$n+=Ho+lo.height),ai++;switch(0<fi&&(x?(It+=Math.max(0,ce),un<Nt&&of(y,_e,Nt-un,0,Un,ne-1),0<xt&&(Ne||Rf(y,xt,0,0,ne-1),Nt+=xt)):(Nt+=Math.max(0,ce),$n<It&&of(y,_e,0,It-$n,Un,ne-1),0<xt&&(Ne||Rf(y,0,xt,0,ne-1),It+=xt))),xt=Ne=0,_e){case Np:x?Ne+=Nt/2-y.focus.x-Qe/2:xt+=It/2-y.focus.y-Qe/2;break;case Ff:0<fi?x?Ne+=Nt/2-y.focus.x-Qe/2:xt+=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,xt+=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 Kh:x?(Ne-=Qe,Nt+=Qe):(xt-=Qe,It+=Qe);break;case Vh:x?(Ne+=Nt-y.width+Qe,Nt+=Qe):(xt+=It-y.height+Qe,It+=Qe);break;case Gc:case Zh:x?1<ne?Ne+=Pn+Ye/2-y.focus.x:Ne+=E[0].focus.x-y.focus.x+E[0].la.x:1<ne?xt+=Pn+Ye/2-y.focus.y:xt+=E[0].focus.y-y.focus.y+E[0].la.y;break;case Wc:x?Ne+=Nt+Ye/2-y.focus.x:xt+=It+Ye/2-y.focus.y;break;case vc:break;default:a=a.customAlignment(y,Ne,xt,Nt,It),Ne=a[0],xt=a[1],Nt=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?(ae?-It:-Qe.Da.height)+Qe.la.y-ce:Tt+ce+Qe.la.y)):Qe.S.h(Qe.S.x+(135<b?(ae?-Nt:-Qe.Da.width)+Qe.la.x-ce:Pe+ce+Qe.la.x),Qe.S.y+Qe.la.y-xt);x?(Nt=Ty(y,Nt,Ne),0>Ne&&(Ne=0),135<b&&(xt+=It+ce),It=Math.max(Math.max(It,Tt),It+Tt+ce)):(135<b&&(Ne+=Nt+ce),Nt=Math.max(Math.max(Nt,Pe),Nt+Pe+ce),It=Ay(y,It,xt),0>xt&&(xt=0)),y.la.h(Ne,xt),y.Da.h(Nt,It)}}Nr.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 pn(b,0,E,te);if(ne===1)return y=x[0],E=y.Da.width,te=y.Da.height,new pn(b,0,E,te);for(var ae=y.nodeSpacing,ce=y.rowSpacing,_e=Ju(y)===90,Pe=0,Ne=0,Ge=0,Ye=0;Ye<ne;Ye++)if(!(Ye%2!==0||1<ne&&Ye===ne-1)){var Qe=x[Ye],at=Qe.Da,Ct=Pe===0?0:ce;if(_e){var xt=a.computeBusNodeSpacing(Qe)-ae;Qe.S.h(b-(at.width+xt),Ge+Ct),E=Math.max(E,at.width+xt),te=Math.max(te,Ge+Ct+at.height),Ge+=Ct+at.height}else xt=a.computeBusNodeSpacing(Qe)-ae,Qe.S.h(Ne+Ct,b-(at.height+xt)),te=Math.max(te,at.height+xt),E=Math.max(E,Ne+Ct+at.width),Ne+=Ct+at.width;Pe++}for(Pe=0,Qe=Ne,Ye=Ge,_e?(Ne=b+ae,Ge=0):(Ne=0,Ge=b+ae),at=0;at<ne;at++)if(at%2!==0){Ct=x[at],xt=Ct.Da;var Tt=Pe===0?0:ce;if(_e){var Nt=a.computeBusNodeSpacing(Ct)-ae;Ct.S.h(Ne+Nt,Ge+Tt),E=Math.max(E,Ne+xt.width+Nt),te=Math.max(te,Ge+Tt+xt.height),Ge+=Tt+xt.height}else Nt=a.computeBusNodeSpacing(Ct)-ae,Ct.S.h(Ne+Tt,Ge+Nt),E=Math.max(E,Ne+Tt+xt.width),te=Math.max(te,Ge+xt.height+Nt),Ne+=Tt+xt.width;Pe++}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(Ge)):Math.max(Math.abs(Qe),Math.abs(Ne))),_e?(x.S.h(b+ae/2-x.focus.x-x.la.x,te+a),_e=b+ae/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,Ge)+a+ne.height),0>x.S.x&&(b=R0(y,x.S.x,!1,b,ae))):(x.S.h(E+a,b+ae/2-x.focus.y-x.la.y),E=Math.max(E,Math.max(Qe,Ne)+a+ne.width),Ge=b+ae/2-x.focus.y-x.la.y,te=Math.max(te,Ge+ne.height),0>Ge&&(te-=Ge),0>x.S.y&&(b=R0(y,x.S.y,!0,b,ae)))),new pn(b,0,E,te)}function dx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new pn(b,0,E,te);if(ne===1)return x=x[0],E=x.Da.width,te=x.Da.height,new pn(b,0,E,te);for(var ae=y.nodeSpacing,ce=y.rowSpacing,_e=Ju(y)===270,Pe=0,Ne=0,Ge=0,Ye=0;Ye<ne;Ye++)if(!(Ye%2!==0||1<ne&&Ye===ne-1)){var Qe=x[Ye],at=Qe.Da,Ct=Pe===0?0:ce;if(_e){var xt=a.computeBusNodeSpacing(Qe)-ae;Ge-=Ct+at.height,Qe.S.h(b-(at.width+xt),Ge),E=Math.max(E,at.width+xt),te=Math.max(te,Math.abs(Ge))}else xt=a.computeBusNodeSpacing(Qe)-ae,Ne-=Ct+at.width,Qe.S.h(Ne,b-(at.height+xt)),te=Math.max(te,at.height+xt),E=Math.max(E,Math.abs(Ne));Pe++}for(Pe=0,Qe=Ne,Ye=Ge,_e?(Ne=b+ae,Ge=0):(Ne=0,Ge=b+ae),at=0;at<ne;at++)if(at%2!==0){Ct=x[at],xt=Ct.Da;var Tt=Pe===0?0:ce;if(_e){var Nt=a.computeBusNodeSpacing(Ct)-ae;Ge-=Tt+xt.height,Ct.S.h(Ne+Nt,Ge),E=Math.max(E,Ne+xt.width+Nt),te=Math.max(te,Math.abs(Ge))}else Nt=a.computeBusNodeSpacing(Ct)-ae,Ne-=Tt+xt.width,Ct.S.h(Ne,Ge+Nt),te=Math.max(te,Ge+xt.height+Nt),E=Math.max(E,Math.abs(Ne));Pe++}for(1<ne&&ne%2===1&&(ce=x[ne-1],Pe=ce.Da,a=a.computeBusLastRowSpacing(ce,_e?Math.max(Math.abs(Ye),Math.abs(Ge)):Math.max(Math.abs(Qe),Math.abs(Ne))),_e?(ce.S.h(b+ae/2-ce.focus.x-ce.la.x,-te-Pe.height-a),Ne=b+ae/2-ce.focus.x-ce.la.x,E=Math.max(E,Ne+Pe.width),0>Ne&&(E-=Ne),te=Math.max(te,Math.abs(Math.min(Ye,Ge))+a+Pe.height),0>ce.S.x&&(b=R0(y,ce.S.x,!1,b,ae))):(ce.S.h(-E-Pe.width-a,b+ae/2-ce.focus.y-ce.la.y),E=Math.max(E,Math.abs(Math.min(Qe,Ne))+a+Pe.width),Ge=b+ae/2-ce.focus.y-ce.la.y,te=Math.max(te,Ge+Pe.height),0>Ge&&(te-=Ge),0>ce.S.y&&(b=R0(y,ce.S.y,!0,b,ae)))),y=0;y<ne;y++)ae=x[y],_e?ae.S.h(ae.S.x,ae.S.y+te):ae.S.h(ae.S.x+E,ae.S.y);return new pn(b,0,E,te)}Nr.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Nr.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function R0(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 Ff:case Np:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case Kh:return a.width>y?a.width:y;case Vh:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Gc:case Zh:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Wc:return a.width-a.focus.x+a.nodeSpacing/2+y;case vc:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ay(a,y,x){switch(a.alignment){case Ff:case Np:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case Kh:return a.height>y?a.height:y;case Vh:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Gc:case Zh:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Wc:return a.height-a.focus.y+a.nodeSpacing/2+y;case vc:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Ny(a,y,x){switch(a){case Np:y/=2,x/=2;break;case Ff:y/=2,x/=2;break;case Kh:x=y=0;break;case Vh:break;default:rn("Unhandled alignment value "+a.toString())}return new vt(y,x)}function of(a,y,x,b,E,te){y=Ny(y,x,b),Rf(a,y.x,y.y,E,te)}function Rf(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 Wh:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case If:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:rn("Unhandled path value "+a.ud.toString())}}function F0(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,ae){var ce=Ju(y),_e=ce===90||ce===270,Pe=y.nodeSpacing;y=b;var Ne=E;b=te;var Ge=ne,Ye=x.Yo,Qe=x.kp;ne=x.Da;var at=_e?Math.max(Ge,ne.height):Math.max(b,ne.width);if((Ye===null||ce!==Ju(x))&&(Ye=Fl(a,2),Qe=Fl(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(Ge=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 Ct=Ye[E];ce=Ct.x,_e=Ct.y,ce+=b;var xt=te;x+1<Ne.length&&(xt=Ne[x+1]);var Tt=Ct;Ct=Tt.x,Tt=Tt.y,E+1<Ye.length&&(Tt=Ye[E+1],Ct=Tt.x,Tt=Tt.y,Ct+=b);var Nt=Ge;te.y===_e?Nt=ce-te.x:te.y>_e&&te.y<Tt?Nt=ce+(te.y-_e)/(Tt-_e)*(Ct-ce)-te.x:_e>te.y&&_e<xt.y&&(Nt=ce-(te.x+(_e-te.y)/(xt.y-te.y)*(xt.x-te.x))),Nt<Ge&&(Ge=Nt),xt.y<=te.y?x++:Tt<=_e?E++:(xt.y<=Tt&&x++,Tt<=xt.y&&E++)}if(Ge=b-Ge,Ge+=Pe,x=Ye,E=Ge,y===null||2>y.length||x===null||2>x.length)b=null;else{for(Pe=Fl(a,y.length+x.length),b=te=ce=0;te<x.length&&x[te].y<y[0].y;)_e=x[te++],Pe[b++].h(_e.x+E,_e.y);for(;ce<y.length;)_e=y[ce++],Pe[b++].h(_e.x,_e.y);for(ce=y[y.length-1].y;te<x.length&&x[te].y<=ce;)te++;for(;te<x.length&&x[te].y>ce;)_e=x[te++],Pe[b++].h(_e.x+E,_e.y);for(x=Fl(a,b),ce=0;ce<b;ce++)x[ce].assign(Pe[ce]);ah(a,Pe),b=x}if(te=Qe,ce=Ge,Ne===null||2>Ne.length||te===null||2>te.length)E=null;else{for(Pe=Fl(a,Ne.length+te.length),E=_e=x=0;x<Ne.length&&Ne[x].y<te[0].y;)xt=Ne[x++],Pe[E++].h(xt.x,xt.y);for(;_e<te.length;)xt=te[_e++],Pe[E++].h(xt.x+ce,xt.y);for(te=te[te.length-1].y;x<Ne.length&&Ne[x].y<=te;)x++;for(;x<Ne.length&&Ne[x].y>te;)ce=Ne[x++],Pe[E++].h(ce.x,ce.y);for(te=Fl(a,E),x=0;x<E;x++)te[x].assign(Pe[x]);ah(a,Pe),E=te}return te=Math.max(0,Ge)+ne.width,ne=at,ah(a,y),ah(a,Ye),ah(a,Ne),ah(a,Qe),ae[0]=b,ae[1]=E,new pn(Ge,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],Ct=Ye[E],ce=Ct.x,_e=Ct.y,_e+=Ge,xt=te,x+1<Ne.length&&(xt=Ne[x+1]),Tt=Ct,Ct=Tt.x,Tt=Tt.y,E+1<Ye.length&&(Tt=Ye[E+1],Ct=Tt.x,Tt=Tt.y,Tt+=Ge),Nt=b,te.x===ce?Nt=_e-te.y:te.x>ce&&te.x<Ct?Nt=_e+(te.x-ce)/(Ct-ce)*(Tt-_e)-te.y:ce>te.x&&ce<xt.x&&(Nt=_e-(te.y+(ce-te.x)/(xt.x-te.x)*(xt.y-te.y))),Nt<b&&(b=Nt),xt.x<=te.x?x++:Ct<=ce?E++:(xt.x<=Ct&&x++,Ct<=xt.x&&E++);if(Ge-=b,Ge+=Pe,x=Ye,E=Ge,y===null||2>y.length||x===null||2>x.length)b=null;else{for(Pe=Fl(a,y.length+x.length),b=te=ce=0;te<x.length&&x[te].x<y[0].x;)_e=x[te++],Pe[b++].h(_e.x,_e.y+E);for(;ce<y.length;)_e=y[ce++],Pe[b++].h(_e.x,_e.y);for(ce=y[y.length-1].x;te<x.length&&x[te].x<=ce;)te++;for(;te<x.length&&x[te].x>ce;)_e=x[te++],Pe[b++].h(_e.x,_e.y+E);for(x=Fl(a,b),ce=0;ce<b;ce++)x[ce].assign(Pe[ce]);ah(a,Pe),b=x}if(te=Qe,ce=Ge,Ne===null||2>Ne.length||te===null||2>te.length)E=null;else{for(Pe=Fl(a,Ne.length+te.length),E=_e=x=0;x<Ne.length&&Ne[x].x<te[0].x;)xt=Ne[x++],Pe[E++].h(xt.x,xt.y);for(;_e<te.length;)xt=te[_e++],Pe[E++].h(xt.x,xt.y+ce);for(te=te[te.length-1].x;x<Ne.length&&Ne[x].x<=te;)x++;for(;x<Ne.length&&Ne[x].x>te;)ce=Ne[x++],Pe[E++].h(ce.x,ce.y);for(te=Fl(a,E),x=0;x<E;x++)te[x].assign(Pe[x]);ah(a,Pe),E=te}return te=at,ne=Math.max(0,Ge)+ne.height,ah(a,y),ah(a,Ye),ah(a,Ne),ah(a,Qe),ae[0]=b,ae[1]=E,new pn(Ge,0,te,ne)}function Fl(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 vt;return a}function ah(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}Nr.prototype.arrangeTrees=function(){if(this.Rb===H0)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof Ou){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 Ou&&a.push(x);switch(this.sorting){case Ap:break;case Zg:a.reverse();break;case Yg:a.sort(this.comparer);break;case Xg:a.sort(this.comparer),a.reverse();break;default:rn("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 U0:x+=E.Da.height+this.$d.height;break;case Fy:y+=E.Da.width+this.$d.width;break;default:rn("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)}}}Nr.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Nr.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Nr.prototype.Gu=function(){if(this.layerStyle===G0){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 vt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new vt(-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 ae=a[ne]+y[ne];this.angle===270?(te-=ae,E.push(new pn(0,te,x,ae))):this.angle===90?(E.push(new pn(0,te,x,ae)),te+=ae):this.angle===180?(te-=ae,E.push(new pn(te,0,ae,x))):(E.push(new pn(te,0,ae,x)),te+=ae)}this.commitLayers(E,b)}},Nr.prototype.commitLayers=function(){},Nr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Nr.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof Ou&&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])}}Nr.prototype.setPortSpots=function(a){var y=a.alignment;if(Pd(y)){var x=this.ud===Wh,b=Ju(a);switch(b){case 0:var E=xa;break;case 90:E=Aa;break;case 180:E=Ua;break;default:E=Ja}var te=a.children,ne=te.length;switch(y){case Gc:case Zh:for(y=0;y<ne;y++){var ae=te[y];if(ae=(x?ae.sourceEdges:ae.destinationEdges).first(),ae!==null&&(ae=ae.link,ae!==null)){var ce=b===90||b===270?Ua:Ja;if(ne===1||y===ne-1&&ne%2===1)switch(b){case 0:ce=Ua;break;case 90:ce=Ja;break;case 180:ce=xa;break;default:ce=Aa}else y%2===0&&(ce=b===90||b===270?xa:Aa);x?(a.setsPortSpot&&(ae.fromSpot=E),a.setsChildPortSpot&&(ae.toSpot=ce)):(a.setsPortSpot&&(ae.fromSpot=ce),a.setsChildPortSpot&&(ae.toSpot=E))}}break;case Wc:for(b=b===90||b===270?xa:Aa,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 vc:for(b=b===90||b===270?Ua:Ja,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=Ju(a),this.ud===Wh){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=xa;break;case 90:b.fromSpot=Aa;break;case 180:b.fromSpot=Ua;break;default:b.fromSpot=Ja}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=Ua;break;case 90:b.toSpot=Ja;break;case 180:b.toSpot=xa;break;default:b.toSpot=Aa}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=xa;break;case 90:b.toSpot=Aa;break;case 180:b.toSpot=Ua;break;default:b.toSpot=Ja}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=Ua;break;case 90:b.fromSpot=Ja;break;case 180:b.fromSpot=xa;break;default:b.fromSpot=Aa}else b.fromSpot=a.childPortSpot}};function Ju(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}Nr.prototype.computeLayerSpacing=function(a){var y=Ju(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},Nr.prototype.computeNodeIndent=function(a){var y=Ju(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(Nr.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!==z0&&a!==Ry&&a!==Oy&&a!==Iy||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==By&&a!==jy&&a!==G0||(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!==U0&&a!==Fy&&a!==H0||(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!==Ap&&a!==Zg&&a!==Yg&&!Xg||(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()):rn("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!==j0&&a!==Jg||(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!==Ap&&a!==Zg&&a!==Yg&&!Xg||(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!==j0&&a!==Jg||(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 B0=new dn(Nr,"PathDefault",-1),Wh=new dn(Nr,"PathDestination",0),If=new dn(Nr,"PathSource",1),Ap=new dn(Nr,"SortingForwards",10),Zg=new dn(Nr,"SortingReverse",11),Yg=new dn(Nr,"SortingAscending",12),Xg=new dn(Nr,"SortingDescending",13),Np=new dn(Nr,"AlignmentCenterSubtrees",20),Ff=new dn(Nr,"AlignmentCenterChildren",21),Kh=new dn(Nr,"AlignmentStart",22),Vh=new dn(Nr,"AlignmentEnd",23),Gc=new dn(Nr,"AlignmentBus",24),Zh=new dn(Nr,"AlignmentBusBranching",25),Wc=new dn(Nr,"AlignmentTopLeftBus",26),vc=new dn(Nr,"AlignmentBottomRightBus",27),j0=new dn(Nr,"CompactionNone",30),Jg=new dn(Nr,"CompactionBlock",31),z0=new dn(Nr,"StyleLayered",40),Oy=new dn(Nr,"StyleLastParents",41),Ry=new dn(Nr,"StyleAlternating",42),Iy=new dn(Nr,"StyleRootOnly",43),U0=new dn(Nr,"ArrangementVertical",50),Fy=new dn(Nr,"ArrangementHorizontal",51),H0=new dn(Nr,"ArrangementFixedRoots",52),By=new dn(Nr,"LayerIndividual",60),jy=new dn(Nr,"LayerSiblings",61),G0=new dn(Nr,"LayerUniform",62);Nr.className="TreeLayout",Nr.PathDefault=B0,Nr.PathDestination=Wh,Nr.PathSource=If,Nr.SortingForwards=Ap,Nr.SortingReverse=Zg,Nr.SortingAscending=Yg,Nr.SortingDescending=Xg,Nr.AlignmentCenterSubtrees=Np,Nr.AlignmentCenterChildren=Ff,Nr.AlignmentStart=Kh,Nr.AlignmentEnd=Vh,Nr.AlignmentBus=Gc,Nr.AlignmentBusBranching=Zh,Nr.AlignmentTopLeftBus=Wc,Nr.AlignmentBottomRightBus=vc,Nr.CompactionNone=j0,Nr.CompactionBlock=Jg,Nr.StyleLayered=z0,Nr.StyleLastParents=Oy,Nr.StyleAlternating=Ry,Nr.StyleRootOnly=Iy,Nr.ArrangementVertical=U0,Nr.ArrangementHorizontal=Fy,Nr.ArrangementFixedRoots=H0,Nr.LayerIndividual=By,Nr.LayerSiblings=jy,Nr.LayerUniform=G0;function Bf(a){Zo.call(this,a)}Ve(Bf,Zo),Bf.prototype.createVertex=function(){return new Ou(this)},Bf.prototype.createEdge=function(){return new Dp(this)},Bf.className="TreeNetwork";function Ou(a){na.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 vt(0,0),this.Da=new Sn(0,0),this.la=new vt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Ap,this.hd=oy,this.Kb=0,this.Jb=Ff,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Jg,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=ma,this.wr=!0,this.Dp=ma}Ve(Ou,na),Ou.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(Ou.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)}}}),Ou.className="TreeVertex";function Dp(a){ql.call(this,a),this.$t=new vt(0,0)}Ve(Dp,ql),Dp.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 Wh:x=this.fromVertex,b=this.toVertex;break;case If:x=this.toVertex,b=this.fromVertex;break;default:rn("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=Ju(x),ne=y.computeLayerSpacing(x),ae=x.rowSpacing;a.vg();var ce=a.curve===lu,_e=a.isOrthogonal,Pe;if(a.uh(),_e||ce){for(Pe=2;4<a.pointsCount;)a.pv(2);var Ne=a.i(1),Ge=a.i(2)}else{for(Pe=1;3<a.pointsCount;)a.pv(1);Ne=a.i(0),Ge=a.i(a.pointsCount-1)}var Ye=a.i(a.pointsCount-1);te===0?(x.alignment===Vh?(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===Kh?(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,ce?(a.m(Pe,Ne.x,te),Pe++,a.m(Pe,b.right+ne,te),Pe++,a.m(Pe,b.right+ne+(E.x-ae)/3,te),Pe++,a.m(Pe,b.right+ne+2*(E.x-ae)/3,te),Pe++,a.m(Pe,b.right+ne+(E.x-ae),te),Pe++,a.m(Pe,Ge.x,te)):(_e&&(a.m(Pe,b.right+ne/2,Ne.y),Pe++),a.m(Pe,b.right+ne/2,te),Pe++,a.m(Pe,b.right+ne+E.x-(_e?ae/2:ae),te),Pe++,_e&&a.m(Pe,a.i(Pe-1).x,Ge.y))):te===90?(x.alignment===Vh?(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===Kh?(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,ce?(a.m(Pe,te,Ne.y),Pe++,a.m(Pe,te,b.bottom+ne),Pe++,a.m(Pe,te,b.bottom+ne+(E.y-ae)/3),Pe++,a.m(Pe,te,b.bottom+ne+2*(E.y-ae)/3),Pe++,a.m(Pe,te,b.bottom+ne+(E.y-ae)),Pe++,a.m(Pe,te,Ge.y)):(_e&&(a.m(Pe,Ne.x,b.bottom+ne/2),Pe++),a.m(Pe,te,b.bottom+ne/2),Pe++,a.m(Pe,te,b.bottom+ne+E.y-(_e?ae/2:ae)),Pe++,_e&&a.m(Pe,Ge.x,a.i(Pe-1).y))):te===180?(x.alignment===Vh?(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===Kh?(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,ce?(a.m(Pe,Ne.x,te),Pe++,a.m(Pe,b.left-ne,te),Pe++,a.m(Pe,b.left-ne+(E.x+ae)/3,te),Pe++,a.m(Pe,b.left-ne+2*(E.x+ae)/3,te),Pe++,a.m(Pe,b.left-ne+(E.x+ae),te),Pe++,a.m(Pe,Ge.x,te)):(_e&&(a.m(Pe,b.left-ne/2,Ne.y),Pe++),a.m(Pe,b.left-ne/2,te),Pe++,a.m(Pe,b.left-ne+E.x+(_e?ae/2:ae),te),Pe++,_e&&a.m(Pe,a.i(Pe-1).x,Ge.y))):te===270?(x.alignment===Vh?(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===Kh?(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,ce?(a.m(Pe,te,Ne.y),Pe++,a.m(Pe,te,b.top-ne),Pe++,a.m(Pe,te,b.top-ne+(E.y+ae)/3),Pe++,a.m(Pe,te,b.top-ne+2*(E.y+ae)/3),Pe++,a.m(Pe,te,b.top-ne+(E.y+ae)),Pe++,a.m(Pe,te,Ge.y)):(_e&&(a.m(Pe,Ne.x,b.top-ne/2),Pe++),a.m(Pe,te,b.top-ne/2),Pe++,a.m(Pe,te,b.top-ne+E.y+(_e?ae/2:ae)),Pe++,_e&&a.m(Pe,Ge.x,a.i(Pe-1).y))):rn("Invalid angle "+te),a.zf()}else E=b,a=this.link,b=this.network.layout,y=Ju(x),y!==Ju(E)&&(ne=b.computeLayerSpacing(x),ae=x.bounds,x=E.bounds,y===0&&x.left-ae.right<ne+1||y===90&&x.top-ae.bottom<ne+1||y===180&&ae.left-x.right<ne+1||y===270&&ae.top-x.bottom<ne+1||(a.vg(),x=a.curve===lu,E=a.isOrthogonal,b=Pd(this.fromVertex.alignment),a.uh(),y===0?(y=ae.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=ae.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=ae.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=ae.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(Dp.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)}}}),Dp.className="TreeEdge",Ko.prototype.initializeStandardTools=function(){this.gb("Action",new Or,this.mouseDownTools),this.gb("Relinking",new Vn,this.mouseDownTools),this.gb("LinkReshaping",new En,this.mouseDownTools),this.gb("Rotating",new tr,this.mouseDownTools),this.gb("Resizing",new sr,this.mouseDownTools),this.gb("Linking",new qt,this.mouseMoveTools),this.gb("Dragging",new us,this.mouseMoveTools),this.gb("DragSelecting",new To,this.mouseMoveTools),this.gb("Panning",new nr,this.mouseMoveTools),this.gb("ContextMenu",new Vr,this.mouseUpTools),this.gb("TextEditing",new Ri,this.mouseUpTools),this.gb("ClickCreating",new So,this.mouseUpTools),this.gb("ClickSelecting",new so,this.mouseUpTools)},bh("Horizontal",new ym),bh("Spot",new xm),bh("Table",new _m),bh("Viewbox",new Cm),bh("TableRow",new bm),bh("TableColumn",new Pm),bh("Graduated",new dg),bh("Grid",new cg),np.add("GraphLinksModel",ya),np.add("TreeModel",Su);var W0=Ot.go,zy={get licenseKey(){return ln.licenseKey},set licenseKey(a){ln.licenseKey=a},get version(){return ln.version},Group:ur,EnumValue:dn,List:zn,Set:Ut,Map:Dn,Point:vt,Size:Sn,Rect:pn,Margin:Ei,Spot:di,Geometry:Kn,PathFigure:Gs,PathSegment:Kr,InputEvent:sa,DiagramEvent:$u,ChangedEvent:rs,Model:xi,GraphLinksModel:Br,TreeModel:vl,Binding:Bs,Transaction:Ws,UndoManager:as,CommandHandler:Pt,Tool:Fr,DraggingTool:us,DraggingInfo:cc,DraggingOptions:de,LinkingBaseTool:Xi,LinkingTool:qt,RelinkingTool:Vn,LinkReshapingTool:En,ResizingTool:sr,RotatingTool:tr,ClickSelectingTool:so,ActionTool:Or,ClickCreatingTool:So,HTMLInfo:Tr,ContextMenuTool:Vr,DragSelectingTool:To,PanningTool:nr,TextEditingTool:Ri,ToolManager:Ko,Animation:va,AnimationManager:Da,AnimationTrigger:Zl,Layer:Qr,Diagram:ln,Palette:Te,Overview:Ie,Brush:Po,GraphObject:Xt,Panel:Rn,RowColumnDefinition:Xs,Shape:mr,TextBlock:Vo,Picture:Ll,Part:Ni,Adornment:$r,Node:ii,Link:Gn,Placeholder:fl,Layout:ls,LayoutNetwork:Zo,LayoutVertex:na,LayoutEdge:ql,GridLayout:Ea,PanelLayout:ta,CircularLayout:gs,CircularNetwork:Mp,CircularVertex:zg,CircularEdge:P0,ForceDirectedLayout:Ra,ForceDirectedNetwork:Of,ForceDirectedVertex:Ug,ForceDirectedEdge:Hg,LayeredDigraphLayout:Mo,LayeredDigraphNetwork:Tp,LayeredDigraphVertex:wu,LayeredDigraphEdge:Kg,TreeLayout:Nr,TreeNetwork:Bf,TreeVertex:Ou,TreeEdge:Dp};typeof W0=="object"&&W0.version&&_i("WARNING: a `go` object on the root object is already defined. "+("Debug"in W0?"debug ":"")+"version: "+W0.version+", replaced with version: "+zy.version),ln.prototype.go=zy,Ot.go=zy,typeof _n.exports=="object"&&(_n.exports=typeof De.g!="undefined"?De.g.go:self.go)}();var Le=typeof De.g!="undefined"?De.g.go:self.go;const ye=typeof De.g!="undefined"?De.g.go:self.go,Fe=ye.Group,Me=ye.EnumValue,Ee=ye.List,me=ye.Set,be=ye.Map,ve=ye.Point,we=ye.Size,ge=ye.Rect,he=ye.Margin,xe=ye.Spot,fe=ye.Geometry,ue=ye.PathFigure,ee=ye.PathSegment,z=ye.InputEvent,oe=ye.DiagramEvent,ie=ye.ChangedEvent,se=ye.Model,le=ye.GraphLinksModel,Se=ye.TreeModel,pe=ye.Binding,Ce=ye.Transaction,Ae=ye.UndoManager,Oe=ye.CommandHandler,Re=ye.Tool,We=ye.DraggingTool,$e=ye.DraggingInfo,Je=ye.LinkingBaseTool,pt=ye.LinkingTool,St=ye.RelinkingTool,Mt=ye.LinkReshapingTool,ct=ye.ResizingTool,wt=ye.RotatingTool,ft=ye.ClickSelectingTool,$t=ye.ActionTool,st=ye.ClickCreatingTool,et=ye.HTMLInfo,lt=ye.ContextMenuTool,dt=ye.DragSelectingTool,bt=ye.PanningTool,yt=ye.TextEditingTool,Vt=ye.ToolManager,Kt=ye.Animation,gn=ye.AnimationManager,Gt=ye.AnimationTrigger,Dt=ye.Layer,on=ye.Diagram,Jt=ye.Palette,jt=ye.Overview,ut=ye.Brush,ze=ye.GraphObject,je=ye.Panel,it=ye.RowColumnDefinition,ht=ye.Shape,nt=ye.TextBlock,Ke=ye.TextBlockMetrics,Be=ye.Picture,Ue=ye.Part,rt=ye.Adornment,Ze=ye.Node,Xe=ye.Link,mt=ye.Placeholder,Rt=ye.Layout,vn=ye.LayoutNetwork,An=ye.LayoutVertex,Mn=ye.LayoutEdge,hi=ye.GridLayout,mi=ye.PanelLayout,si=ye.CircularLayout,Cn=ye.CircularNetwork,Ki=ye.CircularVertex,Yn=ye.CircularEdge,Qi=ye.ForceDirectedLayout,vr=ye.ForceDirectedNetwork,Dr=ye.ForceDirectedVertex,Ci=ye.ForceDirectedEdge,kr=ye.LayeredDigraphLayout,vo=ye.LayeredDigraphNetwork,qo=ye.LayeredDigraphVertex,Do=ye.LayeredDigraphEdge,Oo=ye.TreeLayout,Cr=ye.TreeNetwork,jo=ye.TreeVertex,or=ye.TreeEdge,kn=ye.version},19575:function(_n,hn,De){var Le,ye;(function(Fe,Me){_n.exports=Me(Fe)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof De.g!="undefined"?De.g:this,function(Fe){"use strict";Fe=Fe||{};var Me=Fe.Base64,Ee="2.6.4",me="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",be=function(St){for(var Mt={},ct=0,wt=St.length;ct<wt;ct++)Mt[St.charAt(ct)]=ct;return Mt}(me),ve=String.fromCharCode,we=function(St){if(St.length<2){var Mt=St.charCodeAt(0);return Mt<128?St:Mt<2048?ve(192|Mt>>>6)+ve(128|Mt&63):ve(224|Mt>>>12&15)+ve(128|Mt>>>6&63)+ve(128|Mt&63)}else{var Mt=65536+(St.charCodeAt(0)-55296)*1024+(St.charCodeAt(1)-56320);return ve(240|Mt>>>18&7)+ve(128|Mt>>>12&63)+ve(128|Mt>>>6&63)+ve(128|Mt&63)}},ge=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,he=function(St){return St.replace(ge,we)},xe=function(St){var Mt=[0,2,1][St.length%3],ct=St.charCodeAt(0)<<16|(St.length>1?St.charCodeAt(1):0)<<8|(St.length>2?St.charCodeAt(2):0),wt=[me.charAt(ct>>>18),me.charAt(ct>>>12&63),Mt>=2?"=":me.charAt(ct>>>6&63),Mt>=1?"=":me.charAt(ct&63)];return wt.join("")},fe=Fe.btoa&&typeof Fe.btoa=="function"?function(St){return Fe.btoa(St)}:function(St){if(St.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return St.replace(/[\s\S]{1,3}/g,xe)},ue=function(St){return fe(he(String(St)))},ee=function(St){return St.replace(/[+\/]/g,function(Mt){return Mt=="+"?"-":"_"}).replace(/=/g,"")},z=function(St,Mt){return Mt?ee(ue(St)):ue(St)},oe=function(St){return z(St,!0)},ie;Fe.Uint8Array&&(ie=function(St,Mt){for(var ct="",wt=0,ft=St.length;wt<ft;wt+=3){var $t=St[wt],st=St[wt+1],et=St[wt+2],lt=$t<<16|st<<8|et;ct+=me.charAt(lt>>>18)+me.charAt(lt>>>12&63)+(typeof st!="undefined"?me.charAt(lt>>>6&63):"=")+(typeof et!="undefined"?me.charAt(lt&63):"=")}return Mt?ee(ct):ct});var se=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,le=function(St){switch(St.length){case 4:var Mt=(7&St.charCodeAt(0))<<18|(63&St.charCodeAt(1))<<12|(63&St.charCodeAt(2))<<6|63&St.charCodeAt(3),ct=Mt-65536;return ve((ct>>>10)+55296)+ve((ct&1023)+56320);case 3:return ve((15&St.charCodeAt(0))<<12|(63&St.charCodeAt(1))<<6|63&St.charCodeAt(2));default:return ve((31&St.charCodeAt(0))<<6|63&St.charCodeAt(1))}},Se=function(St){return St.replace(se,le)},pe=function(St){var Mt=St.length,ct=Mt%4,wt=(Mt>0?be[St.charAt(0)]<<18:0)|(Mt>1?be[St.charAt(1)]<<12:0)|(Mt>2?be[St.charAt(2)]<<6:0)|(Mt>3?be[St.charAt(3)]:0),ft=[ve(wt>>>16),ve(wt>>>8&255),ve(wt&255)];return ft.length-=[0,0,2,1][ct],ft.join("")},Ce=Fe.atob&&typeof Fe.atob=="function"?function(St){return Fe.atob(St)}:function(St){return St.replace(/\S{1,4}/g,pe)},Ae=function(St){return Ce(String(St).replace(/[^A-Za-z0-9\+\/]/g,""))},Oe=function(St){return Se(Ce(St))},Re=function(St){return String(St).replace(/[-_]/g,function(Mt){return Mt=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},We=function(St){return Oe(Re(St))},$e;Fe.Uint8Array&&($e=function(St){return Uint8Array.from(Ae(Re(St)),function(Mt){return Mt.charCodeAt(0)})});var Je=function(){var St=Fe.Base64;return Fe.Base64=Me,St};if(Fe.Base64={VERSION:Ee,atob:Ae,btoa:fe,fromBase64:We,toBase64:z,utob:he,encode:z,encodeURI:oe,btou:Se,decode:We,noConflict:Je,fromUint8Array:ie,toUint8Array:$e},typeof Object.defineProperty=="function"){var pt=function(St){return{value:St,enumerable:!1,writable:!0,configurable:!0}};Fe.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",pt(function(){return We(this)})),Object.defineProperty(String.prototype,"toBase64",pt(function(St){return z(this,St)})),Object.defineProperty(String.prototype,"toBase64URI",pt(function(){return z(this,!0)}))}}return Fe.Meteor&&(Base64=Fe.Base64),_n.exports?_n.exports.Base64=Fe.Base64:(Le=[],ye=function(){return Fe.Base64}.apply(hn,Le),ye!==void 0&&(_n.exports=ye)),{Base64:Fe.Base64}})},15979:function(_n,hn,De){"use strict";De.d(hn,{hP:function(){return jt}});var Le=function(ut,ze){return(Le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(je,it){je.__proto__=it}||function(je,it){for(var ht in it)Object.prototype.hasOwnProperty.call(it,ht)&&(je[ht]=it[ht])})(ut,ze)};function ye(ut,ze){function je(){this.constructor=ut}Le(ut,ze),ut.prototype=ze===null?Object.create(ze):(je.prototype=ze.prototype,new je)}function Fe(ut,ze,je,it){return new(je||(je=Promise))(function(ht,nt){function Ke(rt){try{Ue(it.next(rt))}catch(Ze){nt(Ze)}}function Be(rt){try{Ue(it.throw(rt))}catch(Ze){nt(Ze)}}function Ue(rt){var Ze;rt.done?ht(rt.value):(Ze=rt.value,Ze instanceof je?Ze:new je(function(Xe){Xe(Ze)})).then(Ke,Be)}Ue((it=it.apply(ut,ze||[])).next())})}function Me(ut,ze){var je,it,ht,nt,Ke={label:0,sent:function(){if(1&ht[0])throw ht[1];return ht[1]},trys:[],ops:[]};return nt={next:Be(0),throw:Be(1),return:Be(2)},typeof Symbol=="function"&&(nt[Symbol.iterator]=function(){return this}),nt;function Be(Ue){return function(rt){return function(Ze){if(je)throw new TypeError("Generator is already executing.");for(;Ke;)try{if(je=1,it&&(ht=2&Ze[0]?it.return:Ze[0]?it.throw||((ht=it.return)&&ht.call(it),0):it.next)&&!(ht=ht.call(it,Ze[1])).done)return ht;switch(it=0,ht&&(Ze=[2&Ze[0],ht.value]),Ze[0]){case 0:case 1:ht=Ze;break;case 4:return Ke.label++,{value:Ze[1],done:!1};case 5:Ke.label++,it=Ze[1],Ze=[0];continue;case 7:Ze=Ke.ops.pop(),Ke.trys.pop();continue;default:if(ht=Ke.trys,!((ht=ht.length>0&&ht[ht.length-1])||Ze[0]!==6&&Ze[0]!==2)){Ke=0;continue}if(Ze[0]===3&&(!ht||Ze[1]>ht[0]&&Ze[1]<ht[3])){Ke.label=Ze[1];break}if(Ze[0]===6&&Ke.label<ht[1]){Ke.label=ht[1],ht=Ze;break}if(ht&&Ke.label<ht[2]){Ke.label=ht[2],Ke.ops.push(Ze);break}ht[2]&&Ke.ops.pop(),Ke.trys.pop();continue}Ze=ze.call(ut,Ke)}catch(Xe){Ze=[6,Xe],it=0}finally{je=ht=0}if(5&Ze[0])throw Ze[1];return{value:Ze[0]?Ze[1]:void 0,done:!0}}([Ue,rt])}}}function Ee(){for(var ut=0,ze=0,je=arguments.length;ze<je;ze++)ut+=arguments[ze].length;var it=Array(ut),ht=0;for(ze=0;ze<je;ze++)for(var nt=arguments[ze],Ke=0,Be=nt.length;Ke<Be;Ke++,ht++)it[ht]=nt[Ke];return it}var me=function(){function ut(){}return ut.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ut.setAttributes=function(ze,je){for(var it=0,ht=je;it<ht.length;it++){var nt=ht[it],Ke=nt[0],Be=nt[1];ze.setAttribute(Ke,Be)}},ut.createRect=function(ze,je,it){var ht=document.createElementNS("http://www.w3.org/2000/svg","rect");return ht.setAttribute("width",ze.toString()),ht.setAttribute("height",je.toString()),it&&ut.setAttributes(ht,it),ht},ut.createLine=function(ze,je,it,ht,nt){var Ke=document.createElementNS("http://www.w3.org/2000/svg","line");return Ke.setAttribute("x1",ze.toString()),Ke.setAttribute("y1",je.toString()),Ke.setAttribute("x2",it.toString()),Ke.setAttribute("y2",ht.toString()),nt&&ut.setAttributes(Ke,nt),Ke},ut.createPolygon=function(ze,je){var it=document.createElementNS("http://www.w3.org/2000/svg","polygon");return it.setAttribute("points",ze),je&&ut.setAttributes(it,je),it},ut.createCircle=function(ze,je){var it=document.createElementNS("http://www.w3.org/2000/svg","circle");return it.setAttribute("cx",(ze/2).toString()),it.setAttribute("cy",(ze/2).toString()),it.setAttribute("r",ze.toString()),je&&ut.setAttributes(it,je),it},ut.createEllipse=function(ze,je,it){var ht=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ht.setAttribute("cx",(ze/2).toString()),ht.setAttribute("cy",(je/2).toString()),ht.setAttribute("rx",(ze/2).toString()),ht.setAttribute("ry",(je/2).toString()),it&&ut.setAttributes(ht,it),ht},ut.createGroup=function(ze){var je=document.createElementNS("http://www.w3.org/2000/svg","g");return ze&&ut.setAttributes(je,ze),je},ut.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ut.createMarker=function(ze,je,it,ht,nt,Ke,Be){var Ue=document.createElementNS("http://www.w3.org/2000/svg","marker");return ut.setAttributes(Ue,[["id",ze],["orient",je],["markerWidth",it.toString()],["markerHeight",ht.toString()],["refX",nt.toString()],["refY",Ke.toString()]]),Ue.appendChild(Be),Ue},ut.createText=function(ze){var je=document.createElementNS("http://www.w3.org/2000/svg","text");return je.setAttribute("x","0"),je.setAttribute("y","0"),ze&&ut.setAttributes(je,ze),je},ut.createTSpan=function(ze,je){var it=document.createElementNS("http://www.w3.org/2000/svg","tspan");return it.textContent=ze,je&&ut.setAttributes(it,je),it},ut.createImage=function(ze){var je=document.createElementNS("http://www.w3.org/2000/svg","image");return ze&&ut.setAttributes(je,ze),je},ut.createPoint=function(ze,je){var it=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return it.x=ze,it.y=je,it},ut.createPath=function(ze,je){var it=document.createElementNS("http://www.w3.org/2000/svg","path");return it.setAttribute("d",ze),je&&ut.setAttributes(it,je),it},ut}(),be=function(){function ut(){}return ut.addKey=function(ze){ut.key=ze},Object.defineProperty(ut,"isLicensed",{get:function(){return!!ut.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ut.key)},enumerable:!1,configurable:!0}),ut}(),ve=function(){function ut(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ut.prototype.rasterize=function(ze,je,it){var ht=this;return new Promise(function(nt){var Ke=it!==void 0?it:document.createElement("canvas");ze===null&&(ht.markersOnly=!0,ht.naturalSize=!1);var Be=document.createElementNS("http://www.w3.org/2000/svg","svg");Be.setAttribute("xmlns","http://www.w3.org/2000/svg"),Be.setAttribute("width",je.width.baseVal.valueAsString),Be.setAttribute("height",je.height.baseVal.valueAsString),Be.setAttribute("viewBox","0 0 "+je.viewBox.baseVal.width.toString()+" "+je.viewBox.baseVal.height.toString()),Be.innerHTML=je.innerHTML,ht.naturalSize===!0?(Be.width.baseVal.value=ze.naturalWidth,Be.height.baseVal.value=ze.naturalHeight):ht.width!==void 0&&ht.height!==void 0&&(Be.width.baseVal.value=ht.width,Be.height.baseVal.value=ht.height),Ke.width=Be.width.baseVal.value,Ke.height=Be.height.baseVal.value;var Ue=Be.outerHTML,rt=Ke.getContext("2d");ht.markersOnly!==!0&&rt.drawImage(ze,0,0,Ke.width,Ke.height);var Ze=window.URL,Xe=new Image(Ke.width,Ke.height);Xe.setAttribute("crossOrigin","anonymous");var mt=new Blob([Ue],{type:"image/svg+xml"}),Rt=Ze.createObjectURL(mt);Xe.onload=function(){rt.drawImage(Xe,0,0),Ze.revokeObjectURL(Rt);var vn=Ke.toDataURL(ht.imageType,ht.imageQuality);nt(vn)},Xe.src=Rt})},ut}(),we=function(){},ge=function(){function ut(ze){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ze+"_"}return Object.defineProperty(ut.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ut.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ut.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(ut.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ut.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ut.prototype.addClass=function(ze){return this.styleSheet===void 0&&this.addStyleSheet(),ze.name=""+this.classNamePrefix+ze.localName,this.classes.push(ze),this.styleSheet.sheet.insertRule("."+ze.name+" {"+ze.style+"}",this.styleSheet.sheet.cssRules.length),ze},ut.prototype.addRule=function(ze){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(ze),this.styleSheet.sheet.insertRule(ze.selector+" {"+ze.style+"}",this.styleSheet.sheet.cssRules.length)},ut.prototype.addStyleSheet=function(){var ze;this.styleSheet=document.createElement("style"),((ze=this.styleSheetRoot)!==null&&ze!==void 0?ze:document.head).appendChild(this.styleSheet),this.addRule(new he("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new he("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new he("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new xe("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new xe("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},ut.prototype.removeStyleSheet=function(){var ze;this.styleSheet&&(((ze=this.styleSheetRoot)!==null&&ze!==void 0?ze:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ut}(),he=function(ut,ze){this.selector=ut,this.style=ze},xe=function(ut,ze){this.localName=ut,this.style=ze},fe=function(){function ut(ze,je,it,ht,nt){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=ze,this.displayMode=je,this.markerItems=it,this.uiStyleSettings=ht,this.styles=nt,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return ut.prototype.show=function(ze){var je=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ze,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var it=document.createElement("div");it.className=this.toolbarBlockStyleClass.name,it.style.whiteSpace="nowrap",this.uiContainer.appendChild(it),this.addActionButton(it,'<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(it,'<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(it,'<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(it,'<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(it,'<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(it,'<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(it,'<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(it,'<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(nt){var Ke=document.createElement("div");Ke.className=""+je.toolbarButtonStyleClass.name,Ke.setAttribute("data-type-name",nt.typeName),Ke.innerHTML=nt.icon,Ke.addEventListener("click",function(){je.markerToolbarButtonClicked(Ke,nt)}),je.buttons.push(Ke),je.markerButtons.push(Ke)}),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()},ut.prototype.addButtonClickListener=function(ze){this.buttonClickListeners.push(ze)},ut.prototype.removeButtonClickListener=function(ze){this.buttonClickListeners.indexOf(ze)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(ze),1)},ut.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ut.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var ze=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var je=0;je<this.markerButtons.length;je++)je<ze||je===ze&&this.markerButtons.length-1===ze?this.markerButtonBlock.appendChild(this.markerButtons[je]):(je===ze&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[je]))}},ut.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")},ut.prototype.resetButtonStyles=function(){var ze=this;this.buttons.forEach(function(je){je.className=je.className.replace(ze.uiStyleSettings.toolbarButtonStyleColorsClassName?ze.uiStyleSettings.toolbarButtonStyleColorsClassName:ze.toolbarButtonStyleColorsClass.name,"").trim(),je.className=je.className.replace(ze.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?ze.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:ze.toolbarActiveButtonStyleColorsClass.name,"").trim(),je.className+=" "+(ze.uiStyleSettings.toolbarButtonStyleColorsClassName?ze.uiStyleSettings.toolbarButtonStyleColorsClassName:ze.toolbarButtonStyleColorsClass.name)})},ut.prototype.addActionButton=function(ze,je,it){var ht=this,nt=document.createElement("div");switch(nt.className=""+this.toolbarButtonStyleClass.name,nt.innerHTML=je,nt.setAttribute("data-action",it),nt.addEventListener("click",function(){ht.actionToolbarButtonClicked(nt,it)}),it){case"select":nt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":nt.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":nt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":nt.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":nt.style.fill=this.uiStyleSettings.closeButtonColor}ze.appendChild(nt),this.buttons.push(nt)},ut.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new xe("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 xe("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new xe("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new xe("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 xe("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var ze=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new xe("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*ze)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*ze)+`px;
|
|
|
padding: `+ze+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new xe("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new xe("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new he("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new he("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},ut.prototype.markerToolbarButtonClicked=function(ze,je){this.setActiveButton(ze),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(it){return it("marker",je)}),this.markerButtonOverflowBlock.style.display="none"},ut.prototype.actionToolbarButtonClicked=function(ze,je){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(it){return it("action",je)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ut.prototype.setActiveButton=function(ze){this.resetButtonStyles(),ze.className=ze.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),ze.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ut.prototype.setActiveMarkerButton=function(ze){var je=this.markerButtons.find(function(it){return it.getAttribute("data-type-name")===ze});je&&this.setActiveButton(je)},ut.prototype.setCurrentMarker=function(ze){var je=this;this.currentMarker=ze,this.buttons.filter(function(it){return/delete|notes/.test(it.getAttribute("data-action"))}).forEach(function(it){je.currentMarker===void 0?(it.style.fillOpacity="0.4",it.style.pointerEvents="none"):(it.style.fillOpacity="1",it.style.pointerEvents="all")})},ut}(),ue=function(){function ut(ze,je,it,ht){this.panels=[],this.panelButtons=[],this.markerjsContainer=ze,this.displayMode=je,this.uiStyleSettings=it,this.styles=ht,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ut.prototype.addStyles=function(){var ze;this.toolboxStyleClass=this.styles.addClass(new xe("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 xe("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var je=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new xe("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new xe("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new xe("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 xe("toolbox-panel-row_colors",`
|
|
|
background-color: `+((ze=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ze!==void 0?ze:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new xe("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*je)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*je)+`px;
|
|
|
padding: `+je+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new xe("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new xe("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new he("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new he("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},ut.prototype.show=function(ze){var je;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ze,this.uiContainer.className=this.toolboxStyleClass.name+" "+((je=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&je!==void 0?je:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ut.prototype.setPanelButtons=function(ze){var je,it,ht=this;this.panels=ze,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((je=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&je!==void 0?je:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((it=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&it!==void 0?it:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(nt){var Ke;nt.uiStyleSettings=ht.uiStyleSettings;var Be=document.createElement("div");Be.className=ht.toolboxButtonStyleClass.name+" "+((Ke=ht.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ke!==void 0?Ke:ht.toolboxButtonStyleColorsClass.name),Be.innerHTML=nt.icon,Be.title=nt.title,Be.addEventListener("click",function(){ht.panelButtonClick(nt)}),ht.panelButtons.push(Be),ht.buttonRow.appendChild(Be)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ut.prototype.panelButtonClick=function(ze){var je=this,it=-1;if(ze!==this.activePanel){it=this.panels.indexOf(ze),this.panelRow.innerHTML="";var ht=ze.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=ze}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){je.displayMode==="inline"?je.panelRow.style.display="none":je.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(nt,Ke){var Be,Ue;nt.className=je.toolboxButtonStyleClass.name+" "+(Ke===it?""+((Be=je.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Be!==void 0?Be:je.toolboxActiveButtonStyleColorsClass.name):""+((Ue=je.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ue!==void 0?Ue:je.toolboxButtonStyleColorsClass.name))})},ut}(),ee=function(ut,ze){this.title=ut,this.icon=ze},z=function(ut){function ze(je,it,ht,nt){var Ke=ut.call(this,je,nt||'<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 Ke.colors=[],Ke.addTransparent=!1,Ke.colorBoxes=[],Ke.colors=it,Ke.currentColor=ht,Ke.setCurrentColor=Ke.setCurrentColor.bind(Ke),Ke.getColorBox=Ke.getColorBox.bind(Ke),Ke}return ye(ze,ut),ze.prototype.getUi=function(){var je=this,it=document.createElement("div");return it.style.overflow="hidden",it.style.whiteSpace="nowrap",this.colors.forEach(function(ht){var nt=je.getColorBox(ht);it.appendChild(nt),je.colorBoxes.push(nt)}),it},ze.prototype.getColorBox=function(je){var it=this,ht=this.uiStyleSettings.toolbarHeight/4,nt=this.uiStyleSettings.toolbarHeight-ht,Ke=document.createElement("div");Ke.style.display="inline-block",Ke.style.boxSizing="content-box",Ke.style.width=nt-2+"px",Ke.style.height=nt-2+"px",Ke.style.padding="1px",Ke.style.marginRight="2px",Ke.style.marginBottom="2px",Ke.style.borderWidth="2px",Ke.style.borderStyle="solid",Ke.style.borderRadius=(nt+2)/2+"px",Ke.style.borderColor=je===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ke.addEventListener("click",function(){it.setCurrentColor(je,Ke)});var Be=document.createElement("div");return Be.style.display="inline-block",Be.style.width=nt-2+"px",Be.style.height=nt-2+"px",Be.style.backgroundColor=je,Be.style.borderRadius=nt/2+"px",je==="transparent"&&(Be.style.fill=this.uiStyleSettings.toolboxAccentColor,Be.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>`),Ke.appendChild(Be),Ke},ze.prototype.setCurrentColor=function(je,it){var ht=this;this.currentColor=je,this.colorBoxes.forEach(function(nt){nt.style.borderColor=nt===it?ht.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(je)},ze}(ee),oe=function(){function ut(ze,je,it){this._state="new",this._isSelected=!1,this._container=ze,this._overlayContainer=je,this.globalSettings=it,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ut.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ut.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ut.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ut.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ut.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ut.prototype.ownsTarget=function(ze){return!1},Object.defineProperty(ut.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ut.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ut.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ut.prototype.pointerDown=function(ze,je){},ut.prototype.dblClick=function(ze,je){},ut.prototype.manipulate=function(ze){},ut.prototype.pointerUp=function(ze){this.stateChanged()},ut.prototype.dispose=function(){},ut.prototype.addMarkerVisualToContainer=function(ze){this.container.childNodes.length>0?this.container.insertBefore(ze,this.container.childNodes[0]):this.container.appendChild(ze)},ut.prototype.getState=function(){return{typeName:ut.typeName,state:this.state,notes:this.notes}},ut.prototype.restoreState=function(ze){this._state=ze.state,this.notes=ze.notes},ut.prototype.scale=function(ze,je){},ut.prototype.colorChanged=function(ze){this.onColorChanged&&this.onColorChanged(ze),this.stateChanged()},ut.prototype.fillColorChanged=function(ze){this.onFillColorChanged&&this.onFillColorChanged(ze),this.stateChanged()},ut.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var ze=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),ze.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(ze)&&this.onStateChanged(this)}},ut.typeName="MarkerBase",ut}(),ie=function(){function ut(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ut.prototype.findGripByVisual=function(ze){return this.topLeft.ownsTarget(ze)?this.topLeft:this.topCenter.ownsTarget(ze)?this.topCenter:this.topRight.ownsTarget(ze)?this.topRight:this.centerLeft.ownsTarget(ze)?this.centerLeft:this.centerRight.ownsTarget(ze)?this.centerRight:this.bottomLeft.ownsTarget(ze)?this.bottomLeft:this.bottomCenter.ownsTarget(ze)?this.bottomCenter:this.bottomRight.ownsTarget(ze)?this.bottomRight:void 0},ut}(),se=function(){function ut(){this.GRIP_SIZE=10,this.visual=me.createGroup(),this.visual.appendChild(me.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(me.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ut.prototype.ownsTarget=function(ze){return ze===this.visual||ze===this.visual.childNodes[0]||ze===this.visual.childNodes[1]},ut}(),le=function(){function ut(){}return ut.toITransformMatrix=function(ze){return{a:ze.a,b:ze.b,c:ze.c,d:ze.d,e:ze.e,f:ze.f}},ut.toSVGMatrix=function(ze,je){return ze.a=je.a,ze.b=je.b,ze.c=je.c,ze.d=je.d,ze.e=je.e,ze.f=je.f,ze},ut}(),Se=function(ut){function ze(je,it,ht){var nt=ut.call(this,je,it,ht)||this;return nt.left=0,nt.top=0,nt.width=0,nt.height=0,nt.defaultSize={x:50,y:20},nt.offsetX=0,nt.offsetY=0,nt.rotationAngle=0,nt.CB_DISTANCE=10,nt._suppressMarkerCreateEvent=!1,nt.container.transform.baseVal.appendItem(me.createTransform()),nt.setupControlBox(),nt}return ye(ze,ut),Object.defineProperty(ze.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"visual",{get:function(){return this._visual},set:function(je){this._visual=je;var it=me.createTransform();this._visual.transform.baseVal.appendItem(it)},enumerable:!1,configurable:!0}),ze.prototype.ownsTarget=function(je){return!!ut.prototype.ownsTarget.call(this,je)||!!(this.controlGrips.findGripByVisual(je)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(je))},ze.prototype.pointerDown=function(je,it){ut.prototype.pointerDown.call(this,je,it),this.state==="new"&&(this.left=je.x,this.top=je.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ht=this.unrotatePoint(je);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(it),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(it)){this.activeGrip=this.rotatorGrip;var nt=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=nt.x-this.width/2,this.top=nt.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ke=this.container.transform.baseVal.getItem(0);Ke.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ke,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},ze.prototype.pointerUp=function(je){var it=this.state;ut.prototype.pointerUp.call(this,je),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(je),this._state="select",it==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},ze.prototype.moveVisual=function(je){this.visual.style.transform="translate("+je.x+"px, "+je.y+"px)"},ze.prototype.manipulate=function(je){var it=this.unrotatePoint(je);this.state==="creating"?this.resize(je):this.state==="move"?(this.left=this.manipulationStartLeft+(it.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(it.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(it):this.state==="rotate"&&this.rotate(je)},ze.prototype.resize=function(je){var it=this.manipulationStartLeft,ht=this.manipulationStartWidth,nt=this.manipulationStartTop,Ke=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:it=this.manipulationStartLeft+je.x-this.manipulationStartX,ht=this.manipulationStartWidth+this.manipulationStartLeft-it;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ht=this.manipulationStartWidth+je.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:nt=this.manipulationStartTop+je.y-this.manipulationStartY,Ke=this.manipulationStartHeight+this.manipulationStartTop-nt;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ke=this.manipulationStartHeight+je.y-this.manipulationStartY}ht>=0?(this.left=it,this.width=ht):(this.left=it+ht,this.width=-ht),Ke>=0?(this.top=nt,this.height=Ke):(this.top=nt+Ke,this.height=-Ke),this.setSize()},ze.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},ze.prototype.rotate=function(je){if(Math.abs(je.x-this.centerX)>.1){var it=Math.sign(je.x-this.centerX);this.rotationAngle=180*Math.atan((je.y-this.centerY)/(je.x-this.centerX))/Math.PI+90*it,this.applyRotation()}},ze.prototype.applyRotation=function(){var je=this.container.transform.baseVal.getItem(0);je.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(je,0)},ze.prototype.rotatePoint=function(je){if(this.rotationAngle===0)return je;var it=this.container.getCTM(),ht=me.createPoint(je.x,je.y);return{x:(ht=ht.matrixTransform(it)).x,y:ht.y}},ze.prototype.unrotatePoint=function(je){if(this.rotationAngle===0)return je;var it=this.container.getCTM();it=it.inverse();var ht=me.createPoint(je.x,je.y);return{x:(ht=ht.matrixTransform(it)).x,y:ht.y}},ze.prototype.select=function(){ut.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ze.prototype.deselect=function(){ut.prototype.deselect.call(this),this.controlBox.style.display="none"},ze.prototype.setupControlBox=function(){this.controlBox=me.createGroup();var je=me.createTransform();je.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(je),this.container.appendChild(this.controlBox),this.controlRect=me.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=me.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 ie,this.addControlGrips(),this.controlBox.style.display="none"},ze.prototype.adjustControlBox=function(){var je=this.controlBox.transform.baseVal.getItem(0);je.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(je,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()},ze.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()},ze.prototype.createGrip=function(){var je=new se;return je.visual.transform.baseVal.appendItem(me.createTransform()),this.controlBox.appendChild(je.visual),je},ze.prototype.positionGrips=function(){var je=this.controlGrips.topLeft.GRIP_SIZE,it=-je/2,ht=it,nt=(this.width+this.CB_DISTANCE)/2-je/2,Ke=(this.height+this.CB_DISTANCE)/2-je/2,Be=this.height+this.CB_DISTANCE-je/2,Ue=this.width+this.CB_DISTANCE-je/2;this.positionGrip(this.controlGrips.topLeft.visual,it,ht),this.positionGrip(this.controlGrips.topCenter.visual,nt,ht),this.positionGrip(this.controlGrips.topRight.visual,Ue,ht),this.positionGrip(this.controlGrips.centerLeft.visual,it,Ke),this.positionGrip(this.controlGrips.centerRight.visual,Ue,Ke),this.positionGrip(this.controlGrips.bottomLeft.visual,it,Be),this.positionGrip(this.controlGrips.bottomCenter.visual,nt,Be),this.positionGrip(this.controlGrips.bottomRight.visual,Ue,Be),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,nt,ht-3*this.CB_DISTANCE)},ze.prototype.positionGrip=function(je,it,ht){var nt=je.transform.baseVal.getItem(0);nt.setTranslate(it,ht),je.transform.baseVal.replaceItem(nt,0)},ze.prototype.hideControlBox=function(){this.controlBox.style.display="none"},ze.prototype.showControlBox=function(){this.controlBox.style.display=""},ze.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)},ut.prototype.getState.call(this))},ze.prototype.restoreState=function(je){ut.prototype.restoreState.call(this,je);var it=je;this.left=it.left,this.top=it.top,this.width=it.width,this.height=it.height,this.rotationAngle=it.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(le.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,it.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(le.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,it.containerTransformMatrix))},ze.prototype.scale=function(je,it){ut.prototype.scale.call(this,je,it);var ht=this.rotatePoint({x:this.left,y:this.top}),nt=this.unrotatePoint({x:ht.x*je,y:ht.y*it});this.left=nt.x,this.top=nt.y,this.width=this.width*je,this.height=this.height*it,this.adjustControlBox()},ze}(oe),pe=function(ut){function ze(je,it,ht){var nt=ut.call(this,je,it,ht)||this;return nt.fillColor="transparent",nt.strokeColor="transparent",nt.strokeWidth=0,nt.strokeDasharray="",nt.opacity=1,nt.setStrokeColor=nt.setStrokeColor.bind(nt),nt.setFillColor=nt.setFillColor.bind(nt),nt.setStrokeWidth=nt.setStrokeWidth.bind(nt),nt.setStrokeDasharray=nt.setStrokeDasharray.bind(nt),nt.createVisual=nt.createVisual.bind(nt),nt}return ye(ze,ut),ze.prototype.ownsTarget=function(je){return!(!ut.prototype.ownsTarget.call(this,je)&&je!==this.visual)},ze.prototype.createVisual=function(){this.visual=me.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)},ze.prototype.pointerDown=function(je,it){ut.prototype.pointerDown.call(this,je,it),this.state==="new"&&(this.createVisual(),this.moveVisual(je),this._state="creating")},ze.prototype.manipulate=function(je){ut.prototype.manipulate.call(this,je)},ze.prototype.resize=function(je){ut.prototype.resize.call(this,je),this.setSize()},ze.prototype.setSize=function(){ut.prototype.setSize.call(this),me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},ze.prototype.pointerUp=function(je){ut.prototype.pointerUp.call(this,je),this.setSize()},ze.prototype.setStrokeColor=function(je){this.strokeColor=je,this.visual&&me.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(je),this.stateChanged()},ze.prototype.setFillColor=function(je){this.fillColor=je,this.visual&&me.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},ze.prototype.setStrokeWidth=function(je){this.strokeWidth=je,this.visual&&me.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ze.prototype.setStrokeDasharray=function(je){this.strokeDasharray=je,this.visual&&me.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ze.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ut.prototype.getState.call(this))},ze.prototype.restoreState=function(je){var it=je;this.fillColor=it.fillColor,this.strokeColor=it.strokeColor,this.strokeWidth=it.strokeWidth,this.strokeDasharray=it.strokeDasharray,this.opacity=it.opacity,this.createVisual(),ut.prototype.restoreState.call(this,je),this.setSize()},ze.prototype.scale=function(je,it){ut.prototype.scale.call(this,je,it),this.setSize()},ze.title="Rectangle marker",ze}(Se),Ce=function(ut){function ze(je,it,ht,nt){var Ke=ut.call(this,je,nt||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Ke.widths=[],Ke.widthBoxes=[],Ke.widths=it,Ke.currentWidth=ht,Ke.setCurrentWidth=Ke.setCurrentWidth.bind(Ke),Ke}return ye(ze,ut),ze.prototype.getUi=function(){var je=this,it=document.createElement("div");return it.style.display="flex",it.style.overflow="hidden",it.style.flexGrow="2",this.widths.forEach(function(ht){var nt=document.createElement("div");nt.style.display="flex",nt.style.flexGrow="2",nt.style.alignItems="center",nt.style.justifyContent="space-between",nt.style.padding="5px",nt.style.borderWidth="2px",nt.style.borderStyle="solid",nt.style.borderColor=ht===je.currentWidth?je.uiStyleSettings.toolboxAccentColor:"transparent",nt.addEventListener("click",function(){je.setCurrentWidth(ht,nt)}),it.appendChild(nt);var Ke=document.createElement("div");Ke.innerText=ht.toString(),Ke.style.marginRight="5px",nt.appendChild(Ke);var Be=document.createElement("div");Be.style.minHeight="20px",Be.style.flexGrow="2",Be.style.display="flex",Be.style.alignItems="center";var Ue=document.createElement("hr");Ue.style.minWidth="20px",Ue.style.border="0px",Ue.style.borderTop=ht+"px solid "+je.uiStyleSettings.toolboxColor,Ue.style.flexGrow="2",Be.appendChild(Ue),nt.appendChild(Be),je.widthBoxes.push(nt)}),it},ze.prototype.setCurrentWidth=function(je,it){var ht=this;this.currentWidth=je,this.widthBoxes.forEach(function(nt){nt.style.borderColor=nt===it?ht.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},ze}(ee),Ae=function(ut){function ze(je,it,ht,nt){var Ke=ut.call(this,je,nt||'<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 Ke.styles=[],Ke.styleBoxes=[],Ke.styles=it,Ke.currentStyle=ht,Ke.setCurrentStyle=Ke.setCurrentStyle.bind(Ke),Ke}return ye(ze,ut),ze.prototype.getUi=function(){var je=this,it=document.createElement("div");return it.style.display="flex",it.style.overflow="hidden",it.style.flexGrow="2",this.styles.forEach(function(ht){var nt=document.createElement("div");nt.style.display="flex",nt.style.alignItems="center",nt.style.justifyContent="space-between",nt.style.padding="5px",nt.style.borderWidth="2px",nt.style.borderStyle="solid",nt.style.overflow="hidden",nt.style.maxWidth=100/je.styles.length-5+"%",nt.style.borderColor=ht===je.currentStyle?je.uiStyleSettings.toolboxAccentColor:"transparent",nt.addEventListener("click",function(){je.setCurrentStyle(ht,nt)}),it.appendChild(nt);var Ke=document.createElement("div");Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.overflow="hidden";var Be=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+je.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ht!==""?'stroke-dasharray="'+ht+'"':"")+` />
|
|
|
</svg>`;Ke.innerHTML=Be,nt.appendChild(Ke),je.styleBoxes.push(nt)}),it},ze.prototype.setCurrentStyle=function(je,it){var ht=this;this.currentStyle=je,this.styleBoxes.forEach(function(nt){nt.style.borderColor=nt===it?ht.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},ze}(ee),Oe=function(ut){function ze(je,it,ht){var nt=ut.call(this,je,it,ht)||this;return nt.strokeColor=ht.defaultColor,nt.strokeWidth=ht.defaultStrokeWidth,nt.strokeDasharray=ht.defaultStrokeDasharray,nt.strokePanel=new z("Line color",ht.defaultColorSet,ht.defaultColor),nt.strokePanel.onColorChanged=nt.setStrokeColor,nt.strokeWidthPanel=new Ce("Line width",ht.defaultStrokeWidths,ht.defaultStrokeWidth),nt.strokeWidthPanel.onWidthChanged=nt.setStrokeWidth,nt.strokeStylePanel=new Ae("Line style",ht.defaultStrokeDasharrays,ht.defaultStrokeDasharray),nt.strokeStylePanel.onStyleChanged=nt.setStrokeDasharray,nt}return ye(ze,ut),Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var je=ut.prototype.getState.call(this);return je.typeName=ze.typeName,je},ze.typeName="FrameMarker",ze.title="Frame marker",ze.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',ze}(pe),Re=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"},We=function(ut){function ze(je,it,ht){var nt=ut.call(this,je,it,ht)||this;return nt.x1=0,nt.y1=0,nt.x2=0,nt.y2=0,nt.defaultLength=50,nt.manipulationStartX=0,nt.manipulationStartY=0,nt.manipulationStartX1=0,nt.manipulationStartY1=0,nt.manipulationStartX2=0,nt.manipulationStartY2=0,nt.setupControlBox(),nt}return ye(ze,ut),ze.prototype.ownsTarget=function(je){return!!ut.prototype.ownsTarget.call(this,je)||!(!this.grip1.ownsTarget(je)&&!this.grip2.ownsTarget(je))},ze.prototype.pointerDown=function(je,it){ut.prototype.pointerDown.call(this,je,it),this.manipulationStartX=je.x,this.manipulationStartY=je.y,this.state==="new"&&(this.x1=je.x,this.y1=je.y,this.x2=je.x,this.y2=je.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(it)?this.activeGrip=this.grip1:this.grip2.ownsTarget(it)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},ze.prototype.pointerUp=function(je){var it=this.state;ut.prototype.pointerUp.call(this,je),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(je),this._state="select",it==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},ze.prototype.adjustVisual=function(){},ze.prototype.manipulate=function(je){this.state==="creating"?this.resize(je):this.state==="move"?(this.x1=this.manipulationStartX1+je.x-this.manipulationStartX,this.y1=this.manipulationStartY1+je.y-this.manipulationStartY,this.x2=this.manipulationStartX2+je.x-this.manipulationStartX,this.y2=this.manipulationStartY2+je.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(je)},ze.prototype.resize=function(je){switch(this.activeGrip){case this.grip1:this.x1=je.x,this.y1=je.y;break;case this.grip2:case void 0:this.x2=je.x,this.y2=je.y}this.adjustVisual(),this.adjustControlBox()},ze.prototype.select=function(){ut.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ze.prototype.deselect=function(){ut.prototype.deselect.call(this),this.controlBox.style.display="none"},ze.prototype.setupControlBox=function(){this.controlBox=me.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},ze.prototype.adjustControlBox=function(){this.positionGrips()},ze.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},ze.prototype.createGrip=function(){var je=new se;return je.visual.transform.baseVal.appendItem(me.createTransform()),this.controlBox.appendChild(je.visual),je},ze.prototype.positionGrips=function(){var je=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-je/2,this.y1-je/2),this.positionGrip(this.grip2.visual,this.x2-je/2,this.y2-je/2)},ze.prototype.positionGrip=function(je,it,ht){var nt=je.transform.baseVal.getItem(0);nt.setTranslate(it,ht),je.transform.baseVal.replaceItem(nt,0)},ze.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ut.prototype.getState.call(this))},ze.prototype.restoreState=function(je){ut.prototype.restoreState.call(this,je);var it=je;this.x1=it.x1,this.y1=it.y1,this.x2=it.x2,this.y2=it.y2},ze.prototype.scale=function(je,it){ut.prototype.scale.call(this,je,it),this.x1=this.x1*je,this.y1=this.y1*it,this.x2=this.x2*je,this.y2=this.y2*it,this.adjustVisual(),this.adjustControlBox()},ze}(oe),$e=function(ut){function ze(je,it,ht){var nt=ut.call(this,je,it,ht)||this;return nt.strokeColor="transparent",nt.strokeWidth=0,nt.strokeDasharray="",nt.setStrokeColor=nt.setStrokeColor.bind(nt),nt.setStrokeWidth=nt.setStrokeWidth.bind(nt),nt.setStrokeDasharray=nt.setStrokeDasharray.bind(nt),nt.strokeColor=ht.defaultColor,nt.strokeWidth=ht.defaultStrokeWidth,nt.strokeDasharray=ht.defaultStrokeDasharray,nt.strokePanel=new z("Line color",ht.defaultColorSet,ht.defaultColor),nt.strokePanel.onColorChanged=nt.setStrokeColor,nt.strokeWidthPanel=new Ce("Line width",ht.defaultStrokeWidths,ht.defaultStrokeWidth),nt.strokeWidthPanel.onWidthChanged=nt.setStrokeWidth,nt.strokeStylePanel=new Ae("Line style",ht.defaultStrokeDasharrays,ht.defaultStrokeDasharray),nt.strokeStylePanel.onStyleChanged=nt.setStrokeDasharray,nt}return ye(ze,ut),ze.prototype.ownsTarget=function(je){return!(!ut.prototype.ownsTarget.call(this,je)&&je!==this.visual&&je!==this.selectorLine&&je!==this.visibleLine)},ze.prototype.createVisual=function(){this.visual=me.createGroup(),this.selectorLine=me.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=me.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)},ze.prototype.pointerDown=function(je,it){ut.prototype.pointerDown.call(this,je,it),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},ze.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()),me.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),me.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),me.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ze.prototype.setStrokeColor=function(je){this.strokeColor=je,this.adjustVisual(),this.colorChanged(je)},ze.prototype.setStrokeWidth=function(je){this.strokeWidth=je,this.adjustVisual()},ze.prototype.setStrokeDasharray=function(je){this.strokeDasharray=je,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var je=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ut.prototype.getState.call(this));return je.typeName=ze.typeName,je},ze.prototype.restoreState=function(je){ut.prototype.restoreState.call(this,je);var it=je;this.strokeColor=it.strokeColor,this.strokeWidth=it.strokeWidth,this.strokeDasharray=it.strokeDasharray,this.createVisual(),this.adjustVisual()},ze.typeName="LineMarker",ze.title="Line marker",ze.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',ze}(We),Je=function(ut){function ze(je,it,ht,nt){var Ke=ut.call(this,je,nt||'<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 Ke.fonts=[],Ke.fontBoxes=[],Ke.fonts=it,Ke.currentFont=ht,Ke.setCurrentFont=Ke.setCurrentFont.bind(Ke),Ke}return ye(ze,ut),ze.prototype.getUi=function(){var je=this,it=document.createElement("div");return it.style.overflow="hidden",it.style.flexGrow="2",this.fonts.forEach(function(ht){var nt=document.createElement("div");nt.style.display="inline-block",nt.style.alignItems="center",nt.style.justifyContent="space-between",nt.style.padding="5px",nt.style.borderWidth="2px",nt.style.borderStyle="solid",nt.style.overflow="hidden",nt.style.maxWidth=100/je.fonts.length-5+"%",nt.style.borderColor=ht===je.currentFont?je.uiStyleSettings.toolboxAccentColor:"transparent",nt.addEventListener("click",function(){je.setCurrentFont(ht,nt)}),it.appendChild(nt);var Ke=document.createElement("div");Ke.style.display="flex",Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.fontFamily=ht,Ke.style.overflow="hidden";var Be=document.createElement("div");Be.style.whiteSpace="nowrap",Be.style.overflow="hidden",Be.style.textOverflow="ellipsis",Be.innerHTML="The quick brown fox jumps over the lazy dog",Ke.appendChild(Be),nt.appendChild(Ke),je.fontBoxes.push(nt)}),it},ze.prototype.setCurrentFont=function(je,it){var ht=this;this.currentFont=je,this.fontBoxes.forEach(function(nt){nt.style.borderColor=nt===it?ht.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},ze}(ee),pt=function(ut){function ze(je,it,ht){var nt=ut.call(this,je,it,ht)||this;return nt.color="transparent",nt.padding=5,nt.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",nt.text=nt.DEFAULT_TEXT,nt.isMoved=!1,nt.color=ht.defaultColor,nt.fontFamily=ht.defaultFontFamily,nt.defaultSize={x:100,y:30},nt.setColor=nt.setColor.bind(nt),nt.setFont=nt.setFont.bind(nt),nt.renderText=nt.renderText.bind(nt),nt.sizeText=nt.sizeText.bind(nt),nt.textEditDivClicked=nt.textEditDivClicked.bind(nt),nt.showTextEditor=nt.showTextEditor.bind(nt),nt.setSize=nt.setSize.bind(nt),nt.positionTextEditor=nt.positionTextEditor.bind(nt),nt.colorPanel=new z("Color",ht.defaultColorSet,ht.defaultColor),nt.colorPanel.onColorChanged=nt.setColor,nt.fontFamilyPanel=new Je("Font",ht.defaultFontFamilies,ht.defaultFontFamily),nt.fontFamilyPanel.onFontChanged=nt.setFont,nt}return ye(ze,ut),ze.prototype.ownsTarget=function(je){if(ut.prototype.ownsTarget.call(this,je)||je===this.visual||je===this.textElement||je===this.bgRectangle)return!0;var it=!1;return this.textElement.childNodes.forEach(function(ht){ht===je&&(it=!0)}),it},ze.prototype.createVisual=function(){this.visual=me.createGroup(),this.bgRectangle=me.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=me.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(me.createTransform()),this.textElement.transform.baseVal.appendItem(me.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},ze.prototype.pointerDown=function(je,it){ut.prototype.pointerDown.call(this,je,it),this.isMoved=!1,this.pointerDownPoint=je,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(je),this._state="creating")},ze.prototype.renderText=function(){var je=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(it){je.textElement.appendChild(me.createTSpan(it.trim()===""?" ":it.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},ze.prototype.getTextScale=function(){var je=this.textElement.getBBox(),it=1;if(je.width>0&&je.height>0){var ht=(1*this.width-this.width*this.padding*2/100)/je.width,nt=(1*this.height-this.height*this.padding*2/100)/je.height;it=Math.min(ht,nt)}return it},ze.prototype.getTextPosition=function(je){var it=this.textElement.getBBox(),ht=0,nt=0;return it.width>0&&it.height>0&&(ht=(this.width-it.width*je)/2,nt=this.height/2-it.height*je/2),{x:ht,y:nt}},ze.prototype.sizeText=function(){var je=this.textElement.getBBox(),it=this.getTextScale(),ht=this.getTextPosition(it);ht.y-=je.y*it,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ht.x+"px, "+ht.y+"px) scale("+it+", "+it+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ht.x,ht.y),this.textElement.transform.baseVal.getItem(1).setScale(it,it))},ze.prototype.manipulate=function(je){ut.prototype.manipulate.call(this,je),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(je.x-this.pointerDownPoint.x)>5||Math.abs(je.y-this.pointerDownPoint.y)>5)},ze.prototype.resize=function(je){ut.prototype.resize.call(this,je),this.isMoved=!0,this.setSize(),this.sizeText()},ze.prototype.setSize=function(){ut.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),me.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},ze.prototype.pointerUp=function(je){var it=this.state;it==="creating"&&(this._suppressMarkerCreateEvent=!0),ut.prototype.pointerUp.call(this,je),this.setSize(),(it==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},ze.prototype.showTextEditor=function(){var je=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(it){it.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var it=Number.parseFloat(je.textEditor.style.fontSize);je.textEditor.clientWidth>=Number.parseInt(je.textEditor.style.maxWidth)&&it>.9;)it-=.1,je.textEditor.style.fontSize=Math.max(it,.9)+"em"}),this.textEditor.addEventListener("keyup",function(it){it.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(it){if(it.clipboardData){var ht=it.clipboardData.getData("text"),nt=window.getSelection();if(!nt.rangeCount)return!1;nt.deleteFromDocument(),nt.getRangeAt(0).insertNode(document.createTextNode(ht)),it.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){je.textEditDivClicked(je.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},ze.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var je=this.getTextScale(),it=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ht=this.textElement.getBBox(),nt={x:ht.width*je,y:ht.height*je};it.x-=nt.x/2,it.y-=nt.y/2,this.textEditor.style.top=it.y+"px",this.textEditor.style.left=it.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-it.x+"px",this.textEditor.style.fontSize=Math.max(16*je,12)+"px",this.textElement.style.display="none"}},ze.prototype.textEditDivClicked=function(je){this.text=je.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},ze.prototype.select=function(){ut.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},ze.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ut.prototype.deselect.call(this)},ze.prototype.dblClick=function(je,it){ut.prototype.dblClick.call(this,je,it),this.showTextEditor()},ze.prototype.setColor=function(je){this.textElement&&me.setAttributes(this.textElement,[["fill",je]]),this.color=je,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(je)},ze.prototype.setFont=function(je){this.textElement&&me.setAttributes(this.textElement,[["font-family",je]]),this.fontFamily=je,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},ze.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},ze.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var je=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ut.prototype.getState.call(this));return je.typeName=ze.typeName,je},ze.prototype.restoreState=function(je){var it=je;this.color=it.color,this.fontFamily=it.fontFamily,this.padding=it.padding,this.text=it.text,this.createVisual(),ut.prototype.restoreState.call(this,je),this.setSize()},ze.prototype.scale=function(je,it){ut.prototype.scale.call(this,je,it),this.setSize(),this.sizeText(),this.positionTextEditor()},ze.typeName="TextMarker",ze.title="Text marker",ze.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>',ze}(Se),St=function(ut){function ze(je,it,ht){var nt=ut.call(this,je,it,ht)||this;return nt.color="transparent",nt.lineWidth=3,nt.drawing=!1,nt.pixelRatio=1,nt.color=ht.defaultColor,nt.lineWidth=ht.defaultStrokeWidth,nt.pixelRatio=ht.freehandPixelRatio,nt.setColor=nt.setColor.bind(nt),nt.addCanvas=nt.addCanvas.bind(nt),nt.finishCreation=nt.finishCreation.bind(nt),nt.setLineWidth=nt.setLineWidth.bind(nt),nt.colorPanel=new z("Color",ht.defaultColorSet,ht.defaultColor),nt.colorPanel.onColorChanged=nt.setColor,nt.lineWidthPanel=new Ce("Line width",ht.defaultStrokeWidths,ht.defaultStrokeWidth),nt.lineWidthPanel.onWidthChanged=nt.setLineWidth,nt}return ye(ze,ut),ze.prototype.ownsTarget=function(je){return!(!ut.prototype.ownsTarget.call(this,je)&&je!==this.visual&&je!==this.drawingImage)},ze.prototype.createVisual=function(){this.visual=me.createGroup(),this.drawingImage=me.createImage(),this.visual.appendChild(this.drawingImage);var je=me.createTransform();this.visual.transform.baseVal.appendItem(je),this.addMarkerVisualToContainer(this.visual)},ze.prototype.pointerDown=function(je,it){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(je.x,je.y),this.drawing=!0):ut.prototype.pointerDown.call(this,je,it)},ze.prototype.manipulate=function(je){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(je.x,je.y),this.canvasContext.stroke()):ut.prototype.manipulate.call(this,je)},ze.prototype.resize=function(je){ut.prototype.resize.call(this,je),me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),me.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},ze.prototype.pointerUp=function(je){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ut.prototype.pointerUp.call(this,je)},ze.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)},ze.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ut.prototype.select.call(this)},ze.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ut.prototype.deselect.call(this)},ze.prototype.finishCreation=function(){for(var je=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),it=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ht=it[0],nt=it[1],Ke=it[2],Be=it[3],Ue=!1,rt=0;rt<this.canvasElement.height;rt++)for(var Ze=0;Ze<this.canvasElement.width;Ze++)je.data[rt*this.canvasElement.width*4+4*Ze+3]>0&&(Ue=!0,rt<nt&&(nt=rt),Ze<ht&&(ht=Ze),rt>Be&&(Be=rt),Ze>Ke&&(Ke=Ze));if(Ue){this.left=ht/this.pixelRatio,this.top=nt/this.pixelRatio,this.width=(Ke-ht)/this.pixelRatio,this.height=(Be-nt)/this.pixelRatio;var Xe=document.createElement("canvas");Xe.width=Ke-ht,Xe.height=Be-nt,Xe.getContext("2d").putImageData(this.canvasContext.getImageData(ht,nt,Ke-ht,Be-nt),0,0),this.drawingImgUrl=Xe.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},ze.prototype.setDrawingImage=function(){me.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),me.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},ze.prototype.setColor=function(je){this.color=je,this.colorChanged(je)},ze.prototype.setLineWidth=function(je){this.lineWidth=je},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var je=Object.assign({drawingImgUrl:this.drawingImgUrl},ut.prototype.getState.call(this));return je.typeName=ze.typeName,je},ze.prototype.restoreState=function(je){this.createVisual(),ut.prototype.restoreState.call(this,je),this.drawingImgUrl=je.drawingImgUrl,this.setDrawingImage()},ze.prototype.scale=function(je,it){ut.prototype.scale.call(this,je,it),this.setDrawingImage()},ze.typeName="FreehandMarker",ze.title="Freehand marker",ze.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>',ze}(Se),Mt=function(ut){function ze(je,it,ht){var nt=ut.call(this,je,ht||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return nt.typeBoxes=[],nt.currentType=it,nt.setCurrentType=nt.setCurrentType.bind(nt),nt}return ye(ze,ut),ze.prototype.getUi=function(){var je=this,it=document.createElement("div");it.style.display="flex",it.style.overflow="hidden",it.style.flexGrow="2";for(var ht=function(Be){var Ue="both";switch(Be){case 0:Ue="both";break;case 1:Ue="start";break;case 2:Ue="end";break;case 3:Ue="none"}var rt=document.createElement("div");if(rt.style.display="flex",rt.style.flexGrow="2",rt.style.alignItems="center",rt.style.justifyContent="space-between",rt.style.padding="5px",rt.style.borderWidth="2px",rt.style.borderStyle="solid",rt.style.borderColor=Ue===nt.currentType?nt.uiStyleSettings.toolboxAccentColor:"transparent",rt.addEventListener("click",function(){je.setCurrentType(Ue,rt)}),it.appendChild(rt),Ue==="both"||Ue==="start"){var Ze=document.createElement("div");Ze.style.display="flex",Ze.style.alignItems="center",Ze.style.minHeight="20px",Ze.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="`+(nt.uiStyleSettings!==void 0?nt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Ze.style.marginLeft="5px",rt.appendChild(Ze)}var Xe=document.createElement("div");Xe.style.display="flex",Xe.style.alignItems="center",Xe.style.minHeight="20px",Xe.style.flexGrow="2";var mt=document.createElement("hr");if(mt.style.minWidth="20px",mt.style.border="0px",mt.style.borderTop="3px solid "+(nt.uiStyleSettings!==void 0?nt.uiStyleSettings.toolboxColor:"#eeeeee"),mt.style.flexGrow="2",Xe.appendChild(mt),rt.appendChild(Xe),Ue==="both"||Ue==="end"){var Rt=document.createElement("div");Rt.style.display="flex",Rt.style.alignItems="center",Rt.style.minHeight="20px",Rt.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="`+(nt.uiStyleSettings!==void 0?nt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Rt.style.marginRight="5px",rt.appendChild(Rt)}nt.typeBoxes.push(rt)},nt=this,Ke=0;Ke<4;Ke++)ht(Ke);return it},ze.prototype.setCurrentType=function(je,it){var ht=this;this.currentType=je,this.typeBoxes.forEach(function(nt){nt.style.borderColor=nt===it?ht.uiStyleSettings!==void 0?ht.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},ze}(ee),ct=function(ut){function ze(je,it,ht){var nt=ut.call(this,je,it,ht)||this;return nt.arrowType="end",nt.arrowBaseHeight=10,nt.arrowBaseWidth=10,nt.getArrowPoints=nt.getArrowPoints.bind(nt),nt.setArrowType=nt.setArrowType.bind(nt),nt.arrowTypePanel=new Mt("Arrow type","end"),nt.arrowTypePanel.onArrowTypeChanged=nt.setArrowType,nt}return ye(ze,ut),ze.prototype.ownsTarget=function(je){return!(!ut.prototype.ownsTarget.call(this,je)&&je!==this.arrow1&&je!==this.arrow2)},ze.prototype.getArrowPoints=function(je,it){var ht=this.arrowBaseWidth+2*this.strokeWidth,nt=this.arrowBaseHeight+2*this.strokeWidth;return je-ht/2+","+(it+nt/2)+" "+je+","+(it-nt/2)+" "+(je+ht/2)+","+(it+nt/2)},ze.prototype.createTips=function(){this.arrow1=me.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(me.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=me.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(me.createTransform()),this.visual.appendChild(this.arrow2)},ze.prototype.pointerDown=function(je,it){ut.prototype.pointerDown.call(this,je,it),this.state==="creating"&&this.createTips()},ze.prototype.adjustVisual=function(){if(ut.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",me.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),me.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var je=0;Math.abs(this.x1-this.x2)>.1&&(je=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var it=this.arrow1.transform.baseVal.getItem(0);it.setRotate(je,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(it,0);var ht=this.arrow2.transform.baseVal.getItem(0);ht.setRotate(je+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ht,0)}},ze.prototype.setArrowType=function(je){this.arrowType=je,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var je=Object.assign({arrowType:this.arrowType},ut.prototype.getState.call(this));return je.typeName=ze.typeName,je},ze.prototype.restoreState=function(je){ut.prototype.restoreState.call(this,je);var it=je;this.arrowType=it.arrowType,this.createTips(),this.adjustVisual()},ze.typeName="ArrowMarker",ze.title="Arrow marker",ze.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',ze}($e),wt=function(ut){function ze(je,it,ht){var nt=ut.call(this,je,it,ht)||this;return nt.fillColor=ht.defaultFillColor,nt.strokeWidth=0,nt.fillPanel=new z("Color",ht.defaultColorSet,ht.defaultFillColor),nt.fillPanel.onColorChanged=nt.setFillColor,nt}return ye(ze,ut),Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var je=ut.prototype.getState.call(this);return je.typeName=ze.typeName,je},ze.typeName="CoverMarker",ze.title="Cover marker",ze.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',ze}(pe),ft=function(ut){function ze(je,it,ht,nt){var Ke=ut.call(this,je,nt||'<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 Ke.opacities=[],Ke.opacityBoxes=[],Ke.opacities=it,Ke.currentOpacity=ht,Ke.setCurrentOpacity=Ke.setCurrentOpacity.bind(Ke),Ke}return ye(ze,ut),ze.prototype.getUi=function(){var je=this,it=document.createElement("div");return it.style.display="flex",it.style.overflow="hidden",it.style.flexGrow="2",it.style.justifyContent="space-between",this.opacities.forEach(function(ht){var nt=document.createElement("div");nt.style.display="flex",nt.style.alignItems="center",nt.style.justifyContent="center",nt.style.padding="5px",nt.style.borderWidth="2px",nt.style.borderStyle="solid",nt.style.borderColor=ht===je.currentOpacity?je.uiStyleSettings.toolboxAccentColor:"transparent",nt.addEventListener("click",function(){je.setCurrentOpacity(ht,nt)}),it.appendChild(nt);var Ke=document.createElement("div");Ke.innerText=100*ht+"%",nt.appendChild(Ke),je.opacityBoxes.push(nt)}),it},ze.prototype.setCurrentOpacity=function(je,it){var ht=this;this.currentOpacity=je,this.opacityBoxes.forEach(function(nt){nt.style.borderColor=nt===it?ht.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},ze}(ee),$t=function(ut){function ze(je,it,ht){var nt=ut.call(this,je,it,ht)||this;return nt.setOpacity=nt.setOpacity.bind(nt),nt.fillColor=ht.defaultHighlightColor,nt.strokeWidth=0,nt.opacity=ht.defaultHighlightOpacity,nt.fillPanel=new z("Color",ht.defaultColorSet,nt.fillColor),nt.fillPanel.onColorChanged=nt.setFillColor,nt.opacityPanel=new ft("Opacity",ht.defaultOpacitySteps,nt.opacity),nt.opacityPanel.onOpacityChanged=nt.setOpacity,nt}return ye(ze,ut),ze.prototype.setOpacity=function(je){this.opacity=je,this.visual&&me.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var je=ut.prototype.getState.call(this);return je.typeName=ze.typeName,je},ze.typeName="HighlightMarker",ze.title="Highlight marker",ze.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>',ze}(wt),st='<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>',et='<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>',lt=function(ut){function ze(je,it,ht){var nt=ut.call(this,je,it,ht)||this;return nt.bgColor="transparent",nt.tipPosition={x:0,y:0},nt.tipBase1Position={x:0,y:0},nt.tipBase2Position={x:0,y:0},nt.tipMoving=!1,nt.color=ht.defaultStrokeColor,nt.bgColor=ht.defaultFillColor,nt.fontFamily=ht.defaultFontFamily,nt.defaultSize={x:100,y:30},nt.setBgColor=nt.setBgColor.bind(nt),nt.getTipPoints=nt.getTipPoints.bind(nt),nt.positionTip=nt.positionTip.bind(nt),nt.setTipPoints=nt.setTipPoints.bind(nt),nt.colorPanel=new z("Text color",ht.defaultColorSet,nt.color,st),nt.colorPanel.onColorChanged=nt.setColor,nt.bgColorPanel=new z("Fill color",ht.defaultColorSet,nt.bgColor,et),nt.bgColorPanel.onColorChanged=nt.setBgColor,nt.fontFamilyPanel=new Je("Font",ht.defaultFontFamilies,ht.defaultFontFamily),nt.fontFamilyPanel.onFontChanged=nt.setFont,nt.tipGrip=new se,nt.tipGrip.visual.transform.baseVal.appendItem(me.createTransform()),nt.controlBox.appendChild(nt.tipGrip.visual),nt}return ye(ze,ut),ze.prototype.ownsTarget=function(je){return ut.prototype.ownsTarget.call(this,je)||this.tipGrip.ownsTarget(je)||this.tip===je},ze.prototype.createTip=function(){me.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=me.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},ze.prototype.pointerDown=function(je,it){this.state==="new"&&ut.prototype.pointerDown.call(this,je,it),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(it)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ut.prototype.pointerDown.call(this,je,it)},ze.prototype.pointerUp=function(je){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ut.prototype.pointerUp.call(this,je);else{var it=this.state==="creating";ut.prototype.pointerUp.call(this,je),this.setTipPoints(it),this.positionTip()}},ze.prototype.manipulate=function(je){if(this.tipMoving){var it=this.unrotatePoint(je);this.tipPosition={x:it.x-this.manipulationStartLeft,y:it.y-this.manipulationStartTop},this.positionTip()}else ut.prototype.manipulate.call(this,je)},ze.prototype.setBgColor=function(je){this.bgRectangle&&this.tip&&(me.setAttributes(this.bgRectangle,[["fill",je]]),me.setAttributes(this.tip,[["fill",je]])),this.bgColor=je,this.fillColorChanged(je)},ze.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},ze.prototype.setTipPoints=function(je){je===void 0&&(je=!1);var it=Math.min(this.height/2,15),ht=this.height/5;je&&(this.tipPosition={x:it+ht/2,y:this.height+20});var nt=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?nt<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ht=this.width/5,it=Math.min(this.width/2,15),this.tipBase1Position={x:it,y:0},this.tipBase2Position={x:it+ht,y:0}):(this.tipBase1Position={x:0,y:it},this.tipBase2Position={x:0,y:it+ht}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?nt<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ht=this.width/5,it=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-it-ht,y:0},this.tipBase2Position={x:this.width-it,y:0}):(this.tipBase1Position={x:this.width,y:it},this.tipBase2Position={x:this.width,y:it+ht}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?nt<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ht=this.width/5,it=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-it-ht,y:this.height},this.tipBase2Position={x:this.width-it,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-it-ht},this.tipBase2Position={x:this.width,y:this.height-it}):nt<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ht=this.width/5,it=Math.min(this.width/2,15),this.tipBase1Position={x:it,y:this.height},this.tipBase2Position={x:it+ht,y:this.height}):(this.tipBase1Position={x:0,y:this.height-it},this.tipBase2Position={x:0,y:this.height-it-ht})},ze.prototype.resize=function(je){ut.prototype.resize.call(this,je),this.positionTip()},ze.prototype.positionTip=function(){me.setAttributes(this.tip,[["points",this.getTipPoints()]]);var je=this.tipGrip.visual.transform.baseVal.getItem(0);je.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(je,0)},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ze.prototype.select=function(){this.positionTip(),ut.prototype.select.call(this)},ze.prototype.getState=function(){var je=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ut.prototype.getState.call(this));return je.typeName=ze.typeName,je},ze.prototype.restoreState=function(je){var it=je;this.bgColor=it.bgColor,this.tipPosition=it.tipPosition,ut.prototype.restoreState.call(this,je),this.createTip(),this.setTipPoints()},ze.prototype.scale=function(je,it){ut.prototype.scale.call(this,je,it),this.tipPosition={x:this.tipPosition.x*je,y:this.tipPosition.y*it},this.positionTip()},ze.typeName="CalloutMarker",ze.title="Callout marker",ze.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>',ze}(pt),dt=function(ut){function ze(je,it,ht){var nt=ut.call(this,je,it,ht)||this;return nt.fillColor="transparent",nt.strokeColor="transparent",nt.strokeWidth=0,nt.strokeDasharray="",nt.opacity=1,nt.strokeColor=ht.defaultColor,nt.strokeWidth=ht.defaultStrokeWidth,nt.strokeDasharray=ht.defaultStrokeDasharray,nt.fillColor=ht.defaultFillColor,nt.setStrokeColor=nt.setStrokeColor.bind(nt),nt.setFillColor=nt.setFillColor.bind(nt),nt.setStrokeWidth=nt.setStrokeWidth.bind(nt),nt.setStrokeDasharray=nt.setStrokeDasharray.bind(nt),nt.setOpacity=nt.setOpacity.bind(nt),nt.createVisual=nt.createVisual.bind(nt),nt.strokePanel=new z("Line color",Ee(ht.defaultColorSet,["transparent"]),ht.defaultColor),nt.strokePanel.onColorChanged=nt.setStrokeColor,nt.fillPanel=new z("Fill color",Ee(ht.defaultColorSet,["transparent"]),nt.fillColor,et),nt.fillPanel.onColorChanged=nt.setFillColor,nt.strokeWidthPanel=new Ce("Line width",ht.defaultStrokeWidths,ht.defaultStrokeWidth),nt.strokeWidthPanel.onWidthChanged=nt.setStrokeWidth,nt.strokeStylePanel=new Ae("Line style",ht.defaultStrokeDasharrays,ht.defaultStrokeDasharray),nt.strokeStylePanel.onStyleChanged=nt.setStrokeDasharray,nt.opacityPanel=new ft("Opacity",ht.defaultOpacitySteps,nt.opacity),nt.opacityPanel.onOpacityChanged=nt.setOpacity,nt}return ye(ze,ut),ze.prototype.ownsTarget=function(je){return!(!ut.prototype.ownsTarget.call(this,je)&&je!==this.visual)},ze.prototype.createVisual=function(){this.visual=me.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)},ze.prototype.pointerDown=function(je,it){ut.prototype.pointerDown.call(this,je,it),this.state==="new"&&(this.createVisual(),this.moveVisual(je),this._state="creating")},ze.prototype.manipulate=function(je){ut.prototype.manipulate.call(this,je)},ze.prototype.resize=function(je){ut.prototype.resize.call(this,je),this.setSize()},ze.prototype.setSize=function(){ut.prototype.setSize.call(this),me.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},ze.prototype.pointerUp=function(je){ut.prototype.pointerUp.call(this,je),this.setSize()},ze.prototype.setStrokeColor=function(je){this.strokeColor=je,this.visual&&me.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(je),this.stateChanged()},ze.prototype.setFillColor=function(je){this.fillColor=je,this.visual&&me.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(je),this.stateChanged()},ze.prototype.setStrokeWidth=function(je){this.strokeWidth=je,this.visual&&me.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ze.prototype.setStrokeDasharray=function(je){this.strokeDasharray=je,this.visual&&me.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ze.prototype.setOpacity=function(je){this.opacity=je,this.visual&&me.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var je=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ut.prototype.getState.call(this));return je.typeName=ze.typeName,je},ze.prototype.restoreState=function(je){var it=je;this.fillColor=it.fillColor,this.strokeColor=it.strokeColor,this.strokeWidth=it.strokeWidth,this.strokeDasharray=it.strokeDasharray,this.opacity=it.opacity,this.createVisual(),ut.prototype.restoreState.call(this,je),this.setSize()},ze.prototype.scale=function(je,it){ut.prototype.scale.call(this,je,it),this.setSize()},ze.typeName="EllipseMarker",ze.title="Ellipse marker",ze.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>',ze}(Se),bt=function(ut){function ze(je,it,ht){return ut.call(this,je,it,ht)||this}return ye(ze,ut),Object.defineProperty(ze.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),ze.prototype.ownsTarget=function(je){return!(!ut.prototype.ownsTarget.call(this,je)&&je!==this.tip1&&je!==this.tip2)},ze.prototype.createTips=function(){this.tip1=me.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(me.createTransform()),this.visual.appendChild(this.tip1),this.tip2=me.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(me.createTransform()),this.visual.appendChild(this.tip2)},ze.prototype.pointerDown=function(je,it){ut.prototype.pointerDown.call(this,je,it),this.state==="creating"&&this.createTips()},ze.prototype.adjustVisual=function(){if(ut.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(me.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()]]),me.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 je=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),it=this.tip1.transform.baseVal.getItem(0);it.setRotate(je,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(it,0);var ht=this.tip2.transform.baseVal.getItem(0);ht.setRotate(je+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ht,0)}},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var je=ut.prototype.getState.call(this);return je.typeName=ze.typeName,je},ze.prototype.restoreState=function(je){ut.prototype.restoreState.call(this,je),this.createTips(),this.adjustVisual()},ze.typeName="MeasurementMarker",ze.title="Measurement marker",ze.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>',ze}($e),yt=function(ut){function ze(je,it,ht){var nt=ut.call(this,je,it,ht)||this;return nt.strokePanel.colors=ht.defaultColorSet,nt.fillColor="transparent",nt}return ye(ze,ut),Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var je=ut.prototype.getState.call(this);return je.typeName=ze.typeName,je},ze.typeName="EllipseFrameMarker",ze.title="Ellipse frame marker",ze.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>',ze}(dt),Vt=function(){function ut(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ut.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ut.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ut.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ut.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ut.prototype.addUndoStep=function(ze){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(ze)||(this.undoStack.push(ze),JSON.stringify(this.lastRedoStep)!==JSON.stringify(ze)&&this.redoStack.splice(0,this.redoStack.length))},ut.prototype.replaceLastUndoStep=function(ze){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=ze)},ut.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ut.prototype.undo=function(){if(this.undoStack.length>1){var ze=this.undoStack.pop();return ze!==void 0&&this.redoStack.push(ze),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ut.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ut}(),Kt=function(ut){function ze(je,it,ht){var nt=ut.call(this,je,it,ht)||this;return nt.strokeColor="transparent",nt.strokeWidth=0,nt.strokeDasharray="",nt.curveX=0,nt.curveY=0,nt.manipulationStartCurveX=0,nt.manipulationStartCurveY=0,nt.setStrokeColor=nt.setStrokeColor.bind(nt),nt.setStrokeWidth=nt.setStrokeWidth.bind(nt),nt.setStrokeDasharray=nt.setStrokeDasharray.bind(nt),nt.positionGrips=nt.positionGrips.bind(nt),nt.addControlGrips=nt.addControlGrips.bind(nt),nt.adjustVisual=nt.adjustVisual.bind(nt),nt.setupControlBox=nt.setupControlBox.bind(nt),nt.resize=nt.resize.bind(nt),nt.strokeColor=ht.defaultColor,nt.strokeWidth=ht.defaultStrokeWidth,nt.strokeDasharray=ht.defaultStrokeDasharray,nt.strokePanel=new z("Line color",ht.defaultColorSet,ht.defaultColor),nt.strokePanel.onColorChanged=nt.setStrokeColor,nt.strokeWidthPanel=new Ce("Line width",ht.defaultStrokeWidths,ht.defaultStrokeWidth),nt.strokeWidthPanel.onWidthChanged=nt.setStrokeWidth,nt.strokeStylePanel=new Ae("Line style",ht.defaultStrokeDasharrays,ht.defaultStrokeDasharray),nt.strokeStylePanel.onStyleChanged=nt.setStrokeDasharray,nt}return ye(ze,ut),ze.prototype.ownsTarget=function(je){return!(!ut.prototype.ownsTarget.call(this,je)&&je!==this.visual&&je!==this.selectorCurve&&je!==this.visibleCurve&&!this.curveGrip.ownsTarget(je))},ze.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},ze.prototype.createVisual=function(){this.visual=me.createGroup(),this.selectorCurve=me.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=me.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)},ze.prototype.pointerDown=function(je,it){ut.prototype.pointerDown.call(this,je,it),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=je.x,this.curveY=je.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(it)&&(this.activeGrip=this.curveGrip,this._state="resize")},ze.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),me.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),me.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),me.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ze.prototype.setupControlBox=function(){ut.prototype.setupControlBox.call(this),this.curveControlLine1=me.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=me.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)},ze.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ut.prototype.addControlGrips.call(this)},ze.prototype.positionGrips=function(){ut.prototype.positionGrips.call(this);var je=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-je/2,this.curveY-je/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()))},ze.prototype.manipulate=function(je){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+je.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+je.y-this.manipulationStartY),ut.prototype.manipulate.call(this,je)},ze.prototype.resize=function(je){this.activeGrip===this.curveGrip&&(this.curveX=je.x,this.curveY=je.y),ut.prototype.resize.call(this,je),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},ze.prototype.setStrokeColor=function(je){this.strokeColor=je,this.adjustVisual(),this.colorChanged(je)},ze.prototype.setStrokeWidth=function(je){this.strokeWidth=je,this.adjustVisual()},ze.prototype.setStrokeDasharray=function(je){this.strokeDasharray=je,this.adjustVisual()},ze.prototype.scale=function(je,it){this.curveX=this.curveX*je,this.curveY=this.curveY*it,ut.prototype.scale.call(this,je,it)},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var je=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ut.prototype.getState.call(this));return je.typeName=ze.typeName,je},ze.prototype.restoreState=function(je){ut.prototype.restoreState.call(this,je);var it=je;this.strokeColor=it.strokeColor,this.strokeWidth=it.strokeWidth,this.strokeDasharray=it.strokeDasharray,this.curveX=it.curveX,this.curveY=it.curveY,this.createVisual(),this.adjustVisual()},ze.typeName="CurveMarker",ze.title="Curve marker",ze.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>',ze}(We),gn=function(ut){function ze(je,it,ht){var nt=ut.call(this,je,it,ht)||this;return nt.fillColor="transparent",nt.strokeColor="transparent",nt.strokeWidth=0,nt.strokeDasharray="",nt.textColor="transparent",nt.fontSize="1rem",nt.isMoved=!1,nt.captionText="Caption",nt.PADDING=5,nt.captionBoxWidth=0,nt.captionBoxHeight=0,nt.strokeColor=ht.defaultColor,nt.strokeWidth=ht.defaultStrokeWidth,nt.strokeDasharray=ht.defaultStrokeDasharray,nt.fillColor=ht.defaultFillColor,nt.textColor=ht.defaultStrokeColor,nt.fontFamily=ht.defaultFontFamily,nt.fontSize=ht.defaultCaptionFontSize,nt.captionText=ht.defaultCaptionText,nt.setStrokeColor=nt.setStrokeColor.bind(nt),nt.setFillColor=nt.setFillColor.bind(nt),nt.setStrokeWidth=nt.setStrokeWidth.bind(nt),nt.setStrokeDasharray=nt.setStrokeDasharray.bind(nt),nt.createVisual=nt.createVisual.bind(nt),nt.sizeCaption=nt.sizeCaption.bind(nt),nt.setCaptionText=nt.setCaptionText.bind(nt),nt.showTextEditor=nt.showTextEditor.bind(nt),nt.positionTextEditor=nt.positionTextEditor.bind(nt),nt.finishTextEditing=nt.finishTextEditing.bind(nt),nt.setFont=nt.setFont.bind(nt),nt.setTextColor=nt.setTextColor.bind(nt),nt.strokePanel=new z("Line color",Ee(ht.defaultColorSet,["transparent"]),nt.strokeColor),nt.strokePanel.onColorChanged=nt.setStrokeColor,nt.fillPanel=new z("Fill color",Ee(ht.defaultColorSet,["transparent"]),nt.fillColor,et),nt.fillPanel.onColorChanged=nt.setFillColor,nt.strokeWidthPanel=new Ce("Line width",ht.defaultStrokeWidths,ht.defaultStrokeWidth),nt.strokeWidthPanel.onWidthChanged=nt.setStrokeWidth,nt.strokeStylePanel=new Ae("Line style",ht.defaultStrokeDasharrays,ht.defaultStrokeDasharray),nt.strokeStylePanel.onStyleChanged=nt.setStrokeDasharray,nt.fontFamilyPanel=new Je("Font",ht.defaultFontFamilies,ht.defaultFontFamily),nt.fontFamilyPanel.onFontChanged=nt.setFont,nt.textColorPanel=new z("Text color",ht.defaultColorSet,nt.textColor,st),nt.textColorPanel.onColorChanged=nt.setTextColor,nt}return ye(ze,ut),ze.prototype.ownsTarget=function(je){return!(!ut.prototype.ownsTarget.call(this,je)&&je!==this.visual&&je!==this.frame&&je!==this.captionBg&&je!==this.captionElement)},ze.prototype.createVisual=function(){this.visual=me.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=me.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=me.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=me.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()},ze.prototype.setCaptionText=function(je){this.captionText=je,this.captionElement.textContent=this.captionText,this.sizeCaption()},ze.prototype.pointerDown=function(je,it){ut.prototype.pointerDown.call(this,je,it),this.isMoved=!1,this.pointerDownPoint=je,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(je),this._state="creating")},ze.prototype.manipulate=function(je){ut.prototype.manipulate.call(this,je),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(je.x-this.pointerDownPoint.x)>5||Math.abs(je.y-this.pointerDownPoint.y)>5)},ze.prototype.resize=function(je){ut.prototype.resize.call(this,je),this.setSize()},ze.prototype.sizeCaption=function(){var je=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=je.width+2*this.PADDING,this.captionBoxHeight=je.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),me.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')"]]),me.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')"]])},ze.prototype.showTextEditor=function(){var je=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(it){it.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(it){it.key==="Enter"&&je.finishTextEditing(je.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(it){it.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){je.finishTextEditing(je.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){je.finishTextEditing(je.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},ze.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"))},ze.prototype.finishTextEditing=function(je){this.setCaptionText(je.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},ze.prototype.setFont=function(je){this.captionElement&&me.setAttributes(this.captionElement,[["font-family",je]]),this.fontFamily=je,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},ze.prototype.setTextColor=function(je){this.captionElement&&me.setAttributes(this.captionElement,[["fill",je]]),this.textColor=je,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},ze.prototype.setSize=function(){ut.prototype.setSize.call(this),me.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},ze.prototype.pointerUp=function(je){ut.prototype.pointerUp.call(this,je),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},ze.prototype.dblClick=function(je,it){ut.prototype.dblClick.call(this,je,it),this.showTextEditor()},ze.prototype.setStrokeColor=function(je){this.strokeColor=je,this.frame&&me.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(je),this.stateChanged()},ze.prototype.setFillColor=function(je){this.fillColor=je,this.captionBg&&me.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(je),this.stateChanged()},ze.prototype.setStrokeWidth=function(je){this.strokeWidth=je,this.frame&&me.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ze.prototype.setStrokeDasharray=function(je){this.strokeDasharray=je,this.frame&&me.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var je=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},ut.prototype.getState.call(this));return je.typeName=this.typeName,je},ze.prototype.restoreState=function(je){var it=je;this.fillColor=it.fillColor,this.strokeColor=it.strokeColor,this.strokeWidth=it.strokeWidth,this.strokeDasharray=it.strokeDasharray,this.textColor=it.textColor,this.fontFamily=it.fontFamily,this.captionText=it.captionText,this.fontSize=it.fontSize,this.createVisual(),ut.prototype.restoreState.call(this,je),this.setSize()},ze.prototype.scale=function(je,it){ut.prototype.scale.call(this,je,it),this.setSize()},ze.typeName="CaptionFrameMarker",ze.title="Caption frame marker",ze.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>',ze}(Se),Gt=function(){function ut(ze,je){je===void 0&&(je=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=ze,this.cancelable=je}return Object.defineProperty(ut.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ut.prototype.preventDefault=function(){this._defaultPrevented=!0},ut}(),Dt=function(ut){function ze(je,it,ht){var nt=ut.call(this,je,!1)||this;return nt.dataUrl=it,nt.state=ht,nt}return ye(ze,ut),ze}(Gt),on=function(ut){function ze(je,it,ht){ht===void 0&&(ht=!1);var nt=ut.call(this,je,ht)||this;return nt.marker=it,nt}return ye(ze,ut),ze}(Gt),Jt=function(){function ut(){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 ut.prototype.addEventListener=function(ze,je){this[ze].push(je)},ut.prototype.removeEventListener=function(ze,je){var it=this[ze].indexOf(je);it>-1&&this[ze].splice(it,1)},ut}(),jt=function(){function ut(ze){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Re,this._isOpen=!1,this.undoRedoManager=new Vt,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 Jt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ut.instanceCounter++,this.styles=new ge(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=ze,this.targetRoot=document.body,this.width=ze.clientWidth,this.height=ze.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(ut.prototype,"ALL_MARKER_TYPES",{get:function(){return[Oe,St,ct,pt,yt,dt,$t,lt,bt,wt,$e,Kt,gn]},enumerable:!1,configurable:!0}),Object.defineProperty(ut.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Oe,St,ct,pt,dt,$t,lt]},enumerable:!1,configurable:!0}),Object.defineProperty(ut.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Oe,St,ct,pt,$t]},enumerable:!1,configurable:!0}),Object.defineProperty(ut.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(ze){var je=this;this._availableMarkerTypes.splice(0),ze.forEach(function(it){if(typeof it=="string"){var ht=je.ALL_MARKER_TYPES.find(function(nt){return nt.typeName===it});ht!==void 0&&je._availableMarkerTypes.push(ht)}else je._availableMarkerTypes.push(it)})},enumerable:!1,configurable:!0}),Object.defineProperty(ut.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ut.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ut.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ut.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ut.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(ze){this._zoomLevel=ze,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(ut.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ut.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},ut.prototype.show=function(){var ze=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(je){return je(new Gt(ze))})},ut.prototype.render=function(){return Fe(this,void 0,void 0,function(){var ze;return Me(this,function(je){switch(je.label){case 0:return this.setCurrentMarker(),(ze=new ve).naturalSize=this.renderAtNaturalSize,ze.imageType=this.renderImageType,ze.imageQuality=this.renderImageQuality,ze.markersOnly=this.renderMarkersOnly,ze.width=this.renderWidth,ze.height=this.renderHeight,[4,ze.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return je.sent(),[4,ze.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,je.sent()]}})})},ut.prototype.close=function(ze){var je=this;if(ze===void 0&&(ze=!1),this.isOpen){var it=!1;ze||this.eventListeners.beforeclose.forEach(function(ht){var nt=new Gt(je,!0);ht(nt),nt.defaultPrevented&&(it=!0)}),it||(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 Gt(je))}),this.detachEvents(),this._isOpen=!1)}},ut.prototype.addMarkersToToolbar=function(){for(var ze,je=[],it=0;it<arguments.length;it++)je[it]=arguments[it];(ze=this._availableMarkerTypes).push.apply(ze,je)},ut.prototype.addRenderEventListener=function(ze){this.addEventListener("render",function(je){ze(je.dataUrl,je.state)})},ut.prototype.removeRenderEventListener=function(ze){},ut.prototype.addCloseEventListener=function(ze){this.addEventListener("close",function(){ze()})},ut.prototype.removeCloseEventListener=function(ze){},ut.prototype.setupResizeObserver=function(){var ze=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ze.resize(ze.target.clientWidth,ze.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return ze.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},ut.prototype.onPopupTargetResize=function(){var ze=1*this.target.clientWidth/this.target.clientHeight,je=this.editorCanvas.clientWidth/ze>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*ze:this.editorCanvas.clientWidth,it=je<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/ze;this.resize(je,it)},ut.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ut.prototype.resize=function(ze,je){this._isResizing=!0;var it=ze/this.imageWidth,ht=je/this.imageHeight;this.imageWidth=Math.round(ze),this.imageHeight=Math.round(je),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(it,ht),this._isResizing=!1},ut.prototype.scaleMarkers=function(ze,je){var it,ht=this;this._currentMarker&&this._currentMarker instanceof pt?this._currentMarker.scale(ze,je):(it=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(nt){nt!==ht._currentMarker&&nt.scale(ze,je)}),it!==void 0&&this.setCurrentMarker(it)},ut.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"},ut.prototype.setTopLeft=function(){var ze=this.editingTarget.getBoundingClientRect(),je=this.editorCanvas.getBoundingClientRect();this.left=ze.left-je.left,this.top=ze.top-je.top},ut.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)},ut.prototype.addDefs=function(){for(var ze,je=[],it=0;it<arguments.length;it++)je[it]=arguments[it];this.defs=me.createDefs(),this.addDefsToImage(),(ze=this.defs).append.apply(ze,je)},ut.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ut.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)},ut.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ut.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ut.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)},ut.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ut.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)},ut.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 ze=document.createElement("a");ze.href="https://markerjs.com/",ze.target="_blank",ze.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>',ze.title="Powered by marker.js",ze.style.display="grid",ze.style.alignItems="center",ze.style.justifyItems="center",ze.style.padding="3px",ze.style.width="20px",ze.style.height="20px",this.logoUI.appendChild(ze),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ut.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")},ut.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"},ut.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ut.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 ze=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=ze+"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")},ut.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ut.prototype.removeMarker=function(ze){this.markerImage.removeChild(ze.container),this.markers.indexOf(ze)>-1&&this.markers.splice(this.markers.indexOf(ze),1),ze.dispose()},ut.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())},ut.prototype.toolbarButtonClicked=function(ze,je){if(ze==="marker"&&je!==void 0)this.createNewMarker(je);else if(ze==="action")switch(je){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()}},ut.prototype.deleteSelectedMarker=function(){var ze=this;if(this._currentMarker!==void 0){var je=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ht){var nt=new on(ze,ze._currentMarker,!0);ht(nt),nt.defaultPrevented&&(je=!0)}),!je){var it=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 on(ze,it))})}}},ut.prototype.clear=function(){var ze=this,je=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ke){var Be=new on(ze,void 0,!0);Ke(Be),Be.defaultPrevented&&(je=!0)}),!je)){this.setCurrentMarker();for(var it=function(Ke){var Be=ht.markers[Ke];ht.setCurrentMarker(ht.markers[Ke]),ht._currentMarker.dispose(),ht.markerImage.removeChild(ht._currentMarker.container),ht.markers.splice(ht.markers.indexOf(ht._currentMarker),1),ht.eventListeners.markerdelete.forEach(function(Ue){return Ue(new on(ze,Be))})},ht=this,nt=this.markers.length-1;nt>=0;nt--)it(nt);this.addUndoStep()}},Object.defineProperty(ut.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ut.prototype.showNotesEditor=function(){var ze;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=(ze=this._currentMarker.notes)!==null&&ze!==void 0?ze:"",this.overlayContainer.appendChild(this.notesArea))},ut.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)},ut.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ut.prototype.addUndoStep=function(){var ze=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var je=this.getState(),it=this.undoRedoManager.getLastUndoStep();if(!it||it.width===je.width&&it.height===je.height){var ht=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(je),ht<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(nt){return nt(new Gt(ze))})}else this.undoRedoManager.replaceLastUndoStep(je),this.eventListeners.statechange.forEach(function(nt){return nt(new Gt(ze))})}},ut.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ut.prototype.undoStep=function(){var ze=this,je=this.undoRedoManager.undo();je!==void 0&&(this.restoreState(je),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(it){return it(new Gt(ze))}))},ut.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ut.prototype.redoStep=function(){var ze=this,je=this.undoRedoManager.redo();je!==void 0&&(this.restoreState(je),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(it){return it(new Gt(ze))}))},ut.prototype.stepZoom=function(){var ze=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=ze<this.zoomSteps.length-1?this.zoomSteps[ze+1]:this.zoomSteps[0]},ut.prototype.panTo=function(ze){this.contentDiv.scrollBy({left:this.prevPanPoint.x-ze.x,top:this.prevPanPoint.y-ze.y}),this.prevPanPoint=ze},ut.prototype.startRenderAndClose=function(){return Fe(this,void 0,void 0,function(){var ze,je,it=this;return Me(this,function(ht){switch(ht.label){case 0:return[4,this.render()];case 1:return ze=ht.sent(),je=this.getState(),this.eventListeners.render.forEach(function(nt){return nt(new Dt(it,ze,je))}),this.close(!0),[2]}})})},ut.prototype.getState=function(ze){ze===!0&&this.setCurrentMarker();var je={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(it){return je.markers.push(it.getState())}),je},ut.prototype.restoreState=function(ze){var je=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);ze.markers.forEach(function(it){var ht=je._availableMarkerTypes.find(function(Ke){return Ke.typeName===it.typeName});if(ht!==void 0){var nt=je.addNewMarker(ht);nt.restoreState(it),je.markers.push(nt)}}),ze.width&&ze.height&&(ze.width!==this.imageWidth||ze.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/ze.width,this.imageHeight/ze.height),this.eventListeners.restorestate.forEach(function(it){return it(new Gt(je))})},ut.prototype.addNewMarker=function(ze){var je=me.createGroup();return this.markerImage.appendChild(je),new ze(je,this.overlayContainer,this.settings)},ut.prototype.createNewMarker=function(ze){var je,it=this;(je=typeof ze=="string"?this._availableMarkerTypes.find(function(ht){return ht.typeName===ze}):ze)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(je),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(je.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ht){return ht(new on(it,it._currentMarker))}))},ut.prototype.markerCreated=function(ze){var je=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(ze),this.setCurrentMarker(ze),ze instanceof St&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(St):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(it){return it(new on(je,je._currentMarker))})},ut.prototype.colorChanged=function(ze){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=ze,this.settings.defaultStrokeColor=ze)},ut.prototype.fillColorChanged=function(ze){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=ze)},ut.prototype.markerStateChanged=function(ze){var je=this;this.eventListeners.markerchange.forEach(function(it){return it(new on(je,ze))})},ut.prototype.setCurrentMarker=function(ze){var je=this;this._currentMarker!==ze&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(it){return it(new on(je,je._currentMarker))})),this._currentMarker=ze,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(it){return it(new on(je,je._currentMarker))}))},ut.prototype.onPointerDown=function(ze){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||ze.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var je=this.markers.find(function(it){return it.ownsTarget(ze.target)});je!==void 0?(this.setCurrentMarker(je),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ze.clientX,ze.clientY),ze.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:ze.clientX,y:ze.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ze.clientX,ze.clientY))},ut.prototype.onDblClick=function(ze){if(this._isFocused||this.focus(),this.mode==="select"){var je=this.markers.find(function(it){return it.ownsTarget(ze.target)});je!==void 0&&je!==this._currentMarker&&this.setCurrentMarker(je),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(ze.clientX,ze.clientY),ze.target):this.setCurrentMarker()}},ut.prototype.onPointerMove=function(ze){this.touchPoints!==1&&ze.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||ze.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(ze.clientX,ze.clientY)):this.zoomLevel>1&&this.panTo({x:ze.clientX,y:ze.clientY}))},ut.prototype.onPointerUp=function(ze){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(ze.clientX,ze.clientY)),this.isDragging=!1,this.addUndoStep()},ut.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ut.prototype.onKeyUp=function(ze){this._currentMarker===void 0||this.notesArea!==void 0||ze.key!=="Delete"&&ze.key!=="Backspace"||this.deleteSelectedMarker()},ut.prototype.clientToLocalCoordinates=function(ze,je){var it=this.markerImage.getBoundingClientRect();return{x:(ze-it.left)/this.zoomLevel,y:(je-it.top)/this.zoomLevel}},ut.prototype.onWindowResize=function(){this.positionUI()},ut.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var ze=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=ze+"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()},ut.prototype.addLicenseKey=function(ze){be.addKey(ze)},ut.prototype.addEventListener=function(ze,je){this.eventListeners.addEventListener(ze,je)},ut.prototype.removeEventListener=function(ze,je){this.eventListeners.removeEventListener(ze,je)},ut.prototype.renderState=function(ze){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(ze),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ut.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ut.prototype.focus=function(){var ze=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(je){return je(new Gt(ze))}))},ut.prototype.blur=function(){var ze=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(je){return je(new Gt(ze))}))},ut.instanceCounter=0,ut}()},42289:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return jn}});function Le(Ft){"@babel/helpers - typeof";return Le=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Yt){return typeof Yt}:function(Yt){return Yt&&typeof Symbol=="function"&&Yt.constructor===Symbol&&Yt!==Symbol.prototype?"symbol":typeof Yt},Le(Ft)}function ye(Ft,Yt){if(Le(Ft)!="object"||!Ft)return Ft;var nn=Ft[Symbol.toPrimitive];if(nn!==void 0){var yn=nn.call(Ft,Yt||"default");if(Le(yn)!="object")return yn;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Yt==="string"?String:Number)(Ft)}function Fe(Ft){var Yt=ye(Ft,"string");return Le(Yt)=="symbol"?Yt:Yt+""}function Me(Ft,Yt,nn){return(Yt=Fe(Yt))in Ft?Object.defineProperty(Ft,Yt,{value:nn,enumerable:!0,configurable:!0,writable:!0}):Ft[Yt]=nn,Ft}function Ee(Ft,Yt){var nn=Object.keys(Ft);if(Object.getOwnPropertySymbols){var yn=Object.getOwnPropertySymbols(Ft);Yt&&(yn=yn.filter(function(Xn){return Object.getOwnPropertyDescriptor(Ft,Xn).enumerable})),nn.push.apply(nn,yn)}return nn}function me(Ft){for(var Yt=1;Yt<arguments.length;Yt++){var nn=arguments[Yt]!=null?arguments[Yt]:{};Yt%2?Ee(Object(nn),!0).forEach(function(yn){Me(Ft,yn,nn[yn])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ft,Object.getOwnPropertyDescriptors(nn)):Ee(Object(nn)).forEach(function(yn){Object.defineProperty(Ft,yn,Object.getOwnPropertyDescriptor(nn,yn))})}return Ft}function be(Ft){if(Array.isArray(Ft))return Ft}function ve(Ft,Yt){var nn=Ft==null?null:typeof Symbol!="undefined"&&Ft[Symbol.iterator]||Ft["@@iterator"];if(nn!=null){var yn,Xn,yi,gi,Dn=[],vt=!0,Sr=!1;try{if(yi=(nn=nn.call(Ft)).next,Yt===0){if(Object(nn)!==nn)return;vt=!1}else for(;!(vt=(yn=yi.call(nn)).done)&&(Dn.push(yn.value),Dn.length!==Yt);vt=!0);}catch(Er){Sr=!0,Xn=Er}finally{try{if(!vt&&nn.return!=null&&(gi=nn.return(),Object(gi)!==gi))return}finally{if(Sr)throw Xn}}return Dn}}function we(Ft,Yt){(Yt==null||Yt>Ft.length)&&(Yt=Ft.length);for(var nn=0,yn=Array(Yt);nn<Yt;nn++)yn[nn]=Ft[nn];return yn}function ge(Ft,Yt){if(Ft){if(typeof Ft=="string")return we(Ft,Yt);var nn={}.toString.call(Ft).slice(8,-1);return nn==="Object"&&Ft.constructor&&(nn=Ft.constructor.name),nn==="Map"||nn==="Set"?Array.from(Ft):nn==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nn)?we(Ft,Yt):void 0}}function he(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xe(Ft,Yt){return be(Ft)||ve(Ft,Yt)||ge(Ft,Yt)||he()}function fe(Ft){if(Array.isArray(Ft))return Ft}function ue(Ft,Yt){var nn=Ft==null?null:typeof Symbol!="undefined"&&Ft[Symbol.iterator]||Ft["@@iterator"];if(nn!=null){var yn,Xn,yi,gi,Dn=[],vt=!0,Sr=!1;try{if(yi=(nn=nn.call(Ft)).next,Yt===0){if(Object(nn)!==nn)return;vt=!1}else for(;!(vt=(yn=yi.call(nn)).done)&&(Dn.push(yn.value),Dn.length!==Yt);vt=!0);}catch(Er){Sr=!0,Xn=Er}finally{try{if(!vt&&nn.return!=null&&(gi=nn.return(),Object(gi)!==gi))return}finally{if(Sr)throw Xn}}return Dn}}function ee(Ft,Yt){(Yt==null||Yt>Ft.length)&&(Yt=Ft.length);for(var nn=0,yn=new Array(Yt);nn<Yt;nn++)yn[nn]=Ft[nn];return yn}function z(Ft,Yt){if(Ft){if(typeof Ft=="string")return ee(Ft,Yt);var nn=Object.prototype.toString.call(Ft).slice(8,-1);if(nn==="Object"&&Ft.constructor&&(nn=Ft.constructor.name),nn==="Map"||nn==="Set")return Array.from(Ft);if(nn==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nn))return ee(Ft,Yt)}}function oe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ie(Ft,Yt){return fe(Ft)||ue(Ft,Yt)||z(Ft,Yt)||oe()}var se=De(67294),le=De(73935);function Se(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var pe={};function Ce(Ft,Yt){}function Ae(Ft,Yt){}function Oe(){pe={}}function Re(Ft,Yt,nn){!Yt&&!pe[nn]&&(Ft(!1,nn),pe[nn]=!0)}function We(Ft,Yt){Re(Ce,Ft,Yt)}function $e(Ft,Yt){Re(Ae,Ft,Yt)}var Je=null;function pt(Ft){"@babel/helpers - typeof";return pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Yt){return typeof Yt}:function(Yt){return Yt&&typeof Symbol=="function"&&Yt.constructor===Symbol&&Yt!==Symbol.prototype?"symbol":typeof Yt},pt(Ft)}var St=De(18459);function Mt(Ft,Yt,nn){var yn=se.useRef({});return(!("value"in yn.current)||nn(yn.current.condition,Yt))&&(yn.current.value=Ft(),yn.current.condition=Yt),yn.current.value}function ct(Ft,Yt){typeof Ft=="function"?Ft(Yt):pt(Ft)==="object"&&Ft&&"current"in Ft&&(Ft.current=Yt)}function wt(){for(var Ft=arguments.length,Yt=new Array(Ft),nn=0;nn<Ft;nn++)Yt[nn]=arguments[nn];var yn=Yt.filter(function(Xn){return Xn});return yn.length<=1?yn[0]:function(Xn){Yt.forEach(function(yi){ct(yi,Xn)})}}function ft(){for(var Ft=arguments.length,Yt=new Array(Ft),nn=0;nn<Ft;nn++)Yt[nn]=arguments[nn];return Mt(function(){return wt.apply(void 0,Yt)},Yt,function(yn,Xn){return yn.length===Xn.length&&yn.every(function(yi,gi){return yi===Xn[gi]})})}function $t(Ft){var Yt,nn,yn=(0,St.isMemo)(Ft)?Ft.type.type:Ft.type;return!(typeof yn=="function"&&!((Yt=yn.prototype)!==null&&Yt!==void 0&&Yt.render)||typeof Ft=="function"&&!((nn=Ft.prototype)!==null&&nn!==void 0&&nn.render))}var st=se.createContext(null),et=st;function lt(Ft){if(Array.isArray(Ft))return ee(Ft)}function dt(Ft){if(typeof Symbol!="undefined"&&Ft[Symbol.iterator]!=null||Ft["@@iterator"]!=null)return Array.from(Ft)}function bt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yt(Ft){return lt(Ft)||dt(Ft)||z(Ft)||bt()}var Vt=Se()?se.useLayoutEffect:se.useEffect,Kt=Vt,gn=function(Yt,nn){var yn=React.useRef(!0);Vt(function(){if(!yn.current)return Yt()},nn),Vt(function(){return yn.current=!1,function(){yn.current=!0}},[])},Gt=[];function Dt(Ft,Yt){var nn=se.useState(function(){if(!Se())return null;var zr=document.createElement("div");return zr}),yn=ie(nn,1),Xn=yn[0],yi=se.useRef(!1),gi=se.useContext(et),Dn=se.useState(Gt),vt=ie(Dn,2),Sr=vt[0],Er=vt[1],no=gi||(yi.current?void 0:function(zr){Er(function(Go){var co=[zr].concat(yt(Go));return co})});function io(){Xn.parentElement||document.body.appendChild(Xn),yi.current=!0}function ro(){var zr;(zr=Xn.parentElement)===null||zr===void 0||zr.removeChild(Xn),yi.current=!1}return Kt(function(){return Ft?gi?gi(io):io():ro(),ro},[Ft]),Kt(function(){Sr.length&&(Sr.forEach(function(zr){return zr()}),Er(Gt))},[Sr]),[Xn,no]}function on(Ft,Yt){if(!Ft)return!1;if(Ft.contains)return Ft.contains(Yt);for(var nn=Yt;nn;){if(nn===Ft)return!0;nn=nn.parentNode}return!1}var Jt="data-rc-order",jt="rc-util-key",ut=new Map;function ze(){var Ft=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Yt=Ft.mark;return Yt?Yt.startsWith("data-")?Yt:"data-".concat(Yt):jt}function je(Ft){if(Ft.attachTo)return Ft.attachTo;var Yt=document.querySelector("head");return Yt||document.body}function it(Ft){return Ft==="queue"?"prependQueue":Ft?"prepend":"append"}function ht(Ft){return Array.from((ut.get(Ft)||Ft).children).filter(function(Yt){return Yt.tagName==="STYLE"})}function nt(Ft){var Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Se())return null;var nn=Yt.csp,yn=Yt.prepend,Xn=document.createElement("style");Xn.setAttribute(Jt,it(yn)),nn!=null&&nn.nonce&&(Xn.nonce=nn==null?void 0:nn.nonce),Xn.innerHTML=Ft;var yi=je(Yt),gi=yi.firstChild;if(yn){if(yn==="queue"){var Dn=ht(yi).filter(function(vt){return["prepend","prependQueue"].includes(vt.getAttribute(Jt))});if(Dn.length)return yi.insertBefore(Xn,Dn[Dn.length-1].nextSibling),Xn}yi.insertBefore(Xn,gi)}else yi.appendChild(Xn);return Xn}function Ke(Ft){var Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},nn=je(Yt);return ht(nn).find(function(yn){return yn.getAttribute(ze(Yt))===Ft})}function Be(Ft){var Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},nn=Ke(Ft,Yt);if(nn){var yn=je(Yt);yn.removeChild(nn)}}function Ue(Ft,Yt){var nn=ut.get(Ft);if(!nn||!on(document,nn)){var yn=nt("",Yt),Xn=yn.parentNode;ut.set(Ft,Xn),Ft.removeChild(yn)}}function rt(){ut.clear()}function Ze(Ft,Yt){var nn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},yn=je(nn);Ue(yn,nn);var Xn=Ke(Yt,nn);if(Xn){var yi,gi;if((yi=nn.csp)!==null&&yi!==void 0&&yi.nonce&&Xn.nonce!==((gi=nn.csp)===null||gi===void 0?void 0:gi.nonce)){var Dn;Xn.nonce=(Dn=nn.csp)===null||Dn===void 0?void 0:Dn.nonce}return Xn.innerHTML!==Ft&&(Xn.innerHTML=Ft),Xn}var vt=nt(Ft,nn);return vt.setAttribute(ze(nn),Yt),vt}var Xe;function mt(Ft){if(typeof document=="undefined")return 0;if(Ft||Xe===void 0){var Yt=document.createElement("div");Yt.style.width="100%",Yt.style.height="200px";var nn=document.createElement("div"),yn=nn.style;yn.position="absolute",yn.top="0",yn.left="0",yn.pointerEvents="none",yn.visibility="hidden",yn.width="200px",yn.height="150px",yn.overflow="hidden",nn.appendChild(Yt),document.body.appendChild(nn);var Xn=Yt.offsetWidth;nn.style.overflow="scroll";var yi=Yt.offsetWidth;Xn===yi&&(yi=nn.clientWidth),document.body.removeChild(nn),Xe=Xn-yi}return Xe}function Rt(Ft){var Yt=Ft.match(/^(.*)px$/),nn=Number(Yt==null?void 0:Yt[1]);return Number.isNaN(nn)?mt():nn}function vn(Ft){if(typeof document=="undefined"||!Ft||!(Ft instanceof Element))return{width:0,height:0};var Yt=getComputedStyle(Ft,"::-webkit-scrollbar"),nn=Yt.width,yn=Yt.height;return{width:Rt(nn),height:Rt(yn)}}function An(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var Mn="rc-util-locker-".concat(Date.now()),hi=0;function mi(Ft){var Yt=!!Ft,nn=se.useState(function(){return hi+=1,"".concat(Mn,"_").concat(hi)}),yn=ie(nn,1),Xn=yn[0];Kt(function(){if(Yt){var yi=vn(document.body).width,gi=An();Ze(`
|
|
|
html body {
|
|
|
overflow-y: hidden;
|
|
|
`.concat(gi?"width: calc(100% - ".concat(yi,"px);"):"",`
|
|
|
}`),Xn)}else Be(Xn);return function(){Be(Xn)}},[Yt,Xn])}var si=!1;function Cn(Ft){return typeof Ft=="boolean"&&(si=Ft),si}var Ki=function(Yt){return Yt===!1?!1:!Se()||!Yt?null:typeof Yt=="string"?document.querySelector(Yt):typeof Yt=="function"?Yt():Yt},Yn=se.forwardRef(function(Ft,Yt){var nn=Ft.open,yn=Ft.autoLock,Xn=Ft.getContainer,yi=Ft.debug,gi=Ft.autoDestroy,Dn=gi===void 0?!0:gi,vt=Ft.children,Sr=se.useState(nn),Er=ie(Sr,2),no=Er[0],io=Er[1],ro=no||nn;se.useEffect(function(){(Dn||nn)&&io(nn)},[nn,Dn]);var zr=se.useState(function(){return Ki(Xn)}),Go=ie(zr,2),co=Go[0],br=Go[1];se.useEffect(function(){var xo=Ki(Xn);br(xo!=null?xo:null)});var ir=Dt(ro&&!co,yi),Pi=ie(ir,2),ui=Pi[0],Di=Pi[1],Sn=co!=null?co:ui;mi(yn&&nn&&Se()&&(Sn===ui||Sn===document.body));var ji=null;if(vt&&$t(vt)&&Yt){var Wi=vt;ji=Wi.ref}var Ur=ft(ji,Yt);if(!ro||!Se()||co===void 0)return null;var Xr=Sn===!1||Cn(),Jr=vt;return Yt&&(Jr=se.cloneElement(vt,{ref:Ur})),se.createElement(et.Provider,{value:Di},Xr?Jr:(0,le.createPortal)(Jr,Sn))}),Qi=Yn,vr=Qi;function Dr(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Ci=Dr()?se.useLayoutEffect:se.useEffect,kr=function(Yt,nn){var yn=se.useRef(!0);Ci(function(){return Yt(yn.current)},nn),Ci(function(){return yn.current=!1,function(){yn.current=!0}},[])},vo=function(Yt,nn){kr(function(yn){if(!yn)return Yt()},nn)},qo=kr,Do=se.createContext(null),Oo=se.createContext({}),Cr=Do;function jo(){return jo=Object.assign?Object.assign.bind():function(Ft){for(var Yt=1;Yt<arguments.length;Yt++){var nn=arguments[Yt];for(var yn in nn)({}).hasOwnProperty.call(nn,yn)&&(Ft[yn]=nn[yn])}return Ft},jo.apply(null,arguments)}var or=De(94184),kn=De.n(or),qe=De(62874),Tn={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(Yt){var nn=Yt.keyCode;if(Yt.altKey&&!Yt.ctrlKey||Yt.metaKey||nn>=Tn.F1&&nn<=Tn.F12)return!1;switch(nn){case Tn.ALT:case Tn.CAPS_LOCK:case Tn.CONTEXT_MENU:case Tn.CTRL:case Tn.DOWN:case Tn.END:case Tn.ESC:case Tn.HOME:case Tn.INSERT:case Tn.LEFT:case Tn.MAC_FF_META:case Tn.META:case Tn.NUMLOCK:case Tn.NUM_CENTER:case Tn.PAGE_DOWN:case Tn.PAGE_UP:case Tn.PAUSE:case Tn.PRINT_SCREEN:case Tn.RIGHT:case Tn.SHIFT:case Tn.UP:case Tn.WIN_KEY:case Tn.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Yt){if(Yt>=Tn.ZERO&&Yt<=Tn.NINE||Yt>=Tn.NUM_ZERO&&Yt<=Tn.NUM_MULTIPLY||Yt>=Tn.A&&Yt<=Tn.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Yt===0)return!0;switch(Yt){case Tn.SPACE:case Tn.QUESTION_MARK:case Tn.NUM_PLUS:case Tn.NUM_MINUS:case Tn.NUM_PERIOD:case Tn.NUM_DIVISION:case Tn.SEMICOLON:case Tn.DASH:case Tn.EQUALS:case Tn.COMMA:case Tn.PERIOD:case Tn.SLASH:case Tn.APOSTROPHE:case Tn.SINGLE_QUOTE:case Tn.OPEN_SQUARE_BRACKET:case Tn.BACKSLASH:case Tn.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},In=Tn;function zi(Ft){"@babel/helpers - typeof";return zi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Yt){return typeof Yt}:function(Yt){return Yt&&typeof Symbol=="function"&&Yt.constructor===Symbol&&Yt!==Symbol.prototype?"symbol":typeof Yt},zi(Ft)}function Gi(Ft,Yt){if(zi(Ft)!=="object"||Ft===null)return Ft;var nn=Ft[Symbol.toPrimitive];if(nn!==void 0){var yn=nn.call(Ft,Yt||"default");if(zi(yn)!=="object")return yn;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Yt==="string"?String:Number)(Ft)}function Vi(Ft){var Yt=Gi(Ft,"string");return zi(Yt)==="symbol"?Yt:String(Yt)}function Zi(Ft,Yt,nn){return Yt=Vi(Yt),Yt in Ft?Object.defineProperty(Ft,Yt,{value:nn,enumerable:!0,configurable:!0,writable:!0}):Ft[Yt]=nn,Ft}function qr(Ft,Yt){var nn=Object.keys(Ft);if(Object.getOwnPropertySymbols){var yn=Object.getOwnPropertySymbols(Ft);Yt&&(yn=yn.filter(function(Xn){return Object.getOwnPropertyDescriptor(Ft,Xn).enumerable})),nn.push.apply(nn,yn)}return nn}function sn(Ft){for(var Yt=1;Yt<arguments.length;Yt++){var nn=arguments[Yt]!=null?arguments[Yt]:{};Yt%2?qr(Object(nn),!0).forEach(function(yn){Zi(Ft,yn,nn[yn])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ft,Object.getOwnPropertyDescriptors(nn)):qr(Object(nn)).forEach(function(yn){Object.defineProperty(Ft,yn,Object.getOwnPropertyDescriptor(nn,yn))})}return Ft}var He=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
|
summary tabIndex target title type useMap value width wmode wrap`,Ve=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,ot="".concat(He," ").concat(Ve).split(/[\s\n]+/),Lt="aria-",At="data-";function an(Ft,Yt){return Ft.indexOf(Yt)===0}function Ot(Ft){var Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,nn;Yt===!1?nn={aria:!0,data:!0,attr:!0}:Yt===!0?nn={aria:!0}:nn=sn({},Yt);var yn={};return Object.keys(Ft).forEach(function(Xn){(nn.aria&&(Xn==="role"||an(Xn,Lt))||nn.data&&an(Xn,At)||nn.attr&&ot.includes(Xn))&&(yn[Xn]=Ft[Xn])}),yn}function xn(Ft,Yt){if(Ft==null)return{};var nn={};for(var yn in Ft)if({}.hasOwnProperty.call(Ft,yn)){if(Yt.indexOf(yn)!==-1)continue;nn[yn]=Ft[yn]}return nn}function Zn(Ft,Yt){if(Ft==null)return{};var nn,yn,Xn=xn(Ft,Yt);if(Object.getOwnPropertySymbols){var yi=Object.getOwnPropertySymbols(Ft);for(yn=0;yn<yi.length;yn++)nn=yi[yn],Yt.indexOf(nn)===-1&&{}.propertyIsEnumerable.call(Ft,nn)&&(Xn[nn]=Ft[nn])}return Xn}var wi=De(33993);function Bn(Ft,Yt,nn){var yn=se.useRef({});return(!("value"in yn.current)||nn(yn.current.condition,Yt))&&(yn.current.value=Ft(),yn.current.condition=Yt),yn.current.value}var rn=Symbol.for("react.element"),Fn=Symbol.for("react.transitional.element"),vi=Symbol.for("react.fragment");function _i(Ft){return Ft&&_typeof(Ft)==="object"&&(Ft.$$typeof===rn||Ft.$$typeof===Fn)&&Ft.type===vi}var cn=Number(se.version.split(".")[0]),qn=function(Yt,nn){typeof Yt=="function"?Yt(nn):zi(Yt)==="object"&&Yt&&"current"in Yt&&(Yt.current=nn)},Ii=function(){for(var Yt=arguments.length,nn=new Array(Yt),yn=0;yn<Yt;yn++)nn[yn]=arguments[yn];var Xn=nn.filter(Boolean);return Xn.length<=1?Xn[0]:function(yi){nn.forEach(function(gi){qn(gi,yi)})}},lr=function(){for(var Yt=arguments.length,nn=new Array(Yt),yn=0;yn<Yt;yn++)nn[yn]=arguments[yn];return Bn(function(){return Ii.apply(void 0,nn)},nn,function(Xn,yi){return Xn.length!==yi.length||Xn.every(function(gi,Dn){return gi!==yi[Dn]})})},_r=function(Yt){var nn,yn;if(!Yt)return!1;if(Ti(Yt)&&cn>=19)return!0;var Xn=isMemo(Yt)?Yt.type.type:Yt.type;return!(typeof Xn=="function"&&!((nn=Xn.prototype)!==null&&nn!==void 0&&nn.render)&&Xn.$$typeof!==ForwardRef||typeof Yt=="function"&&!((yn=Yt.prototype)!==null&&yn!==void 0&&yn.render)&&Yt.$$typeof!==ForwardRef)};function Ti(Ft){return isValidElement(Ft)&&!isFragment(Ft)}var bi=function(Yt){return Ti(Yt)&&_r(Yt)},li=function(Yt){if(Yt&&Ti(Yt)){var nn=Yt;return nn.props.propertyIsEnumerable("ref")?nn.props.ref:nn.ref}return null},dr=["prefixCls","className","containerRef"],jr=function(Yt){var nn=Yt.prefixCls,yn=Yt.className,Xn=Yt.containerRef,yi=Zn(Yt,dr),gi=se.useContext(Oo),Dn=gi.panel,vt=lr(Dn,Xn);return se.createElement("div",jo({className:kn()("".concat(nn,"-content"),yn),role:"dialog",ref:vt},Ot(Yt,{aria:!0}),{"aria-modal":"true"},yi))},ei=jr,Ui={},ws=[],cs=function(Yt){ws.push(Yt)};function Io(Ft,Yt){if(0)var nn}function dn(Ft,Yt){if(0)var nn}function gr(){Ui={}}function Zr(Ft,Yt,nn){!Yt&&!Ui[nn]&&(Ft(!1,nn),Ui[nn]=!0)}function $i(Ft,Yt){Zr(Io,Ft,Yt)}function yo(Ft,Yt){Zr(dn,Ft,Yt)}$i.preMessage=cs,$i.resetWarned=gr,$i.noteOnce=yo;var Rr=$i;function uo(Ft){return typeof Ft=="string"&&String(Number(Ft))===Ft?(Rr(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Ft)):Ft}function to(Ft){warning(!("wrapperClassName"in Ft),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Ft.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Yr={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Fo(Ft,Yt){var nn,yn,Xn,yi=Ft.prefixCls,gi=Ft.open,Dn=Ft.placement,vt=Ft.inline,Sr=Ft.push,Er=Ft.forceRender,no=Ft.autoFocus,io=Ft.keyboard,ro=Ft.classNames,zr=Ft.rootClassName,Go=Ft.rootStyle,co=Ft.zIndex,br=Ft.className,ir=Ft.id,Pi=Ft.style,ui=Ft.motion,Di=Ft.width,Sn=Ft.height,ji=Ft.children,Wi=Ft.mask,Ur=Ft.maskClosable,Xr=Ft.maskMotion,Jr=Ft.maskClassName,xo=Ft.maskStyle,Qo=Ft.afterOpenChange,Wo=Ft.onClose,_s=Ft.onMouseEnter,As=Ft.onMouseOver,pn=Ft.onMouseLeave,ss=Ft.onClick,ps=Ft.onKeyDown,Ts=Ft.onKeyUp,mo=Ft.styles,Ns=Ft.drawerRender,Ss=se.useRef(),Us=se.useRef(),fo=se.useRef();se.useImperativeHandle(Yt,function(){return Ss.current});var Co=function(oa){var Hr=oa.keyCode,Xa=oa.shiftKey;switch(Hr){case In.TAB:{if(Hr===In.TAB){if(!Xa&&document.activeElement===fo.current){var Hs;(Hs=Us.current)===null||Hs===void 0||Hs.focus({preventScroll:!0})}else if(Xa&&document.activeElement===Us.current){var Ks;(Ks=fo.current)===null||Ks===void 0||Ks.focus({preventScroll:!0})}}break}case In.ESC:{Wo&&io&&(oa.stopPropagation(),Wo(oa));break}}};se.useEffect(function(){if(gi&&no){var vs;(vs=Ss.current)===null||vs===void 0||vs.focus({preventScroll:!0})}},[gi]);var pr=se.useState(!1),Gr=xe(pr,2),po=Gr[0],Ro=Gr[1],Ei=se.useContext(Cr),ms;typeof Sr=="boolean"?ms=Sr?{}:{distance:0}:ms=Sr||{};var hs=(nn=(yn=(Xn=ms)===null||Xn===void 0?void 0:Xn.distance)!==null&&yn!==void 0?yn:Ei==null?void 0:Ei.pushDistance)!==null&&nn!==void 0?nn:180,ds=se.useMemo(function(){return{pushDistance:hs,push:function(){Ro(!0)},pull:function(){Ro(!1)}}},[hs]);se.useEffect(function(){if(gi){var vs;Ei==null||(vs=Ei.push)===null||vs===void 0||vs.call(Ei)}else{var oa;Ei==null||(oa=Ei.pull)===null||oa===void 0||oa.call(Ei)}},[gi]),se.useEffect(function(){return function(){var vs;Ei==null||(vs=Ei.pull)===null||vs===void 0||vs.call(Ei)}},[]);var ia=Wi&&se.createElement(qe.Z,jo({key:"mask"},Xr,{visible:gi}),function(vs,oa){var Hr=vs.className,Xa=vs.style;return se.createElement("div",{className:kn()("".concat(yi,"-mask"),Hr,ro==null?void 0:ro.mask,Jr),style:me(me(me({},Xa),xo),mo==null?void 0:mo.mask),onClick:Ur&&gi?Wo:void 0,ref:oa})}),ra=typeof ui=="function"?ui(Dn):ui,di={};if(po&&hs)switch(Dn){case"top":di.transform="translateY(".concat(hs,"px)");break;case"bottom":di.transform="translateY(".concat(-hs,"px)");break;case"left":di.transform="translateX(".concat(hs,"px)");break;default:di.transform="translateX(".concat(-hs,"px)");break}Dn==="left"||Dn==="right"?di.width=uo(Di):di.height=uo(Sn);var xs={onMouseEnter:_s,onMouseOver:As,onMouseLeave:pn,onClick:ss,onKeyDown:ps,onKeyUp:Ts},Ls=se.createElement(qe.Z,jo({key:"panel"},ra,{visible:gi,forceRender:Er,onVisibleChanged:function(oa){Qo==null||Qo(oa)},removeOnLeave:!1,leavedClassName:"".concat(yi,"-content-wrapper-hidden")}),function(vs,oa){var Hr=vs.className,Xa=vs.style,Hs=se.createElement(ei,jo({id:ir,containerRef:oa,prefixCls:yi,className:kn()(br,ro==null?void 0:ro.content),style:me(me({},Pi),mo==null?void 0:mo.content)},Ot(Ft,{aria:!0}),xs),ji);return se.createElement("div",jo({className:kn()("".concat(yi,"-content-wrapper"),ro==null?void 0:ro.wrapper,Hr),style:me(me(me({},di),Xa),mo==null?void 0:mo.wrapper)},Ot(Ft,{data:!0})),Ns?Ns(Hs):Hs)}),ga=me({},Go);return co&&(ga.zIndex=co),se.createElement(Cr.Provider,{value:ds},se.createElement("div",{className:kn()(yi,"".concat(yi,"-").concat(Dn),zr,Me(Me({},"".concat(yi,"-open"),gi),"".concat(yi,"-inline"),vt)),style:ga,tabIndex:-1,ref:Ss,onKeyDown:Co},ia,se.createElement("div",{tabIndex:0,ref:Us,style:Yr,"aria-hidden":"true","data-sentinel":"start"}),Ls,se.createElement("div",{tabIndex:0,ref:fo,style:Yr,"aria-hidden":"true","data-sentinel":"end"})))}var zn=se.forwardRef(Fo),ns=zn,Ut=function(Yt){var nn=Yt.open,yn=nn===void 0?!1:nn,Xn=Yt.prefixCls,yi=Xn===void 0?"rc-drawer":Xn,gi=Yt.placement,Dn=gi===void 0?"right":gi,vt=Yt.autoFocus,Sr=vt===void 0?!0:vt,Er=Yt.keyboard,no=Er===void 0?!0:Er,io=Yt.width,ro=io===void 0?378:io,zr=Yt.mask,Go=zr===void 0?!0:zr,co=Yt.maskClosable,br=co===void 0?!0:co,ir=Yt.getContainer,Pi=Yt.forceRender,ui=Yt.afterOpenChange,Di=Yt.destroyOnClose,Sn=Yt.onMouseEnter,ji=Yt.onMouseOver,Wi=Yt.onMouseLeave,Ur=Yt.onClick,Xr=Yt.onKeyDown,Jr=Yt.onKeyUp,xo=Yt.panelRef,Qo=se.useState(!1),Wo=xe(Qo,2),_s=Wo[0],As=Wo[1],pn=se.useState(!1),ss=xe(pn,2),ps=ss[0],Ts=ss[1];qo(function(){Ts(!0)},[]);var mo=ps?yn:!1,Ns=se.useRef(),Ss=se.useRef();qo(function(){mo&&(Ss.current=document.activeElement)},[mo]);var Us=function(po){var Ro;if(As(po),ui==null||ui(po),!po&&Ss.current&&!((Ro=Ns.current)!==null&&Ro!==void 0&&Ro.contains(Ss.current))){var Ei;(Ei=Ss.current)===null||Ei===void 0||Ei.focus({preventScroll:!0})}},fo=se.useMemo(function(){return{panel:xo}},[xo]);if(!Pi&&!_s&&!mo&&Di)return null;var Co={onMouseEnter:Sn,onMouseOver:ji,onMouseLeave:Wi,onClick:Ur,onKeyDown:Xr,onKeyUp:Jr},pr=me(me({},Yt),{},{open:mo,prefixCls:yi,placement:Dn,autoFocus:Sr,keyboard:no,width:ro,mask:Go,maskClosable:br,inline:ir===!1,afterOpenChange:Us,ref:Ns},Co);return se.createElement(Oo.Provider,{value:fo},se.createElement(vr,{open:mo||Pi||_s,autoDestroy:!1,getContainer:ir,autoLock:Go&&(mo||_s)},se.createElement(ns,pr)))},en=Ut,jn=en},26819:function(_n,hn){"use strict";var De;var Le=typeof Symbol=="function"&&Symbol.for,ye=Le?Symbol.for("react.element"):60103,Fe=Le?Symbol.for("react.portal"):60106,Me=Le?Symbol.for("react.fragment"):60107,Ee=Le?Symbol.for("react.strict_mode"):60108,me=Le?Symbol.for("react.profiler"):60114,be=Le?Symbol.for("react.provider"):60109,ve=Le?Symbol.for("react.context"):60110,we=Le?Symbol.for("react.async_mode"):60111,ge=Le?Symbol.for("react.concurrent_mode"):60111,he=Le?Symbol.for("react.forward_ref"):60112,xe=Le?Symbol.for("react.suspense"):60113,fe=Le?Symbol.for("react.suspense_list"):60120,ue=Le?Symbol.for("react.memo"):60115,ee=Le?Symbol.for("react.lazy"):60116,z=Le?Symbol.for("react.block"):60121,oe=Le?Symbol.for("react.fundamental"):60117,ie=Le?Symbol.for("react.responder"):60118,se=Le?Symbol.for("react.scope"):60119;function le(pe){if(typeof pe=="object"&&pe!==null){var Ce=pe.$$typeof;switch(Ce){case ye:switch(pe=pe.type,pe){case we:case ge:case Me:case me:case Ee:case xe:return pe;default:switch(pe=pe&&pe.$$typeof,pe){case ve:case he:case ee:case ue:case be:return pe;default:return Ce}}case Fe:return Ce}}}function Se(pe){return le(pe)===ge}De=we,De=ge,De=ve,De=be,De=ye,De=he,De=Me,De=ee,De=ue,De=Fe,De=me,De=Ee,De=xe,De=function(pe){return Se(pe)||le(pe)===we},De=Se,De=function(pe){return le(pe)===ve},De=function(pe){return le(pe)===be},De=function(pe){return typeof pe=="object"&&pe!==null&&pe.$$typeof===ye},De=function(pe){return le(pe)===he},De=function(pe){return le(pe)===Me},De=function(pe){return le(pe)===ee},hn.isMemo=function(pe){return le(pe)===ue},De=function(pe){return le(pe)===Fe},De=function(pe){return le(pe)===me},De=function(pe){return le(pe)===Ee},De=function(pe){return le(pe)===xe},De=function(pe){return typeof pe=="string"||typeof pe=="function"||pe===Me||pe===ge||pe===me||pe===Ee||pe===xe||pe===fe||typeof pe=="object"&&pe!==null&&(pe.$$typeof===ee||pe.$$typeof===ue||pe.$$typeof===be||pe.$$typeof===ve||pe.$$typeof===he||pe.$$typeof===oe||pe.$$typeof===ie||pe.$$typeof===se||pe.$$typeof===z)},De=le},18459:function(_n,hn,De){"use strict";_n.exports=De(26819)},16651:function(_n,hn){"use strict";var De;var Le=Symbol.for("react.element"),ye=Symbol.for("react.portal"),Fe=Symbol.for("react.fragment"),Me=Symbol.for("react.strict_mode"),Ee=Symbol.for("react.profiler"),me=Symbol.for("react.provider"),be=Symbol.for("react.context"),ve=Symbol.for("react.server_context"),we=Symbol.for("react.forward_ref"),ge=Symbol.for("react.suspense"),he=Symbol.for("react.suspense_list"),xe=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),ue=Symbol.for("react.offscreen"),ee;ee=Symbol.for("react.module.reference");function z(oe){if(typeof oe=="object"&&oe!==null){var ie=oe.$$typeof;switch(ie){case Le:switch(oe=oe.type,oe){case Fe:case Ee:case Me:case ge:case he:return oe;default:switch(oe=oe&&oe.$$typeof,oe){case ve:case be:case we:case fe:case xe:case me:return oe;default:return ie}}case ye:return ie}}}De=be,De=me,De=Le,De=we,De=Fe,De=fe,De=xe,De=ye,De=Ee,De=Me,De=ge,De=he,De=function(){return!1},De=function(){return!1},De=function(oe){return z(oe)===be},De=function(oe){return z(oe)===me},De=function(oe){return typeof oe=="object"&&oe!==null&&oe.$$typeof===Le},De=function(oe){return z(oe)===we},De=function(oe){return z(oe)===Fe},De=function(oe){return z(oe)===fe},De=function(oe){return z(oe)===xe},De=function(oe){return z(oe)===ye},De=function(oe){return z(oe)===Ee},De=function(oe){return z(oe)===Me},De=function(oe){return z(oe)===ge},De=function(oe){return z(oe)===he},De=function(oe){return typeof oe=="string"||typeof oe=="function"||oe===Fe||oe===Ee||oe===Me||oe===ge||oe===he||oe===ue||typeof oe=="object"&&oe!==null&&(oe.$$typeof===fe||oe.$$typeof===xe||oe.$$typeof===me||oe.$$typeof===be||oe.$$typeof===we||oe.$$typeof===ee||oe.getModuleId!==void 0)},De=z},33993:function(_n,hn,De){"use strict";De(16651)},64909:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return ns}});var Le=De(87462),ye=De(1413),Fe=De(4942),Me=De(97685),Ee=De(71002),me=De(45987),be=De(94184),ve=De.n(be),we=/margin|padding|width|height|max|min|offset/,ge={left:!0,top:!0},he={cssFloat:1,styleFloat:1,float:1};function xe(Ut){return Ut.nodeType===1?Ut.ownerDocument.defaultView.getComputedStyle(Ut,null):{}}function fe(Ut,en,jn){if(en=en.toLowerCase(),jn==="auto"){if(en==="height")return Ut.offsetHeight;if(en==="width")return Ut.offsetWidth}return en in ge||(ge[en]=we.test(en)),ge[en]?parseFloat(jn)||0:jn}function ue(Ut,en){var jn=arguments.length,Ft=xe(Ut);return en=he[en]?"cssFloat"in Ut.style?"cssFloat":"styleFloat":en,jn===1?Ft:fe(Ut,en,Ft[en]||Ut.style[en])}function ee(Ut,en,jn){var Ft=arguments.length;if(en=he[en]?"cssFloat"in Ut.style?"cssFloat":"styleFloat":en,Ft===3)return typeof jn=="number"&&we.test(en)&&(jn="".concat(jn,"px")),Ut.style[en]=jn,jn;for(var Yt in en)en.hasOwnProperty(Yt)&&ee(Ut,Yt,en[Yt]);return xe(Ut)}function z(Ut){return Ut===document.body?document.documentElement.clientWidth:Ut.offsetWidth}function oe(Ut){return Ut===document.body?window.innerHeight||document.documentElement.clientHeight:Ut.offsetHeight}function ie(){var Ut=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),en=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:Ut,height:en}}function se(){var Ut=document.documentElement.clientWidth,en=window.innerHeight||document.documentElement.clientHeight;return{width:Ut,height:en}}function le(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function Se(Ut){var en=Ut.getBoundingClientRect(),jn=document.documentElement;return{left:en.left+(window.pageXOffset||jn.scrollLeft)-(jn.clientLeft||document.body.clientLeft||0),top:en.top+(window.pageYOffset||jn.scrollTop)-(jn.clientTop||document.body.clientTop||0)}}var pe=De(67294),Ce=De.t(pe,2);function Ae(Ut){var en=pe.useRef();en.current=Ut;var jn=pe.useCallback(function(){for(var Ft,Yt=arguments.length,nn=new Array(Yt),yn=0;yn<Yt;yn++)nn[yn]=arguments[yn];return(Ft=en.current)===null||Ft===void 0?void 0:Ft.call.apply(Ft,[en].concat(nn))},[]);return jn}function Oe(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Re=Oe()?pe.useLayoutEffect:pe.useEffect,We=function(en,jn){var Ft=pe.useRef(!0);Re(function(){return en(Ft.current)},jn),Re(function(){return Ft.current=!1,function(){Ft.current=!0}},[])},$e=function(en,jn){We(function(Ft){if(!Ft)return en()},jn)},Je=null;function pt(Ut){var en=pe.useRef(!1),jn=pe.useState(Ut),Ft=(0,Me.Z)(jn,2),Yt=Ft[0],nn=Ft[1];pe.useEffect(function(){return en.current=!1,function(){en.current=!0}},[]);function yn(Xn,yi){yi&&en.current||nn(Xn)}return[Yt,yn]}function St(Ut){return Ut!==void 0}function Mt(Ut,en){var jn=en||{},Ft=jn.defaultValue,Yt=jn.value,nn=jn.onChange,yn=jn.postState,Xn=pt(function(){return St(Yt)?Yt:St(Ft)?typeof Ft=="function"?Ft():Ft:typeof Ut=="function"?Ut():Ut}),yi=(0,Me.Z)(Xn,2),gi=yi[0],Dn=yi[1],vt=Yt!==void 0?Yt:gi,Sr=yn?yn(vt):vt,Er=Ae(nn),no=pt([vt]),io=(0,Me.Z)(no,2),ro=io[0],zr=io[1];$e(function(){var co=ro[0];gi!==co&&Er(gi,co)},[ro]),$e(function(){St(Yt)||Dn(Yt)},[Yt]);var Go=Ae(function(co,br){Dn(co,br),zr([vt],br)});return[Sr,Go]}var ct=De(2788),wt=pe.createContext({});function ft(Ut,en){if(!Ut)return!1;if(Ut.contains)return Ut.contains(en);for(var jn=en;jn;){if(jn===Ut)return!0;jn=jn.parentNode}return!1}function $t(){var Ut=(0,ye.Z)({},Ce);return Ut.useId}var st=0;function et(){}function lt(Ut){var en=pe.useState("ssr-id"),jn=(0,Me.Z)(en,2),Ft=jn[0],Yt=jn[1],nn=$t(),yn=nn==null?void 0:nn();return pe.useEffect(function(){if(!nn){var Xn=st;st+=1,Yt("rc_unique_".concat(Xn))}},[]),Ut||yn||Ft}var dt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(en){var jn=en.keyCode;if(en.altKey&&!en.ctrlKey||en.metaKey||jn>=dt.F1&&jn<=dt.F12)return!1;switch(jn){case dt.ALT:case dt.CAPS_LOCK:case dt.CONTEXT_MENU:case dt.CTRL:case dt.DOWN:case dt.END:case dt.ESC:case dt.HOME:case dt.INSERT:case dt.LEFT:case dt.MAC_FF_META:case dt.META:case dt.NUMLOCK:case dt.NUM_CENTER:case dt.PAGE_DOWN:case dt.PAGE_UP:case dt.PAUSE:case dt.PRINT_SCREEN:case dt.RIGHT:case dt.SHIFT:case dt.UP:case dt.WIN_KEY:case dt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(en){if(en>=dt.ZERO&&en<=dt.NINE||en>=dt.NUM_ZERO&&en<=dt.NUM_MULTIPLY||en>=dt.A&&en<=dt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&en===0)return!0;switch(en){case dt.SPACE:case dt.QUESTION_MARK:case dt.NUM_PLUS:case dt.NUM_MINUS:case dt.NUM_PERIOD:case dt.NUM_DIVISION:case dt.SEMICOLON:case dt.DASH:case dt.EQUALS:case dt.COMMA:case dt.PERIOD:case dt.SLASH:case dt.APOSTROPHE:case dt.SINGLE_QUOTE:case dt.OPEN_SQUARE_BRACKET:case dt.BACKSLASH:case dt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},bt=dt,yt=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
|
summary tabIndex target title type useMap value width wmode wrap`,Vt=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,Kt="".concat(yt," ").concat(Vt).split(/[\s\n]+/),gn="aria-",Gt="data-";function Dt(Ut,en){return Ut.indexOf(en)===0}function on(Ut){var en=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,jn;en===!1?jn={aria:!0,data:!0,attr:!0}:en===!0?jn={aria:!0}:jn=(0,ye.Z)({},en);var Ft={};return Object.keys(Ut).forEach(function(Yt){(jn.aria&&(Yt==="role"||Dt(Yt,gn))||jn.data&&Dt(Yt,Gt)||jn.attr&&Kt.includes(Yt))&&(Ft[Yt]=Ut[Yt])}),Ft}function Jt(Ut,en,jn){var Ft=en;return!Ft&&jn&&(Ft="".concat(Ut,"-").concat(jn)),Ft}function jt(Ut,en){var jn=Ut["page".concat(en?"Y":"X","Offset")],Ft="scroll".concat(en?"Top":"Left");if(typeof jn!="number"){var Yt=Ut.document;jn=Yt.documentElement[Ft],typeof jn!="number"&&(jn=Yt.body[Ft])}return jn}function ut(Ut){var en=Ut.getBoundingClientRect(),jn={left:en.left,top:en.top},Ft=Ut.ownerDocument,Yt=Ft.defaultView||Ft.parentWindow;return jn.left+=jt(Yt),jn.top+=jt(Yt,!0),jn}var ze=De(62874),je=De(59864);function it(Ut,en,jn){var Ft=pe.useRef({});return(!("value"in Ft.current)||jn(Ft.current.condition,en))&&(Ft.current.value=Ut(),Ft.current.condition=en),Ft.current.value}function ht(Ut,en){typeof Ut=="function"?Ut(en):(0,Ee.Z)(Ut)==="object"&&Ut&&"current"in Ut&&(Ut.current=en)}function nt(){for(var Ut=arguments.length,en=new Array(Ut),jn=0;jn<Ut;jn++)en[jn]=arguments[jn];var Ft=en.filter(function(Yt){return Yt});return Ft.length<=1?Ft[0]:function(Yt){en.forEach(function(nn){ht(nn,Yt)})}}function Ke(){for(var Ut=arguments.length,en=new Array(Ut),jn=0;jn<Ut;jn++)en[jn]=arguments[jn];return it(function(){return nt.apply(void 0,en)},en,function(Ft,Yt){return Ft.length===Yt.length&&Ft.every(function(nn,yn){return nn===Yt[yn]})})}function Be(Ut){var en,jn,Ft=isMemo(Ut)?Ut.type.type:Ut.type;return!(typeof Ft=="function"&&!((en=Ft.prototype)!==null&&en!==void 0&&en.render)||typeof Ut=="function"&&!((jn=Ut.prototype)!==null&&jn!==void 0&&jn.render))}var Ue=pe.memo(function(Ut){var en=Ut.children;return en},function(Ut,en){var jn=en.shouldUpdate;return!jn}),rt={width:0,height:0,overflow:"hidden",outline:"none"},Ze={outline:"none"},Xe=pe.forwardRef(function(Ut,en){var jn=Ut.prefixCls,Ft=Ut.className,Yt=Ut.style,nn=Ut.title,yn=Ut.ariaId,Xn=Ut.footer,yi=Ut.closable,gi=Ut.closeIcon,Dn=Ut.onClose,vt=Ut.children,Sr=Ut.bodyStyle,Er=Ut.bodyProps,no=Ut.modalRender,io=Ut.onMouseDown,ro=Ut.onMouseUp,zr=Ut.holderRef,Go=Ut.visible,co=Ut.forceRender,br=Ut.width,ir=Ut.height,Pi=Ut.classNames,ui=Ut.styles,Di=pe.useContext(wt),Sn=Di.panel,ji=Ke(zr,Sn),Wi=(0,pe.useRef)(),Ur=(0,pe.useRef)();pe.useImperativeHandle(en,function(){return{focus:function(){var ps;(ps=Wi.current)===null||ps===void 0||ps.focus({preventScroll:!0})},changeActive:function(ps){var Ts=document,mo=Ts.activeElement;ps&&mo===Ur.current?Wi.current.focus({preventScroll:!0}):!ps&&mo===Wi.current&&Ur.current.focus({preventScroll:!0})}}});var Xr={};br!==void 0&&(Xr.width=br),ir!==void 0&&(Xr.height=ir);var Jr=Xn?pe.createElement("div",{className:ve()("".concat(jn,"-footer"),Pi==null?void 0:Pi.footer),style:(0,ye.Z)({},ui==null?void 0:ui.footer)},Xn):null,xo=nn?pe.createElement("div",{className:ve()("".concat(jn,"-header"),Pi==null?void 0:Pi.header),style:(0,ye.Z)({},ui==null?void 0:ui.header)},pe.createElement("div",{className:"".concat(jn,"-title"),id:yn},nn)):null,Qo=(0,pe.useMemo)(function(){return(0,Ee.Z)(yi)==="object"&&yi!==null?yi:yi?{closeIcon:gi!=null?gi:pe.createElement("span",{className:"".concat(jn,"-close-x")})}:{}},[yi,gi,jn]),Wo=on(Qo,!0),_s=(0,Ee.Z)(yi)==="object"&&yi.disabled,As=yi?pe.createElement("button",(0,Le.Z)({type:"button",onClick:Dn,"aria-label":"Close"},Wo,{className:"".concat(jn,"-close"),disabled:_s}),Qo.closeIcon):null,pn=pe.createElement("div",{className:ve()("".concat(jn,"-content"),Pi==null?void 0:Pi.content),style:ui==null?void 0:ui.content},As,xo,pe.createElement("div",(0,Le.Z)({className:ve()("".concat(jn,"-body"),Pi==null?void 0:Pi.body),style:(0,ye.Z)((0,ye.Z)({},Sr),ui==null?void 0:ui.body)},Er),vt),Jr);return pe.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":nn?yn:null,"aria-modal":"true",ref:ji,style:(0,ye.Z)((0,ye.Z)({},Yt),Xr),className:ve()(jn,Ft),onMouseDown:io,onMouseUp:ro},pe.createElement("div",{ref:Wi,tabIndex:0,style:Ze},pe.createElement(Ue,{shouldUpdate:Go||co},no?no(pn):pn)),pe.createElement("div",{tabIndex:0,ref:Ur,style:rt}))}),mt=Xe,Rt=pe.forwardRef(function(Ut,en){var jn=Ut.prefixCls,Ft=Ut.title,Yt=Ut.style,nn=Ut.className,yn=Ut.visible,Xn=Ut.forceRender,yi=Ut.destroyOnClose,gi=Ut.motionName,Dn=Ut.ariaId,vt=Ut.onVisibleChanged,Sr=Ut.mousePosition,Er=(0,pe.useRef)(),no=pe.useState(),io=(0,Me.Z)(no,2),ro=io[0],zr=io[1],Go={};ro&&(Go.transformOrigin=ro);function co(){var br=ut(Er.current);zr(Sr&&(Sr.x||Sr.y)?"".concat(Sr.x-br.left,"px ").concat(Sr.y-br.top,"px"):"")}return pe.createElement(ze.Z,{visible:yn,onVisibleChanged:vt,onAppearPrepare:co,onEnterPrepare:co,forceRender:Xn,motionName:gi,removeOnLeave:yi,ref:Er},function(br,ir){var Pi=br.className,ui=br.style;return pe.createElement(mt,(0,Le.Z)({},Ut,{ref:en,title:Ft,ariaId:Dn,prefixCls:jn,holderRef:ir,style:(0,ye.Z)((0,ye.Z)((0,ye.Z)({},ui),Yt),Go),className:ve()(nn,Pi)}))})});Rt.displayName="Content";var vn=Rt,An=function(en){var jn=en.prefixCls,Ft=en.style,Yt=en.visible,nn=en.maskProps,yn=en.motionName,Xn=en.className;return pe.createElement(ze.Z,{key:"mask",visible:Yt,motionName:yn,leavedClassName:"".concat(jn,"-mask-hidden")},function(yi,gi){var Dn=yi.className,vt=yi.style;return pe.createElement("div",(0,Le.Z)({ref:gi,style:(0,ye.Z)((0,ye.Z)({},vt),Ft),className:ve()("".concat(jn,"-mask"),Dn,Xn)},nn))})},Mn=An,hi={};function mi(Ut,en){}function si(Ut,en){}function Cn(){hi={}}function Ki(Ut,en,jn){!en&&!hi[jn]&&(Ut(!1,jn),hi[jn]=!0)}function Yn(Ut,en){Ki(mi,Ut,en)}function Qi(Ut,en){Ki(si,Ut,en)}var vr=null,Dr=function(en){var jn=en.prefixCls,Ft=jn===void 0?"rc-dialog":jn,Yt=en.zIndex,nn=en.visible,yn=nn===void 0?!1:nn,Xn=en.keyboard,yi=Xn===void 0?!0:Xn,gi=en.focusTriggerAfterClose,Dn=gi===void 0?!0:gi,vt=en.wrapStyle,Sr=en.wrapClassName,Er=en.wrapProps,no=en.onClose,io=en.afterOpenChange,ro=en.afterClose,zr=en.transitionName,Go=en.animation,co=en.closable,br=co===void 0?!0:co,ir=en.mask,Pi=ir===void 0?!0:ir,ui=en.maskTransitionName,Di=en.maskAnimation,Sn=en.maskClosable,ji=Sn===void 0?!0:Sn,Wi=en.maskStyle,Ur=en.maskProps,Xr=en.rootClassName,Jr=en.classNames,xo=en.styles,Qo=(0,pe.useRef)(),Wo=(0,pe.useRef)(),_s=(0,pe.useRef)(),As=pe.useState(yn),pn=(0,Me.Z)(As,2),ss=pn[0],ps=pn[1],Ts=lt();function mo(){ft(Wo.current,document.activeElement)||(Qo.current=document.activeElement)}function Ns(){if(!ft(Wo.current,document.activeElement)){var ms;(ms=_s.current)===null||ms===void 0||ms.focus()}}function Ss(ms){if(ms)Ns();else{if(ps(!1),Pi&&Qo.current&&Dn){try{Qo.current.focus({preventScroll:!0})}catch(hs){}Qo.current=null}ss&&(ro==null||ro())}io==null||io(ms)}function Us(ms){no==null||no(ms)}var fo=(0,pe.useRef)(!1),Co=(0,pe.useRef)(),pr=function(){clearTimeout(Co.current),fo.current=!0},Gr=function(){Co.current=setTimeout(function(){fo.current=!1})},po=null;ji&&(po=function(hs){fo.current?fo.current=!1:Wo.current===hs.target&&Us(hs)});function Ro(ms){if(yi&&ms.keyCode===bt.ESC){ms.stopPropagation(),Us(ms);return}yn&&ms.keyCode===bt.TAB&&_s.current.changeActive(!ms.shiftKey)}(0,pe.useEffect)(function(){yn&&(ps(!0),mo())},[yn]),(0,pe.useEffect)(function(){return function(){clearTimeout(Co.current)}},[]);var Ei=(0,ye.Z)((0,ye.Z)((0,ye.Z)({zIndex:Yt},vt),xo==null?void 0:xo.wrapper),{},{display:ss?null:"none"});return pe.createElement("div",(0,Le.Z)({className:ve()("".concat(Ft,"-root"),Xr)},on(en,{data:!0})),pe.createElement(Mn,{prefixCls:Ft,visible:Pi&&yn,motionName:Jt(Ft,ui,Di),style:(0,ye.Z)((0,ye.Z)({zIndex:Yt},Wi),xo==null?void 0:xo.mask),maskProps:Ur,className:Jr==null?void 0:Jr.mask}),pe.createElement("div",(0,Le.Z)({tabIndex:-1,onKeyDown:Ro,className:ve()("".concat(Ft,"-wrap"),Sr,Jr==null?void 0:Jr.wrapper),ref:Wo,onClick:po,style:Ei},Er),pe.createElement(vn,(0,Le.Z)({},en,{onMouseDown:pr,onMouseUp:Gr,ref:_s,closable:br,ariaId:Ts,prefixCls:Ft,visible:yn&&ss,onClose:Us,onVisibleChanged:Ss,motionName:Jt(Ft,zr,Go)}))))},Ci=Dr,kr=function(en){var jn=en.visible,Ft=en.getContainer,Yt=en.forceRender,nn=en.destroyOnClose,yn=nn===void 0?!1:nn,Xn=en.afterClose,yi=en.panelRef,gi=pe.useState(jn),Dn=(0,Me.Z)(gi,2),vt=Dn[0],Sr=Dn[1],Er=pe.useMemo(function(){return{panel:yi}},[yi]);return pe.useEffect(function(){jn&&Sr(!0)},[jn]),!Yt&&yn&&!vt?null:pe.createElement(wt.Provider,{value:Er},pe.createElement(ct.Z,{open:jn||Yt||vt,autoDestroy:!1,getContainer:Ft,autoLock:jn||vt},pe.createElement(Ci,(0,Le.Z)({},en,{destroyOnClose:yn,afterClose:function(){Xn==null||Xn(),Sr(!1)}}))))};kr.displayName="Dialog";var vo=kr,qo=vo,Do=De(73935);function Oo(Ut,en,jn,Ft){var Yt=Do.unstable_batchedUpdates?function(yn){Do.unstable_batchedUpdates(jn,yn)}:jn;return Ut!=null&&Ut.addEventListener&&Ut.addEventListener(en,Yt,Ft),{remove:function(){Ut!=null&&Ut.removeEventListener&&Ut.removeEventListener(en,Yt,Ft)}}}var Cr={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(en){var jn=en.keyCode;if(en.altKey&&!en.ctrlKey||en.metaKey||jn>=Cr.F1&&jn<=Cr.F12)return!1;switch(jn){case Cr.ALT:case Cr.CAPS_LOCK:case Cr.CONTEXT_MENU:case Cr.CTRL:case Cr.DOWN:case Cr.END:case Cr.ESC:case Cr.HOME:case Cr.INSERT:case Cr.LEFT:case Cr.MAC_FF_META:case Cr.META:case Cr.NUMLOCK:case Cr.NUM_CENTER:case Cr.PAGE_DOWN:case Cr.PAGE_UP:case Cr.PAUSE:case Cr.PRINT_SCREEN:case Cr.RIGHT:case Cr.SHIFT:case Cr.UP:case Cr.WIN_KEY:case Cr.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(en){if(en>=Cr.ZERO&&en<=Cr.NINE||en>=Cr.NUM_ZERO&&en<=Cr.NUM_MULTIPLY||en>=Cr.A&&en<=Cr.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&en===0)return!0;switch(en){case Cr.SPACE:case Cr.QUESTION_MARK:case Cr.NUM_PLUS:case Cr.NUM_MINUS:case Cr.NUM_PERIOD:case Cr.NUM_DIVISION:case Cr.SEMICOLON:case Cr.DASH:case Cr.EQUALS:case Cr.COMMA:case Cr.PERIOD:case Cr.SLASH:case Cr.APOSTROPHE:case Cr.SINGLE_QUOTE:case Cr.OPEN_SQUARE_BRACKET:case Cr.BACKSLASH:case Cr.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},jo=Cr,or=pe.createContext(null),kn=function(en){var jn=en.visible,Ft=en.maskTransitionName,Yt=en.getContainer,nn=en.prefixCls,yn=en.rootClassName,Xn=en.icons,yi=en.countRender,gi=en.showSwitch,Dn=en.showProgress,vt=en.current,Sr=en.transform,Er=en.count,no=en.scale,io=en.minScale,ro=en.maxScale,zr=en.closeIcon,Go=en.onActive,co=en.onClose,br=en.onZoomIn,ir=en.onZoomOut,Pi=en.onRotateRight,ui=en.onRotateLeft,Di=en.onFlipX,Sn=en.onFlipY,ji=en.onReset,Wi=en.toolbarRender,Ur=en.zIndex,Xr=en.image,Jr=(0,pe.useContext)(or),xo=Xn.rotateLeft,Qo=Xn.rotateRight,Wo=Xn.zoomIn,_s=Xn.zoomOut,As=Xn.close,pn=Xn.left,ss=Xn.right,ps=Xn.flipX,Ts=Xn.flipY,mo="".concat(nn,"-operations-operation");pe.useEffect(function(){var hs=function(ia){ia.keyCode===jo.ESC&&co()};return jn&&window.addEventListener("keydown",hs),function(){window.removeEventListener("keydown",hs)}},[jn]);var Ns=function(ds,ia){ds.preventDefault(),ds.stopPropagation(),Go(ia)},Ss=pe.useCallback(function(hs){var ds=hs.type,ia=hs.disabled,ra=hs.onClick,di=hs.icon;return pe.createElement("div",{key:ds,className:ve()(mo,"".concat(nn,"-operations-operation-").concat(ds),(0,Fe.Z)({},"".concat(nn,"-operations-operation-disabled"),!!ia)),onClick:ra},di)},[mo,nn]),Us=gi?Ss({icon:pn,onClick:function(ds){return Ns(ds,-1)},type:"prev",disabled:vt===0}):void 0,fo=gi?Ss({icon:ss,onClick:function(ds){return Ns(ds,1)},type:"next",disabled:vt===Er-1}):void 0,Co=Ss({icon:Ts,onClick:Sn,type:"flipY"}),pr=Ss({icon:ps,onClick:Di,type:"flipX"}),Gr=Ss({icon:xo,onClick:ui,type:"rotateLeft"}),po=Ss({icon:Qo,onClick:Pi,type:"rotateRight"}),Ro=Ss({icon:_s,onClick:ir,type:"zoomOut",disabled:no<=io}),Ei=Ss({icon:Wo,onClick:br,type:"zoomIn",disabled:no===ro}),ms=pe.createElement("div",{className:"".concat(nn,"-operations")},Co,pr,Gr,po,Ro,Ei);return pe.createElement(ze.Z,{visible:jn,motionName:Ft},function(hs){var ds=hs.className,ia=hs.style;return pe.createElement(ct.Z,{open:!0,getContainer:Yt!=null?Yt:document.body},pe.createElement("div",{className:ve()("".concat(nn,"-operations-wrapper"),ds,yn),style:(0,ye.Z)((0,ye.Z)({},ia),{},{zIndex:Ur})},zr===null?null:pe.createElement("button",{className:"".concat(nn,"-close"),onClick:co},zr||As),gi&&pe.createElement(pe.Fragment,null,pe.createElement("div",{className:ve()("".concat(nn,"-switch-left"),(0,Fe.Z)({},"".concat(nn,"-switch-left-disabled"),vt===0)),onClick:function(di){return Ns(di,-1)}},pn),pe.createElement("div",{className:ve()("".concat(nn,"-switch-right"),(0,Fe.Z)({},"".concat(nn,"-switch-right-disabled"),vt===Er-1)),onClick:function(di){return Ns(di,1)}},ss)),pe.createElement("div",{className:"".concat(nn,"-footer")},Dn&&pe.createElement("div",{className:"".concat(nn,"-progress")},yi?yi(vt+1,Er):"".concat(vt+1," / ").concat(Er)),Wi?Wi(ms,(0,ye.Z)((0,ye.Z)({icons:{prevIcon:Us,nextIcon:fo,flipYIcon:Co,flipXIcon:pr,rotateLeftIcon:Gr,rotateRightIcon:po,zoomOutIcon:Ro,zoomInIcon:Ei},actions:{onActive:Go,onFlipY:Sn,onFlipX:Di,onRotateLeft:ui,onRotateRight:Pi,onZoomOut:ir,onZoomIn:br,onReset:ji,onClose:co},transform:Sr},Jr?{current:vt,total:Er}:{}),{},{image:Xr})):ms)))})},qe=kn,Tn={},In=[],zi=function(en){In.push(en)};function Gi(Ut,en){if(0)var jn}function Vi(Ut,en){if(0)var jn}function Zi(){Tn={}}function qr(Ut,en,jn){!en&&!Tn[jn]&&(Ut(!1,jn),Tn[jn]=!0)}function sn(Ut,en){qr(Gi,Ut,en)}function He(Ut,en){qr(Vi,Ut,en)}sn.preMessage=zi,sn.resetWarned=Zi,sn.noteOnce=He;var Ve=sn;function ot(Ut,en){var jn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ft=new Set;function Yt(nn,yn){var Xn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,yi=Ft.has(nn);if(Ve(!yi,"Warning: There may be circular references"),yi)return!1;if(nn===yn)return!0;if(jn&&Xn>1)return!1;Ft.add(nn);var gi=Xn+1;if(Array.isArray(nn)){if(!Array.isArray(yn)||nn.length!==yn.length)return!1;for(var Dn=0;Dn<nn.length;Dn++)if(!Yt(nn[Dn],yn[Dn],gi))return!1;return!0}if(nn&&yn&&(0,Ee.Z)(nn)==="object"&&(0,Ee.Z)(yn)==="object"){var vt=Object.keys(nn);return vt.length!==Object.keys(yn).length?!1:vt.every(function(Sr){return Yt(nn[Sr],yn[Sr],gi)})}return!1}return Yt(Ut,en)}var Lt=ot,At=function(en){return+setTimeout(en,16)},an=function(en){return clearTimeout(en)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(At=function(en){return window.requestAnimationFrame(en)},an=function(en){return window.cancelAnimationFrame(en)});var Ot=0,xn=new Map;function Zn(Ut){xn.delete(Ut)}var wi=function(en){var jn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Ot+=1;var Ft=Ot;function Yt(nn){if(nn===0)Zn(Ft),en();else{var yn=At(function(){Yt(nn-1)});xn.set(Ft,yn)}}return Yt(jn),Ft};wi.cancel=function(Ut){var en=xn.get(Ut);return Zn(en),an(en)};var Bn=wi,rn={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function Fn(Ut,en,jn,Ft){var Yt=(0,pe.useRef)(null),nn=(0,pe.useRef)([]),yn=(0,pe.useState)(rn),Xn=(0,Me.Z)(yn,2),yi=Xn[0],gi=Xn[1],Dn=function(no){gi(rn),Lt(rn,yi)||Ft==null||Ft({transform:rn,action:no})},vt=function(no,io){Yt.current===null&&(nn.current=[],Yt.current=Bn(function(){gi(function(ro){var zr=ro;return nn.current.forEach(function(Go){zr=(0,ye.Z)((0,ye.Z)({},zr),Go)}),Yt.current=null,Ft==null||Ft({transform:zr,action:io}),zr})})),nn.current.push((0,ye.Z)((0,ye.Z)({},yi),no))},Sr=function(no,io,ro,zr,Go){var co=Ut.current,br=co.width,ir=co.height,Pi=co.offsetWidth,ui=co.offsetHeight,Di=co.offsetLeft,Sn=co.offsetTop,ji=no,Wi=yi.scale*no;Wi>jn?(Wi=jn,ji=jn/yi.scale):Wi<en&&(Wi=Go?Wi:en,ji=Wi/yi.scale);var Ur=ro!=null?ro:innerWidth/2,Xr=zr!=null?zr:innerHeight/2,Jr=ji-1,xo=Jr*br*.5,Qo=Jr*ir*.5,Wo=Jr*(Ur-yi.x-Di),_s=Jr*(Xr-yi.y-Sn),As=yi.x-(Wo-xo),pn=yi.y-(_s-Qo);if(no<1&&Wi===1){var ss=Pi*Wi,ps=ui*Wi,Ts=se(),mo=Ts.width,Ns=Ts.height;ss<=mo&&ps<=Ns&&(As=0,pn=0)}vt({x:As,y:pn,scale:Wi},io)};return{transform:yi,resetTransform:Dn,updateTransform:vt,dispatchZoomChange:Sr}}function vi(Ut,en,jn,Ft){var Yt=en+jn,nn=(jn-Ft)/2;if(jn>Ft){if(en>0)return(0,Fe.Z)({},Ut,nn);if(en<0&&Yt<Ft)return(0,Fe.Z)({},Ut,-nn)}else if(en<0||Yt>Ft)return(0,Fe.Z)({},Ut,en<0?nn:-nn);return{}}function _i(Ut,en,jn,Ft){var Yt=se(),nn=Yt.width,yn=Yt.height,Xn=null;return Ut<=nn&&en<=yn?Xn={x:0,y:0}:(Ut>nn||en>yn)&&(Xn=(0,ye.Z)((0,ye.Z)({},vi("x",jn,Ut,nn)),vi("y",Ft,en,yn))),Xn}var cn=1,qn=1;function Ii(Ut,en,jn,Ft,Yt,nn,yn){var Xn=Yt.rotate,yi=Yt.scale,gi=Yt.x,Dn=Yt.y,vt=(0,pe.useState)(!1),Sr=(0,Me.Z)(vt,2),Er=Sr[0],no=Sr[1],io=(0,pe.useRef)({diffX:0,diffY:0,transformX:0,transformY:0}),ro=function(ir){!en||ir.button!==0||(ir.preventDefault(),ir.stopPropagation(),io.current={diffX:ir.pageX-gi,diffY:ir.pageY-Dn,transformX:gi,transformY:Dn},no(!0))},zr=function(ir){jn&&Er&&nn({x:ir.pageX-io.current.diffX,y:ir.pageY-io.current.diffY},"move")},Go=function(){if(jn&&Er){no(!1);var ir=io.current,Pi=ir.transformX,ui=ir.transformY,Di=gi!==Pi&&Dn!==ui;if(!Di)return;var Sn=Ut.current.offsetWidth*yi,ji=Ut.current.offsetHeight*yi,Wi=Ut.current.getBoundingClientRect(),Ur=Wi.left,Xr=Wi.top,Jr=Xn%180!==0,xo=_i(Jr?ji:Sn,Jr?Sn:ji,Ur,Xr);xo&&nn((0,ye.Z)({},xo),"dragRebound")}},co=function(ir){if(!(!jn||ir.deltaY==0)){var Pi=Math.abs(ir.deltaY/100),ui=Math.min(Pi,qn),Di=cn+ui*Ft;ir.deltaY>0&&(Di=cn/Di),yn(Di,"wheel",ir.clientX,ir.clientY)}};return(0,pe.useEffect)(function(){var br,ir,Pi,ui;if(en){Pi=Oo(window,"mouseup",Go,!1),ui=Oo(window,"mousemove",zr,!1);try{window.top!==window.self&&(br=Oo(window.top,"mouseup",Go,!1),ir=Oo(window.top,"mousemove",zr,!1))}catch(Di){Gi(!1,"[rc-image] ".concat(Di))}}return function(){var Di,Sn,ji,Wi;(Di=Pi)===null||Di===void 0||Di.remove(),(Sn=ui)===null||Sn===void 0||Sn.remove(),(ji=br)===null||ji===void 0||ji.remove(),(Wi=ir)===null||Wi===void 0||Wi.remove()}},[jn,Er,gi,Dn,Xn,en]),{isMoving:Er,onMouseDown:ro,onMouseMove:zr,onMouseUp:Go,onWheel:co}}function lr(Ut){return new Promise(function(en){if(!Ut){en(!1);return}var jn=document.createElement("img");jn.onerror=function(){return en(!1)},jn.onload=function(){return en(!0)},jn.src=Ut})}function _r(Ut){var en=Ut.src,jn=Ut.isCustomPlaceholder,Ft=Ut.fallback,Yt=(0,pe.useState)(jn?"loading":"normal"),nn=(0,Me.Z)(Yt,2),yn=nn[0],Xn=nn[1],yi=(0,pe.useRef)(!1),gi=yn==="error";(0,pe.useEffect)(function(){var Er=!0;return lr(en).then(function(no){!no&&Er&&Xn("error")}),function(){Er=!1}},[en]),(0,pe.useEffect)(function(){jn&&!yi.current?Xn("loading"):gi&&Xn("normal")},[en]);var Dn=function(){Xn("normal")},vt=function(no){yi.current=!1,yn==="loading"&&no!==null&&no!==void 0&&no.complete&&(no.naturalWidth||no.naturalHeight)&&(yi.current=!0,Dn())},Sr=gi&&Ft?{src:Ft}:{onLoad:Dn,src:en};return[vt,Sr,yn]}function Ti(Ut,en){var jn=Ut.x-en.x,Ft=Ut.y-en.y;return Math.hypot(jn,Ft)}function bi(Ut,en,jn,Ft){var Yt=Ti(Ut,jn),nn=Ti(en,Ft);if(Yt===0&&nn===0)return[Ut.x,Ut.y];var yn=Yt/(Yt+nn),Xn=Ut.x+yn*(en.x-Ut.x),yi=Ut.y+yn*(en.y-Ut.y);return[Xn,yi]}function li(Ut,en,jn,Ft,Yt,nn,yn){var Xn=Yt.rotate,yi=Yt.scale,gi=Yt.x,Dn=Yt.y,vt=(0,pe.useState)(!1),Sr=(0,Me.Z)(vt,2),Er=Sr[0],no=Sr[1],io=(0,pe.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),ro=function(ir){io.current=(0,ye.Z)((0,ye.Z)({},io.current),ir)},zr=function(ir){if(en){ir.stopPropagation(),no(!0);var Pi=ir.touches,ui=Pi===void 0?[]:Pi;ui.length>1?ro({point1:{x:ui[0].clientX,y:ui[0].clientY},point2:{x:ui[1].clientX,y:ui[1].clientY},eventType:"touchZoom"}):ro({point1:{x:ui[0].clientX-gi,y:ui[0].clientY-Dn},eventType:"move"})}},Go=function(ir){var Pi=ir.touches,ui=Pi===void 0?[]:Pi,Di=io.current,Sn=Di.point1,ji=Di.point2,Wi=Di.eventType;if(ui.length>1&&Wi==="touchZoom"){var Ur={x:ui[0].clientX,y:ui[0].clientY},Xr={x:ui[1].clientX,y:ui[1].clientY},Jr=bi(Sn,ji,Ur,Xr),xo=(0,Me.Z)(Jr,2),Qo=xo[0],Wo=xo[1],_s=Ti(Ur,Xr)/Ti(Sn,ji);yn(_s,"touchZoom",Qo,Wo,!0),ro({point1:Ur,point2:Xr,eventType:"touchZoom"})}else Wi==="move"&&(nn({x:ui[0].clientX-Sn.x,y:ui[0].clientY-Sn.y},"move"),ro({eventType:"move"}))},co=function(){if(jn){if(Er&&no(!1),ro({eventType:"none"}),Ft>yi)return nn({x:0,y:0,scale:Ft},"touchZoom");var ir=Ut.current.offsetWidth*yi,Pi=Ut.current.offsetHeight*yi,ui=Ut.current.getBoundingClientRect(),Di=ui.left,Sn=ui.top,ji=Xn%180!==0,Wi=_i(ji?Pi:ir,ji?ir:Pi,Di,Sn);Wi&&nn((0,ye.Z)({},Wi),"dragRebound")}};return(0,pe.useEffect)(function(){var br;return jn&&en&&(br=Oo(window,"touchmove",function(ir){return ir.preventDefault()},{passive:!1})),function(){var ir;(ir=br)===null||ir===void 0||ir.remove()}},[jn,en]),{isTouching:Er,onTouchStart:zr,onTouchMove:Go,onTouchEnd:co}}var dr=["fallback","src","imgRef"],jr=["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"],ei=function(en){var jn=en.fallback,Ft=en.src,Yt=en.imgRef,nn=(0,me.Z)(en,dr),yn=_r({src:Ft,fallback:jn}),Xn=(0,Me.Z)(yn,2),yi=Xn[0],gi=Xn[1];return pe.createElement("img",(0,Le.Z)({ref:function(vt){Yt.current=vt,yi(vt)}},nn,gi))},Ui=function(en){var jn=en.prefixCls,Ft=en.src,Yt=en.alt,nn=en.imageInfo,yn=en.fallback,Xn=en.movable,yi=Xn===void 0?!0:Xn,gi=en.onClose,Dn=en.visible,vt=en.icons,Sr=vt===void 0?{}:vt,Er=en.rootClassName,no=en.closeIcon,io=en.getContainer,ro=en.current,zr=ro===void 0?0:ro,Go=en.count,co=Go===void 0?1:Go,br=en.countRender,ir=en.scaleStep,Pi=ir===void 0?.5:ir,ui=en.minScale,Di=ui===void 0?1:ui,Sn=en.maxScale,ji=Sn===void 0?50:Sn,Wi=en.transitionName,Ur=Wi===void 0?"zoom":Wi,Xr=en.maskTransitionName,Jr=Xr===void 0?"fade":Xr,xo=en.imageRender,Qo=en.imgCommonProps,Wo=en.toolbarRender,_s=en.onTransform,As=en.onChange,pn=(0,me.Z)(en,jr),ss=(0,pe.useRef)(),ps=(0,pe.useContext)(or),Ts=ps&&co>1,mo=ps&&co>=1,Ns=(0,pe.useState)(!0),Ss=(0,Me.Z)(Ns,2),Us=Ss[0],fo=Ss[1],Co=Fn(ss,Di,ji,_s),pr=Co.transform,Gr=Co.resetTransform,po=Co.updateTransform,Ro=Co.dispatchZoomChange,Ei=Ii(ss,yi,Dn,Pi,pr,po,Ro),ms=Ei.isMoving,hs=Ei.onMouseDown,ds=Ei.onWheel,ia=li(ss,yi,Dn,Di,pr,po,Ro),ra=ia.isTouching,di=ia.onTouchStart,xs=ia.onTouchMove,Ls=ia.onTouchEnd,ga=pr.rotate,vs=pr.scale,oa=ve()((0,Fe.Z)({},"".concat(jn,"-moving"),ms));(0,pe.useEffect)(function(){Us||fo(!0)},[Us]);var Hr=function(){Gr("close")},Xa=function(){Ro(cn+Pi,"zoomIn")},Hs=function(){Ro(cn/(cn+Pi),"zoomOut")},Ks=function(){po({rotate:ga+90},"rotateRight")},ka=function(){po({rotate:ga-90},"rotateLeft")},Hl=function(){po({flipX:!pr.flipX},"flipX")},cu=function(){po({flipY:!pr.flipY},"flipY")},Ta=function(){Gr("reset")},al=function(za){var Tl=zr+za;!Number.isInteger(Tl)||Tl<0||Tl>co-1||(fo(!1),Gr(za<0?"prev":"next"),As==null||As(Tl,zr))},fh=function(za){!Dn||!Ts||(za.keyCode===jo.LEFT?al(-1):za.keyCode===jo.RIGHT&&al(1))},kh=function(za){Dn&&(vs!==1?po({x:0,y:0,scale:1},"doubleClick"):Ro(cn+Pi,"doubleClick",za.clientX,za.clientY))};(0,pe.useEffect)(function(){var Ia=Oo(window,"keydown",fh,!1);return function(){Ia.remove()}},[Dn,Ts,zr]);var ph=pe.createElement(ei,(0,Le.Z)({},Qo,{width:en.width,height:en.height,imgRef:ss,className:"".concat(jn,"-img"),alt:Yt,style:{transform:"translate3d(".concat(pr.x,"px, ").concat(pr.y,"px, 0) scale3d(").concat(pr.flipX?"-":"").concat(vs,", ").concat(pr.flipY?"-":"").concat(vs,", 1) rotate(").concat(ga,"deg)"),transitionDuration:(!Us||ra)&&"0s"},fallback:yn,src:Ft,onWheel:ds,onMouseDown:hs,onDoubleClick:kh,onTouchStart:di,onTouchMove:xs,onTouchEnd:Ls,onTouchCancel:Ls})),qh=(0,ye.Z)({url:Ft,alt:Yt},nn);return pe.createElement(pe.Fragment,null,pe.createElement(qo,(0,Le.Z)({transitionName:Ur,maskTransitionName:Jr,closable:!1,keyboard:!0,prefixCls:jn,onClose:gi,visible:Dn,classNames:{wrapper:oa},rootClassName:Er,getContainer:io},pn,{afterClose:Hr}),pe.createElement("div",{className:"".concat(jn,"-img-wrapper")},xo?xo(ph,(0,ye.Z)({transform:pr,image:qh},ps?{current:zr}:{})):ph)),pe.createElement(qe,{visible:Dn,transform:pr,maskTransitionName:Jr,closeIcon:no,getContainer:io,prefixCls:jn,rootClassName:Er,icons:Sr,countRender:br,showSwitch:Ts,showProgress:mo,current:zr,count:co,scale:vs,minScale:Di,maxScale:ji,toolbarRender:Wo,onActive:al,onZoomIn:Xa,onZoomOut:Hs,onRotateRight:Ks,onRotateLeft:ka,onFlipX:Hl,onFlipY:cu,onClose:gi,onReset:Ta,zIndex:pn.zIndex!==void 0?pn.zIndex+1:void 0,image:qh}))},ws=Ui,cs=De(74902),Io=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];function dn(Ut){var en=pe.useState({}),jn=(0,Me.Z)(en,2),Ft=jn[0],Yt=jn[1],nn=pe.useCallback(function(Xn,yi){return Yt(function(gi){return(0,ye.Z)((0,ye.Z)({},gi),{},(0,Fe.Z)({},Xn,yi))}),function(){Yt(function(gi){var Dn=(0,ye.Z)({},gi);return delete Dn[Xn],Dn})}},[]),yn=pe.useMemo(function(){return Ut?Ut.map(function(Xn){if(typeof Xn=="string")return{data:{src:Xn}};var yi={};return Object.keys(Xn).forEach(function(gi){["src"].concat((0,cs.Z)(Io)).includes(gi)&&(yi[gi]=Xn[gi])}),{data:yi}}):Object.keys(Ft).reduce(function(Xn,yi){var gi=Ft[yi],Dn=gi.canPreview,vt=gi.data;return Dn&&Xn.push({data:vt,id:yi}),Xn},[])},[Ut,Ft]);return[yn,nn,!!Ut]}var gr=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],Zr=["src"],$i=function(en){var jn,Ft=en.previewPrefixCls,Yt=Ft===void 0?"rc-image-preview":Ft,nn=en.children,yn=en.icons,Xn=yn===void 0?{}:yn,yi=en.items,gi=en.preview,Dn=en.fallback,vt=(0,Ee.Z)(gi)==="object"?gi:{},Sr=vt.visible,Er=vt.onVisibleChange,no=vt.getContainer,io=vt.current,ro=vt.movable,zr=vt.minScale,Go=vt.maxScale,co=vt.countRender,br=vt.closeIcon,ir=vt.onChange,Pi=vt.onTransform,ui=vt.toolbarRender,Di=vt.imageRender,Sn=(0,me.Z)(vt,gr),ji=dn(yi),Wi=(0,Me.Z)(ji,3),Ur=Wi[0],Xr=Wi[1],Jr=Wi[2],xo=Mt(0,{value:io}),Qo=(0,Me.Z)(xo,2),Wo=Qo[0],_s=Qo[1],As=(0,pe.useState)(!1),pn=(0,Me.Z)(As,2),ss=pn[0],ps=pn[1],Ts=((jn=Ur[Wo])===null||jn===void 0?void 0:jn.data)||{},mo=Ts.src,Ns=(0,me.Z)(Ts,Zr),Ss=Mt(!!Sr,{value:Sr,onChange:function(ra,di){Er==null||Er(ra,di,Wo)}}),Us=(0,Me.Z)(Ss,2),fo=Us[0],Co=Us[1],pr=(0,pe.useState)(null),Gr=(0,Me.Z)(pr,2),po=Gr[0],Ro=Gr[1],Ei=pe.useCallback(function(ia,ra,di,xs){var Ls=Jr?Ur.findIndex(function(ga){return ga.data.src===ra}):Ur.findIndex(function(ga){return ga.id===ia});_s(Ls<0?0:Ls),Co(!0),Ro({x:di,y:xs}),ps(!0)},[Ur,Jr]);pe.useEffect(function(){fo?ss||_s(0):ps(!1)},[fo]);var ms=function(ra,di){_s(ra),ir==null||ir(ra,di)},hs=function(){Co(!1),Ro(null)},ds=pe.useMemo(function(){return{register:Xr,onPreview:Ei}},[Xr,Ei]);return pe.createElement(or.Provider,{value:ds},nn,pe.createElement(ws,(0,Le.Z)({"aria-hidden":!fo,movable:ro,visible:fo,prefixCls:Yt,closeIcon:br,onClose:hs,mousePosition:po,imgCommonProps:Ns,src:mo,fallback:Dn,icons:Xn,minScale:zr,maxScale:Go,getContainer:no,current:Wo,count:Ur.length,countRender:co,onTransform:Pi,toolbarRender:ui,imageRender:Di,onChange:ms},Sn)))},yo=$i,Rr=0;function uo(Ut,en){var jn=pe.useState(function(){return Rr+=1,String(Rr)}),Ft=(0,Me.Z)(jn,1),Yt=Ft[0],nn=pe.useContext(or),yn={data:en,canPreview:Ut};return pe.useEffect(function(){if(nn)return nn.register(Yt,yn)},[]),pe.useEffect(function(){nn&&nn.register(Yt,yn)},[Ut,en]),Yt}var to=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],Yr=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],Fo=function(en){var jn=en.src,Ft=en.alt,Yt=en.onPreviewClose,nn=en.prefixCls,yn=nn===void 0?"rc-image":nn,Xn=en.previewPrefixCls,yi=Xn===void 0?"".concat(yn,"-preview"):Xn,gi=en.placeholder,Dn=en.fallback,vt=en.width,Sr=en.height,Er=en.style,no=en.preview,io=no===void 0?!0:no,ro=en.className,zr=en.onClick,Go=en.onError,co=en.wrapperClassName,br=en.wrapperStyle,ir=en.rootClassName,Pi=(0,me.Z)(en,to),ui=gi&&gi!==!0,Di=(0,Ee.Z)(io)==="object"?io:{},Sn=Di.src,ji=Di.visible,Wi=ji===void 0?void 0:ji,Ur=Di.onVisibleChange,Xr=Ur===void 0?Yt:Ur,Jr=Di.getContainer,xo=Jr===void 0?void 0:Jr,Qo=Di.mask,Wo=Di.maskClassName,_s=Di.movable,As=Di.icons,pn=Di.scaleStep,ss=Di.minScale,ps=Di.maxScale,Ts=Di.imageRender,mo=Di.toolbarRender,Ns=(0,me.Z)(Di,Yr),Ss=Sn!=null?Sn:jn,Us=Mt(!!Wi,{value:Wi,onChange:Xr}),fo=(0,Me.Z)(Us,2),Co=fo[0],pr=fo[1],Gr=_r({src:jn,isCustomPlaceholder:ui,fallback:Dn}),po=(0,Me.Z)(Gr,3),Ro=po[0],Ei=po[1],ms=po[2],hs=(0,pe.useState)(null),ds=(0,Me.Z)(hs,2),ia=ds[0],ra=ds[1],di=(0,pe.useContext)(or),xs=!!io,Ls=function(){pr(!1),ra(null)},ga=ve()(yn,co,ir,(0,Fe.Z)({},"".concat(yn,"-error"),ms==="error")),vs=(0,pe.useMemo)(function(){var Hs={};return Io.forEach(function(Ks){en[Ks]!==void 0&&(Hs[Ks]=en[Ks])}),Hs},Io.map(function(Hs){return en[Hs]})),oa=(0,pe.useMemo)(function(){return(0,ye.Z)((0,ye.Z)({},vs),{},{src:Ss})},[Ss,vs]),Hr=uo(xs,oa),Xa=function(Ks){var ka=Se(Ks.target),Hl=ka.left,cu=ka.top;di?di.onPreview(Hr,Ss,Hl,cu):(ra({x:Hl,y:cu}),pr(!0)),zr==null||zr(Ks)};return pe.createElement(pe.Fragment,null,pe.createElement("div",(0,Le.Z)({},Pi,{className:ga,onClick:xs?Xa:zr,style:(0,ye.Z)({width:vt,height:Sr},br)}),pe.createElement("img",(0,Le.Z)({},vs,{className:ve()("".concat(yn,"-img"),(0,Fe.Z)({},"".concat(yn,"-img-placeholder"),gi===!0),ro),style:(0,ye.Z)({height:Sr},Er),ref:Ro},Ei,{width:vt,height:Sr,onError:Go})),ms==="loading"&&pe.createElement("div",{"aria-hidden":"true",className:"".concat(yn,"-placeholder")},gi),Qo&&xs&&pe.createElement("div",{className:ve()("".concat(yn,"-mask"),Wo),style:{display:(Er==null?void 0:Er.display)==="none"?"none":void 0}},Qo)),!di&&xs&&pe.createElement(ws,(0,Le.Z)({"aria-hidden":!Co,visible:Co,prefixCls:yi,onClose:Ls,mousePosition:ia,src:Ss,alt:Ft,imageInfo:{width:vt,height:Sr},fallback:Dn,getContainer:xo,icons:As,movable:_s,scaleStep:pn,minScale:ss,maxScale:ps,rootClassName:ir,imageRender:Ts,imgCommonProps:vs,toolbarRender:mo},Ns)))};Fo.PreviewGroup=yo;var zn=Fo,ns=zn},31457:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return on}});var Le=De(4942),ye=De(87462),Fe=De(71002),Me=De(1413),Ee=De(97685),me=De(94184),be=De.n(me),ve=De(67294);function we(Jt){var jt=ve.useRef();jt.current=Jt;var ut=ve.useCallback(function(){for(var ze,je=arguments.length,it=new Array(je),ht=0;ht<je;ht++)it[ht]=arguments[ht];return(ze=jt.current)===null||ze===void 0?void 0:ze.call.apply(ze,[jt].concat(it))},[]);return ut}function ge(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var he=ge()?ve.useLayoutEffect:ve.useEffect,xe=function(jt,ut){var ze=ve.useRef(!0);he(function(){return jt(ze.current)},ut),he(function(){return ze.current=!1,function(){ze.current=!0}},[])},fe=function(jt,ut){xe(function(ze){if(!ze)return jt()},ut)},ue=null;function ee(Jt){var jt=ve.useRef(!1),ut=ve.useState(Jt),ze=(0,Ee.Z)(ut,2),je=ze[0],it=ze[1];ve.useEffect(function(){return jt.current=!1,function(){jt.current=!0}},[]);function ht(nt,Ke){Ke&&jt.current||it(nt)}return[je,ht]}function z(Jt){return Jt!==void 0}function oe(Jt,jt){var ut=jt||{},ze=ut.defaultValue,je=ut.value,it=ut.onChange,ht=ut.postState,nt=ee(function(){return z(je)?je:z(ze)?typeof ze=="function"?ze():ze:typeof Jt=="function"?Jt():Jt}),Ke=(0,Ee.Z)(nt,2),Be=Ke[0],Ue=Ke[1],rt=je!==void 0?je:Be,Ze=ht?ht(rt):rt,Xe=we(it),mt=ee([rt]),Rt=(0,Ee.Z)(mt,2),vn=Rt[0],An=Rt[1];fe(function(){var hi=vn[0];Be!==hi&&Xe(Be,hi)},[vn]),fe(function(){z(je)||Ue(je)},[je]);var Mn=we(function(hi,mi){Ue(hi,mi),An([rt],mi)});return[Ze,Mn]}var ie={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(jt){var ut=jt.keyCode;if(jt.altKey&&!jt.ctrlKey||jt.metaKey||ut>=ie.F1&&ut<=ie.F12)return!1;switch(ut){case ie.ALT:case ie.CAPS_LOCK:case ie.CONTEXT_MENU:case ie.CTRL:case ie.DOWN:case ie.END:case ie.ESC:case ie.HOME:case ie.INSERT:case ie.LEFT:case ie.MAC_FF_META:case ie.META:case ie.NUMLOCK:case ie.NUM_CENTER:case ie.PAGE_DOWN:case ie.PAGE_UP:case ie.PAUSE:case ie.PRINT_SCREEN:case ie.RIGHT:case ie.SHIFT:case ie.UP:case ie.WIN_KEY:case ie.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(jt){if(jt>=ie.ZERO&&jt<=ie.NINE||jt>=ie.NUM_ZERO&&jt<=ie.NUM_MULTIPLY||jt>=ie.A&&jt<=ie.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&jt===0)return!0;switch(jt){case ie.SPACE:case ie.QUESTION_MARK:case ie.NUM_PLUS:case ie.NUM_MINUS:case ie.NUM_PERIOD:case ie.NUM_DIVISION:case ie.SEMICOLON:case ie.DASH:case ie.EQUALS:case ie.COMMA:case ie.PERIOD:case ie.SLASH:case ie.APOSTROPHE:case ie.SINGLE_QUOTE:case ie.OPEN_SQUARE_BRACKET:case ie.BACKSLASH:case ie.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},se=ie,le=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
|
summary tabIndex target title type useMap value width wmode wrap`,Se=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,pe="".concat(le," ").concat(Se).split(/[\s\n]+/),Ce="aria-",Ae="data-";function Oe(Jt,jt){return Jt.indexOf(jt)===0}function Re(Jt){var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ut;jt===!1?ut={aria:!0,data:!0,attr:!0}:jt===!0?ut={aria:!0}:ut=(0,Me.Z)({},jt);var ze={};return Object.keys(Jt).forEach(function(je){(ut.aria&&(je==="role"||Oe(je,Ce))||ut.data&&Oe(je,Ae)||ut.attr&&pe.includes(je))&&(ze[je]=Jt[je])}),ze}var We={},$e=[],Je=function(jt){$e.push(jt)};function pt(Jt,jt){if(0)var ut}function St(Jt,jt){if(0)var ut}function Mt(){We={}}function ct(Jt,jt,ut){!jt&&!We[ut]&&(Jt(!1,ut),We[ut]=!0)}function wt(Jt,jt){ct(pt,Jt,jt)}function ft(Jt,jt){ct(St,Jt,jt)}wt.preMessage=Je,wt.resetWarned=Mt,wt.noteOnce=ft;var $t=null,st=De(81626),et=[10,20,50,100],lt=function(jt){var ut=jt.pageSizeOptions,ze=ut===void 0?et:ut,je=jt.locale,it=jt.changeSize,ht=jt.pageSize,nt=jt.goButton,Ke=jt.quickGo,Be=jt.rootPrefixCls,Ue=jt.disabled,rt=jt.buildOptionText,Ze=jt.showSizeChanger,Xe=jt.sizeChangerRender,mt=ve.useState(""),Rt=(0,Ee.Z)(mt,2),vn=Rt[0],An=Rt[1],Mn=function(){return!vn||Number.isNaN(vn)?void 0:Number(vn)},hi=typeof rt=="function"?rt:function(Ci){return"".concat(Ci," ").concat(je.items_per_page)},mi=function(kr){An(kr.target.value)},si=function(kr){nt||vn===""||(An(""),!(kr.relatedTarget&&(kr.relatedTarget.className.indexOf("".concat(Be,"-item-link"))>=0||kr.relatedTarget.className.indexOf("".concat(Be,"-item"))>=0))&&(Ke==null||Ke(Mn())))},Cn=function(kr){vn!==""&&(kr.keyCode===se.ENTER||kr.type==="click")&&(An(""),Ke==null||Ke(Mn()))},Ki=function(){return ze.some(function(kr){return kr.toString()===ht.toString()})?ze:ze.concat([ht]).sort(function(kr,vo){var qo=Number.isNaN(Number(kr))?0:Number(kr),Do=Number.isNaN(Number(vo))?0:Number(vo);return qo-Do})},Yn="".concat(Be,"-options");if(!Ze&&!Ke)return null;var Qi=null,vr=null,Dr=null;return Ze&&Xe&&(Qi=Xe({disabled:Ue,size:ht,onSizeChange:function(kr){it==null||it(Number(kr))},"aria-label":je.page_size,className:"".concat(Yn,"-size-changer"),options:Ki().map(function(Ci){return{label:hi(Ci),value:Ci}})})),Ke&&(nt&&(Dr=typeof nt=="boolean"?ve.createElement("button",{type:"button",onClick:Cn,onKeyUp:Cn,disabled:Ue,className:"".concat(Yn,"-quick-jumper-button")},je.jump_to_confirm):ve.createElement("span",{onClick:Cn,onKeyUp:Cn},nt)),vr=ve.createElement("div",{className:"".concat(Yn,"-quick-jumper")},je.jump_to,ve.createElement("input",{disabled:Ue,type:"text",value:vn,onChange:mi,onKeyUp:Cn,onBlur:si,"aria-label":je.page}),je.page,Dr)),ve.createElement("li",{className:Yn},Qi,vr)},dt=lt,bt=function(jt){var ut=jt.rootPrefixCls,ze=jt.page,je=jt.active,it=jt.className,ht=jt.showTitle,nt=jt.onClick,Ke=jt.onKeyPress,Be=jt.itemRender,Ue="".concat(ut,"-item"),rt=be()(Ue,"".concat(Ue,"-").concat(ze),(0,Le.Z)((0,Le.Z)({},"".concat(Ue,"-active"),je),"".concat(Ue,"-disabled"),!ze),it),Ze=function(){nt(ze)},Xe=function(vn){Ke(vn,nt,ze)},mt=Be(ze,"page",ve.createElement("a",{rel:"nofollow"},ze));return mt?ve.createElement("li",{title:ht?String(ze):null,className:rt,onClick:Ze,onKeyDown:Xe,tabIndex:0},mt):null},yt=bt,Vt=function(jt,ut,ze){return ze};function Kt(){}function gn(Jt){var jt=Number(Jt);return typeof jt=="number"&&!Number.isNaN(jt)&&isFinite(jt)&&Math.floor(jt)===jt}function Gt(Jt,jt,ut){var ze=typeof Jt=="undefined"?jt:Jt;return Math.floor((ut-1)/ze)+1}var Dt=function(jt){var ut=jt.prefixCls,ze=ut===void 0?"rc-pagination":ut,je=jt.selectPrefixCls,it=je===void 0?"rc-select":je,ht=jt.className,nt=jt.current,Ke=jt.defaultCurrent,Be=Ke===void 0?1:Ke,Ue=jt.total,rt=Ue===void 0?0:Ue,Ze=jt.pageSize,Xe=jt.defaultPageSize,mt=Xe===void 0?10:Xe,Rt=jt.onChange,vn=Rt===void 0?Kt:Rt,An=jt.hideOnSinglePage,Mn=jt.align,hi=jt.showPrevNextJumpers,mi=hi===void 0?!0:hi,si=jt.showQuickJumper,Cn=jt.showLessItems,Ki=jt.showTitle,Yn=Ki===void 0?!0:Ki,Qi=jt.onShowSizeChange,vr=Qi===void 0?Kt:Qi,Dr=jt.locale,Ci=Dr===void 0?st.Z:Dr,kr=jt.style,vo=jt.totalBoundaryShowSizeChanger,qo=vo===void 0?50:vo,Do=jt.disabled,Oo=jt.simple,Cr=jt.showTotal,jo=jt.showSizeChanger,or=jo===void 0?rt>qo:jo,kn=jt.sizeChangerRender,qe=jt.pageSizeOptions,Tn=jt.itemRender,In=Tn===void 0?Vt:Tn,zi=jt.jumpPrevIcon,Gi=jt.jumpNextIcon,Vi=jt.prevIcon,Zi=jt.nextIcon,qr=ve.useRef(null),sn=oe(10,{value:Ze,defaultValue:mt}),He=(0,Ee.Z)(sn,2),Ve=He[0],ot=He[1],Lt=oe(1,{value:nt,defaultValue:Be,postState:function(ji){return Math.max(1,Math.min(ji,Gt(void 0,Ve,rt)))}}),At=(0,Ee.Z)(Lt,2),an=At[0],Ot=At[1],xn=ve.useState(an),Zn=(0,Ee.Z)(xn,2),wi=Zn[0],Bn=Zn[1];(0,ve.useEffect)(function(){Bn(an)},[an]);var rn=vn!==Kt,Fn="current"in jt,vi=Math.max(1,an-(Cn?3:5)),_i=Math.min(Gt(void 0,Ve,rt),an+(Cn?3:5));function cn(Sn,ji){var Wi=Sn||ve.createElement("button",{type:"button","aria-label":ji,className:"".concat(ze,"-item-link")});return typeof Sn=="function"&&(Wi=ve.createElement(Sn,(0,Me.Z)({},jt))),Wi}function qn(Sn){var ji=Sn.target.value,Wi=Gt(void 0,Ve,rt),Ur;return ji===""?Ur=ji:Number.isNaN(Number(ji))?Ur=wi:ji>=Wi?Ur=Wi:Ur=Number(ji),Ur}function Ii(Sn){return gn(Sn)&&Sn!==an&&gn(rt)&&rt>0}var lr=rt>Ve?si:!1;function _r(Sn){(Sn.keyCode===se.UP||Sn.keyCode===se.DOWN)&&Sn.preventDefault()}function Ti(Sn){var ji=qn(Sn);switch(ji!==wi&&Bn(ji),Sn.keyCode){case se.ENTER:dr(ji);break;case se.UP:dr(ji-1);break;case se.DOWN:dr(ji+1);break;default:break}}function bi(Sn){dr(qn(Sn))}function li(Sn){var ji=Gt(Sn,Ve,rt),Wi=an>ji&&ji!==0?ji:an;ot(Sn),Bn(Wi),vr==null||vr(an,Sn),Ot(Wi),vn==null||vn(Wi,Sn)}function dr(Sn){if(Ii(Sn)&&!Do){var ji=Gt(void 0,Ve,rt),Wi=Sn;return Sn>ji?Wi=ji:Sn<1&&(Wi=1),Wi!==wi&&Bn(Wi),Ot(Wi),vn==null||vn(Wi,Ve),Wi}return an}var jr=an>1,ei=an<Gt(void 0,Ve,rt);function Ui(){jr&&dr(an-1)}function ws(){ei&&dr(an+1)}function cs(){dr(vi)}function Io(){dr(_i)}function dn(Sn,ji){if(Sn.key==="Enter"||Sn.charCode===se.ENTER||Sn.keyCode===se.ENTER){for(var Wi=arguments.length,Ur=new Array(Wi>2?Wi-2:0),Xr=2;Xr<Wi;Xr++)Ur[Xr-2]=arguments[Xr];ji.apply(void 0,Ur)}}function gr(Sn){dn(Sn,Ui)}function Zr(Sn){dn(Sn,ws)}function $i(Sn){dn(Sn,cs)}function yo(Sn){dn(Sn,Io)}function Rr(Sn){var ji=In(Sn,"prev",cn(Vi,"prev page"));return ve.isValidElement(ji)?ve.cloneElement(ji,{disabled:!jr}):ji}function uo(Sn){var ji=In(Sn,"next",cn(Zi,"next page"));return ve.isValidElement(ji)?ve.cloneElement(ji,{disabled:!ei}):ji}function to(Sn){(Sn.type==="click"||Sn.keyCode===se.ENTER)&&dr(wi)}var Yr=null,Fo=Re(jt,{aria:!0,data:!0}),zn=Cr&&ve.createElement("li",{className:"".concat(ze,"-total-text")},Cr(rt,[rt===0?0:(an-1)*Ve+1,an*Ve>rt?rt:an*Ve])),ns=null,Ut=Gt(void 0,Ve,rt);if(An&&rt<=Ve)return null;var en=[],jn={rootPrefixCls:ze,onClick:dr,onKeyPress:dn,showTitle:Yn,itemRender:In,page:-1},Ft=an-1>0?an-1:0,Yt=an+1<Ut?an+1:Ut,nn=si&&si.goButton,yn=(0,Fe.Z)(Oo)==="object"?Oo.readOnly:!Oo,Xn=nn,yi=null;Oo&&(nn&&(typeof nn=="boolean"?Xn=ve.createElement("button",{type:"button",onClick:to,onKeyUp:to},Ci.jump_to_confirm):Xn=ve.createElement("span",{onClick:to,onKeyUp:to},nn),Xn=ve.createElement("li",{title:Yn?"".concat(Ci.jump_to).concat(an,"/").concat(Ut):null,className:"".concat(ze,"-simple-pager")},Xn)),yi=ve.createElement("li",{title:Yn?"".concat(an,"/").concat(Ut):null,className:"".concat(ze,"-simple-pager")},yn?wi:ve.createElement("input",{type:"text","aria-label":Ci.jump_to,value:wi,disabled:Do,onKeyDown:_r,onKeyUp:Ti,onChange:Ti,onBlur:bi,size:3}),ve.createElement("span",{className:"".concat(ze,"-slash")},"/"),Ut));var gi=Cn?1:2;if(Ut<=3+gi*2){Ut||en.push(ve.createElement(yt,(0,ye.Z)({},jn,{key:"noPager",page:1,className:"".concat(ze,"-item-disabled")})));for(var Dn=1;Dn<=Ut;Dn+=1)en.push(ve.createElement(yt,(0,ye.Z)({},jn,{key:Dn,page:Dn,active:an===Dn})))}else{var vt=Cn?Ci.prev_3:Ci.prev_5,Sr=Cn?Ci.next_3:Ci.next_5,Er=In(vi,"jump-prev",cn(zi,"prev page")),no=In(_i,"jump-next",cn(Gi,"next page"));mi&&(Yr=Er?ve.createElement("li",{title:Yn?vt:null,key:"prev",onClick:cs,tabIndex:0,onKeyDown:$i,className:be()("".concat(ze,"-jump-prev"),(0,Le.Z)({},"".concat(ze,"-jump-prev-custom-icon"),!!zi))},Er):null,ns=no?ve.createElement("li",{title:Yn?Sr:null,key:"next",onClick:Io,tabIndex:0,onKeyDown:yo,className:be()("".concat(ze,"-jump-next"),(0,Le.Z)({},"".concat(ze,"-jump-next-custom-icon"),!!Gi))},no):null);var io=Math.max(1,an-gi),ro=Math.min(an+gi,Ut);an-1<=gi&&(ro=1+gi*2),Ut-an<=gi&&(io=Ut-gi*2);for(var zr=io;zr<=ro;zr+=1)en.push(ve.createElement(yt,(0,ye.Z)({},jn,{key:zr,page:zr,active:an===zr})));if(an-1>=gi*2&&an!==3&&(en[0]=ve.cloneElement(en[0],{className:be()("".concat(ze,"-item-after-jump-prev"),en[0].props.className)}),en.unshift(Yr)),Ut-an>=gi*2&&an!==Ut-2){var Go=en[en.length-1];en[en.length-1]=ve.cloneElement(Go,{className:be()("".concat(ze,"-item-before-jump-next"),Go.props.className)}),en.push(ns)}io!==1&&en.unshift(ve.createElement(yt,(0,ye.Z)({},jn,{key:1,page:1}))),ro!==Ut&&en.push(ve.createElement(yt,(0,ye.Z)({},jn,{key:Ut,page:Ut})))}var co=Rr(Ft);if(co){var br=!jr||!Ut;co=ve.createElement("li",{title:Yn?Ci.prev_page:null,onClick:Ui,tabIndex:br?null:0,onKeyDown:gr,className:be()("".concat(ze,"-prev"),(0,Le.Z)({},"".concat(ze,"-disabled"),br)),"aria-disabled":br},co)}var ir=uo(Yt);if(ir){var Pi,ui;Oo?(Pi=!ei,ui=jr?0:null):(Pi=!ei||!Ut,ui=Pi?null:0),ir=ve.createElement("li",{title:Yn?Ci.next_page:null,onClick:ws,tabIndex:ui,onKeyDown:Zr,className:be()("".concat(ze,"-next"),(0,Le.Z)({},"".concat(ze,"-disabled"),Pi)),"aria-disabled":Pi},ir)}var Di=be()(ze,ht,(0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)({},"".concat(ze,"-start"),Mn==="start"),"".concat(ze,"-center"),Mn==="center"),"".concat(ze,"-end"),Mn==="end"),"".concat(ze,"-simple"),Oo),"".concat(ze,"-disabled"),Do));return ve.createElement("ul",(0,ye.Z)({className:Di,style:kr,ref:qr},Fo),zn,co,Oo?yi:en,ir,ve.createElement(dt,{locale:Ci,rootPrefixCls:ze,disabled:Do,selectPrefixCls:it,changeSize:li,pageSize:Ve,pageSizeOptions:qe,quickGo:lr?dr:null,goButton:Xn,showSizeChanger:or,sizeChangerRender:kn}))},on=Dt},58212:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return $t}});function Le(){return Le=Object.assign?Object.assign.bind():function(st){for(var et=1;et<arguments.length;et++){var lt=arguments[et];for(var dt in lt)Object.prototype.hasOwnProperty.call(lt,dt)&&(st[dt]=lt[dt])}return st},Le.apply(this,arguments)}function ye(st){"@babel/helpers - typeof";return ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},ye(st)}function Fe(st,et){if(ye(st)!=="object"||st===null)return st;var lt=st[Symbol.toPrimitive];if(lt!==void 0){var dt=lt.call(st,et||"default");if(ye(dt)!=="object")return dt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(et==="string"?String:Number)(st)}function Me(st){var et=Fe(st,"string");return ye(et)==="symbol"?et:String(et)}function Ee(st,et,lt){return et=Me(et),et in st?Object.defineProperty(st,et,{value:lt,enumerable:!0,configurable:!0,writable:!0}):st[et]=lt,st}function me(st){if(Array.isArray(st))return st}function be(st,et){var lt=st==null?null:typeof Symbol!="undefined"&&st[Symbol.iterator]||st["@@iterator"];if(lt!=null){var dt,bt,yt,Vt,Kt=[],gn=!0,Gt=!1;try{if(yt=(lt=lt.call(st)).next,et===0){if(Object(lt)!==lt)return;gn=!1}else for(;!(gn=(dt=yt.call(lt)).done)&&(Kt.push(dt.value),Kt.length!==et);gn=!0);}catch(Dt){Gt=!0,bt=Dt}finally{try{if(!gn&<.return!=null&&(Vt=lt.return(),Object(Vt)!==Vt))return}finally{if(Gt)throw bt}}return Kt}}function ve(st,et){(et==null||et>st.length)&&(et=st.length);for(var lt=0,dt=new Array(et);lt<et;lt++)dt[lt]=st[lt];return dt}function we(st,et){if(st){if(typeof st=="string")return ve(st,et);var lt=Object.prototype.toString.call(st).slice(8,-1);if(lt==="Object"&&st.constructor&&(lt=st.constructor.name),lt==="Map"||lt==="Set")return Array.from(st);if(lt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(lt))return ve(st,et)}}function ge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function he(st,et){return me(st)||be(st,et)||we(st,et)||ge()}function xe(st,et){if(st==null)return{};var lt={},dt=Object.keys(st),bt,yt;for(yt=0;yt<dt.length;yt++)bt=dt[yt],!(et.indexOf(bt)>=0)&&(lt[bt]=st[bt]);return lt}function fe(st,et){if(st==null)return{};var lt=xe(st,et),dt,bt;if(Object.getOwnPropertySymbols){var yt=Object.getOwnPropertySymbols(st);for(bt=0;bt<yt.length;bt++)dt=yt[bt],!(et.indexOf(dt)>=0)&&Object.prototype.propertyIsEnumerable.call(st,dt)&&(lt[dt]=st[dt])}return lt}var ue=De(67294),ee=De(94184),z=De.n(ee);function oe(st){if(Array.isArray(st))return st}function ie(st,et){var lt=st==null?null:typeof Symbol!="undefined"&&st[Symbol.iterator]||st["@@iterator"];if(lt!=null){var dt,bt,yt,Vt,Kt=[],gn=!0,Gt=!1;try{if(yt=(lt=lt.call(st)).next,et===0){if(Object(lt)!==lt)return;gn=!1}else for(;!(gn=(dt=yt.call(lt)).done)&&(Kt.push(dt.value),Kt.length!==et);gn=!0);}catch(Dt){Gt=!0,bt=Dt}finally{try{if(!gn&<.return!=null&&(Vt=lt.return(),Object(Vt)!==Vt))return}finally{if(Gt)throw bt}}return Kt}}function se(st,et){(et==null||et>st.length)&&(et=st.length);for(var lt=0,dt=new Array(et);lt<et;lt++)dt[lt]=st[lt];return dt}function le(st,et){if(st){if(typeof st=="string")return se(st,et);var lt=Object.prototype.toString.call(st).slice(8,-1);if(lt==="Object"&&st.constructor&&(lt=st.constructor.name),lt==="Map"||lt==="Set")return Array.from(st);if(lt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(lt))return se(st,et)}}function Se(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pe(st,et){return oe(st)||ie(st,et)||le(st,et)||Se()}function Ce(st){var et=ue.useRef();et.current=st;var lt=ue.useCallback(function(){for(var dt,bt=arguments.length,yt=new Array(bt),Vt=0;Vt<bt;Vt++)yt[Vt]=arguments[Vt];return(dt=et.current)===null||dt===void 0?void 0:dt.call.apply(dt,[et].concat(yt))},[]);return lt}function Ae(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Oe=Ae()?ue.useLayoutEffect:ue.useEffect,Re=function(et,lt){var dt=ue.useRef(!0);Oe(function(){return et(dt.current)},lt),Oe(function(){return dt.current=!1,function(){dt.current=!0}},[])},We=function(et,lt){Re(function(dt){if(!dt)return et()},lt)},$e=null;function Je(st){var et=ue.useRef(!1),lt=ue.useState(st),dt=pe(lt,2),bt=dt[0],yt=dt[1];ue.useEffect(function(){return et.current=!1,function(){et.current=!0}},[]);function Vt(Kt,gn){gn&&et.current||yt(Kt)}return[bt,Vt]}function pt(st){return st!==void 0}function St(st,et){var lt=et||{},dt=lt.defaultValue,bt=lt.value,yt=lt.onChange,Vt=lt.postState,Kt=Je(function(){return pt(bt)?bt:pt(dt)?typeof dt=="function"?dt():dt:typeof st=="function"?st():st}),gn=pe(Kt,2),Gt=gn[0],Dt=gn[1],on=bt!==void 0?bt:Gt,Jt=Vt?Vt(on):on,jt=Ce(yt),ut=Je([on]),ze=pe(ut,2),je=ze[0],it=ze[1];We(function(){var nt=je[0];Gt!==nt&&jt(Gt,nt)},[je]),We(function(){pt(bt)||Dt(bt)},[bt]);var ht=Ce(function(nt,Ke){Dt(nt,Ke),it([on],Ke)});return[Jt,ht]}var Mt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(et){var lt=et.keyCode;if(et.altKey&&!et.ctrlKey||et.metaKey||lt>=Mt.F1&<<=Mt.F12)return!1;switch(lt){case Mt.ALT:case Mt.CAPS_LOCK:case Mt.CONTEXT_MENU:case Mt.CTRL:case Mt.DOWN:case Mt.END:case Mt.ESC:case Mt.HOME:case Mt.INSERT:case Mt.LEFT:case Mt.MAC_FF_META:case Mt.META:case Mt.NUMLOCK:case Mt.NUM_CENTER:case Mt.PAGE_DOWN:case Mt.PAGE_UP:case Mt.PAUSE:case Mt.PRINT_SCREEN:case Mt.RIGHT:case Mt.SHIFT:case Mt.UP:case Mt.WIN_KEY:case Mt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(et){if(et>=Mt.ZERO&&et<=Mt.NINE||et>=Mt.NUM_ZERO&&et<=Mt.NUM_MULTIPLY||et>=Mt.A&&et<=Mt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&et===0)return!0;switch(et){case Mt.SPACE:case Mt.QUESTION_MARK:case Mt.NUM_PLUS:case Mt.NUM_MINUS:case Mt.NUM_PERIOD:case Mt.NUM_DIVISION:case Mt.SEMICOLON:case Mt.DASH:case Mt.EQUALS:case Mt.COMMA:case Mt.PERIOD:case Mt.SLASH:case Mt.APOSTROPHE:case Mt.SINGLE_QUOTE:case Mt.OPEN_SQUARE_BRACKET:case Mt.BACKSLASH:case Mt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},ct=Mt,wt=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],ft=ue.forwardRef(function(st,et){var lt,dt=st.prefixCls,bt=dt===void 0?"rc-switch":dt,yt=st.className,Vt=st.checked,Kt=st.defaultChecked,gn=st.disabled,Gt=st.loadingIcon,Dt=st.checkedChildren,on=st.unCheckedChildren,Jt=st.onClick,jt=st.onChange,ut=st.onKeyDown,ze=fe(st,wt),je=St(!1,{value:Vt,defaultValue:Kt}),it=he(je,2),ht=it[0],nt=it[1];function Ke(Ze,Xe){var mt=ht;return gn||(mt=Ze,nt(mt),jt==null||jt(mt,Xe)),mt}function Be(Ze){Ze.which===ct.LEFT?Ke(!1,Ze):Ze.which===ct.RIGHT&&Ke(!0,Ze),ut==null||ut(Ze)}function Ue(Ze){var Xe=Ke(!ht,Ze);Jt==null||Jt(Xe,Ze)}var rt=z()(bt,yt,(lt={},Ee(lt,"".concat(bt,"-checked"),ht),Ee(lt,"".concat(bt,"-disabled"),gn),lt));return ue.createElement("button",Le({},ze,{type:"button",role:"switch","aria-checked":ht,disabled:gn,className:rt,ref:et,onKeyDown:Be,onClick:Ue}),Gt,ue.createElement("span",{className:"".concat(bt,"-inner")},ue.createElement("span",{className:"".concat(bt,"-inner-checked")},Dt),ue.createElement("span",{className:"".concat(bt,"-inner-unchecked")},on)))});ft.displayName="Switch";var $t=ft},45233:function(_n,hn,De){"use strict";De.d(hn,{R:function(){return ye},w:function(){return Le}});var Le={},ye="rc-table-internal-hook"},54768:function(_n,hn,De){"use strict";De.d(hn,{L:function(){return oe},Z:function(){return pe}});var Le=De(97685),ye=De(4942),Fe=De(74902),Me=De(71002),Ee=De(1413),me=De(45987),be=De(63295),ve=De(67294);function we(Ce){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Oe=[];return ve.Children.forEach(Ce,function(Re){Re==null&&!Ae.keepEmpty||(Array.isArray(Re)?Oe=Oe.concat(we(Re)):(0,be.Z)(Re)&&Re.props?Oe=Oe.concat(we(Re.props.children,Ae)):Oe.push(Re))}),Oe}var ge=De(40830),he=De(45233),xe=De(62978);function fe(Ce){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof Ae=="number"?Ae:Ae.endsWith("%")?Ce*parseFloat(Ae)/100:null}function ue(Ce,Ae,Oe){return ve.useMemo(function(){if(Ae&&Ae>0){var Re=0,We=0;Ce.forEach(function(ft){var $t=fe(Ae,ft.width);$t?Re+=$t:We+=1});var $e=Math.max(Ae,Oe),Je=Math.max($e-Re,We),pt=We,St=Je/We,Mt=0,ct=Ce.map(function(ft){var $t=(0,Ee.Z)({},ft),st=fe(Ae,$t.width);if(st)$t.width=st;else{var et=Math.floor(St);$t.width=pt===1?Je:et,Je-=et,pt-=1}return Mt+=$t.width,$t});if(Mt<$e){var wt=$e/Mt;Je=$e,ct.forEach(function(ft,$t){var st=Math.floor(ft.width*wt);ft.width=$t===ct.length-1?Je:st,Je-=st})}return[ct,Math.max(Mt,$e)]}return[Ce,Ae]},[Ce,Ae,Oe])}var ee=["children"],z=["fixed"];function oe(Ce){return we(Ce).filter(function(Ae){return ve.isValidElement(Ae)}).map(function(Ae){var Oe=Ae.key,Re=Ae.props,We=Re.children,$e=(0,me.Z)(Re,ee),Je=(0,Ee.Z)({key:Oe},$e);return We&&(Je.children=oe(We)),Je})}function ie(Ce){return Ce.filter(function(Ae){return Ae&&(0,Me.Z)(Ae)==="object"&&!Ae.hidden}).map(function(Ae){var Oe=Ae.children;return Oe&&Oe.length>0?(0,Ee.Z)((0,Ee.Z)({},Ae),{},{children:ie(Oe)}):Ae})}function se(Ce){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return Ce.filter(function(Oe){return Oe&&(0,Me.Z)(Oe)==="object"}).reduce(function(Oe,Re,We){var $e=Re.fixed,Je=$e===!0?"left":$e,pt="".concat(Ae,"-").concat(We),St=Re.children;return St&&St.length>0?[].concat((0,Fe.Z)(Oe),(0,Fe.Z)(se(St,pt).map(function(Mt){return(0,Ee.Z)({fixed:Je},Mt)}))):[].concat((0,Fe.Z)(Oe),[(0,Ee.Z)((0,Ee.Z)({key:pt},Re),{},{fixed:Je})])},[])}function le(Ce){return Ce.map(function(Ae){var Oe=Ae.fixed,Re=(0,me.Z)(Ae,z),We=Oe;return Oe==="left"?We="right":Oe==="right"&&(We="left"),(0,Ee.Z)({fixed:We},Re)})}function Se(Ce,Ae){var Oe=Ce.prefixCls,Re=Ce.columns,We=Ce.children,$e=Ce.expandable,Je=Ce.expandedKeys,pt=Ce.columnTitle,St=Ce.getRowKey,Mt=Ce.onTriggerExpand,ct=Ce.expandIcon,wt=Ce.rowExpandable,ft=Ce.expandIconColumnIndex,$t=Ce.direction,st=Ce.expandRowByClick,et=Ce.columnWidth,lt=Ce.fixed,dt=Ce.scrollWidth,bt=Ce.clientWidth,yt=ve.useMemo(function(){var ut=Re||oe(We)||[];return ie(ut.slice())},[Re,We]),Vt=ve.useMemo(function(){if($e){var ut=yt.slice();if(!ut.includes(he.w)){var ze=ft||0;ze>=0&&(ze||lt==="left"||!lt)&&ut.splice(ze,0,he.w),lt==="right"&&ut.splice(yt.length,0,he.w)}var je=ut.indexOf(he.w);ut=ut.filter(function(Ke,Be){return Ke!==he.w||Be===je});var it=yt[je],ht;lt?ht=lt:ht=it?it.fixed:null;var nt=(0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)({},xe.v,{className:"".concat(Oe,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",pt),"fixed",ht),"className","".concat(Oe,"-row-expand-icon-cell")),"width",et),"render",function(Be,Ue,rt){var Ze=St(Ue,rt),Xe=Je.has(Ze),mt=wt?wt(Ue):!0,Rt=ct({prefixCls:Oe,expanded:Xe,expandable:mt,record:Ue,onExpand:Mt});return st?ve.createElement("span",{onClick:function(An){return An.stopPropagation()}},Rt):Rt});return ut.map(function(Ke){return Ke===he.w?nt:Ke})}return yt.filter(function(Ke){return Ke!==he.w})},[$e,yt,St,Je,ct,$t]),Kt=ve.useMemo(function(){var ut=Vt;return Ae&&(ut=Ae(ut)),ut.length||(ut=[{render:function(){return null}}]),ut},[Ae,Vt,$t]),gn=ve.useMemo(function(){return $t==="rtl"?le(se(Kt)):se(Kt)},[Kt,$t,dt]),Gt=ve.useMemo(function(){for(var ut=-1,ze=gn.length-1;ze>=0;ze-=1){var je=gn[ze].fixed;if(je==="left"||je===!0){ut=ze;break}}if(ut>=0)for(var it=0;it<=ut;it+=1){var ht=gn[it].fixed;if(ht!=="left"&&ht!==!0)return!0}var nt=gn.findIndex(function(Ue){var rt=Ue.fixed;return rt==="right"});if(nt>=0)for(var Ke=nt;Ke<gn.length;Ke+=1){var Be=gn[Ke].fixed;if(Be!=="right")return!0}return!1},[gn]),Dt=ue(gn,dt,bt),on=(0,Le.Z)(Dt,2),Jt=on[0],jt=on[1];return[Kt,Jt,jt,Gt]}var pe=Se},29104:function(_n,hn,De){"use strict";De.d(hn,{w2:function(){return Le.w},vP:function(){return to.v},RQ:function(){return Le.R},ER:function(){return kn},Q$:function(){return Co},TN:function(){return eh}});var Le=De(45233),ye=De(97685),Fe=De(66680),Me=De(8410),Ee=De(91881),me=De(67294),be=De(73935);function ve(_t){var Ht=me.createContext(void 0),Bt=function(fn){var wn=fn.value,bn=fn.children,On=me.useRef(wn);On.current=wn;var ti=me.useState(function(){return{getValue:function(){return On.current},listeners:new Set}}),Jn=(0,ye.Z)(ti,1),oi=Jn[0];return(0,Me.Z)(function(){(0,be.unstable_batchedUpdates)(function(){oi.listeners.forEach(function(Wn){Wn(wn)})})},[wn]),me.createElement(Ht.Provider,{value:oi},bn)};return{Context:Ht,Provider:Bt,defaultValue:_t}}function we(_t,Ht){var Bt=(0,Fe.Z)(typeof Ht=="function"?Ht:function(Wn){if(Ht===void 0)return Wn;if(!Array.isArray(Ht))return Wn[Ht];var ci={};return Ht.forEach(function(ni){ci[ni]=Wn[ni]}),ci}),Qt=me.useContext(_t==null?void 0:_t.Context),fn=Qt||{},wn=fn.listeners,bn=fn.getValue,On=me.useRef();On.current=Bt(Qt?bn():_t==null?void 0:_t.defaultValue);var ti=me.useState({}),Jn=(0,ye.Z)(ti,2),oi=Jn[1];return(0,Me.Z)(function(){if(!Qt)return;function Wn(ci){var ni=Bt(ci);(0,Ee.Z)(On.current,ni,!0)||oi({})}return wn.add(Wn),function(){wn.delete(Wn)}},[Qt]),On.current}var ge=De(87462),he=De(42550);function xe(){var _t=me.createContext(null);function Ht(){return me.useContext(_t)}function Bt(fn,wn){var bn=(0,he.Yr)(fn),On=function(Jn,oi){var Wn=bn?{ref:oi}:{},ci=me.useRef(0),ni=me.useRef(Jn),Ai=Ht();return Ai!==null?me.createElement(fn,(0,ge.Z)({},Jn,Wn)):((!wn||wn(ni.current,Jn))&&(ci.current+=1),ni.current=Jn,me.createElement(_t.Provider,{value:ci.current},me.createElement(fn,(0,ge.Z)({},Jn,Wn))))};return bn?me.forwardRef(On):On}function Qt(fn,wn){var bn=(0,he.Yr)(fn),On=function(Jn,oi){var Wn=bn?{ref:oi}:{};return Ht(),me.createElement(fn,(0,ge.Z)({},Jn,Wn))};return bn?me.memo(me.forwardRef(On),wn):me.memo(On,wn)}return{makeImmutable:Bt,responseImmutable:Qt,useImmutableMark:Ht}}var fe=xe(),ue=fe.makeImmutable,ee=fe.responseImmutable,z=fe.useImmutableMark,oe=xe(),ie=oe.makeImmutable,se=oe.responseImmutable,le=oe.useImmutableMark,Se=ve(),pe=Se;function Ce(_t,Ht){var Bt=React.useRef(0);Bt.current+=1;var Qt=React.useRef(_t),fn=[];Object.keys(_t||{}).map(function(bn){var On;(_t==null?void 0:_t[bn])!==((On=Qt.current)===null||On===void 0?void 0:On[bn])&&fn.push(bn)}),Qt.current=_t;var wn=React.useRef([]);return fn.length&&(wn.current=fn),React.useDebugValue(Bt.current),React.useDebugValue(wn.current.join(", ")),Ht&&console.log("".concat(Ht,":"),Bt.current,wn.current),Bt.current}var Ae=null,Oe=null,Re=De(71002),We=De(1413),$e=De(4942),Je=De(94184),pt=De.n(Je);function St(_t,Ht,Bt){var Qt=me.useRef({});return(!("value"in Qt.current)||Bt(Qt.current.condition,Ht))&&(Qt.current.value=_t(),Qt.current.condition=Ht),Qt.current.value}var Mt=De(40830);function ct(_t,Ht){var Bt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Qt=new Set;function fn(wn,bn){var On=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,ti=Qt.has(wn);if((0,Mt.ZP)(!ti,"Warning: There may be circular references"),ti)return!1;if(wn===bn)return!0;if(Bt&&On>1)return!1;Qt.add(wn);var Jn=On+1;if(Array.isArray(wn)){if(!Array.isArray(bn)||wn.length!==bn.length)return!1;for(var oi=0;oi<wn.length;oi++)if(!fn(wn[oi],bn[oi],Jn))return!1;return!0}if(wn&&bn&&(0,Re.Z)(wn)==="object"&&(0,Re.Z)(bn)==="object"){var Wn=Object.keys(wn);return Wn.length!==Object.keys(bn).length?!1:Wn.every(function(ci){return fn(wn[ci],bn[ci],Jn)})}return!1}return fn(_t,Ht)}var wt=ct;function ft(_t,Ht){for(var Bt=_t,Qt=0;Qt<Ht.length;Qt+=1){if(Bt==null)return;Bt=Bt[Ht[Qt]]}return Bt}var $t=me.createContext({renderWithProps:!1}),st=$t,et="RC_TABLE_KEY";function lt(_t){return _t==null?[]:Array.isArray(_t)?_t:[_t]}function dt(_t){var Ht=[],Bt={};return _t.forEach(function(Qt){for(var fn=Qt||{},wn=fn.key,bn=fn.dataIndex,On=wn||lt(bn).join("-")||et;Bt[On];)On="".concat(On,"_next");Bt[On]=!0,Ht.push(On)}),Ht}function bt(_t){return _t!=null}function yt(_t){return typeof _t=="number"&&!Number.isNaN(_t)}function Vt(_t){return _t&&(0,Re.Z)(_t)==="object"&&!Array.isArray(_t)&&!me.isValidElement(_t)}function Kt(_t,Ht,Bt,Qt,fn,wn){var bn=me.useContext(st),On=le(),ti=St(function(){if(bt(Qt))return[Qt];var Jn=Ht==null||Ht===""?[]:Array.isArray(Ht)?Ht:[Ht],oi=ft(_t,Jn),Wn=oi,ci=void 0;if(fn){var ni=fn(oi,_t,Bt);Vt(ni)?(Wn=ni.children,ci=ni.props,bn.renderWithProps=!0):Wn=ni}return[Wn,ci]},[On,_t,Qt,Ht,fn,Bt],function(Jn,oi){if(wn){var Wn=(0,ye.Z)(Jn,2),ci=Wn[1],ni=(0,ye.Z)(oi,2),Ai=ni[1];return wn(Ai,ci)}return bn.renderWithProps?!0:!wt(Jn,oi,!0)});return ti}function gn(_t,Ht,Bt,Qt){var fn=_t+Ht-1;return _t<=Qt&&fn>=Bt}function Gt(_t,Ht){return we(pe,function(Bt){var Qt=gn(_t,Ht||1,Bt.hoverStartRow,Bt.hoverEndRow);return[Qt,Bt.onHover]})}function Dt(_t){var Ht=me.useRef();Ht.current=_t;var Bt=me.useCallback(function(){for(var Qt,fn=arguments.length,wn=new Array(fn),bn=0;bn<fn;bn++)wn[bn]=arguments[bn];return(Qt=Ht.current)===null||Qt===void 0?void 0:Qt.call.apply(Qt,[Ht].concat(wn))},[]);return Bt}function on(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Jt=on()?me.useLayoutEffect:me.useEffect,jt=function(Ht,Bt){var Qt=React.useRef(!0);Jt(function(){return Ht(Qt.current)},Bt),Jt(function(){return Qt.current=!1,function(){Qt.current=!0}},[])},ut=function(Ht,Bt){jt(function(Qt){if(!Qt)return Ht()},Bt)},ze=null;function je(_t){var Ht=React.useRef(!1),Bt=React.useState(_t),Qt=_slicedToArray(Bt,2),fn=Qt[0],wn=Qt[1];React.useEffect(function(){return Ht.current=!1,function(){Ht.current=!0}},[]);function bn(On,ti){ti&&Ht.current||wn(On)}return[fn,bn]}function it(_t){return _t!==void 0}function ht(_t,Ht){var Bt=Ht||{},Qt=Bt.defaultValue,fn=Bt.value,wn=Bt.onChange,bn=Bt.postState,On=useState(function(){return it(fn)?fn:it(Qt)?typeof Qt=="function"?Qt():Qt:typeof _t=="function"?_t():_t}),ti=_slicedToArray(On,2),Jn=ti[0],oi=ti[1],Wn=fn!==void 0?fn:Jn,ci=bn?bn(Wn):Wn,ni=useEvent(wn),Ai=useState([Wn]),qi=_slicedToArray(Ai,2),yr=qi[0],Mr=qi[1];useLayoutUpdateEffect(function(){var fr=yr[0];Jn!==fr&&ni(Jn,fr)},[yr]),useLayoutUpdateEffect(function(){it(fn)||oi(fn)},[fn]);var Fi=useEvent(function(fr,Xi){oi(fr,Xi),Mr([Wn],Xi)});return[ci,Fi]}var nt=De(35110),Ke=De(63295),Be=Number(me.version.split(".")[0]),Ue=function(Ht,Bt){typeof Ht=="function"?Ht(Bt):(0,Re.Z)(Ht)==="object"&&Ht&&"current"in Ht&&(Ht.current=Bt)},rt=function(){for(var Ht=arguments.length,Bt=new Array(Ht),Qt=0;Qt<Ht;Qt++)Bt[Qt]=arguments[Qt];var fn=Bt.filter(Boolean);return fn.length<=1?fn[0]:function(wn){Bt.forEach(function(bn){Ue(bn,wn)})}},Ze=function(){for(var Ht=arguments.length,Bt=new Array(Ht),Qt=0;Qt<Ht;Qt++)Bt[Qt]=arguments[Qt];return useMemo(function(){return rt.apply(void 0,Bt)},Bt,function(fn,wn){return fn.length!==wn.length||fn.every(function(bn,On){return bn!==wn[On]})})},Xe=function(Ht){var Bt,Qt;if(!Ht)return!1;if(mt(Ht)&&Be>=19)return!0;var fn=isMemo(Ht)?Ht.type.type:Ht.type;return!(typeof fn=="function"&&!((Bt=fn.prototype)!==null&&Bt!==void 0&&Bt.render)&&fn.$$typeof!==ForwardRef||typeof Ht=="function"&&!((Qt=Ht.prototype)!==null&&Qt!==void 0&&Qt.render)&&Ht.$$typeof!==ForwardRef)};function mt(_t){return isValidElement(_t)&&!isFragment(_t)}var Rt=function(Ht){return mt(Ht)&&Xe(Ht)},vn=function(Ht){if(Ht&&mt(Ht)){var Bt=Ht;return Bt.props.propertyIsEnumerable("ref")?Bt.props.ref:Bt.ref}return null};function An(_t,Ht,Bt,Qt){if(!Ht.length)return Bt;var fn=_toArray(Ht),wn=fn[0],bn=fn.slice(1),On;return!_t&&typeof wn=="number"?On=[]:Array.isArray(_t)?On=_toConsumableArray(_t):On=_objectSpread({},_t),Qt&&Bt===void 0&&bn.length===1?delete On[wn][bn[0]]:On[wn]=An(On[wn],bn,Bt,Qt),On}function Mn(_t,Ht,Bt){var Qt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Ht.length&&Qt&&Bt===void 0&&!get(_t,Ht.slice(0,-1))?_t:An(_t,Ht,Bt,Qt)}function hi(_t){return _typeof(_t)==="object"&&_t!==null&&Object.getPrototypeOf(_t)===Object.prototype}function mi(_t){return Array.isArray(_t)?[]:{}}var si=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function Cn(){for(var _t=arguments.length,Ht=new Array(_t),Bt=0;Bt<_t;Bt++)Ht[Bt]=arguments[Bt];var Qt=mi(Ht[0]);return Ht.forEach(function(fn){function wn(bn,On){var ti=new Set(On),Jn=get(fn,bn),oi=Array.isArray(Jn);if(oi||hi(Jn)){if(!ti.has(Jn)){ti.add(Jn);var Wn=get(Qt,bn);oi?Qt=Mn(Qt,bn,[]):(!Wn||_typeof(Wn)!=="object")&&(Qt=Mn(Qt,bn,mi(Jn))),si(Jn).forEach(function(ci){wn([].concat(_toConsumableArray(bn),[ci]),ti)})}}else Qt=Mn(Qt,bn,Jn)}wn([])}),Qt}var Ki=function(Ht){var Bt=Ht.ellipsis,Qt=Ht.rowType,fn=Ht.children,wn,bn=Bt===!0?{showTitle:!0}:Bt;return bn&&(bn.showTitle||Qt==="header")&&(typeof fn=="string"||typeof fn=="number"?wn=fn.toString():me.isValidElement(fn)&&typeof fn.props.children=="string"&&(wn=fn.props.children)),wn};function Yn(_t){var Ht,Bt,Qt,fn,wn,bn,On,ti,Jn=_t.component,oi=_t.children,Wn=_t.ellipsis,ci=_t.scope,ni=_t.prefixCls,Ai=_t.className,qi=_t.align,yr=_t.record,Mr=_t.render,Fi=_t.dataIndex,fr=_t.renderIndex,Xi=_t.shouldCellUpdate,Ar=_t.index,oo=_t.rowType,kt=_t.colSpan,Wt=_t.rowSpan,qt=_t.fixLeft,ki=_t.fixRight,pi=_t.firstFixLeft,Qn=_t.lastFixLeft,Vn=_t.firstFixRight,Hn=_t.lastFixRight,En=_t.appendNode,ri=_t.additionalProps,Yi=ri===void 0?{}:ri,Oi=_t.isSticky,er="".concat(ni,"-cell"),Hi=we(pe,["supportSticky","allColumnsFixedLeft","rowHoverable"]),sr=Hi.supportSticky,tr=Hi.allColumnsFixedLeft,so=Hi.rowHoverable,Or=Kt(yr,Fi,fr,oi,Mr,Xi),So=(0,ye.Z)(Or,2),To=So[0],nr=So[1],Tr={},Mi=typeof qt=="number"&&sr,Vr=typeof ki=="number"&&sr;Mi&&(Tr.position="sticky",Tr.left=qt),Vr&&(Tr.position="sticky",Tr.right=ki);var Lr=(Ht=(Bt=(Qt=nr==null?void 0:nr.colSpan)!==null&&Qt!==void 0?Qt:Yi.colSpan)!==null&&Bt!==void 0?Bt:kt)!==null&&Ht!==void 0?Ht:1,hr=(fn=(wn=(bn=nr==null?void 0:nr.rowSpan)!==null&&bn!==void 0?bn:Yi.rowSpan)!==null&&wn!==void 0?wn:Wt)!==null&&fn!==void 0?fn:1,wo=Gt(Ar,hr),rr=(0,ye.Z)(wo,2),$o=rr[0],ko=rr[1],Ao=Dt(function(ua){var Cs;yr&&ko(Ar,Ar+hr-1),Yi==null||(Cs=Yi.onMouseEnter)===null||Cs===void 0||Cs.call(Yi,ua)}),eo=Dt(function(ua){var Cs;yr&&ko(-1,-1),Yi==null||(Cs=Yi.onMouseLeave)===null||Cs===void 0||Cs.call(Yi,ua)});if(Lr===0||hr===0)return null;var Bo=(On=Yi.title)!==null&&On!==void 0?On:Ki({rowType:oo,ellipsis:Wn,children:To}),Ri=pt()(er,Ai,(ti={},(0,$e.Z)((0,$e.Z)((0,$e.Z)((0,$e.Z)((0,$e.Z)((0,$e.Z)((0,$e.Z)((0,$e.Z)((0,$e.Z)((0,$e.Z)(ti,"".concat(er,"-fix-left"),Mi&&sr),"".concat(er,"-fix-left-first"),pi&&sr),"".concat(er,"-fix-left-last"),Qn&&sr),"".concat(er,"-fix-left-all"),Qn&&tr&&sr),"".concat(er,"-fix-right"),Vr&&sr),"".concat(er,"-fix-right-first"),Vn&&sr),"".concat(er,"-fix-right-last"),Hn&&sr),"".concat(er,"-ellipsis"),Wn),"".concat(er,"-with-append"),En),"".concat(er,"-fix-sticky"),(Mi||Vr)&&Oi&&sr),(0,$e.Z)(ti,"".concat(er,"-row-hover"),!nr&&$o)),Yi.className,nr==null?void 0:nr.className),$s={};qi&&($s.textAlign=qi);var _o=(0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)({},nr==null?void 0:nr.style),Tr),$s),Yi.style),Rs=To;return(0,Re.Z)(Rs)==="object"&&!Array.isArray(Rs)&&!me.isValidElement(Rs)&&(Rs=null),Wn&&(Qn||Vn)&&(Rs=me.createElement("span",{className:"".concat(er,"-content")},Rs)),me.createElement(Jn,(0,ge.Z)({},nr,Yi,{className:Ri,style:_o,title:Bo,scope:ci,onMouseEnter:so?Ao:void 0,onMouseLeave:so?eo:void 0,colSpan:Lr!==1?Lr:null,rowSpan:hr!==1?hr:null}),En,Rs)}var Qi=me.memo(Yn);function vr(_t,Ht,Bt,Qt,fn){var wn=Bt[_t]||{},bn=Bt[Ht]||{},On,ti;wn.fixed==="left"?On=Qt.left[fn==="rtl"?Ht:_t]:bn.fixed==="right"&&(ti=Qt.right[fn==="rtl"?_t:Ht]);var Jn=!1,oi=!1,Wn=!1,ci=!1,ni=Bt[Ht+1],Ai=Bt[_t-1],qi=ni&&!ni.fixed||Ai&&!Ai.fixed||Bt.every(function(Xi){return Xi.fixed==="left"});if(fn==="rtl"){if(On!==void 0){var yr=Ai&&Ai.fixed==="left";ci=!yr&&qi}else if(ti!==void 0){var Mr=ni&&ni.fixed==="right";Wn=!Mr&&qi}}else if(On!==void 0){var Fi=ni&&ni.fixed==="left";Jn=!Fi&&qi}else if(ti!==void 0){var fr=Ai&&Ai.fixed==="right";oi=!fr&&qi}return{fixLeft:On,fixRight:ti,lastFixLeft:Jn,firstFixRight:oi,lastFixRight:Wn,firstFixLeft:ci,isSticky:Qt.isSticky}}var Dr=me.createContext({}),Ci=Dr;function kr(_t){var Ht=_t.className,Bt=_t.index,Qt=_t.children,fn=_t.colSpan,wn=fn===void 0?1:fn,bn=_t.rowSpan,On=_t.align,ti=we(pe,["prefixCls","direction"]),Jn=ti.prefixCls,oi=ti.direction,Wn=me.useContext(Ci),ci=Wn.scrollColumnIndex,ni=Wn.stickyOffsets,Ai=Wn.flattenColumns,qi=Bt+wn-1,yr=qi+1===ci?wn+1:wn,Mr=vr(Bt,Bt+yr-1,Ai,ni,oi);return me.createElement(Qi,(0,ge.Z)({className:Ht,index:Bt,component:"td",prefixCls:Jn,record:null,dataIndex:null,align:On,colSpan:yr,rowSpan:bn,render:function(){return Qt}},Mr))}var vo=De(45987),qo=["children"];function Do(_t){var Ht=_t.children,Bt=(0,vo.Z)(_t,qo);return me.createElement("tr",Bt,Ht)}function Oo(_t){var Ht=_t.children;return Ht}Oo.Row=Do,Oo.Cell=kr;var Cr=Oo;function jo(_t){var Ht=_t.children,Bt=_t.stickyOffsets,Qt=_t.flattenColumns,fn=we(pe,"prefixCls"),wn=Qt.length-1,bn=Qt[wn],On=me.useMemo(function(){return{stickyOffsets:Bt,flattenColumns:Qt,scrollColumnIndex:bn!=null&&bn.scrollbar?wn:null}},[bn,Qt,wn,Bt]);return me.createElement(Ci.Provider,{value:On},me.createElement("tfoot",{className:"".concat(fn,"-summary")},Ht))}var or=se(jo),kn=Cr,qe=De(48555),Tn=function(_t){if(!_t)return!1;if(_t instanceof Element){if(_t.offsetParent)return!0;if(_t.getBBox){var Ht=_t.getBBox(),Bt=Ht.width,Qt=Ht.height;if(Bt||Qt)return!0}if(_t.getBoundingClientRect){var fn=_t.getBoundingClientRect(),wn=fn.width,bn=fn.height;if(wn||bn)return!0}}return!1},In=function(Ht){if(on()&&window.document.documentElement){var Bt=Array.isArray(Ht)?Ht:[Ht],Qt=window.document.documentElement;return Bt.some(function(fn){return fn in Qt.style})}return!1},zi=function(Ht,Bt){if(!In(Ht))return!1;var Qt=document.createElement("div"),fn=Qt.style[Ht];return Qt.style[Ht]=Bt,Qt.style[Ht]!==fn};function Gi(_t,Ht){return!Array.isArray(_t)&&Ht!==void 0?zi(_t,Ht):In(_t)}function Vi(_t,Ht){if(!_t)return!1;if(_t.contains)return _t.contains(Ht);for(var Bt=Ht;Bt;){if(Bt===_t)return!0;Bt=Bt.parentNode}return!1}var Zi="data-rc-order",qr="data-rc-priority",sn="rc-util-key",He=new Map;function Ve(){var _t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ht=_t.mark;return Ht?Ht.startsWith("data-")?Ht:"data-".concat(Ht):sn}function ot(_t){if(_t.attachTo)return _t.attachTo;var Ht=document.querySelector("head");return Ht||document.body}function Lt(_t){return _t==="queue"?"prependQueue":_t?"prepend":"append"}function At(_t){return Array.from((He.get(_t)||_t).children).filter(function(Ht){return Ht.tagName==="STYLE"})}function an(_t){var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!on())return null;var Bt=Ht.csp,Qt=Ht.prepend,fn=Ht.priority,wn=fn===void 0?0:fn,bn=Lt(Qt),On=bn==="prependQueue",ti=document.createElement("style");ti.setAttribute(Zi,bn),On&&wn&&ti.setAttribute(qr,"".concat(wn)),Bt!=null&&Bt.nonce&&(ti.nonce=Bt==null?void 0:Bt.nonce),ti.innerHTML=_t;var Jn=ot(Ht),oi=Jn.firstChild;if(Qt){if(On){var Wn=(Ht.styles||At(Jn)).filter(function(ci){if(!["prepend","prependQueue"].includes(ci.getAttribute(Zi)))return!1;var ni=Number(ci.getAttribute(qr)||0);return wn>=ni});if(Wn.length)return Jn.insertBefore(ti,Wn[Wn.length-1].nextSibling),ti}Jn.insertBefore(ti,oi)}else Jn.appendChild(ti);return ti}function Ot(_t){var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Bt=ot(Ht);return(Ht.styles||At(Bt)).find(function(Qt){return Qt.getAttribute(Ve(Ht))===_t})}function xn(_t){var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Bt=Ot(_t,Ht);if(Bt){var Qt=ot(Ht);Qt.removeChild(Bt)}}function Zn(_t,Ht){var Bt=He.get(_t);if(!Bt||!Vi(document,Bt)){var Qt=an("",Ht),fn=Qt.parentNode;He.set(_t,fn),_t.removeChild(Qt)}}function wi(){He.clear()}function Bn(_t,Ht){var Bt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Qt=ot(Bt),fn=At(Qt),wn=(0,We.Z)((0,We.Z)({},Bt),{},{styles:fn});Zn(Qt,wn);var bn=Ot(Ht,wn);if(bn){var On,ti;if((On=wn.csp)!==null&&On!==void 0&&On.nonce&&bn.nonce!==((ti=wn.csp)===null||ti===void 0?void 0:ti.nonce)){var Jn;bn.nonce=(Jn=wn.csp)===null||Jn===void 0?void 0:Jn.nonce}return bn.innerHTML!==_t&&(bn.innerHTML=_t),bn}var oi=an(_t,wn);return oi.setAttribute(Ve(wn),Ht),oi}var rn;function Fn(_t){var Ht="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),Bt=document.createElement("div");Bt.id=Ht;var Qt=Bt.style;Qt.position="absolute",Qt.left="0",Qt.top="0",Qt.width="100px",Qt.height="100px",Qt.overflow="scroll";var fn,wn;if(_t){var bn=getComputedStyle(_t);Qt.scrollbarColor=bn.scrollbarColor,Qt.scrollbarWidth=bn.scrollbarWidth;var On=getComputedStyle(_t,"::-webkit-scrollbar"),ti=parseInt(On.width,10),Jn=parseInt(On.height,10);try{var oi=ti?"width: ".concat(On.width,";"):"",Wn=Jn?"height: ".concat(On.height,";"):"";Bn(`
|
|
|
#`.concat(Ht,`::-webkit-scrollbar {
|
|
|
`).concat(oi,`
|
|
|
`).concat(Wn,`
|
|
|
}`),Ht)}catch(Ai){console.error(Ai),fn=ti,wn=Jn}}document.body.appendChild(Bt);var ci=_t&&fn&&!isNaN(fn)?fn:Bt.offsetWidth-Bt.clientWidth,ni=_t&&wn&&!isNaN(wn)?wn:Bt.offsetHeight-Bt.clientHeight;return document.body.removeChild(Bt),xn(Ht),{width:ci,height:ni}}function vi(_t){return typeof document=="undefined"?0:((_t||rn===void 0)&&(rn=Fn()),rn.width)}function _i(_t){return typeof document=="undefined"||!_t||!(_t instanceof Element)?{width:0,height:0}:Fn(_t)}var cn=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
|
summary tabIndex target title type useMap value width wmode wrap`,qn=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,Ii="".concat(cn," ").concat(qn).split(/[\s\n]+/),lr="aria-",_r="data-";function Ti(_t,Ht){return _t.indexOf(Ht)===0}function bi(_t){var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Bt;Ht===!1?Bt={aria:!0,data:!0,attr:!0}:Ht===!0?Bt={aria:!0}:Bt=(0,We.Z)({},Ht);var Qt={};return Object.keys(_t).forEach(function(fn){(Bt.aria&&(fn==="role"||Ti(fn,lr))||Bt.data&&Ti(fn,_r)||Bt.attr&&Ii.includes(fn))&&(Qt[fn]=_t[fn])}),Qt}function li(_t,Ht,Bt,Qt,fn,wn,bn){_t.push({record:Ht,indent:Bt,index:bn});var On=wn(Ht),ti=fn==null?void 0:fn.has(On);if(Ht&&Array.isArray(Ht[Qt])&&ti)for(var Jn=0;Jn<Ht[Qt].length;Jn+=1)li(_t,Ht[Qt][Jn],Bt+1,Qt,fn,wn,Jn)}function dr(_t,Ht,Bt,Qt){var fn=me.useMemo(function(){if(Bt!=null&&Bt.size){for(var wn=[],bn=0;bn<(_t==null?void 0:_t.length);bn+=1){var On=_t[bn];li(wn,On,0,Ht,Bt,Qt,bn)}return wn}return _t==null?void 0:_t.map(function(ti,Jn){return{record:ti,indent:0,index:Jn}})},[_t,Ht,Bt,Qt]);return fn}function jr(_t,Ht,Bt,Qt){var fn=we(pe,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),wn=fn.flattenColumns,bn=fn.expandableType,On=fn.expandedKeys,ti=fn.childrenColumnName,Jn=fn.onTriggerExpand,oi=fn.rowExpandable,Wn=fn.onRow,ci=fn.expandRowByClick,ni=fn.rowClassName,Ai=bn==="nest",qi=bn==="row"&&(!oi||oi(_t)),yr=qi||Ai,Mr=On&&On.has(Ht),Fi=ti&&_t&&_t[ti],fr=Dt(Jn),Xi=Wn==null?void 0:Wn(_t,Bt),Ar=Xi==null?void 0:Xi.onClick,oo=function(ki){ci&&yr&&Jn(_t,ki);for(var pi=arguments.length,Qn=new Array(pi>1?pi-1:0),Vn=1;Vn<pi;Vn++)Qn[Vn-1]=arguments[Vn];Ar==null||Ar.apply(void 0,[ki].concat(Qn))},kt;typeof ni=="string"?kt=ni:typeof ni=="function"&&(kt=ni(_t,Bt,Qt));var Wt=dt(wn);return(0,We.Z)((0,We.Z)({},fn),{},{columnsKey:Wt,nestExpandable:Ai,expanded:Mr,hasNestChildren:Fi,record:_t,onTriggerExpand:fr,rowSupportExpand:qi,expandable:yr,rowProps:(0,We.Z)((0,We.Z)({},Xi),{},{className:pt()(kt,Xi==null?void 0:Xi.className),onClick:oo})})}function ei(_t){var Ht=_t.prefixCls,Bt=_t.children,Qt=_t.component,fn=_t.cellComponent,wn=_t.className,bn=_t.expanded,On=_t.colSpan,ti=_t.isEmpty,Jn=we(pe,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),oi=Jn.scrollbarSize,Wn=Jn.fixHeader,ci=Jn.fixColumn,ni=Jn.componentWidth,Ai=Jn.horizonScroll,qi=Bt;return(ti?Ai&&ni:ci)&&(qi=me.createElement("div",{style:{width:ni-(Wn&&!ti?oi:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ht,"-expanded-row-fixed")},qi)),me.createElement(Qt,{className:wn,style:{display:bn?null:"none"}},me.createElement(Qi,{component:fn,prefixCls:Ht,colSpan:On},qi))}var Ui=ei;function ws(_t){var Ht=_t.prefixCls,Bt=_t.record,Qt=_t.onExpand,fn=_t.expanded,wn=_t.expandable,bn="".concat(Ht,"-row-expand-icon");if(!wn)return me.createElement("span",{className:pt()(bn,"".concat(Ht,"-row-spaced"))});var On=function(Jn){Qt(Bt,Jn),Jn.stopPropagation()};return me.createElement("span",{className:pt()(bn,(0,$e.Z)((0,$e.Z)({},"".concat(Ht,"-row-expanded"),fn),"".concat(Ht,"-row-collapsed"),!fn)),onClick:On})}function cs(_t,Ht,Bt){var Qt=[];function fn(wn){(wn||[]).forEach(function(bn,On){Qt.push(Ht(bn,On)),fn(bn[Bt])})}return fn(_t),Qt}function Io(_t,Ht,Bt,Qt){return typeof _t=="string"?_t:typeof _t=="function"?_t(Ht,Bt,Qt):""}function dn(_t,Ht,Bt,Qt,fn){var wn=_t.record,bn=_t.prefixCls,On=_t.columnsKey,ti=_t.fixedInfoList,Jn=_t.expandIconColumnIndex,oi=_t.nestExpandable,Wn=_t.indentSize,ci=_t.expandIcon,ni=_t.expanded,Ai=_t.hasNestChildren,qi=_t.onTriggerExpand,yr=On[Bt],Mr=ti[Bt],Fi;Bt===(Jn||0)&&oi&&(Fi=me.createElement(me.Fragment,null,me.createElement("span",{style:{paddingLeft:"".concat(Wn*Qt,"px")},className:"".concat(bn,"-row-indent indent-level-").concat(Qt)}),ci({prefixCls:bn,expanded:ni,expandable:Ai,record:wn,onExpand:qi})));var fr;return Ht.onCell&&(fr=Ht.onCell(wn,fn)),{key:yr,fixedInfo:Mr,appendCellNode:Fi,additionalCellProps:fr||{}}}function gr(_t){var Ht=_t.className,Bt=_t.style,Qt=_t.record,fn=_t.index,wn=_t.renderIndex,bn=_t.rowKey,On=_t.indent,ti=On===void 0?0:On,Jn=_t.rowComponent,oi=_t.cellComponent,Wn=_t.scopeCellComponent,ci=jr(Qt,bn,fn,ti),ni=ci.prefixCls,Ai=ci.flattenColumns,qi=ci.expandedRowClassName,yr=ci.expandedRowRender,Mr=ci.rowProps,Fi=ci.expanded,fr=ci.rowSupportExpand,Xi=me.useRef(!1);Xi.current||(Xi.current=Fi);var Ar=Io(qi,Qt,fn,ti),oo=me.createElement(Jn,(0,ge.Z)({},Mr,{"data-row-key":bn,className:pt()(Ht,"".concat(ni,"-row"),"".concat(ni,"-row-level-").concat(ti),Mr==null?void 0:Mr.className,(0,$e.Z)({},Ar,ti>=1)),style:(0,We.Z)((0,We.Z)({},Bt),Mr==null?void 0:Mr.style)}),Ai.map(function(qt,ki){var pi=qt.render,Qn=qt.dataIndex,Vn=qt.className,Hn=dn(ci,qt,ki,ti,fn),En=Hn.key,ri=Hn.fixedInfo,Yi=Hn.appendCellNode,Oi=Hn.additionalCellProps;return me.createElement(Qi,(0,ge.Z)({className:Vn,ellipsis:qt.ellipsis,align:qt.align,scope:qt.rowScope,component:qt.rowScope?Wn:oi,prefixCls:ni,key:En,record:Qt,index:fn,renderIndex:wn,dataIndex:Qn,render:pi,shouldCellUpdate:qt.shouldCellUpdate},ri,{appendNode:Yi,additionalProps:Oi}))})),kt;if(fr&&(Xi.current||Fi)){var Wt=yr(Qt,fn,ti+1,Fi);kt=me.createElement(Ui,{expanded:Fi,className:pt()("".concat(ni,"-expanded-row"),"".concat(ni,"-expanded-row-level-").concat(ti+1),Ar),prefixCls:ni,component:Jn,cellComponent:oi,colSpan:Ai.length,isEmpty:!1},Wt)}return me.createElement(me.Fragment,null,oo,kt)}var Zr=se(gr);function $i(_t){var Ht=_t.columnKey,Bt=_t.onColumnResize,Qt=me.useRef();return me.useEffect(function(){Qt.current&&Bt(Ht,Qt.current.offsetWidth)},[]),me.createElement(qe.Z,{data:Ht},me.createElement("td",{ref:Qt,style:{padding:0,border:0,height:0}},me.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function yo(_t){var Ht=_t.prefixCls,Bt=_t.columnsKey,Qt=_t.onColumnResize;return me.createElement("tr",{"aria-hidden":"true",className:"".concat(Ht,"-measure-row"),style:{height:0,fontSize:0}},me.createElement(qe.Z.Collection,{onBatchResize:function(wn){wn.forEach(function(bn){var On=bn.data,ti=bn.size;Qt(On,ti.offsetWidth)})}},Bt.map(function(fn){return me.createElement($i,{key:fn,columnKey:fn,onColumnResize:Qt})})))}function Rr(_t){var Ht=_t.data,Bt=_t.measureColumnWidth,Qt=we(pe,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),fn=Qt.prefixCls,wn=Qt.getComponent,bn=Qt.onColumnResize,On=Qt.flattenColumns,ti=Qt.getRowKey,Jn=Qt.expandedKeys,oi=Qt.childrenColumnName,Wn=Qt.emptyNode,ci=dr(Ht,oi,Jn,ti),ni=me.useRef({renderWithProps:!1}),Ai=wn(["body","wrapper"],"tbody"),qi=wn(["body","row"],"tr"),yr=wn(["body","cell"],"td"),Mr=wn(["body","cell"],"th"),Fi;Ht.length?Fi=ci.map(function(Xi,Ar){var oo=Xi.record,kt=Xi.indent,Wt=Xi.index,qt=ti(oo,Ar);return me.createElement(Zr,{key:qt,rowKey:qt,record:oo,index:Ar,renderIndex:Wt,rowComponent:qi,cellComponent:yr,scopeCellComponent:Mr,indent:kt})}):Fi=me.createElement(Ui,{expanded:!0,className:"".concat(fn,"-placeholder"),prefixCls:fn,component:qi,cellComponent:yr,colSpan:On.length,isEmpty:!0},Wn);var fr=dt(On);return me.createElement(st.Provider,{value:ni.current},me.createElement(Ai,{className:"".concat(fn,"-tbody")},Bt&&me.createElement(yo,{prefixCls:fn,columnsKey:fr,onColumnResize:bn}),Fi))}var uo=se(Rr),to=De(62978),Yr=["columnType"];function Fo(_t){for(var Ht=_t.colWidths,Bt=_t.columns,Qt=_t.columCount,fn=we(pe,["tableLayout"]),wn=fn.tableLayout,bn=[],On=Qt||Bt.length,ti=!1,Jn=On-1;Jn>=0;Jn-=1){var oi=Ht[Jn],Wn=Bt&&Bt[Jn],ci=void 0,ni=void 0;if(Wn&&(ci=Wn[to.v],wn==="auto"&&(ni=Wn.minWidth)),oi||ni||ci||ti){var Ai=ci||{},qi=Ai.columnType,yr=(0,vo.Z)(Ai,Yr);bn.unshift(me.createElement("col",(0,ge.Z)({key:Jn,style:{width:oi,minWidth:ni}},yr))),ti=!0}}return me.createElement("colgroup",null,bn)}var zn=Fo,ns=De(74902),Ut=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function en(_t,Ht){return(0,me.useMemo)(function(){for(var Bt=[],Qt=0;Qt<Ht;Qt+=1){var fn=_t[Qt];if(fn!==void 0)Bt[Qt]=fn;else return null}return Bt},[_t.join("_"),Ht])}var jn=me.forwardRef(function(_t,Ht){var Bt=_t.className,Qt=_t.noData,fn=_t.columns,wn=_t.flattenColumns,bn=_t.colWidths,On=_t.columCount,ti=_t.stickyOffsets,Jn=_t.direction,oi=_t.fixHeader,Wn=_t.stickyTopOffset,ci=_t.stickyBottomOffset,ni=_t.stickyClassName,Ai=_t.onScroll,qi=_t.maxContentScroll,yr=_t.children,Mr=(0,vo.Z)(_t,Ut),Fi=we(pe,["prefixCls","scrollbarSize","isSticky","getComponent"]),fr=Fi.prefixCls,Xi=Fi.scrollbarSize,Ar=Fi.isSticky,oo=Fi.getComponent,kt=oo(["header","table"],"table"),Wt=Ar&&!oi?0:Xi,qt=me.useRef(null),ki=me.useCallback(function(Oi){Ue(Ht,Oi),Ue(qt,Oi)},[]);me.useEffect(function(){var Oi;function er(Hi){var sr=Hi,tr=sr.currentTarget,so=sr.deltaX;so&&(Ai({currentTarget:tr,scrollLeft:tr.scrollLeft+so}),Hi.preventDefault())}return(Oi=qt.current)===null||Oi===void 0||Oi.addEventListener("wheel",er,{passive:!1}),function(){var Hi;(Hi=qt.current)===null||Hi===void 0||Hi.removeEventListener("wheel",er)}},[]);var pi=me.useMemo(function(){return wn.every(function(Oi){return Oi.width})},[wn]),Qn=wn[wn.length-1],Vn={fixed:Qn?Qn.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(fr,"-cell-scrollbar")}}},Hn=(0,me.useMemo)(function(){return Wt?[].concat((0,ns.Z)(fn),[Vn]):fn},[Wt,fn]),En=(0,me.useMemo)(function(){return Wt?[].concat((0,ns.Z)(wn),[Vn]):wn},[Wt,wn]),ri=(0,me.useMemo)(function(){var Oi=ti.right,er=ti.left;return(0,We.Z)((0,We.Z)({},ti),{},{left:Jn==="rtl"?[].concat((0,ns.Z)(er.map(function(Hi){return Hi+Wt})),[0]):er,right:Jn==="rtl"?Oi:[].concat((0,ns.Z)(Oi.map(function(Hi){return Hi+Wt})),[0]),isSticky:Ar})},[Wt,ti,Ar]),Yi=en(bn,On);return me.createElement("div",{style:(0,We.Z)({overflow:"hidden"},Ar?{top:Wn,bottom:ci}:{}),ref:ki,className:pt()(Bt,(0,$e.Z)({},ni,!!ni))},me.createElement(kt,{style:{tableLayout:"fixed",visibility:Qt||Yi?null:"hidden"}},(!Qt||!qi||pi)&&me.createElement(zn,{colWidths:Yi?[].concat((0,ns.Z)(Yi),[Wt]):[],columCount:On+1,columns:En}),yr((0,We.Z)((0,We.Z)({},Mr),{},{stickyOffsets:ri,columns:Hn,flattenColumns:En}))))}),Ft=me.memo(jn),Yt=function(Ht){var Bt=Ht.cells,Qt=Ht.stickyOffsets,fn=Ht.flattenColumns,wn=Ht.rowComponent,bn=Ht.cellComponent,On=Ht.onHeaderRow,ti=Ht.index,Jn=we(pe,["prefixCls","direction"]),oi=Jn.prefixCls,Wn=Jn.direction,ci;On&&(ci=On(Bt.map(function(Ai){return Ai.column}),ti));var ni=dt(Bt.map(function(Ai){return Ai.column}));return me.createElement(wn,ci,Bt.map(function(Ai,qi){var yr=Ai.column,Mr=vr(Ai.colStart,Ai.colEnd,fn,Qt,Wn),Fi;return yr&&yr.onHeaderCell&&(Fi=Ai.column.onHeaderCell(yr)),me.createElement(Qi,(0,ge.Z)({},Ai,{scope:yr.title?Ai.colSpan>1?"colgroup":"col":null,ellipsis:yr.ellipsis,align:yr.align,component:bn,prefixCls:oi,key:ni[qi]},Mr,{additionalProps:Fi,rowType:"header"}))}))},nn=Yt;function yn(_t){var Ht=[];function Bt(bn,On){var ti=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ht[ti]=Ht[ti]||[];var Jn=On,oi=bn.filter(Boolean).map(function(Wn){var ci={key:Wn.key,className:Wn.className||"",children:Wn.title,column:Wn,colStart:Jn},ni=1,Ai=Wn.children;return Ai&&Ai.length>0&&(ni=Bt(Ai,Jn,ti+1).reduce(function(qi,yr){return qi+yr},0),ci.hasSubColumns=!0),"colSpan"in Wn&&(ni=Wn.colSpan),"rowSpan"in Wn&&(ci.rowSpan=Wn.rowSpan),ci.colSpan=ni,ci.colEnd=ci.colStart+ni-1,Ht[ti].push(ci),Jn+=ni,ni});return oi}Bt(_t,0);for(var Qt=Ht.length,fn=function(On){Ht[On].forEach(function(ti){!("rowSpan"in ti)&&!ti.hasSubColumns&&(ti.rowSpan=Qt-On)})},wn=0;wn<Qt;wn+=1)fn(wn);return Ht}var Xn=function(Ht){var Bt=Ht.stickyOffsets,Qt=Ht.columns,fn=Ht.flattenColumns,wn=Ht.onHeaderRow,bn=we(pe,["prefixCls","getComponent"]),On=bn.prefixCls,ti=bn.getComponent,Jn=me.useMemo(function(){return yn(Qt)},[Qt]),oi=ti(["header","wrapper"],"thead"),Wn=ti(["header","row"],"tr"),ci=ti(["header","cell"],"th");return me.createElement(oi,{className:"".concat(On,"-thead")},Jn.map(function(ni,Ai){var qi=me.createElement(nn,{key:Ai,flattenColumns:fn,cells:ni,stickyOffsets:Bt,rowComponent:Wn,cellComponent:ci,onHeaderRow:wn,index:Ai});return qi}))},yi=se(Xn),gi=De(54768);function Dn(_t,Ht,Bt){var Qt=(0,to.g)(_t),fn=Qt.expandIcon,wn=Qt.expandedRowKeys,bn=Qt.defaultExpandedRowKeys,On=Qt.defaultExpandAllRows,ti=Qt.expandedRowRender,Jn=Qt.onExpand,oi=Qt.onExpandedRowsChange,Wn=Qt.childrenColumnName,ci=fn||ws,ni=Wn||"children",Ai=me.useMemo(function(){return ti?"row":_t.expandable&&_t.internalHooks===Le.R&&_t.expandable.__PARENT_RENDER_ICON__||Ht.some(function(Ar){return Ar&&(0,Re.Z)(Ar)==="object"&&Ar[ni]})?"nest":!1},[!!ti,Ht]),qi=me.useState(function(){return bn||(On?cs(Ht,Bt,ni):[])}),yr=(0,ye.Z)(qi,2),Mr=yr[0],Fi=yr[1],fr=me.useMemo(function(){return new Set(wn||Mr||[])},[wn,Mr]),Xi=me.useCallback(function(Ar){var oo=Bt(Ar,Ht.indexOf(Ar)),kt,Wt=fr.has(oo);Wt?(fr.delete(oo),kt=(0,ns.Z)(fr)):kt=[].concat((0,ns.Z)(fr),[oo]),Fi(kt),Jn&&Jn(!Wt,Ar),oi&&oi(kt)},[Bt,fr,Ht,Jn,oi]);return[Qt,Ai,fr,ci,ni,Xi]}function vt(_t,Ht,Bt){var Qt=_t.map(function(fn,wn){return vr(wn,wn,_t,Ht,Bt)});return St(function(){return Qt},[Qt],function(fn,wn){return!wt(fn,wn)})}function Sr(_t){var Ht=(0,me.useRef)(_t),Bt=(0,me.useState)({}),Qt=(0,ye.Z)(Bt,2),fn=Qt[1],wn=(0,me.useRef)(null),bn=(0,me.useRef)([]);function On(ti){bn.current.push(ti);var Jn=Promise.resolve();wn.current=Jn,Jn.then(function(){if(wn.current===Jn){var oi=bn.current,Wn=Ht.current;bn.current=[],oi.forEach(function(ci){Ht.current=ci(Ht.current)}),wn.current=null,Wn!==Ht.current&&fn({})}})}return(0,me.useEffect)(function(){return function(){wn.current=null}},[]),[Ht.current,On]}function Er(_t){var Ht=(0,me.useRef)(_t||null),Bt=(0,me.useRef)();function Qt(){window.clearTimeout(Bt.current)}function fn(bn){Ht.current=bn,Qt(),Bt.current=window.setTimeout(function(){Ht.current=null,Bt.current=void 0},100)}function wn(){return Ht.current}return(0,me.useEffect)(function(){return Qt},[]),[fn,wn]}function no(){var _t=me.useState(-1),Ht=(0,ye.Z)(_t,2),Bt=Ht[0],Qt=Ht[1],fn=me.useState(-1),wn=(0,ye.Z)(fn,2),bn=wn[0],On=wn[1],ti=me.useCallback(function(Jn,oi){Qt(Jn),On(oi)},[]);return[Bt,bn,ti]}var io=on()?window:null;function ro(_t,Ht){var Bt=(0,Re.Z)(_t)==="object"?_t:{},Qt=Bt.offsetHeader,fn=Qt===void 0?0:Qt,wn=Bt.offsetSummary,bn=wn===void 0?0:wn,On=Bt.offsetScroll,ti=On===void 0?0:On,Jn=Bt.getContainer,oi=Jn===void 0?function(){return io}:Jn,Wn=oi()||io,ci=!!_t;return me.useMemo(function(){return{isSticky:ci,stickyClassName:ci?"".concat(Ht,"-sticky-holder"):"",offsetHeader:fn,offsetSummary:bn,offsetScroll:ti,container:Wn}},[ci,ti,fn,bn,Ht,Wn])}function zr(_t,Ht,Bt){var Qt=(0,me.useMemo)(function(){var fn=Ht.length,wn=function(Jn,oi,Wn){for(var ci=[],ni=0,Ai=Jn;Ai!==oi;Ai+=Wn)ci.push(ni),Ht[Ai].fixed&&(ni+=_t[Ai]||0);return ci},bn=wn(0,fn,1),On=wn(fn-1,-1,-1).reverse();return Bt==="rtl"?{left:On,right:bn}:{left:bn,right:On}},[_t,Ht,Bt]);return Qt}var Go=zr;function co(_t){var Ht=_t.className,Bt=_t.children;return me.createElement("div",{className:Ht},Bt)}var br=co;function ir(_t,Ht,Bt,Qt){var fn=be.unstable_batchedUpdates?function(bn){be.unstable_batchedUpdates(Bt,bn)}:Bt;return _t!=null&&_t.addEventListener&&_t.addEventListener(Ht,fn,Qt),{remove:function(){_t!=null&&_t.removeEventListener&&_t.removeEventListener(Ht,fn,Qt)}}}var Pi=function(Ht){return+setTimeout(Ht,16)},ui=function(Ht){return clearTimeout(Ht)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Pi=function(Ht){return window.requestAnimationFrame(Ht)},ui=function(Ht){return window.cancelAnimationFrame(Ht)});var Di=0,Sn=new Map;function ji(_t){Sn.delete(_t)}var Wi=function(Ht){var Bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Di+=1;var Qt=Di;function fn(wn){if(wn===0)ji(Qt),Ht();else{var bn=Pi(function(){fn(wn-1)});Sn.set(Qt,bn)}}return fn(Bt),Qt};Wi.cancel=function(_t){var Ht=Sn.get(_t);return ji(_t),ui(Ht)};var Ur=Wi;function Xr(_t){return _t instanceof HTMLElement||_t instanceof SVGElement}function Jr(_t){return _t&&(0,Re.Z)(_t)==="object"&&Xr(_t.nativeElement)?_t.nativeElement:Xr(_t)?_t:null}function xo(_t){var Ht=Jr(_t);if(Ht)return Ht;if(_t instanceof React.Component){var Bt;return(Bt=ReactDOM.findDOMNode)===null||Bt===void 0?void 0:Bt.call(ReactDOM,_t)}return null}function Qo(_t){var Ht=Jr(_t),Bt=Ht.getBoundingClientRect(),Qt=document.documentElement;return{left:Bt.left+(window.pageXOffset||Qt.scrollLeft)-(Qt.clientLeft||document.body.clientLeft||0),top:Bt.top+(window.pageYOffset||Qt.scrollTop)-(Qt.clientTop||document.body.clientTop||0)}}var Wo=function(Ht,Bt){var Qt,fn,wn=Ht.scrollBodyRef,bn=Ht.onScroll,On=Ht.offsetScroll,ti=Ht.container,Jn=Ht.direction,oi=we(pe,"prefixCls"),Wn=((Qt=wn.current)===null||Qt===void 0?void 0:Qt.scrollWidth)||0,ci=((fn=wn.current)===null||fn===void 0?void 0:fn.clientWidth)||0,ni=Wn&&ci*(ci/Wn),Ai=me.useRef(),qi=Sr({scrollLeft:0,isHiddenScrollBar:!0}),yr=(0,ye.Z)(qi,2),Mr=yr[0],Fi=yr[1],fr=me.useRef({delta:0,x:0}),Xi=me.useState(!1),Ar=(0,ye.Z)(Xi,2),oo=Ar[0],kt=Ar[1],Wt=me.useRef(null);me.useEffect(function(){return function(){Ur.cancel(Wt.current)}},[]);var qt=function(){kt(!1)},ki=function(En){En.persist(),fr.current.delta=En.pageX-Mr.scrollLeft,fr.current.x=0,kt(!0),En.preventDefault()},pi=function(En){var ri,Yi=En||((ri=window)===null||ri===void 0?void 0:ri.event),Oi=Yi.buttons;if(!oo||Oi===0){oo&&kt(!1);return}var er=fr.current.x+En.pageX-fr.current.x-fr.current.delta,Hi=Jn==="rtl";er=Math.max(Hi?ni-ci:0,Math.min(Hi?0:ci-ni,er));var sr=!Hi||Math.abs(er)+Math.abs(ni)<ci;sr&&(bn({scrollLeft:er/ci*(Wn+2)}),fr.current.x=En.pageX)},Qn=function(){Ur.cancel(Wt.current),Wt.current=Ur(function(){if(wn.current){var En=Qo(wn.current).top,ri=En+wn.current.offsetHeight,Yi=ti===window?document.documentElement.scrollTop+window.innerHeight:Qo(ti).top+ti.clientHeight;ri-vi()<=Yi||En>=Yi-On?Fi(function(Oi){return(0,We.Z)((0,We.Z)({},Oi),{},{isHiddenScrollBar:!0})}):Fi(function(Oi){return(0,We.Z)((0,We.Z)({},Oi),{},{isHiddenScrollBar:!1})})}})},Vn=function(En){Fi(function(ri){return(0,We.Z)((0,We.Z)({},ri),{},{scrollLeft:En/Wn*ci||0})})};return me.useImperativeHandle(Bt,function(){return{setScrollLeft:Vn,checkScrollBarVisible:Qn}}),me.useEffect(function(){var Hn=ir(document.body,"mouseup",qt,!1),En=ir(document.body,"mousemove",pi,!1);return Qn(),function(){Hn.remove(),En.remove()}},[ni,oo]),me.useEffect(function(){if(wn.current){for(var Hn=[],En=Jr(wn.current);En;)Hn.push(En),En=En.parentElement;return Hn.forEach(function(ri){return ri.addEventListener("scroll",Qn,!1)}),window.addEventListener("resize",Qn,!1),window.addEventListener("scroll",Qn,!1),ti.addEventListener("scroll",Qn,!1),function(){Hn.forEach(function(ri){return ri.removeEventListener("scroll",Qn)}),window.removeEventListener("resize",Qn),window.removeEventListener("scroll",Qn),ti.removeEventListener("scroll",Qn)}}},[ti]),me.useEffect(function(){Mr.isHiddenScrollBar||Fi(function(Hn){var En=wn.current;return En?(0,We.Z)((0,We.Z)({},Hn),{},{scrollLeft:En.scrollLeft/En.scrollWidth*En.clientWidth}):Hn})},[Mr.isHiddenScrollBar]),Wn<=ci||!ni||Mr.isHiddenScrollBar?null:me.createElement("div",{style:{height:vi(),width:ci,bottom:On},className:"".concat(oi,"-sticky-scroll")},me.createElement("div",{onMouseDown:ki,ref:Ai,className:pt()("".concat(oi,"-sticky-scroll-bar"),(0,$e.Z)({},"".concat(oi,"-sticky-scroll-bar-active"),oo)),style:{width:"".concat(ni,"px"),transform:"translate3d(".concat(Mr.scrollLeft,"px, 0, 0)")}}))},_s=me.forwardRef(Wo);function As(_t){return null}var pn=As;function ss(_t){return null}var ps=ss,Ts="rc-table",mo=[],Ns={};function Ss(){return"No Data"}function Us(_t,Ht){var Bt=(0,We.Z)({rowKey:"key",prefixCls:Ts,emptyText:Ss},_t),Qt=Bt.prefixCls,fn=Bt.className,wn=Bt.rowClassName,bn=Bt.style,On=Bt.data,ti=Bt.rowKey,Jn=Bt.scroll,oi=Bt.tableLayout,Wn=Bt.direction,ci=Bt.title,ni=Bt.footer,Ai=Bt.summary,qi=Bt.caption,yr=Bt.id,Mr=Bt.showHeader,Fi=Bt.components,fr=Bt.emptyText,Xi=Bt.onRow,Ar=Bt.onHeaderRow,oo=Bt.onScroll,kt=Bt.internalHooks,Wt=Bt.transformColumns,qt=Bt.internalRefs,ki=Bt.tailor,pi=Bt.getContainerWidth,Qn=Bt.sticky,Vn=Bt.rowHoverable,Hn=Vn===void 0?!0:Vn,En=On||mo,ri=!!En.length,Yi=kt===Le.R,Oi=me.useCallback(function(fs,Yo){return ft(Fi,fs)||Yo},[Fi]),er=me.useMemo(function(){return typeof ti=="function"?ti:function(fs){var Yo=fs&&fs[ti];return Yo}},[ti]),Hi=Oi(["body"]),sr=no(),tr=(0,ye.Z)(sr,3),so=tr[0],Or=tr[1],So=tr[2],To=Dn(Bt,En,er),nr=(0,ye.Z)(To,6),Tr=nr[0],Mi=nr[1],Vr=nr[2],Lr=nr[3],hr=nr[4],wo=nr[5],rr=Jn==null?void 0:Jn.x,$o=me.useState(0),ko=(0,ye.Z)($o,2),Ao=ko[0],eo=ko[1],Bo=(0,gi.Z)((0,We.Z)((0,We.Z)((0,We.Z)({},Bt),Tr),{},{expandable:!!Tr.expandedRowRender,columnTitle:Tr.columnTitle,expandedKeys:Vr,getRowKey:er,onTriggerExpand:wo,expandIcon:Lr,expandIconColumnIndex:Tr.expandIconColumnIndex,direction:Wn,scrollWidth:Yi&&ki&&typeof rr=="number"?rr:null,clientWidth:Ao}),Yi?Wt:null),Ri=(0,ye.Z)(Bo,4),$s=Ri[0],_o=Ri[1],Rs=Ri[2],ua=Ri[3],Cs=Rs!=null?Rs:rr,_l=me.useMemo(function(){return{columns:$s,flattenColumns:_o}},[$s,_o]),ho=me.useRef(),Uo=me.useRef(),es=me.useRef(),Na=me.useRef();me.useImperativeHandle(Ht,function(){return{nativeElement:ho.current,scrollTo:function(Yo){var Oa;if(es.current instanceof HTMLElement){var iu=Yo.index,ul=Yo.top,ku=Yo.key;if(yt(ul)){var ja;(ja=es.current)===null||ja===void 0||ja.scrollTo({top:ul})}else{var Sh,aa=ku!=null?ku:er(En[iu]);(Sh=es.current.querySelector('[data-row-key="'.concat(aa,'"]')))===null||Sh===void 0||Sh.scrollIntoView()}}else(Oa=es.current)!==null&&Oa!==void 0&&Oa.scrollTo&&es.current.scrollTo(Yo)}}});var ha=me.useRef(),du=me.useState(!1),bl=(0,ye.Z)(du,2),Vs=bl[0],ca=bl[1],Eu=me.useState(!1),Da=(0,ye.Z)(Eu,2),Wl=Da[0],Eo=Da[1],Ms=Sr(new Map),Pa=(0,ye.Z)(Ms,2),$a=Pa[0],ea=Pa[1],Ha=dt(_o),Ga=Ha.map(function(fs){return $a.get(fs)}),nu=me.useMemo(function(){return Ga},[Ga.join("_")]),Kl=Go(nu,_o,Wn),ys=Jn&&bt(Jn.y),Wa=Jn&&bt(Cs)||!!Tr.fixed,ll=Wa&&_o.some(function(fs){var Yo=fs.fixed;return Yo}),fu=me.useRef(),Vl=ro(Qn,Qt),el=Vl.isSticky,ic=Vl.offsetHeader,rc=Vl.offsetSummary,va=Vl.offsetScroll,oc=Vl.stickyClassName,Uu=Vl.container,Fa=me.useMemo(function(){return Ai==null?void 0:Ai(En)},[Ai,En]),Lu=(ys||el)&&me.isValidElement(Fa)&&Fa.type===Cr&&Fa.props.fixed,Rh,Mu,Lc;ys&&(Mu={overflowY:ri?"scroll":"auto",maxHeight:Jn.y}),Wa&&(Rh={overflowX:"auto"},ys||(Mu={overflowY:"hidden"}),Lc={width:Cs===!0?"auto":Cs,minWidth:"100%"});var th=me.useCallback(function(fs,Yo){Tn(ho.current)&&ea(function(Oa){if(Oa.get(fs)!==Yo){var iu=new Map(Oa);return iu.set(fs,Yo),iu}return Oa})},[]),Zl=Er(null),vh=(0,ye.Z)(Zl,2),Mc=vh[0],bo=vh[1];function ao(fs,Yo){Yo&&(typeof Yo=="function"?Yo(fs):Yo.scrollLeft!==fs&&(Yo.scrollLeft=fs,Yo.scrollLeft!==fs&&setTimeout(function(){Yo.scrollLeft=fs},0)))}var Qr=Dt(function(fs){var Yo=fs.currentTarget,Oa=fs.scrollLeft,iu=Wn==="rtl",ul=typeof Oa=="number"?Oa:Yo.scrollLeft,ku=Yo||Ns;if(!bo()||bo()===ku){var ja;Mc(ku),ao(ul,Uo.current),ao(ul,es.current),ao(ul,ha.current),ao(ul,(ja=fu.current)===null||ja===void 0?void 0:ja.setScrollLeft)}var Sh=Yo||Uo.current;if(Sh){var aa=Yi&&ki&&typeof Cs=="number"?Cs:Sh.scrollWidth,hc=Sh.clientWidth;if(aa===hc){ca(!1),Eo(!1);return}iu?(ca(-ul<aa-hc),Eo(-ul>0)):(ca(ul>0),Eo(ul<aa-hc))}}),Is=Dt(function(fs){Qr(fs),oo==null||oo(fs)}),Ba=function(){if(Wa&&es.current){var Yo;Qr({currentTarget:Jr(es.current),scrollLeft:(Yo=es.current)===null||Yo===void 0?void 0:Yo.scrollLeft})}else ca(!1),Eo(!1)},yh=function(Yo){var Oa,iu=Yo.width;(Oa=fu.current)===null||Oa===void 0||Oa.checkScrollBarVisible();var ul=ho.current?ho.current.offsetWidth:iu;Yi&&pi&&ho.current&&(ul=pi(ho.current,ul)||ul),ul!==Ao&&(Ba(),eo(ul))},Hu=me.useRef(!1);me.useEffect(function(){Hu.current&&Ba()},[Wa,On,$s.length]),me.useEffect(function(){Hu.current=!0},[]);var ln=me.useState(0),nh=(0,ye.Z)(ln,2),Ol=nh[0],sc=nh[1],pf=me.useState(!0),gf=(0,ye.Z)(pf,2),Rd=gf[0],Wp=gf[1];me.useEffect(function(){(!ki||!Yi)&&(es.current instanceof Element?sc(_i(es.current).width):sc(_i(Na.current).width)),Wp(Gi("position","sticky"))},[]),me.useEffect(function(){Yi&&qt&&(qt.body.current=es.current)});var tl=me.useCallback(function(fs){return me.createElement(me.Fragment,null,me.createElement(yi,fs),Lu==="top"&&me.createElement(or,fs,Fa))},[Lu,Fa]),id=me.useCallback(function(fs){return me.createElement(or,fs,Fa)},[Fa]),Id=Oi(["table"],"table"),rd=me.useMemo(function(){return oi||(ll?Cs==="max-content"?"auto":"fixed":ys||el||_o.some(function(fs){var Yo=fs.ellipsis;return Yo})?"fixed":"auto")},[ys,ll,_o,oi,el]),Fd,Bd={colWidths:nu,columCount:_o.length,stickyOffsets:Kl,onHeaderRow:Ar,fixHeader:ys,scroll:Jn},mf=me.useMemo(function(){return ri?null:typeof fr=="function"?fr():fr},[ri,fr]),jd=me.createElement(uo,{data:En,measureColumnWidth:ys||Wa||el}),Yl=me.createElement(zn,{colWidths:_o.map(function(fs){var Yo=fs.width;return Yo}),columns:_o}),ac=qi!=null?me.createElement("caption",{className:"".concat(Qt,"-caption")},qi):void 0,vf=bi(Bt,{data:!0}),Gu=bi(Bt,{aria:!0});if(ys||el){var lc;typeof Hi=="function"?(lc=Hi(En,{scrollbarSize:Ol,ref:es,onScroll:Qr}),Bd.colWidths=_o.map(function(fs,Yo){var Oa=fs.width,iu=Yo===_o.length-1?Oa-Ol:Oa;return typeof iu=="number"&&!Number.isNaN(iu)?iu:0})):lc=me.createElement("div",{style:(0,We.Z)((0,We.Z)({},Rh),Mu),onScroll:Is,ref:es,className:pt()("".concat(Qt,"-body"))},me.createElement(Id,(0,ge.Z)({style:(0,We.Z)((0,We.Z)({},Lc),{},{tableLayout:rd})},Gu),ac,Yl,jd,!Lu&&Fa&&me.createElement(or,{stickyOffsets:Kl,flattenColumns:_o},Fa)));var od=(0,We.Z)((0,We.Z)((0,We.Z)({noData:!En.length,maxContentScroll:Wa&&Cs==="max-content"},Bd),_l),{},{direction:Wn,stickyClassName:oc,onScroll:Qr});Fd=me.createElement(me.Fragment,null,Mr!==!1&&me.createElement(Ft,(0,ge.Z)({},od,{stickyTopOffset:ic,className:"".concat(Qt,"-header"),ref:Uo}),tl),lc,Lu&&Lu!=="top"&&me.createElement(Ft,(0,ge.Z)({},od,{stickyBottomOffset:rc,className:"".concat(Qt,"-summary"),ref:ha}),id),el&&es.current&&es.current instanceof Element&&me.createElement(_s,{ref:fu,offsetScroll:va,scrollBodyRef:es,onScroll:Qr,container:Uu,direction:Wn}))}else Fd=me.createElement("div",{style:(0,We.Z)((0,We.Z)({},Rh),Mu),className:pt()("".concat(Qt,"-content")),onScroll:Qr,ref:es},me.createElement(Id,(0,ge.Z)({style:(0,We.Z)((0,We.Z)({},Lc),{},{tableLayout:rd})},Gu),ac,Yl,Mr!==!1&&me.createElement(yi,(0,ge.Z)({},Bd,_l)),jd,Fa&&me.createElement(or,{stickyOffsets:Kl,flattenColumns:_o},Fa)));var uc=me.createElement("div",(0,ge.Z)({className:pt()(Qt,fn,(0,$e.Z)((0,$e.Z)((0,$e.Z)((0,$e.Z)((0,$e.Z)((0,$e.Z)((0,$e.Z)((0,$e.Z)((0,$e.Z)((0,$e.Z)({},"".concat(Qt,"-rtl"),Wn==="rtl"),"".concat(Qt,"-ping-left"),Vs),"".concat(Qt,"-ping-right"),Wl),"".concat(Qt,"-layout-fixed"),oi==="fixed"),"".concat(Qt,"-fixed-header"),ys),"".concat(Qt,"-fixed-column"),ll),"".concat(Qt,"-fixed-column-gapped"),ll&&ua),"".concat(Qt,"-scroll-horizontal"),Wa),"".concat(Qt,"-has-fix-left"),_o[0]&&_o[0].fixed),"".concat(Qt,"-has-fix-right"),_o[_o.length-1]&&_o[_o.length-1].fixed==="right")),style:bn,id:yr,ref:ho},vf),ci&&me.createElement(br,{className:"".concat(Qt,"-title")},ci(En)),me.createElement("div",{ref:Na,className:"".concat(Qt,"-container")},Fd),ni&&me.createElement(br,{className:"".concat(Qt,"-footer")},ni(En)));Wa&&(uc=me.createElement(qe.Z,{onResize:yh},uc));var Rl=vt(_o,Kl,Wn),yf=me.useMemo(function(){return{scrollX:Cs,prefixCls:Qt,getComponent:Oi,scrollbarSize:Ol,direction:Wn,fixedInfoList:Rl,isSticky:el,supportSticky:Rd,componentWidth:Ao,fixHeader:ys,fixColumn:ll,horizonScroll:Wa,tableLayout:rd,rowClassName:wn,expandedRowClassName:Tr.expandedRowClassName,expandIcon:Lr,expandableType:Mi,expandRowByClick:Tr.expandRowByClick,expandedRowRender:Tr.expandedRowRender,onTriggerExpand:wo,expandIconColumnIndex:Tr.expandIconColumnIndex,indentSize:Tr.indentSize,allColumnsFixedLeft:_o.every(function(fs){return fs.fixed==="left"}),emptyNode:mf,columns:$s,flattenColumns:_o,onColumnResize:th,hoverStartRow:so,hoverEndRow:Or,onHover:So,rowExpandable:Tr.rowExpandable,onRow:Xi,getRowKey:er,expandedKeys:Vr,childrenColumnName:hr,rowHoverable:Hn}},[Cs,Qt,Oi,Ol,Wn,Rl,el,Rd,Ao,ys,ll,Wa,rd,wn,Tr.expandedRowClassName,Lr,Mi,Tr.expandRowByClick,Tr.expandedRowRender,wo,Tr.expandIconColumnIndex,Tr.indentSize,mf,$s,_o,th,so,Or,So,Tr.rowExpandable,Xi,er,Vr,hr,Hn]);return me.createElement(pe.Provider,{value:yf},uc)}var fo=me.forwardRef(Us);function Co(_t){return ie(fo,_t)}var pr=Co();pr.EXPAND_COLUMN=Le.w,pr.INTERNAL_HOOKS=Le.R,pr.Column=pn,pr.ColumnGroup=ps,pr.Summary=kn;var Gr=pr;function po(_t){var Ht=me.useRef();Ht.current=_t;var Bt=me.useCallback(function(){for(var Qt,fn=arguments.length,wn=new Array(fn),bn=0;bn<fn;bn++)wn[bn]=arguments[bn];return(Qt=Ht.current)===null||Qt===void 0?void 0:Qt.call.apply(Qt,[Ht].concat(wn))},[]);return Bt}function Ro(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Ei=Ro()?me.useLayoutEffect:me.useEffect,ms=function(Ht,Bt){var Qt=me.useRef(!0);Ei(function(){return Ht(Qt.current)},Bt),Ei(function(){return Qt.current=!1,function(){Qt.current=!0}},[])},hs=function(Ht,Bt){ms(function(Qt){if(!Qt)return Ht()},Bt)},ds=ms;function ia(_t){var Ht=React.useRef(!1),Bt=React.useState(_t),Qt=_slicedToArray(Bt,2),fn=Qt[0],wn=Qt[1];React.useEffect(function(){return Ht.current=!1,function(){Ht.current=!0}},[]);function bn(On,ti){ti&&Ht.current||wn(On)}return[fn,bn]}function ra(_t){return _t!==void 0}function di(_t,Ht){var Bt=Ht||{},Qt=Bt.defaultValue,fn=Bt.value,wn=Bt.onChange,bn=Bt.postState,On=useState(function(){return ra(fn)?fn:ra(Qt)?typeof Qt=="function"?Qt():Qt:typeof _t=="function"?_t():_t}),ti=_slicedToArray(On,2),Jn=ti[0],oi=ti[1],Wn=fn!==void 0?fn:Jn,ci=bn?bn(Wn):Wn,ni=useEvent(wn),Ai=useState([Wn]),qi=_slicedToArray(Ai,2),yr=qi[0],Mr=qi[1];useLayoutUpdateEffect(function(){var fr=yr[0];Jn!==fr&&ni(Jn,fr)},[yr]),useLayoutUpdateEffect(function(){ra(fn)||oi(fn)},[fn]);var Fi=useEvent(function(fr,Xi){oi(fr,Xi),Mr([Wn],Xi)});return[ci,Fi]}function xs(_t,Ht,Bt){var Qt=React.useRef({});return(!("value"in Qt.current)||Bt(Qt.current.condition,Ht))&&(Qt.current.value=_t(),Qt.current.condition=Ht),Qt.current.value}function Ls(_t,Ht){typeof _t=="function"?_t(Ht):_typeof(_t)==="object"&&_t&&"current"in _t&&(_t.current=Ht)}function ga(){for(var _t=arguments.length,Ht=new Array(_t),Bt=0;Bt<_t;Bt++)Ht[Bt]=arguments[Bt];var Qt=Ht.filter(function(fn){return fn});return Qt.length<=1?Qt[0]:function(fn){Ht.forEach(function(wn){Ls(wn,fn)})}}function vs(){for(var _t=arguments.length,Ht=new Array(_t),Bt=0;Bt<_t;Bt++)Ht[Bt]=arguments[Bt];return useMemo(function(){return ga.apply(void 0,Ht)},Ht,function(Qt,fn){return Qt.length!==fn.length||Qt.every(function(wn,bn){return wn!==fn[bn]})})}function oa(_t){var Ht,Bt,Qt=isMemo(_t)?_t.type.type:_t.type;return!(typeof Qt=="function"&&!((Ht=Qt.prototype)!==null&&Ht!==void 0&&Ht.render)||typeof _t=="function"&&!((Bt=_t.prototype)!==null&&Bt!==void 0&&Bt.render))}function Hr(_t){return!isValidElement(_t)||isFragment(_t)?!1:oa(_t)}function Xa(_t,Ht,Bt,Qt){if(!Ht.length)return Bt;var fn=_toArray(Ht),wn=fn[0],bn=fn.slice(1),On;return!_t&&typeof wn=="number"?On=[]:Array.isArray(_t)?On=_toConsumableArray(_t):On=_objectSpread({},_t),Qt&&Bt===void 0&&bn.length===1?delete On[wn][bn[0]]:On[wn]=Xa(On[wn],bn,Bt,Qt),On}function Hs(_t,Ht,Bt){var Qt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Ht.length&&Qt&&Bt===void 0&&!get(_t,Ht.slice(0,-1))?_t:Xa(_t,Ht,Bt,Qt)}function Ks(_t){return _typeof(_t)==="object"&&_t!==null&&Object.getPrototypeOf(_t)===Object.prototype}function ka(_t){return Array.isArray(_t)?[]:{}}var Hl=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function cu(){for(var _t=arguments.length,Ht=new Array(_t),Bt=0;Bt<_t;Bt++)Ht[Bt]=arguments[Bt];var Qt=ka(Ht[0]);return Ht.forEach(function(fn){function wn(bn,On){var ti=new Set(On),Jn=get(fn,bn),oi=Array.isArray(Jn);if(oi||Ks(Jn)){if(!ti.has(Jn)){ti.add(Jn);var Wn=get(Qt,bn);oi?Qt=Hs(Qt,bn,[]):(!Wn||_typeof(Wn)!=="object")&&(Qt=Hs(Qt,bn,ka(Jn))),Hl(Jn).forEach(function(ci){wn([].concat(_toConsumableArray(bn),[ci]),ti)})}}else Qt=Hs(Qt,bn,Jn)}wn([])}),Qt}var Ta={},al=[],fh=function(Ht){al.push(Ht)};function kh(_t,Ht){if(0)var Bt}function ph(_t,Ht){if(0)var Bt}function qh(){Ta={}}function Ia(_t,Ht,Bt){!Ht&&!Ta[Bt]&&(_t(!1,Bt),Ta[Bt]=!0)}function za(_t,Ht){Ia(kh,_t,Ht)}function Tl(_t,Ht){Ia(ph,_t,Ht)}za.preMessage=fh,za.resetWarned=qh,za.noteOnce=Tl;var Al=null,Gl=me.forwardRef(function(_t,Ht){var Bt=_t.height,Qt=_t.offsetY,fn=_t.offsetX,wn=_t.children,bn=_t.prefixCls,On=_t.onInnerResize,ti=_t.innerProps,Jn=_t.rtl,oi=_t.extra,Wn={},ci={display:"flex",flexDirection:"column"};return Qt!==void 0&&(Wn={height:Bt,position:"relative",overflow:"hidden"},ci=(0,We.Z)((0,We.Z)({},ci),{},(0,$e.Z)((0,$e.Z)((0,$e.Z)((0,$e.Z)((0,$e.Z)({transform:"translateY(".concat(Qt,"px)")},Jn?"marginRight":"marginLeft",-fn),"position","absolute"),"left",0),"right",0),"top",0))),me.createElement("div",{style:Wn},me.createElement(qe.Z,{onResize:function(Ai){var qi=Ai.offsetHeight;qi&&On&&On()}},me.createElement("div",(0,ge.Z)({style:ci,className:pt()((0,$e.Z)({},"".concat(bn,"-holder-inner"),bn)),ref:Ht},ti),wn,oi)))});Gl.displayName="Filler";var Pc=Gl;function Cc(_t){var Ht=_t.children,Bt=_t.setRef,Qt=me.useCallback(function(fn){Bt(fn)},[]);return me.cloneElement(Ht,{ref:Qt})}function ma(_t,Ht,Bt,Qt,fn,wn,bn,On){var ti=On.getKey;return _t.slice(Ht,Bt+1).map(function(Jn,oi){var Wn=Ht+oi,ci=bn(Jn,Wn,{style:{width:Qt},offsetX:fn}),ni=ti(Jn);return me.createElement(Cc,{key:ni,setRef:function(qi){return wn(Jn,qi)}},ci)})}function ff(_t,Ht,Bt,Qt){var fn=Bt-_t,wn=Ht-Bt,bn=Math.min(fn,wn)*2;if(Qt<=bn){var On=Math.floor(Qt/2);return Qt%2?Bt+On+1:Bt-On}return fn>wn?Bt-(Qt-wn):Bt+(Qt-fn)}function Dd(_t,Ht,Bt){var Qt=_t.length,fn=Ht.length,wn,bn;if(Qt===0&&fn===0)return null;Qt<fn?(wn=_t,bn=Ht):(wn=Ht,bn=_t);var On={__EMPTY_ITEM__:!0};function ti(Ai){return Ai!==void 0?Bt(Ai):On}for(var Jn=null,oi=Math.abs(Qt-fn)!==1,Wn=0;Wn<bn.length;Wn+=1){var ci=ti(wn[Wn]),ni=ti(bn[Wn]);if(ci!==ni){Jn=Wn,oi=oi||ci!==ti(bn[Wn+1]);break}}return Jn===null?null:{index:Jn,multiple:oi}}function Qh(_t,Ht,Bt){var Qt=me.useState(_t),fn=(0,ye.Z)(Qt,2),wn=fn[0],bn=fn[1],On=me.useState(null),ti=(0,ye.Z)(On,2),Jn=ti[0],oi=ti[1];return me.useEffect(function(){var Wn=Dd(wn||[],_t||[],Ht);(Wn==null?void 0:Wn.index)!==void 0&&(Bt==null||Bt(Wn.index),oi(_t[Wn.index])),bn(_t)},[_t]),[Jn]}var bu=function(Ht){return+setTimeout(Ht,16)},Ja=function(Ht){return clearTimeout(Ht)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(bu=function(Ht){return window.requestAnimationFrame(Ht)},Ja=function(Ht){return window.cancelAnimationFrame(Ht)});var Ua=0,xa=new Map;function Aa(_t){xa.delete(_t)}var Th=function(Ht){var Bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Ua+=1;var Qt=Ua;function fn(wn){if(wn===0)Aa(Qt),Ht();else{var bn=bu(function(){fn(wn-1)});xa.set(Qt,bn)}}return fn(Bt),Qt};Th.cancel=function(_t){var Ht=xa.get(_t);return Aa(Ht),Ja(Ht)};var Nl=Th,Qs=(typeof navigator=="undefined"?"undefined":(0,Re.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Ah=Qs,$h=function(_t,Ht,Bt,Qt){var fn=(0,me.useRef)(!1),wn=(0,me.useRef)(null);function bn(){clearTimeout(wn.current),fn.current=!0,wn.current=setTimeout(function(){fn.current=!1},50)}var On=(0,me.useRef)({top:_t,bottom:Ht,left:Bt,right:Qt});return On.current.top=_t,On.current.bottom=Ht,On.current.left=Bt,On.current.right=Qt,function(ti,Jn){var oi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Wn=ti?Jn<0&&On.current.left||Jn>0&&On.current.right:Jn<0&&On.current.top||Jn>0&&On.current.bottom;return oi&&Wn?(clearTimeout(wn.current),fn.current=!1):(!Wn||fn.current)&&bn(),!fn.current&&Wn}};function Nh(_t,Ht,Bt,Qt,fn,wn,bn){var On=(0,me.useRef)(0),ti=(0,me.useRef)(null),Jn=(0,me.useRef)(null),oi=(0,me.useRef)(!1),Wn=$h(Ht,Bt,Qt,fn);function ci(Fi,fr){if(Nl.cancel(ti.current),!Wn(!1,fr)){var Xi=Fi;if(!Xi._virtualHandled)Xi._virtualHandled=!0;else return;On.current+=fr,Jn.current=fr,Ah||Xi.preventDefault(),ti.current=Nl(function(){var Ar=oi.current?10:1;bn(On.current*Ar,!1),On.current=0})}}function ni(Fi,fr){bn(fr,!0),Ah||Fi.preventDefault()}var Ai=(0,me.useRef)(null),qi=(0,me.useRef)(null);function yr(Fi){if(_t){Nl.cancel(qi.current),qi.current=Nl(function(){Ai.current=null},2);var fr=Fi.deltaX,Xi=Fi.deltaY,Ar=Fi.shiftKey,oo=fr,kt=Xi;(Ai.current==="sx"||!Ai.current&&Ar&&Xi&&!fr)&&(oo=Xi,kt=0,Ai.current="sx");var Wt=Math.abs(oo),qt=Math.abs(kt);Ai.current===null&&(Ai.current=wn&&Wt>qt?"x":"y"),Ai.current==="y"?ci(Fi,kt):ni(Fi,oo)}}function Mr(Fi){_t&&(oi.current=Fi.detail===Jn.current)}return[yr,Mr]}function xr(_t,Ht,Bt,Qt){var fn=me.useMemo(function(){return[new Map,[]]},[_t,Bt.id,Qt]),wn=(0,ye.Z)(fn,2),bn=wn[0],On=wn[1],ti=function(oi){var Wn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oi,ci=bn.get(oi),ni=bn.get(Wn);if(ci===void 0||ni===void 0)for(var Ai=_t.length,qi=On.length;qi<Ai;qi+=1){var yr,Mr=_t[qi],Fi=Ht(Mr);bn.set(Fi,qi);var fr=(yr=Bt.get(Fi))!==null&&yr!==void 0?yr:Qt;if(On[qi]=(On[qi-1]||0)+fr,Fi===oi&&(ci=qi),Fi===Wn&&(ni=qi),ci!==void 0&&ni!==void 0)break}return{top:On[ci-1]||0,bottom:On[ni]}};return ti}var ed=De(15671),tn=De(43144),Kn=function(){function _t(){(0,ed.Z)(this,_t),(0,$e.Z)(this,"maps",void 0),(0,$e.Z)(this,"id",0),(0,$e.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,tn.Z)(_t,[{key:"set",value:function(Bt,Qt){this.maps[Bt]=Qt,this.id+=1,this.diffKeys.add(Bt)}},{key:"get",value:function(Bt){return this.maps[Bt]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),_t}(),Od=Kn;function td(_t){var Ht=parseFloat(_t);return isNaN(Ht)?0:Ht}function Pu(_t,Ht,Bt){var Qt=me.useState(0),fn=(0,ye.Z)(Qt,2),wn=fn[0],bn=fn[1],On=(0,me.useRef)(new Map),ti=(0,me.useRef)(new Od),Jn=(0,me.useRef)(0);function oi(){Jn.current+=1}function Wn(){var ni=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;oi();var Ai=function(){var Mr=!1;On.current.forEach(function(Fi,fr){if(Fi&&Fi.offsetParent){var Xi=Fi.offsetHeight,Ar=getComputedStyle(Fi),oo=Ar.marginTop,kt=Ar.marginBottom,Wt=td(oo),qt=td(kt),ki=Xi+Wt+qt;ti.current.get(fr)!==ki&&(ti.current.set(fr,ki),Mr=!0)}}),Mr&&bn(function(Fi){return Fi+1})};if(ni)Ai();else{Jn.current+=1;var qi=Jn.current;Promise.resolve().then(function(){qi===Jn.current&&Ai()})}}function ci(ni,Ai){var qi=_t(ni),yr=On.current.get(qi);Ai?(On.current.set(qi,Ai),Wn()):On.current.delete(qi),!yr!=!Ai&&(Ai?Ht==null||Ht(ni):Bt==null||Bt(ni))}return(0,me.useEffect)(function(){return oi},[]),[ci,Wn,ti.current,wn]}var Cu=14/15;function Dh(_t,Ht,Bt){var Qt=(0,me.useRef)(!1),fn=(0,me.useRef)(0),wn=(0,me.useRef)(0),bn=(0,me.useRef)(null),On=(0,me.useRef)(null),ti,Jn=function(ni){if(Qt.current){var Ai=Math.ceil(ni.touches[0].pageX),qi=Math.ceil(ni.touches[0].pageY),yr=fn.current-Ai,Mr=wn.current-qi,Fi=Math.abs(yr)>Math.abs(Mr);Fi?fn.current=Ai:wn.current=qi;var fr=Bt(Fi,Fi?yr:Mr,!1,ni);fr&&ni.preventDefault(),clearInterval(On.current),fr&&(On.current=setInterval(function(){Fi?yr*=Cu:Mr*=Cu;var Xi=Math.floor(Fi?yr:Mr);(!Bt(Fi,Xi,!0)||Math.abs(Xi)<=.1)&&clearInterval(On.current)},16))}},oi=function(){Qt.current=!1,ti()},Wn=function(ni){ti(),ni.touches.length===1&&!Qt.current&&(Qt.current=!0,fn.current=Math.ceil(ni.touches[0].pageX),wn.current=Math.ceil(ni.touches[0].pageY),bn.current=ni.target,bn.current.addEventListener("touchmove",Jn,{passive:!1}),bn.current.addEventListener("touchend",oi,{passive:!0}))};ti=function(){bn.current&&(bn.current.removeEventListener("touchmove",Jn),bn.current.removeEventListener("touchend",oi))},ds(function(){return _t&&Ht.current.addEventListener("touchstart",Wn,{passive:!0}),function(){var ci;(ci=Ht.current)===null||ci===void 0||ci.removeEventListener("touchstart",Wn),ti(),clearInterval(On.current)}},[_t])}function ec(_t){return Math.floor(Math.pow(_t,.5))}function gh(_t,Ht){var Bt="touches"in _t?_t.touches[0]:_t;return Bt[Ht?"pageX":"pageY"]-window[Ht?"scrollX":"scrollY"]}function Gs(_t,Ht,Bt){me.useEffect(function(){var Qt=Ht.current;if(_t&&Qt){var fn=!1,wn,bn,On=function(){Nl.cancel(wn)},ti=function ci(){On(),wn=Nl(function(){Bt(bn),ci()})},Jn=function(ni){if(!(ni.target.draggable||ni.button!==0)){var Ai=ni;Ai._virtualHandled||(Ai._virtualHandled=!0,fn=!0)}},oi=function(){fn=!1,On()},Wn=function(ni){if(fn){var Ai=gh(ni,!1),qi=Qt.getBoundingClientRect(),yr=qi.top,Mr=qi.bottom;if(Ai<=yr){var Fi=yr-Ai;bn=-ec(Fi),ti()}else if(Ai>=Mr){var fr=Ai-Mr;bn=ec(fr),ti()}else On()}};return Qt.addEventListener("mousedown",Jn),Qt.ownerDocument.addEventListener("mouseup",oi),Qt.ownerDocument.addEventListener("mousemove",Wn),function(){Qt.removeEventListener("mousedown",Jn),Qt.ownerDocument.removeEventListener("mouseup",oi),Qt.ownerDocument.removeEventListener("mousemove",Wn),On()}}},[_t])}var Kr=10;function qa(_t,Ht,Bt,Qt,fn,wn,bn,On){var ti=me.useRef(),Jn=me.useState(null),oi=(0,ye.Z)(Jn,2),Wn=oi[0],ci=oi[1];return ds(function(){if(Wn&&Wn.times<Kr){if(!_t.current){ci(function(er){return(0,We.Z)({},er)});return}wn();var ni=Wn.targetAlign,Ai=Wn.originAlign,qi=Wn.index,yr=Wn.offset,Mr=_t.current.clientHeight,Fi=!1,fr=ni,Xi=null;if(Mr){for(var Ar=ni||Ai,oo=0,kt=0,Wt=0,qt=Math.min(Ht.length-1,qi),ki=0;ki<=qt;ki+=1){var pi=fn(Ht[ki]);kt=oo;var Qn=Bt.get(pi);Wt=kt+(Qn===void 0?Qt:Qn),oo=Wt}for(var Vn=Ar==="top"?yr:Mr-yr,Hn=qt;Hn>=0;Hn-=1){var En=fn(Ht[Hn]),ri=Bt.get(En);if(ri===void 0){Fi=!0;break}if(Vn-=ri,Vn<=0)break}switch(Ar){case"top":Xi=kt-yr;break;case"bottom":Xi=Wt-Mr+yr;break;default:{var Yi=_t.current.scrollTop,Oi=Yi+Mr;kt<Yi?fr="top":Wt>Oi&&(fr="bottom")}}Xi!==null&&bn(Xi),Xi!==Wn.lastTop&&(Fi=!0)}Fi&&ci((0,We.Z)((0,We.Z)({},Wn),{},{times:Wn.times+1,targetAlign:fr,lastTop:Xi}))}},[Wn,_t.current]),function(ni){if(ni==null){On();return}if(Nl.cancel(ti.current),typeof ni=="number")bn(ni);else if(ni&&(0,Re.Z)(ni)==="object"){var Ai,qi=ni.align;"index"in ni?Ai=ni.index:Ai=Ht.findIndex(function(Fi){return fn(Fi)===ni.key});var yr=ni.offset,Mr=yr===void 0?0:yr;ci({times:0,index:Ai,offset:Mr,originAlign:qi})}}}var Dl=me.forwardRef(function(_t,Ht){var Bt=_t.prefixCls,Qt=_t.rtl,fn=_t.scrollOffset,wn=_t.scrollRange,bn=_t.onStartMove,On=_t.onStopMove,ti=_t.onScroll,Jn=_t.horizontal,oi=_t.spinSize,Wn=_t.containerSize,ci=_t.style,ni=_t.thumbStyle,Ai=_t.showScrollBar,qi=me.useState(!1),yr=(0,ye.Z)(qi,2),Mr=yr[0],Fi=yr[1],fr=me.useState(null),Xi=(0,ye.Z)(fr,2),Ar=Xi[0],oo=Xi[1],kt=me.useState(null),Wt=(0,ye.Z)(kt,2),qt=Wt[0],ki=Wt[1],pi=!Qt,Qn=me.useRef(),Vn=me.useRef(),Hn=me.useState(Ai),En=(0,ye.Z)(Hn,2),ri=En[0],Yi=En[1],Oi=me.useRef(),er=function(){Ai===!0||Ai===!1||(clearTimeout(Oi.current),Yi(!0),Oi.current=setTimeout(function(){Yi(!1)},3e3))},Hi=wn-Wn||0,sr=Wn-oi||0,tr=me.useMemo(function(){if(fn===0||Hi===0)return 0;var Lr=fn/Hi;return Lr*sr},[fn,Hi,sr]),so=function(hr){hr.stopPropagation(),hr.preventDefault()},Or=me.useRef({top:tr,dragging:Mr,pageY:Ar,startTop:qt});Or.current={top:tr,dragging:Mr,pageY:Ar,startTop:qt};var So=function(hr){Fi(!0),oo(gh(hr,Jn)),ki(Or.current.top),bn(),hr.stopPropagation(),hr.preventDefault()};me.useEffect(function(){var Lr=function($o){$o.preventDefault()},hr=Qn.current,wo=Vn.current;return hr.addEventListener("touchstart",Lr,{passive:!1}),wo.addEventListener("touchstart",So,{passive:!1}),function(){hr.removeEventListener("touchstart",Lr),wo.removeEventListener("touchstart",So)}},[]);var To=me.useRef();To.current=Hi;var nr=me.useRef();nr.current=sr,me.useEffect(function(){if(Mr){var Lr,hr=function($o){var ko=Or.current,Ao=ko.dragging,eo=ko.pageY,Bo=ko.startTop;Nl.cancel(Lr);var Ri=Qn.current.getBoundingClientRect(),$s=Wn/(Jn?Ri.width:Ri.height);if(Ao){var _o=(gh($o,Jn)-eo)*$s,Rs=Bo;!pi&&Jn?Rs-=_o:Rs+=_o;var ua=To.current,Cs=nr.current,_l=Cs?Rs/Cs:0,ho=Math.ceil(_l*ua);ho=Math.max(ho,0),ho=Math.min(ho,ua),Lr=Nl(function(){ti(ho,Jn)})}},wo=function(){Fi(!1),On()};return window.addEventListener("mousemove",hr,{passive:!0}),window.addEventListener("touchmove",hr,{passive:!0}),window.addEventListener("mouseup",wo,{passive:!0}),window.addEventListener("touchend",wo,{passive:!0}),function(){window.removeEventListener("mousemove",hr),window.removeEventListener("touchmove",hr),window.removeEventListener("mouseup",wo),window.removeEventListener("touchend",wo),Nl.cancel(Lr)}}},[Mr]),me.useEffect(function(){return er(),function(){clearTimeout(Oi.current)}},[fn]),me.useImperativeHandle(Ht,function(){return{delayHidden:er}});var Tr="".concat(Bt,"-scrollbar"),Mi={position:"absolute",visibility:ri?null:"hidden"},Vr={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Jn?(Mi.height=8,Mi.left=0,Mi.right=0,Mi.bottom=0,Vr.height="100%",Vr.width=oi,pi?Vr.left=tr:Vr.right=tr):(Mi.width=8,Mi.top=0,Mi.bottom=0,pi?Mi.right=0:Mi.left=0,Vr.width="100%",Vr.height=oi,Vr.top=tr),me.createElement("div",{ref:Qn,className:pt()(Tr,(0,$e.Z)((0,$e.Z)((0,$e.Z)({},"".concat(Tr,"-horizontal"),Jn),"".concat(Tr,"-vertical"),!Jn),"".concat(Tr,"-visible"),ri)),style:(0,We.Z)((0,We.Z)({},Mi),ci),onMouseDown:so,onMouseMove:er},me.createElement("div",{ref:Vn,className:pt()("".concat(Tr,"-thumb"),(0,$e.Z)({},"".concat(Tr,"-thumb-moving"),Mr)),style:(0,We.Z)((0,We.Z)({},Vr),ni),onMouseDown:So}))}),Ds=Dl,zo=20;function la(){var _t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Bt=_t/Ht*_t;return isNaN(Bt)&&(Bt=0),Bt=Math.max(Bt,zo),Math.floor(Bt)}var Qa=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],is=[],wl={overflowY:"auto",overflowAnchor:"none"};function sa(_t,Ht){var Bt=_t.prefixCls,Qt=Bt===void 0?"rc-virtual-list":Bt,fn=_t.className,wn=_t.height,bn=_t.itemHeight,On=_t.fullHeight,ti=On===void 0?!0:On,Jn=_t.style,oi=_t.data,Wn=_t.children,ci=_t.itemKey,ni=_t.virtual,Ai=_t.direction,qi=_t.scrollWidth,yr=_t.component,Mr=yr===void 0?"div":yr,Fi=_t.onScroll,fr=_t.onVirtualScroll,Xi=_t.onVisibleChange,Ar=_t.innerProps,oo=_t.extraRender,kt=_t.styles,Wt=_t.showScrollBar,qt=Wt===void 0?"optional":Wt,ki=(0,vo.Z)(_t,Qa),pi=me.useCallback(function(bo){return typeof ci=="function"?ci(bo):bo==null?void 0:bo[ci]},[ci]),Qn=Pu(pi,null,null),Vn=(0,ye.Z)(Qn,4),Hn=Vn[0],En=Vn[1],ri=Vn[2],Yi=Vn[3],Oi=!!(ni!==!1&&wn&&bn),er=me.useMemo(function(){return Object.values(ri.maps).reduce(function(bo,ao){return bo+ao},0)},[ri.id,ri.maps]),Hi=Oi&&oi&&(Math.max(bn*oi.length,er)>wn||!!qi),sr=Ai==="rtl",tr=pt()(Qt,(0,$e.Z)({},"".concat(Qt,"-rtl"),sr),fn),so=oi||is,Or=(0,me.useRef)(),So=(0,me.useRef)(),To=(0,me.useRef)(),nr=(0,me.useState)(0),Tr=(0,ye.Z)(nr,2),Mi=Tr[0],Vr=Tr[1],Lr=(0,me.useState)(0),hr=(0,ye.Z)(Lr,2),wo=hr[0],rr=hr[1],$o=(0,me.useState)(!1),ko=(0,ye.Z)($o,2),Ao=ko[0],eo=ko[1],Bo=function(){eo(!0)},Ri=function(){eo(!1)},$s={getKey:pi};function _o(bo){Vr(function(ao){var Qr;typeof bo=="function"?Qr=bo(ao):Qr=bo;var Is=Ha(Qr);return Or.current.scrollTop=Is,Is})}var Rs=(0,me.useRef)({start:0,end:so.length}),ua=(0,me.useRef)(),Cs=Qh(so,pi),_l=(0,ye.Z)(Cs,1),ho=_l[0];ua.current=ho;var Uo=me.useMemo(function(){if(!Oi)return{scrollHeight:void 0,start:0,end:so.length-1,offset:void 0};if(!Hi){var bo;return{scrollHeight:((bo=So.current)===null||bo===void 0?void 0:bo.offsetHeight)||0,start:0,end:so.length-1,offset:void 0}}for(var ao=0,Qr,Is,Ba,yh=so.length,Hu=0;Hu<yh;Hu+=1){var ln=so[Hu],nh=pi(ln),Ol=ri.get(nh),sc=ao+(Ol===void 0?bn:Ol);sc>=Mi&&Qr===void 0&&(Qr=Hu,Is=ao),sc>Mi+wn&&Ba===void 0&&(Ba=Hu),ao=sc}return Qr===void 0&&(Qr=0,Is=0,Ba=Math.ceil(wn/bn)),Ba===void 0&&(Ba=so.length-1),Ba=Math.min(Ba+1,so.length-1),{scrollHeight:ao,start:Qr,end:Ba,offset:Is}},[Hi,Oi,Mi,so,Yi,wn]),es=Uo.scrollHeight,Na=Uo.start,ha=Uo.end,du=Uo.offset;Rs.current.start=Na,Rs.current.end=ha,me.useLayoutEffect(function(){var bo=ri.getRecord();if(bo.size===1){var ao=Array.from(bo)[0],Qr=so[Na];if(Qr){var Is=pi(Qr);if(Is===ao){var Ba=ri.get(ao),yh=Ba-bn;_o(function(Hu){return Hu+yh})}}}ri.resetRecord()},[es]);var bl=me.useState({width:0,height:wn}),Vs=(0,ye.Z)(bl,2),ca=Vs[0],Eu=Vs[1],Da=function(ao){Eu({width:ao.offsetWidth,height:ao.offsetHeight})},Wl=(0,me.useRef)(),Eo=(0,me.useRef)(),Ms=me.useMemo(function(){return la(ca.width,qi)},[ca.width,qi]),Pa=me.useMemo(function(){return la(ca.height,es)},[ca.height,es]),$a=es-wn,ea=(0,me.useRef)($a);ea.current=$a;function Ha(bo){var ao=bo;return Number.isNaN(ea.current)||(ao=Math.min(ao,ea.current)),ao=Math.max(ao,0),ao}var Ga=Mi<=0,nu=Mi>=$a,Kl=wo<=0,ys=wo>=qi,Wa=$h(Ga,nu,Kl,ys),ll=function(){return{x:sr?-wo:wo,y:Mi}},fu=(0,me.useRef)(ll()),Vl=po(function(bo){if(fr){var ao=(0,We.Z)((0,We.Z)({},ll()),bo);(fu.current.x!==ao.x||fu.current.y!==ao.y)&&(fr(ao),fu.current=ao)}});function el(bo,ao){var Qr=bo;ao?((0,be.flushSync)(function(){rr(Qr)}),Vl()):_o(Qr)}function ic(bo){var ao=bo.currentTarget.scrollTop;ao!==Mi&&_o(ao),Fi==null||Fi(bo),Vl()}var rc=function(ao){var Qr=ao,Is=qi?qi-ca.width:0;return Qr=Math.max(Qr,0),Qr=Math.min(Qr,Is),Qr},va=po(function(bo,ao){ao?((0,be.flushSync)(function(){rr(function(Qr){var Is=Qr+(sr?-bo:bo);return rc(Is)})}),Vl()):_o(function(Qr){var Is=Qr+bo;return Is})}),oc=Nh(Oi,Ga,nu,Kl,ys,!!qi,va),Uu=(0,ye.Z)(oc,2),Fa=Uu[0],Lu=Uu[1];Dh(Oi,Or,function(bo,ao,Qr,Is){var Ba=Is;return Wa(bo,ao,Qr)?!1:!Ba||!Ba._virtualHandled?(Ba&&(Ba._virtualHandled=!0),Fa({preventDefault:function(){},deltaX:bo?ao:0,deltaY:bo?0:ao}),!0):!1}),Gs(Hi,Or,function(bo){_o(function(ao){return ao+bo})}),ds(function(){function bo(Qr){var Is=Ga&&Qr.detail<0,Ba=nu&&Qr.detail>0;Oi&&!Is&&!Ba&&Qr.preventDefault()}var ao=Or.current;return ao.addEventListener("wheel",Fa,{passive:!1}),ao.addEventListener("DOMMouseScroll",Lu,{passive:!0}),ao.addEventListener("MozMousePixelScroll",bo,{passive:!1}),function(){ao.removeEventListener("wheel",Fa),ao.removeEventListener("DOMMouseScroll",Lu),ao.removeEventListener("MozMousePixelScroll",bo)}},[Oi,Ga,nu]),ds(function(){if(qi){var bo=rc(wo);rr(bo),Vl({x:bo})}},[ca.width,qi]);var Rh=function(){var ao,Qr;(ao=Wl.current)===null||ao===void 0||ao.delayHidden(),(Qr=Eo.current)===null||Qr===void 0||Qr.delayHidden()},Mu=qa(Or,so,ri,bn,pi,function(){return En(!0)},_o,Rh);me.useImperativeHandle(Ht,function(){return{nativeElement:To.current,getScrollInfo:ll,scrollTo:function(ao){function Qr(Is){return Is&&(0,Re.Z)(Is)==="object"&&("left"in Is||"top"in Is)}Qr(ao)?(ao.left!==void 0&&rr(rc(ao.left)),Mu(ao.top)):Mu(ao)}}}),ds(function(){if(Xi){var bo=so.slice(Na,ha+1);Xi(bo,so)}},[Na,ha,so]);var Lc=xr(so,pi,ri,bn),th=oo==null?void 0:oo({start:Na,end:ha,virtual:Hi,offsetX:wo,offsetY:du,rtl:sr,getSize:Lc}),Zl=ma(so,Na,ha,qi,wo,Hn,Wn,$s),vh=null;wn&&(vh=(0,We.Z)((0,$e.Z)({},ti?"height":"maxHeight",wn),wl),Oi&&(vh.overflowY="hidden",qi&&(vh.overflowX="hidden"),Ao&&(vh.pointerEvents="none")));var Mc={};return sr&&(Mc.dir="rtl"),me.createElement("div",(0,ge.Z)({ref:To,style:(0,We.Z)((0,We.Z)({},Jn),{},{position:"relative"}),className:tr},Mc,ki),me.createElement(qe.Z,{onResize:Da},me.createElement(Mr,{className:"".concat(Qt,"-holder"),style:vh,ref:Or,onScroll:ic,onMouseEnter:Rh},me.createElement(Pc,{prefixCls:Qt,height:es,offsetX:wo,offsetY:du,scrollWidth:qi,onInnerResize:En,ref:So,innerProps:Ar,rtl:sr,extra:th},Zl))),Hi&&es>wn&&me.createElement(Ds,{ref:Wl,prefixCls:Qt,scrollOffset:Mi,scrollRange:es,rtl:sr,onScroll:el,onStartMove:Bo,onStopMove:Ri,spinSize:Pa,containerSize:ca.height,style:kt==null?void 0:kt.verticalScrollBar,thumbStyle:kt==null?void 0:kt.verticalScrollBarThumb,showScrollBar:qt}),Hi&&qi>ca.width&&me.createElement(Ds,{ref:Eo,prefixCls:Qt,scrollOffset:wo,scrollRange:qi,rtl:sr,onScroll:el,onStartMove:Bo,onStopMove:Ri,spinSize:Ms,containerSize:ca.width,horizontal:!0,style:kt==null?void 0:kt.horizontalScrollBar,thumbStyle:kt==null?void 0:kt.horizontalScrollBarThumb,showScrollBar:qt}))}var $u=me.forwardRef(sa);$u.displayName="List";var rs=$u,ba=rs,Jo=ve(null),bs=ve(null);function Os(_t,Ht,Bt){var Qt=Ht||1;return Bt[_t+Qt]-(Bt[_t]||0)}function Ws(_t){var Ht=_t.rowInfo,Bt=_t.column,Qt=_t.colIndex,fn=_t.indent,wn=_t.index,bn=_t.component,On=_t.renderIndex,ti=_t.record,Jn=_t.style,oi=_t.className,Wn=_t.inverse,ci=_t.getHeight,ni=Bt.render,Ai=Bt.dataIndex,qi=Bt.className,yr=Bt.width,Mr=we(bs,["columnsOffset"]),Fi=Mr.columnsOffset,fr=dn(Ht,Bt,Qt,fn,wn),Xi=fr.key,Ar=fr.fixedInfo,oo=fr.appendCellNode,kt=fr.additionalCellProps,Wt=kt.style,qt=kt.colSpan,ki=qt===void 0?1:qt,pi=kt.rowSpan,Qn=pi===void 0?1:pi,Vn=Qt-1,Hn=Os(Vn,ki,Fi),En=ki>1?yr-Hn:0,ri=(0,We.Z)((0,We.Z)((0,We.Z)({},Wt),Jn),{},{flex:"0 0 ".concat(Hn,"px"),width:"".concat(Hn,"px"),marginRight:En,pointerEvents:"auto"}),Yi=me.useMemo(function(){return Wn?Qn<=1:ki===0||Qn===0||Qn>1},[Qn,ki,Wn]);Yi?ri.visibility="hidden":Wn&&(ri.height=ci==null?void 0:ci(Qn));var Oi=Yi?function(){return null}:ni,er={};return(Qn===0||ki===0)&&(er.rowSpan=1,er.colSpan=1),me.createElement(Qi,(0,ge.Z)({className:pt()(qi,oi),ellipsis:Bt.ellipsis,align:Bt.align,scope:Bt.rowScope,component:bn,prefixCls:Ht.prefixCls,key:Xi,record:ti,index:wn,renderIndex:On,dataIndex:Ai,render:Oi,shouldCellUpdate:Bt.shouldCellUpdate},Ar,{appendNode:oo,additionalProps:(0,We.Z)((0,We.Z)({},kt),{},{style:ri},er)}))}var as=Ws,mh=["data","index","className","rowKey","style","extra","getHeight"],Fr=me.forwardRef(function(_t,Ht){var Bt=_t.data,Qt=_t.index,fn=_t.className,wn=_t.rowKey,bn=_t.style,On=_t.extra,ti=_t.getHeight,Jn=(0,vo.Z)(_t,mh),oi=Bt.record,Wn=Bt.indent,ci=Bt.index,ni=we(pe,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Ai=ni.scrollX,qi=ni.flattenColumns,yr=ni.prefixCls,Mr=ni.fixColumn,Fi=ni.componentWidth,fr=we(Jo,["getComponent"]),Xi=fr.getComponent,Ar=jr(oi,wn,Qt,Wn),oo=Xi(["body","row"],"div"),kt=Xi(["body","cell"],"div"),Wt=Ar.rowSupportExpand,qt=Ar.expanded,ki=Ar.rowProps,pi=Ar.expandedRowRender,Qn=Ar.expandedRowClassName,Vn;if(Wt&&qt){var Hn=pi(oi,Qt,Wn+1,qt),En=Io(Qn,oi,Qt,Wn),ri={};Mr&&(ri={style:(0,$e.Z)({},"--virtual-width","".concat(Fi,"px"))});var Yi="".concat(yr,"-expanded-row-cell");Vn=me.createElement(oo,{className:pt()("".concat(yr,"-expanded-row"),"".concat(yr,"-expanded-row-level-").concat(Wn+1),En)},me.createElement(Qi,{component:kt,prefixCls:yr,className:pt()(Yi,(0,$e.Z)({},"".concat(Yi,"-fixed"),Mr)),additionalProps:ri},Hn))}var Oi=(0,We.Z)((0,We.Z)({},bn),{},{width:Ai});On&&(Oi.position="absolute",Oi.pointerEvents="none");var er=me.createElement(oo,(0,ge.Z)({},ki,Jn,{"data-row-key":wn,ref:Wt?null:Ht,className:pt()(fn,"".concat(yr,"-row"),ki==null?void 0:ki.className,(0,$e.Z)({},"".concat(yr,"-row-extra"),On)),style:(0,We.Z)((0,We.Z)({},Oi),ki==null?void 0:ki.style)}),qi.map(function(Hi,sr){return me.createElement(as,{key:sr,component:kt,rowInfo:Ar,column:Hi,colIndex:sr,indent:Wn,index:Qt,renderIndex:ci,record:oi,inverse:On,getHeight:ti})}));return Wt?me.createElement("div",{ref:Ht},er,Vn):er}),Bu=se(Fr),Ko=Bu,Oh=me.forwardRef(function(_t,Ht){var Bt=_t.data,Qt=_t.onScroll,fn=we(pe,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),wn=fn.flattenColumns,bn=fn.onColumnResize,On=fn.getRowKey,ti=fn.expandedKeys,Jn=fn.prefixCls,oi=fn.childrenColumnName,Wn=fn.scrollX,ci=fn.direction,ni=we(Jo),Ai=ni.sticky,qi=ni.scrollY,yr=ni.listItemHeight,Mr=ni.getComponent,Fi=ni.onScroll,fr=me.useRef(),Xi=dr(Bt,oi,ti,On),Ar=me.useMemo(function(){var Vn=0;return wn.map(function(Hn){var En=Hn.width,ri=Hn.key;return Vn+=En,[ri,En,Vn]})},[wn]),oo=me.useMemo(function(){return Ar.map(function(Vn){return Vn[2]})},[Ar]);me.useEffect(function(){Ar.forEach(function(Vn){var Hn=(0,ye.Z)(Vn,2),En=Hn[0],ri=Hn[1];bn(En,ri)})},[Ar]),me.useImperativeHandle(Ht,function(){var Vn,Hn={scrollTo:function(ri){var Yi;(Yi=fr.current)===null||Yi===void 0||Yi.scrollTo(ri)},nativeElement:(Vn=fr.current)===null||Vn===void 0?void 0:Vn.nativeElement};return Object.defineProperty(Hn,"scrollLeft",{get:function(){var ri;return((ri=fr.current)===null||ri===void 0?void 0:ri.getScrollInfo().x)||0},set:function(ri){var Yi;(Yi=fr.current)===null||Yi===void 0||Yi.scrollTo({left:ri})}}),Hn});var kt=function(Hn,En){var ri,Yi=(ri=Xi[En])===null||ri===void 0?void 0:ri.record,Oi=Hn.onCell;if(Oi){var er,Hi=Oi(Yi,En);return(er=Hi==null?void 0:Hi.rowSpan)!==null&&er!==void 0?er:1}return 1},Wt=function(Hn){var En=Hn.start,ri=Hn.end,Yi=Hn.getSize,Oi=Hn.offsetY;if(ri<0)return null;for(var er=wn.filter(function(Lr){return kt(Lr,En)===0}),Hi=En,sr=function(hr){if(er=er.filter(function(wo){return kt(wo,hr)===0}),!er.length)return Hi=hr,1},tr=En;tr>=0&&!sr(tr);tr-=1);for(var so=wn.filter(function(Lr){return kt(Lr,ri)!==1}),Or=ri,So=function(hr){if(so=so.filter(function(wo){return kt(wo,hr)!==1}),!so.length)return Or=Math.max(hr-1,ri),1},To=ri;To<Xi.length&&!So(To);To+=1);for(var nr=[],Tr=function(hr){var wo=Xi[hr];if(!wo)return 1;wn.some(function(rr){return kt(rr,hr)>1})&&nr.push(hr)},Mi=Hi;Mi<=Or;Mi+=1)Tr(Mi);var Vr=nr.map(function(Lr){var hr=Xi[Lr],wo=On(hr.record,Lr),rr=function(Ao){var eo=Lr+Ao-1,Bo=On(Xi[eo].record,eo),Ri=Yi(wo,Bo);return Ri.bottom-Ri.top},$o=Yi(wo);return me.createElement(Ko,{key:Lr,data:hr,rowKey:wo,index:Lr,style:{top:-Oi+$o.top},extra:!0,getHeight:rr})});return Vr},qt=me.useMemo(function(){return{columnsOffset:oo}},[oo]),ki="".concat(Jn,"-tbody"),pi=Mr(["body","wrapper"]),Qn={};return Ai&&(Qn.position="sticky",Qn.bottom=0,(0,Re.Z)(Ai)==="object"&&Ai.offsetScroll&&(Qn.bottom=Ai.offsetScroll)),me.createElement(bs.Provider,{value:qt},me.createElement(ba,{fullHeight:!1,ref:fr,prefixCls:"".concat(ki,"-virtual"),styles:{horizontalScrollBar:Qn},className:ki,height:qi,itemHeight:yr||24,data:Xi,itemKey:function(Hn){return On(Hn.record)},component:pi,scrollWidth:Wn,direction:ci,onVirtualScroll:function(Hn){var En,ri=Hn.x;Qt({currentTarget:(En=fr.current)===null||En===void 0?void 0:En.nativeElement,scrollLeft:ri})},onScroll:Fi,extraRender:Wt},function(Vn,Hn,En){var ri=On(Vn.record,Hn);return me.createElement(Ko,{data:Vn,rowKey:ri,index:Hn,style:En.style})}))}),tc=se(Oh),nc=tc,nd=function(Ht,Bt){var Qt=Bt.ref,fn=Bt.onScroll;return me.createElement(nc,{ref:Qt,data:Ht,onScroll:fn})};function Ec(_t,Ht){var Bt=_t.data,Qt=_t.columns,fn=_t.scroll,wn=_t.sticky,bn=_t.prefixCls,On=bn===void 0?Ts:bn,ti=_t.className,Jn=_t.listItemHeight,oi=_t.components,Wn=_t.onScroll,ci=fn||{},ni=ci.x,Ai=ci.y;typeof ni!="number"&&(ni=1),typeof Ai!="number"&&(Ai=500);var qi=Dt(function(Fi,fr){return ft(oi,Fi)||fr}),yr=Dt(Wn),Mr=me.useMemo(function(){return{sticky:wn,scrollY:Ai,listItemHeight:Jn,getComponent:qi,onScroll:yr}},[wn,Ai,Jn,qi,yr]);return me.createElement(Jo.Provider,{value:Mr},me.createElement(Gr,(0,ge.Z)({},_t,{className:pt()(ti,"".concat(On,"-virtual")),scroll:(0,We.Z)((0,We.Z)({},fn),{},{x:ni}),components:(0,We.Z)((0,We.Z)({},oi),{},{body:Bt!=null&&Bt.length?nd:void 0}),columns:Qt,internalHooks:Le.R,tailor:!0,ref:Ht})))}var ju=me.forwardRef(Ec);function eh(_t){return ie(ju,_t)}var us=eh(),zu=null},62978:function(_n,hn,De){"use strict";De.d(hn,{g:function(){return me},v:function(){return Ee}});var Le=De(1413),ye=De(45987),Fe=De(40830),Me=["expandable"],Ee="RC_TABLE_INTERNAL_COL_DEFINE";function me(be){var ve=be.expandable,we=(0,ye.Z)(be,Me),ge;return"expandable"in be?ge=(0,Le.Z)((0,Le.Z)({},we),ve):ge=we,ge.showExpandColumn===!1&&(ge.expandIconColumnIndex=-1),ge}},63295:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return Ee}});var Le=De(71002),ye=Symbol.for("react.element"),Fe=Symbol.for("react.transitional.element"),Me=Symbol.for("react.fragment");function Ee(me){return me&&(0,Le.Z)(me)==="object"&&(me.$$typeof===ye||me.$$typeof===Fe)&&me.type===Me}},40830:function(_n,hn,De){"use strict";var Le={},ye=[],Fe=function(he){ye.push(he)};function Me(ge,he){if(0)var xe}function Ee(ge,he){if(0)var xe}function me(){Le={}}function be(ge,he,xe){!he&&!Le[xe]&&(ge(!1,xe),Le[xe]=!0)}function ve(ge,he){be(Me,ge,he)}function we(ge,he){be(Ee,ge,he)}ve.preMessage=Fe,ve.resetWarned=me,ve.noteOnce=we,hn.ZP=ve},46762:function(_n,hn){"use strict";var De;var Le=Symbol.for("react.element"),ye=Symbol.for("react.portal"),Fe=Symbol.for("react.fragment"),Me=Symbol.for("react.strict_mode"),Ee=Symbol.for("react.profiler"),me=Symbol.for("react.provider"),be=Symbol.for("react.context"),ve=Symbol.for("react.server_context"),we=Symbol.for("react.forward_ref"),ge=Symbol.for("react.suspense"),he=Symbol.for("react.suspense_list"),xe=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),ue=Symbol.for("react.offscreen"),ee;ee=Symbol.for("react.module.reference");function z(oe){if(typeof oe=="object"&&oe!==null){var ie=oe.$$typeof;switch(ie){case Le:switch(oe=oe.type,oe){case Fe:case Ee:case Me:case ge:case he:return oe;default:switch(oe=oe&&oe.$$typeof,oe){case ve:case be:case we:case fe:case xe:case me:return oe;default:return ie}}case ye:return ie}}}De=be,De=me,De=Le,De=we,De=Fe,De=fe,De=xe,De=ye,De=Ee,De=Me,De=ge,De=he,De=function(){return!1},De=function(){return!1},De=function(oe){return z(oe)===be},De=function(oe){return z(oe)===me},De=function(oe){return typeof oe=="object"&&oe!==null&&oe.$$typeof===Le},De=function(oe){return z(oe)===we},De=function(oe){return z(oe)===Fe},De=function(oe){return z(oe)===fe},De=function(oe){return z(oe)===xe},De=function(oe){return z(oe)===ye},De=function(oe){return z(oe)===Ee},De=function(oe){return z(oe)===Me},De=function(oe){return z(oe)===ge},De=function(oe){return z(oe)===he},De=function(oe){return typeof oe=="string"||typeof oe=="function"||oe===Fe||oe===Ee||oe===Me||oe===ge||oe===he||oe===ue||typeof oe=="object"&&oe!==null&&(oe.$$typeof===fe||oe.$$typeof===xe||oe.$$typeof===me||oe.$$typeof===be||oe.$$typeof===we||oe.$$typeof===ee||oe.getModuleId!==void 0)},De=z},35110:function(_n,hn,De){"use strict";De(46762)},86128:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return le}});var Le=De(87462),ye=De(4942),Fe=De(1413),Me=De(97685),Ee=De(45987),me=De(67294),be=De(94184),ve=De.n(be),we=De(64217),ge=De(27822),he=function(pe){for(var Ce=pe.prefixCls,Ae=pe.level,Oe=pe.isStart,Re=pe.isEnd,We="".concat(Ce,"-indent-unit"),$e=[],Je=0;Je<Ae;Je+=1)$e.push(me.createElement("span",{key:Je,className:ve()(We,(0,ye.Z)((0,ye.Z)({},"".concat(We,"-start"),Oe[Je]),"".concat(We,"-end"),Re[Je]))}));return me.createElement("span",{"aria-hidden":"true",className:"".concat(Ce,"-indent")},$e)},xe=me.memo(he),fe=De(35381),ue=De(1089),ee=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],z="open",oe="close",ie="---",se=function(pe){var Ce,Ae,Oe,Re=pe.eventKey,We=pe.className,$e=pe.style,Je=pe.dragOver,pt=pe.dragOverGapTop,St=pe.dragOverGapBottom,Mt=pe.isLeaf,ct=pe.isStart,wt=pe.isEnd,ft=pe.expanded,$t=pe.selected,st=pe.checked,et=pe.halfChecked,lt=pe.loading,dt=pe.domRef,bt=pe.active,yt=pe.data,Vt=pe.onMouseMove,Kt=pe.selectable,gn=(0,Ee.Z)(pe,ee),Gt=me.useContext(ge.k),Dt=me.useContext(ge.y),on=me.useRef(null),Jt=me.useState(!1),jt=(0,Me.Z)(Jt,2),ut=jt[0],ze=jt[1],je=!!(Gt.disabled||pe.disabled||(Ce=Dt.nodeDisabled)!==null&&Ce!==void 0&&Ce.call(Dt,yt)),it=me.useMemo(function(){return!Gt.checkable||pe.checkable===!1?!1:Gt.checkable},[Gt.checkable,pe.checkable]),ht=function(In){je||Gt.onNodeSelect(In,(0,ue.F)(pe))},nt=function(In){je||!it||pe.disableCheckbox||Gt.onNodeCheck(In,(0,ue.F)(pe),!st)},Ke=me.useMemo(function(){return typeof Kt=="boolean"?Kt:Gt.selectable},[Kt,Gt.selectable]),Be=function(In){Gt.onNodeClick(In,(0,ue.F)(pe)),Ke?ht(In):nt(In)},Ue=function(In){Gt.onNodeDoubleClick(In,(0,ue.F)(pe))},rt=function(In){Gt.onNodeMouseEnter(In,(0,ue.F)(pe))},Ze=function(In){Gt.onNodeMouseLeave(In,(0,ue.F)(pe))},Xe=function(In){Gt.onNodeContextMenu(In,(0,ue.F)(pe))},mt=me.useMemo(function(){return!!(Gt.draggable&&(!Gt.draggable.nodeDraggable||Gt.draggable.nodeDraggable(yt)))},[Gt.draggable,yt]),Rt=function(In){In.stopPropagation(),ze(!0),Gt.onNodeDragStart(In,pe);try{In.dataTransfer.setData("text/plain","")}catch(zi){}},vn=function(In){In.preventDefault(),In.stopPropagation(),Gt.onNodeDragEnter(In,pe)},An=function(In){In.preventDefault(),In.stopPropagation(),Gt.onNodeDragOver(In,pe)},Mn=function(In){In.stopPropagation(),Gt.onNodeDragLeave(In,pe)},hi=function(In){In.stopPropagation(),ze(!1),Gt.onNodeDragEnd(In,pe)},mi=function(In){In.preventDefault(),In.stopPropagation(),ze(!1),Gt.onNodeDrop(In,pe)},si=function(In){lt||Gt.onNodeExpand(In,(0,ue.F)(pe))},Cn=me.useMemo(function(){var Tn=(0,fe.Z)(Gt.keyEntities,Re)||{},In=Tn.children;return!!(In||[]).length},[Gt.keyEntities,Re]),Ki=me.useMemo(function(){return Mt===!1?!1:Mt||!Gt.loadData&&!Cn||Gt.loadData&&pe.loaded&&!Cn},[Mt,Gt.loadData,Cn,pe.loaded]);me.useEffect(function(){lt||typeof Gt.loadData=="function"&&ft&&!Ki&&!pe.loaded&&Gt.onNodeLoad((0,ue.F)(pe))},[lt,Gt.loadData,Gt.onNodeLoad,ft,Ki,pe]);var Yn=me.useMemo(function(){var Tn;return(Tn=Gt.draggable)!==null&&Tn!==void 0&&Tn.icon?me.createElement("span",{className:"".concat(Gt.prefixCls,"-draggable-icon")},Gt.draggable.icon):null},[Gt.draggable]),Qi=function(In){var zi=pe.switcherIcon||Gt.switcherIcon;return typeof zi=="function"?zi((0,Fe.Z)((0,Fe.Z)({},pe),{},{isLeaf:In})):zi},vr=function(){if(Ki){var In=Qi(!0);return In!==!1?me.createElement("span",{className:ve()("".concat(Gt.prefixCls,"-switcher"),"".concat(Gt.prefixCls,"-switcher-noop"))},In):null}var zi=Qi(!1);return zi!==!1?me.createElement("span",{onClick:si,className:ve()("".concat(Gt.prefixCls,"-switcher"),"".concat(Gt.prefixCls,"-switcher_").concat(ft?z:oe))},zi):null},Dr=me.useMemo(function(){if(!it)return null;var Tn=typeof it!="boolean"?it:null;return me.createElement("span",{className:ve()("".concat(Gt.prefixCls,"-checkbox"),(0,ye.Z)((0,ye.Z)((0,ye.Z)({},"".concat(Gt.prefixCls,"-checkbox-checked"),st),"".concat(Gt.prefixCls,"-checkbox-indeterminate"),!st&&et),"".concat(Gt.prefixCls,"-checkbox-disabled"),je||pe.disableCheckbox)),onClick:nt,role:"checkbox","aria-checked":et?"mixed":st,"aria-disabled":je||pe.disableCheckbox,"aria-label":"Select ".concat(typeof pe.title=="string"?pe.title:"tree node")},Tn)},[it,st,et,je,pe.disableCheckbox,pe.title]),Ci=me.useMemo(function(){return Ki?null:ft?z:oe},[Ki,ft]),kr=me.useMemo(function(){return me.createElement("span",{className:ve()("".concat(Gt.prefixCls,"-iconEle"),"".concat(Gt.prefixCls,"-icon__").concat(Ci||"docu"),(0,ye.Z)({},"".concat(Gt.prefixCls,"-icon_loading"),lt))})},[Gt.prefixCls,Ci,lt]),vo=me.useMemo(function(){var Tn=!!Gt.draggable,In=!pe.disabled&&Tn&&Gt.dragOverNodeKey===Re;return In?Gt.dropIndicatorRender({dropPosition:Gt.dropPosition,dropLevelOffset:Gt.dropLevelOffset,indent:Gt.indent,prefixCls:Gt.prefixCls,direction:Gt.direction}):null},[Gt.dropPosition,Gt.dropLevelOffset,Gt.indent,Gt.prefixCls,Gt.direction,Gt.draggable,Gt.dragOverNodeKey,Gt.dropIndicatorRender]),qo=me.useMemo(function(){var Tn=pe.title,In=Tn===void 0?ie:Tn,zi="".concat(Gt.prefixCls,"-node-content-wrapper"),Gi;if(Gt.showIcon){var Vi=pe.icon||Gt.icon;Gi=Vi?me.createElement("span",{className:ve()("".concat(Gt.prefixCls,"-iconEle"),"".concat(Gt.prefixCls,"-icon__customize"))},typeof Vi=="function"?Vi(pe):Vi):kr}else Gt.loadData&<&&(Gi=kr);var Zi;return typeof In=="function"?Zi=In(yt):Gt.titleRender?Zi=Gt.titleRender(yt):Zi=In,me.createElement("span",{ref:on,title:typeof In=="string"?In:"",className:ve()(zi,"".concat(zi,"-").concat(Ci||"normal"),(0,ye.Z)({},"".concat(Gt.prefixCls,"-node-selected"),!je&&($t||ut))),onMouseEnter:rt,onMouseLeave:Ze,onContextMenu:Xe,onClick:Be,onDoubleClick:Ue},Gi,me.createElement("span",{className:"".concat(Gt.prefixCls,"-title")},Zi),vo)},[Gt.prefixCls,Gt.showIcon,pe,Gt.icon,kr,Gt.titleRender,yt,Ci,rt,Ze,Xe,Be,Ue]),Do=(0,we.Z)(gn,{aria:!0,data:!0}),Oo=(0,fe.Z)(Gt.keyEntities,Re)||{},Cr=Oo.level,jo=wt[wt.length-1],or=!je&&mt,kn=Gt.draggingNodeKey===Re,qe=Kt!==void 0?{"aria-selected":!!Kt}:void 0;return me.createElement("div",(0,Le.Z)({ref:dt,role:"treeitem","aria-expanded":Mt?void 0:ft,className:ve()(We,"".concat(Gt.prefixCls,"-treenode"),(Oe={},(0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)(Oe,"".concat(Gt.prefixCls,"-treenode-disabled"),je),"".concat(Gt.prefixCls,"-treenode-switcher-").concat(ft?"open":"close"),!Mt),"".concat(Gt.prefixCls,"-treenode-checkbox-checked"),st),"".concat(Gt.prefixCls,"-treenode-checkbox-indeterminate"),et),"".concat(Gt.prefixCls,"-treenode-selected"),$t),"".concat(Gt.prefixCls,"-treenode-loading"),lt),"".concat(Gt.prefixCls,"-treenode-active"),bt),"".concat(Gt.prefixCls,"-treenode-leaf-last"),jo),"".concat(Gt.prefixCls,"-treenode-draggable"),mt),"dragging",kn),(0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)(Oe,"drop-target",Gt.dropTargetKey===Re),"drop-container",Gt.dropContainerKey===Re),"drag-over",!je&&Je),"drag-over-gap-top",!je&&pt),"drag-over-gap-bottom",!je&&St),"filter-node",(Ae=Gt.filterTreeNode)===null||Ae===void 0?void 0:Ae.call(Gt,(0,ue.F)(pe))),"".concat(Gt.prefixCls,"-treenode-leaf"),Ki))),style:$e,draggable:or,onDragStart:or?Rt:void 0,onDragEnter:mt?vn:void 0,onDragOver:mt?An:void 0,onDragLeave:mt?Mn:void 0,onDrop:mt?mi:void 0,onDragEnd:mt?hi:void 0,onMouseMove:Vt},qe,Do),me.createElement(xe,{prefixCls:Gt.prefixCls,level:Cr,isStart:ct,isEnd:wt}),Yn,vr(),Dr,qo)};se.isTreeNode=1;var le=se},27822:function(_n,hn,De){"use strict";De.d(hn,{k:function(){return ye},y:function(){return Fe}});var Le=De(67294),ye=Le.createContext(null),Fe=Le.createContext({})},70593:function(_n,hn,De){"use strict";De.d(hn,{OF:function(){return Re.Z},y6:function(){return oe.y},ZP:function(){return je}});var Le=De(87462),ye=De(71002),Fe=De(1413),Me=De(74902),Ee=De(15671),me=De(43144),be=De(97326),ve=De(60136),we=De(29388),ge=De(4942),he=De(94184),xe=De.n(he),fe=De(15105),ue=De(64217),ee=De(80334),z=De(67294),oe=De(27822),ie=function(ht){var nt=ht.dropPosition,Ke=ht.dropLevelOffset,Be=ht.indent,Ue={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(nt){case-1:Ue.top=0,Ue.left=-Ke*Be;break;case 1:Ue.bottom=0,Ue.left=-Ke*Be;break;case 0:Ue.bottom=0,Ue.left=Be;break}return z.createElement("div",{style:Ue})},se=ie;function le(it){if(it==null)throw new TypeError("Cannot destructure "+it)}var Se=De(97685),pe=De(45987),Ce=De(8410),Ae=De(73299),Oe=De(62874),Re=De(86128);function We(it,ht){var nt=z.useState(!1),Ke=(0,Se.Z)(nt,2),Be=Ke[0],Ue=Ke[1];(0,Ce.Z)(function(){if(Be)return it(),function(){ht()}},[Be]),(0,Ce.Z)(function(){return Ue(!0),function(){Ue(!1)}},[])}var $e=We,Je=De(1089),pt=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],St=z.forwardRef(function(it,ht){var nt=it.className,Ke=it.style,Be=it.motion,Ue=it.motionNodes,rt=it.motionType,Ze=it.onMotionStart,Xe=it.onMotionEnd,mt=it.active,Rt=it.treeNodeRequiredProps,vn=(0,pe.Z)(it,pt),An=z.useState(!0),Mn=(0,Se.Z)(An,2),hi=Mn[0],mi=Mn[1],si=z.useContext(oe.k),Cn=si.prefixCls,Ki=Ue&&rt!=="hide";(0,Ce.Z)(function(){Ue&&Ki!==hi&&mi(Ki)},[Ue]);var Yn=function(){Ue&&Ze()},Qi=z.useRef(!1),vr=function(){Ue&&!Qi.current&&(Qi.current=!0,Xe())};$e(Yn,vr);var Dr=function(kr){Ki===kr&&vr()};return Ue?z.createElement(Oe.Z,(0,Le.Z)({ref:ht,visible:hi},Be,{motionAppear:rt==="show",onVisibleChanged:Dr}),function(Ci,kr){var vo=Ci.className,qo=Ci.style;return z.createElement("div",{ref:kr,className:xe()("".concat(Cn,"-treenode-motion"),vo),style:qo},Ue.map(function(Do){var Oo=Object.assign({},(le(Do.data),Do.data)),Cr=Do.title,jo=Do.key,or=Do.isStart,kn=Do.isEnd;delete Oo.children;var qe=(0,Je.H8)(jo,Rt);return z.createElement(Re.Z,(0,Le.Z)({},Oo,qe,{title:Cr,active:mt,data:Do.data,key:jo,isStart:or,isEnd:kn}))}))}):z.createElement(Re.Z,(0,Le.Z)({domRef:ht,className:nt,style:Ke},vn,{active:mt}))}),Mt=St;function ct(){var it=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],nt=it.length,Ke=ht.length;if(Math.abs(nt-Ke)!==1)return{add:!1,key:null};function Be(Ue,rt){var Ze=new Map;Ue.forEach(function(mt){Ze.set(mt,!0)});var Xe=rt.filter(function(mt){return!Ze.has(mt)});return Xe.length===1?Xe[0]:null}return nt<Ke?{add:!0,key:Be(it,ht)}:{add:!1,key:Be(ht,it)}}function wt(it,ht,nt){var Ke=it.findIndex(function(Ze){return Ze.key===nt}),Be=it[Ke+1],Ue=ht.findIndex(function(Ze){return Ze.key===nt});if(Be){var rt=ht.findIndex(function(Ze){return Ze.key===Be.key});return ht.slice(Ue+1,rt)}return ht.slice(Ue+1)}var ft=["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"],$t={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},st=function(){},et="RC_TREE_MOTION_".concat(Math.random()),lt={key:et},dt={key:et,level:0,index:0,pos:"0",node:lt,nodes:[lt]},bt={parent:null,children:[],pos:dt.pos,data:lt,title:null,key:et,isStart:[],isEnd:[]};function yt(it,ht,nt,Ke){return ht===!1||!nt?it:it.slice(0,Math.ceil(nt/Ke)+1)}function Vt(it){var ht=it.key,nt=it.pos;return(0,Je.km)(ht,nt)}function Kt(it){for(var ht=String(it.data.key),nt=it;nt.parent;)nt=nt.parent,ht="".concat(nt.data.key," > ").concat(ht);return ht}var gn=z.forwardRef(function(it,ht){var nt=it.prefixCls,Ke=it.data,Be=it.selectable,Ue=it.checkable,rt=it.expandedKeys,Ze=it.selectedKeys,Xe=it.checkedKeys,mt=it.loadedKeys,Rt=it.loadingKeys,vn=it.halfCheckedKeys,An=it.keyEntities,Mn=it.disabled,hi=it.dragging,mi=it.dragOverNodeKey,si=it.dropPosition,Cn=it.motion,Ki=it.height,Yn=it.itemHeight,Qi=it.virtual,vr=it.scrollWidth,Dr=it.focusable,Ci=it.activeItem,kr=it.focused,vo=it.tabIndex,qo=it.onKeyDown,Do=it.onFocus,Oo=it.onBlur,Cr=it.onActiveChange,jo=it.onListChangeStart,or=it.onListChangeEnd,kn=(0,pe.Z)(it,ft),qe=z.useRef(null),Tn=z.useRef(null);z.useImperativeHandle(ht,function(){return{scrollTo:function(lr){qe.current.scrollTo(lr)},getIndentWidth:function(){return Tn.current.offsetWidth}}});var In=z.useState(rt),zi=(0,Se.Z)(In,2),Gi=zi[0],Vi=zi[1],Zi=z.useState(Ke),qr=(0,Se.Z)(Zi,2),sn=qr[0],He=qr[1],Ve=z.useState(Ke),ot=(0,Se.Z)(Ve,2),Lt=ot[0],At=ot[1],an=z.useState([]),Ot=(0,Se.Z)(an,2),xn=Ot[0],Zn=Ot[1],wi=z.useState(null),Bn=(0,Se.Z)(wi,2),rn=Bn[0],Fn=Bn[1],vi=z.useRef(Ke);vi.current=Ke;function _i(){var Ii=vi.current;He(Ii),At(Ii),Zn([]),Fn(null),or()}(0,Ce.Z)(function(){Vi(rt);var Ii=ct(Gi,rt);if(Ii.key!==null)if(Ii.add){var lr=sn.findIndex(function(jr){var ei=jr.key;return ei===Ii.key}),_r=yt(wt(sn,Ke,Ii.key),Qi,Ki,Yn),Ti=sn.slice();Ti.splice(lr+1,0,bt),At(Ti),Zn(_r),Fn("show")}else{var bi=Ke.findIndex(function(jr){var ei=jr.key;return ei===Ii.key}),li=yt(wt(Ke,sn,Ii.key),Qi,Ki,Yn),dr=Ke.slice();dr.splice(bi+1,0,bt),At(dr),Zn(li),Fn("hide")}else sn!==Ke&&(He(Ke),At(Ke))},[rt,Ke]),z.useEffect(function(){hi||_i()},[hi]);var cn=Cn?Lt:Ke,qn={expandedKeys:rt,selectedKeys:Ze,loadedKeys:mt,loadingKeys:Rt,checkedKeys:Xe,halfCheckedKeys:vn,dragOverNodeKey:mi,dropPosition:si,keyEntities:An};return z.createElement(z.Fragment,null,kr&&Ci&&z.createElement("span",{style:$t,"aria-live":"assertive"},Kt(Ci)),z.createElement("div",null,z.createElement("input",{style:$t,disabled:Dr===!1||Mn,tabIndex:Dr!==!1?vo:null,onKeyDown:qo,onFocus:Do,onBlur:Oo,value:"",onChange:st,"aria-label":"for screen reader"})),z.createElement("div",{className:"".concat(nt,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},z.createElement("div",{className:"".concat(nt,"-indent")},z.createElement("div",{ref:Tn,className:"".concat(nt,"-indent-unit")}))),z.createElement(Ae.Z,(0,Le.Z)({},kn,{data:cn,itemKey:Vt,height:Ki,fullHeight:!1,virtual:Qi,itemHeight:Yn,scrollWidth:vr,prefixCls:"".concat(nt,"-list"),ref:qe,role:"tree",onVisibleChange:function(lr){lr.every(function(_r){return Vt(_r)!==et})&&_i()}}),function(Ii){var lr=Ii.pos,_r=Object.assign({},(le(Ii.data),Ii.data)),Ti=Ii.title,bi=Ii.key,li=Ii.isStart,dr=Ii.isEnd,jr=(0,Je.km)(bi,lr);delete _r.key,delete _r.children;var ei=(0,Je.H8)(jr,qn);return z.createElement(Mt,(0,Le.Z)({},_r,ei,{title:Ti,active:!!Ci&&bi===Ci.key,pos:lr,data:Ii.data,isStart:li,isEnd:dr,motion:Cn,motionNodes:bi===et?xn:null,motionType:rn,onMotionStart:jo,onMotionEnd:_i,treeNodeRequiredProps:qn,onMouseMove:function(){Cr(null)}}))}))}),Gt=gn,Dt=De(10225),on=De(17341),Jt=De(35381),jt=10,ut=function(it){(0,ve.Z)(nt,it);var ht=(0,we.Z)(nt);function nt(){var Ke;(0,Ee.Z)(this,nt);for(var Be=arguments.length,Ue=new Array(Be),rt=0;rt<Be;rt++)Ue[rt]=arguments[rt];return Ke=ht.call.apply(ht,[this].concat(Ue)),(0,ge.Z)((0,be.Z)(Ke),"destroyed",!1),(0,ge.Z)((0,be.Z)(Ke),"delayedDragEnterLogic",void 0),(0,ge.Z)((0,be.Z)(Ke),"loadingRetryTimes",{}),(0,ge.Z)((0,be.Z)(Ke),"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,Je.w$)()}),(0,ge.Z)((0,be.Z)(Ke),"dragStartMousePosition",null),(0,ge.Z)((0,be.Z)(Ke),"dragNodeProps",null),(0,ge.Z)((0,be.Z)(Ke),"currentMouseOverDroppableNodeKey",null),(0,ge.Z)((0,be.Z)(Ke),"listRef",z.createRef()),(0,ge.Z)((0,be.Z)(Ke),"onNodeDragStart",function(Ze,Xe){var mt=Ke.state,Rt=mt.expandedKeys,vn=mt.keyEntities,An=Ke.props.onDragStart,Mn=Xe.eventKey;Ke.dragNodeProps=Xe,Ke.dragStartMousePosition={x:Ze.clientX,y:Ze.clientY};var hi=(0,Dt._5)(Rt,Mn);Ke.setState({draggingNodeKey:Mn,dragChildrenKeys:(0,Dt.wA)(Mn,vn),indent:Ke.listRef.current.getIndentWidth()}),Ke.setExpandedKeys(hi),window.addEventListener("dragend",Ke.onWindowDragEnd),An==null||An({event:Ze,node:(0,Je.F)(Xe)})}),(0,ge.Z)((0,be.Z)(Ke),"onNodeDragEnter",function(Ze,Xe){var mt=Ke.state,Rt=mt.expandedKeys,vn=mt.keyEntities,An=mt.dragChildrenKeys,Mn=mt.flattenNodes,hi=mt.indent,mi=Ke.props,si=mi.onDragEnter,Cn=mi.onExpand,Ki=mi.allowDrop,Yn=mi.direction,Qi=Xe.pos,vr=Xe.eventKey;if(Ke.currentMouseOverDroppableNodeKey!==vr&&(Ke.currentMouseOverDroppableNodeKey=vr),!Ke.dragNodeProps){Ke.resetDragState();return}var Dr=(0,Dt.OM)(Ze,Ke.dragNodeProps,Xe,hi,Ke.dragStartMousePosition,Ki,Mn,vn,Rt,Yn),Ci=Dr.dropPosition,kr=Dr.dropLevelOffset,vo=Dr.dropTargetKey,qo=Dr.dropContainerKey,Do=Dr.dropTargetPos,Oo=Dr.dropAllowed,Cr=Dr.dragOverNodeKey;if(An.includes(vo)||!Oo){Ke.resetDragState();return}if(Ke.delayedDragEnterLogic||(Ke.delayedDragEnterLogic={}),Object.keys(Ke.delayedDragEnterLogic).forEach(function(jo){clearTimeout(Ke.delayedDragEnterLogic[jo])}),Ke.dragNodeProps.eventKey!==Xe.eventKey&&(Ze.persist(),Ke.delayedDragEnterLogic[Qi]=window.setTimeout(function(){if(Ke.state.draggingNodeKey!==null){var jo=(0,Me.Z)(Rt),or=(0,Jt.Z)(vn,Xe.eventKey);or&&(or.children||[]).length&&(jo=(0,Dt.L0)(Rt,Xe.eventKey)),Ke.props.hasOwnProperty("expandedKeys")||Ke.setExpandedKeys(jo),Cn==null||Cn(jo,{node:(0,Je.F)(Xe),expanded:!0,nativeEvent:Ze.nativeEvent})}},800)),Ke.dragNodeProps.eventKey===vo&&kr===0){Ke.resetDragState();return}Ke.setState({dragOverNodeKey:Cr,dropPosition:Ci,dropLevelOffset:kr,dropTargetKey:vo,dropContainerKey:qo,dropTargetPos:Do,dropAllowed:Oo}),si==null||si({event:Ze,node:(0,Je.F)(Xe),expandedKeys:Rt})}),(0,ge.Z)((0,be.Z)(Ke),"onNodeDragOver",function(Ze,Xe){var mt=Ke.state,Rt=mt.dragChildrenKeys,vn=mt.flattenNodes,An=mt.keyEntities,Mn=mt.expandedKeys,hi=mt.indent,mi=Ke.props,si=mi.onDragOver,Cn=mi.allowDrop,Ki=mi.direction;if(Ke.dragNodeProps){var Yn=(0,Dt.OM)(Ze,Ke.dragNodeProps,Xe,hi,Ke.dragStartMousePosition,Cn,vn,An,Mn,Ki),Qi=Yn.dropPosition,vr=Yn.dropLevelOffset,Dr=Yn.dropTargetKey,Ci=Yn.dropContainerKey,kr=Yn.dropTargetPos,vo=Yn.dropAllowed,qo=Yn.dragOverNodeKey;Rt.includes(Dr)||!vo||(Ke.dragNodeProps.eventKey===Dr&&vr===0?Ke.state.dropPosition===null&&Ke.state.dropLevelOffset===null&&Ke.state.dropTargetKey===null&&Ke.state.dropContainerKey===null&&Ke.state.dropTargetPos===null&&Ke.state.dropAllowed===!1&&Ke.state.dragOverNodeKey===null||Ke.resetDragState():Qi===Ke.state.dropPosition&&vr===Ke.state.dropLevelOffset&&Dr===Ke.state.dropTargetKey&&Ci===Ke.state.dropContainerKey&&kr===Ke.state.dropTargetPos&&vo===Ke.state.dropAllowed&&qo===Ke.state.dragOverNodeKey||Ke.setState({dropPosition:Qi,dropLevelOffset:vr,dropTargetKey:Dr,dropContainerKey:Ci,dropTargetPos:kr,dropAllowed:vo,dragOverNodeKey:qo}),si==null||si({event:Ze,node:(0,Je.F)(Xe)}))}}),(0,ge.Z)((0,be.Z)(Ke),"onNodeDragLeave",function(Ze,Xe){Ke.currentMouseOverDroppableNodeKey===Xe.eventKey&&!Ze.currentTarget.contains(Ze.relatedTarget)&&(Ke.resetDragState(),Ke.currentMouseOverDroppableNodeKey=null);var mt=Ke.props.onDragLeave;mt==null||mt({event:Ze,node:(0,Je.F)(Xe)})}),(0,ge.Z)((0,be.Z)(Ke),"onWindowDragEnd",function(Ze){Ke.onNodeDragEnd(Ze,null,!0),window.removeEventListener("dragend",Ke.onWindowDragEnd)}),(0,ge.Z)((0,be.Z)(Ke),"onNodeDragEnd",function(Ze,Xe){var mt=Ke.props.onDragEnd;Ke.setState({dragOverNodeKey:null}),Ke.cleanDragState(),mt==null||mt({event:Ze,node:(0,Je.F)(Xe)}),Ke.dragNodeProps=null,window.removeEventListener("dragend",Ke.onWindowDragEnd)}),(0,ge.Z)((0,be.Z)(Ke),"onNodeDrop",function(Ze,Xe){var mt,Rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,vn=Ke.state,An=vn.dragChildrenKeys,Mn=vn.dropPosition,hi=vn.dropTargetKey,mi=vn.dropTargetPos,si=vn.dropAllowed;if(si){var Cn=Ke.props.onDrop;if(Ke.setState({dragOverNodeKey:null}),Ke.cleanDragState(),hi!==null){var Ki=(0,Fe.Z)((0,Fe.Z)({},(0,Je.H8)(hi,Ke.getTreeNodeRequiredProps())),{},{active:((mt=Ke.getActiveItem())===null||mt===void 0?void 0:mt.key)===hi,data:(0,Jt.Z)(Ke.state.keyEntities,hi).node}),Yn=An.includes(hi);(0,ee.ZP)(!Yn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Qi=(0,Dt.yx)(mi),vr={event:Ze,node:(0,Je.F)(Ki),dragNode:Ke.dragNodeProps?(0,Je.F)(Ke.dragNodeProps):null,dragNodesKeys:[Ke.dragNodeProps.eventKey].concat(An),dropToGap:Mn!==0,dropPosition:Mn+Number(Qi[Qi.length-1])};Rt||Cn==null||Cn(vr),Ke.dragNodeProps=null}}}),(0,ge.Z)((0,be.Z)(Ke),"cleanDragState",function(){var Ze=Ke.state.draggingNodeKey;Ze!==null&&Ke.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),Ke.dragStartMousePosition=null,Ke.currentMouseOverDroppableNodeKey=null}),(0,ge.Z)((0,be.Z)(Ke),"triggerExpandActionExpand",function(Ze,Xe){var mt=Ke.state,Rt=mt.expandedKeys,vn=mt.flattenNodes,An=Xe.expanded,Mn=Xe.key,hi=Xe.isLeaf;if(!(hi||Ze.shiftKey||Ze.metaKey||Ze.ctrlKey)){var mi=vn.filter(function(Cn){return Cn.key===Mn})[0],si=(0,Je.F)((0,Fe.Z)((0,Fe.Z)({},(0,Je.H8)(Mn,Ke.getTreeNodeRequiredProps())),{},{data:mi.data}));Ke.setExpandedKeys(An?(0,Dt._5)(Rt,Mn):(0,Dt.L0)(Rt,Mn)),Ke.onNodeExpand(Ze,si)}}),(0,ge.Z)((0,be.Z)(Ke),"onNodeClick",function(Ze,Xe){var mt=Ke.props,Rt=mt.onClick,vn=mt.expandAction;vn==="click"&&Ke.triggerExpandActionExpand(Ze,Xe),Rt==null||Rt(Ze,Xe)}),(0,ge.Z)((0,be.Z)(Ke),"onNodeDoubleClick",function(Ze,Xe){var mt=Ke.props,Rt=mt.onDoubleClick,vn=mt.expandAction;vn==="doubleClick"&&Ke.triggerExpandActionExpand(Ze,Xe),Rt==null||Rt(Ze,Xe)}),(0,ge.Z)((0,be.Z)(Ke),"onNodeSelect",function(Ze,Xe){var mt=Ke.state.selectedKeys,Rt=Ke.state,vn=Rt.keyEntities,An=Rt.fieldNames,Mn=Ke.props,hi=Mn.onSelect,mi=Mn.multiple,si=Xe.selected,Cn=Xe[An.key],Ki=!si;Ki?mi?mt=(0,Dt.L0)(mt,Cn):mt=[Cn]:mt=(0,Dt._5)(mt,Cn);var Yn=mt.map(function(Qi){var vr=(0,Jt.Z)(vn,Qi);return vr?vr.node:null}).filter(Boolean);Ke.setUncontrolledState({selectedKeys:mt}),hi==null||hi(mt,{event:"select",selected:Ki,node:Xe,selectedNodes:Yn,nativeEvent:Ze.nativeEvent})}),(0,ge.Z)((0,be.Z)(Ke),"onNodeCheck",function(Ze,Xe,mt){var Rt=Ke.state,vn=Rt.keyEntities,An=Rt.checkedKeys,Mn=Rt.halfCheckedKeys,hi=Ke.props,mi=hi.checkStrictly,si=hi.onCheck,Cn=Xe.key,Ki,Yn={event:"check",node:Xe,checked:mt,nativeEvent:Ze.nativeEvent};if(mi){var Qi=mt?(0,Dt.L0)(An,Cn):(0,Dt._5)(An,Cn),vr=(0,Dt._5)(Mn,Cn);Ki={checked:Qi,halfChecked:vr},Yn.checkedNodes=Qi.map(function(Do){return(0,Jt.Z)(vn,Do)}).filter(Boolean).map(function(Do){return Do.node}),Ke.setUncontrolledState({checkedKeys:Qi})}else{var Dr=(0,on.S)([].concat((0,Me.Z)(An),[Cn]),!0,vn),Ci=Dr.checkedKeys,kr=Dr.halfCheckedKeys;if(!mt){var vo=new Set(Ci);vo.delete(Cn);var qo=(0,on.S)(Array.from(vo),{checked:!1,halfCheckedKeys:kr},vn);Ci=qo.checkedKeys,kr=qo.halfCheckedKeys}Ki=Ci,Yn.checkedNodes=[],Yn.checkedNodesPositions=[],Yn.halfCheckedKeys=kr,Ci.forEach(function(Do){var Oo=(0,Jt.Z)(vn,Do);if(Oo){var Cr=Oo.node,jo=Oo.pos;Yn.checkedNodes.push(Cr),Yn.checkedNodesPositions.push({node:Cr,pos:jo})}}),Ke.setUncontrolledState({checkedKeys:Ci},!1,{halfCheckedKeys:kr})}si==null||si(Ki,Yn)}),(0,ge.Z)((0,be.Z)(Ke),"onNodeLoad",function(Ze){var Xe,mt=Ze.key,Rt=Ke.state.keyEntities,vn=(0,Jt.Z)(Rt,mt);if(!(vn!=null&&(Xe=vn.children)!==null&&Xe!==void 0&&Xe.length)){var An=new Promise(function(Mn,hi){Ke.setState(function(mi){var si=mi.loadedKeys,Cn=si===void 0?[]:si,Ki=mi.loadingKeys,Yn=Ki===void 0?[]:Ki,Qi=Ke.props,vr=Qi.loadData,Dr=Qi.onLoad;if(!vr||Cn.includes(mt)||Yn.includes(mt))return null;var Ci=vr(Ze);return Ci.then(function(){var kr=Ke.state.loadedKeys,vo=(0,Dt.L0)(kr,mt);Dr==null||Dr(vo,{event:"load",node:Ze}),Ke.setUncontrolledState({loadedKeys:vo}),Ke.setState(function(qo){return{loadingKeys:(0,Dt._5)(qo.loadingKeys,mt)}}),Mn()}).catch(function(kr){if(Ke.setState(function(qo){return{loadingKeys:(0,Dt._5)(qo.loadingKeys,mt)}}),Ke.loadingRetryTimes[mt]=(Ke.loadingRetryTimes[mt]||0)+1,Ke.loadingRetryTimes[mt]>=jt){var vo=Ke.state.loadedKeys;(0,ee.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Ke.setUncontrolledState({loadedKeys:(0,Dt.L0)(vo,mt)}),Mn()}hi(kr)}),{loadingKeys:(0,Dt.L0)(Yn,mt)}})});return An.catch(function(){}),An}}),(0,ge.Z)((0,be.Z)(Ke),"onNodeMouseEnter",function(Ze,Xe){var mt=Ke.props.onMouseEnter;mt==null||mt({event:Ze,node:Xe})}),(0,ge.Z)((0,be.Z)(Ke),"onNodeMouseLeave",function(Ze,Xe){var mt=Ke.props.onMouseLeave;mt==null||mt({event:Ze,node:Xe})}),(0,ge.Z)((0,be.Z)(Ke),"onNodeContextMenu",function(Ze,Xe){var mt=Ke.props.onRightClick;mt&&(Ze.preventDefault(),mt({event:Ze,node:Xe}))}),(0,ge.Z)((0,be.Z)(Ke),"onFocus",function(){var Ze=Ke.props.onFocus;Ke.setState({focused:!0});for(var Xe=arguments.length,mt=new Array(Xe),Rt=0;Rt<Xe;Rt++)mt[Rt]=arguments[Rt];Ze==null||Ze.apply(void 0,mt)}),(0,ge.Z)((0,be.Z)(Ke),"onBlur",function(){var Ze=Ke.props.onBlur;Ke.setState({focused:!1}),Ke.onActiveChange(null);for(var Xe=arguments.length,mt=new Array(Xe),Rt=0;Rt<Xe;Rt++)mt[Rt]=arguments[Rt];Ze==null||Ze.apply(void 0,mt)}),(0,ge.Z)((0,be.Z)(Ke),"getTreeNodeRequiredProps",function(){var Ze=Ke.state,Xe=Ze.expandedKeys,mt=Ze.selectedKeys,Rt=Ze.loadedKeys,vn=Ze.loadingKeys,An=Ze.checkedKeys,Mn=Ze.halfCheckedKeys,hi=Ze.dragOverNodeKey,mi=Ze.dropPosition,si=Ze.keyEntities;return{expandedKeys:Xe||[],selectedKeys:mt||[],loadedKeys:Rt||[],loadingKeys:vn||[],checkedKeys:An||[],halfCheckedKeys:Mn||[],dragOverNodeKey:hi,dropPosition:mi,keyEntities:si}}),(0,ge.Z)((0,be.Z)(Ke),"setExpandedKeys",function(Ze){var Xe=Ke.state,mt=Xe.treeData,Rt=Xe.fieldNames,vn=(0,Je.oH)(mt,Ze,Rt);Ke.setUncontrolledState({expandedKeys:Ze,flattenNodes:vn},!0)}),(0,ge.Z)((0,be.Z)(Ke),"onNodeExpand",function(Ze,Xe){var mt=Ke.state.expandedKeys,Rt=Ke.state,vn=Rt.listChanging,An=Rt.fieldNames,Mn=Ke.props,hi=Mn.onExpand,mi=Mn.loadData,si=Xe.expanded,Cn=Xe[An.key];if(!vn){var Ki=mt.includes(Cn),Yn=!si;if((0,ee.ZP)(si&&Ki||!si&&!Ki,"Expand state not sync with index check"),mt=Yn?(0,Dt.L0)(mt,Cn):(0,Dt._5)(mt,Cn),Ke.setExpandedKeys(mt),hi==null||hi(mt,{node:Xe,expanded:Yn,nativeEvent:Ze.nativeEvent}),Yn&&mi){var Qi=Ke.onNodeLoad(Xe);Qi&&Qi.then(function(){var vr=(0,Je.oH)(Ke.state.treeData,mt,An);Ke.setUncontrolledState({flattenNodes:vr})}).catch(function(){var vr=Ke.state.expandedKeys,Dr=(0,Dt._5)(vr,Cn);Ke.setExpandedKeys(Dr)})}}}),(0,ge.Z)((0,be.Z)(Ke),"onListChangeStart",function(){Ke.setUncontrolledState({listChanging:!0})}),(0,ge.Z)((0,be.Z)(Ke),"onListChangeEnd",function(){setTimeout(function(){Ke.setUncontrolledState({listChanging:!1})})}),(0,ge.Z)((0,be.Z)(Ke),"onActiveChange",function(Ze){var Xe=Ke.state.activeKey,mt=Ke.props,Rt=mt.onActiveChange,vn=mt.itemScrollOffset,An=vn===void 0?0:vn;Xe!==Ze&&(Ke.setState({activeKey:Ze}),Ze!==null&&Ke.scrollTo({key:Ze,offset:An}),Rt==null||Rt(Ze))}),(0,ge.Z)((0,be.Z)(Ke),"getActiveItem",function(){var Ze=Ke.state,Xe=Ze.activeKey,mt=Ze.flattenNodes;return Xe===null?null:mt.find(function(Rt){var vn=Rt.key;return vn===Xe})||null}),(0,ge.Z)((0,be.Z)(Ke),"offsetActiveKey",function(Ze){var Xe=Ke.state,mt=Xe.flattenNodes,Rt=Xe.activeKey,vn=mt.findIndex(function(hi){var mi=hi.key;return mi===Rt});vn===-1&&Ze<0&&(vn=mt.length),vn=(vn+Ze+mt.length)%mt.length;var An=mt[vn];if(An){var Mn=An.key;Ke.onActiveChange(Mn)}else Ke.onActiveChange(null)}),(0,ge.Z)((0,be.Z)(Ke),"onKeyDown",function(Ze){var Xe=Ke.state,mt=Xe.activeKey,Rt=Xe.expandedKeys,vn=Xe.checkedKeys,An=Xe.fieldNames,Mn=Ke.props,hi=Mn.onKeyDown,mi=Mn.checkable,si=Mn.selectable;switch(Ze.which){case fe.Z.UP:{Ke.offsetActiveKey(-1),Ze.preventDefault();break}case fe.Z.DOWN:{Ke.offsetActiveKey(1),Ze.preventDefault();break}}var Cn=Ke.getActiveItem();if(Cn&&Cn.data){var Ki=Ke.getTreeNodeRequiredProps(),Yn=Cn.data.isLeaf===!1||!!(Cn.data[An.children]||[]).length,Qi=(0,Je.F)((0,Fe.Z)((0,Fe.Z)({},(0,Je.H8)(mt,Ki)),{},{data:Cn.data,active:!0}));switch(Ze.which){case fe.Z.LEFT:{Yn&&Rt.includes(mt)?Ke.onNodeExpand({},Qi):Cn.parent&&Ke.onActiveChange(Cn.parent.key),Ze.preventDefault();break}case fe.Z.RIGHT:{Yn&&!Rt.includes(mt)?Ke.onNodeExpand({},Qi):Cn.children&&Cn.children.length&&Ke.onActiveChange(Cn.children[0].key),Ze.preventDefault();break}case fe.Z.ENTER:case fe.Z.SPACE:{mi&&!Qi.disabled&&Qi.checkable!==!1&&!Qi.disableCheckbox?Ke.onNodeCheck({},Qi,!vn.includes(mt)):!mi&&si&&!Qi.disabled&&Qi.selectable!==!1&&Ke.onNodeSelect({},Qi);break}}}hi==null||hi(Ze)}),(0,ge.Z)((0,be.Z)(Ke),"setUncontrolledState",function(Ze){var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,mt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Ke.destroyed){var Rt=!1,vn=!0,An={};Object.keys(Ze).forEach(function(Mn){if(Ke.props.hasOwnProperty(Mn)){vn=!1;return}Rt=!0,An[Mn]=Ze[Mn]}),Rt&&(!Xe||vn)&&Ke.setState((0,Fe.Z)((0,Fe.Z)({},An),mt))}}),(0,ge.Z)((0,be.Z)(Ke),"scrollTo",function(Ze){Ke.listRef.current.scrollTo(Ze)}),Ke}return(0,me.Z)(nt,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Be=this.props,Ue=Be.activeKey,rt=Be.itemScrollOffset,Ze=rt===void 0?0:rt;Ue!==void 0&&Ue!==this.state.activeKey&&(this.setState({activeKey:Ue}),Ue!==null&&this.scrollTo({key:Ue,offset:Ze}))}},{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 Be=this.state,Ue=Be.focused,rt=Be.flattenNodes,Ze=Be.keyEntities,Xe=Be.draggingNodeKey,mt=Be.activeKey,Rt=Be.dropLevelOffset,vn=Be.dropContainerKey,An=Be.dropTargetKey,Mn=Be.dropPosition,hi=Be.dragOverNodeKey,mi=Be.indent,si=this.props,Cn=si.prefixCls,Ki=si.className,Yn=si.style,Qi=si.showLine,vr=si.focusable,Dr=si.tabIndex,Ci=Dr===void 0?0:Dr,kr=si.selectable,vo=si.showIcon,qo=si.icon,Do=si.switcherIcon,Oo=si.draggable,Cr=si.checkable,jo=si.checkStrictly,or=si.disabled,kn=si.motion,qe=si.loadData,Tn=si.filterTreeNode,In=si.height,zi=si.itemHeight,Gi=si.scrollWidth,Vi=si.virtual,Zi=si.titleRender,qr=si.dropIndicatorRender,sn=si.onContextMenu,He=si.onScroll,Ve=si.direction,ot=si.rootClassName,Lt=si.rootStyle,At=(0,ue.Z)(this.props,{aria:!0,data:!0}),an;Oo&&((0,ye.Z)(Oo)==="object"?an=Oo:typeof Oo=="function"?an={nodeDraggable:Oo}:an={});var Ot={prefixCls:Cn,selectable:kr,showIcon:vo,icon:qo,switcherIcon:Do,draggable:an,draggingNodeKey:Xe,checkable:Cr,checkStrictly:jo,disabled:or,keyEntities:Ze,dropLevelOffset:Rt,dropContainerKey:vn,dropTargetKey:An,dropPosition:Mn,dragOverNodeKey:hi,indent:mi,direction:Ve,dropIndicatorRender:qr,loadData:qe,filterTreeNode:Tn,titleRender:Zi,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:Ot},z.createElement("div",{className:xe()(Cn,Ki,ot,(0,ge.Z)((0,ge.Z)((0,ge.Z)({},"".concat(Cn,"-show-line"),Qi),"".concat(Cn,"-focused"),Ue),"".concat(Cn,"-active-focused"),mt!==null)),style:Lt},z.createElement(Gt,(0,Le.Z)({ref:this.listRef,prefixCls:Cn,style:Yn,data:rt,disabled:or,selectable:kr,checkable:!!Cr,motion:kn,dragging:Xe!==null,height:In,itemHeight:zi,virtual:Vi,focusable:vr,focused:Ue,tabIndex:Ci,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:sn,onScroll:He,scrollWidth:Gi},this.getTreeNodeRequiredProps(),At))))}}],[{key:"getDerivedStateFromProps",value:function(Be,Ue){var rt=Ue.prevProps,Ze={prevProps:Be};function Xe(Ci){return!rt&&Be.hasOwnProperty(Ci)||rt&&rt[Ci]!==Be[Ci]}var mt,Rt=Ue.fieldNames;if(Xe("fieldNames")&&(Rt=(0,Je.w$)(Be.fieldNames),Ze.fieldNames=Rt),Xe("treeData")?mt=Be.treeData:Xe("children")&&((0,ee.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),mt=(0,Je.zn)(Be.children)),mt){Ze.treeData=mt;var vn=(0,Je.I8)(mt,{fieldNames:Rt});Ze.keyEntities=(0,Fe.Z)((0,ge.Z)({},et,dt),vn.keyEntities)}var An=Ze.keyEntities||Ue.keyEntities;if(Xe("expandedKeys")||rt&&Xe("autoExpandParent"))Ze.expandedKeys=Be.autoExpandParent||!rt&&Be.defaultExpandParent?(0,Dt.r7)(Be.expandedKeys,An):Be.expandedKeys;else if(!rt&&Be.defaultExpandAll){var Mn=(0,Fe.Z)({},An);delete Mn[et];var hi=[];Object.keys(Mn).forEach(function(Ci){var kr=Mn[Ci];kr.children&&kr.children.length&&hi.push(kr.key)}),Ze.expandedKeys=hi}else!rt&&Be.defaultExpandedKeys&&(Ze.expandedKeys=Be.autoExpandParent||Be.defaultExpandParent?(0,Dt.r7)(Be.defaultExpandedKeys,An):Be.defaultExpandedKeys);if(Ze.expandedKeys||delete Ze.expandedKeys,mt||Ze.expandedKeys){var mi=(0,Je.oH)(mt||Ue.treeData,Ze.expandedKeys||Ue.expandedKeys,Rt);Ze.flattenNodes=mi}if(Be.selectable&&(Xe("selectedKeys")?Ze.selectedKeys=(0,Dt.BT)(Be.selectedKeys,Be):!rt&&Be.defaultSelectedKeys&&(Ze.selectedKeys=(0,Dt.BT)(Be.defaultSelectedKeys,Be))),Be.checkable){var si;if(Xe("checkedKeys")?si=(0,Dt.E6)(Be.checkedKeys)||{}:!rt&&Be.defaultCheckedKeys?si=(0,Dt.E6)(Be.defaultCheckedKeys)||{}:mt&&(si=(0,Dt.E6)(Be.checkedKeys)||{checkedKeys:Ue.checkedKeys,halfCheckedKeys:Ue.halfCheckedKeys}),si){var Cn=si,Ki=Cn.checkedKeys,Yn=Ki===void 0?[]:Ki,Qi=Cn.halfCheckedKeys,vr=Qi===void 0?[]:Qi;if(!Be.checkStrictly){var Dr=(0,on.S)(Yn,!0,An);Yn=Dr.checkedKeys,vr=Dr.halfCheckedKeys}Ze.checkedKeys=Yn,Ze.halfCheckedKeys=vr}}return Xe("loadedKeys")&&(Ze.loadedKeys=Be.loadedKeys),Ze}}]),nt}(z.Component);(0,ge.Z)(ut,"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:se,allowDrop:function(){return!0},expandAction:!1}),(0,ge.Z)(ut,"TreeNode",Re.Z);var ze=ut,je=ze},10225:function(_n,hn,De){"use strict";De.d(hn,{BT:function(){return z},E6:function(){return se},L0:function(){return ge},OM:function(){return ee},_5:function(){return we},r7:function(){return le},wA:function(){return xe},yx:function(){return he}});var Le=De(74902),ye=De(71002),Fe=De(80334),Me=De(67294),Ee=De(86128),me=De(35381),be=De(1089),ve=null;function we(Se,pe){if(!Se)return[];var Ce=Se.slice(),Ae=Ce.indexOf(pe);return Ae>=0&&Ce.splice(Ae,1),Ce}function ge(Se,pe){var Ce=(Se||[]).slice();return Ce.indexOf(pe)===-1&&Ce.push(pe),Ce}function he(Se){return Se.split("-")}function xe(Se,pe){var Ce=[],Ae=(0,me.Z)(pe,Se);function Oe(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Re.forEach(function(We){var $e=We.key,Je=We.children;Ce.push($e),Oe(Je)})}return Oe(Ae.children),Ce}function fe(Se){if(Se.parent){var pe=he(Se.pos);return Number(pe[pe.length-1])===Se.parent.children.length-1}return!1}function ue(Se){var pe=he(Se.pos);return Number(pe[pe.length-1])===0}function ee(Se,pe,Ce,Ae,Oe,Re,We,$e,Je,pt){var St,Mt=Se.clientX,ct=Se.clientY,wt=Se.target.getBoundingClientRect(),ft=wt.top,$t=wt.height,st=(pt==="rtl"?-1:1)*(((Oe==null?void 0:Oe.x)||0)-Mt),et=(st-12)/Ae,lt=Je.filter(function(je){var it;return(it=$e[je])===null||it===void 0||(it=it.children)===null||it===void 0?void 0:it.length}),dt=(0,me.Z)($e,Ce.eventKey);if(ct<ft+$t/2){var bt=We.findIndex(function(je){return je.key===dt.key}),yt=bt<=0?0:bt-1,Vt=We[yt].key;dt=(0,me.Z)($e,Vt)}var Kt=dt.key,gn=dt,Gt=dt.key,Dt=0,on=0;if(!lt.includes(Kt))for(var Jt=0;Jt<et&&fe(dt);Jt+=1)dt=dt.parent,on+=1;var jt=pe.data,ut=dt.node,ze=!0;return ue(dt)&&dt.level===0&&ct<ft+$t/2&&Re({dragNode:jt,dropNode:ut,dropPosition:-1})&&dt.key===Ce.eventKey?Dt=-1:(gn.children||[]).length&<.includes(Gt)?Re({dragNode:jt,dropNode:ut,dropPosition:0})?Dt=0:ze=!1:on===0?et>-1.5?Re({dragNode:jt,dropNode:ut,dropPosition:1})?Dt=1:ze=!1:Re({dragNode:jt,dropNode:ut,dropPosition:0})?Dt=0:Re({dragNode:jt,dropNode:ut,dropPosition:1})?Dt=1:ze=!1:Re({dragNode:jt,dropNode:ut,dropPosition:1})?Dt=1:ze=!1,{dropPosition:Dt,dropLevelOffset:on,dropTargetKey:dt.key,dropTargetPos:dt.pos,dragOverNodeKey:Gt,dropContainerKey:Dt===0?null:((St=dt.parent)===null||St===void 0?void 0:St.key)||null,dropAllowed:ze}}function z(Se,pe){if(Se){var Ce=pe.multiple;return Ce?Se.slice():Se.length?[Se[0]]:Se}}var oe=function(pe){return pe};function ie(Se,pe){if(!Se)return[];var Ce=pe||{},Ae=Ce.processProps,Oe=Ae===void 0?oe:Ae,Re=Array.isArray(Se)?Se:[Se];return Re.map(function(We){var $e=We.children,Je=_objectWithoutProperties(We,ve),pt=ie($e,pe);return React.createElement(TreeNode,_extends({key:Je.key},Oe(Je)),pt)})}function se(Se){if(!Se)return null;var pe;if(Array.isArray(Se))pe={checkedKeys:Se,halfCheckedKeys:void 0};else if((0,ye.Z)(Se)==="object")pe={checkedKeys:Se.checked||void 0,halfCheckedKeys:Se.halfChecked||void 0};else return(0,Fe.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return pe}function le(Se,pe){var Ce=new Set;function Ae(Oe){if(!Ce.has(Oe)){var Re=(0,me.Z)(pe,Oe);if(Re){Ce.add(Oe);var We=Re.parent,$e=Re.node;$e.disabled||We&&Ae(We.key)}}}return(Se||[]).forEach(function(Oe){Ae(Oe)}),(0,Le.Z)(Ce)}},17341:function(_n,hn,De){"use strict";De.d(hn,{S:function(){return be}});var Le=De(80334),ye=De(35381);function Fe(ve,we){var ge=new Set;return ve.forEach(function(he){we.has(he)||ge.add(he)}),ge}function Me(ve){var we=ve||{},ge=we.disabled,he=we.disableCheckbox,xe=we.checkable;return!!(ge||he)||xe===!1}function Ee(ve,we,ge,he){for(var xe=new Set(ve),fe=new Set,ue=0;ue<=ge;ue+=1){var ee=we.get(ue)||new Set;ee.forEach(function(se){var le=se.key,Se=se.node,pe=se.children,Ce=pe===void 0?[]:pe;xe.has(le)&&!he(Se)&&Ce.filter(function(Ae){return!he(Ae.node)}).forEach(function(Ae){xe.add(Ae.key)})})}for(var z=new Set,oe=ge;oe>=0;oe-=1){var ie=we.get(oe)||new Set;ie.forEach(function(se){var le=se.parent,Se=se.node;if(!(he(Se)||!se.parent||z.has(se.parent.key))){if(he(se.parent.node)){z.add(le.key);return}var pe=!0,Ce=!1;(le.children||[]).filter(function(Ae){return!he(Ae.node)}).forEach(function(Ae){var Oe=Ae.key,Re=xe.has(Oe);pe&&!Re&&(pe=!1),!Ce&&(Re||fe.has(Oe))&&(Ce=!0)}),pe&&xe.add(le.key),Ce&&fe.add(le.key),z.add(le.key)}})}return{checkedKeys:Array.from(xe),halfCheckedKeys:Array.from(Fe(fe,xe))}}function me(ve,we,ge,he,xe){for(var fe=new Set(ve),ue=new Set(we),ee=0;ee<=he;ee+=1){var z=ge.get(ee)||new Set;z.forEach(function(le){var Se=le.key,pe=le.node,Ce=le.children,Ae=Ce===void 0?[]:Ce;!fe.has(Se)&&!ue.has(Se)&&!xe(pe)&&Ae.filter(function(Oe){return!xe(Oe.node)}).forEach(function(Oe){fe.delete(Oe.key)})})}ue=new Set;for(var oe=new Set,ie=he;ie>=0;ie-=1){var se=ge.get(ie)||new Set;se.forEach(function(le){var Se=le.parent,pe=le.node;if(!(xe(pe)||!le.parent||oe.has(le.parent.key))){if(xe(le.parent.node)){oe.add(Se.key);return}var Ce=!0,Ae=!1;(Se.children||[]).filter(function(Oe){return!xe(Oe.node)}).forEach(function(Oe){var Re=Oe.key,We=fe.has(Re);Ce&&!We&&(Ce=!1),!Ae&&(We||ue.has(Re))&&(Ae=!0)}),Ce||fe.delete(Se.key),Ae&&ue.add(Se.key),oe.add(Se.key)}})}return{checkedKeys:Array.from(fe),halfCheckedKeys:Array.from(Fe(ue,fe))}}function be(ve,we,ge,he){var xe=[],fe;he?fe=he:fe=Me;var ue=new Set(ve.filter(function(ie){var se=!!(0,ye.Z)(ge,ie);return se||xe.push(ie),se})),ee=new Map,z=0;Object.keys(ge).forEach(function(ie){var se=ge[ie],le=se.level,Se=ee.get(le);Se||(Se=new Set,ee.set(le,Se)),Se.add(se),z=Math.max(z,le)}),(0,Le.ZP)(!xe.length,"Tree missing follow keys: ".concat(xe.slice(0,100).map(function(ie){return"'".concat(ie,"'")}).join(", ")));var oe;return we===!0?oe=Ee(ue,ee,z,fe):oe=me(ue,we.halfCheckedKeys,ee,z,fe),oe}},35381:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return Le}});function Le(ye,Fe){return ye[Fe]}},1089:function(_n,hn,De){"use strict";De.d(hn,{F:function(){return le},H8:function(){return se},I8:function(){return ie},km:function(){return xe},oH:function(){return z},w$:function(){return fe},zn:function(){return ee}});var Le=De(71002),ye=De(74902),Fe=De(1413),Me=De(45987),Ee=De(50344),me=De(98423),be=De(80334),ve=De(35381),we=["children"];function ge(Se,pe){return"".concat(Se,"-").concat(pe)}function he(Se){return Se&&Se.type&&Se.type.isTreeNode}function xe(Se,pe){return Se!=null?Se:pe}function fe(Se){var pe=Se||{},Ce=pe.title,Ae=pe._title,Oe=pe.key,Re=pe.children,We=Ce||"title";return{title:We,_title:Ae||[We],key:Oe||"key",children:Re||"children"}}function ue(Se,pe){var Ce=new Map;function Ae(Oe){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Oe||[]).forEach(function(We){var $e=We[pe.key],Je=We[pe.children];warning($e!=null,"Tree node must have a certain key: [".concat(Re).concat($e,"]"));var pt=String($e);warning(!Ce.has(pt)||$e===null||$e===void 0,"Same 'key' exist in the Tree: ".concat(pt)),Ce.set(pt,!0),Ae(Je,"".concat(Re).concat(pt," > "))})}Ae(Se)}function ee(Se){function pe(Ce){var Ae=(0,Ee.Z)(Ce);return Ae.map(function(Oe){if(!he(Oe))return(0,be.ZP)(!Oe,"Tree/TreeNode can only accept TreeNode as children."),null;var Re=Oe.key,We=Oe.props,$e=We.children,Je=(0,Me.Z)(We,we),pt=(0,Fe.Z)({key:Re},Je),St=pe($e);return St.length&&(pt.children=St),pt}).filter(function(Oe){return Oe})}return pe(Se)}function z(Se,pe,Ce){var Ae=fe(Ce),Oe=Ae._title,Re=Ae.key,We=Ae.children,$e=new Set(pe===!0?[]:pe),Je=[];function pt(St){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return St.map(function(ct,wt){for(var ft=ge(Mt?Mt.pos:"0",wt),$t=xe(ct[Re],ft),st,et=0;et<Oe.length;et+=1){var lt=Oe[et];if(ct[lt]!==void 0){st=ct[lt];break}}var dt=Object.assign((0,me.Z)(ct,[].concat((0,ye.Z)(Oe),[Re,We])),{title:st,key:$t,parent:Mt,pos:ft,children:null,data:ct,isStart:[].concat((0,ye.Z)(Mt?Mt.isStart:[]),[wt===0]),isEnd:[].concat((0,ye.Z)(Mt?Mt.isEnd:[]),[wt===St.length-1])});return Je.push(dt),pe===!0||$e.has($t)?dt.children=pt(ct[We]||[],dt):dt.children=[],dt})}return pt(Se),Je}function oe(Se,pe,Ce){var Ae={};(0,Le.Z)(Ce)==="object"?Ae=Ce:Ae={externalGetKey:Ce},Ae=Ae||{};var Oe=Ae,Re=Oe.childrenPropName,We=Oe.externalGetKey,$e=Oe.fieldNames,Je=fe($e),pt=Je.key,St=Je.children,Mt=Re||St,ct;We?typeof We=="string"?ct=function($t){return $t[We]}:typeof We=="function"&&(ct=function($t){return We($t)}):ct=function($t,st){return xe($t[pt],st)};function wt(ft,$t,st,et){var lt=ft?ft[Mt]:Se,dt=ft?ge(st.pos,$t):"0",bt=ft?[].concat((0,ye.Z)(et),[ft]):[];if(ft){var yt=ct(ft,dt),Vt={node:ft,index:$t,pos:dt,key:yt,parentPos:st.node?st.pos:null,level:st.level+1,nodes:bt};pe(Vt)}lt&<.forEach(function(Kt,gn){wt(Kt,gn,{node:ft,pos:dt,level:st?st.level+1:-1},bt)})}wt(null)}function ie(Se){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ce=pe.initWrapper,Ae=pe.processEntity,Oe=pe.onProcessFinished,Re=pe.externalGetKey,We=pe.childrenPropName,$e=pe.fieldNames,Je=arguments.length>2?arguments[2]:void 0,pt=Re||Je,St={},Mt={},ct={posEntities:St,keyEntities:Mt};return Ce&&(ct=Ce(ct)||ct),oe(Se,function(wt){var ft=wt.node,$t=wt.index,st=wt.pos,et=wt.key,lt=wt.parentPos,dt=wt.level,bt=wt.nodes,yt={node:ft,nodes:bt,index:$t,key:et,pos:st,level:dt},Vt=xe(et,st);St[st]=yt,Mt[Vt]=yt,yt.parent=St[lt],yt.parent&&(yt.parent.children=yt.parent.children||[],yt.parent.children.push(yt)),Ae&&Ae(yt,ct)},{externalGetKey:pt,childrenPropName:We,fieldNames:$e}),Oe&&Oe(ct),ct}function se(Se,pe){var Ce=pe.expandedKeys,Ae=pe.selectedKeys,Oe=pe.loadedKeys,Re=pe.loadingKeys,We=pe.checkedKeys,$e=pe.halfCheckedKeys,Je=pe.dragOverNodeKey,pt=pe.dropPosition,St=pe.keyEntities,Mt=(0,ve.Z)(St,Se),ct={eventKey:Se,expanded:Ce.indexOf(Se)!==-1,selected:Ae.indexOf(Se)!==-1,loaded:Oe.indexOf(Se)!==-1,loading:Re.indexOf(Se)!==-1,checked:We.indexOf(Se)!==-1,halfChecked:$e.indexOf(Se)!==-1,pos:String(Mt?Mt.pos:""),dragOver:Je===Se&&pt===0,dragOverGapTop:Je===Se&&pt===-1,dragOverGapBottom:Je===Se&&pt===1};return ct}function le(Se){var pe=Se.data,Ce=Se.expanded,Ae=Se.selected,Oe=Se.checked,Re=Se.loaded,We=Se.loading,$e=Se.halfChecked,Je=Se.dragOver,pt=Se.dragOverGapTop,St=Se.dragOverGapBottom,Mt=Se.pos,ct=Se.active,wt=Se.eventKey,ft=(0,Fe.Z)((0,Fe.Z)({},pe),{},{expanded:Ce,selected:Ae,checked:Oe,loaded:Re,loading:We,halfChecked:$e,dragOver:Je,dragOverGapTop:pt,dragOverGapBottom:St,pos:Mt,active:ct,key:wt});return"props"in ft||Object.defineProperty(ft,"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`."),Se}}),ft}},73299:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return or}});var Le=De(87462),ye=De(1413),Fe=De(71002),Me=De(97685),Ee=De(4942),me=De(45987),be=De(67294),ve=De(73935),we=De(94184),ge=De.n(we),he=De(48555),xe=be.forwardRef(function(kn,qe){var Tn=kn.height,In=kn.offsetY,zi=kn.offsetX,Gi=kn.children,Vi=kn.prefixCls,Zi=kn.onInnerResize,qr=kn.innerProps,sn=kn.rtl,He=kn.extra,Ve={},ot={display:"flex",flexDirection:"column"};if(In!==void 0){var Lt;Ve={height:Tn,position:"relative",overflow:"hidden"},ot=(0,ye.Z)((0,ye.Z)({},ot),{},(Lt={transform:"translateY(".concat(In,"px)")},(0,Ee.Z)(Lt,sn?"marginRight":"marginLeft",-zi),(0,Ee.Z)(Lt,"position","absolute"),(0,Ee.Z)(Lt,"left",0),(0,Ee.Z)(Lt,"right",0),(0,Ee.Z)(Lt,"top",0),Lt))}return be.createElement("div",{style:Ve},be.createElement(he.Z,{onResize:function(an){var Ot=an.offsetHeight;Ot&&Zi&&Zi()}},be.createElement("div",(0,Le.Z)({style:ot,className:ge()((0,Ee.Z)({},"".concat(Vi,"-holder-inner"),Vi)),ref:qe},qr),Gi,He)))});xe.displayName="Filler";var fe=xe,ue=function(qe){return+setTimeout(qe,16)},ee=function(qe){return clearTimeout(qe)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(ue=function(qe){return window.requestAnimationFrame(qe)},ee=function(qe){return window.cancelAnimationFrame(qe)});var z=0,oe=new Map;function ie(kn){oe.delete(kn)}var se=function(qe){var Tn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;z+=1;var In=z;function zi(Gi){if(Gi===0)ie(In),qe();else{var Vi=ue(function(){zi(Gi-1)});oe.set(In,Vi)}}return zi(Tn),In};se.cancel=function(kn){var qe=oe.get(kn);return ie(qe),ee(qe)};var le=se;function Se(kn,qe){var Tn="touches"in kn?kn.touches[0]:kn;return Tn[qe?"pageX":"pageY"]}var pe=be.forwardRef(function(kn,qe){var Tn,In=kn.prefixCls,zi=kn.rtl,Gi=kn.scrollOffset,Vi=kn.scrollRange,Zi=kn.onStartMove,qr=kn.onStopMove,sn=kn.onScroll,He=kn.horizontal,Ve=kn.spinSize,ot=kn.containerSize,Lt=kn.style,At=kn.thumbStyle,an=be.useState(!1),Ot=(0,Me.Z)(an,2),xn=Ot[0],Zn=Ot[1],wi=be.useState(null),Bn=(0,Me.Z)(wi,2),rn=Bn[0],Fn=Bn[1],vi=be.useState(null),_i=(0,Me.Z)(vi,2),cn=_i[0],qn=_i[1],Ii=!zi,lr=be.useRef(),_r=be.useRef(),Ti=be.useState(!1),bi=(0,Me.Z)(Ti,2),li=bi[0],dr=bi[1],jr=be.useRef(),ei=function(){clearTimeout(jr.current),dr(!0),jr.current=setTimeout(function(){dr(!1)},3e3)},Ui=Vi-ot||0,ws=ot-Ve||0,cs=Ui>0,Io=be.useMemo(function(){if(Gi===0||Ui===0)return 0;var Yr=Gi/Ui;return Yr*ws},[Gi,Ui,ws]),dn=function(Fo){Fo.stopPropagation(),Fo.preventDefault()},gr=be.useRef({top:Io,dragging:xn,pageY:rn,startTop:cn});gr.current={top:Io,dragging:xn,pageY:rn,startTop:cn};var Zr=function(Fo){Zn(!0),Fn(Se(Fo,He)),qn(gr.current.top),Zi(),Fo.stopPropagation(),Fo.preventDefault()};be.useEffect(function(){var Yr=function(Ut){Ut.preventDefault()},Fo=lr.current,zn=_r.current;return Fo.addEventListener("touchstart",Yr),zn.addEventListener("touchstart",Zr),function(){Fo.removeEventListener("touchstart",Yr),zn.removeEventListener("touchstart",Zr)}},[]);var $i=be.useRef();$i.current=Ui;var yo=be.useRef();yo.current=ws,be.useEffect(function(){if(xn){var Yr,Fo=function(Ut){var en=gr.current,jn=en.dragging,Ft=en.pageY,Yt=en.startTop;if(le.cancel(Yr),jn){var nn=Se(Ut,He)-Ft,yn=Yt;!Ii&&He?yn-=nn:yn+=nn;var Xn=$i.current,yi=yo.current,gi=yi?yn/yi:0,Dn=Math.ceil(gi*Xn);Dn=Math.max(Dn,0),Dn=Math.min(Dn,Xn),Yr=le(function(){sn(Dn,He)})}},zn=function(){Zn(!1),qr()};return window.addEventListener("mousemove",Fo),window.addEventListener("touchmove",Fo),window.addEventListener("mouseup",zn),window.addEventListener("touchend",zn),function(){window.removeEventListener("mousemove",Fo),window.removeEventListener("touchmove",Fo),window.removeEventListener("mouseup",zn),window.removeEventListener("touchend",zn),le.cancel(Yr)}}},[xn]),be.useEffect(function(){ei()},[Gi]),be.useImperativeHandle(qe,function(){return{delayHidden:ei}});var Rr="".concat(In,"-scrollbar"),uo={position:"absolute",visibility:li&&cs?null:"hidden"},to={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return He?(uo.height=8,uo.left=0,uo.right=0,uo.bottom=0,to.height="100%",to.width=Ve,Ii?to.left=Io:to.right=Io):(uo.width=8,uo.top=0,uo.bottom=0,Ii?uo.right=0:uo.left=0,to.width="100%",to.height=Ve,to.top=Io),be.createElement("div",{ref:lr,className:ge()(Rr,(Tn={},(0,Ee.Z)(Tn,"".concat(Rr,"-horizontal"),He),(0,Ee.Z)(Tn,"".concat(Rr,"-vertical"),!He),(0,Ee.Z)(Tn,"".concat(Rr,"-visible"),li),Tn)),style:(0,ye.Z)((0,ye.Z)({},uo),Lt),onMouseDown:dn,onMouseMove:ei},be.createElement("div",{ref:_r,className:ge()("".concat(Rr,"-thumb"),(0,Ee.Z)({},"".concat(Rr,"-thumb-moving"),xn)),style:(0,ye.Z)((0,ye.Z)({},to),At),onMouseDown:Zr}))}),Ce=pe;function Ae(kn){var qe=kn.children,Tn=kn.setRef,In=be.useCallback(function(zi){Tn(zi)},[]);return be.cloneElement(qe,{ref:In})}function Oe(kn,qe,Tn,In,zi,Gi,Vi){var Zi=Vi.getKey;return kn.slice(qe,Tn+1).map(function(qr,sn){var He=qe+sn,Ve=Gi(qr,He,{style:{width:In}}),ot=Zi(qr);return be.createElement(Ae,{key:ot,setRef:function(At){return zi(qr,At)}},Ve)})}function Re(kn){return kn instanceof HTMLElement||kn instanceof SVGElement}function We(kn){return Re(kn)?kn:kn instanceof be.Component?ve.findDOMNode(kn):null}var $e=De(15671),Je=De(43144),pt=function(){function kn(){(0,$e.Z)(this,kn),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,Je.Z)(kn,[{key:"set",value:function(Tn,In){this.maps[Tn]=In,this.id+=1}},{key:"get",value:function(Tn){return this.maps[Tn]}}]),kn}(),St=pt;function Mt(kn,qe,Tn){var In=be.useState(0),zi=(0,Me.Z)(In,2),Gi=zi[0],Vi=zi[1],Zi=(0,be.useRef)(new Map),qr=(0,be.useRef)(new St),sn=(0,be.useRef)();function He(){le.cancel(sn.current)}function Ve(){var Lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;He();var At=function(){Zi.current.forEach(function(Ot,xn){if(Ot&&Ot.offsetParent){var Zn=We(Ot),wi=Zn.offsetHeight;qr.current.get(xn)!==wi&&qr.current.set(xn,Zn.offsetHeight)}}),Vi(function(Ot){return Ot+1})};Lt?At():sn.current=le(At)}function ot(Lt,At){var an=kn(Lt),Ot=Zi.current.get(an);At?(Zi.current.set(an,At),Ve()):Zi.current.delete(an),!Ot!=!At&&(At?qe==null||qe(Lt):Tn==null||Tn(Lt))}return(0,be.useEffect)(function(){return He},[]),[ot,Ve,qr.current,Gi]}function ct(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var wt=ct()?be.useLayoutEffect:be.useEffect,ft=function(qe,Tn){var In=be.useRef(!0);wt(function(){return qe(In.current)},Tn),wt(function(){return In.current=!1,function(){In.current=!0}},[])},$t=function(qe,Tn){ft(function(In){if(!In)return qe()},Tn)},st=ft;function et(kn){var qe=be.useRef();qe.current=kn;var Tn=be.useCallback(function(){for(var In,zi=arguments.length,Gi=new Array(zi),Vi=0;Vi<zi;Vi++)Gi[Vi]=arguments[Vi];return(In=qe.current)===null||In===void 0?void 0:In.call.apply(In,[qe].concat(Gi))},[]);return Tn}function lt(kn){var qe=React.useRef(!1),Tn=React.useState(kn),In=_slicedToArray(Tn,2),zi=In[0],Gi=In[1];React.useEffect(function(){return qe.current=!1,function(){qe.current=!0}},[]);function Vi(Zi,qr){qr&&qe.current||Gi(Zi)}return[zi,Vi]}function dt(kn){return kn!==void 0}function bt(kn,qe){var Tn=qe||{},In=Tn.defaultValue,zi=Tn.value,Gi=Tn.onChange,Vi=Tn.postState,Zi=useState(function(){return dt(zi)?zi:dt(In)?typeof In=="function"?In():In:typeof kn=="function"?kn():kn}),qr=_slicedToArray(Zi,2),sn=qr[0],He=qr[1],Ve=zi!==void 0?zi:sn,ot=Vi?Vi(Ve):Ve,Lt=useEvent(Gi),At=useState([Ve]),an=_slicedToArray(At,2),Ot=an[0],xn=an[1];useLayoutUpdateEffect(function(){var wi=Ot[0];sn!==wi&&Lt(sn,wi)},[Ot]),useLayoutUpdateEffect(function(){dt(zi)||He(zi)},[zi]);var Zn=useEvent(function(wi,Bn){He(wi,Bn),xn([Ve],Bn)});return[ot,Zn]}var yt=De(31461);function Vt(kn,qe,Tn){var In=React.useRef({});return(!("value"in In.current)||Tn(In.current.condition,qe))&&(In.current.value=kn(),In.current.condition=qe),In.current.value}function Kt(kn,qe){typeof kn=="function"?kn(qe):_typeof(kn)==="object"&&kn&&"current"in kn&&(kn.current=qe)}function gn(){for(var kn=arguments.length,qe=new Array(kn),Tn=0;Tn<kn;Tn++)qe[Tn]=arguments[Tn];var In=qe.filter(function(zi){return zi});return In.length<=1?In[0]:function(zi){qe.forEach(function(Gi){Kt(Gi,zi)})}}function Gt(){for(var kn=arguments.length,qe=new Array(kn),Tn=0;Tn<kn;Tn++)qe[Tn]=arguments[Tn];return useMemo(function(){return gn.apply(void 0,qe)},qe,function(In,zi){return In.length!==zi.length||In.every(function(Gi,Vi){return Gi!==zi[Vi]})})}function Dt(kn){var qe,Tn,In=isMemo(kn)?kn.type.type:kn.type;return!(typeof In=="function"&&!((qe=In.prototype)!==null&&qe!==void 0&&qe.render)||typeof kn=="function"&&!((Tn=kn.prototype)!==null&&Tn!==void 0&&Tn.render))}function on(kn){return!isValidElement(kn)||isFragment(kn)?!1:Dt(kn)}function Jt(kn,qe,Tn,In){if(!qe.length)return Tn;var zi=_toArray(qe),Gi=zi[0],Vi=zi.slice(1),Zi;return!kn&&typeof Gi=="number"?Zi=[]:Array.isArray(kn)?Zi=_toConsumableArray(kn):Zi=_objectSpread({},kn),In&&Tn===void 0&&Vi.length===1?delete Zi[Gi][Vi[0]]:Zi[Gi]=Jt(Zi[Gi],Vi,Tn,In),Zi}function jt(kn,qe,Tn){var In=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return qe.length&&In&&Tn===void 0&&!get(kn,qe.slice(0,-1))?kn:Jt(kn,qe,Tn,In)}function ut(kn){return _typeof(kn)==="object"&&kn!==null&&Object.getPrototypeOf(kn)===Object.prototype}function ze(kn){return Array.isArray(kn)?[]:{}}var je=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function it(){for(var kn=arguments.length,qe=new Array(kn),Tn=0;Tn<kn;Tn++)qe[Tn]=arguments[Tn];var In=ze(qe[0]);return qe.forEach(function(zi){function Gi(Vi,Zi){var qr=new Set(Zi),sn=get(zi,Vi),He=Array.isArray(sn);if(He||ut(sn)){if(!qr.has(sn)){qr.add(sn);var Ve=get(In,Vi);He?In=jt(In,Vi,[]):(!Ve||_typeof(Ve)!=="object")&&(In=jt(In,Vi,ze(sn))),je(sn).forEach(function(ot){Gi([].concat(_toConsumableArray(Vi),[ot]),qr)})}}else In=jt(In,Vi,sn)}Gi([])}),In}var ht={},nt=[],Ke=function(qe){nt.push(qe)};function Be(kn,qe){if(0)var Tn}function Ue(kn,qe){if(0)var Tn}function rt(){ht={}}function Ze(kn,qe,Tn){!qe&&!ht[Tn]&&(kn(!1,Tn),ht[Tn]=!0)}function Xe(kn,qe){Ze(Be,kn,qe)}function mt(kn,qe){Ze(Ue,kn,qe)}Xe.preMessage=Ke,Xe.resetWarned=rt,Xe.noteOnce=mt;var Rt=null,vn=10;function An(kn,qe,Tn,In,zi,Gi,Vi,Zi){var qr=be.useRef(),sn=be.useState(null),He=(0,Me.Z)(sn,2),Ve=He[0],ot=He[1];return st(function(){if(Ve&&Ve.times<vn){if(!kn.current){ot(function(ei){return(0,ye.Z)({},ei)});return}Gi();var Lt=Ve.targetAlign,At=Ve.originAlign,an=Ve.index,Ot=Ve.offset,xn=kn.current.clientHeight,Zn=!1,wi=Lt,Bn=null;if(xn){for(var rn=Lt||At,Fn=0,vi=0,_i=0,cn=Math.min(qe.length-1,an),qn=0;qn<=cn;qn+=1){var Ii=zi(qe[qn]);vi=Fn;var lr=Tn.get(Ii);_i=vi+(lr===void 0?In:lr),Fn=_i}for(var _r=rn==="top"?Ot:xn-Ot,Ti=cn;Ti>=0;Ti-=1){var bi=zi(qe[Ti]),li=Tn.get(bi);if(li===void 0){Zn=!0;break}if(_r-=li,_r<=0)break}switch(rn){case"top":Bn=vi-Ot;break;case"bottom":Bn=_i-xn+Ot;break;default:{var dr=kn.current.scrollTop,jr=dr+xn;vi<dr?wi="top":_i>jr&&(wi="bottom")}}Bn!==null&&Vi(Bn),Bn!==Ve.lastTop&&(Zn=!0)}Zn&&ot(function(ei){return(0,ye.Z)((0,ye.Z)({},ei),{},{times:ei.times+1,targetAlign:wi,lastTop:Bn})})}},[Ve,kn.current]),function(Lt){if(Lt==null){Zi();return}if(le.cancel(qr.current),typeof Lt=="number")Vi(Lt);else if(Lt&&(0,Fe.Z)(Lt)==="object"){var At,an=Lt.align;"index"in Lt?At=Lt.index:At=qe.findIndex(function(Zn){return zi(Zn)===Lt.key});var Ot=Lt.offset,xn=Ot===void 0?0:Ot;ot({times:0,index:At,offset:xn,originAlign:an})}}}function Mn(kn,qe,Tn,In){var zi=Tn-kn,Gi=qe-Tn,Vi=Math.min(zi,Gi)*2;if(In<=Vi){var Zi=Math.floor(In/2);return In%2?Tn+Zi+1:Tn-Zi}return zi>Gi?Tn-(In-Gi):Tn+(In-zi)}function hi(kn,qe,Tn){var In=kn.length,zi=qe.length,Gi,Vi;if(In===0&&zi===0)return null;In<zi?(Gi=kn,Vi=qe):(Gi=qe,Vi=kn);var Zi={__EMPTY_ITEM__:!0};function qr(At){return At!==void 0?Tn(At):Zi}for(var sn=null,He=Math.abs(In-zi)!==1,Ve=0;Ve<Vi.length;Ve+=1){var ot=qr(Gi[Ve]),Lt=qr(Vi[Ve]);if(ot!==Lt){sn=Ve,He=He||ot!==qr(Vi[Ve+1]);break}}return sn===null?null:{index:sn,multiple:He}}function mi(kn,qe,Tn){var In=be.useState(kn),zi=(0,Me.Z)(In,2),Gi=zi[0],Vi=zi[1],Zi=be.useState(null),qr=(0,Me.Z)(Zi,2),sn=qr[0],He=qr[1];return be.useEffect(function(){var Ve=hi(Gi||[],kn||[],qe);(Ve==null?void 0:Ve.index)!==void 0&&(Tn==null||Tn(Ve.index),He(kn[Ve.index])),Vi(kn)},[kn]),[sn]}var si=(typeof navigator=="undefined"?"undefined":(0,Fe.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Cn=si,Ki=function(kn,qe){var Tn=(0,be.useRef)(!1),In=(0,be.useRef)(null);function zi(){clearTimeout(In.current),Tn.current=!0,In.current=setTimeout(function(){Tn.current=!1},50)}var Gi=(0,be.useRef)({top:kn,bottom:qe});return Gi.current.top=kn,Gi.current.bottom=qe,function(Vi){var Zi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,qr=Vi<0&&Gi.current.top||Vi>0&&Gi.current.bottom;return Zi&&qr?(clearTimeout(In.current),Tn.current=!1):(!qr||Tn.current)&&zi(),!Tn.current&&qr}};function Yn(kn,qe,Tn,In,zi){var Gi=(0,be.useRef)(0),Vi=(0,be.useRef)(null),Zi=(0,be.useRef)(null),qr=(0,be.useRef)(!1),sn=Ki(qe,Tn);function He(Ot,xn){le.cancel(Vi.current),Gi.current+=xn,Zi.current=xn,!sn(xn)&&(Cn||Ot.preventDefault(),Vi.current=le(function(){var Zn=qr.current?10:1;zi(Gi.current*Zn),Gi.current=0}))}function Ve(Ot,xn){zi(xn,!0),Cn||Ot.preventDefault()}var ot=(0,be.useRef)(null),Lt=(0,be.useRef)(null);function At(Ot){if(kn){le.cancel(Lt.current),Lt.current=le(function(){ot.current=null},2);var xn=Ot.deltaX,Zn=Ot.deltaY,wi=Ot.shiftKey,Bn=xn,rn=Zn;(ot.current==="sx"||!ot.current&&wi&&Zn&&!xn)&&(Bn=Zn,rn=0,ot.current="sx");var Fn=Math.abs(Bn),vi=Math.abs(rn);ot.current===null&&(ot.current=In&&Fn>vi?"x":"y"),ot.current==="y"?He(Ot,rn):Ve(Ot,Bn)}}function an(Ot){kn&&(qr.current=Ot.detail===Zi.current)}return[At,an]}var Qi=14/15;function vr(kn,qe,Tn){var In=(0,be.useRef)(!1),zi=(0,be.useRef)(0),Gi=(0,be.useRef)(null),Vi=(0,be.useRef)(null),Zi,qr=function(ot){if(In.current){var Lt=Math.ceil(ot.touches[0].pageY),At=zi.current-Lt;zi.current=Lt,Tn(At)&&ot.preventDefault(),clearInterval(Vi.current),Vi.current=setInterval(function(){At*=Qi,(!Tn(At,!0)||Math.abs(At)<=.1)&&clearInterval(Vi.current)},16)}},sn=function(){In.current=!1,Zi()},He=function(ot){Zi(),ot.touches.length===1&&!In.current&&(In.current=!0,zi.current=Math.ceil(ot.touches[0].pageY),Gi.current=ot.target,Gi.current.addEventListener("touchmove",qr),Gi.current.addEventListener("touchend",sn))};Zi=function(){Gi.current&&(Gi.current.removeEventListener("touchmove",qr),Gi.current.removeEventListener("touchend",sn))},st(function(){return kn&&qe.current.addEventListener("touchstart",He),function(){var Ve;(Ve=qe.current)===null||Ve===void 0||Ve.removeEventListener("touchstart",He),Zi(),clearInterval(Vi.current)}},[kn])}var Dr=20;function Ci(){var kn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Tn=kn/qe*100;return isNaN(Tn)&&(Tn=0),Tn=Math.max(Tn,Dr),Tn=Math.min(Tn,kn/2),Math.floor(Tn)}function kr(kn,qe,Tn,In){var zi=be.useMemo(function(){return[new Map,[]]},[kn,Tn.id,In]),Gi=(0,Me.Z)(zi,2),Vi=Gi[0],Zi=Gi[1],qr=function(He){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:He,ot=Vi.get(He),Lt=Vi.get(Ve);if(ot===void 0||Lt===void 0)for(var At=kn.length,an=Zi.length;an<At;an+=1){var Ot,xn=kn[an],Zn=qe(xn);Vi.set(Zn,an);var wi=(Ot=Tn.get(Zn))!==null&&Ot!==void 0?Ot:In;if(Zi[an]=(Zi[an-1]||0)+wi,Zn===He&&(ot=an),Zn===Ve&&(Lt=an),ot!==void 0&&Lt!==void 0)break}return{top:Zi[ot-1]||0,bottom:Zi[Lt]}};return qr}var vo=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],qo=[],Do={overflowY:"auto",overflowAnchor:"none"};function Oo(kn,qe){var Tn=kn.prefixCls,In=Tn===void 0?"rc-virtual-list":Tn,zi=kn.className,Gi=kn.height,Vi=kn.itemHeight,Zi=kn.fullHeight,qr=Zi===void 0?!0:Zi,sn=kn.style,He=kn.data,Ve=kn.children,ot=kn.itemKey,Lt=kn.virtual,At=kn.direction,an=kn.scrollWidth,Ot=kn.component,xn=Ot===void 0?"div":Ot,Zn=kn.onScroll,wi=kn.onVirtualScroll,Bn=kn.onVisibleChange,rn=kn.innerProps,Fn=kn.extraRender,vi=kn.styles,_i=(0,me.Z)(kn,vo),cn=!!(Lt!==!1&&Gi&&Vi),qn=cn&&He&&(Vi*He.length>Gi||!!an),Ii=At==="rtl",lr=ge()(In,(0,Ee.Z)({},"".concat(In,"-rtl"),Ii),zi),_r=He||qo,Ti=(0,be.useRef)(),bi=(0,be.useRef)(),li=(0,be.useState)(0),dr=(0,Me.Z)(li,2),jr=dr[0],ei=dr[1],Ui=(0,be.useState)(0),ws=(0,Me.Z)(Ui,2),cs=ws[0],Io=ws[1],dn=(0,be.useState)(!1),gr=(0,Me.Z)(dn,2),Zr=gr[0],$i=gr[1],yo=function(){$i(!0)},Rr=function(){$i(!1)},uo=be.useCallback(function(pr){return typeof ot=="function"?ot(pr):pr==null?void 0:pr[ot]},[ot]),to={getKey:uo};function Yr(pr){ei(function(Gr){var po;typeof pr=="function"?po=pr(Gr):po=pr;var Ro=Di(po);return Ti.current.scrollTop=Ro,Ro})}var Fo=(0,be.useRef)({start:0,end:_r.length}),zn=(0,be.useRef)(),ns=mi(_r,uo),Ut=(0,Me.Z)(ns,1),en=Ut[0];zn.current=en;var jn=Mt(uo,null,null),Ft=(0,Me.Z)(jn,4),Yt=Ft[0],nn=Ft[1],yn=Ft[2],Xn=Ft[3],yi=be.useMemo(function(){if(!cn)return{scrollHeight:void 0,start:0,end:_r.length-1,offset:void 0};if(!qn){var pr;return{scrollHeight:((pr=bi.current)===null||pr===void 0?void 0:pr.offsetHeight)||0,start:0,end:_r.length-1,offset:void 0}}for(var Gr=0,po,Ro,Ei,ms=_r.length,hs=0;hs<ms;hs+=1){var ds=_r[hs],ia=uo(ds),ra=yn.get(ia),di=Gr+(ra===void 0?Vi:ra);di>=jr&&po===void 0&&(po=hs,Ro=Gr),di>jr+Gi&&Ei===void 0&&(Ei=hs),Gr=di}return po===void 0&&(po=0,Ro=0,Ei=Math.ceil(Gi/Vi)),Ei===void 0&&(Ei=_r.length-1),Ei=Math.min(Ei+1,_r.length-1),{scrollHeight:Gr,start:po,end:Ei,offset:Ro}},[qn,cn,jr,_r,Xn,Gi]),gi=yi.scrollHeight,Dn=yi.start,vt=yi.end,Sr=yi.offset;Fo.current.start=Dn,Fo.current.end=vt;var Er=be.useState({width:0,height:Gi}),no=(0,Me.Z)(Er,2),io=no[0],ro=no[1],zr=function(Gr){ro({width:Gr.width||Gr.offsetWidth,height:Gr.height||Gr.offsetHeight})},Go=(0,be.useRef)(),co=(0,be.useRef)(),br=be.useMemo(function(){return Ci(io.width,an)},[io.width,an]),ir=be.useMemo(function(){return Ci(io.height,gi)},[io.height,gi]),Pi=gi-Gi,ui=(0,be.useRef)(Pi);ui.current=Pi;function Di(pr){var Gr=pr;return Number.isNaN(ui.current)||(Gr=Math.min(Gr,ui.current)),Gr=Math.max(Gr,0),Gr}var Sn=jr<=0,ji=jr>=Pi,Wi=Ki(Sn,ji),Ur=function(){return{x:Ii?-cs:cs,y:jr}},Xr=(0,be.useRef)(Ur()),Jr=et(function(){if(wi){var pr=Ur();(Xr.current.x!==pr.x||Xr.current.y!==pr.y)&&(wi(pr),Xr.current=pr)}});function xo(pr,Gr){var po=pr;Gr?((0,ve.flushSync)(function(){Io(po)}),Jr()):Yr(po)}function Qo(pr){var Gr=pr.currentTarget.scrollTop;Gr!==jr&&Yr(Gr),Zn==null||Zn(pr),Jr()}var Wo=function(Gr){var po=Gr,Ro=an-io.width;return po=Math.max(po,0),po=Math.min(po,Ro),po},_s=et(function(pr,Gr){Gr?((0,ve.flushSync)(function(){Io(function(po){var Ro=po+(Ii?-pr:pr);return Wo(Ro)})}),Jr()):Yr(function(po){var Ro=po+pr;return Ro})}),As=Yn(cn,Sn,ji,!!an,_s),pn=(0,Me.Z)(As,2),ss=pn[0],ps=pn[1];vr(cn,Ti,function(pr,Gr){return Wi(pr,Gr)?!1:(ss({preventDefault:function(){},deltaY:pr}),!0)}),st(function(){function pr(po){cn&&po.preventDefault()}var Gr=Ti.current;return Gr.addEventListener("wheel",ss),Gr.addEventListener("DOMMouseScroll",ps),Gr.addEventListener("MozMousePixelScroll",pr),function(){Gr.removeEventListener("wheel",ss),Gr.removeEventListener("DOMMouseScroll",ps),Gr.removeEventListener("MozMousePixelScroll",pr)}},[cn]),st(function(){an&&Io(function(pr){return Wo(pr)})},[io.width,an]);var Ts=function(){var Gr,po;(Gr=Go.current)===null||Gr===void 0||Gr.delayHidden(),(po=co.current)===null||po===void 0||po.delayHidden()},mo=An(Ti,_r,yn,Vi,uo,function(){return nn(!0)},Yr,Ts);be.useImperativeHandle(qe,function(){return{getScrollInfo:Ur,scrollTo:function(Gr){function po(Ro){return Ro&&(0,Fe.Z)(Ro)==="object"&&("left"in Ro||"top"in Ro)}po(Gr)?(Gr.left!==void 0&&Io(Wo(Gr.left)),mo(Gr.top)):mo(Gr)}}}),st(function(){if(Bn){var pr=_r.slice(Dn,vt+1);Bn(pr,_r)}},[Dn,vt,_r]);var Ns=kr(_r,uo,yn,Vi),Ss=Fn==null?void 0:Fn({start:Dn,end:vt,virtual:qn,offsetX:cs,offsetY:Sr,rtl:Ii,getSize:Ns}),Us=Oe(_r,Dn,vt,an,Yt,Ve,to),fo=null;Gi&&(fo=(0,ye.Z)((0,Ee.Z)({},qr?"height":"maxHeight",Gi),Do),cn&&(fo.overflowY="hidden",an&&(fo.overflowX="hidden"),Zr&&(fo.pointerEvents="none")));var Co={};return Ii&&(Co.dir="rtl"),be.createElement("div",(0,Le.Z)({style:(0,ye.Z)((0,ye.Z)({},sn),{},{position:"relative"}),className:lr},Co,_i),be.createElement(he.Z,{onResize:zr},be.createElement(xn,{className:"".concat(In,"-holder"),style:fo,ref:Ti,onScroll:Qo,onMouseEnter:Ts},be.createElement(fe,{prefixCls:In,height:gi,offsetX:cs,offsetY:Sr,scrollWidth:an,onInnerResize:nn,ref:bi,innerProps:rn,rtl:Ii,extra:Ss},Us))),qn&&gi>Gi&&be.createElement(Ce,{ref:Go,prefixCls:In,scrollOffset:jr,scrollRange:gi,rtl:Ii,onScroll:xo,onStartMove:yo,onStopMove:Rr,spinSize:ir,containerSize:io.height,style:vi==null?void 0:vi.verticalScrollBar,thumbStyle:vi==null?void 0:vi.verticalScrollBarThumb}),qn&&an&&be.createElement(Ce,{ref:co,prefixCls:In,scrollOffset:cs,scrollRange:an,rtl:Ii,onScroll:xo,onStartMove:yo,onStopMove:Rr,spinSize:br,containerSize:io.width,horizontal:!0,style:vi==null?void 0:vi.horizontalScrollBar,thumbStyle:vi==null?void 0:vi.horizontalScrollBarThumb}))}var Cr=be.forwardRef(Oo);Cr.displayName="List";var jo=Cr,or=jo},66392:function(_n,hn){"use strict";var De;var Le=Symbol.for("react.element"),ye=Symbol.for("react.portal"),Fe=Symbol.for("react.fragment"),Me=Symbol.for("react.strict_mode"),Ee=Symbol.for("react.profiler"),me=Symbol.for("react.provider"),be=Symbol.for("react.context"),ve=Symbol.for("react.server_context"),we=Symbol.for("react.forward_ref"),ge=Symbol.for("react.suspense"),he=Symbol.for("react.suspense_list"),xe=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),ue=Symbol.for("react.offscreen"),ee;ee=Symbol.for("react.module.reference");function z(oe){if(typeof oe=="object"&&oe!==null){var ie=oe.$$typeof;switch(ie){case Le:switch(oe=oe.type,oe){case Fe:case Ee:case Me:case ge:case he:return oe;default:switch(oe=oe&&oe.$$typeof,oe){case ve:case be:case we:case fe:case xe:case me:return oe;default:return ie}}case ye:return ie}}}De=be,De=me,De=Le,De=we,De=Fe,De=fe,De=xe,De=ye,De=Ee,De=Me,De=ge,De=he,De=function(){return!1},De=function(){return!1},De=function(oe){return z(oe)===be},De=function(oe){return z(oe)===me},De=function(oe){return typeof oe=="object"&&oe!==null&&oe.$$typeof===Le},De=function(oe){return z(oe)===we},De=function(oe){return z(oe)===Fe},De=function(oe){return z(oe)===fe},De=function(oe){return z(oe)===xe},De=function(oe){return z(oe)===ye},De=function(oe){return z(oe)===Ee},De=function(oe){return z(oe)===Me},De=function(oe){return z(oe)===ge},De=function(oe){return z(oe)===he},De=function(oe){return typeof oe=="string"||typeof oe=="function"||oe===Fe||oe===Ee||oe===Me||oe===ge||oe===he||oe===ue||typeof oe=="object"&&oe!==null&&(oe.$$typeof===fe||oe.$$typeof===xe||oe.$$typeof===me||oe.$$typeof===be||oe.$$typeof===we||oe.$$typeof===ee||oe.getModuleId!==void 0)},De=z},31461:function(_n,hn,De){"use strict";De(66392)},58971:function(_n,hn,De){var Le=De(62195),ye=De(39015),Fe=[De(19257)];_n.exports=Le.createStore(ye,Fe)},19257:function(_n,hn,De){_n.exports=Le;function Le(){return De(55703),{}}},55703: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(_n){return _n<10?"0"+_n:_n}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(_n){return rx_escapable.lastIndex=0,rx_escapable.test(_n)?'"'+_n.replace(rx_escapable,function(hn){var De=meta[hn];return typeof De=="string"?De:"\\u"+("0000"+hn.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+_n+'"'}function str(_n,hn){var De,Le,ye,Fe,Me=gap,Ee,me=hn[_n];switch(me&&typeof me=="object"&&typeof me.toJSON=="function"&&(me=me.toJSON(_n)),typeof rep=="function"&&(me=rep.call(hn,_n,me)),typeof me){case"string":return quote(me);case"number":return isFinite(me)?String(me):"null";case"boolean":case"null":return String(me);case"object":if(!me)return"null";if(gap+=indent,Ee=[],Object.prototype.toString.apply(me)==="[object Array]"){for(Fe=me.length,De=0;De<Fe;De+=1)Ee[De]=str(De,me)||"null";return ye=Ee.length===0?"[]":gap?`[
|
|
|
`+gap+Ee.join(`,
|
|
|
`+gap)+`
|
|
|
`+Me+"]":"["+Ee.join(",")+"]",gap=Me,ye}if(rep&&typeof rep=="object")for(Fe=rep.length,De=0;De<Fe;De+=1)typeof rep[De]=="string"&&(Le=rep[De],ye=str(Le,me),ye&&Ee.push(quote(Le)+(gap?": ":":")+ye));else for(Le in me)Object.prototype.hasOwnProperty.call(me,Le)&&(ye=str(Le,me),ye&&Ee.push(quote(Le)+(gap?": ":":")+ye));return ye=Ee.length===0?"{}":gap?`{
|
|
|
`+gap+Ee.join(`,
|
|
|
`+gap)+`
|
|
|
`+Me+"}":"{"+Ee.join(",")+"}",gap=Me,ye}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(_n,hn,De){var Le;if(gap="",indent="",typeof De=="number")for(Le=0;Le<De;Le+=1)indent+=" ";else typeof De=="string"&&(indent=De);if(rep=hn,hn&&typeof hn!="function"&&(typeof hn!="object"||typeof hn.length!="number"))throw new Error("JSON.stringify");return str("",{"":_n})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(_n,hn){var De,Le,ye=_n[hn];if(ye&&typeof ye=="object")for(De in ye)Object.prototype.hasOwnProperty.call(ye,De)&&(Le=walk(ye,De),Le!==void 0?ye[De]=Le:delete ye[De]);return reviver.call(_n,hn,ye)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(_n){return"\\u"+("0000"+_n.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")})}()},62195:function(_n,hn,De){var Le=De(69078),ye=Le.slice,Fe=Le.pluck,Me=Le.each,Ee=Le.bind,me=Le.create,be=Le.isList,ve=Le.isFunction,we=Le.isObject;_n.exports={createStore:xe};var ge={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 xe.apply(this,arguments)},addPlugin:function(fe){this._addPlugin(fe)},namespace:function(fe){return xe(this.storage,this.plugins,fe)}};function he(){var fe=typeof console=="undefined"?null:console;if(fe){var ue=fe.warn?fe.warn:fe.log;ue.apply(fe,arguments)}}function xe(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,ie=/^[a-zA-Z0-9_\-]*$/;if(!ie.test(ee))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var se={_namespacePrefix:z,_namespaceRegexp:oe,_testStorage:function(Se){try{var pe="__storejs__test__";Se.write(pe,pe);var Ce=Se.read(pe)===pe;return Se.remove(pe),Ce}catch(Ae){return!1}},_assignPluginFnProp:function(Se,pe){var Ce=this[pe];this[pe]=function(){var Oe=ye(arguments,0),Re=this;function We(){if(Ce)return Me(arguments,function(Je,pt){Oe[pt]=Je}),Ce.apply(Re,Oe)}var $e=[We].concat(Oe);return Se.apply(Re,$e)}},_serialize:function(Se){return JSON.stringify(Se)},_deserialize:function(Se,pe){if(!Se)return pe;var Ce="";try{Ce=JSON.parse(Se)}catch(Ae){Ce=Se}return Ce!==void 0?Ce:pe},_addStorage:function(Se){this.enabled||this._testStorage(Se)&&(this.storage=Se,this.enabled=!0)},_addPlugin:function(Se){var pe=this;if(be(Se)){Me(Se,function(Oe){pe._addPlugin(Oe)});return}var Ce=Fe(this.plugins,function(Oe){return Se===Oe});if(!Ce){if(this.plugins.push(Se),!ve(Se))throw new Error("Plugins must be function values that return objects");var Ae=Se.call(this);if(!we(Ae))throw new Error("Plugins must return an object of function properties");Me(Ae,function(Oe,Re){if(!ve(Oe))throw new Error("Bad plugin property: "+Re+" from plugin "+Se.name+". Plugins should only return functions.");pe._assignPluginFnProp(Oe,Re)})}},addStorage:function(Se){he("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(Se)}},le=me(se,ge,{plugins:[]});return le.raw={},Me(le,function(Se,pe){ve(Se)&&(le.raw[pe]=Ee(le,Se))}),Me(fe,function(Se){le._addStorage(Se)}),Me(ue,function(Se){le._addPlugin(Se)}),le}},69078:function(_n,hn,De){var Le=Ee(),ye=me(),Fe=be(),Me=typeof window!="undefined"?window:De.g;_n.exports={assign:Le,create:ye,trim:Fe,bind:ve,slice:we,each:ge,map:he,pluck:xe,isList:fe,isFunction:ue,isObject:ee,Global:Me};function Ee(){return Object.assign?Object.assign:function(oe,ie,se,le){for(var Se=1;Se<arguments.length;Se++)ge(Object(arguments[Se]),function(pe,Ce){oe[Ce]=pe});return oe}}function me(){if(Object.create)return function(ie,se,le,Se){var pe=we(arguments,1);return Le.apply(this,[Object.create(ie)].concat(pe))};{let oe=function(){};var z=oe;return function(se,le,Se,pe){var Ce=we(arguments,1);return oe.prototype=se,Le.apply(this,[new oe].concat(Ce))}}}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 ve(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 ge(z,oe){xe(z,function(ie,se){return oe(ie,se),!1})}function he(z,oe){var ie=fe(z)?[]:{};return xe(z,function(se,le){return ie[le]=oe(se,le),!1}),ie}function xe(z,oe){if(fe(z)){for(var ie=0;ie<z.length;ie++)if(oe(z[ie],ie))return z[ie]}else for(var se in z)if(z.hasOwnProperty(se)&&oe(z[se],se))return z[se]}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]"}},39015:function(_n,hn,De){_n.exports=[De(39627),De(95347),De(34524),De(45580),De(58855),De(8728)]},45580:function(_n,hn,De){var Le=De(69078),ye=Le.Global,Fe=Le.trim;_n.exports={name:"cookieStorage",read:Ee,write:be,each:me,remove:ve,clearAll:we};var Me=ye.document;function Ee(he){if(!he||!ge(he))return null;var xe="(?:^|.*;\\s*)"+escape(he).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(Me.cookie.replace(new RegExp(xe),"$1"))}function me(he){for(var xe=Me.cookie.split(/; ?/g),fe=xe.length-1;fe>=0;fe--)if(Fe(xe[fe])){var ue=xe[fe].split("="),ee=unescape(ue[0]),z=unescape(ue[1]);he(z,ee)}}function be(he,xe){he&&(Me.cookie=escape(he)+"="+escape(xe)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function ve(he){!he||!ge(he)||(Me.cookie=escape(he)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function we(){me(function(he,xe){ve(xe)})}function ge(he){return new RegExp("(?:^|;\\s*)"+escape(he).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(Me.cookie)}},39627:function(_n,hn,De){var Le=De(69078),ye=Le.Global;_n.exports={name:"localStorage",read:Me,write:Ee,each:me,remove:be,clearAll:ve};function Fe(){return ye.localStorage}function Me(we){return Fe().getItem(we)}function Ee(we,ge){return Fe().setItem(we,ge)}function me(we){for(var ge=Fe().length-1;ge>=0;ge--){var he=Fe().key(ge);we(Me(he),he)}}function be(we){return Fe().removeItem(we)}function ve(){return Fe().clear()}},8728:function(_n){_n.exports={name:"memoryStorage",read:De,write:Le,each:ye,remove:Fe,clearAll:Me};var hn={};function De(Ee){return hn[Ee]}function Le(Ee,me){hn[Ee]=me}function ye(Ee){for(var me in hn)hn.hasOwnProperty(me)&&Ee(hn[me],me)}function Fe(Ee){delete hn[Ee]}function Me(Ee){hn={}}},95347:function(_n,hn,De){var Le=De(69078),ye=Le.Global;_n.exports={name:"oldFF-globalStorage",read:Me,write:Ee,each:me,remove:be,clearAll:ve};var Fe=ye.globalStorage;function Me(we){return Fe[we]}function Ee(we,ge){Fe[we]=ge}function me(we){for(var ge=Fe.length-1;ge>=0;ge--){var he=Fe.key(ge);we(Fe[he],he)}}function be(we){return Fe.removeItem(we)}function ve(){me(function(we,ge){delete Fe[we]})}},34524:function(_n,hn,De){var Le=De(69078),ye=Le.Global;_n.exports={name:"oldIE-userDataStorage",write:be,read:ve,each:we,remove:ge,clearAll:he};var Fe="storejs",Me=ye.document,Ee=ue(),me=(ye.navigator?ye.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function be(ee,z){if(!me){var oe=fe(ee);Ee(function(ie){ie.setAttribute(oe,z),ie.save(Fe)})}}function ve(ee){if(!me){var z=fe(ee),oe=null;return Ee(function(ie){oe=ie.getAttribute(z)}),oe}}function we(ee){Ee(function(z){for(var oe=z.XMLDocument.documentElement.attributes,ie=oe.length-1;ie>=0;ie--){var se=oe[ie];ee(z.getAttribute(se.name),se.name)}})}function ge(ee){var z=fe(ee);Ee(function(oe){oe.removeAttribute(z),oe.save(Fe)})}function he(){Ee(function(ee){var z=ee.XMLDocument.documentElement.attributes;ee.load(Fe);for(var oe=z.length-1;oe>=0;oe--)ee.removeAttribute(z[oe].name);ee.save(Fe)})}var xe=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function fe(ee){return ee.replace(/^\d/,"___$&").replace(xe,"___")}function ue(){if(!Me||!Me.documentElement||!Me.documentElement.addBehavior)return null;var ee="script",z,oe,ie;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,ie=z.createElement("div")}catch(se){ie=Me.createElement("div"),z=Me.body}return function(se){var le=[].slice.call(arguments,0);le.unshift(ie),z.appendChild(ie),ie.addBehavior("#default#userData"),ie.load(Fe),se.apply(this,le),z.removeChild(ie)}}},58855:function(_n,hn,De){var Le=De(69078),ye=Le.Global;_n.exports={name:"sessionStorage",read:Me,write:Ee,each:me,remove:be,clearAll:ve};function Fe(){return ye.sessionStorage}function Me(we){return Fe().getItem(we)}function Ee(we,ge){return Fe().setItem(we,ge)}function me(we){for(var ge=Fe().length-1;ge>=0;ge--){var he=Fe().key(ge);we(Me(he),he)}}function be(we){return Fe().removeItem(we)}function ve(){return Fe().clear()}},18034:function(_n){var hn=arguments[3],De=arguments[4],Le=arguments[5],ye=JSON.stringify;_n.exports=function(Fe,Me){for(var Ee,me=Object.keys(Le),be=0,ve=me.length;be<ve;be++){var we=me[be],ge=Le[we].exports;if(ge===Fe||ge&&ge.default===Fe){Ee=we;break}}if(!Ee){Ee=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var he={},be=0,ve=me.length;be<ve;be++){var we=me[be];he[we]=we}De[Ee]=["function(require,module,exports){"+Fe+"(self); }",he]}var xe=Math.floor(Math.pow(16,8)*Math.random()).toString(16),fe={};fe[Ee]=Ee,De[xe]=["function(require,module,exports){var f = require("+ye(Ee)+");(f.default ? f.default : f)(self);}",fe];var ue={};ee(xe);function ee(Se){ue[Se]=!0;for(var pe in De[Se][1]){var Ce=De[Se][1][pe];ue[Ce]||ee(Ce)}}var z="("+hn+")({"+Object.keys(ue).map(function(Se){return ye(Se)+":["+De[Se][0]+","+ye(De[Se][1])+"]"}).join(",")+"},{},["+ye(xe)+"])",oe=window.URL||window.webkitURL||window.mozURL||window.msURL,ie=new Blob([z],{type:"text/javascript"});if(Me&&Me.bare)return ie;var se=oe.createObjectURL(ie),le=new Worker(se);return le.objectURL=se,le}},12320:function(_n){(function(hn,De){if(1)_n.exports=De();else var Le,ye})(window,function(){return function(hn){var De={};function Le(ye){if(De[ye])return De[ye].exports;var Fe=De[ye]={i:ye,l:!1,exports:{}};return hn[ye].call(Fe.exports,Fe,Fe.exports,Le),Fe.l=!0,Fe.exports}return Le.m=hn,Le.c=De,Le.d=function(ye,Fe,Me){Le.o(ye,Fe)||Object.defineProperty(ye,Fe,{enumerable:!0,get:Me})},Le.r=function(ye){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(ye,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(ye,"__esModule",{value:!0})},Le.t=function(ye,Fe){if(1&Fe&&(ye=Le(ye)),8&Fe||4&Fe&&typeof ye=="object"&&ye&&ye.__esModule)return ye;var Me=Object.create(null);if(Le.r(Me),Object.defineProperty(Me,"default",{enumerable:!0,value:ye}),2&Fe&&typeof ye!="string")for(var Ee in ye)Le.d(Me,Ee,function(me){return ye[me]}.bind(null,Ee));return Me},Le.n=function(ye){var Fe=ye&&ye.__esModule?function(){return ye.default}:function(){return ye};return Le.d(Fe,"a",Fe),Fe},Le.o=function(ye,Fe){return Object.prototype.hasOwnProperty.call(ye,Fe)},Le.p="",Le(Le.s=34)}([function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.forwardEvent=De.EventEmitter=void 0;var ye=function(){function Fe(){this._listeners=[],this._disposed=!1}return Object.defineProperty(Fe.prototype,"event",{get:function(){var Me=this;return this._event||(this._event=function(Ee){return Me._listeners.push(Ee),{dispose:function(){if(!Me._disposed){for(var me=0;me<Me._listeners.length;me++)if(Me._listeners[me]===Ee)return void Me._listeners.splice(me,1)}}}}),this._event},enumerable:!1,configurable:!0}),Fe.prototype.fire=function(Me,Ee){for(var me=[],be=0;be<this._listeners.length;be++)me.push(this._listeners[be]);for(be=0;be<me.length;be++)me[be].call(void 0,Me,Ee)},Fe.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},Fe}();De.EventEmitter=ye,De.forwardEvent=function(Fe,Me){return Fe(function(Ee){return Me.fire(Ee)})}},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.IUnicodeService=De.IOptionsService=De.ILogService=De.IInstantiationService=De.IDirtyRowService=De.ICharsetService=De.ICoreService=De.ICoreMouseService=De.IBufferService=void 0;var ye=Le(14);De.IBufferService=ye.createDecorator("BufferService"),De.ICoreMouseService=ye.createDecorator("CoreMouseService"),De.ICoreService=ye.createDecorator("CoreService"),De.ICharsetService=ye.createDecorator("CharsetService"),De.IDirtyRowService=ye.createDecorator("DirtyRowService"),De.IInstantiationService=ye.createDecorator("InstantiationService"),De.ILogService=ye.createDecorator("LogService"),De.IOptionsService=ye.createDecorator("OptionsService"),De.IUnicodeService=ye.createDecorator("UnicodeService")},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.getDisposeArrayDisposable=De.disposeArray=De.Disposable=void 0;var ye=function(){function Me(){this._disposables=[],this._isDisposed=!1}return Me.prototype.dispose=function(){this._isDisposed=!0;for(var Ee=0,me=this._disposables;Ee<me.length;Ee++)me[Ee].dispose();this._disposables.length=0},Me.prototype.register=function(Ee){return this._disposables.push(Ee),Ee},Me.prototype.unregister=function(Ee){var me=this._disposables.indexOf(Ee);me!==-1&&this._disposables.splice(me,1)},Me}();function Fe(Me){for(var Ee=0,me=Me;Ee<me.length;Ee++)me[Ee].dispose();Me.length=0}De.Disposable=ye,De.disposeArray=Fe,De.getDisposeArrayDisposable=function(Me){return{dispose:function(){return Fe(Me)}}}},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.WHITESPACE_CELL_CODE=De.WHITESPACE_CELL_WIDTH=De.WHITESPACE_CELL_CHAR=De.NULL_CELL_CODE=De.NULL_CELL_WIDTH=De.NULL_CELL_CHAR=De.CHAR_DATA_CODE_INDEX=De.CHAR_DATA_WIDTH_INDEX=De.CHAR_DATA_CHAR_INDEX=De.CHAR_DATA_ATTR_INDEX=De.DEFAULT_ATTR=De.DEFAULT_COLOR=void 0,De.DEFAULT_COLOR=256,De.DEFAULT_ATTR=256|De.DEFAULT_COLOR<<9,De.CHAR_DATA_ATTR_INDEX=0,De.CHAR_DATA_CHAR_INDEX=1,De.CHAR_DATA_WIDTH_INDEX=2,De.CHAR_DATA_CODE_INDEX=3,De.NULL_CELL_CHAR="",De.NULL_CELL_WIDTH=1,De.NULL_CELL_CODE=0,De.WHITESPACE_CELL_CHAR=" ",De.WHITESPACE_CELL_WIDTH=1,De.WHITESPACE_CELL_CODE=32},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(ve,we){return(ye=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ge,he){ge.__proto__=he}||function(ge,he){for(var xe in he)he.hasOwnProperty(xe)&&(ge[xe]=he[xe])})(ve,we)},function(ve,we){function ge(){this.constructor=ve}ye(ve,we),ve.prototype=we===null?Object.create(we):(ge.prototype=we.prototype,new ge)});Object.defineProperty(De,"__esModule",{value:!0}),De.CellData=void 0;var Me=Le(8),Ee=Le(3),me=Le(6),be=function(ve){function we(){var ge=ve!==null&&ve.apply(this,arguments)||this;return ge.content=0,ge.fg=0,ge.bg=0,ge.extended=new me.ExtendedAttrs,ge.combinedData="",ge}return Fe(we,ve),we.fromCharData=function(ge){var he=new we;return he.setFromCharData(ge),he},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(ge){this.fg=ge[Ee.CHAR_DATA_ATTR_INDEX],this.bg=0;var he=!1;if(ge[Ee.CHAR_DATA_CHAR_INDEX].length>2)he=!0;else if(ge[Ee.CHAR_DATA_CHAR_INDEX].length===2){var xe=ge[Ee.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=xe&&xe<=56319){var fe=ge[Ee.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=fe&&fe<=57343?this.content=1024*(xe-55296)+fe-56320+65536|ge[Ee.CHAR_DATA_WIDTH_INDEX]<<22:he=!0}else he=!0}else this.content=ge[Ee.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|ge[Ee.CHAR_DATA_WIDTH_INDEX]<<22;he&&(this.combinedData=ge[Ee.CHAR_DATA_CHAR_INDEX],this.content=2097152|ge[Ee.CHAR_DATA_WIDTH_INDEX]<<22)},we.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},we}(me.AttributeData);De.CellData=be},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.ISoundService=De.ISelectionService=De.IRenderService=De.IMouseService=De.ICoreBrowserService=De.ICharSizeService=void 0;var ye=Le(14);De.ICharSizeService=ye.createDecorator("CharSizeService"),De.ICoreBrowserService=ye.createDecorator("CoreBrowserService"),De.IMouseService=ye.createDecorator("MouseService"),De.IRenderService=ye.createDecorator("RenderService"),De.ISelectionService=ye.createDecorator("SelectionService"),De.ISoundService=ye.createDecorator("SoundService")},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.ExtendedAttrs=De.AttributeData=void 0;var ye=function(){function Me(){this.fg=0,this.bg=0,this.extended=new Fe}return Me.toColorRGB=function(Ee){return[Ee>>>16&255,Ee>>>8&255,255&Ee]},Me.fromColorRGB=function(Ee){return(255&Ee[0])<<16|(255&Ee[1])<<8|255&Ee[2]},Me.prototype.clone=function(){var Ee=new Me;return Ee.fg=this.fg,Ee.bg=this.bg,Ee.extended=this.extended.clone(),Ee},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}();De.AttributeData=ye;var Fe=function(){function Me(Ee,me){Ee===void 0&&(Ee=0),me===void 0&&(me=-1),this.underlineStyle=Ee,this.underlineColor=me}return Me.prototype.clone=function(){return new Me(this.underlineStyle,this.underlineColor)},Me.prototype.isEmpty=function(){return this.underlineStyle===0},Me}();De.ExtendedAttrs=Fe},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.addDisposableDomListener=void 0,De.addDisposableDomListener=function(ye,Fe,Me,Ee){ye.addEventListener(Fe,Me,Ee);var me=!1;return{dispose:function(){me||(me=!0,ye.removeEventListener(Fe,Me,Ee))}}}},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.Utf8ToUtf32=De.StringToUtf32=De.utf32ToString=De.stringFromCodePoint=void 0,De.stringFromCodePoint=function(Me){return Me>65535?(Me-=65536,String.fromCharCode(55296+(Me>>10))+String.fromCharCode(Me%1024+56320)):String.fromCharCode(Me)},De.utf32ToString=function(Me,Ee,me){Ee===void 0&&(Ee=0),me===void 0&&(me=Me.length);for(var be="",ve=Ee;ve<me;++ve){var we=Me[ve];we>65535?(we-=65536,be+=String.fromCharCode(55296+(we>>10))+String.fromCharCode(we%1024+56320)):be+=String.fromCharCode(we)}return be};var ye=function(){function Me(){this._interim=0}return Me.prototype.clear=function(){this._interim=0},Me.prototype.decode=function(Ee,me){var be=Ee.length;if(!be)return 0;var ve=0,we=0;this._interim&&(56320<=(xe=Ee.charCodeAt(we++))&&xe<=57343?me[ve++]=1024*(this._interim-55296)+xe-56320+65536:(me[ve++]=this._interim,me[ve++]=xe),this._interim=0);for(var ge=we;ge<be;++ge){var he=Ee.charCodeAt(ge);if(55296<=he&&he<=56319){if(++ge>=be)return this._interim=he,ve;var xe;56320<=(xe=Ee.charCodeAt(ge))&&xe<=57343?me[ve++]=1024*(he-55296)+xe-56320+65536:(me[ve++]=he,me[ve++]=xe)}else me[ve++]=he}return ve},Me}();De.StringToUtf32=ye;var Fe=function(){function Me(){this.interim=new Uint8Array(3)}return Me.prototype.clear=function(){this.interim.fill(0)},Me.prototype.decode=function(Ee,me){var be=Ee.length;if(!be)return 0;var ve,we,ge,he,xe=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,ie=void 0;(ie=63&this.interim[++oe])&&oe<4;)z<<=6,z|=ie;for(var se=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,le=se-oe;ue<le;){if(ue>=be)return 0;if((192&(ie=Ee[ue++]))!=128){ue--,ee=!0;break}this.interim[oe++]=ie,z<<=6,z|=63&ie}ee||(se===2?z<128?ue--:me[xe++]=z:se===3?z<2048||z>=55296&&z<=57343||(me[xe++]=z):z<65536||z>1114111||(me[xe++]=z)),this.interim.fill(0)}for(var Se=be-4,pe=ue;pe<be;){for(;!(!(pe<Se)||128&(ve=Ee[pe])||128&(we=Ee[pe+1])||128&(ge=Ee[pe+2])||128&(he=Ee[pe+3]));)me[xe++]=ve,me[xe++]=we,me[xe++]=ge,me[xe++]=he,pe+=4;if((ve=Ee[pe++])<128)me[xe++]=ve;else if((224&ve)==192){if(pe>=be)return this.interim[0]=ve,xe;if((192&(we=Ee[pe++]))!=128){pe--;continue}if((fe=(31&ve)<<6|63&we)<128){pe--;continue}me[xe++]=fe}else if((240&ve)==224){if(pe>=be)return this.interim[0]=ve,xe;if((192&(we=Ee[pe++]))!=128){pe--;continue}if(pe>=be)return this.interim[0]=ve,this.interim[1]=we,xe;if((192&(ge=Ee[pe++]))!=128){pe--;continue}if((fe=(15&ve)<<12|(63&we)<<6|63&ge)<2048||fe>=55296&&fe<=57343)continue;me[xe++]=fe}else if((248&ve)==240){if(pe>=be)return this.interim[0]=ve,xe;if((192&(we=Ee[pe++]))!=128){pe--;continue}if(pe>=be)return this.interim[0]=ve,this.interim[1]=we,xe;if((192&(ge=Ee[pe++]))!=128){pe--;continue}if(pe>=be)return this.interim[0]=ve,this.interim[1]=we,this.interim[2]=ge,xe;if((192&(he=Ee[pe++]))!=128){pe--;continue}if((fe=(7&ve)<<18|(63&we)<<12|(63&ge)<<6|63&he)<65536||fe>1114111)continue;me[xe++]=fe}}return xe},Me}();De.Utf8ToUtf32=Fe},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.CHAR_ATLAS_CELL_SPACING=De.DIM_OPACITY=De.INVERTED_DEFAULT_COLOR=void 0,De.INVERTED_DEFAULT_COLOR=257,De.DIM_OPACITY=.5,De.CHAR_ATLAS_CELL_SPACING=1},function(hn,De,Le){"use strict";var ye,Fe,Me,Ee;function me(ve){var we=ve.toString(16);return we.length<2?"0"+we:we}function be(ve,we){return ve<we?(we+.05)/(ve+.05):(ve+.05)/(we+.05)}Object.defineProperty(De,"__esModule",{value:!0}),De.contrastRatio=De.toPaddedHex=De.rgba=De.rgb=De.css=De.color=De.channels=void 0,function(ve){ve.toCss=function(we,ge,he,xe){return xe!==void 0?"#"+me(we)+me(ge)+me(he)+me(xe):"#"+me(we)+me(ge)+me(he)},ve.toRgba=function(we,ge,he,xe){return xe===void 0&&(xe=255),(we<<24|ge<<16|he<<8|xe)>>>0}}(ye=De.channels||(De.channels={})),(Fe=De.color||(De.color={})).blend=function(ve,we){var ge=(255&we.rgba)/255;if(ge===1)return{css:we.css,rgba:we.rgba};var he=we.rgba>>24&255,xe=we.rgba>>16&255,fe=we.rgba>>8&255,ue=ve.rgba>>24&255,ee=ve.rgba>>16&255,z=ve.rgba>>8&255,oe=ue+Math.round((he-ue)*ge),ie=ee+Math.round((xe-ee)*ge),se=z+Math.round((fe-z)*ge);return{css:ye.toCss(oe,ie,se),rgba:ye.toRgba(oe,ie,se)}},Fe.isOpaque=function(ve){return(255&ve.rgba)==255},Fe.ensureContrastRatio=function(ve,we,ge){var he=Ee.ensureContrastRatio(ve.rgba,we.rgba,ge);if(he)return Ee.toColor(he>>24&255,he>>16&255,he>>8&255)},Fe.opaque=function(ve){var we=(255|ve.rgba)>>>0,ge=Ee.toChannels(we),he=ge[0],xe=ge[1],fe=ge[2];return{css:ye.toCss(he,xe,fe),rgba:we}},Fe.opacity=function(ve,we){var ge=Math.round(255*we),he=Ee.toChannels(ve.rgba),xe=he[0],fe=he[1],ue=he[2];return{css:ye.toCss(xe,fe,ue,ge),rgba:ye.toRgba(xe,fe,ue,ge)}},(De.css||(De.css={})).toColor=function(ve){switch(ve.length){case 7:return{css:ve,rgba:(parseInt(ve.slice(1),16)<<8|255)>>>0};case 9:return{css:ve,rgba:parseInt(ve.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(ve){function we(ge,he,xe){var fe=ge/255,ue=he/255,ee=xe/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))}ve.relativeLuminance=function(ge){return we(ge>>16&255,ge>>8&255,255&ge)},ve.relativeLuminance2=we}(Me=De.rgb||(De.rgb={})),function(ve){function we(he,xe,fe){for(var ue=he>>24&255,ee=he>>16&255,z=he>>8&255,oe=xe>>24&255,ie=xe>>16&255,se=xe>>8&255,le=be(Me.relativeLuminance2(oe,se,ie),Me.relativeLuminance2(ue,ee,z));le<fe&&(oe>0||ie>0||se>0);)oe-=Math.max(0,Math.ceil(.1*oe)),ie-=Math.max(0,Math.ceil(.1*ie)),se-=Math.max(0,Math.ceil(.1*se)),le=be(Me.relativeLuminance2(oe,se,ie),Me.relativeLuminance2(ue,ee,z));return(oe<<24|ie<<16|se<<8|255)>>>0}function ge(he,xe,fe){for(var ue=he>>24&255,ee=he>>16&255,z=he>>8&255,oe=xe>>24&255,ie=xe>>16&255,se=xe>>8&255,le=be(Me.relativeLuminance2(oe,se,ie),Me.relativeLuminance2(ue,ee,z));le<fe&&(oe<255||ie<255||se<255);)oe=Math.min(255,oe+Math.ceil(.1*(255-oe))),ie=Math.min(255,ie+Math.ceil(.1*(255-ie))),se=Math.min(255,se+Math.ceil(.1*(255-se))),le=be(Me.relativeLuminance2(oe,se,ie),Me.relativeLuminance2(ue,ee,z));return(oe<<24|ie<<16|se<<8|255)>>>0}ve.ensureContrastRatio=function(he,xe,fe){var ue=Me.relativeLuminance(he>>8),ee=Me.relativeLuminance(xe>>8);if(be(ue,ee)<fe)return ee<ue?we(he,xe,fe):ge(he,xe,fe)},ve.reduceLuminance=we,ve.increaseLuminance=ge,ve.toChannels=function(he){return[he>>24&255,he>>16&255,he>>8&255,255&he]},ve.toColor=function(he,xe,fe){return{css:ye.toCss(he,xe,fe),rgba:ye.toRgba(he,xe,fe)}}}(Ee=De.rgba||(De.rgba={})),De.toPaddedHex=me,De.contrastRatio=be},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.isLinux=De.isWindows=De.isIphone=De.isIpad=De.isMac=De.isSafari=De.isFirefox=void 0;var ye=typeof navigator=="undefined",Fe=ye?"node":navigator.userAgent,Me=ye?"node":navigator.platform;function Ee(me,be){return me.indexOf(be)>=0}De.isFirefox=!!~Fe.indexOf("Firefox"),De.isSafari=/^((?!chrome|android).)*safari/i.test(Fe),De.isMac=Ee(["Macintosh","MacIntel","MacPPC","Mac68K"],Me),De.isIpad=Me==="iPad",De.isIphone=Me==="iPhone",De.isWindows=Ee(["Windows","Win16","Win32","WinCE"],Me),De.isLinux=Me.indexOf("Linux")>=0},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.C1=De.C0=void 0,function(ye){ye.NUL="\0",ye.SOH="",ye.STX="",ye.ETX="",ye.EOT="",ye.ENQ="",ye.ACK="",ye.BEL="\x07",ye.BS="\b",ye.HT=" ",ye.LF=`
|
|
|
`,ye.VT="\v",ye.FF="\f",ye.CR="\r",ye.SO="",ye.SI="",ye.DLE="",ye.DC1="",ye.DC2="",ye.DC3="",ye.DC4="",ye.NAK="",ye.SYN="",ye.ETB="",ye.CAN="",ye.EM="",ye.SUB="",ye.ESC="\x1B",ye.FS="",ye.GS="",ye.RS="",ye.US="",ye.SP=" ",ye.DEL="\x7F"}(De.C0||(De.C0={})),function(ye){ye.PAD="\x80",ye.HOP="\x81",ye.BPH="\x82",ye.NBH="\x83",ye.IND="\x84",ye.NEL="\x85",ye.SSA="\x86",ye.ESA="\x87",ye.HTS="\x88",ye.HTJ="\x89",ye.VTS="\x8A",ye.PLD="\x8B",ye.PLU="\x8C",ye.RI="\x8D",ye.SS2="\x8E",ye.SS3="\x8F",ye.DCS="\x90",ye.PU1="\x91",ye.PU2="\x92",ye.STS="\x93",ye.CCH="\x94",ye.MW="\x95",ye.SPA="\x96",ye.EPA="\x97",ye.SOS="\x98",ye.SGCI="\x99",ye.SCI="\x9A",ye.CSI="\x9B",ye.ST="\x9C",ye.OSC="\x9D",ye.PM="\x9E",ye.APC="\x9F"}(De.C1||(De.C1={}))},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.BaseRenderLayer=void 0;var ye=Le(3),Fe=Le(9),Me=Le(25),Ee=Le(6),me=Le(28),be=Le(10),ve=Le(17),we=function(){function ge(he,xe,fe,ue,ee,z,oe,ie){this._container=he,this._alpha=ue,this._colors=ee,this._rendererId=z,this._bufferService=oe,this._optionsService=ie,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-"+xe+"-layer"),this._canvas.style.zIndex=fe.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return ge.prototype.dispose=function(){var he;ve.removeElementFromParent(this._canvas),(he=this._charAtlas)===null||he===void 0||he.dispose()},ge.prototype._initCanvas=function(){this._ctx=me.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},ge.prototype.onOptionsChanged=function(){},ge.prototype.onBlur=function(){},ge.prototype.onFocus=function(){},ge.prototype.onCursorMove=function(){},ge.prototype.onGridChanged=function(he,xe){},ge.prototype.onSelectionChanged=function(he,xe,fe){fe===void 0&&(fe=!1)},ge.prototype.setColors=function(he){this._refreshCharAtlas(he)},ge.prototype._setTransparency=function(he){if(he!==this._alpha){var xe=this._canvas;this._alpha=he,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,xe),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},ge.prototype._refreshCharAtlas=function(he){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=Me.acquireCharAtlas(this._optionsService.options,this._rendererId,he,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},ge.prototype.resize=function(he){this._scaledCellWidth=he.scaledCellWidth,this._scaledCellHeight=he.scaledCellHeight,this._scaledCharWidth=he.scaledCharWidth,this._scaledCharHeight=he.scaledCharHeight,this._scaledCharLeft=he.scaledCharLeft,this._scaledCharTop=he.scaledCharTop,this._canvas.width=he.scaledCanvasWidth,this._canvas.height=he.scaledCanvasHeight,this._canvas.style.width=he.canvasWidth+"px",this._canvas.style.height=he.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},ge.prototype._fillCells=function(he,xe,fe,ue){this._ctx.fillRect(he*this._scaledCellWidth,xe*this._scaledCellHeight,fe*this._scaledCellWidth,ue*this._scaledCellHeight)},ge.prototype._fillBottomLineAtCells=function(he,xe,fe){fe===void 0&&(fe=1),this._ctx.fillRect(he*this._scaledCellWidth,(xe+1)*this._scaledCellHeight-window.devicePixelRatio-1,fe*this._scaledCellWidth,window.devicePixelRatio)},ge.prototype._fillLeftLineAtCell=function(he,xe,fe){this._ctx.fillRect(he*this._scaledCellWidth,xe*this._scaledCellHeight,window.devicePixelRatio*fe,this._scaledCellHeight)},ge.prototype._strokeRectAtCell=function(he,xe,fe,ue){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(he*this._scaledCellWidth+window.devicePixelRatio/2,xe*this._scaledCellHeight+window.devicePixelRatio/2,fe*this._scaledCellWidth-window.devicePixelRatio,ue*this._scaledCellHeight-window.devicePixelRatio)},ge.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))},ge.prototype._clearCells=function(he,xe,fe,ue){this._alpha?this._ctx.clearRect(he*this._scaledCellWidth,xe*this._scaledCellHeight,fe*this._scaledCellWidth,ue*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(he*this._scaledCellWidth,xe*this._scaledCellHeight,fe*this._scaledCellWidth,ue*this._scaledCellHeight))},ge.prototype._fillCharTrueColor=function(he,xe,fe){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(fe),this._ctx.fillText(he.getChars(),xe*this._scaledCellWidth+this._scaledCharLeft,fe*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},ge.prototype._drawChars=function(he,xe,fe){var ue,ee,z=this._getContrastColor(he);z||he.isFgRGB()||he.isBgRGB()?this._drawUncachedChars(he,xe,fe,z):(he.isInverse()?(ue=he.isBgDefault()?Fe.INVERTED_DEFAULT_COLOR:he.getBgColor(),ee=he.isFgDefault()?Fe.INVERTED_DEFAULT_COLOR:he.getFgColor()):(ee=he.isBgDefault()?ye.DEFAULT_COLOR:he.getBgColor(),ue=he.isFgDefault()?ye.DEFAULT_COLOR:he.getFgColor()),ue+=this._optionsService.options.drawBoldTextInBrightColors&&he.isBold()&&ue<8?8:0,this._currentGlyphIdentifier.chars=he.getChars()||ye.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=he.getCode()||ye.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=ee,this._currentGlyphIdentifier.fg=ue,this._currentGlyphIdentifier.bold=!!he.isBold(),this._currentGlyphIdentifier.dim=!!he.isDim(),this._currentGlyphIdentifier.italic=!!he.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,xe*this._scaledCellWidth+this._scaledCharLeft,fe*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(he,xe,fe))},ge.prototype._drawUncachedChars=function(he,xe,fe,ue){if(this._ctx.save(),this._ctx.font=this._getFont(!!he.isBold(),!!he.isItalic()),this._ctx.textBaseline="middle",he.isInverse())if(ue)this._ctx.fillStyle=ue.css;else if(he.isBgDefault())this._ctx.fillStyle=be.color.opaque(this._colors.background).css;else if(he.isBgRGB())this._ctx.fillStyle="rgb("+Ee.AttributeData.toColorRGB(he.getBgColor()).join(",")+")";else{var ee=he.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&he.isBold()&&ee<8&&(ee+=8),this._ctx.fillStyle=this._colors.ansi[ee].css}else if(ue)this._ctx.fillStyle=ue.css;else if(he.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(he.isFgRGB())this._ctx.fillStyle="rgb("+Ee.AttributeData.toColorRGB(he.getFgColor()).join(",")+")";else{var z=he.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&he.isBold()&&z<8&&(z+=8),this._ctx.fillStyle=this._colors.ansi[z].css}this._clipRow(fe),he.isDim()&&(this._ctx.globalAlpha=Fe.DIM_OPACITY),this._ctx.fillText(he.getChars(),xe*this._scaledCellWidth+this._scaledCharLeft,fe*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},ge.prototype._clipRow=function(he){this._ctx.beginPath(),this._ctx.rect(0,he*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},ge.prototype._getFont=function(he,xe){return(xe?"italic":"")+" "+(he?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},ge.prototype._getContrastColor=function(he){if(this._optionsService.options.minimumContrastRatio!==1){var xe=this._colors.contrastCache.getColor(he.bg,he.fg);if(xe!==void 0)return xe||void 0;var fe=he.getFgColor(),ue=he.getFgColorMode(),ee=he.getBgColor(),z=he.getBgColorMode(),oe=!!he.isInverse(),ie=!!he.isInverse();if(oe){var se=fe;fe=ee,ee=se;var le=ue;ue=z,z=le}var Se=this._resolveBackgroundRgba(z,ee,oe),pe=this._resolveForegroundRgba(ue,fe,oe,ie),Ce=be.rgba.ensureContrastRatio(Se,pe,this._optionsService.options.minimumContrastRatio);if(Ce){var Ae={css:be.channels.toCss(Ce>>24&255,Ce>>16&255,Ce>>8&255),rgba:Ce};return this._colors.contrastCache.setColor(he.bg,he.fg,Ae),Ae}this._colors.contrastCache.setColor(he.bg,he.fg,null)}},ge.prototype._resolveBackgroundRgba=function(he,xe,fe){switch(he){case 16777216:case 33554432:return this._colors.ansi[xe].rgba;case 50331648:return xe<<8;case 0:default:return fe?this._colors.foreground.rgba:this._colors.background.rgba}},ge.prototype._resolveForegroundRgba=function(he,xe,fe,ue){switch(he){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&ue&&xe<8&&(xe+=8),this._colors.ansi[xe].rgba;case 50331648:return xe<<8;case 0:default:return fe?this._colors.background.rgba:this._colors.foreground.rgba}},ge}();De.BaseRenderLayer=we},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.createDecorator=De.getServiceDependencies=De.serviceRegistry=void 0;function ye(Fe,Me,Ee){Me.di$target===Me?Me.di$dependencies.push({id:Fe,index:Ee}):(Me.di$dependencies=[{id:Fe,index:Ee}],Me.di$target=Me)}De.serviceRegistry=new Map,De.getServiceDependencies=function(Fe){return Fe.di$dependencies||[]},De.createDecorator=function(Fe){if(De.serviceRegistry.has(Fe))return De.serviceRegistry.get(Fe);var Me=function(Ee,me,be){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");ye(Me,Ee,be)};return Me.toString=function(){return Fe},De.serviceRegistry.set(Fe,Me),Me}},function(hn,De,Le){"use strict";function ye(Fe,Me,Ee,me){if(Ee===void 0&&(Ee=0),me===void 0&&(me=Fe.length),Ee>=Fe.length)return Fe;Ee=(Fe.length+Ee)%Fe.length,me=me>=Fe.length?Fe.length:(Fe.length+me)%Fe.length;for(var be=Ee;be<me;++be)Fe[be]=Me;return Fe}Object.defineProperty(De,"__esModule",{value:!0}),De.concat=De.fillFallback=De.fill=void 0,De.fill=function(Fe,Me,Ee,me){return Fe.fill?Fe.fill(Me,Ee,me):ye(Fe,Me,Ee,me)},De.fillFallback=ye,De.concat=function(Fe,Me){var Ee=new Fe.constructor(Fe.length+Me.length);return Ee.set(Fe),Ee.set(Me,Fe.length),Ee}},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.BufferLine=De.DEFAULT_ATTR_DATA=void 0;var ye=Le(8),Fe=Le(3),Me=Le(4),Ee=Le(6);De.DEFAULT_ATTR_DATA=Object.freeze(new Ee.AttributeData);var me=function(){function be(ve,we,ge){ge===void 0&&(ge=!1),this.isWrapped=ge,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*ve);for(var he=we||Me.CellData.fromCharData([0,Fe.NULL_CELL_CHAR,Fe.NULL_CELL_WIDTH,Fe.NULL_CELL_CODE]),xe=0;xe<ve;++xe)this.setCell(xe,he);this.length=ve}return be.prototype.get=function(ve){var we=this._data[3*ve+0],ge=2097151&we;return[this._data[3*ve+1],2097152&we?this._combined[ve]:ge?ye.stringFromCodePoint(ge):"",we>>22,2097152&we?this._combined[ve].charCodeAt(this._combined[ve].length-1):ge]},be.prototype.set=function(ve,we){this._data[3*ve+1]=we[Fe.CHAR_DATA_ATTR_INDEX],we[Fe.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[ve]=we[1],this._data[3*ve+0]=2097152|ve|we[Fe.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*ve+0]=we[Fe.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|we[Fe.CHAR_DATA_WIDTH_INDEX]<<22},be.prototype.getWidth=function(ve){return this._data[3*ve+0]>>22},be.prototype.hasWidth=function(ve){return 12582912&this._data[3*ve+0]},be.prototype.getFg=function(ve){return this._data[3*ve+1]},be.prototype.getBg=function(ve){return this._data[3*ve+2]},be.prototype.hasContent=function(ve){return 4194303&this._data[3*ve+0]},be.prototype.getCodePoint=function(ve){var we=this._data[3*ve+0];return 2097152&we?this._combined[ve].charCodeAt(this._combined[ve].length-1):2097151&we},be.prototype.isCombined=function(ve){return 2097152&this._data[3*ve+0]},be.prototype.getString=function(ve){var we=this._data[3*ve+0];return 2097152&we?this._combined[ve]:2097151&we?ye.stringFromCodePoint(2097151&we):""},be.prototype.loadCell=function(ve,we){var ge=3*ve;return we.content=this._data[ge+0],we.fg=this._data[ge+1],we.bg=this._data[ge+2],2097152&we.content&&(we.combinedData=this._combined[ve]),268435456&we.bg&&(we.extended=this._extendedAttrs[ve]),we},be.prototype.setCell=function(ve,we){2097152&we.content&&(this._combined[ve]=we.combinedData),268435456&we.bg&&(this._extendedAttrs[ve]=we.extended),this._data[3*ve+0]=we.content,this._data[3*ve+1]=we.fg,this._data[3*ve+2]=we.bg},be.prototype.setCellFromCodePoint=function(ve,we,ge,he,xe,fe){268435456&xe&&(this._extendedAttrs[ve]=fe),this._data[3*ve+0]=we|ge<<22,this._data[3*ve+1]=he,this._data[3*ve+2]=xe},be.prototype.addCodepointToCell=function(ve,we){var ge=this._data[3*ve+0];2097152&ge?this._combined[ve]+=ye.stringFromCodePoint(we):(2097151&ge?(this._combined[ve]=ye.stringFromCodePoint(2097151&ge)+ye.stringFromCodePoint(we),ge&=-2097152,ge|=2097152):ge=we|1<<22,this._data[3*ve+0]=ge)},be.prototype.insertCells=function(ve,we,ge,he){if((ve%=this.length)&&this.getWidth(ve-1)===2&&this.setCellFromCodePoint(ve-1,0,1,(he==null?void 0:he.fg)||0,(he==null?void 0:he.bg)||0,(he==null?void 0:he.extended)||new Ee.ExtendedAttrs),we<this.length-ve){for(var xe=new Me.CellData,fe=this.length-ve-we-1;fe>=0;--fe)this.setCell(ve+we+fe,this.loadCell(ve+fe,xe));for(fe=0;fe<we;++fe)this.setCell(ve+fe,ge)}else for(fe=ve;fe<this.length;++fe)this.setCell(fe,ge);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(he==null?void 0:he.fg)||0,(he==null?void 0:he.bg)||0,(he==null?void 0:he.extended)||new Ee.ExtendedAttrs)},be.prototype.deleteCells=function(ve,we,ge,he){if(ve%=this.length,we<this.length-ve){for(var xe=new Me.CellData,fe=0;fe<this.length-ve-we;++fe)this.setCell(ve+fe,this.loadCell(ve+we+fe,xe));for(fe=this.length-we;fe<this.length;++fe)this.setCell(fe,ge)}else for(fe=ve;fe<this.length;++fe)this.setCell(fe,ge);ve&&this.getWidth(ve-1)===2&&this.setCellFromCodePoint(ve-1,0,1,(he==null?void 0:he.fg)||0,(he==null?void 0:he.bg)||0,(he==null?void 0:he.extended)||new Ee.ExtendedAttrs),this.getWidth(ve)!==0||this.hasContent(ve)||this.setCellFromCodePoint(ve,0,1,(he==null?void 0:he.fg)||0,(he==null?void 0:he.bg)||0,(he==null?void 0:he.extended)||new Ee.ExtendedAttrs)},be.prototype.replaceCells=function(ve,we,ge,he){for(ve&&this.getWidth(ve-1)===2&&this.setCellFromCodePoint(ve-1,0,1,(he==null?void 0:he.fg)||0,(he==null?void 0:he.bg)||0,(he==null?void 0:he.extended)||new Ee.ExtendedAttrs),we<this.length&&this.getWidth(we-1)===2&&this.setCellFromCodePoint(we,0,1,(he==null?void 0:he.fg)||0,(he==null?void 0:he.bg)||0,(he==null?void 0:he.extended)||new Ee.ExtendedAttrs);ve<we&&ve<this.length;)this.setCell(ve++,ge)},be.prototype.resize=function(ve,we){if(ve!==this.length){if(ve>this.length){var ge=new Uint32Array(3*ve);this.length&&(3*ve<this._data.length?ge.set(this._data.subarray(0,3*ve)):ge.set(this._data)),this._data=ge;for(var he=this.length;he<ve;++he)this.setCell(he,we)}else if(ve){(ge=new Uint32Array(3*ve)).set(this._data.subarray(0,3*ve)),this._data=ge;var xe=Object.keys(this._combined);for(he=0;he<xe.length;he++){var fe=parseInt(xe[he],10);fe>=ve&&delete this._combined[fe]}}else this._data=new Uint32Array(0),this._combined={};this.length=ve}},be.prototype.fill=function(ve){this._combined={},this._extendedAttrs={};for(var we=0;we<this.length;++we)this.setCell(we,ve)},be.prototype.copyFrom=function(ve){for(var we in this.length!==ve.length?this._data=new Uint32Array(ve._data):this._data.set(ve._data),this.length=ve.length,this._combined={},ve._combined)this._combined[we]=ve._combined[we];for(var we in this._extendedAttrs={},ve._extendedAttrs)this._extendedAttrs[we]=ve._extendedAttrs[we];this.isWrapped=ve.isWrapped},be.prototype.clone=function(){var ve=new be(0);for(var we in ve._data=new Uint32Array(this._data),ve.length=this.length,this._combined)ve._combined[we]=this._combined[we];for(var we in this._extendedAttrs)ve._extendedAttrs[we]=this._extendedAttrs[we];return ve.isWrapped=this.isWrapped,ve},be.prototype.getTrimmedLength=function(){for(var ve=this.length-1;ve>=0;--ve)if(4194303&this._data[3*ve+0])return ve+(this._data[3*ve+0]>>22);return 0},be.prototype.copyCellsFrom=function(ve,we,ge,he,xe){var fe=ve._data;if(xe)for(var ue=he-1;ue>=0;ue--)for(var ee=0;ee<3;ee++)this._data[3*(ge+ue)+ee]=fe[3*(we+ue)+ee];else for(ue=0;ue<he;ue++)for(ee=0;ee<3;ee++)this._data[3*(ge+ue)+ee]=fe[3*(we+ue)+ee];var z=Object.keys(ve._combined);for(ee=0;ee<z.length;ee++){var oe=parseInt(z[ee],10);oe>=we&&(this._combined[oe-we+ge]=ve._combined[oe])}},be.prototype.translateToString=function(ve,we,ge){ve===void 0&&(ve=!1),we===void 0&&(we=0),ge===void 0&&(ge=this.length),ve&&(ge=Math.min(ge,this.getTrimmedLength()));for(var he="";we<ge;){var xe=this._data[3*we+0],fe=2097151&xe;he+=2097152&xe?this._combined[we]:fe?ye.stringFromCodePoint(fe):Fe.WHITESPACE_CELL_CHAR,we+=xe>>22||1}return he},be}();De.BufferLine=me},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.removeElementFromParent=void 0,De.removeElementFromParent=function(){for(var ye,Fe=[],Me=0;Me<arguments.length;Me++)Fe[Me]=arguments[Me];for(var Ee=0,me=Fe;Ee<me.length;Ee++){var be=me[Ee];(ye=be==null?void 0:be.parentElement)===null||ye===void 0||ye.removeChild(be)}}},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.tooMuchOutput=De.promptLabel=void 0,De.promptLabel="Terminal input",De.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(pe,Ce){return(ye=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ae,Oe){Ae.__proto__=Oe}||function(Ae,Oe){for(var Re in Oe)Oe.hasOwnProperty(Re)&&(Ae[Re]=Oe[Re])})(pe,Ce)},function(pe,Ce){function Ae(){this.constructor=pe}ye(pe,Ce),pe.prototype=Ce===null?Object.create(Ce):(Ae.prototype=Ce.prototype,new Ae)});Object.defineProperty(De,"__esModule",{value:!0}),De.InputHandler=De.WindowsOptionsReportType=void 0;var Me,Ee=Le(12),me=Le(20),be=Le(39),ve=Le(2),we=Le(15),ge=Le(8),he=Le(16),xe=Le(0),fe=Le(3),ue=Le(4),ee=Le(6),z=Le(22),oe=Le(24),ie={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function se(pe,Ce){if(pe>24)return Ce.setWinLines||!1;switch(pe){case 1:return!!Ce.restoreWin;case 2:return!!Ce.minimizeWin;case 3:return!!Ce.setWinPosition;case 4:return!!Ce.setWinSizePixels;case 5:return!!Ce.raiseWin;case 6:return!!Ce.lowerWin;case 7:return!!Ce.refreshWin;case 8:return!!Ce.setWinSizeChars;case 9:return!!Ce.maximizeWin;case 10:return!!Ce.fullscreenWin;case 11:return!!Ce.getWinState;case 13:return!!Ce.getWinPosition;case 14:return!!Ce.getWinSizePixels;case 15:return!!Ce.getScreenSizePixels;case 16:return!!Ce.getCellSizePixels;case 18:return!!Ce.getWinSizeChars;case 19:return!!Ce.getScreenSizeChars;case 20:return!!Ce.getIconTitle;case 21:return!!Ce.getWinTitle;case 22:return!!Ce.pushTitle;case 23:return!!Ce.popTitle;case 24:return!!Ce.setWinLines}return!1}(function(pe){pe[pe.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",pe[pe.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(Me=De.WindowsOptionsReportType||(De.WindowsOptionsReportType={}));var le=function(){function pe(Ce,Ae,Oe,Re){this._bufferService=Ce,this._coreService=Ae,this._logService=Oe,this._optionsService=Re,this._data=new Uint32Array(0)}return pe.prototype.hook=function(Ce){this._data=new Uint32Array(0)},pe.prototype.put=function(Ce,Ae,Oe){this._data=we.concat(this._data,Ce.subarray(Ae,Oe))},pe.prototype.unhook=function(Ce){if(Ce){var Ae=ge.utf32ToString(this._data);switch(this._data=new Uint32Array(0),Ae){case'"q':return this._coreService.triggerDataEvent(Ee.C0.ESC+'P1$r0"q'+Ee.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(Ee.C0.ESC+'P1$r61;1"p'+Ee.C0.ESC+"\\");case"r":var Oe=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(Ee.C0.ESC+"P1$r"+Oe+Ee.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(Ee.C0.ESC+"P1$r0m"+Ee.C0.ESC+"\\");case" q":var Re={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return Re-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(Ee.C0.ESC+"P1$r"+Re+" q"+Ee.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",Ae),this._coreService.triggerDataEvent(Ee.C0.ESC+"P0$r"+Ee.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},pe}(),Se=function(pe){function Ce(Ae,Oe,Re,We,$e,Je,pt,St,Mt){Mt===void 0&&(Mt=new be.EscapeSequenceParser);var ct=pe.call(this)||this;ct._bufferService=Ae,ct._charsetService=Oe,ct._coreService=Re,ct._dirtyRowService=We,ct._logService=$e,ct._optionsService=Je,ct._coreMouseService=pt,ct._unicodeService=St,ct._parser=Mt,ct._parseBuffer=new Uint32Array(4096),ct._stringDecoder=new ge.StringToUtf32,ct._utf8Decoder=new ge.Utf8ToUtf32,ct._workCell=new ue.CellData,ct._windowTitle="",ct._iconName="",ct._windowTitleStack=[],ct._iconNameStack=[],ct._curAttrData=he.DEFAULT_ATTR_DATA.clone(),ct._eraseAttrDataInternal=he.DEFAULT_ATTR_DATA.clone(),ct._onRequestBell=new xe.EventEmitter,ct._onRequestRefreshRows=new xe.EventEmitter,ct._onRequestReset=new xe.EventEmitter,ct._onRequestScroll=new xe.EventEmitter,ct._onRequestSyncScrollBar=new xe.EventEmitter,ct._onRequestWindowsOptionsReport=new xe.EventEmitter,ct._onA11yChar=new xe.EventEmitter,ct._onA11yTab=new xe.EventEmitter,ct._onCursorMove=new xe.EventEmitter,ct._onLineFeed=new xe.EventEmitter,ct._onScroll=new xe.EventEmitter,ct._onTitleChange=new xe.EventEmitter,ct.register(ct._parser),ct._parser.setCsiHandlerFallback(function(st,et){ct._logService.debug("Unknown CSI code: ",{identifier:ct._parser.identToString(st),params:et.toArray()})}),ct._parser.setEscHandlerFallback(function(st){ct._logService.debug("Unknown ESC code: ",{identifier:ct._parser.identToString(st)})}),ct._parser.setExecuteHandlerFallback(function(st){ct._logService.debug("Unknown EXECUTE code: ",{code:st})}),ct._parser.setOscHandlerFallback(function(st,et,lt){ct._logService.debug("Unknown OSC code: ",{identifier:st,action:et,data:lt})}),ct._parser.setDcsHandlerFallback(function(st,et,lt){et==="HOOK"&&(lt=lt.toArray()),ct._logService.debug("Unknown DCS code: ",{identifier:ct._parser.identToString(st),action:et,payload:lt})}),ct._parser.setPrintHandler(function(st,et,lt){return ct.print(st,et,lt)}),ct._parser.setCsiHandler({final:"@"},function(st){return ct.insertChars(st)}),ct._parser.setCsiHandler({intermediates:" ",final:"@"},function(st){return ct.scrollLeft(st)}),ct._parser.setCsiHandler({final:"A"},function(st){return ct.cursorUp(st)}),ct._parser.setCsiHandler({intermediates:" ",final:"A"},function(st){return ct.scrollRight(st)}),ct._parser.setCsiHandler({final:"B"},function(st){return ct.cursorDown(st)}),ct._parser.setCsiHandler({final:"C"},function(st){return ct.cursorForward(st)}),ct._parser.setCsiHandler({final:"D"},function(st){return ct.cursorBackward(st)}),ct._parser.setCsiHandler({final:"E"},function(st){return ct.cursorNextLine(st)}),ct._parser.setCsiHandler({final:"F"},function(st){return ct.cursorPrecedingLine(st)}),ct._parser.setCsiHandler({final:"G"},function(st){return ct.cursorCharAbsolute(st)}),ct._parser.setCsiHandler({final:"H"},function(st){return ct.cursorPosition(st)}),ct._parser.setCsiHandler({final:"I"},function(st){return ct.cursorForwardTab(st)}),ct._parser.setCsiHandler({final:"J"},function(st){return ct.eraseInDisplay(st)}),ct._parser.setCsiHandler({prefix:"?",final:"J"},function(st){return ct.eraseInDisplay(st)}),ct._parser.setCsiHandler({final:"K"},function(st){return ct.eraseInLine(st)}),ct._parser.setCsiHandler({prefix:"?",final:"K"},function(st){return ct.eraseInLine(st)}),ct._parser.setCsiHandler({final:"L"},function(st){return ct.insertLines(st)}),ct._parser.setCsiHandler({final:"M"},function(st){return ct.deleteLines(st)}),ct._parser.setCsiHandler({final:"P"},function(st){return ct.deleteChars(st)}),ct._parser.setCsiHandler({final:"S"},function(st){return ct.scrollUp(st)}),ct._parser.setCsiHandler({final:"T"},function(st){return ct.scrollDown(st)}),ct._parser.setCsiHandler({final:"X"},function(st){return ct.eraseChars(st)}),ct._parser.setCsiHandler({final:"Z"},function(st){return ct.cursorBackwardTab(st)}),ct._parser.setCsiHandler({final:"`"},function(st){return ct.charPosAbsolute(st)}),ct._parser.setCsiHandler({final:"a"},function(st){return ct.hPositionRelative(st)}),ct._parser.setCsiHandler({final:"b"},function(st){return ct.repeatPrecedingCharacter(st)}),ct._parser.setCsiHandler({final:"c"},function(st){return ct.sendDeviceAttributesPrimary(st)}),ct._parser.setCsiHandler({prefix:">",final:"c"},function(st){return ct.sendDeviceAttributesSecondary(st)}),ct._parser.setCsiHandler({final:"d"},function(st){return ct.linePosAbsolute(st)}),ct._parser.setCsiHandler({final:"e"},function(st){return ct.vPositionRelative(st)}),ct._parser.setCsiHandler({final:"f"},function(st){return ct.hVPosition(st)}),ct._parser.setCsiHandler({final:"g"},function(st){return ct.tabClear(st)}),ct._parser.setCsiHandler({final:"h"},function(st){return ct.setMode(st)}),ct._parser.setCsiHandler({prefix:"?",final:"h"},function(st){return ct.setModePrivate(st)}),ct._parser.setCsiHandler({final:"l"},function(st){return ct.resetMode(st)}),ct._parser.setCsiHandler({prefix:"?",final:"l"},function(st){return ct.resetModePrivate(st)}),ct._parser.setCsiHandler({final:"m"},function(st){return ct.charAttributes(st)}),ct._parser.setCsiHandler({final:"n"},function(st){return ct.deviceStatus(st)}),ct._parser.setCsiHandler({prefix:"?",final:"n"},function(st){return ct.deviceStatusPrivate(st)}),ct._parser.setCsiHandler({intermediates:"!",final:"p"},function(st){return ct.softReset(st)}),ct._parser.setCsiHandler({intermediates:" ",final:"q"},function(st){return ct.setCursorStyle(st)}),ct._parser.setCsiHandler({final:"r"},function(st){return ct.setScrollRegion(st)}),ct._parser.setCsiHandler({final:"s"},function(st){return ct.saveCursor(st)}),ct._parser.setCsiHandler({final:"t"},function(st){return ct.windowOptions(st)}),ct._parser.setCsiHandler({final:"u"},function(st){return ct.restoreCursor(st)}),ct._parser.setCsiHandler({intermediates:"'",final:"}"},function(st){return ct.insertColumns(st)}),ct._parser.setCsiHandler({intermediates:"'",final:"~"},function(st){return ct.deleteColumns(st)}),ct._parser.setExecuteHandler(Ee.C0.BEL,function(){return ct.bell()}),ct._parser.setExecuteHandler(Ee.C0.LF,function(){return ct.lineFeed()}),ct._parser.setExecuteHandler(Ee.C0.VT,function(){return ct.lineFeed()}),ct._parser.setExecuteHandler(Ee.C0.FF,function(){return ct.lineFeed()}),ct._parser.setExecuteHandler(Ee.C0.CR,function(){return ct.carriageReturn()}),ct._parser.setExecuteHandler(Ee.C0.BS,function(){return ct.backspace()}),ct._parser.setExecuteHandler(Ee.C0.HT,function(){return ct.tab()}),ct._parser.setExecuteHandler(Ee.C0.SO,function(){return ct.shiftOut()}),ct._parser.setExecuteHandler(Ee.C0.SI,function(){return ct.shiftIn()}),ct._parser.setExecuteHandler(Ee.C1.IND,function(){return ct.index()}),ct._parser.setExecuteHandler(Ee.C1.NEL,function(){return ct.nextLine()}),ct._parser.setExecuteHandler(Ee.C1.HTS,function(){return ct.tabSet()}),ct._parser.setOscHandler(0,new z.OscHandler(function(st){ct.setTitle(st),ct.setIconName(st)})),ct._parser.setOscHandler(1,new z.OscHandler(function(st){return ct.setIconName(st)})),ct._parser.setOscHandler(2,new z.OscHandler(function(st){return ct.setTitle(st)})),ct._parser.setEscHandler({final:"7"},function(){return ct.saveCursor()}),ct._parser.setEscHandler({final:"8"},function(){return ct.restoreCursor()}),ct._parser.setEscHandler({final:"D"},function(){return ct.index()}),ct._parser.setEscHandler({final:"E"},function(){return ct.nextLine()}),ct._parser.setEscHandler({final:"H"},function(){return ct.tabSet()}),ct._parser.setEscHandler({final:"M"},function(){return ct.reverseIndex()}),ct._parser.setEscHandler({final:"="},function(){return ct.keypadApplicationMode()}),ct._parser.setEscHandler({final:">"},function(){return ct.keypadNumericMode()}),ct._parser.setEscHandler({final:"c"},function(){return ct.fullReset()}),ct._parser.setEscHandler({final:"n"},function(){return ct.setgLevel(2)}),ct._parser.setEscHandler({final:"o"},function(){return ct.setgLevel(3)}),ct._parser.setEscHandler({final:"|"},function(){return ct.setgLevel(3)}),ct._parser.setEscHandler({final:"}"},function(){return ct.setgLevel(2)}),ct._parser.setEscHandler({final:"~"},function(){return ct.setgLevel(1)}),ct._parser.setEscHandler({intermediates:"%",final:"@"},function(){return ct.selectDefaultCharset()}),ct._parser.setEscHandler({intermediates:"%",final:"G"},function(){return ct.selectDefaultCharset()});var wt=function(st){ft._parser.setEscHandler({intermediates:"(",final:st},function(){return ct.selectCharset("("+st)}),ft._parser.setEscHandler({intermediates:")",final:st},function(){return ct.selectCharset(")"+st)}),ft._parser.setEscHandler({intermediates:"*",final:st},function(){return ct.selectCharset("*"+st)}),ft._parser.setEscHandler({intermediates:"+",final:st},function(){return ct.selectCharset("+"+st)}),ft._parser.setEscHandler({intermediates:"-",final:st},function(){return ct.selectCharset("-"+st)}),ft._parser.setEscHandler({intermediates:".",final:st},function(){return ct.selectCharset("."+st)}),ft._parser.setEscHandler({intermediates:"/",final:st},function(){return ct.selectCharset("/"+st)})},ft=this;for(var $t in me.CHARSETS)wt($t);return ct._parser.setEscHandler({intermediates:"#",final:"8"},function(){return ct.screenAlignmentPattern()}),ct._parser.setErrorHandler(function(st){return ct._logService.error("Parsing error: ",st),st}),ct._parser.setDcsHandler({intermediates:"$",final:"q"},new le(ct._bufferService,ct._coreService,ct._logService,ct._optionsService)),ct}return Fe(Ce,pe),Object.defineProperty(Ce.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Ce.prototype.dispose=function(){pe.prototype.dispose.call(this)},Ce.prototype.parse=function(Ae){var Oe=this._bufferService.buffer,Re=Oe.x,We=Oe.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 $e=0;$e<Ae.length;$e+=131072){var Je=$e+131072<Ae.length?$e+131072:Ae.length,pt=typeof Ae=="string"?this._stringDecoder.decode(Ae.substring($e,Je),this._parseBuffer):this._utf8Decoder.decode(Ae.subarray($e,Je),this._parseBuffer);this._parser.parse(this._parseBuffer,pt)}else pt=typeof Ae=="string"?this._stringDecoder.decode(Ae,this._parseBuffer):this._utf8Decoder.decode(Ae,this._parseBuffer),this._parser.parse(this._parseBuffer,pt);(Oe=this._bufferService.buffer).x===Re&&Oe.y===We||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},Ce.prototype.print=function(Ae,Oe,Re){var We,$e,Je=this._bufferService.buffer,pt=this._charsetService.charset,St=this._optionsService.options.screenReaderMode,Mt=this._bufferService.cols,ct=this._coreService.decPrivateModes.wraparound,wt=this._coreService.modes.insertMode,ft=this._curAttrData,$t=Je.lines.get(Je.ybase+Je.y);this._dirtyRowService.markDirty(Je.y),Je.x&&Re-Oe>0&&$t.getWidth(Je.x-1)===2&&$t.setCellFromCodePoint(Je.x-1,0,1,ft.fg,ft.bg,ft.extended);for(var st=Oe;st<Re;++st){if(We=Ae[st],$e=this._unicodeService.wcwidth(We),We<127&&pt){var et=pt[String.fromCharCode(We)];et&&(We=et.charCodeAt(0))}if(St&&this._onA11yChar.fire(ge.stringFromCodePoint(We)),$e||!Je.x){if(Je.x+$e-1>=Mt){if(ct){for(;Je.x<Mt;)$t.setCellFromCodePoint(Je.x++,0,1,ft.fg,ft.bg,ft.extended);Je.x=0,Je.y++,Je.y===Je.scrollBottom+1?(Je.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(Je.y>=this._bufferService.rows&&(Je.y=this._bufferService.rows-1),Je.lines.get(Je.ybase+Je.y).isWrapped=!0),$t=Je.lines.get(Je.ybase+Je.y)}else if(Je.x=Mt-1,$e===2)continue}if(wt&&($t.insertCells(Je.x,$e,Je.getNullCell(ft),ft),$t.getWidth(Mt-1)===2&&$t.setCellFromCodePoint(Mt-1,fe.NULL_CELL_CODE,fe.NULL_CELL_WIDTH,ft.fg,ft.bg,ft.extended)),$t.setCellFromCodePoint(Je.x++,We,$e,ft.fg,ft.bg,ft.extended),$e>0)for(;--$e;)$t.setCellFromCodePoint(Je.x++,0,0,ft.fg,ft.bg,ft.extended)}else $t.getWidth(Je.x-1)?$t.addCodepointToCell(Je.x-1,We):$t.addCodepointToCell(Je.x-2,We)}Re-Oe>0&&($t.loadCell(Je.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),Je.x<Mt&&Re-Oe>0&&$t.getWidth(Je.x)===0&&!$t.hasContent(Je.x)&&$t.setCellFromCodePoint(Je.x,0,1,ft.fg,ft.bg,ft.extended),this._dirtyRowService.markDirty(Je.y)},Ce.prototype.addCsiHandler=function(Ae,Oe){var Re=this;return Ae.final!=="t"||Ae.prefix||Ae.intermediates?this._parser.addCsiHandler(Ae,Oe):this._parser.addCsiHandler(Ae,function(We){return!se(We.params[0],Re._optionsService.options.windowOptions)||Oe(We)})},Ce.prototype.addDcsHandler=function(Ae,Oe){return this._parser.addDcsHandler(Ae,new oe.DcsHandler(Oe))},Ce.prototype.addEscHandler=function(Ae,Oe){return this._parser.addEscHandler(Ae,Oe)},Ce.prototype.addOscHandler=function(Ae,Oe){return this._parser.addOscHandler(Ae,new z.OscHandler(Oe))},Ce.prototype.bell=function(){this._onRequestBell.fire()},Ce.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()},Ce.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},Ce.prototype.backspace=function(){var Ae,Oe=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(Oe.x>0&&Oe.x--);if(this._restrictCursor(this._bufferService.cols),Oe.x>0)Oe.x--;else if(Oe.x===0&&Oe.y>Oe.scrollTop&&Oe.y<=Oe.scrollBottom&&(!((Ae=Oe.lines.get(Oe.ybase+Oe.y))===null||Ae===void 0)&&Ae.isWrapped)){Oe.lines.get(Oe.ybase+Oe.y).isWrapped=!1,Oe.y--,Oe.x=this._bufferService.cols-1;var Re=Oe.lines.get(Oe.ybase+Oe.y);Re.hasWidth(Oe.x)&&!Re.hasContent(Oe.x)&&Oe.x--}this._restrictCursor()},Ce.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)}},Ce.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},Ce.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},Ce.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)},Ce.prototype._setCursor=function(Ae,Oe){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=Ae,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+Oe):(this._bufferService.buffer.x=Ae,this._bufferService.buffer.y=Oe),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},Ce.prototype._moveCursor=function(Ae,Oe){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+Ae,this._bufferService.buffer.y+Oe)},Ce.prototype.cursorUp=function(Ae){var Oe=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;Oe>=0?this._moveCursor(0,-Math.min(Oe,Ae.params[0]||1)):this._moveCursor(0,-(Ae.params[0]||1))},Ce.prototype.cursorDown=function(Ae){var Oe=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;Oe>=0?this._moveCursor(0,Math.min(Oe,Ae.params[0]||1)):this._moveCursor(0,Ae.params[0]||1)},Ce.prototype.cursorForward=function(Ae){this._moveCursor(Ae.params[0]||1,0)},Ce.prototype.cursorBackward=function(Ae){this._moveCursor(-(Ae.params[0]||1),0)},Ce.prototype.cursorNextLine=function(Ae){this.cursorDown(Ae),this._bufferService.buffer.x=0},Ce.prototype.cursorPrecedingLine=function(Ae){this.cursorUp(Ae),this._bufferService.buffer.x=0},Ce.prototype.cursorCharAbsolute=function(Ae){this._setCursor((Ae.params[0]||1)-1,this._bufferService.buffer.y)},Ce.prototype.cursorPosition=function(Ae){this._setCursor(Ae.length>=2?(Ae.params[1]||1)-1:0,(Ae.params[0]||1)-1)},Ce.prototype.charPosAbsolute=function(Ae){this._setCursor((Ae.params[0]||1)-1,this._bufferService.buffer.y)},Ce.prototype.hPositionRelative=function(Ae){this._moveCursor(Ae.params[0]||1,0)},Ce.prototype.linePosAbsolute=function(Ae){this._setCursor(this._bufferService.buffer.x,(Ae.params[0]||1)-1)},Ce.prototype.vPositionRelative=function(Ae){this._moveCursor(0,Ae.params[0]||1)},Ce.prototype.hVPosition=function(Ae){this.cursorPosition(Ae)},Ce.prototype.tabClear=function(Ae){var Oe=Ae.params[0];Oe===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:Oe===3&&(this._bufferService.buffer.tabs={})},Ce.prototype.cursorForwardTab=function(Ae){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var Oe=Ae.params[0]||1;Oe--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},Ce.prototype.cursorBackwardTab=function(Ae){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var Oe=Ae.params[0]||1,Re=this._bufferService.buffer;Oe--;)Re.x=Re.prevStop()},Ce.prototype._eraseInBufferLine=function(Ae,Oe,Re,We){We===void 0&&(We=!1);var $e=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+Ae);$e.replaceCells(Oe,Re,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),We&&($e.isWrapped=!1)},Ce.prototype._resetBufferLine=function(Ae){var Oe=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+Ae);Oe.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),Oe.isWrapped=!1},Ce.prototype.eraseInDisplay=function(Ae){var Oe;switch(this._restrictCursor(),Ae.params[0]){case 0:for(Oe=this._bufferService.buffer.y,this._dirtyRowService.markDirty(Oe),this._eraseInBufferLine(Oe++,this._bufferService.buffer.x,this._bufferService.cols,this._bufferService.buffer.x===0);Oe<this._bufferService.rows;Oe++)this._resetBufferLine(Oe);this._dirtyRowService.markDirty(Oe);break;case 1:for(Oe=this._bufferService.buffer.y,this._dirtyRowService.markDirty(Oe),this._eraseInBufferLine(Oe,0,this._bufferService.buffer.x+1,!0),this._bufferService.buffer.x+1>=this._bufferService.cols&&(this._bufferService.buffer.lines.get(Oe+1).isWrapped=!1);Oe--;)this._resetBufferLine(Oe);this._dirtyRowService.markDirty(0);break;case 2:for(Oe=this._bufferService.rows,this._dirtyRowService.markDirty(Oe-1);Oe--;)this._resetBufferLine(Oe);this._dirtyRowService.markDirty(0);break;case 3:var Re=this._bufferService.buffer.lines.length-this._bufferService.rows;Re>0&&(this._bufferService.buffer.lines.trimStart(Re),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-Re,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-Re,0),this._onScroll.fire(0))}},Ce.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)},Ce.prototype.insertLines=function(Ae){this._restrictCursor();var Oe=Ae.params[0]||1,Re=this._bufferService.buffer;if(!(Re.y>Re.scrollBottom||Re.y<Re.scrollTop)){for(var We=Re.ybase+Re.y,$e=this._bufferService.rows-1-Re.scrollBottom,Je=this._bufferService.rows-1+Re.ybase-$e+1;Oe--;)Re.lines.splice(Je-1,1),Re.lines.splice(We,0,Re.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(Re.y,Re.scrollBottom),Re.x=0}},Ce.prototype.deleteLines=function(Ae){this._restrictCursor();var Oe=Ae.params[0]||1,Re=this._bufferService.buffer;if(!(Re.y>Re.scrollBottom||Re.y<Re.scrollTop)){var We,$e=Re.ybase+Re.y;for(We=this._bufferService.rows-1-Re.scrollBottom,We=this._bufferService.rows-1+Re.ybase-We;Oe--;)Re.lines.splice($e,1),Re.lines.splice(We,0,Re.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(Re.y,Re.scrollBottom),Re.x=0}},Ce.prototype.insertChars=function(Ae){this._restrictCursor();var Oe=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);Oe&&(Oe.insertCells(this._bufferService.buffer.x,Ae.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},Ce.prototype.deleteChars=function(Ae){this._restrictCursor();var Oe=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);Oe&&(Oe.deleteCells(this._bufferService.buffer.x,Ae.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},Ce.prototype.scrollUp=function(Ae){for(var Oe=Ae.params[0]||1,Re=this._bufferService.buffer;Oe--;)Re.lines.splice(Re.ybase+Re.scrollTop,1),Re.lines.splice(Re.ybase+Re.scrollBottom,0,Re.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(Re.scrollTop,Re.scrollBottom)},Ce.prototype.scrollDown=function(Ae){for(var Oe=Ae.params[0]||1,Re=this._bufferService.buffer;Oe--;)Re.lines.splice(Re.ybase+Re.scrollBottom,1),Re.lines.splice(Re.ybase+Re.scrollTop,0,Re.getBlankLine(he.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(Re.scrollTop,Re.scrollBottom)},Ce.prototype.scrollLeft=function(Ae){var Oe=this._bufferService.buffer;if(!(Oe.y>Oe.scrollBottom||Oe.y<Oe.scrollTop)){for(var Re=Ae.params[0]||1,We=Oe.scrollTop;We<=Oe.scrollBottom;++We){var $e=Oe.lines.get(Oe.ybase+We);$e.deleteCells(0,Re,Oe.getNullCell(this._eraseAttrData()),this._eraseAttrData()),$e.isWrapped=!1}this._dirtyRowService.markRangeDirty(Oe.scrollTop,Oe.scrollBottom)}},Ce.prototype.scrollRight=function(Ae){var Oe=this._bufferService.buffer;if(!(Oe.y>Oe.scrollBottom||Oe.y<Oe.scrollTop)){for(var Re=Ae.params[0]||1,We=Oe.scrollTop;We<=Oe.scrollBottom;++We){var $e=Oe.lines.get(Oe.ybase+We);$e.insertCells(0,Re,Oe.getNullCell(this._eraseAttrData()),this._eraseAttrData()),$e.isWrapped=!1}this._dirtyRowService.markRangeDirty(Oe.scrollTop,Oe.scrollBottom)}},Ce.prototype.insertColumns=function(Ae){var Oe=this._bufferService.buffer;if(!(Oe.y>Oe.scrollBottom||Oe.y<Oe.scrollTop)){for(var Re=Ae.params[0]||1,We=Oe.scrollTop;We<=Oe.scrollBottom;++We){var $e=this._bufferService.buffer.lines.get(Oe.ybase+We);$e.insertCells(Oe.x,Re,Oe.getNullCell(this._eraseAttrData()),this._eraseAttrData()),$e.isWrapped=!1}this._dirtyRowService.markRangeDirty(Oe.scrollTop,Oe.scrollBottom)}},Ce.prototype.deleteColumns=function(Ae){var Oe=this._bufferService.buffer;if(!(Oe.y>Oe.scrollBottom||Oe.y<Oe.scrollTop)){for(var Re=Ae.params[0]||1,We=Oe.scrollTop;We<=Oe.scrollBottom;++We){var $e=Oe.lines.get(Oe.ybase+We);$e.deleteCells(Oe.x,Re,Oe.getNullCell(this._eraseAttrData()),this._eraseAttrData()),$e.isWrapped=!1}this._dirtyRowService.markRangeDirty(Oe.scrollTop,Oe.scrollBottom)}},Ce.prototype.eraseChars=function(Ae){this._restrictCursor();var Oe=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);Oe&&(Oe.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))},Ce.prototype.repeatPrecedingCharacter=function(Ae){if(this._parser.precedingCodepoint){for(var Oe=Ae.params[0]||1,Re=new Uint32Array(Oe),We=0;We<Oe;++We)Re[We]=this._parser.precedingCodepoint;this.print(Re,0,Re.length)}},Ce.prototype.sendDeviceAttributesPrimary=function(Ae){Ae.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(Ee.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(Ee.C0.ESC+"[?6c"))},Ce.prototype.sendDeviceAttributesSecondary=function(Ae){Ae.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(Ee.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(Ee.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(Ae.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(Ee.C0.ESC+"[>83;40003;0c"))},Ce.prototype._is=function(Ae){return(this._optionsService.options.termName+"").indexOf(Ae)===0},Ce.prototype.setMode=function(Ae){for(var Oe=0;Oe<Ae.length;Oe++)switch(Ae.params[Oe]){case 4:this._coreService.modes.insertMode=!0}},Ce.prototype.setModePrivate=function(Ae){for(var Oe=0;Oe<Ae.length;Oe++)switch(Ae.params[Oe]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,me.DEFAULT_CHARSET),this._charsetService.setgCharset(1,me.DEFAULT_CHARSET),this._charsetService.setgCharset(2,me.DEFAULT_CHARSET),this._charsetService.setgCharset(3,me.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}},Ce.prototype.resetMode=function(Ae){for(var Oe=0;Oe<Ae.length;Oe++)switch(Ae.params[Oe]){case 4:this._coreService.modes.insertMode=!1}},Ce.prototype.resetModePrivate=function(Ae){for(var Oe=0;Oe<Ae.length;Oe++)switch(Ae.params[Oe]){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[Oe]===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}},Ce.prototype._updateAttrColor=function(Ae,Oe,Re,We,$e){return Oe===2?(Ae|=50331648,Ae&=-16777216,Ae|=ee.AttributeData.fromColorRGB([Re,We,$e])):Oe===5&&(Ae&=-50331904,Ae|=33554432|255&Re),Ae},Ce.prototype._extractColor=function(Ae,Oe,Re){var We=[0,0,-1,0,0,0],$e=0,Je=0;do{if(We[Je+$e]=Ae.params[Oe+Je],Ae.hasSubParams(Oe+Je)){var pt=Ae.getSubParams(Oe+Je),St=0;do We[1]===5&&($e=1),We[Je+St+1+$e]=pt[St];while(++St<pt.length&&St+Je+1+$e<We.length);break}if(We[1]===5&&Je+$e>=2||We[1]===2&&Je+$e>=5)break;We[1]&&($e=1)}while(++Je+Oe<Ae.length&&Je+$e<We.length);for(St=2;St<We.length;++St)We[St]===-1&&(We[St]=0);switch(We[0]){case 38:Re.fg=this._updateAttrColor(Re.fg,We[1],We[3],We[4],We[5]);break;case 48:Re.bg=this._updateAttrColor(Re.bg,We[1],We[3],We[4],We[5]);break;case 58:Re.extended=Re.extended.clone(),Re.extended.underlineColor=this._updateAttrColor(Re.extended.underlineColor,We[1],We[3],We[4],We[5])}return Je},Ce.prototype._processUnderline=function(Ae,Oe){Oe.extended=Oe.extended.clone(),(!~Ae||Ae>5)&&(Ae=1),Oe.extended.underlineStyle=Ae,Oe.fg|=268435456,Ae===0&&(Oe.fg&=-268435457),Oe.updateExtended()},Ce.prototype.charAttributes=function(Ae){if(Ae.length===1&&Ae.params[0]===0)return this._curAttrData.fg=he.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=he.DEFAULT_ATTR_DATA.bg);for(var Oe,Re=Ae.length,We=this._curAttrData,$e=0;$e<Re;$e++)(Oe=Ae.params[$e])>=30&&Oe<=37?(We.fg&=-50331904,We.fg|=16777216|Oe-30):Oe>=40&&Oe<=47?(We.bg&=-50331904,We.bg|=16777216|Oe-40):Oe>=90&&Oe<=97?(We.fg&=-50331904,We.fg|=16777224|Oe-90):Oe>=100&&Oe<=107?(We.bg&=-50331904,We.bg|=16777224|Oe-100):Oe===0?(We.fg=he.DEFAULT_ATTR_DATA.fg,We.bg=he.DEFAULT_ATTR_DATA.bg):Oe===1?We.fg|=134217728:Oe===3?We.bg|=67108864:Oe===4?(We.fg|=268435456,this._processUnderline(Ae.hasSubParams($e)?Ae.getSubParams($e)[0]:1,We)):Oe===5?We.fg|=536870912:Oe===7?We.fg|=67108864:Oe===8?We.fg|=1073741824:Oe===2?We.bg|=134217728:Oe===21?this._processUnderline(2,We):Oe===22?(We.fg&=-134217729,We.bg&=-134217729):Oe===23?We.bg&=-67108865:Oe===24?We.fg&=-268435457:Oe===25?We.fg&=-536870913:Oe===27?We.fg&=-67108865:Oe===28?We.fg&=-1073741825:Oe===39?(We.fg&=-67108864,We.fg|=16777215&he.DEFAULT_ATTR_DATA.fg):Oe===49?(We.bg&=-67108864,We.bg|=16777215&he.DEFAULT_ATTR_DATA.bg):Oe===38||Oe===48||Oe===58?$e+=this._extractColor(Ae,$e,We):Oe===59?(We.extended=We.extended.clone(),We.extended.underlineColor=-1,We.updateExtended()):Oe===100?(We.fg&=-67108864,We.fg|=16777215&he.DEFAULT_ATTR_DATA.fg,We.bg&=-67108864,We.bg|=16777215&he.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",Oe)},Ce.prototype.deviceStatus=function(Ae){switch(Ae.params[0]){case 5:this._coreService.triggerDataEvent(Ee.C0.ESC+"[0n");break;case 6:var Oe=this._bufferService.buffer.y+1,Re=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(Ee.C0.ESC+"["+Oe+";"+Re+"R")}},Ce.prototype.deviceStatusPrivate=function(Ae){switch(Ae.params[0]){case 6:var Oe=this._bufferService.buffer.y+1,Re=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(Ee.C0.ESC+"[?"+Oe+";"+Re+"R")}},Ce.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=he.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},Ce.prototype.setCursorStyle=function(Ae){var Oe=Ae.params[0]||1;switch(Oe){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 Re=Oe%2==1;this._optionsService.options.cursorBlink=Re},Ce.prototype.setScrollRegion=function(Ae){var Oe,Re=Ae.params[0]||1;(Ae.length<2||(Oe=Ae.params[1])>this._bufferService.rows||Oe===0)&&(Oe=this._bufferService.rows),Oe>Re&&(this._bufferService.buffer.scrollTop=Re-1,this._bufferService.buffer.scrollBottom=Oe-1,this._setCursor(0,0))},Ce.prototype.windowOptions=function(Ae){if(se(Ae.params[0],this._optionsService.options.windowOptions)){var Oe=Ae.length>1?Ae.params[1]:0;switch(Ae.params[0]){case 14:Oe!==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(Ee.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:Oe!==0&&Oe!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),Oe!==0&&Oe!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:Oe!==0&&Oe!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),Oe!==0&&Oe!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}}},Ce.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},Ce.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()},Ce.prototype.setTitle=function(Ae){this._windowTitle=Ae,this._onTitleChange.fire(Ae)},Ce.prototype.setIconName=function(Ae){this._iconName=Ae},Ce.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},Ce.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},Ce.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},Ce.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,me.DEFAULT_CHARSET)},Ce.prototype.selectCharset=function(Ae){Ae.length===2?Ae[0]!=="/"&&this._charsetService.setgCharset(ie[Ae[0]],me.CHARSETS[Ae[1]]||me.DEFAULT_CHARSET):this.selectDefaultCharset()},Ce.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()},Ce.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},Ce.prototype.reverseIndex=function(){this._restrictCursor();var Ae=this._bufferService.buffer;if(Ae.y===Ae.scrollTop){var Oe=Ae.scrollBottom-Ae.scrollTop;Ae.lines.shiftElements(Ae.ybase+Ae.y,Oe,1),Ae.lines.set(Ae.ybase+Ae.y,Ae.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(Ae.scrollTop,Ae.scrollBottom)}else Ae.y--,this._restrictCursor()},Ce.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},Ce.prototype.reset=function(){this._curAttrData=he.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=he.DEFAULT_ATTR_DATA.clone()},Ce.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},Ce.prototype.setgLevel=function(Ae){this._charsetService.setgLevel(Ae)},Ce.prototype.screenAlignmentPattern=function(){var Ae=new ue.CellData;Ae.content=1<<22|69,Ae.fg=this._curAttrData.fg,Ae.bg=this._curAttrData.bg;var Oe=this._bufferService.buffer;this._setCursor(0,0);for(var Re=0;Re<this._bufferService.rows;++Re){var We=Oe.ybase+Oe.y+Re,$e=Oe.lines.get(We);$e&&($e.fill(Ae),$e.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},Ce}(ve.Disposable);De.InputHandler=Se},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.DEFAULT_CHARSET=De.CHARSETS=void 0,De.CHARSETS={},De.DEFAULT_CHARSET=De.CHARSETS.B,De.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"},De.CHARSETS.A={"#":"\xA3"},De.CHARSETS.B=void 0,De.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},De.CHARSETS.C=De.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},De.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},De.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},De.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},De.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},De.CHARSETS.E=De.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},De.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},De.CHARSETS.H=De.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},De.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.Params=void 0;var ye=function(){function Fe(Me,Ee){if(Me===void 0&&(Me=32),Ee===void 0&&(Ee=32),this.maxLength=Me,this.maxSubParamsLength=Ee,Ee>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(Me),this.length=0,this._subParams=new Int32Array(Ee),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(Me),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return Fe.fromArray=function(Me){var Ee=new Fe;if(!Me.length)return Ee;for(var me=Me[0]instanceof Array?1:0;me<Me.length;++me){var be=Me[me];if(be instanceof Array)for(var ve=0;ve<be.length;++ve)Ee.addSubParam(be[ve]);else Ee.addParam(be)}return Ee},Fe.prototype.clone=function(){var Me=new Fe(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},Fe.prototype.toArray=function(){for(var Me=[],Ee=0;Ee<this.length;++Ee){Me.push(this.params[Ee]);var me=this._subParamsIdx[Ee]>>8,be=255&this._subParamsIdx[Ee];be-me>0&&Me.push(Array.prototype.slice.call(this._subParams,me,be))}return Me},Fe.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},Fe.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}},Fe.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]++}},Fe.prototype.hasSubParams=function(Me){return(255&this._subParamsIdx[Me])-(this._subParamsIdx[Me]>>8)>0},Fe.prototype.getSubParams=function(Me){var Ee=this._subParamsIdx[Me]>>8,me=255&this._subParamsIdx[Me];return me-Ee>0?this._subParams.subarray(Ee,me):null},Fe.prototype.getSubParamsAll=function(){for(var Me={},Ee=0;Ee<this.length;++Ee){var me=this._subParamsIdx[Ee]>>8,be=255&this._subParamsIdx[Ee];be-me>0&&(Me[Ee]=this._subParams.slice(me,be))}return Me},Fe.prototype.addDigit=function(Me){var Ee;if(!(this._rejectDigits||!(Ee=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var me=this._digitIsSub?this._subParams:this.params,be=me[Ee-1];me[Ee-1]=~be?Math.min(10*be+Me,2147483647):Me}},Fe}();De.Params=ye},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.OscHandler=De.OscParser=void 0;var ye=Le(23),Fe=Le(8),Me=function(){function me(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return me.prototype.addHandler=function(be,ve){this._handlers[be]===void 0&&(this._handlers[be]=[]);var we=this._handlers[be];return we.push(ve),{dispose:function(){var ge=we.indexOf(ve);ge!==-1&&we.splice(ge,1)}}},me.prototype.setHandler=function(be,ve){this._handlers[be]=[ve]},me.prototype.clearHandler=function(be){this._handlers[be]&&delete this._handlers[be]},me.prototype.setHandlerFallback=function(be){this._handlerFb=be},me.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},me.prototype.reset=function(){this._state===2&&this.end(!1),this._id=-1,this._state=0},me.prototype._start=function(){var be=this._handlers[this._id];if(be)for(var ve=be.length-1;ve>=0;ve--)be[ve].start();else this._handlerFb(this._id,"START")},me.prototype._put=function(be,ve,we){var ge=this._handlers[this._id];if(ge)for(var he=ge.length-1;he>=0;he--)ge[he].put(be,ve,we);else this._handlerFb(this._id,"PUT",Fe.utf32ToString(be,ve,we))},me.prototype._end=function(be){var ve=this._handlers[this._id];if(ve){for(var we=ve.length-1;we>=0&&ve[we].end(be)===!1;we--);for(we--;we>=0;we--)ve[we].end(!1)}else this._handlerFb(this._id,"END",be)},me.prototype.start=function(){this.reset(),this._id=-1,this._state=1},me.prototype.put=function(be,ve,we){if(this._state!==3){if(this._state===1)for(;ve<we;){var ge=be[ve++];if(ge===59){this._state=2,this._start();break}if(ge<48||57<ge)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+ge-48}this._state===2&&we-ve>0&&this._put(be,ve,we)}},me.prototype.end=function(be){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(be)),this._id=-1,this._state=0)},me}();De.OscParser=Me;var Ee=function(){function me(be){this._handler=be,this._data="",this._hitLimit=!1}return me.prototype.start=function(){this._data="",this._hitLimit=!1},me.prototype.put=function(be,ve,we){this._hitLimit||(this._data+=Fe.utf32ToString(be,ve,we),this._data.length>ye.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},me.prototype.end=function(be){var ve;return this._hitLimit?ve=!1:be&&(ve=this._handler(this._data)),this._data="",this._hitLimit=!1,ve},me}();De.OscHandler=Ee},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.PAYLOAD_LIMIT=void 0,De.PAYLOAD_LIMIT=1e7},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.DcsHandler=De.DcsParser=void 0;var ye=Le(8),Fe=Le(21),Me=Le(23),Ee=[],me=function(){function ve(){this._handlers=Object.create(null),this._active=Ee,this._ident=0,this._handlerFb=function(){}}return ve.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},ve.prototype.addHandler=function(we,ge){this._handlers[we]===void 0&&(this._handlers[we]=[]);var he=this._handlers[we];return he.push(ge),{dispose:function(){var xe=he.indexOf(ge);xe!==-1&&he.splice(xe,1)}}},ve.prototype.setHandler=function(we,ge){this._handlers[we]=[ge]},ve.prototype.clearHandler=function(we){this._handlers[we]&&delete this._handlers[we]},ve.prototype.setHandlerFallback=function(we){this._handlerFb=we},ve.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=Ee,this._ident=0},ve.prototype.hook=function(we,ge){if(this.reset(),this._ident=we,this._active=this._handlers[we]||Ee,this._active.length)for(var he=this._active.length-1;he>=0;he--)this._active[he].hook(ge);else this._handlerFb(this._ident,"HOOK",ge)},ve.prototype.put=function(we,ge,he){if(this._active.length)for(var xe=this._active.length-1;xe>=0;xe--)this._active[xe].put(we,ge,he);else this._handlerFb(this._ident,"PUT",ye.utf32ToString(we,ge,he))},ve.prototype.unhook=function(we){if(this._active.length){for(var ge=this._active.length-1;ge>=0&&this._active[ge].unhook(we)===!1;ge--);for(ge--;ge>=0;ge--)this._active[ge].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",we);this._active=Ee,this._ident=0},ve}();De.DcsParser=me;var be=function(){function ve(we){this._handler=we,this._data="",this._hitLimit=!1}return ve.prototype.hook=function(we){this._params=we.clone(),this._data="",this._hitLimit=!1},ve.prototype.put=function(we,ge,he){this._hitLimit||(this._data+=ye.utf32ToString(we,ge,he),this._data.length>Me.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},ve.prototype.unhook=function(we){var ge;return this._hitLimit?ge=!1:we&&(ge=this._handler(this._data,this._params||new Fe.Params)),this._params=void 0,this._data="",this._hitLimit=!1,ge},ve}();De.DcsHandler=be},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.removeTerminalFromCache=De.acquireCharAtlas=void 0;var ye=Le(26),Fe=Le(43),Me=[];De.acquireCharAtlas=function(Ee,me,be,ve,we){for(var ge=ye.generateConfig(ve,we,Ee,be),he=0;he<Me.length;he++){var xe=(fe=Me[he]).ownedBy.indexOf(me);if(xe>=0){if(ye.configEquals(fe.config,ge))return fe.atlas;fe.ownedBy.length===1?(fe.atlas.dispose(),Me.splice(he,1)):fe.ownedBy.splice(xe,1);break}}for(he=0;he<Me.length;he++){var fe=Me[he];if(ye.configEquals(fe.config,ge))return fe.ownedBy.push(me),fe.atlas}var ue={atlas:new Fe.DynamicCharAtlas(document,ge),config:ge,ownedBy:[me]};return Me.push(ue),ue.atlas},De.removeTerminalFromCache=function(Ee){for(var me=0;me<Me.length;me++){var be=Me[me].ownedBy.indexOf(Ee);if(be!==-1){Me[me].ownedBy.length===1?(Me[me].atlas.dispose(),Me.splice(me,1)):Me[me].ownedBy.splice(be,1);break}}}},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.is256Color=De.configEquals=De.generateConfig=void 0;var ye=Le(3);De.generateConfig=function(Fe,Me,Ee,me){var be={foreground:me.foreground,background:me.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:me.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:Fe,scaledCharHeight:Me,fontFamily:Ee.fontFamily,fontSize:Ee.fontSize,fontWeight:Ee.fontWeight,fontWeightBold:Ee.fontWeightBold,allowTransparency:Ee.allowTransparency,colors:be}},De.configEquals=function(Fe,Me){for(var Ee=0;Ee<Fe.colors.ansi.length;Ee++)if(Fe.colors.ansi[Ee].rgba!==Me.colors.ansi[Ee].rgba)return!1;return Fe.devicePixelRatio===Me.devicePixelRatio&&Fe.fontFamily===Me.fontFamily&&Fe.fontSize===Me.fontSize&&Fe.fontWeight===Me.fontWeight&&Fe.fontWeightBold===Me.fontWeightBold&&Fe.allowTransparency===Me.allowTransparency&&Fe.scaledCharWidth===Me.scaledCharWidth&&Fe.scaledCharHeight===Me.scaledCharHeight&&Fe.colors.foreground===Me.colors.foreground&&Fe.colors.background===Me.colors.background},De.is256Color=function(Fe){return Fe<ye.DEFAULT_COLOR}},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.ColorManager=De.DEFAULT_ANSI_COLORS=void 0;var ye=Le(10),Fe=Le(45),Me=ye.css.toColor("#ffffff"),Ee=ye.css.toColor("#000000"),me=ye.css.toColor("#ffffff"),be=ye.css.toColor("#000000"),ve={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};De.DEFAULT_ANSI_COLORS=function(){for(var ge=[ye.css.toColor("#2e3436"),ye.css.toColor("#cc0000"),ye.css.toColor("#4e9a06"),ye.css.toColor("#c4a000"),ye.css.toColor("#3465a4"),ye.css.toColor("#75507b"),ye.css.toColor("#06989a"),ye.css.toColor("#d3d7cf"),ye.css.toColor("#555753"),ye.css.toColor("#ef2929"),ye.css.toColor("#8ae234"),ye.css.toColor("#fce94f"),ye.css.toColor("#729fcf"),ye.css.toColor("#ad7fa8"),ye.css.toColor("#34e2e2"),ye.css.toColor("#eeeeec")],he=[0,95,135,175,215,255],xe=0;xe<216;xe++){var fe=he[xe/36%6|0],ue=he[xe/6%6|0],ee=he[xe%6];ge.push({css:ye.channels.toCss(fe,ue,ee),rgba:ye.channels.toRgba(fe,ue,ee)})}for(xe=0;xe<24;xe++){var z=8+10*xe;ge.push({css:ye.channels.toCss(z,z,z),rgba:ye.channels.toRgba(z,z,z)})}return ge}();var we=function(){function ge(he,xe){this.allowTransparency=xe;var fe=he.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 Fe.ColorContrastCache,this.colors={foreground:Me,background:Ee,cursor:me,cursorAccent:be,selectionTransparent:ve,selectionOpaque:ye.color.blend(Ee,ve),ansi:De.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return ge.prototype.onOptionsChange=function(he){he==="minimumContrastRatio"&&this._contrastCache.clear()},ge.prototype.setTheme=function(he){he===void 0&&(he={}),this.colors.foreground=this._parseColor(he.foreground,Me),this.colors.background=this._parseColor(he.background,Ee),this.colors.cursor=this._parseColor(he.cursor,me,!0),this.colors.cursorAccent=this._parseColor(he.cursorAccent,be,!0),this.colors.selectionTransparent=this._parseColor(he.selection,ve,!0),this.colors.selectionOpaque=ye.color.blend(this.colors.background,this.colors.selectionTransparent),ye.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=ye.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(he.black,De.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(he.red,De.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(he.green,De.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(he.yellow,De.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(he.blue,De.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(he.magenta,De.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(he.cyan,De.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(he.white,De.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(he.brightBlack,De.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(he.brightRed,De.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(he.brightGreen,De.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(he.brightYellow,De.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(he.brightBlue,De.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(he.brightMagenta,De.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(he.brightCyan,De.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(he.brightWhite,De.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},ge.prototype._parseColor=function(he,xe,fe){if(fe===void 0&&(fe=this.allowTransparency),he===void 0)return xe;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=he,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+he+" is invalid using fallback "+xe.css),xe;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: "+he+" is using transparency, but allowTransparency is false. Using fallback "+xe.css+"."),xe;var ee=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(Se){return Number(Se)}),z=ee[0],oe=ee[1],ie=ee[2],se=ee[3],le=Math.round(255*se);return{rgba:ye.channels.toRgba(z,oe,ie,le),css:he}}return{css:this._ctx.fillStyle,rgba:ye.channels.toRgba(ue[0],ue[1],ue[2],ue[3])}},ge}();De.ColorManager=we},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.throwIfFalsy=void 0,De.throwIfFalsy=function(ye){if(!ye)throw new Error("value must not be falsy");return ye}},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(we,ge){return(ye=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,xe){he.__proto__=xe}||function(he,xe){for(var fe in xe)xe.hasOwnProperty(fe)&&(he[fe]=xe[fe])})(we,ge)},function(we,ge){function he(){this.constructor=we}ye(we,ge),we.prototype=ge===null?Object.create(ge):(he.prototype=ge.prototype,new he)});Object.defineProperty(De,"__esModule",{value:!0}),De.CharacterJoinerRegistry=De.JoinedCellData=void 0;var Me=Le(6),Ee=Le(3),me=Le(4),be=function(we){function ge(he,xe,fe){var ue=we.call(this)||this;return ue.content=0,ue.combinedData="",ue.fg=he.fg,ue.bg=he.bg,ue.combinedData=xe,ue._width=fe,ue}return Fe(ge,we),ge.prototype.isCombined=function(){return 2097152},ge.prototype.getWidth=function(){return this._width},ge.prototype.getChars=function(){return this.combinedData},ge.prototype.getCode=function(){return 2097151},ge.prototype.setFromCharData=function(he){throw new Error("not implemented")},ge.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},ge}(Me.AttributeData);De.JoinedCellData=be;var ve=function(){function we(ge){this._bufferService=ge,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new me.CellData}return we.prototype.registerCharacterJoiner=function(ge){var he={id:this._nextCharacterJoinerId++,handler:ge};return this._characterJoiners.push(he),he.id},we.prototype.deregisterCharacterJoiner=function(ge){for(var he=0;he<this._characterJoiners.length;he++)if(this._characterJoiners[he].id===ge)return this._characterJoiners.splice(he,1),!0;return!1},we.prototype.getJoinedCharacters=function(ge){if(this._characterJoiners.length===0)return[];var he=this._bufferService.buffer.lines.get(ge);if(!he||he.length===0)return[];for(var xe=[],fe=he.translateToString(!0),ue=0,ee=0,z=0,oe=he.getFg(0),ie=he.getBg(0),se=0;se<he.getTrimmedLength();se++)if(he.loadCell(se,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==oe||this._workCell.bg!==ie){if(se-ue>1)for(var le=this._getJoinedRanges(fe,z,ee,he,ue),Se=0;Se<le.length;Se++)xe.push(le[Se]);ue=se,z=ee,oe=this._workCell.fg,ie=this._workCell.bg}ee+=this._workCell.getChars().length||Ee.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-ue>1)for(le=this._getJoinedRanges(fe,z,ee,he,ue),Se=0;Se<le.length;Se++)xe.push(le[Se]);return xe},we.prototype._getJoinedRanges=function(ge,he,xe,fe,ue){for(var ee=ge.substring(he,xe),z=this._characterJoiners[0].handler(ee),oe=1;oe<this._characterJoiners.length;oe++)for(var ie=this._characterJoiners[oe].handler(ee),se=0;se<ie.length;se++)we._mergeRanges(z,ie[se]);return this._stringRangesToCellRanges(z,fe,ue),z},we.prototype._stringRangesToCellRanges=function(ge,he,xe){var fe=0,ue=!1,ee=0,z=ge[fe];if(z){for(var oe=xe;oe<this._bufferService.cols;oe++){var ie=he.getWidth(oe),se=he.getString(oe).length||Ee.WHITESPACE_CELL_CHAR.length;if(ie!==0){if(!ue&&z[0]<=ee&&(z[0]=oe,ue=!0),z[1]<=ee){if(z[1]=oe,!(z=ge[++fe]))break;z[0]<=ee?(z[0]=oe,ue=!0):ue=!1}ee+=se}}z&&(z[1]=this._bufferService.cols)}},we._mergeRanges=function(ge,he){for(var xe=!1,fe=0;fe<ge.length;fe++){var ue=ge[fe];if(xe){if(he[1]<=ue[0])return ge[fe-1][1]=he[1],ge;if(he[1]<=ue[1])return ge[fe-1][1]=Math.max(he[1],ue[1]),ge.splice(fe,1),ge;ge.splice(fe,1),fe--}else{if(he[1]<=ue[0])return ge.splice(fe,0,he),ge;if(he[1]<=ue[1])return ue[0]=Math.min(he[0],ue[0]),ge;he[0]<ue[1]&&(ue[0]=Math.min(he[0],ue[0]),xe=!0)}}return xe?ge[ge.length-1][1]=he[1]:ge.push(he),ge},we}();De.CharacterJoinerRegistry=ve},function(hn,De,Le){"use strict";function ye(Fe,Me){var Ee=Me.getBoundingClientRect();return[Fe.clientX-Ee.left,Fe.clientY-Ee.top]}Object.defineProperty(De,"__esModule",{value:!0}),De.getRawByteCoords=De.getCoords=De.getCoordsRelativeToElement=void 0,De.getCoordsRelativeToElement=ye,De.getCoords=function(Fe,Me,Ee,me,be,ve,we,ge){if(be){var he=ye(Fe,Me);if(he)return he[0]=Math.ceil((he[0]+(ge?ve/2:0))/ve),he[1]=Math.ceil(he[1]/we),he[0]=Math.min(Math.max(he[0],1),Ee+(ge?1:0)),he[1]=Math.min(Math.max(he[1],1),me),he}},De.getRawByteCoords=function(Fe){if(Fe)return{x:Fe[0]+32,y:Fe[1]+32}}},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.RenderDebouncer=void 0;var ye=function(){function Fe(Me){this._renderCallback=Me}return Fe.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},Fe.prototype.refresh=function(Me,Ee,me){var be=this;this._rowCount=me,Me=Me!==void 0?Me:0,Ee=Ee!==void 0?Ee: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,Ee):Ee,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return be._innerRefresh()}))},Fe.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var Me=Math.max(this._rowStart,0),Ee=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(Me,Ee)}},Fe}();De.RenderDebouncer=ye},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(Ee,me){return(ye=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(be,ve){be.__proto__=ve}||function(be,ve){for(var we in ve)ve.hasOwnProperty(we)&&(be[we]=ve[we])})(Ee,me)},function(Ee,me){function be(){this.constructor=Ee}ye(Ee,me),Ee.prototype=me===null?Object.create(me):(be.prototype=me.prototype,new be)});Object.defineProperty(De,"__esModule",{value:!0}),De.ScreenDprMonitor=void 0;var Me=function(Ee){function me(){var be=Ee!==null&&Ee.apply(this,arguments)||this;return be._currentDevicePixelRatio=window.devicePixelRatio,be}return Fe(me,Ee),me.prototype.setListener=function(be){var ve=this;this._listener&&this.clearListener(),this._listener=be,this._outerListener=function(){ve._listener&&(ve._listener(window.devicePixelRatio,ve._currentDevicePixelRatio),ve._updateDpr())},this._updateDpr()},me.prototype.dispose=function(){Ee.prototype.dispose.call(this),this.clearListener()},me.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))},me.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)},me}(Le(2).Disposable);De.ScreenDprMonitor=Me},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.clone=void 0,De.clone=function ye(Fe,Me){if(Me===void 0&&(Me=5),typeof Fe!="object")return Fe;var Ee=Array.isArray(Fe)?[]:{};for(var me in Fe)Ee[me]=Me<=1?Fe[me]:Fe[me]?ye(Fe[me],Me-1):Fe[me];return Ee}},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.Terminal=void 0;var ye=Le(4),Fe=Le(35),Me=Le(18),Ee=Le(0),me=Le(83),be=function(){function fe(ue){this._core=new Fe.Terminal(ue),this._addonManager=new me.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 he(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"unicode",{get:function(){return this._checkProposedApi(),new xe(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 ie=oe[z];if(ie===1/0||isNaN(ie)||ie%1!=0)throw new Error("This API only accepts integers")}},fe}();De.Terminal=be;var ve=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 ge(ee)},fe.prototype.getNullCell=function(){return new ye.CellData},fe}(),we=function(){function fe(ue){var ee=this;this._buffers=ue,this._onBufferChange=new Ee.EventEmitter,this._normal=new ve(this._buffers.normal,"normal"),this._alternate=new ve(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}(),ge=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 ye.CellData)},fe.prototype.translateToString=function(ue,ee,z){return this._line.translateToString(ue,ee,z)},fe}(),he=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}(),xe=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(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(Mt,ct){return(ye=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(wt,ft){wt.__proto__=ft}||function(wt,ft){for(var $t in ft)ft.hasOwnProperty($t)&&(wt[$t]=ft[$t])})(Mt,ct)},function(Mt,ct){function wt(){this.constructor=Mt}ye(Mt,ct),Mt.prototype=ct===null?Object.create(ct):(wt.prototype=ct.prototype,new wt)});Object.defineProperty(De,"__esModule",{value:!0}),De.Terminal=void 0;var Me=Le(36),Ee=Le(37),me=Le(38),be=Le(12),ve=Le(19),we=Le(40),ge=Le(50),he=Le(51),xe=Le(11),fe=Le(7),ue=Le(18),ee=Le(54),z=Le(55),oe=Le(56),ie=Le(57),se=Le(59),le=Le(0),Se=Le(16),pe=Le(27),Ce=Le(60),Ae=Le(5),Oe=Le(61),Re=Le(62),We=Le(63),$e=Le(64),Je=Le(65),pt=typeof window!="undefined"?window.document:null,St=function(Mt){function ct(wt){wt===void 0&&(wt={});var ft=Mt.call(this,wt)||this;return ft.browser=xe,ft._keyDownHandled=!1,ft._onCursorMove=new le.EventEmitter,ft._onKey=new le.EventEmitter,ft._onRender=new le.EventEmitter,ft._onSelectionChange=new le.EventEmitter,ft._onTitleChange=new le.EventEmitter,ft._onFocus=new le.EventEmitter,ft._onBlur=new le.EventEmitter,ft._onA11yCharEmitter=new le.EventEmitter,ft._onA11yTabEmitter=new le.EventEmitter,ft._setup(),ft.linkifier=ft._instantiationService.createInstance(ge.Linkifier),ft.linkifier2=ft.register(ft._instantiationService.createInstance(We.Linkifier2)),ft.register(ft._inputHandler.onRequestBell(function(){return ft.bell()})),ft.register(ft._inputHandler.onRequestRefreshRows(function($t,st){return ft.refresh($t,st)})),ft.register(ft._inputHandler.onRequestReset(function(){return ft.reset()})),ft.register(ft._inputHandler.onRequestScroll(function($t,st){return ft.scroll($t,st||void 0)})),ft.register(ft._inputHandler.onRequestWindowsOptionsReport(function($t){return ft._reportWindowsOptions($t)})),ft.register(le.forwardEvent(ft._inputHandler.onCursorMove,ft._onCursorMove)),ft.register(le.forwardEvent(ft._inputHandler.onTitleChange,ft._onTitleChange)),ft.register(le.forwardEvent(ft._inputHandler.onA11yChar,ft._onA11yCharEmitter)),ft.register(le.forwardEvent(ft._inputHandler.onA11yTab,ft._onA11yTabEmitter)),ft.register(ft._bufferService.onResize(function($t){return ft._afterResize($t.cols,$t.rows)})),ft}return Fe(ct,Mt),Object.defineProperty(ct.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(ct.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(ct.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(ct.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(ct.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(ct.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(ct.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(ct.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(ct.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(ct.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),ct.prototype.dispose=function(){var wt,ft,$t;this._isDisposed||(Mt.prototype.dispose.call(this),(wt=this._renderService)===null||wt===void 0||wt.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},($t=(ft=this.element)===null||ft===void 0?void 0:ft.parentNode)===null||$t===void 0||$t.removeChild(this.element))},ct.prototype._setup=function(){Mt.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(ct.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),ct.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},ct.prototype._updateOptions=function(wt){var ft,$t,st,et;switch(Mt.prototype._updateOptions.call(this,wt),wt){case"fontFamily":case"fontSize":(ft=this._renderService)===null||ft===void 0||ft.clear(),($t=this._charSizeService)===null||$t===void 0||$t.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":(st=this.viewport)===null||st===void 0||st.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new oe.AccessibilityManager(this,this._renderService)):((et=this._accessibilityManager)===null||et===void 0||et.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},ct.prototype._onTextAreaFocus=function(wt){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(be.C0.ESC+"[I"),this.updateCursorStyle(wt),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},ct.prototype.blur=function(){var wt;return(wt=this.textarea)===null||wt===void 0?void 0:wt.blur()},ct.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()},ct.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var wt=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),ft=this._bufferService.buffer.y*wt,$t=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=$t+"px",this.textarea.style.top=ft+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=wt+"px",this.textarea.style.lineHeight=wt+"px",this.textarea.style.zIndex="-5"}},ct.prototype._initGlobal=function(){var wt=this;this._bindKeys(),this.register(fe.addDisposableDomListener(this.element,"copy",function($t){wt.hasSelection()&&me.copyHandler($t,wt._selectionService)}));var ft=function($t){return me.handlePasteEvent($t,wt.textarea,wt._coreService)};this.register(fe.addDisposableDomListener(this.textarea,"paste",ft)),this.register(fe.addDisposableDomListener(this.element,"paste",ft)),xe.isFirefox?this.register(fe.addDisposableDomListener(this.element,"mousedown",function($t){$t.button===2&&me.rightClickHandler($t,wt.textarea,wt.screenElement,wt._selectionService,wt.options.rightClickSelectsWord)})):this.register(fe.addDisposableDomListener(this.element,"contextmenu",function($t){me.rightClickHandler($t,wt.textarea,wt.screenElement,wt._selectionService,wt.options.rightClickSelectsWord)})),xe.isLinux&&this.register(fe.addDisposableDomListener(this.element,"auxclick",function($t){$t.button===1&&me.moveTextAreaUnderMouseCursor($t,wt.textarea,wt.screenElement)}))},ct.prototype._bindKeys=function(){var wt=this;this.register(fe.addDisposableDomListener(this.textarea,"keyup",function(ft){return wt._keyUp(ft)},!0)),this.register(fe.addDisposableDomListener(this.textarea,"keydown",function(ft){return wt._keyDown(ft)},!0)),this.register(fe.addDisposableDomListener(this.textarea,"keypress",function(ft){return wt._keyPress(ft)},!0)),this.register(fe.addDisposableDomListener(this.textarea,"compositionstart",function(){return wt._compositionHelper.compositionstart()})),this.register(fe.addDisposableDomListener(this.textarea,"compositionupdate",function(ft){return wt._compositionHelper.compositionupdate(ft)})),this.register(fe.addDisposableDomListener(this.textarea,"compositionend",function(){return wt._compositionHelper.compositionend()})),this.register(this.onRender(function(){return wt._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(ft){return wt._queueLinkification(ft.start,ft.end)}))},ct.prototype.open=function(wt){var ft=this;if(!wt)throw new Error("Terminal requires a parent element.");pt.body.contains(wt)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=wt.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"),wt.appendChild(this.element);var $t=pt.createDocumentFragment();this._viewportElement=pt.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),$t.appendChild(this._viewportElement),this._viewportScrollArea=pt.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=pt.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=pt.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),$t.appendChild(this.screenElement),this.textarea=pt.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(lt){return ft._onTextAreaFocus(lt)})),this.register(fe.addDisposableDomListener(this.textarea,"blur",function(){return ft._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var st=this._instantiationService.createInstance($e.CoreBrowserService,this.textarea);this._instantiationService.setService(Ae.ICoreBrowserService,st),this._charSizeService=this._instantiationService.createInstance(Oe.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(Ae.ICharSizeService,this._charSizeService),this._compositionView=pt.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($t),this._theme=this.options.theme||this._theme,this._colorManager=new pe.ColorManager(pt,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(lt){return ft._colorManager.onOptionsChange(lt)})),this._colorManager.setTheme(this._theme);var et=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(Ce.RenderService,et,this.rows,this.screenElement)),this._instantiationService.setService(Ae.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(lt){return ft._onRender.fire(lt)})),this.onResize(function(lt){return ft._renderService.resize(lt.cols,lt.rows)}),this._soundService=this._instantiationService.createInstance(ee.SoundService),this._instantiationService.setService(Ae.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(Re.MouseService),this._instantiationService.setService(Ae.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(Ee.Viewport,function(lt,dt){return ft.scrollLines(lt,dt)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return ft.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){ft._renderService.onCursorMove(),ft._syncTextArea()})),this.register(this.onResize(function(){return ft._renderService.onResize(ft.cols,ft.rows)})),this.register(this.onBlur(function(){return ft._renderService.onBlur()})),this.register(this.onFocus(function(){return ft._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return ft.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(he.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(Ae.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(lt){return ft.scrollLines(lt.amount,lt.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return ft._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(lt){return ft._renderService.onSelectionChanged(lt.start,lt.end,lt.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(lt){ft.textarea.value=lt,ft.textarea.focus(),ft.textarea.select()})),this.register(this.onScroll(function(){ft.viewport.syncScrollArea(),ft._selectionService.refresh()})),this.register(fe.addDisposableDomListener(this._viewportElement,"scroll",function(){return ft._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(z.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return ft._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(lt){return ft._selectionService.onMouseDown(lt)})),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()},ct.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(ie.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},ct.prototype._setTheme=function(wt){var ft,$t,st;this._theme=wt,(ft=this._colorManager)===null||ft===void 0||ft.setTheme(wt),($t=this._renderService)===null||$t===void 0||$t.setColors(this._colorManager.colors),(st=this.viewport)===null||st===void 0||st.onThemeChange(this._colorManager.colors)},ct.prototype.bindMouse=function(){var wt=this,ft=this,$t=this.element;function st(Vt){var Kt,gn,Gt=ft._mouseService.getRawByteCoords(Vt,ft.screenElement,ft.cols,ft.rows);if(!Gt)return!1;switch(Vt.overrideType||Vt.type){case"mousemove":gn=32,Vt.buttons===void 0?(Kt=3,Vt.button!==void 0&&(Kt=Vt.button<3?Vt.button:3)):Kt=1&Vt.buttons?0:4&Vt.buttons?1:2&Vt.buttons?2:3;break;case"mouseup":gn=0,Kt=Vt.button<3?Vt.button:3;break;case"mousedown":gn=1,Kt=Vt.button<3?Vt.button:3;break;case"wheel":Vt.deltaY!==0&&(gn=Vt.deltaY<0?0:1),Kt=4;break;default:return!1}return!(gn===void 0||Kt===void 0||Kt>4)&&ft._coreMouseService.triggerMouseEvent({col:Gt.x-33,row:Gt.y-33,button:Kt,action:gn,ctrl:Vt.ctrlKey,alt:Vt.altKey,shift:Vt.shiftKey})}var et={mouseup:null,wheel:null,mousedrag:null,mousemove:null},lt=function(Vt){return st(Vt),Vt.buttons||(wt._document.removeEventListener("mouseup",et.mouseup),et.mousedrag&&wt._document.removeEventListener("mousemove",et.mousedrag)),wt.cancel(Vt)},dt=function(Vt){return st(Vt),Vt.preventDefault(),wt.cancel(Vt)},bt=function(Vt){Vt.buttons&&st(Vt)},yt=function(Vt){Vt.buttons||st(Vt)};this.register(this._coreMouseService.onProtocolChange(function(Vt){Vt?(wt.optionsService.options.logLevel==="debug"&&wt._logService.debug("Binding to mouse events:",wt._coreMouseService.explainEvents(Vt)),wt.element.classList.add("enable-mouse-events"),wt._selectionService.disable()):(wt._logService.debug("Unbinding from mouse events."),wt.element.classList.remove("enable-mouse-events"),wt._selectionService.enable()),8&Vt?et.mousemove||($t.addEventListener("mousemove",yt),et.mousemove=yt):($t.removeEventListener("mousemove",et.mousemove),et.mousemove=null),16&Vt?et.wheel||($t.addEventListener("wheel",dt,{passive:!1}),et.wheel=dt):($t.removeEventListener("wheel",et.wheel),et.wheel=null),2&Vt?et.mouseup||(et.mouseup=lt):(wt._document.removeEventListener("mouseup",et.mouseup),et.mouseup=null),4&Vt?et.mousedrag||(et.mousedrag=bt):(wt._document.removeEventListener("mousemove",et.mousedrag),et.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(fe.addDisposableDomListener($t,"mousedown",function(Vt){if(Vt.preventDefault(),wt.focus(),wt._coreMouseService.areMouseEventsActive&&!wt._selectionService.shouldForceSelection(Vt))return st(Vt),et.mouseup&&wt._document.addEventListener("mouseup",et.mouseup),et.mousedrag&&wt._document.addEventListener("mousemove",et.mousedrag),wt.cancel(Vt)})),this.register(fe.addDisposableDomListener($t,"wheel",function(Vt){if(!et.wheel){if(!wt.buffer.hasScrollback){var Kt=wt.viewport.getLinesScrolled(Vt);if(Kt===0)return;for(var gn=be.C0.ESC+(wt._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Vt.deltaY<0?"A":"B"),Gt="",Dt=0;Dt<Math.abs(Kt);Dt++)Gt+=gn;wt._coreService.triggerDataEvent(Gt,!0)}}},{passive:!0})),this.register(fe.addDisposableDomListener($t,"wheel",function(Vt){if(!et.wheel)return wt.viewport.onWheel(Vt)?void 0:wt.cancel(Vt)},{passive:!1})),this.register(fe.addDisposableDomListener($t,"touchstart",function(Vt){if(!wt._coreMouseService.areMouseEventsActive)return wt.viewport.onTouchStart(Vt),wt.cancel(Vt)},{passive:!0})),this.register(fe.addDisposableDomListener($t,"touchmove",function(Vt){if(!wt._coreMouseService.areMouseEventsActive)return wt.viewport.onTouchMove(Vt)?void 0:wt.cancel(Vt)},{passive:!1}))},ct.prototype.refresh=function(wt,ft){var $t;($t=this._renderService)===null||$t===void 0||$t.refreshRows(wt,ft)},ct.prototype._queueLinkification=function(wt,ft){var $t;($t=this.linkifier)===null||$t===void 0||$t.linkifyRows(wt,ft)},ct.prototype.updateCursorStyle=function(wt){this._selectionService&&this._selectionService.shouldColumnSelect(wt)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},ct.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},ct.prototype.scrollLines=function(wt,ft){Mt.prototype.scrollLines.call(this,wt,ft),this.refresh(0,this.rows-1)},ct.prototype.paste=function(wt){me.paste(wt,this.textarea,this._coreService)},ct.prototype.attachCustomKeyEventHandler=function(wt){this._customKeyEventHandler=wt},ct.prototype.registerLinkMatcher=function(wt,ft,$t){var st=this.linkifier.registerLinkMatcher(wt,ft,$t);return this.refresh(0,this.rows-1),st},ct.prototype.deregisterLinkMatcher=function(wt){this.linkifier.deregisterLinkMatcher(wt)&&this.refresh(0,this.rows-1)},ct.prototype.registerLinkProvider=function(wt){return this.linkifier2.registerLinkProvider(wt)},ct.prototype.registerCharacterJoiner=function(wt){var ft=this._renderService.registerCharacterJoiner(wt);return this.refresh(0,this.rows-1),ft},ct.prototype.deregisterCharacterJoiner=function(wt){this._renderService.deregisterCharacterJoiner(wt)&&this.refresh(0,this.rows-1)},Object.defineProperty(ct.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),ct.prototype.addMarker=function(wt){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+wt)},ct.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},ct.prototype.select=function(wt,ft,$t){this._selectionService.setSelection(wt,ft,$t)},ct.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},ct.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]}},ct.prototype.clearSelection=function(){var wt;(wt=this._selectionService)===null||wt===void 0||wt.clearSelection()},ct.prototype.selectAll=function(){var wt;(wt=this._selectionService)===null||wt===void 0||wt.selectAll()},ct.prototype.selectLines=function(wt,ft){var $t;($t=this._selectionService)===null||$t===void 0||$t.selectLines(wt,ft)},ct.prototype._keyDown=function(wt){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(wt)===!1)return!1;if(!this._compositionHelper.keydown(wt))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var ft=se.evaluateKeyboardEvent(wt,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(wt),ft.type===3||ft.type===2){var $t=this.rows-1;return this.scrollLines(ft.type===2?-$t:$t),this.cancel(wt,!0)}return ft.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,wt)||(ft.cancel&&this.cancel(wt,!0),!ft.key||(ft.key!==be.C0.ETX&&ft.key!==be.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ft.key,domEvent:wt}),this._showCursor(),this._coreService.triggerDataEvent(ft.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(wt,!0)))},ct.prototype._isThirdLevelShift=function(wt,ft){var $t=wt.isMac&&!this.options.macOptionIsMeta&&ft.altKey&&!ft.ctrlKey&&!ft.metaKey||wt.isWindows&&ft.altKey&&ft.ctrlKey&&!ft.metaKey;return ft.type==="keypress"?$t:$t&&(!ft.keyCode||ft.keyCode>47)},ct.prototype._keyUp=function(wt){this._customKeyEventHandler&&this._customKeyEventHandler(wt)===!1||(function(ft){return ft.keyCode===16||ft.keyCode===17||ft.keyCode===18}(wt)||this.focus(),this.updateCursorStyle(wt))},ct.prototype._keyPress=function(wt){var ft;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(wt)===!1)return!1;if(this.cancel(wt),wt.charCode)ft=wt.charCode;else if(wt.which===null||wt.which===void 0)ft=wt.keyCode;else{if(wt.which===0||wt.charCode===0)return!1;ft=wt.which}return!(!ft||(wt.altKey||wt.ctrlKey||wt.metaKey)&&!this._isThirdLevelShift(this.browser,wt))&&(ft=String.fromCharCode(ft),this._onKey.fire({key:ft,domEvent:wt}),this._showCursor(),this._coreService.triggerDataEvent(ft,!0),!0)},ct.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},ct.prototype.resize=function(wt,ft){wt!==this.cols||ft!==this.rows?Mt.prototype.resize.call(this,wt,ft):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},ct.prototype._afterResize=function(wt,ft){var $t,st;($t=this._charSizeService)===null||$t===void 0||$t.measure(),(st=this.viewport)===null||st===void 0||st.syncScrollArea(!0)},ct.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 wt=1;wt<this.rows;wt++)this.buffer.lines.push(this.buffer.getBlankLine(Se.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},ct.prototype.reset=function(){var wt,ft;this.options.rows=this.rows,this.options.cols=this.cols;var $t=this._customKeyEventHandler;this._setup(),Mt.prototype.reset.call(this),(wt=this._selectionService)===null||wt===void 0||wt.reset(),this._customKeyEventHandler=$t,this.refresh(0,this.rows-1),(ft=this.viewport)===null||ft===void 0||ft.syncScrollArea()},ct.prototype._reportWindowsOptions=function(wt){if(this._renderService)switch(wt){case ve.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var ft=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),$t=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(be.C0.ESC+"[4;"+$t+";"+ft+"t");break;case ve.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var st=this._renderService.dimensions.scaledCellWidth.toFixed(0),et=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(be.C0.ESC+"[6;"+et+";"+st+"t")}},ct.prototype.cancel=function(wt,ft){if(this.options.cancelEvents||ft)return wt.preventDefault(),wt.stopPropagation(),!1},ct.prototype._visualBell=function(){return!1},ct.prototype._soundBell=function(){return this.options.bellStyle==="sound"},ct}(Je.CoreTerminal);De.Terminal=St},function(hn,De,Le){"use strict";var ye=this&&this.__decorate||function(be,ve,we,ge){var he,xe=arguments.length,fe=xe<3?ve:ge===null?ge=Object.getOwnPropertyDescriptor(ve,we):ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")fe=Reflect.decorate(be,ve,we,ge);else for(var ue=be.length-1;ue>=0;ue--)(he=be[ue])&&(fe=(xe<3?he(fe):xe>3?he(ve,we,fe):he(ve,we))||fe);return xe>3&&fe&&Object.defineProperty(ve,we,fe),fe},Fe=this&&this.__param||function(be,ve){return function(we,ge){ve(we,ge,be)}};Object.defineProperty(De,"__esModule",{value:!0}),De.CompositionHelper=void 0;var Me=Le(5),Ee=Le(1),me=function(){function be(ve,we,ge,he,xe,fe){this._textarea=ve,this._compositionView=we,this._bufferService=ge,this._optionsService=he,this._charSizeService=xe,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(ve){var we=this;this._compositionView.textContent=ve.data,this.updateCompositionElements(),setTimeout(function(){we._compositionPosition.end=we._textarea.value.length},0)},be.prototype.compositionend=function(){this._finalizeComposition(!0)},be.prototype.keydown=function(ve){if(this._isComposing||this._isSendingComposition){if(ve.keyCode===229||ve.keyCode===16||ve.keyCode===17||ve.keyCode===18)return!1;this._finalizeComposition(!1)}return ve.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},be.prototype._finalizeComposition=function(ve){var we=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,ve){var ge={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(we._isSendingComposition){we._isSendingComposition=!1;var xe=void 0;xe=we._isComposing?we._textarea.value.substring(ge.start,ge.end):we._textarea.value.substring(ge.start),we._coreService.triggerDataEvent(xe,!0)}},0)}else{this._isSendingComposition=!1;var he=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(he,!0)}},be.prototype._handleAnyTextareaChanges=function(){var ve=this,we=this._textarea.value;setTimeout(function(){if(!ve._isComposing){var ge=ve._textarea.value.replace(we,"");ge.length>0&&ve._coreService.triggerDataEvent(ge,!0)}},0)},be.prototype.updateCompositionElements=function(ve){var we=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var ge=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),he=this._bufferService.buffer.y*ge,xe=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=xe+"px",this._compositionView.style.top=he+"px",this._compositionView.style.height=ge+"px",this._compositionView.style.lineHeight=ge+"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=xe+"px",this._textarea.style.top=he+"px",this._textarea.style.width=fe.width+"px",this._textarea.style.height=fe.height+"px",this._textarea.style.lineHeight=fe.height+"px"}ve||setTimeout(function(){return we.updateCompositionElements(!0)},0)}},be=ye([Fe(2,Ee.IBufferService),Fe(3,Ee.IOptionsService),Fe(4,Me.ICharSizeService),Fe(5,Ee.ICoreService)],be)}();De.CompositionHelper=me},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(he,xe){return(ye=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])})(he,xe)},function(he,xe){function fe(){this.constructor=he}ye(he,xe),he.prototype=xe===null?Object.create(xe):(fe.prototype=xe.prototype,new fe)}),Me=this&&this.__decorate||function(he,xe,fe,ue){var ee,z=arguments.length,oe=z<3?xe:ue===null?ue=Object.getOwnPropertyDescriptor(xe,fe):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(he,xe,fe,ue);else for(var ie=he.length-1;ie>=0;ie--)(ee=he[ie])&&(oe=(z<3?ee(oe):z>3?ee(xe,fe,oe):ee(xe,fe))||oe);return z>3&&oe&&Object.defineProperty(xe,fe,oe),oe},Ee=this&&this.__param||function(he,xe){return function(fe,ue){xe(fe,ue,he)}};Object.defineProperty(De,"__esModule",{value:!0}),De.Viewport=void 0;var me=Le(2),be=Le(7),ve=Le(5),we=Le(1),ge=function(he){function xe(fe,ue,ee,z,oe,ie,se){var le=he.call(this)||this;return le._scrollLines=fe,le._viewportElement=ue,le._scrollArea=ee,le._bufferService=z,le._optionsService=oe,le._charSizeService=ie,le._renderService=se,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 Fe(xe,he),xe.prototype.onThemeChange=function(fe){this._viewportElement.style.backgroundColor=fe.background.css},xe.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()}))},xe.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},xe.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)},xe.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)}},xe.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)},xe.prototype.onWheel=function(fe){var ue=this._getPixelsScrolled(fe);return ue!==0&&(this._viewportElement.scrollTop+=ue,this._bubbleScroll(fe,ue))},xe.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},xe.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},xe.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},xe.prototype.onTouchStart=function(fe){this._lastTouchY=fe.touches[0].pageY},xe.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))},xe=Me([Ee(3,we.IBufferService),Ee(4,we.IOptionsService),Ee(5,ve.ICharSizeService),Ee(6,ve.IRenderService)],xe)}(me.Disposable);De.Viewport=ge},function(hn,De,Le){"use strict";function ye(me){return me.replace(/\r?\n/g,"\r")}function Fe(me,be){return be?"\x1B[200~"+me+"\x1B[201~":me}function Me(me,be,ve){me=Fe(me=ye(me),ve.decPrivateModes.bracketedPasteMode),ve.triggerDataEvent(me,!0),be.value=""}function Ee(me,be,ve){var we=ve.getBoundingClientRect(),ge=me.clientX-we.left-10,he=me.clientY-we.top-10;be.style.width="20px",be.style.height="20px",be.style.left=ge+"px",be.style.top=he+"px",be.style.zIndex="1000",be.focus()}Object.defineProperty(De,"__esModule",{value:!0}),De.rightClickHandler=De.moveTextAreaUnderMouseCursor=De.paste=De.handlePasteEvent=De.copyHandler=De.bracketTextForPaste=De.prepareTextForTerminal=void 0,De.prepareTextForTerminal=ye,De.bracketTextForPaste=Fe,De.copyHandler=function(me,be){me.clipboardData&&me.clipboardData.setData("text/plain",be.selectionText),me.preventDefault()},De.handlePasteEvent=function(me,be,ve){me.stopPropagation(),me.clipboardData&&Me(me.clipboardData.getData("text/plain"),be,ve)},De.paste=Me,De.moveTextAreaUnderMouseCursor=Ee,De.rightClickHandler=function(me,be,ve,we,ge){Ee(me,be,ve),ge&&!we.isClickInSelection(me)&&we.selectWordAtCursor(me),be.value=we.selectionText,be.select()}},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(he,xe){return(ye=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])})(he,xe)},function(he,xe){function fe(){this.constructor=he}ye(he,xe),he.prototype=xe===null?Object.create(xe):(fe.prototype=xe.prototype,new fe)});Object.defineProperty(De,"__esModule",{value:!0}),De.EscapeSequenceParser=De.VT500_TRANSITION_TABLE=De.TransitionTable=void 0;var Me=Le(2),Ee=Le(15),me=Le(21),be=Le(22),ve=Le(24),we=function(){function he(xe){this.table=new Uint8Array(xe)}return he.prototype.setDefault=function(xe,fe){Ee.fill(this.table,xe<<4|fe)},he.prototype.add=function(xe,fe,ue,ee){this.table[fe<<8|xe]=ue<<4|ee},he.prototype.addMany=function(xe,fe,ue,ee){for(var z=0;z<xe.length;z++)this.table[fe<<8|xe[z]]=ue<<4|ee},he}();De.TransitionTable=we,De.VT500_TRANSITION_TABLE=function(){var he=new we(4095),xe=Array.apply(null,Array(256)).map(function(ie,se){return se}),fe=function(ie,se){return xe.slice(ie,se)},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 he.setDefault(1,0),he.addMany(ue,0,2,0),oe)he.addMany([24,26,153,154],z,3,0),he.addMany(fe(128,144),z,3,0),he.addMany(fe(144,152),z,3,0),he.add(156,z,0,0),he.add(27,z,11,1),he.add(157,z,4,8),he.addMany([152,158,159],z,0,7),he.add(155,z,11,3),he.add(144,z,11,9);return he.addMany(ee,0,3,0),he.addMany(ee,1,3,1),he.add(127,1,0,1),he.addMany(ee,8,0,8),he.addMany(ee,3,3,3),he.add(127,3,0,3),he.addMany(ee,4,3,4),he.add(127,4,0,4),he.addMany(ee,6,3,6),he.addMany(ee,5,3,5),he.add(127,5,0,5),he.addMany(ee,2,3,2),he.add(127,2,0,2),he.add(93,1,4,8),he.addMany(ue,8,5,8),he.add(127,8,5,8),he.addMany([156,27,24,26,7],8,6,0),he.addMany(fe(28,32),8,0,8),he.addMany([88,94,95],1,0,7),he.addMany(ue,7,0,7),he.addMany(ee,7,0,7),he.add(156,7,0,0),he.add(127,7,0,7),he.add(91,1,11,3),he.addMany(fe(64,127),3,7,0),he.addMany(fe(48,60),3,8,4),he.addMany([60,61,62,63],3,9,4),he.addMany(fe(48,60),4,8,4),he.addMany(fe(64,127),4,7,0),he.addMany([60,61,62,63],4,0,6),he.addMany(fe(32,64),6,0,6),he.add(127,6,0,6),he.addMany(fe(64,127),6,0,0),he.addMany(fe(32,48),3,9,5),he.addMany(fe(32,48),5,9,5),he.addMany(fe(48,64),5,0,6),he.addMany(fe(64,127),5,7,0),he.addMany(fe(32,48),4,9,5),he.addMany(fe(32,48),1,9,2),he.addMany(fe(32,48),2,9,2),he.addMany(fe(48,127),2,10,0),he.addMany(fe(48,80),1,10,0),he.addMany(fe(81,88),1,10,0),he.addMany([89,90,92],1,10,0),he.addMany(fe(96,127),1,10,0),he.add(80,1,11,9),he.addMany(ee,9,0,9),he.add(127,9,0,9),he.addMany(fe(28,32),9,0,9),he.addMany(fe(32,48),9,9,12),he.addMany(fe(48,60),9,8,10),he.addMany([60,61,62,63],9,9,10),he.addMany(ee,11,0,11),he.addMany(fe(32,128),11,0,11),he.addMany(fe(28,32),11,0,11),he.addMany(ee,10,0,10),he.add(127,10,0,10),he.addMany(fe(28,32),10,0,10),he.addMany(fe(48,60),10,8,10),he.addMany([60,61,62,63],10,0,11),he.addMany(fe(32,48),10,9,12),he.addMany(ee,12,0,12),he.add(127,12,0,12),he.addMany(fe(28,32),12,0,12),he.addMany(fe(32,48),12,9,12),he.addMany(fe(48,64),12,0,11),he.addMany(fe(64,127),12,12,13),he.addMany(fe(64,127),10,12,13),he.addMany(fe(64,127),9,12,13),he.addMany(ee,13,13,13),he.addMany(ue,13,13,13),he.add(127,13,0,13),he.addMany([27,156,24,26],13,14,0),he.add(160,0,2,0),he.add(160,8,5,8),he.add(160,6,0,6),he.add(160,11,0,11),he.add(160,13,13,13),he}();var ge=function(he){function xe(fe){fe===void 0&&(fe=De.VT500_TRANSITION_TABLE);var ue=he.call(this)||this;return ue._transitions=fe,ue.initialState=0,ue.currentState=ue.initialState,ue._params=new me.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 ve.DcsParser,ue._errorHandler=ue._errorHandlerFb,ue.setEscHandler({final:"\\"},function(){}),ue}return Fe(xe,he),xe.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 ie=fe.final.charCodeAt(0);if(ue[0]>ie||ie>ue[1])throw new Error("final must be in range "+ue[0]+" .. "+ue[1]);return ee<<=8,ee|=ie},xe.prototype.identToString=function(fe){for(var ue=[];fe;)ue.push(String.fromCharCode(255&fe)),fe>>=8;return ue.reverse().join("")},xe.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},xe.prototype.setPrintHandler=function(fe){this._printHandler=fe},xe.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},xe.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)}}},xe.prototype.setEscHandler=function(fe,ue){this._escHandlers[this._identifier(fe,[48,126])]=[ue]},xe.prototype.clearEscHandler=function(fe){this._escHandlers[this._identifier(fe,[48,126])]&&delete this._escHandlers[this._identifier(fe,[48,126])]},xe.prototype.setEscHandlerFallback=function(fe){this._escHandlerFb=fe},xe.prototype.setExecuteHandler=function(fe,ue){this._executeHandlers[fe.charCodeAt(0)]=ue},xe.prototype.clearExecuteHandler=function(fe){this._executeHandlers[fe.charCodeAt(0)]&&delete this._executeHandlers[fe.charCodeAt(0)]},xe.prototype.setExecuteHandlerFallback=function(fe){this._executeHandlerFb=fe},xe.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)}}},xe.prototype.setCsiHandler=function(fe,ue){this._csiHandlers[this._identifier(fe)]=[ue]},xe.prototype.clearCsiHandler=function(fe){this._csiHandlers[this._identifier(fe)]&&delete this._csiHandlers[this._identifier(fe)]},xe.prototype.setCsiHandlerFallback=function(fe){this._csiHandlerFb=fe},xe.prototype.addDcsHandler=function(fe,ue){return this._dcsParser.addHandler(this._identifier(fe),ue)},xe.prototype.setDcsHandler=function(fe,ue){this._dcsParser.setHandler(this._identifier(fe),ue)},xe.prototype.clearDcsHandler=function(fe){this._dcsParser.clearHandler(this._identifier(fe))},xe.prototype.setDcsHandlerFallback=function(fe){this._dcsParser.setHandlerFallback(fe)},xe.prototype.addOscHandler=function(fe,ue){return this._oscParser.addHandler(fe,ue)},xe.prototype.setOscHandler=function(fe,ue){this._oscParser.setHandler(fe,ue)},xe.prototype.clearOscHandler=function(fe){this._oscParser.clearHandler(fe)},xe.prototype.setOscHandlerFallback=function(fe){this._oscParser.setHandlerFallback(fe)},xe.prototype.setErrorHandler=function(fe){this._errorHandler=fe},xe.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},xe.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},xe.prototype.parse=function(fe,ue){for(var ee=0,z=0,oe=this.currentState,ie=this._oscParser,se=this._dcsParser,le=this._collect,Se=this._params,pe=this._transitions.table,Ce=0;Ce<ue;++Ce){switch((z=pe[oe<<8|((ee=fe[Ce])<160?ee:160)])>>4){case 2:for(var Ae=Ce+1;;++Ae){if(Ae>=ue||(ee=fe[Ae])<32||ee>126&&ee<160){this._printHandler(fe,Ce,Ae),Ce=Ae-1;break}if(++Ae>=ue||(ee=fe[Ae])<32||ee>126&&ee<160){this._printHandler(fe,Ce,Ae),Ce=Ae-1;break}if(++Ae>=ue||(ee=fe[Ae])<32||ee>126&&ee<160){this._printHandler(fe,Ce,Ae),Ce=Ae-1;break}if(++Ae>=ue||(ee=fe[Ae])<32||ee>126&&ee<160){this._printHandler(fe,Ce,Ae),Ce=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:Ce,code:ee,currentState:oe,collect:le,params:Se,abort:!1}).abort)return;break;case 7:for(var Oe=this._csiHandlers[le<<8|ee],Re=Oe?Oe.length-1:-1;Re>=0&&Oe[Re](Se)===!1;Re--);Re<0&&this._csiHandlerFb(le<<8|ee,Se),this.precedingCodepoint=0;break;case 8:do switch(ee){case 59:Se.addParam(0);break;case 58:Se.addSubParam(-1);break;default:Se.addDigit(ee-48)}while(++Ce<ue&&(ee=fe[Ce])>47&&ee<60);Ce--;break;case 9:le<<=8,le|=ee;break;case 10:for(var We=this._escHandlers[le<<8|ee],$e=We?We.length-1:-1;$e>=0&&We[$e]()===!1;$e--);$e<0&&this._escHandlerFb(le<<8|ee),this.precedingCodepoint=0;break;case 11:Se.reset(),Se.addParam(0),le=0;break;case 12:se.hook(le<<8|ee,Se);break;case 13:for(var Je=Ce+1;;++Je)if(Je>=ue||(ee=fe[Je])===24||ee===26||ee===27||ee>127&&ee<160){se.put(fe,Ce,Je),Ce=Je-1;break}break;case 14:se.unhook(ee!==24&&ee!==26),ee===27&&(z|=1),Se.reset(),Se.addParam(0),le=0,this.precedingCodepoint=0;break;case 4:ie.start();break;case 5:for(var pt=Ce+1;;pt++)if(pt>=ue||(ee=fe[pt])<32||ee>127&&ee<=159){ie.put(fe,Ce,pt),Ce=pt-1;break}break;case 6:ie.end(ee!==24&&ee!==26),ee===27&&(z|=1),Se.reset(),Se.addParam(0),le=0,this.precedingCodepoint=0}oe=15&z}this._collect=le,this.currentState=oe},xe}(Me.Disposable);De.EscapeSequenceParser=ge},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(ie,se){return(ye=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,Se){le.__proto__=Se}||function(le,Se){for(var pe in Se)Se.hasOwnProperty(pe)&&(le[pe]=Se[pe])})(ie,se)},function(ie,se){function le(){this.constructor=ie}ye(ie,se),ie.prototype=se===null?Object.create(se):(le.prototype=se.prototype,new le)}),Me=this&&this.__decorate||function(ie,se,le,Se){var pe,Ce=arguments.length,Ae=Ce<3?se:Se===null?Se=Object.getOwnPropertyDescriptor(se,le):Se;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ae=Reflect.decorate(ie,se,le,Se);else for(var Oe=ie.length-1;Oe>=0;Oe--)(pe=ie[Oe])&&(Ae=(Ce<3?pe(Ae):Ce>3?pe(se,le,Ae):pe(se,le))||Ae);return Ce>3&&Ae&&Object.defineProperty(se,le,Ae),Ae},Ee=this&&this.__param||function(ie,se){return function(le,Se){se(le,Se,ie)}};Object.defineProperty(De,"__esModule",{value:!0}),De.Renderer=void 0;var me=Le(41),be=Le(47),ve=Le(48),we=Le(49),ge=Le(29),he=Le(2),xe=Le(5),fe=Le(1),ue=Le(25),ee=Le(0),z=1,oe=function(ie){function se(le,Se,pe,Ce,Ae,Oe,Re,We,$e){var Je=ie.call(this)||this;Je._colors=le,Je._screenElement=Se,Je._bufferService=Ae,Je._charSizeService=Oe,Je._optionsService=Re,Je._id=z++,Je._onRequestRedraw=new ee.EventEmitter;var pt=Je._optionsService.options.allowTransparency;return Je._characterJoinerRegistry=new ge.CharacterJoinerRegistry(Je._bufferService),Je._renderLayers=[new me.TextRenderLayer(Je._screenElement,0,Je._colors,Je._characterJoinerRegistry,pt,Je._id,Je._bufferService,Re),new be.SelectionRenderLayer(Je._screenElement,1,Je._colors,Je._id,Je._bufferService,Re),new we.LinkRenderLayer(Je._screenElement,2,Je._colors,Je._id,pe,Ce,Je._bufferService,Re),new ve.CursorRenderLayer(Je._screenElement,3,Je._colors,Je._id,Je._onRequestRedraw,Je._bufferService,Re,We,$e)],Je.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},Je._devicePixelRatio=window.devicePixelRatio,Je._updateDimensions(),Je.onOptionsChanged(),Je}return Fe(se,ie),Object.defineProperty(se.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),se.prototype.dispose=function(){for(var le=0,Se=this._renderLayers;le<Se.length;le++)Se[le].dispose();ie.prototype.dispose.call(this),ue.removeTerminalFromCache(this._id)},se.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},se.prototype.setColors=function(le){this._colors=le;for(var Se=0,pe=this._renderLayers;Se<pe.length;Se++){var Ce=pe[Se];Ce.setColors(this._colors),Ce.reset()}},se.prototype.onResize=function(le,Se){this._updateDimensions();for(var pe=0,Ce=this._renderLayers;pe<Ce.length;pe++)Ce[pe].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},se.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},se.prototype.onBlur=function(){this._runOperation(function(le){return le.onBlur()})},se.prototype.onFocus=function(){this._runOperation(function(le){return le.onFocus()})},se.prototype.onSelectionChanged=function(le,Se,pe){pe===void 0&&(pe=!1),this._runOperation(function(Ce){return Ce.onSelectionChanged(le,Se,pe)})},se.prototype.onCursorMove=function(){this._runOperation(function(le){return le.onCursorMove()})},se.prototype.onOptionsChanged=function(){this._runOperation(function(le){return le.onOptionsChanged()})},se.prototype.clear=function(){this._runOperation(function(le){return le.reset()})},se.prototype._runOperation=function(le){for(var Se=0,pe=this._renderLayers;Se<pe.length;Se++)le(pe[Se])},se.prototype.renderRows=function(le,Se){for(var pe=0,Ce=this._renderLayers;pe<Ce.length;pe++)Ce[pe].onGridChanged(le,Se)},se.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)},se.prototype.registerCharacterJoiner=function(le){return this._characterJoinerRegistry.registerCharacterJoiner(le)},se.prototype.deregisterCharacterJoiner=function(le){return this._characterJoinerRegistry.deregisterCharacterJoiner(le)},se=Me([Ee(4,fe.IBufferService),Ee(5,xe.ICharSizeService),Ee(6,fe.IOptionsService),Ee(7,fe.ICoreService),Ee(8,xe.ICoreBrowserService)],se)}(he.Disposable);De.Renderer=oe},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(he,xe){return(ye=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])})(he,xe)},function(he,xe){function fe(){this.constructor=he}ye(he,xe),he.prototype=xe===null?Object.create(xe):(fe.prototype=xe.prototype,new fe)});Object.defineProperty(De,"__esModule",{value:!0}),De.TextRenderLayer=void 0;var Me=Le(42),Ee=Le(13),me=Le(6),be=Le(3),ve=Le(29),we=Le(4),ge=function(he){function xe(fe,ue,ee,z,oe,ie,se,le){var Se=he.call(this,fe,"text",ue,oe,ee,ie,se,le)||this;return Se._characterWidth=0,Se._characterFont="",Se._characterOverlapCache={},Se._workCell=new we.CellData,Se._state=new Me.GridCache,Se._characterJoinerRegistry=z,Se}return Fe(xe,he),xe.prototype.resize=function(fe){he.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)},xe.prototype.reset=function(){this._state.clear(),this._clearAll()},xe.prototype._forEachCell=function(fe,ue,ee,z){for(var oe=fe;oe<=ue;oe++)for(var ie=oe+this._bufferService.buffer.ydisp,se=this._bufferService.buffer.lines.get(ie),le=ee?ee.getJoinedCharacters(ie):[],Se=0;Se<this._bufferService.cols;Se++){se.loadCell(Se,this._workCell);var pe=this._workCell,Ce=!1,Ae=Se;if(pe.getWidth()!==0){if(le.length>0&&Se===le[0][0]){Ce=!0;var Oe=le.shift();pe=new ve.JoinedCellData(this._workCell,se.translateToString(!0,Oe[0],Oe[1]),Oe[1]-Oe[0]),Ae=Oe[1]-1}!Ce&&this._isOverlapping(pe)&&Ae<se.length-1&&se.getCodePoint(Ae+1)===be.NULL_CELL_CODE&&(pe.content&=-12582913,pe.content|=2<<22),z(pe,Se,oe),Se=Ae}}},xe.prototype._drawBackground=function(fe,ue){var ee=this,z=this._ctx,oe=this._bufferService.cols,ie=0,se=0,le=null;z.save(),this._forEachCell(fe,ue,null,function(Se,pe,Ce){var Ae=null;Se.isInverse()?Ae=Se.isFgDefault()?ee._colors.foreground.css:Se.isFgRGB()?"rgb("+me.AttributeData.toColorRGB(Se.getFgColor()).join(",")+")":ee._colors.ansi[Se.getFgColor()].css:Se.isBgRGB()?Ae="rgb("+me.AttributeData.toColorRGB(Se.getBgColor()).join(",")+")":Se.isBgPalette()&&(Ae=ee._colors.ansi[Se.getBgColor()].css),le===null&&(ie=pe,se=Ce),Ce!==se?(z.fillStyle=le||"",ee._fillCells(ie,se,oe-ie,1),ie=pe,se=Ce):le!==Ae&&(z.fillStyle=le||"",ee._fillCells(ie,se,pe-ie,1),ie=pe,se=Ce),le=Ae}),le!==null&&(z.fillStyle=le,this._fillCells(ie,se,oe-ie,1)),z.restore()},xe.prototype._drawForeground=function(fe,ue){var ee=this;this._forEachCell(fe,ue,this._characterJoinerRegistry,function(z,oe,ie){if(!z.isInvisible()&&(ee._drawChars(z,oe,ie),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("+me.AttributeData.toColorRGB(z.getBgColor()).join(",")+")";else{var se=z.getBgColor();ee._optionsService.options.drawBoldTextInBrightColors&&z.isBold()&&se<8&&(se+=8),ee._ctx.fillStyle=ee._colors.ansi[se].css}else if(z.isFgDefault())ee._ctx.fillStyle=ee._colors.foreground.css;else if(z.isFgRGB())ee._ctx.fillStyle="rgb("+me.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,ie,z.getWidth()),ee._ctx.restore()}})},xe.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))},xe.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},xe.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},xe}(Ee.BaseRenderLayer);De.TextRenderLayer=ge},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.GridCache=void 0;var ye=function(){function Fe(){this.cache=[]}return Fe.prototype.resize=function(Me,Ee){for(var me=0;me<Me;me++){this.cache.length<=me&&this.cache.push([]);for(var be=this.cache[me].length;be<Ee;be++)this.cache[me].push(void 0);this.cache[me].length=Ee}this.cache.length=Me},Fe.prototype.clear=function(){for(var Me=0;Me<this.cache.length;Me++)for(var Ee=0;Ee<this.cache[Me].length;Ee++)this.cache[Me][Ee]=void 0},Fe}();De.GridCache=ye},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(ee,z){return(ye=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(oe,ie){oe.__proto__=ie}||function(oe,ie){for(var se in ie)ie.hasOwnProperty(se)&&(oe[se]=ie[se])})(ee,z)},function(ee,z){function oe(){this.constructor=ee}ye(ee,z),ee.prototype=z===null?Object.create(z):(oe.prototype=z.prototype,new oe)});Object.defineProperty(De,"__esModule",{value:!0}),De.NoneCharAtlas=De.DynamicCharAtlas=De.getGlyphCacheKey=void 0;var Me=Le(9),Ee=Le(44),me=Le(27),be=Le(46),ve=Le(11),we=Le(28),ge=Le(10),he={css:"rgba(0, 0, 0, 0)",rgba:0};function xe(ee){return ee.code<<21|ee.bg<<12|ee.fg<<3|(ee.bold?0:4)+(ee.dim?0:2)+(ee.italic?0:1)}De.getGlyphCacheKey=xe;var fe=function(ee){function z(oe,ie){var se=ee.call(this)||this;se._config=ie,se._drawToCacheCount=0,se._glyphsWaitingOnBitmap=[],se._bitmapCommitTimeout=null,se._bitmap=null,se._cacheCanvas=oe.createElement("canvas"),se._cacheCanvas.width=1024,se._cacheCanvas.height=1024,se._cacheCtx=we.throwIfFalsy(se._cacheCanvas.getContext("2d",{alpha:!0}));var le=oe.createElement("canvas");le.width=se._config.scaledCharWidth,le.height=se._config.scaledCharHeight,se._tmpCtx=we.throwIfFalsy(le.getContext("2d",{alpha:se._config.allowTransparency})),se._width=Math.floor(1024/se._config.scaledCharWidth),se._height=Math.floor(1024/se._config.scaledCharHeight);var Se=se._width*se._height;return se._cacheMap=new be.LRUMap(Se),se._cacheMap.prealloc(Se),se}return Fe(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,ie,se,le){if(ie.code===32)return!0;if(!this._canCache(ie))return!1;var Se=xe(ie),pe=this._cacheMap.get(Se);if(pe!=null)return this._drawFromCache(oe,pe,se,le),!0;if(this._drawToCacheCount<100){var Ce=void 0;Ce=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var Ae=this._drawToCache(ie,Ce);return this._cacheMap.set(Se,Ae),this._drawFromCache(oe,Ae,se,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,ie,se,le){if(!ie.isEmpty){var Se=this._toCoordinateX(ie.index),pe=this._toCoordinateY(ie.index);oe.drawImage(ie.inBitmap?this._bitmap:this._cacheCanvas,Se,pe,this._config.scaledCharWidth,this._config.scaledCharHeight,se,le,this._config.scaledCharWidth,this._config.scaledCharHeight)}},z.prototype._getColorFromAnsiIndex=function(oe){return oe<this._config.colors.ansi.length?this._config.colors.ansi[oe]:me.DEFAULT_ANSI_COLORS[oe]},z.prototype._getBackgroundColor=function(oe){return this._config.allowTransparency?he: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?ge.color.opaque(this._config.colors.background):oe.fg<256?this._getColorFromAnsiIndex(oe.fg):this._config.colors.foreground},z.prototype._drawToCache=function(oe,ie){this._drawToCacheCount++,this._tmpCtx.save();var se=this._getBackgroundColor(oe);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=se.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,Se=oe.italic?"italic":"";this._tmpCtx.font=Se+" "+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 pe=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),Ce=!1;this._config.allowTransparency||(Ce=function(We,$e){for(var Je=!0,pt=$e.rgba>>>24,St=$e.rgba>>>16&255,Mt=$e.rgba>>>8&255,ct=0;ct<We.data.length;ct+=4)We.data[ct]===pt&&We.data[ct+1]===St&&We.data[ct+2]===Mt?We.data[ct+3]=0:Je=!1;return Je}(pe,se));var Ae=this._toCoordinateX(ie),Oe=this._toCoordinateY(ie);this._cacheCtx.putImageData(pe,Ae,Oe);var Re={index:ie,isEmpty:Ce,inBitmap:!1};return this._addGlyphToBitmap(Re),Re},z.prototype._addGlyphToBitmap=function(oe){var ie=this;!("createImageBitmap"in window)||ve.isFirefox||ve.isSafari||(this._glyphsWaitingOnBitmap.push(oe),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return ie._generateBitmap()},100)))},z.prototype._generateBitmap=function(){var oe=this,ie=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(se){oe._bitmap=se;for(var le=0;le<ie.length;le++)ie[le].inBitmap=!0}),this._bitmapCommitTimeout=null},z}(Ee.BaseCharAtlas);De.DynamicCharAtlas=fe;var ue=function(ee){function z(oe,ie){return ee.call(this)||this}return Fe(z,ee),z.prototype.draw=function(oe,ie,se,le){return!1},z}(Ee.BaseCharAtlas);De.NoneCharAtlas=ue},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.BaseCharAtlas=void 0;var ye=function(){function Fe(){this._didWarmUp=!1}return Fe.prototype.dispose=function(){},Fe.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},Fe.prototype._doWarmUp=function(){},Fe.prototype.beginFrame=function(){},Fe}();De.BaseCharAtlas=ye},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.ColorContrastCache=void 0;var ye=function(){function Fe(){this._color={},this._rgba={}}return Fe.prototype.clear=function(){this._color={},this._rgba={}},Fe.prototype.setCss=function(Me,Ee,me){this._rgba[Me]||(this._rgba[Me]={}),this._rgba[Me][Ee]=me},Fe.prototype.getCss=function(Me,Ee){return this._rgba[Me]?this._rgba[Me][Ee]:void 0},Fe.prototype.setColor=function(Me,Ee,me){this._color[Me]||(this._color[Me]={}),this._color[Me][Ee]=me},Fe.prototype.getColor=function(Me,Ee){return this._color[Me]?this._color[Me][Ee]:void 0},Fe}();De.ColorContrastCache=ye},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.LRUMap=void 0;var ye=function(){function Fe(Me){this.capacity=Me,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return Fe.prototype._unlinkNode=function(Me){var Ee=Me.prev,me=Me.next;Me===this._head&&(this._head=me),Me===this._tail&&(this._tail=Ee),Ee!==null&&(Ee.next=me),me!==null&&(me.prev=Ee)},Fe.prototype._appendNode=function(Me){var Ee=this._tail;Ee!==null&&(Ee.next=Me),Me.prev=Ee,Me.next=null,this._tail=Me,this._head===null&&(this._head=Me)},Fe.prototype.prealloc=function(Me){for(var Ee=this._nodePool,me=0;me<Me;me++)Ee.push({prev:null,next:null,key:null,value:null})},Fe.prototype.get=function(Me){var Ee=this._map[Me];return Ee!==void 0?(this._unlinkNode(Ee),this._appendNode(Ee),Ee.value):null},Fe.prototype.peekValue=function(Me){var Ee=this._map[Me];return Ee!==void 0?Ee.value:null},Fe.prototype.peek=function(){var Me=this._head;return Me===null?null:Me.value},Fe.prototype.set=function(Me,Ee){var me=this._map[Me];if(me!==void 0)me=this._map[Me],this._unlinkNode(me),me.value=Ee;else if(this.size>=this.capacity)me=this._head,this._unlinkNode(me),delete this._map[me.key],me.key=Me,me.value=Ee,this._map[Me]=me;else{var be=this._nodePool;be.length>0?((me=be.pop()).key=Me,me.value=Ee):me={prev:null,next:null,key:Me,value:Ee},this._map[Me]=me,this.size++}this._appendNode(me)},Fe}();De.LRUMap=ye},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(Ee,me){return(ye=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(be,ve){be.__proto__=ve}||function(be,ve){for(var we in ve)ve.hasOwnProperty(we)&&(be[we]=ve[we])})(Ee,me)},function(Ee,me){function be(){this.constructor=Ee}ye(Ee,me),Ee.prototype=me===null?Object.create(me):(be.prototype=me.prototype,new be)});Object.defineProperty(De,"__esModule",{value:!0}),De.SelectionRenderLayer=void 0;var Me=function(Ee){function me(be,ve,we,ge,he,xe){var fe=Ee.call(this,be,"selection",ve,!0,we,ge,he,xe)||this;return fe._clearState(),fe}return Fe(me,Ee),me.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},me.prototype.resize=function(be){Ee.prototype.resize.call(this,be),this._clearState()},me.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},me.prototype.onSelectionChanged=function(be,ve,we){if(this._didStateChange(be,ve,we,this._bufferService.buffer.ydisp))if(this._clearAll(),be&&ve){var ge=be[1]-this._bufferService.buffer.ydisp,he=ve[1]-this._bufferService.buffer.ydisp,xe=Math.max(ge,0),fe=Math.min(he,this._bufferService.rows-1);if(!(xe>=this._bufferService.rows||fe<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,we){var ue=be[0],ee=ve[0]-ue,z=fe-xe+1;this._fillCells(ue,xe,ee,z)}else{ue=ge===xe?be[0]:0;var oe=xe===fe?ve[0]:this._bufferService.cols;this._fillCells(ue,xe,oe-ue,1);var ie=Math.max(fe-xe-1,0);if(this._fillCells(0,xe+1,this._bufferService.cols,ie),xe!==fe){var se=he===fe?ve[0]:this._bufferService.cols;this._fillCells(0,fe,se,1)}}this._state.start=[be[0],be[1]],this._state.end=[ve[0],ve[1]],this._state.columnSelectMode=we,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},me.prototype._didStateChange=function(be,ve,we,ge){return!this._areCoordinatesEqual(be,this._state.start)||!this._areCoordinatesEqual(ve,this._state.end)||we!==this._state.columnSelectMode||ge!==this._state.ydisp},me.prototype._areCoordinatesEqual=function(be,ve){return!(!be||!ve)&&be[0]===ve[0]&&be[1]===ve[1]},me}(Le(13).BaseRenderLayer);De.SelectionRenderLayer=Me},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(ve,we){return(ye=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ge,he){ge.__proto__=he}||function(ge,he){for(var xe in he)he.hasOwnProperty(xe)&&(ge[xe]=he[xe])})(ve,we)},function(ve,we){function ge(){this.constructor=ve}ye(ve,we),ve.prototype=we===null?Object.create(we):(ge.prototype=we.prototype,new ge)});Object.defineProperty(De,"__esModule",{value:!0}),De.CursorRenderLayer=void 0;var Me=Le(13),Ee=Le(4),me=function(ve){function we(ge,he,xe,fe,ue,ee,z,oe,ie){var se=ve.call(this,ge,"cursor",he,!0,xe,fe,ee,z)||this;return se._onRequestRedraw=ue,se._coreService=oe,se._coreBrowserService=ie,se._cell=new Ee.CellData,se._state={x:0,y:0,isFocused:!1,style:"",width:0},se._cursorRenderers={bar:se._renderBarCursor.bind(se),block:se._renderBlockCursor.bind(se),underline:se._renderUnderlineCursor.bind(se)},se}return Fe(we,ve),we.prototype.resize=function(ge){ve.prototype.resize.call(this,ge),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 ge,he=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new be(this._coreBrowserService.isFocused,function(){he._render(!0)})):((ge=this._cursorBlinkStateManager)===null||ge===void 0||ge.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(ge,he){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},we.prototype._render=function(ge){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var he=this._bufferService.buffer.ybase+this._bufferService.buffer.y,xe=he-this._bufferService.buffer.ydisp;if(xe<0||xe>=this._bufferService.rows)this._clearCursor();else{var fe=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(he).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,xe,this._cell):this._renderBlurCursor(fe,xe,this._cell),this._ctx.restore(),this._state.x=fe,this._state.y=xe,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===xe&&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,xe,this._cell),this._ctx.restore(),this._state.x=fe,this._state.y=xe,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(ge,he,xe){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(ge,he,this._optionsService.options.cursorWidth),this._ctx.restore()},we.prototype._renderBlockCursor=function(ge,he,xe){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(ge,he,xe.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(xe,ge,he),this._ctx.restore()},we.prototype._renderUnderlineCursor=function(ge,he,xe){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(ge,he),this._ctx.restore()},we.prototype._renderBlurCursor=function(ge,he,xe){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(ge,he,xe.getWidth(),1),this._ctx.restore()},we}(Me.BaseRenderLayer);De.CursorRenderLayer=me;var be=function(){function ve(we,ge){this._renderCallback=ge,this.isCursorVisible=!0,we&&this._restartInterval()}return Object.defineProperty(ve.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),ve.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)},ve.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})))},ve.prototype._restartInterval=function(we){var ge=this;we===void 0&&(we=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout(function(){if(ge._animationTimeRestarted){var he=600-(Date.now()-ge._animationTimeRestarted);if(ge._animationTimeRestarted=void 0,he>0)return void ge._restartInterval(he)}ge.isCursorVisible=!1,ge._animationFrame=window.requestAnimationFrame(function(){ge._renderCallback(),ge._animationFrame=void 0}),ge._blinkInterval=window.setInterval(function(){if(ge._animationTimeRestarted){var xe=600-(Date.now()-ge._animationTimeRestarted);return ge._animationTimeRestarted=void 0,void ge._restartInterval(xe)}ge.isCursorVisible=!ge.isCursorVisible,ge._animationFrame=window.requestAnimationFrame(function(){ge._renderCallback(),ge._animationFrame=void 0})},600)},we)},ve.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)},ve.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},ve}()},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(ve,we){return(ye=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ge,he){ge.__proto__=he}||function(ge,he){for(var xe in he)he.hasOwnProperty(xe)&&(ge[xe]=he[xe])})(ve,we)},function(ve,we){function ge(){this.constructor=ve}ye(ve,we),ve.prototype=we===null?Object.create(we):(ge.prototype=we.prototype,new ge)});Object.defineProperty(De,"__esModule",{value:!0}),De.LinkRenderLayer=void 0;var Me=Le(13),Ee=Le(9),me=Le(26),be=function(ve){function we(ge,he,xe,fe,ue,ee,z,oe){var ie=ve.call(this,ge,"link",he,!0,xe,fe,z,oe)||this;return ue.onShowLinkUnderline(function(se){return ie._onShowLinkUnderline(se)}),ue.onHideLinkUnderline(function(se){return ie._onHideLinkUnderline(se)}),ee.onShowLinkUnderline(function(se){return ie._onShowLinkUnderline(se)}),ee.onHideLinkUnderline(function(se){return ie._onHideLinkUnderline(se)}),ie}return Fe(we,ve),we.prototype.resize=function(ge){ve.prototype.resize.call(this,ge),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 ge=this._state.y2-this._state.y1-1;ge>0&&this._clearCells(0,this._state.y1+1,this._state.cols,ge),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},we.prototype._onShowLinkUnderline=function(ge){if(ge.fg===Ee.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:ge.fg&&me.is256Color(ge.fg)?this._ctx.fillStyle=this._colors.ansi[ge.fg].css:this._ctx.fillStyle=this._colors.foreground.css,ge.y1===ge.y2)this._fillBottomLineAtCells(ge.x1,ge.y1,ge.x2-ge.x1);else{this._fillBottomLineAtCells(ge.x1,ge.y1,ge.cols-ge.x1);for(var he=ge.y1+1;he<ge.y2;he++)this._fillBottomLineAtCells(0,he,ge.cols);this._fillBottomLineAtCells(0,ge.y2,ge.x2)}this._state=ge},we.prototype._onHideLinkUnderline=function(ge){this._clearCurrentLink()},we}(Me.BaseRenderLayer);De.LinkRenderLayer=be},function(hn,De,Le){"use strict";var ye=this&&this.__decorate||function(ve,we,ge,he){var xe,fe=arguments.length,ue=fe<3?we:he===null?he=Object.getOwnPropertyDescriptor(we,ge):he;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ue=Reflect.decorate(ve,we,ge,he);else for(var ee=ve.length-1;ee>=0;ee--)(xe=ve[ee])&&(ue=(fe<3?xe(ue):fe>3?xe(we,ge,ue):xe(we,ge))||ue);return fe>3&&ue&&Object.defineProperty(we,ge,ue),ue},Fe=this&&this.__param||function(ve,we){return function(ge,he){we(ge,he,ve)}};Object.defineProperty(De,"__esModule",{value:!0}),De.MouseZone=De.Linkifier=void 0;var Me=Le(0),Ee=Le(1),me=function(){function ve(we,ge,he){this._bufferService=we,this._logService=ge,this._unicodeService=he,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(ve.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),ve.prototype.attachToDom=function(we,ge){this._element=we,this._mouseZoneManager=ge},ve.prototype.linkifyRows=function(we,ge){var he=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=we,this._rowsToLinkify.end=ge):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,we),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,ge)),this._mouseZoneManager.clearAll(we,ge),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return he._linkifyRows()},ve._timeBeforeLatency))},ve.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var we=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var ge=we.ydisp+this._rowsToLinkify.start;if(!(ge>=we.lines.length)){for(var he=we.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,xe=Math.ceil(2e3/this._bufferService.cols),fe=this._bufferService.buffer.iterator(!1,ge,he,xe,xe);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")},ve.prototype.registerLinkMatcher=function(we,ge,he){if(he===void 0&&(he={}),!ge)throw new Error("handler must be defined");var xe={id:this._nextLinkMatcherId++,regex:we,handler:ge,matchIndex:he.matchIndex,validationCallback:he.validationCallback,hoverTooltipCallback:he.tooltipCallback,hoverLeaveCallback:he.leaveCallback,willLinkActivate:he.willLinkActivate,priority:he.priority||0};return this._addLinkMatcherToList(xe),xe.id},ve.prototype._addLinkMatcherToList=function(we){if(this._linkMatchers.length!==0){for(var ge=this._linkMatchers.length-1;ge>=0;ge--)if(we.priority<=this._linkMatchers[ge].priority)return void this._linkMatchers.splice(ge+1,0,we);this._linkMatchers.splice(0,0,we)}else this._linkMatchers.push(we)},ve.prototype.deregisterLinkMatcher=function(we){for(var ge=0;ge<this._linkMatchers.length;ge++)if(this._linkMatchers[ge].id===we)return this._linkMatchers.splice(ge,1),!0;return!1},ve.prototype._doLinkifyRow=function(we,ge,he){for(var xe,fe=this,ue=new RegExp(he.regex.source,(he.regex.flags||"")+"g"),ee=-1,z=function(){var ie=xe[typeof he.matchIndex!="number"?0:he.matchIndex];if(!ie)return oe._logService.debug("match found without corresponding matchIndex",xe,he),"break";if(ee=ge.indexOf(ie,ee+1),ue.lastIndex=ee+ie.length,ee<0)return"break";var se=oe._bufferService.buffer.stringIndexToBufferIndex(we,ee);if(se[0]<0)return"break";var le=oe._bufferService.buffer.lines.get(se[0]);if(!le)return"break";var Se=le.getFg(se[1]),pe=Se?Se>>9&511:void 0;he.validationCallback?he.validationCallback(ie,function(Ce){fe._rowsTimeoutId||Ce&&fe._addLink(se[1],se[0]-fe._bufferService.buffer.ydisp,ie,he,pe)}):oe._addLink(se[1],se[0]-oe._bufferService.buffer.ydisp,ie,he,pe)},oe=this;(xe=ue.exec(ge))!==null&&z()!=="break";);},ve.prototype._addLink=function(we,ge,he,xe,fe){var ue=this;if(this._mouseZoneManager&&this._element){var ee=this._unicodeService.getStringCellWidth(he),z=we%this._bufferService.cols,oe=ge+Math.floor(we/this._bufferService.cols),ie=(z+ee)%this._bufferService.cols,se=oe+Math.floor((z+ee)/this._bufferService.cols);ie===0&&(ie=this._bufferService.cols,se--),this._mouseZoneManager.add(new be(z+1,oe+1,ie+1,se+1,function(le){if(xe.handler)return xe.handler(le,he);var Se=window.open();Se?(Se.opener=null,Se.location.href=he):console.warn("Opening link blocked as opener could not be cleared")},function(){ue._onShowLinkUnderline.fire(ue._createLinkHoverEvent(z,oe,ie,se,fe)),ue._element.classList.add("xterm-cursor-pointer")},function(le){ue._onLinkTooltip.fire(ue._createLinkHoverEvent(z,oe,ie,se,fe)),xe.hoverTooltipCallback&&xe.hoverTooltipCallback(le,he,{start:{x:z,y:oe},end:{x:ie,y:se}})},function(){ue._onHideLinkUnderline.fire(ue._createLinkHoverEvent(z,oe,ie,se,fe)),ue._element.classList.remove("xterm-cursor-pointer"),xe.hoverLeaveCallback&&xe.hoverLeaveCallback()},function(le){return!xe.willLinkActivate||xe.willLinkActivate(le,he)}))}},ve.prototype._createLinkHoverEvent=function(we,ge,he,xe,fe){return{x1:we,y1:ge,x2:he,y2:xe,cols:this._bufferService.cols,fg:fe}},ve._timeBeforeLatency=200,ve=ye([Fe(0,Ee.IBufferService),Fe(1,Ee.ILogService),Fe(2,Ee.IUnicodeService)],ve)}();De.Linkifier=me;var be=function(ve,we,ge,he,xe,fe,ue,ee,z){this.x1=ve,this.y1=we,this.x2=ge,this.y2=he,this.clickCallback=xe,this.hoverCallback=fe,this.tooltipCallback=ue,this.leaveCallback=ee,this.willLinkActivate=z};De.MouseZone=be},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(ie,se){return(ye=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,Se){le.__proto__=Se}||function(le,Se){for(var pe in Se)Se.hasOwnProperty(pe)&&(le[pe]=Se[pe])})(ie,se)},function(ie,se){function le(){this.constructor=ie}ye(ie,se),ie.prototype=se===null?Object.create(se):(le.prototype=se.prototype,new le)}),Me=this&&this.__decorate||function(ie,se,le,Se){var pe,Ce=arguments.length,Ae=Ce<3?se:Se===null?Se=Object.getOwnPropertyDescriptor(se,le):Se;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ae=Reflect.decorate(ie,se,le,Se);else for(var Oe=ie.length-1;Oe>=0;Oe--)(pe=ie[Oe])&&(Ae=(Ce<3?pe(Ae):Ce>3?pe(se,le,Ae):pe(se,le))||Ae);return Ce>3&&Ae&&Object.defineProperty(se,le,Ae),Ae},Ee=this&&this.__param||function(ie,se){return function(le,Se){se(le,Se,ie)}};Object.defineProperty(De,"__esModule",{value:!0}),De.SelectionService=void 0;var me=Le(11),be=Le(52),ve=Le(4),we=Le(0),ge=Le(5),he=Le(1),xe=Le(30),fe=Le(53),ue=Le(2),ee="\xA0",z=new RegExp(ee,"g"),oe=function(ie){function se(le,Se,pe,Ce,Ae,Oe,Re){var We=ie.call(this)||this;return We._element=le,We._screenElement=Se,We._bufferService=pe,We._coreService=Ce,We._mouseService=Ae,We._optionsService=Oe,We._renderService=Re,We._dragScrollAmount=0,We._enabled=!0,We._workCell=new ve.CellData,We._mouseDownTimeStamp=0,We._onLinuxMouseSelection=We.register(new we.EventEmitter),We._onRedrawRequest=We.register(new we.EventEmitter),We._onSelectionChange=We.register(new we.EventEmitter),We._onRequestScrollLines=We.register(new we.EventEmitter),We._mouseMoveListener=function($e){return We._onMouseMove($e)},We._mouseUpListener=function($e){return We._onMouseUp($e)},We._coreService.onUserInput(function(){We.hasSelection&&We.clearSelection()}),We._trimListener=We._bufferService.buffer.lines.onTrim(function($e){return We._onTrim($e)}),We.register(We._bufferService.buffers.onBufferActivate(function($e){return We._onBufferActivate($e)})),We.enable(),We._model=new be.SelectionModel(We._bufferService),We._activeSelectionMode=0,We}return Fe(se,ie),Object.defineProperty(se.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),se.prototype.dispose=function(){this._removeMouseDownListeners()},se.prototype.reset=function(){this.clearSelection()},se.prototype.disable=function(){this.clearSelection(),this._enabled=!1},se.prototype.enable=function(){this._enabled=!0},Object.defineProperty(se.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"hasSelection",{get:function(){var le=this._model.finalSelectionStart,Se=this._model.finalSelectionEnd;return!(!le||!Se)&&(le[0]!==Se[0]||le[1]!==Se[1])},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"selectionText",{get:function(){var le=this._model.finalSelectionStart,Se=this._model.finalSelectionEnd;if(!le||!Se)return"";var pe=this._bufferService.buffer,Ce=[];if(this._activeSelectionMode===3){if(le[0]===Se[0])return"";for(var Ae=le[1];Ae<=Se[1];Ae++){var Oe=pe.translateBufferLineToString(Ae,!0,le[0],Se[0]);Ce.push(Oe)}}else{var Re=le[1]===Se[1]?Se[0]:void 0;for(Ce.push(pe.translateBufferLineToString(le[1],!0,le[0],Re)),Ae=le[1]+1;Ae<=Se[1]-1;Ae++){var We=pe.lines.get(Ae);Oe=pe.translateBufferLineToString(Ae,!0),We&&We.isWrapped?Ce[Ce.length-1]+=Oe:Ce.push(Oe)}le[1]!==Se[1]&&(We=pe.lines.get(Se[1]),Oe=pe.translateBufferLineToString(Se[1],!0,0,Se[0]),We&&We.isWrapped?Ce[Ce.length-1]+=Oe:Ce.push(Oe))}return Ce.map(function($e){return $e.replace(z," ")}).join(me.isWindows?`\r
|
|
|
`:`
|
|
|
`)},enumerable:!1,configurable:!0}),se.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},se.prototype.refresh=function(le){var Se=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return Se._refresh()})),me.isLinux&&le&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},se.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},se.prototype.isClickInSelection=function(le){var Se=this._getMouseBufferCoords(le),pe=this._model.finalSelectionStart,Ce=this._model.finalSelectionEnd;return!!(pe&&Ce&&Se)&&this._areCoordsInSelection(Se,pe,Ce)},se.prototype._areCoordsInSelection=function(le,Se,pe){return le[1]>Se[1]&&le[1]<pe[1]||Se[1]===pe[1]&&le[1]===Se[1]&&le[0]>=Se[0]&&le[0]<pe[0]||Se[1]<pe[1]&&le[1]===pe[1]&&le[0]<pe[0]||Se[1]<pe[1]&&le[1]===Se[1]&&le[0]>=Se[0]},se.prototype.selectWordAtCursor=function(le){var Se=this._getMouseBufferCoords(le);Se&&(this._selectWordAt(Se,!1),this._model.selectionEnd=void 0,this.refresh(!0))},se.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},se.prototype.selectLines=function(le,Se){this._model.clearSelection(),le=Math.max(le,0),Se=Math.min(Se,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,le],this._model.selectionEnd=[this._bufferService.cols,Se],this.refresh(),this._onSelectionChange.fire()},se.prototype._onTrim=function(le){this._model.onTrim(le)&&this.refresh()},se.prototype._getMouseBufferCoords=function(le){var Se=this._mouseService.getCoords(le,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(Se)return Se[0]--,Se[1]--,Se[1]+=this._bufferService.buffer.ydisp,Se},se.prototype._getMouseEventScrollAmount=function(le){var Se=xe.getCoordsRelativeToElement(le,this._screenElement)[1],pe=this._renderService.dimensions.canvasHeight;return Se>=0&&Se<=pe?0:(Se>pe&&(Se-=pe),Se=Math.min(Math.max(Se,-50),50),(Se/=50)/Math.abs(Se)+Math.round(14*Se))},se.prototype.shouldForceSelection=function(le){return me.isMac?le.altKey&&this._optionsService.options.macOptionClickForcesSelection:le.shiftKey},se.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)}},se.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)},se.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},se.prototype._onIncrementalClick=function(le){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(le))},se.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 Se=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);Se&&Se.length!==this._model.selectionStart[0]&&Se.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},se.prototype._onDoubleClick=function(le){var Se=this._getMouseBufferCoords(le);Se&&(this._activeSelectionMode=1,this._selectWordAt(Se,!0))},se.prototype._onTripleClick=function(le){var Se=this._getMouseBufferCoords(le);Se&&(this._activeSelectionMode=2,this._selectLineAt(Se[1]))},se.prototype.shouldColumnSelect=function(le){return le.altKey&&!(me.isMac&&this._optionsService.options.macOptionClickForcesSelection)},se.prototype._onMouseMove=function(le){if(le.stopImmediatePropagation(),this._model.selectionStart){var Se=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 pe=this._bufferService.buffer;if(this._model.selectionEnd[1]<pe.lines.length){var Ce=pe.lines.get(this._model.selectionEnd[1]);Ce&&Ce.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}Se&&Se[0]===this._model.selectionEnd[0]&&Se[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},se.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()}},se.prototype._onMouseUp=function(le){var Se=le.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&Se<500&&le.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var pe=this._mouseService.getCoords(le,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(pe&&pe[0]!==void 0&&pe[1]!==void 0){var Ce=fe.moveToCellSequence(pe[0]-1,pe[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(Ce,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},se.prototype._onBufferActivate=function(le){var Se=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=le.activeBuffer.lines.onTrim(function(pe){return Se._onTrim(pe)})},se.prototype._convertViewportColToCharacterIndex=function(le,Se){for(var pe=Se[0],Ce=0;Se[0]>=Ce;Ce++){var Ae=le.loadCell(Ce,this._workCell).getChars().length;this._workCell.getWidth()===0?pe--:Ae>1&&Se[0]!==Ce&&(pe+=Ae-1)}return pe},se.prototype.setSelection=function(le,Se,pe){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[le,Se],this._model.selectionStartLength=pe,this.refresh()},se.prototype._getWordAt=function(le,Se,pe,Ce){if(pe===void 0&&(pe=!0),Ce===void 0&&(Ce=!0),!(le[0]>=this._bufferService.cols)){var Ae=this._bufferService.buffer,Oe=Ae.lines.get(le[1]);if(Oe){var Re=Ae.translateBufferLineToString(le[1],!1),We=this._convertViewportColToCharacterIndex(Oe,le),$e=We,Je=le[0]-We,pt=0,St=0,Mt=0,ct=0;if(Re.charAt(We)===" "){for(;We>0&&Re.charAt(We-1)===" ";)We--;for(;$e<Re.length&&Re.charAt($e+1)===" ";)$e++}else{var wt=le[0],ft=le[0];Oe.getWidth(wt)===0&&(pt++,wt--),Oe.getWidth(ft)===2&&(St++,ft++);var $t=Oe.getString(ft).length;for($t>1&&(ct+=$t-1,$e+=$t-1);wt>0&&We>0&&!this._isCharWordSeparator(Oe.loadCell(wt-1,this._workCell));){Oe.loadCell(wt-1,this._workCell);var st=this._workCell.getChars().length;this._workCell.getWidth()===0?(pt++,wt--):st>1&&(Mt+=st-1,We-=st-1),We--,wt--}for(;ft<Oe.length&&$e+1<Re.length&&!this._isCharWordSeparator(Oe.loadCell(ft+1,this._workCell));){Oe.loadCell(ft+1,this._workCell);var et=this._workCell.getChars().length;this._workCell.getWidth()===2?(St++,ft++):et>1&&(ct+=et-1,$e+=et-1),$e++,ft++}}$e++;var lt=We+Je-pt+Mt,dt=Math.min(this._bufferService.cols,$e-We+pt+St-Mt-ct);if(Se||Re.slice(We,$e).trim()!==""){if(pe&<===0&&Oe.getCodePoint(0)!==32){var bt=Ae.lines.get(le[1]-1);if(bt&&Oe.isWrapped&&bt.getCodePoint(this._bufferService.cols-1)!==32){var yt=this._getWordAt([this._bufferService.cols-1,le[1]-1],!1,!0,!1);if(yt){var Vt=this._bufferService.cols-yt.start;lt-=Vt,dt+=Vt}}}if(Ce&<+dt===this._bufferService.cols&&Oe.getCodePoint(this._bufferService.cols-1)!==32){var Kt=Ae.lines.get(le[1]+1);if(Kt&&Kt.isWrapped&&Kt.getCodePoint(0)!==32){var gn=this._getWordAt([0,le[1]+1],!1,!1,!0);gn&&(dt+=gn.length)}}return{start:lt,length:dt}}}}},se.prototype._selectWordAt=function(le,Se){var pe=this._getWordAt(le,Se);if(pe){for(;pe.start<0;)pe.start+=this._bufferService.cols,le[1]--;this._model.selectionStart=[pe.start,le[1]],this._model.selectionStartLength=pe.length}},se.prototype._selectToWordAt=function(le){var Se=this._getWordAt(le,!0);if(Se){for(var pe=le[1];Se.start<0;)Se.start+=this._bufferService.cols,pe--;if(!this._model.areSelectionValuesReversed())for(;Se.start+Se.length>this._bufferService.cols;)Se.length-=this._bufferService.cols,pe++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?Se.start:Se.start+Se.length,pe]}},se.prototype._isCharWordSeparator=function(le){return le.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(le.getChars())>=0},se.prototype._selectLineAt=function(le){var Se=this._bufferService.buffer.getWrappedRangeForLine(le);this._model.selectionStart=[0,Se.first],this._model.selectionEnd=[this._bufferService.cols,Se.last],this._model.selectionStartLength=0},se=Me([Ee(2,he.IBufferService),Ee(3,he.ICoreService),Ee(4,ge.IMouseService),Ee(5,he.IOptionsService),Ee(6,ge.IRenderService)],se)}(ue.Disposable);De.SelectionService=oe},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.SelectionModel=void 0;var ye=function(){function Fe(Me){this._bufferService=Me,this.isSelectAllActive=!1,this.selectionStartLength=0}return Fe.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(Fe.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(Fe.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}),Fe.prototype.areSelectionValuesReversed=function(){var Me=this.selectionStart,Ee=this.selectionEnd;return!(!Me||!Ee)&&(Me[1]>Ee[1]||Me[1]===Ee[1]&&Me[0]>Ee[0])},Fe.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)},Fe}();De.SelectionModel=ye},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.moveToCellSequence=void 0;var ye=Le(12);function Fe(we,ge,he,xe){var fe=we-Me(he,we),ue=ge-Me(he,ge);return ve(Math.abs(fe-ue)-function(ee,z,oe){for(var ie=0,se=ee-Me(oe,ee),le=z-Me(oe,z),Se=0;Se<Math.abs(se-le);Se++){var pe=Ee(ee,z)==="A"?-1:1,Ce=oe.buffer.lines.get(se+pe*Se);Ce&&Ce.isWrapped&&ie++}return ie}(we,ge,he),be(Ee(we,ge),xe))}function Me(we,ge){for(var he=0,xe=we.buffer.lines.get(ge),fe=xe&&xe.isWrapped;fe&&ge>=0&&ge<we.rows;)he++,fe=(xe=we.buffer.lines.get(--ge))&&xe.isWrapped;return he}function Ee(we,ge){return we>ge?"A":"B"}function me(we,ge,he,xe,fe,ue){for(var ee=we,z=ge,oe="";ee!==he||z!==xe;)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,ge){var he=ge?"O":"[";return ye.C0.ESC+he+we}function ve(we,ge){we=Math.floor(we);for(var he="",xe=0;xe<we;xe++)he+=ge;return he}De.moveToCellSequence=function(we,ge,he,xe){var fe,ue=he.buffer.x,ee=he.buffer.y;if(!he.buffer.hasScrollback)return function(oe,ie,se,le,Se,pe){return Fe(ie,le,Se,pe).length===0?"":ve(me(oe,ie,oe,ie-Me(Se,ie),!1,Se).length,be("D",pe))}(ue,ee,0,ge,he,xe)+Fe(ee,ge,he,xe)+function(oe,ie,se,le,Se,pe){var Ce;Ce=Fe(ie,le,Se,pe).length>0?le-Me(Se,le):ie;var Ae=le,Oe=function(Re,We,$e,Je,pt,St){var Mt;return Mt=Fe($e,Je,pt,St).length>0?Je-Me(pt,Je):We,Re<$e&&Mt<=Je||Re>=$e&&Mt<Je?"C":"D"}(oe,ie,se,le,Se,pe);return ve(me(oe,Ce,se,Ae,Oe==="C",Se).length,be(Oe,pe))}(ue,ee,we,ge,he,xe);if(ee===ge)return fe=ue>we?"D":"C",ve(Math.abs(ue-we),be(fe,xe));fe=ee>ge?"D":"C";var z=Math.abs(ee-ge);return ve(function(oe,ie){return ie.cols-oe}(ee>ge?we:ue,he)+(z-1)*he.cols+1+((ee>ge?ue:we)-1),be(fe,xe))}},function(hn,De,Le){"use strict";var ye=this&&this.__decorate||function(me,be,ve,we){var ge,he=arguments.length,xe=he<3?be:we===null?we=Object.getOwnPropertyDescriptor(be,ve):we;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")xe=Reflect.decorate(me,be,ve,we);else for(var fe=me.length-1;fe>=0;fe--)(ge=me[fe])&&(xe=(he<3?ge(xe):he>3?ge(be,ve,xe):ge(be,ve))||xe);return he>3&&xe&&Object.defineProperty(be,ve,xe),xe},Fe=this&&this.__param||function(me,be){return function(ve,we){be(ve,we,me)}};Object.defineProperty(De,"__esModule",{value:!0}),De.SoundService=void 0;var Me=Le(1),Ee=function(){function me(be){this._optionsService=be}return Object.defineProperty(me,"audioContext",{get:function(){if(!me._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;me._audioContext=new be}return me._audioContext},enumerable:!1,configurable:!0}),me.prototype.playBellSound=function(){var be=me.audioContext;if(be){var ve=be.createBufferSource();be.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(we){ve.buffer=we,ve.connect(be.destination),ve.start(0)})}},me.prototype._base64ToArrayBuffer=function(be){for(var ve=window.atob(be),we=ve.length,ge=new Uint8Array(we),he=0;he<we;he++)ge[he]=ve.charCodeAt(he);return ge.buffer},me.prototype._removeMimeType=function(be){return be.split(",")[1]},me=ye([Fe(0,Me.IOptionsService)],me)}();De.SoundService=Ee},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(he,xe){return(ye=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])})(he,xe)},function(he,xe){function fe(){this.constructor=he}ye(he,xe),he.prototype=xe===null?Object.create(xe):(fe.prototype=xe.prototype,new fe)}),Me=this&&this.__decorate||function(he,xe,fe,ue){var ee,z=arguments.length,oe=z<3?xe:ue===null?ue=Object.getOwnPropertyDescriptor(xe,fe):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(he,xe,fe,ue);else for(var ie=he.length-1;ie>=0;ie--)(ee=he[ie])&&(oe=(z<3?ee(oe):z>3?ee(xe,fe,oe):ee(xe,fe))||oe);return z>3&&oe&&Object.defineProperty(xe,fe,oe),oe},Ee=this&&this.__param||function(he,xe){return function(fe,ue){xe(fe,ue,he)}};Object.defineProperty(De,"__esModule",{value:!0}),De.MouseZoneManager=void 0;var me=Le(2),be=Le(7),ve=Le(5),we=Le(1),ge=function(he){function xe(fe,ue,ee,z,oe,ie){var se=he.call(this)||this;return se._element=fe,se._screenElement=ue,se._bufferService=ee,se._mouseService=z,se._selectionService=oe,se._optionsService=ie,se._zones=[],se._areZonesActive=!1,se._lastHoverCoords=[void 0,void 0],se._initialSelectionLength=0,se.register(be.addDisposableDomListener(se._element,"mousedown",function(le){return se._onMouseDown(le)})),se._mouseMoveListener=function(le){return se._onMouseMove(le)},se._mouseLeaveListener=function(le){return se._onMouseLeave(le)},se._clickListener=function(le){return se._onClick(le)},se}return Fe(xe,he),xe.prototype.dispose=function(){he.prototype.dispose.call(this),this._deactivate()},xe.prototype.add=function(fe){this._zones.push(fe),this._zones.length===1&&this._activate()},xe.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()}},xe.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))},xe.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))},xe.prototype._onMouseMove=function(fe){this._lastHoverCoords[0]===fe.pageX&&this._lastHoverCoords[1]===fe.pageY||(this._onHover(fe),this._lastHoverCoords=[fe.pageX,fe.pageY])},xe.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)))},xe.prototype._onTooltip=function(fe){this._tooltipTimeout=void 0;var ue=this._findZoneEventAt(fe);ue&&ue.tooltipCallback&&ue.tooltipCallback(fe)},xe.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())}},xe.prototype._onMouseLeave=function(fe){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},xe.prototype._onClick=function(fe){var ue=this._findZoneEventAt(fe),ee=this._getSelectionLength();ue&&ee===this._initialSelectionLength&&(ue.clickCallback(fe),fe.preventDefault(),fe.stopImmediatePropagation())},xe.prototype._getSelectionLength=function(){var fe=this._selectionService.selectionText;return fe?fe.length:0},xe.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 ie=this._zones[oe];if(ie.y1===ie.y2){if(z===ie.y1&&ee>=ie.x1&&ee<ie.x2)return ie}else if(z===ie.y1&&ee>=ie.x1||z===ie.y2&&ee<ie.x2||z>ie.y1&&z<ie.y2)return ie}},xe=Me([Ee(2,we.IBufferService),Ee(3,ve.IMouseService),Ee(4,ve.ISelectionService),Ee(5,we.IOptionsService)],xe)}(me.Disposable);De.MouseZoneManager=ge},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(xe,fe){return(ye=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])})(xe,fe)},function(xe,fe){function ue(){this.constructor=xe}ye(xe,fe),xe.prototype=fe===null?Object.create(fe):(ue.prototype=fe.prototype,new ue)});Object.defineProperty(De,"__esModule",{value:!0}),De.AccessibilityManager=void 0;var Me=Le(18),Ee=Le(11),me=Le(31),be=Le(7),ve=Le(2),we=Le(32),ge=Le(17),he=function(xe){function fe(ue,ee){var z=xe.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(ie){return z._onBoundaryFocus(ie,0)},z._bottomBoundaryFocusListener=function(ie){return z._onBoundaryFocus(ie,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 me.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(ie){return z._onResize(ie.rows)})),z.register(z._terminal.onRender(function(ie){return z._refreshRows(ie.start,ie.end)})),z.register(z._terminal.onScroll(function(){return z._refreshRows()})),z.register(z._terminal.onA11yChar(function(ie){return z._onChar(ie)})),z.register(z._terminal.onLineFeed(function(){return z._onChar(`
|
|
|
`)})),z.register(z._terminal.onA11yTab(function(ie){return z._onTab(ie)})),z.register(z._terminal.onKey(function(ie){return z._onKey(ie.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 Fe(fe,xe),fe.prototype.dispose=function(){xe.prototype.dispose.call(this),ge.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 ie,se;if(ee===0?(ie=z,se=this._rowElements.pop(),this._rowContainer.removeChild(se)):(ie=this._rowElements.shift(),se=z,this._rowContainer.removeChild(ie)),ie.removeEventListener("focus",this._topBoundaryFocusListener),se.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)),Ee.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,Ee.isMac&&ge.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(),ie=ue;ie<=ee;ie++){var se=z.translateBufferLineToString(z.ydisp+ie,!0),le=(z.ydisp+ie+1).toString(),Se=this._rowElements[ie];Se&&(se.length===0?Se.innerHTML=" ":Se.textContent=se,Se.setAttribute("aria-posinset",le),Se.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}(ve.Disposable);De.AccessibilityManager=he},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(z,oe){return(ye=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ie,se){ie.__proto__=se}||function(ie,se){for(var le in se)se.hasOwnProperty(le)&&(ie[le]=se[le])})(z,oe)},function(z,oe){function ie(){this.constructor=z}ye(z,oe),z.prototype=oe===null?Object.create(oe):(ie.prototype=oe.prototype,new ie)}),Me=this&&this.__decorate||function(z,oe,ie,se){var le,Se=arguments.length,pe=Se<3?oe:se===null?se=Object.getOwnPropertyDescriptor(oe,ie):se;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")pe=Reflect.decorate(z,oe,ie,se);else for(var Ce=z.length-1;Ce>=0;Ce--)(le=z[Ce])&&(pe=(Se<3?le(pe):Se>3?le(oe,ie,pe):le(oe,ie))||pe);return Se>3&&pe&&Object.defineProperty(oe,ie,pe),pe},Ee=this&&this.__param||function(z,oe){return function(ie,se){oe(ie,se,z)}};Object.defineProperty(De,"__esModule",{value:!0}),De.DomRenderer=void 0;var me=Le(58),be=Le(9),ve=Le(2),we=Le(5),ge=Le(1),he=Le(0),xe=Le(10),fe=Le(17),ue=1,ee=function(z){function oe(ie,se,le,Se,pe,Ce,Ae,Oe,Re){var We=z.call(this)||this;return We._colors=ie,We._element=se,We._screenElement=le,We._viewportElement=Se,We._linkifier=pe,We._linkifier2=Ce,We._charSizeService=Ae,We._optionsService=Oe,We._bufferService=Re,We._terminalClass=ue++,We._rowElements=[],We._rowContainer=document.createElement("div"),We._rowContainer.classList.add("xterm-rows"),We._rowContainer.style.lineHeight="normal",We._rowContainer.setAttribute("aria-hidden","true"),We._refreshRowElements(We._bufferService.cols,We._bufferService.rows),We._selectionContainer=document.createElement("div"),We._selectionContainer.classList.add("xterm-selection"),We._selectionContainer.setAttribute("aria-hidden","true"),We.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},We._updateDimensions(),We._injectCss(),We._rowFactory=new me.DomRendererRowFactory(document,We._optionsService,We._colors),We._element.classList.add("xterm-dom-renderer-owner-"+We._terminalClass),We._screenElement.appendChild(We._rowContainer),We._screenElement.appendChild(We._selectionContainer),We._linkifier.onShowLinkUnderline(function($e){return We._onLinkHover($e)}),We._linkifier.onHideLinkUnderline(function($e){return We._onLinkLeave($e)}),We._linkifier2.onShowLinkUnderline(function($e){return We._onLinkHover($e)}),We._linkifier2.onHideLinkUnderline(function($e){return We._onLinkLeave($e)}),We}return Fe(oe,z),Object.defineProperty(oe.prototype,"onRequestRedraw",{get:function(){return new he.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 ie=0,se=this._rowElements;ie<se.length;ie++){var le=se[ie];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 Se=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=Se,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(ie){this._colors=ie,this._injectCss()},oe.prototype._injectCss=function(){var ie=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var se=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";se+=this._terminalSelector+" span:not(."+me.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+me.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+me.ITALIC_CLASS+" { font-style: italic;}",se+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",se+="@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+"; }}",se+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+me.CURSOR_CLASS+"."+me.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+me.CURSOR_CLASS+"."+me.CURSOR_BLINK_CLASS+":not(."+me.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+me.CURSOR_CLASS+"."+me.CURSOR_BLINK_CLASS+"."+me.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+me.CURSOR_CLASS+"."+me.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+me.CURSOR_CLASS+"."+me.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+me.CURSOR_CLASS+"."+me.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",se+=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,Se){se+=ie._terminalSelector+" .xterm-fg-"+Se+" { color: "+le.css+"; }"+ie._terminalSelector+" .xterm-bg-"+Se+" { background-color: "+le.css+"; }"}),se+=this._terminalSelector+" .xterm-fg-"+be.INVERTED_DEFAULT_COLOR+" { color: "+xe.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+be.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.innerHTML=se},oe.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},oe.prototype._refreshRowElements=function(ie,se){for(var le=this._rowElements.length;le<=se;le++){var Se=document.createElement("div");this._rowContainer.appendChild(Se),this._rowElements.push(Se)}for(;this._rowElements.length>se;)this._rowContainer.removeChild(this._rowElements.pop())},oe.prototype.onResize=function(ie,se){this._refreshRowElements(ie,se),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(ie,se,le){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(ie&&se){var Se=ie[1]-this._bufferService.buffer.ydisp,pe=se[1]-this._bufferService.buffer.ydisp,Ce=Math.max(Se,0),Ae=Math.min(pe,this._bufferService.rows-1);if(!(Ce>=this._bufferService.rows||Ae<0)){var Oe=document.createDocumentFragment();if(le)Oe.appendChild(this._createSelectionElement(Ce,ie[0],se[0],Ae-Ce+1));else{var Re=Se===Ce?ie[0]:0,We=Ce===Ae?se[0]:this._bufferService.cols;Oe.appendChild(this._createSelectionElement(Ce,Re,We));var $e=Ae-Ce-1;if(Oe.appendChild(this._createSelectionElement(Ce+1,0,this._bufferService.cols,$e)),Ce!==Ae){var Je=pe===Ae?se[0]:this._bufferService.cols;Oe.appendChild(this._createSelectionElement(Ae,0,Je))}}this._selectionContainer.appendChild(Oe)}}},oe.prototype._createSelectionElement=function(ie,se,le,Se){Se===void 0&&(Se=1);var pe=document.createElement("div");return pe.style.height=Se*this.dimensions.actualCellHeight+"px",pe.style.top=ie*this.dimensions.actualCellHeight+"px",pe.style.left=se*this.dimensions.actualCellWidth+"px",pe.style.width=this.dimensions.actualCellWidth*(le-se)+"px",pe},oe.prototype.onCursorMove=function(){},oe.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},oe.prototype.clear=function(){for(var ie=0,se=this._rowElements;ie<se.length;ie++)se[ie].innerHTML=""},oe.prototype.renderRows=function(ie,se){for(var le=this._bufferService.buffer.ybase+this._bufferService.buffer.y,Se=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),pe=this._optionsService.options.cursorBlink,Ce=ie;Ce<=se;Ce++){var Ae=this._rowElements[Ce];Ae.innerHTML="";var Oe=Ce+this._bufferService.buffer.ydisp,Re=this._bufferService.buffer.lines.get(Oe),We=this._optionsService.options.cursorStyle;Ae.appendChild(this._rowFactory.createRow(Re,Oe===le,We,Se,pe,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(ie){return-1},oe.prototype.deregisterCharacterJoiner=function(ie){return!1},oe.prototype._onLinkHover=function(ie){this._setCellUnderline(ie.x1,ie.x2,ie.y1,ie.y2,ie.cols,!0)},oe.prototype._onLinkLeave=function(ie){this._setCellUnderline(ie.x1,ie.x2,ie.y1,ie.y2,ie.cols,!1)},oe.prototype._setCellUnderline=function(ie,se,le,Se,pe,Ce){for(;ie!==se||le!==Se;){var Ae=this._rowElements[le];if(!Ae)return;var Oe=Ae.children[ie];Oe&&(Oe.style.textDecoration=Ce?"underline":"none"),++ie>=pe&&(ie=0,le++)}},oe=Me([Ee(6,we.ICharSizeService),Ee(7,ge.IOptionsService),Ee(8,ge.IBufferService)],oe)}(ve.Disposable);De.DomRenderer=ee},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.DomRendererRowFactory=De.CURSOR_STYLE_UNDERLINE_CLASS=De.CURSOR_STYLE_BAR_CLASS=De.CURSOR_STYLE_BLOCK_CLASS=De.CURSOR_BLINK_CLASS=De.CURSOR_CLASS=De.UNDERLINE_CLASS=De.ITALIC_CLASS=De.DIM_CLASS=De.BOLD_CLASS=void 0;var ye=Le(9),Fe=Le(3),Me=Le(4),Ee=Le(10);De.BOLD_CLASS="xterm-bold",De.DIM_CLASS="xterm-dim",De.ITALIC_CLASS="xterm-italic",De.UNDERLINE_CLASS="xterm-underline",De.CURSOR_CLASS="xterm-cursor",De.CURSOR_BLINK_CLASS="xterm-cursor-blink",De.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",De.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",De.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var me=function(){function ve(we,ge,he){this._document=we,this._optionsService=ge,this._colors=he,this._workCell=new Me.CellData}return ve.prototype.setColors=function(we){this._colors=we},ve.prototype.createRow=function(we,ge,he,xe,fe,ue,ee){for(var z=this._document.createDocumentFragment(),oe=0,ie=Math.min(we.length,ee)-1;ie>=0;ie--)if(we.loadCell(ie,this._workCell).getCode()!==Fe.NULL_CELL_CODE||ge&&ie===xe){oe=ie+1;break}for(ie=0;ie<oe;ie++){we.loadCell(ie,this._workCell);var se=this._workCell.getWidth();if(se!==0){var le=this._document.createElement("span");if(se>1&&(le.style.width=ue*se+"px"),ge&&ie===xe)switch(le.classList.add(De.CURSOR_CLASS),fe&&le.classList.add(De.CURSOR_BLINK_CLASS),he){case"bar":le.classList.add(De.CURSOR_STYLE_BAR_CLASS);break;case"underline":le.classList.add(De.CURSOR_STYLE_UNDERLINE_CLASS);break;default:le.classList.add(De.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&le.classList.add(De.BOLD_CLASS),this._workCell.isItalic()&&le.classList.add(De.ITALIC_CLASS),this._workCell.isDim()&&le.classList.add(De.DIM_CLASS),this._workCell.isUnderline()&&le.classList.add(De.UNDERLINE_CLASS),this._workCell.isInvisible()?le.textContent=Fe.WHITESPACE_CELL_CHAR:le.textContent=this._workCell.getChars()||Fe.WHITESPACE_CELL_CHAR;var Se=this._workCell.getFgColor(),pe=this._workCell.getFgColorMode(),Ce=this._workCell.getBgColor(),Ae=this._workCell.getBgColorMode(),Oe=!!this._workCell.isInverse();if(Oe){var Re=Se;Se=Ce,Ce=Re;var We=pe;pe=Ae,Ae=We}switch(pe){case 16777216:case 33554432:this._workCell.isBold()&&Se<8&&this._optionsService.options.drawBoldTextInBrightColors&&(Se+=8),this._applyMinimumContrast(le,this._colors.background,this._colors.ansi[Se])||le.classList.add("xterm-fg-"+Se);break;case 50331648:var $e=Ee.rgba.toColor(Se>>16&255,Se>>8&255,255&Se);this._applyMinimumContrast(le,this._colors.background,$e)||this._addStyle(le,"color:#"+be(Se.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(le,this._colors.background,this._colors.foreground)||Oe&&le.classList.add("xterm-fg-"+ye.INVERTED_DEFAULT_COLOR)}switch(Ae){case 16777216:case 33554432:le.classList.add("xterm-bg-"+Ce);break;case 50331648:this._addStyle(le,"background-color:#"+be(Ce.toString(16),"0",6));break;case 0:default:Oe&&le.classList.add("xterm-bg-"+ye.INVERTED_DEFAULT_COLOR)}z.appendChild(le)}}return z},ve.prototype._applyMinimumContrast=function(we,ge,he){if(this._optionsService.options.minimumContrastRatio===1)return!1;var xe=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return xe===void 0&&(xe=Ee.color.ensureContrastRatio(ge,he,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,xe!=null?xe:null)),!!xe&&(this._addStyle(we,"color:"+xe.css),!0)},ve.prototype._addStyle=function(we,ge){we.setAttribute("style",""+(we.getAttribute("style")||"")+ge+";")},ve}();function be(ve,we,ge){for(;ve.length<ge;)ve=we+ve;return ve}De.DomRendererRowFactory=me},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.evaluateKeyboardEvent=void 0;var ye=Le(12),Fe={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:["'",'"']};De.evaluateKeyboardEvent=function(Me,Ee,me,be){var ve={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"?ve.key=Ee?ye.C0.ESC+"OA":ye.C0.ESC+"[A":Me.key==="UIKeyInputLeftArrow"?ve.key=Ee?ye.C0.ESC+"OD":ye.C0.ESC+"[D":Me.key==="UIKeyInputRightArrow"?ve.key=Ee?ye.C0.ESC+"OC":ye.C0.ESC+"[C":Me.key==="UIKeyInputDownArrow"&&(ve.key=Ee?ye.C0.ESC+"OB":ye.C0.ESC+"[B");break;case 8:if(Me.shiftKey){ve.key=ye.C0.BS;break}if(Me.altKey){ve.key=ye.C0.ESC+ye.C0.DEL;break}ve.key=ye.C0.DEL;break;case 9:if(Me.shiftKey){ve.key=ye.C0.ESC+"[Z";break}ve.key=ye.C0.HT,ve.cancel=!0;break;case 13:ve.key=Me.altKey?ye.C0.ESC+ye.C0.CR:ye.C0.CR,ve.cancel=!0;break;case 27:ve.key=ye.C0.ESC,Me.altKey&&(ve.key=ye.C0.ESC+ye.C0.ESC),ve.cancel=!0;break;case 37:if(Me.metaKey)break;we?(ve.key=ye.C0.ESC+"[1;"+(we+1)+"D",ve.key===ye.C0.ESC+"[1;3D"&&(ve.key=ye.C0.ESC+(me?"b":"[1;5D"))):ve.key=Ee?ye.C0.ESC+"OD":ye.C0.ESC+"[D";break;case 39:if(Me.metaKey)break;we?(ve.key=ye.C0.ESC+"[1;"+(we+1)+"C",ve.key===ye.C0.ESC+"[1;3C"&&(ve.key=ye.C0.ESC+(me?"f":"[1;5C"))):ve.key=Ee?ye.C0.ESC+"OC":ye.C0.ESC+"[C";break;case 38:if(Me.metaKey)break;we?(ve.key=ye.C0.ESC+"[1;"+(we+1)+"A",me||ve.key!==ye.C0.ESC+"[1;3A"||(ve.key=ye.C0.ESC+"[1;5A")):ve.key=Ee?ye.C0.ESC+"OA":ye.C0.ESC+"[A";break;case 40:if(Me.metaKey)break;we?(ve.key=ye.C0.ESC+"[1;"+(we+1)+"B",me||ve.key!==ye.C0.ESC+"[1;3B"||(ve.key=ye.C0.ESC+"[1;5B")):ve.key=Ee?ye.C0.ESC+"OB":ye.C0.ESC+"[B";break;case 45:Me.shiftKey||Me.ctrlKey||(ve.key=ye.C0.ESC+"[2~");break;case 46:ve.key=we?ye.C0.ESC+"[3;"+(we+1)+"~":ye.C0.ESC+"[3~";break;case 36:ve.key=we?ye.C0.ESC+"[1;"+(we+1)+"H":Ee?ye.C0.ESC+"OH":ye.C0.ESC+"[H";break;case 35:ve.key=we?ye.C0.ESC+"[1;"+(we+1)+"F":Ee?ye.C0.ESC+"OF":ye.C0.ESC+"[F";break;case 33:Me.shiftKey?ve.type=2:ve.key=ye.C0.ESC+"[5~";break;case 34:Me.shiftKey?ve.type=3:ve.key=ye.C0.ESC+"[6~";break;case 112:ve.key=we?ye.C0.ESC+"[1;"+(we+1)+"P":ye.C0.ESC+"OP";break;case 113:ve.key=we?ye.C0.ESC+"[1;"+(we+1)+"Q":ye.C0.ESC+"OQ";break;case 114:ve.key=we?ye.C0.ESC+"[1;"+(we+1)+"R":ye.C0.ESC+"OR";break;case 115:ve.key=we?ye.C0.ESC+"[1;"+(we+1)+"S":ye.C0.ESC+"OS";break;case 116:ve.key=we?ye.C0.ESC+"[15;"+(we+1)+"~":ye.C0.ESC+"[15~";break;case 117:ve.key=we?ye.C0.ESC+"[17;"+(we+1)+"~":ye.C0.ESC+"[17~";break;case 118:ve.key=we?ye.C0.ESC+"[18;"+(we+1)+"~":ye.C0.ESC+"[18~";break;case 119:ve.key=we?ye.C0.ESC+"[19;"+(we+1)+"~":ye.C0.ESC+"[19~";break;case 120:ve.key=we?ye.C0.ESC+"[20;"+(we+1)+"~":ye.C0.ESC+"[20~";break;case 121:ve.key=we?ye.C0.ESC+"[21;"+(we+1)+"~":ye.C0.ESC+"[21~";break;case 122:ve.key=we?ye.C0.ESC+"[23;"+(we+1)+"~":ye.C0.ESC+"[23~";break;case 123:ve.key=we?ye.C0.ESC+"[24;"+(we+1)+"~":ye.C0.ESC+"[24~";break;default:if(!Me.ctrlKey||Me.shiftKey||Me.altKey||Me.metaKey)if(me&&!be||!Me.altKey||Me.metaKey)me&&!Me.altKey&&!Me.ctrlKey&&Me.metaKey?Me.keyCode===65&&(ve.type=1):Me.key&&!Me.ctrlKey&&!Me.altKey&&!Me.metaKey&&Me.keyCode>=48&&Me.key.length===1?ve.key=Me.key:Me.key&&Me.ctrlKey&&Me.key==="_"&&(ve.key=ye.C0.US);else{var ge=Fe[Me.keyCode],he=ge&&ge[Me.shiftKey?1:0];if(he)ve.key=ye.C0.ESC+he;else if(Me.keyCode>=65&&Me.keyCode<=90){var xe=Me.ctrlKey?Me.keyCode-64:Me.keyCode+32;ve.key=ye.C0.ESC+String.fromCharCode(xe)}}else Me.keyCode>=65&&Me.keyCode<=90?ve.key=String.fromCharCode(Me.keyCode-64):Me.keyCode===32?ve.key=ye.C0.NUL:Me.keyCode>=51&&Me.keyCode<=55?ve.key=String.fromCharCode(Me.keyCode-51+27):Me.keyCode===56?ve.key=ye.C0.DEL:Me.keyCode===219?ve.key=ye.C0.ESC:Me.keyCode===220?ve.key=ye.C0.FS:Me.keyCode===221&&(ve.key=ye.C0.GS)}return ve}},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(ue,ee){return(ye=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,oe){z.__proto__=oe}||function(z,oe){for(var ie in oe)oe.hasOwnProperty(ie)&&(z[ie]=oe[ie])})(ue,ee)},function(ue,ee){function z(){this.constructor=ue}ye(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 ie,se=arguments.length,le=se<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 Se=ue.length-1;Se>=0;Se--)(ie=ue[Se])&&(le=(se<3?ie(le):se>3?ie(ee,z,le):ie(ee,z))||le);return se>3&&le&&Object.defineProperty(ee,z,le),le},Ee=this&&this.__param||function(ue,ee){return function(z,oe){ee(z,oe,ue)}};Object.defineProperty(De,"__esModule",{value:!0}),De.RenderService=void 0;var me=Le(31),be=Le(0),ve=Le(2),we=Le(32),ge=Le(7),he=Le(1),xe=Le(5),fe=function(ue){function ee(z,oe,ie,se,le,Se){var pe=ue.call(this)||this;if(pe._renderer=z,pe._rowCount=oe,pe._isPaused=!1,pe._needsFullRefresh=!1,pe._isNextRenderRedrawOnly=!0,pe._needsSelectionRefresh=!1,pe._canvasWidth=0,pe._canvasHeight=0,pe._selectionState={start:void 0,end:void 0,columnSelectMode:!1},pe._onDimensionsChange=new be.EventEmitter,pe._onRender=new be.EventEmitter,pe._onRefreshRequest=new be.EventEmitter,pe.register({dispose:function(){return pe._renderer.dispose()}}),pe._renderDebouncer=new me.RenderDebouncer(function(Ae,Oe){return pe._renderRows(Ae,Oe)}),pe.register(pe._renderDebouncer),pe._screenDprMonitor=new we.ScreenDprMonitor,pe._screenDprMonitor.setListener(function(){return pe.onDevicePixelRatioChange()}),pe.register(pe._screenDprMonitor),pe.register(Se.onResize(function(Ae){return pe._fullRefresh()})),pe.register(se.onOptionChange(function(){return pe._renderer.onOptionsChanged()})),pe.register(le.onCharSizeChange(function(){return pe.onCharSizeChanged()})),pe._renderer.onRequestRedraw(function(Ae){return pe.refreshRows(Ae.start,Ae.end,!0)}),pe.register(ge.addDisposableDomListener(window,"resize",function(){return pe.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var Ce=new IntersectionObserver(function(Ae){return pe._onIntersectionChange(Ae[Ae.length-1])},{threshold:0});Ce.observe(ie),pe.register({dispose:function(){return Ce.disconnect()}})}return pe}return Fe(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,ie){ie===void 0&&(ie=!1),this._isPaused?this._needsFullRefresh=!0:(ie||(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(ie){return oe.refreshRows(ie.start,ie.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,ie){this._selectionState.start=z,this._selectionState.end=oe,this._selectionState.columnSelectMode=ie,this._renderer.onSelectionChanged(z,oe,ie)},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([Ee(3,he.IOptionsService),Ee(4,xe.ICharSizeService),Ee(5,he.IBufferService)],ee)}(ve.Disposable);De.RenderService=fe},function(hn,De,Le){"use strict";var ye=this&&this.__decorate||function(ve,we,ge,he){var xe,fe=arguments.length,ue=fe<3?we:he===null?he=Object.getOwnPropertyDescriptor(we,ge):he;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ue=Reflect.decorate(ve,we,ge,he);else for(var ee=ve.length-1;ee>=0;ee--)(xe=ve[ee])&&(ue=(fe<3?xe(ue):fe>3?xe(we,ge,ue):xe(we,ge))||ue);return fe>3&&ue&&Object.defineProperty(we,ge,ue),ue},Fe=this&&this.__param||function(ve,we){return function(ge,he){we(ge,he,ve)}};Object.defineProperty(De,"__esModule",{value:!0}),De.CharSizeService=void 0;var Me=Le(1),Ee=Le(0),me=function(){function ve(we,ge,he){this._optionsService=he,this.width=0,this.height=0,this._onCharSizeChange=new Ee.EventEmitter,this._measureStrategy=new be(we,ge,this._optionsService)}return Object.defineProperty(ve.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),ve.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())},ve=ye([Fe(2,Me.IOptionsService)],ve)}();De.CharSizeService=me;var be=function(){function ve(we,ge,he){this._document=we,this._parentElement=ge,this._optionsService=he,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 ve.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},ve}()},function(hn,De,Le){"use strict";var ye=this&&this.__decorate||function(be,ve,we,ge){var he,xe=arguments.length,fe=xe<3?ve:ge===null?ge=Object.getOwnPropertyDescriptor(ve,we):ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")fe=Reflect.decorate(be,ve,we,ge);else for(var ue=be.length-1;ue>=0;ue--)(he=be[ue])&&(fe=(xe<3?he(fe):xe>3?he(ve,we,fe):he(ve,we))||fe);return xe>3&&fe&&Object.defineProperty(ve,we,fe),fe},Fe=this&&this.__param||function(be,ve){return function(we,ge){ve(we,ge,be)}};Object.defineProperty(De,"__esModule",{value:!0}),De.MouseService=void 0;var Me=Le(5),Ee=Le(30),me=function(){function be(ve,we){this._renderService=ve,this._charSizeService=we}return be.prototype.getCoords=function(ve,we,ge,he,xe){return Ee.getCoords(ve,we,ge,he,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,xe)},be.prototype.getRawByteCoords=function(ve,we,ge,he){var xe=this.getCoords(ve,we,ge,he);return Ee.getRawByteCoords(xe)},be=ye([Fe(0,Me.IRenderService),Fe(1,Me.ICharSizeService)],be)}();De.MouseService=me},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(he,xe){return(ye=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])})(he,xe)},function(he,xe){function fe(){this.constructor=he}ye(he,xe),he.prototype=xe===null?Object.create(xe):(fe.prototype=xe.prototype,new fe)}),Me=this&&this.__decorate||function(he,xe,fe,ue){var ee,z=arguments.length,oe=z<3?xe:ue===null?ue=Object.getOwnPropertyDescriptor(xe,fe):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(he,xe,fe,ue);else for(var ie=he.length-1;ie>=0;ie--)(ee=he[ie])&&(oe=(z<3?ee(oe):z>3?ee(xe,fe,oe):ee(xe,fe))||oe);return z>3&&oe&&Object.defineProperty(xe,fe,oe),oe},Ee=this&&this.__param||function(he,xe){return function(fe,ue){xe(fe,ue,he)}};Object.defineProperty(De,"__esModule",{value:!0}),De.Linkifier2=void 0;var me=Le(1),be=Le(0),ve=Le(2),we=Le(7),ge=function(he){function xe(fe){var ue=he.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(ve.getDisposeArrayDisposable(ue._linkCacheDisposables)),ue}return Fe(xe,he),Object.defineProperty(xe.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(xe.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),xe.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)}}},xe.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)))},xe.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)}}},xe.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))},xe.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,ie){var se;ue?!((se=ee._activeProviderReplies)===null||se===void 0)&&se.get(ie)&&(z=ee._checkLinkProviderResult(ie,fe,z)):oe.provideLinks(fe.y,function(le){var Se,pe;if(!ee._isMouseOut){var Ce=le==null?void 0:le.map(function(Ae){return{link:Ae}});(Se=ee._activeProviderReplies)===null||Se===void 0||Se.set(ie,Ce),z=ee._checkLinkProviderResult(ie,fe,z),((pe=ee._activeProviderReplies)===null||pe===void 0?void 0:pe.size)===ee._linkProviders.length&&ee._removeIntersectingLinks(fe.y,ee._activeProviderReplies)}})})},xe.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 ie=0;ie<oe.length;ie++)for(var se=oe[ie],le=se.link.range.start.y<fe?0:se.link.range.start.x,Se=se.link.range.end.y>fe?this._bufferService.cols:se.link.range.end.x,pe=le;pe<=Se;pe++){if(ee.has(pe)){oe.splice(ie--,1);break}ee.add(pe)}}},xe.prototype._checkLinkProviderResult=function(fe,ue,ee){var z,oe=this;if(!this._activeProviderReplies)return ee;for(var ie=this._activeProviderReplies.get(fe),se=!1,le=0;le<fe;le++)this._activeProviderReplies.has(le)&&!this._activeProviderReplies.get(le)||(se=!0);if(!se&&ie){var Se=ie.find(function(Ce){return oe._linkAtPosition(Ce.link,ue)});Se&&(ee=!0,this._handleNewLink(Se))}if(this._activeProviderReplies.size===this._linkProviders.length&&!ee)for(le=0;le<this._activeProviderReplies.size;le++){var pe=(z=this._activeProviderReplies.get(le))===null||z===void 0?void 0:z.find(function(Ce){return oe._linkAtPosition(Ce.link,ue)});if(pe){ee=!0,this._handleNewLink(pe);break}}return ee},xe.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)}},xe.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,ve.disposeArray(this._linkCacheDisposables))},xe.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,ie;!((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&&((ie=ue._element)===null||ie===void 0||ie.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,ie,se;!((oe=ue._currentLink)===null||oe===void 0)&&oe.state&&((se=(ie=ue._currentLink)===null||ie===void 0?void 0:ie.state)===null||se===void 0?void 0:se.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)})))}},xe.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)},xe.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)},xe.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)},xe.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},xe.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}},xe.prototype._createLinkUnderlineEvent=function(fe,ue,ee,z,oe){return{x1:fe,y1:ue,x2:ee,y2:z,cols:this._bufferService.cols,fg:oe}},xe=Me([Ee(0,me.IBufferService)],xe)}(ve.Disposable);De.Linkifier2=ge},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.CoreBrowserService=void 0;var ye=function(){function Fe(Me){this._textarea=Me}return Object.defineProperty(Fe.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),Fe}();De.CoreBrowserService=ye},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(le,Se){return(ye=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(pe,Ce){pe.__proto__=Ce}||function(pe,Ce){for(var Ae in Ce)Ce.hasOwnProperty(Ae)&&(pe[Ae]=Ce[Ae])})(le,Se)},function(le,Se){function pe(){this.constructor=le}ye(le,Se),le.prototype=Se===null?Object.create(Se):(pe.prototype=Se.prototype,new pe)});Object.defineProperty(De,"__esModule",{value:!0}),De.CoreTerminal=void 0;var Me=Le(2),Ee=Le(1),me=Le(66),be=Le(67),ve=Le(68),we=Le(74),ge=Le(75),he=Le(0),xe=Le(76),fe=Le(77),ue=Le(78),ee=Le(80),z=Le(81),oe=Le(19),ie=Le(82),se=function(le){function Se(pe){var Ce=le.call(this)||this;return Ce._onBinary=new he.EventEmitter,Ce._onData=new he.EventEmitter,Ce._onLineFeed=new he.EventEmitter,Ce._onResize=new he.EventEmitter,Ce._onScroll=new he.EventEmitter,Ce._instantiationService=new me.InstantiationService,Ce.optionsService=new we.OptionsService(pe),Ce._instantiationService.setService(Ee.IOptionsService,Ce.optionsService),Ce._bufferService=Ce.register(Ce._instantiationService.createInstance(ve.BufferService)),Ce._instantiationService.setService(Ee.IBufferService,Ce._bufferService),Ce._logService=Ce._instantiationService.createInstance(be.LogService),Ce._instantiationService.setService(Ee.ILogService,Ce._logService),Ce._coreService=Ce.register(Ce._instantiationService.createInstance(ge.CoreService,function(){return Ce.scrollToBottom()})),Ce._instantiationService.setService(Ee.ICoreService,Ce._coreService),Ce._coreMouseService=Ce._instantiationService.createInstance(xe.CoreMouseService),Ce._instantiationService.setService(Ee.ICoreMouseService,Ce._coreMouseService),Ce._dirtyRowService=Ce._instantiationService.createInstance(fe.DirtyRowService),Ce._instantiationService.setService(Ee.IDirtyRowService,Ce._dirtyRowService),Ce.unicodeService=Ce._instantiationService.createInstance(ue.UnicodeService),Ce._instantiationService.setService(Ee.IUnicodeService,Ce.unicodeService),Ce._charsetService=Ce._instantiationService.createInstance(ee.CharsetService),Ce._instantiationService.setService(Ee.ICharsetService,Ce._charsetService),Ce._inputHandler=new oe.InputHandler(Ce._bufferService,Ce._charsetService,Ce._coreService,Ce._dirtyRowService,Ce._logService,Ce.optionsService,Ce._coreMouseService,Ce.unicodeService),Ce.register(he.forwardEvent(Ce._inputHandler.onLineFeed,Ce._onLineFeed)),Ce.register(Ce._inputHandler),Ce.register(he.forwardEvent(Ce._bufferService.onResize,Ce._onResize)),Ce.register(he.forwardEvent(Ce._coreService.onData,Ce._onData)),Ce.register(he.forwardEvent(Ce._coreService.onBinary,Ce._onBinary)),Ce.register(Ce.optionsService.onOptionChange(function(Ae){return Ce._updateOptions(Ae)})),Ce._writeBuffer=new ie.WriteBuffer(function(Ae){return Ce._inputHandler.parse(Ae)}),Ce}return Fe(Se,le),Object.defineProperty(Se.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),Se.prototype.dispose=function(){var pe;this._isDisposed||(le.prototype.dispose.call(this),(pe=this._windowsMode)===null||pe===void 0||pe.dispose(),this._windowsMode=void 0)},Se.prototype.write=function(pe,Ce){this._writeBuffer.write(pe,Ce)},Se.prototype.writeSync=function(pe){this._writeBuffer.writeSync(pe)},Se.prototype.resize=function(pe,Ce){isNaN(pe)||isNaN(Ce)||(pe=Math.max(pe,ve.MINIMUM_COLS),Ce=Math.max(Ce,ve.MINIMUM_ROWS),this._bufferService.resize(pe,Ce))},Se.prototype.scroll=function(pe,Ce){Ce===void 0&&(Ce=!1);var Ae,Oe=this._bufferService.buffer;(Ae=this._cachedBlankLine)&&Ae.length===this.cols&&Ae.getFg(0)===pe.fg&&Ae.getBg(0)===pe.bg||(Ae=Oe.getBlankLine(pe,Ce),this._cachedBlankLine=Ae),Ae.isWrapped=Ce;var Re=Oe.ybase+Oe.scrollTop,We=Oe.ybase+Oe.scrollBottom;if(Oe.scrollTop===0){var $e=Oe.lines.isFull;We===Oe.lines.length-1?$e?Oe.lines.recycle().copyFrom(Ae):Oe.lines.push(Ae.clone()):Oe.lines.splice(We+1,0,Ae.clone()),$e?this._bufferService.isUserScrolling&&(Oe.ydisp=Math.max(Oe.ydisp-1,0)):(Oe.ybase++,this._bufferService.isUserScrolling||Oe.ydisp++)}else{var Je=We-Re+1;Oe.lines.shiftElements(Re+1,Je-1,-1),Oe.lines.set(We,Ae.clone())}this._bufferService.isUserScrolling||(Oe.ydisp=Oe.ybase),this._dirtyRowService.markRangeDirty(Oe.scrollTop,Oe.scrollBottom),this._onScroll.fire(Oe.ydisp)},Se.prototype.scrollLines=function(pe,Ce){var Ae=this._bufferService.buffer;if(pe<0){if(Ae.ydisp===0)return;this._bufferService.isUserScrolling=!0}else pe+Ae.ydisp>=Ae.ybase&&(this._bufferService.isUserScrolling=!1);var Oe=Ae.ydisp;Ae.ydisp=Math.max(Math.min(Ae.ydisp+pe,Ae.ybase),0),Oe!==Ae.ydisp&&(Ce||this._onScroll.fire(Ae.ydisp))},Se.prototype.scrollPages=function(pe){this.scrollLines(pe*(this.rows-1))},Se.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},Se.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},Se.prototype.scrollToLine=function(pe){var Ce=pe-this._bufferService.buffer.ydisp;Ce!==0&&this.scrollLines(Ce)},Se.prototype.addEscHandler=function(pe,Ce){return this._inputHandler.addEscHandler(pe,Ce)},Se.prototype.addDcsHandler=function(pe,Ce){return this._inputHandler.addDcsHandler(pe,Ce)},Se.prototype.addCsiHandler=function(pe,Ce){return this._inputHandler.addCsiHandler(pe,Ce)},Se.prototype.addOscHandler=function(pe,Ce){return this._inputHandler.addOscHandler(pe,Ce)},Se.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},Se.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},Se.prototype._updateOptions=function(pe){var Ce;switch(pe){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((Ce=this._windowsMode)===null||Ce===void 0||Ce.dispose(),this._windowsMode=void 0)}},Se.prototype._enableWindowsMode=function(){var pe=this;if(!this._windowsMode){var Ce=[];Ce.push(this.onLineFeed(z.updateWindowsModeWrappedState.bind(null,this._bufferService))),Ce.push(this.addCsiHandler({final:"H"},function(){return z.updateWindowsModeWrappedState(pe._bufferService),!1})),this._windowsMode={dispose:function(){for(var Ae=0,Oe=Ce;Ae<Oe.length;Ae++)Oe[Ae].dispose()}}}},Se}(Me.Disposable);De.CoreTerminal=se},function(hn,De,Le){"use strict";var ye=this&&this.__spreadArrays||function(){for(var be=0,ve=0,we=arguments.length;ve<we;ve++)be+=arguments[ve].length;var ge=Array(be),he=0;for(ve=0;ve<we;ve++)for(var xe=arguments[ve],fe=0,ue=xe.length;fe<ue;fe++,he++)ge[he]=xe[fe];return ge};Object.defineProperty(De,"__esModule",{value:!0}),De.InstantiationService=De.ServiceCollection=void 0;var Fe=Le(1),Me=Le(14),Ee=function(){function be(){for(var ve=[],we=0;we<arguments.length;we++)ve[we]=arguments[we];this._entries=new Map;for(var ge=0,he=ve;ge<he.length;ge++){var xe=he[ge],fe=xe[0],ue=xe[1];this.set(fe,ue)}}return be.prototype.set=function(ve,we){var ge=this._entries.get(ve);return this._entries.set(ve,we),ge},be.prototype.forEach=function(ve){this._entries.forEach(function(we,ge){return ve(ge,we)})},be.prototype.has=function(ve){return this._entries.has(ve)},be.prototype.get=function(ve){return this._entries.get(ve)},be}();De.ServiceCollection=Ee;var me=function(){function be(){this._services=new Ee,this._services.set(Fe.IInstantiationService,this)}return be.prototype.setService=function(ve,we){this._services.set(ve,we)},be.prototype.getService=function(ve){return this._services.get(ve)},be.prototype.createInstance=function(ve){for(var we=[],ge=1;ge<arguments.length;ge++)we[ge-1]=arguments[ge];for(var he=Me.getServiceDependencies(ve).sort(function(ie,se){return ie.index-se.index}),xe=[],fe=0,ue=he;fe<ue.length;fe++){var ee=ue[fe],z=this._services.get(ee.id);if(!z)throw new Error("[createInstance] "+ve.name+" depends on UNKNOWN service "+ee.id+".");xe.push(z)}var oe=he.length>0?he[0].index:we.length;if(we.length!==oe)throw new Error("[createInstance] First service dependency of "+ve.name+" at position "+(oe+1)+" conflicts with "+we.length+" static arguments");return new(ve.bind.apply(ve,ye([void 0],ye(we,xe))))},be}();De.InstantiationService=me},function(hn,De,Le){"use strict";var ye=this&&this.__decorate||function(we,ge,he,xe){var fe,ue=arguments.length,ee=ue<3?ge:xe===null?xe=Object.getOwnPropertyDescriptor(ge,he):xe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ee=Reflect.decorate(we,ge,he,xe);else for(var z=we.length-1;z>=0;z--)(fe=we[z])&&(ee=(ue<3?fe(ee):ue>3?fe(ge,he,ee):fe(ge,he))||ee);return ue>3&&ee&&Object.defineProperty(ge,he,ee),ee},Fe=this&&this.__param||function(we,ge){return function(he,xe){ge(he,xe,we)}},Me=this&&this.__spreadArrays||function(){for(var we=0,ge=0,he=arguments.length;ge<he;ge++)we+=arguments[ge].length;var xe=Array(we),fe=0;for(ge=0;ge<he;ge++)for(var ue=arguments[ge],ee=0,z=ue.length;ee<z;ee++,fe++)xe[fe]=ue[ee];return xe};Object.defineProperty(De,"__esModule",{value:!0}),De.LogService=De.LogLevel=void 0;var Ee,me=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"})(Ee=De.LogLevel||(De.LogLevel={}));var be={debug:Ee.DEBUG,info:Ee.INFO,warn:Ee.WARN,error:Ee.ERROR,off:Ee.OFF},ve=function(){function we(ge){var he=this;this._optionsService=ge,this._updateLogLevel(),this._optionsService.onOptionChange(function(xe){xe==="logLevel"&&he._updateLogLevel()})}return we.prototype._updateLogLevel=function(){this._logLevel=be[this._optionsService.options.logLevel]},we.prototype._evalLazyOptionalParams=function(ge){for(var he=0;he<ge.length;he++)typeof ge[he]=="function"&&(ge[he]=ge[he]())},we.prototype._log=function(ge,he,xe){this._evalLazyOptionalParams(xe),ge.call.apply(ge,Me([console,"xterm.js: "+he],xe))},we.prototype.debug=function(ge){for(var he=[],xe=1;xe<arguments.length;xe++)he[xe-1]=arguments[xe];this._logLevel<=Ee.DEBUG&&this._log(console.log,ge,he)},we.prototype.info=function(ge){for(var he=[],xe=1;xe<arguments.length;xe++)he[xe-1]=arguments[xe];this._logLevel<=Ee.INFO&&this._log(console.info,ge,he)},we.prototype.warn=function(ge){for(var he=[],xe=1;xe<arguments.length;xe++)he[xe-1]=arguments[xe];this._logLevel<=Ee.WARN&&this._log(console.warn,ge,he)},we.prototype.error=function(ge){for(var he=[],xe=1;xe<arguments.length;xe++)he[xe-1]=arguments[xe];this._logLevel<=Ee.ERROR&&this._log(console.error,ge,he)},we=ye([Fe(0,me.IOptionsService)],we)}();De.LogService=ve},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(he,xe){return(ye=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])})(he,xe)},function(he,xe){function fe(){this.constructor=he}ye(he,xe),he.prototype=xe===null?Object.create(xe):(fe.prototype=xe.prototype,new fe)}),Me=this&&this.__decorate||function(he,xe,fe,ue){var ee,z=arguments.length,oe=z<3?xe:ue===null?ue=Object.getOwnPropertyDescriptor(xe,fe):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(he,xe,fe,ue);else for(var ie=he.length-1;ie>=0;ie--)(ee=he[ie])&&(oe=(z<3?ee(oe):z>3?ee(xe,fe,oe):ee(xe,fe))||oe);return z>3&&oe&&Object.defineProperty(xe,fe,oe),oe},Ee=this&&this.__param||function(he,xe){return function(fe,ue){xe(fe,ue,he)}};Object.defineProperty(De,"__esModule",{value:!0}),De.BufferService=De.MINIMUM_ROWS=De.MINIMUM_COLS=void 0;var me=Le(1),be=Le(69),ve=Le(0),we=Le(2);De.MINIMUM_COLS=2,De.MINIMUM_ROWS=1;var ge=function(he){function xe(fe){var ue=he.call(this)||this;return ue._optionsService=fe,ue.isUserScrolling=!1,ue._onResize=new ve.EventEmitter,ue.cols=Math.max(fe.options.cols,De.MINIMUM_COLS),ue.rows=Math.max(fe.options.rows,De.MINIMUM_ROWS),ue.buffers=new be.BufferSet(fe,ue),ue}return Fe(xe,he),Object.defineProperty(xe.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(xe.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),xe.prototype.dispose=function(){he.prototype.dispose.call(this),this.buffers.dispose()},xe.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})},xe.prototype.reset=function(){this.buffers.dispose(),this.buffers=new be.BufferSet(this._optionsService,this),this.isUserScrolling=!1},xe=Me([Ee(0,me.IOptionsService)],xe)}(we.Disposable);De.BufferService=ge},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(be,ve){return(ye=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(we,ge){we.__proto__=ge}||function(we,ge){for(var he in ge)ge.hasOwnProperty(he)&&(we[he]=ge[he])})(be,ve)},function(be,ve){function we(){this.constructor=be}ye(be,ve),be.prototype=ve===null?Object.create(ve):(we.prototype=ve.prototype,new we)});Object.defineProperty(De,"__esModule",{value:!0}),De.BufferSet=void 0;var Me=Le(70),Ee=Le(0),me=function(be){function ve(we,ge){var he=be.call(this)||this;return he._onBufferActivate=he.register(new Ee.EventEmitter),he._normal=new Me.Buffer(!0,we,ge),he._normal.fillViewportRows(),he._alt=new Me.Buffer(!1,we,ge),he._activeBuffer=he._normal,he.setupTabStops(),he}return Fe(ve,be),Object.defineProperty(ve.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),ve.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}))},ve.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}))},ve.prototype.resize=function(we,ge){this._normal.resize(we,ge),this._alt.resize(we,ge)},ve.prototype.setupTabStops=function(we){this._normal.setupTabStops(we),this._alt.setupTabStops(we)},ve}(Le(2).Disposable);De.BufferSet=me},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.BufferStringIterator=De.Buffer=De.MAX_BUFFER_SIZE=void 0;var ye=Le(71),Fe=Le(16),Me=Le(4),Ee=Le(3),me=Le(72),be=Le(73),ve=Le(20),we=Le(6);De.MAX_BUFFER_SIZE=4294967295;var ge=function(){function xe(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=Fe.DEFAULT_ATTR_DATA.clone(),this.savedCharset=ve.DEFAULT_CHARSET,this.markers=[],this._nullCell=Me.CellData.fromCharData([0,Ee.NULL_CELL_CHAR,Ee.NULL_CELL_WIDTH,Ee.NULL_CELL_CODE]),this._whitespaceCell=Me.CellData.fromCharData([0,Ee.WHITESPACE_CELL_CHAR,Ee.WHITESPACE_CELL_WIDTH,Ee.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new ye.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return xe.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},xe.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},xe.prototype.getBlankLine=function(fe,ue){return new Fe.BufferLine(this._bufferService.cols,this.getNullCell(fe),ue)},Object.defineProperty(xe.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(xe.prototype,"isCursorInViewport",{get:function(){var fe=this.ybase+this.y-this.ydisp;return fe>=0&&fe<this._rows},enumerable:!1,configurable:!0}),xe.prototype._getCorrectBufferLength=function(fe){if(!this._hasScrollback)return fe;var ue=fe+this._optionsService.options.scrollback;return ue>De.MAX_BUFFER_SIZE?De.MAX_BUFFER_SIZE:ue},xe.prototype.fillViewportRows=function(fe){if(this.lines.length===0){fe===void 0&&(fe=Fe.DEFAULT_ATTR_DATA);for(var ue=this._rows;ue--;)this.lines.push(this.getBlankLine(fe))}},xe.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new ye.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},xe.prototype.resize=function(fe,ue){var ee=this.getNullCell(Fe.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 ie=0;if(this._rows<ue)for(var se=this._rows;se<ue;se++)this.lines.length<ue+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new Fe.BufferLine(fe,ee)):this.ybase>0&&this.lines.length<=this.ybase+this.y+ie+1?(this.ybase--,ie++,this.ydisp>0&&this.ydisp--):this.lines.push(new Fe.BufferLine(fe,ee)));else for(se=this._rows;se>ue;se--)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),ie&&(this.y+=ie),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(xe.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),xe.prototype._reflow=function(fe,ue){this._cols!==fe&&(fe>this._cols?this._reflowLarger(fe,ue):this._reflowSmaller(fe,ue))},xe.prototype._reflowLarger=function(fe,ue){var ee=me.reflowLargerGetLinesToRemove(this.lines,this._cols,fe,this.ybase+this.y,this.getNullCell(Fe.DEFAULT_ATTR_DATA));if(ee.length>0){var z=me.reflowLargerCreateNewLayout(this.lines,ee);me.reflowLargerApplyNewLayout(this.lines,z.layout),this._reflowLargerAdjustViewport(fe,ue,z.countRemoved)}},xe.prototype._reflowLargerAdjustViewport=function(fe,ue,ee){for(var z=this.getNullCell(Fe.DEFAULT_ATTR_DATA),oe=ee;oe-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<ue&&this.lines.push(new Fe.BufferLine(fe,z))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-ee,0)},xe.prototype._reflowSmaller=function(fe,ue){for(var ee=this.getNullCell(Fe.DEFAULT_ATTR_DATA),z=[],oe=0,ie=this.lines.length-1;ie>=0;ie--){var se=this.lines.get(ie);if(!(!se||!se.isWrapped&&se.getTrimmedLength()<=fe)){for(var le=[se];se.isWrapped&&ie>0;)se=this.lines.get(--ie),le.unshift(se);var Se=this.ybase+this.y;if(!(Se>=ie&&Se<ie+le.length)){var pe=le[le.length-1].getTrimmedLength(),Ce=me.reflowSmallerGetNewLineLengths(le,this._cols,fe),Ae=Ce.length-le.length,Oe=void 0;Oe=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 Re=[],We=0;We<Ae;We++){var $e=this.getBlankLine(Fe.DEFAULT_ATTR_DATA,!0);Re.push($e)}Re.length>0&&(z.push({start:ie+le.length+oe,newLines:Re}),oe+=Re.length),le.push.apply(le,Re);var Je=Ce.length-1,pt=Ce[Je];pt===0&&(pt=Ce[--Je]);for(var St=le.length-Ae-1,Mt=pe;St>=0;){var ct=Math.min(Mt,pt);if(le[Je].copyCellsFrom(le[St],Mt-ct,pt-ct,ct,!0),(pt-=ct)===0&&(pt=Ce[--Je]),(Mt-=ct)===0){St--;var wt=Math.max(St,0);Mt=me.getWrappedLineTrimmedLength(le,wt,this._cols)}}for(We=0;We<le.length;We++)Ce[We]<fe&&le[We].setCell(Ce[We],ee);for(var ft=Ae-Oe;ft-- >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 $t=[],st=[];for(We=0;We<this.lines.length;We++)st.push(this.lines.get(We));var et=this.lines.length,lt=et-1,dt=0,bt=z[dt];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+oe);var yt=0;for(We=Math.min(this.lines.maxLength-1,et+oe-1);We>=0;We--)if(bt&&bt.start>lt+yt){for(var Vt=bt.newLines.length-1;Vt>=0;Vt--)this.lines.set(We--,bt.newLines[Vt]);We++,$t.push({index:lt+1,amount:bt.newLines.length}),yt+=bt.newLines.length,bt=z[++dt]}else this.lines.set(We,st[lt--]);var Kt=0;for(We=$t.length-1;We>=0;We--)$t[We].index+=Kt,this.lines.onInsertEmitter.fire($t[We]),Kt+=$t[We].amount;var gn=Math.max(0,et+oe-this.lines.maxLength);gn>0&&this.lines.onTrimEmitter.fire(gn)}},xe.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,ie=0;ie<oe;++ie)if(z.get(ie)[Ee.CHAR_DATA_WIDTH_INDEX]&&(ue-=z.get(ie)[Ee.CHAR_DATA_CHAR_INDEX].length||1),ue<0)return[fe,ie];fe++}return[fe,0]},xe.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):""},xe.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}},xe.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},xe.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},xe.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},xe.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},xe.prototype._removeMarker=function(fe){this.markers.splice(this.markers.indexOf(fe),1)},xe.prototype.iterator=function(fe,ue,ee,z,oe){return new he(this,fe,ue,ee,z,oe)},xe}();De.Buffer=ge;var he=function(){function xe(fe,ue,ee,z,oe,ie){ee===void 0&&(ee=0),z===void 0&&(z=fe.lines.length),oe===void 0&&(oe=0),ie===void 0&&(ie=0),this._buffer=fe,this._trimRight=ue,this._startIndex=ee,this._endIndex=z,this._startOverscan=oe,this._endOverscan=ie,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return xe.prototype.hasNext=function(){return this._current<this._endIndex},xe.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}},xe}();De.BufferStringIterator=he},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.CircularList=void 0;var ye=Le(0),Fe=function(){function Me(Ee){this._maxLength=Ee,this.onDeleteEmitter=new ye.EventEmitter,this.onInsertEmitter=new ye.EventEmitter,this.onTrimEmitter=new ye.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(Ee){if(this._maxLength!==Ee){for(var me=new Array(Ee),be=0;be<Math.min(Ee,this.length);be++)me[be]=this._array[this._getCyclicIndex(be)];this._array=me,this._maxLength=Ee,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(Me.prototype,"length",{get:function(){return this._length},set:function(Ee){if(Ee>this._length)for(var me=this._length;me<Ee;me++)this._array[me]=void 0;this._length=Ee},enumerable:!1,configurable:!0}),Me.prototype.get=function(Ee){return this._array[this._getCyclicIndex(Ee)]},Me.prototype.set=function(Ee,me){this._array[this._getCyclicIndex(Ee)]=me},Me.prototype.push=function(Ee){this._array[this._getCyclicIndex(this._length)]=Ee,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(Ee,me){for(var be=[],ve=2;ve<arguments.length;ve++)be[ve-2]=arguments[ve];if(me){for(var we=Ee;we<this._length-me;we++)this._array[this._getCyclicIndex(we)]=this._array[this._getCyclicIndex(we+me)];this._length-=me}for(we=this._length-1;we>=Ee;we--)this._array[this._getCyclicIndex(we+be.length)]=this._array[this._getCyclicIndex(we)];for(we=0;we<be.length;we++)this._array[this._getCyclicIndex(Ee+we)]=be[we];if(this._length+be.length>this._maxLength){var ge=this._length+be.length-this._maxLength;this._startIndex+=ge,this._length=this._maxLength,this.onTrimEmitter.fire(ge)}else this._length+=be.length},Me.prototype.trimStart=function(Ee){Ee>this._length&&(Ee=this._length),this._startIndex+=Ee,this._length-=Ee,this.onTrimEmitter.fire(Ee)},Me.prototype.shiftElements=function(Ee,me,be){if(!(me<=0)){if(Ee<0||Ee>=this._length)throw new Error("start argument out of range");if(Ee+be<0)throw new Error("Cannot shift elements in list beyond index 0");if(be>0){for(var ve=me-1;ve>=0;ve--)this.set(Ee+ve+be,this.get(Ee+ve));var we=Ee+me+be-this._length;if(we>0)for(this._length+=we;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(ve=0;ve<me;ve++)this.set(Ee+ve+be,this.get(Ee+ve))}},Me.prototype._getCyclicIndex=function(Ee){return(this._startIndex+Ee)%this._maxLength},Me}();De.CircularList=Fe},function(hn,De,Le){"use strict";function ye(Fe,Me,Ee){if(Me===Fe.length-1)return Fe[Me].getTrimmedLength();var me=!Fe[Me].hasContent(Ee-1)&&Fe[Me].getWidth(Ee-1)===1,be=Fe[Me+1].getWidth(0)===2;return me&&be?Ee-1:Ee}Object.defineProperty(De,"__esModule",{value:!0}),De.getWrappedLineTrimmedLength=De.reflowSmallerGetNewLineLengths=De.reflowLargerApplyNewLayout=De.reflowLargerCreateNewLayout=De.reflowLargerGetLinesToRemove=void 0,De.reflowLargerGetLinesToRemove=function(Fe,Me,Ee,me,be){for(var ve=[],we=0;we<Fe.length-1;we++){var ge=we,he=Fe.get(++ge);if(he.isWrapped){for(var xe=[Fe.get(we)];ge<Fe.length&&he.isWrapped;)xe.push(he),he=Fe.get(++ge);if(me>=we&&me<ge)we+=xe.length-1;else{for(var fe=0,ue=ye(xe,fe,Me),ee=1,z=0;ee<xe.length;){var oe=ye(xe,ee,Me),ie=oe-z,se=Ee-ue,le=Math.min(ie,se);xe[fe].copyCellsFrom(xe[ee],z,ue,le,!1),(ue+=le)===Ee&&(fe++,ue=0),(z+=le)===oe&&(ee++,z=0),ue===0&&fe!==0&&xe[fe-1].getWidth(Ee-1)===2&&(xe[fe].copyCellsFrom(xe[fe-1],Ee-1,ue++,1,!1),xe[fe-1].setCell(Ee-1,be))}xe[fe].replaceCells(ue,Ee,be);for(var Se=0,pe=xe.length-1;pe>0&&(pe>fe||xe[pe].getTrimmedLength()===0);pe--)Se++;Se>0&&(ve.push(we+xe.length-Se),ve.push(Se)),we+=xe.length-1}}}return ve},De.reflowLargerCreateNewLayout=function(Fe,Me){for(var Ee=[],me=0,be=Me[me],ve=0,we=0;we<Fe.length;we++)if(be===we){var ge=Me[++me];Fe.onDeleteEmitter.fire({index:we-ve,amount:ge}),we+=ge-1,ve+=ge,be=Me[++me]}else Ee.push(we);return{layout:Ee,countRemoved:ve}},De.reflowLargerApplyNewLayout=function(Fe,Me){for(var Ee=[],me=0;me<Me.length;me++)Ee.push(Fe.get(Me[me]));for(me=0;me<Ee.length;me++)Fe.set(me,Ee[me]);Fe.length=Me.length},De.reflowSmallerGetNewLineLengths=function(Fe,Me,Ee){for(var me=[],be=Fe.map(function(ue,ee){return ye(Fe,ee,Me)}).reduce(function(ue,ee){return ue+ee}),ve=0,we=0,ge=0;ge<be;){if(be-ge<Ee){me.push(be-ge);break}ve+=Ee;var he=ye(Fe,we,Me);ve>he&&(ve-=he,we++);var xe=Fe[we].getWidth(ve-1)===2;xe&&ve--;var fe=xe?Ee-1:Ee;me.push(fe),ge+=fe}return me},De.getWrappedLineTrimmedLength=ye},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(me,be){return(ye=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ve,we){ve.__proto__=we}||function(ve,we){for(var ge in we)we.hasOwnProperty(ge)&&(ve[ge]=we[ge])})(me,be)},function(me,be){function ve(){this.constructor=me}ye(me,be),me.prototype=be===null?Object.create(be):(ve.prototype=be.prototype,new ve)});Object.defineProperty(De,"__esModule",{value:!0}),De.Marker=void 0;var Me=Le(0),Ee=function(me){function be(ve){var we=me.call(this)||this;return we.line=ve,we._id=be._nextId++,we.isDisposed=!1,we._onDispose=new Me.EventEmitter,we}return Fe(be,me),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);De.Marker=Ee},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.OptionsService=De.DEFAULT_OPTIONS=De.DEFAULT_BELL_SOUND=void 0;var ye=Le(0),Fe=Le(11),Me=Le(33);De.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",De.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:De.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:Fe.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var Ee=["cols","rows"],me=function(){function be(ve){this._onOptionChange=new ye.EventEmitter,this.options=Me.clone(De.DEFAULT_OPTIONS);for(var we=0,ge=Object.keys(ve);we<ge.length;we++){var he=ge[we];if(he in this.options){var xe=ve[he];this.options[he]=xe}}}return Object.defineProperty(be.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),be.prototype.setOption=function(ve,we){if(!(ve in De.DEFAULT_OPTIONS))throw new Error('No option with key "'+ve+'"');if(Ee.indexOf(ve)!==-1)throw new Error('Option "'+ve+'" can only be set in the constructor');this.options[ve]!==we&&(we=this._sanitizeAndValidateOption(ve,we),this.options[ve]!==we&&(this.options[ve]=we,this._onOptionChange.fire(ve)))},be.prototype._sanitizeAndValidateOption=function(ve,we){switch(ve){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":we||(we=De.DEFAULT_OPTIONS[ve]);break;case"cursorWidth":we=Math.floor(we);case"lineHeight":case"tabStopWidth":if(we<1)throw new Error(ve+" 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(ve+" cannot be less than 0, value: "+we);break;case"fastScrollSensitivity":case"scrollSensitivity":if(we<=0)throw new Error(ve+" cannot be less than or equal to 0, value: "+we)}return we},be.prototype.getOption=function(ve){if(!(ve in De.DEFAULT_OPTIONS))throw new Error('No option with key "'+ve+'"');return this.options[ve]},be}();De.OptionsService=me},function(hn,De,Le){"use strict";var ye,Fe=this&&this.__extends||(ye=function(fe,ue){return(ye=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}ye(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,ie=arguments.length,se=ie<3?ue:z===null?z=Object.getOwnPropertyDescriptor(ue,ee):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")se=Reflect.decorate(fe,ue,ee,z);else for(var le=fe.length-1;le>=0;le--)(oe=fe[le])&&(se=(ie<3?oe(se):ie>3?oe(ue,ee,se):oe(ue,ee))||se);return ie>3&&se&&Object.defineProperty(ue,ee,se),se},Ee=this&&this.__param||function(fe,ue){return function(ee,z){ue(ee,z,fe)}};Object.defineProperty(De,"__esModule",{value:!0}),De.CoreService=void 0;var me=Le(1),be=Le(0),ve=Le(33),we=Le(2),ge=Object.freeze({insertMode:!1}),he=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),xe=function(fe){function ue(ee,z,oe,ie){var se=fe.call(this)||this;return se._bufferService=z,se._logService=oe,se._optionsService=ie,se.isCursorInitialized=!1,se.isCursorHidden=!1,se._onData=se.register(new be.EventEmitter),se._onUserInput=se.register(new be.EventEmitter),se._onBinary=se.register(new be.EventEmitter),se._scrollToBottom=ee,se.register({dispose:function(){return se._scrollToBottom=void 0}}),se.modes=ve.clone(ge),se.decPrivateModes=ve.clone(he),se}return Fe(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=ve.clone(ge),this.decPrivateModes=ve.clone(he)},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(ie){return ie.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([Ee(1,me.IBufferService),Ee(2,me.ILogService),Ee(3,me.IOptionsService)],ue)}(we.Disposable);De.CoreService=xe},function(hn,De,Le){"use strict";var ye=this&&this.__decorate||function(he,xe,fe,ue){var ee,z=arguments.length,oe=z<3?xe:ue===null?ue=Object.getOwnPropertyDescriptor(xe,fe):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(he,xe,fe,ue);else for(var ie=he.length-1;ie>=0;ie--)(ee=he[ie])&&(oe=(z<3?ee(oe):z>3?ee(xe,fe,oe):ee(xe,fe))||oe);return z>3&&oe&&Object.defineProperty(xe,fe,oe),oe},Fe=this&&this.__param||function(he,xe){return function(fe,ue){xe(fe,ue,he)}};Object.defineProperty(De,"__esModule",{value:!0}),De.CoreMouseService=void 0;var Me=Le(1),Ee=Le(0),me={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(he){return he.button!==4&&he.action===1&&(he.ctrl=!1,he.alt=!1,he.shift=!1,!0)}},VT200:{events:19,restrict:function(he){return he.action!==32}},DRAG:{events:23,restrict:function(he){return he.action!==32||he.button!==3}},ANY:{events:31,restrict:function(he){return!0}}};function be(he,xe){var fe=(he.ctrl?16:0)|(he.shift?4:0)|(he.alt?8:0);return he.button===4?(fe|=64,fe|=he.action):(fe|=3&he.button,4&he.button&&(fe|=64),8&he.button&&(fe|=128),he.action===32?fe|=32:he.action!==0||xe||(fe|=3)),fe}var ve=String.fromCharCode,we={DEFAULT:function(he){var xe=[be(he,!1)+32,he.col+32,he.row+32];return xe[0]>255||xe[1]>255||xe[2]>255?"":"\x1B[M"+ve(xe[0])+ve(xe[1])+ve(xe[2])},SGR:function(he){var xe=he.action===0&&he.button!==4?"m":"M";return"\x1B[<"+be(he,!0)+";"+he.col+";"+he.row+xe}},ge=function(){function he(xe,fe){this._bufferService=xe,this._coreService=fe,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new Ee.EventEmitter,this._lastEvent=null;for(var ue=0,ee=Object.keys(me);ue<ee.length;ue++){var z=ee[ue];this.addProtocol(z,me[z])}for(var oe=0,ie=Object.keys(we);oe<ie.length;oe++){var se=ie[oe];this.addEncoding(se,we[se])}this.reset()}return he.prototype.addProtocol=function(xe,fe){this._protocols[xe]=fe},he.prototype.addEncoding=function(xe,fe){this._encodings[xe]=fe},Object.defineProperty(he.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(xe){if(!this._protocols[xe])throw new Error('unknown protocol "'+xe+'"');this._activeProtocol=xe,this._onProtocolChange.fire(this._protocols[xe].events)},enumerable:!1,configurable:!0}),Object.defineProperty(he.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(he.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(xe){if(!this._encodings[xe])throw new Error('unknown encoding "'+xe+'"');this._activeEncoding=xe},enumerable:!1,configurable:!0}),he.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(he.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),he.prototype.triggerMouseEvent=function(xe){if(xe.col<0||xe.col>=this._bufferService.cols||xe.row<0||xe.row>=this._bufferService.rows||xe.button===4&&xe.action===32||xe.button===3&&xe.action!==32||xe.button!==4&&(xe.action===2||xe.action===3)||(xe.col++,xe.row++,xe.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,xe))||!this._protocols[this._activeProtocol].restrict(xe))return!1;var fe=this._encodings[this._activeEncoding](xe);return fe&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(fe):this._coreService.triggerDataEvent(fe,!0)),this._lastEvent=xe,!0},he.prototype.explainEvents=function(xe){return{down:!!(1&xe),up:!!(2&xe),drag:!!(4&xe),move:!!(8&xe),wheel:!!(16&xe)}},he.prototype._compareEvents=function(xe,fe){return xe.col===fe.col&&xe.row===fe.row&&xe.button===fe.button&&xe.action===fe.action&&xe.ctrl===fe.ctrl&&xe.alt===fe.alt&&xe.shift===fe.shift},he=ye([Fe(0,Me.IBufferService),Fe(1,Me.ICoreService)],he)}();De.CoreMouseService=ge},function(hn,De,Le){"use strict";var ye=this&&this.__decorate||function(me,be,ve,we){var ge,he=arguments.length,xe=he<3?be:we===null?we=Object.getOwnPropertyDescriptor(be,ve):we;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")xe=Reflect.decorate(me,be,ve,we);else for(var fe=me.length-1;fe>=0;fe--)(ge=me[fe])&&(xe=(he<3?ge(xe):he>3?ge(be,ve,xe):ge(be,ve))||xe);return he>3&&xe&&Object.defineProperty(be,ve,xe),xe},Fe=this&&this.__param||function(me,be){return function(ve,we){be(ve,we,me)}};Object.defineProperty(De,"__esModule",{value:!0}),De.DirtyRowService=void 0;var Me=Le(1),Ee=function(){function me(be){this._bufferService=be,this.clearRange()}return Object.defineProperty(me.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),me.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},me.prototype.markDirty=function(be){be<this._start?this._start=be:be>this._end&&(this._end=be)},me.prototype.markRangeDirty=function(be,ve){if(be>ve){var we=be;be=ve,ve=we}be<this._start&&(this._start=be),ve>this._end&&(this._end=ve)},me.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},me=ye([Fe(0,Me.IBufferService)],me)}();De.DirtyRowService=Ee},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.UnicodeService=void 0;var ye=Le(0),Fe=Le(79),Me=function(){function Ee(){this._providers=Object.create(null),this._active="",this._onChange=new ye.EventEmitter;var me=new Fe.UnicodeV6;this.register(me),this._active=me.version,this._activeProvider=me}return Object.defineProperty(Ee.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ee.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(Ee.prototype,"activeVersion",{get:function(){return this._active},set:function(me){if(!this._providers[me])throw new Error('unknown Unicode version "'+me+'"');this._active=me,this._activeProvider=this._providers[me],this._onChange.fire(me)},enumerable:!1,configurable:!0}),Ee.prototype.register=function(me){this._providers[me.version]=me},Ee.prototype.wcwidth=function(me){return this._activeProvider.wcwidth(me)},Ee.prototype.getStringCellWidth=function(me){for(var be=0,ve=me.length,we=0;we<ve;++we){var ge=me.charCodeAt(we);if(55296<=ge&&ge<=56319){if(++we>=ve)return be+this.wcwidth(ge);var he=me.charCodeAt(we);56320<=he&&he<=57343?ge=1024*(ge-55296)+he-56320+65536:be+=this.wcwidth(he)}be+=this.wcwidth(ge)}return be},Ee}();De.UnicodeService=Me},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.UnicodeV6=void 0;var ye,Fe=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]],Ee=[[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]],me=function(){function be(){if(this.version="6",!ye){ye=new Uint8Array(65536),Fe.fill(ye,1),ye[0]=0,Fe.fill(ye,0,1,32),Fe.fill(ye,0,127,160),Fe.fill(ye,2,4352,4448),ye[9001]=2,ye[9002]=2,Fe.fill(ye,2,11904,42192),ye[12351]=1,Fe.fill(ye,2,44032,55204),Fe.fill(ye,2,63744,64256),Fe.fill(ye,2,65040,65050),Fe.fill(ye,2,65072,65136),Fe.fill(ye,2,65280,65377),Fe.fill(ye,2,65504,65511);for(var ve=0;ve<Me.length;++ve)Fe.fill(ye,0,Me[ve][0],Me[ve][1]+1)}}return be.prototype.wcwidth=function(ve){return ve<32?0:ve<127?1:ve<65536?ye[ve]:function(we,ge){var he,xe=0,fe=ge.length-1;if(we<ge[0][0]||we>ge[fe][1])return!1;for(;fe>=xe;)if(we>ge[he=xe+fe>>1][1])xe=he+1;else{if(!(we<ge[he][0]))return!0;fe=he-1}return!1}(ve,Ee)?0:ve>=131072&&ve<=196605||ve>=196608&&ve<=262141?2:1},be}();De.UnicodeV6=me},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.CharsetService=void 0;var ye=function(){function Fe(){this.glevel=0,this._charsets=[]}return Fe.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},Fe.prototype.setgLevel=function(Me){this.glevel=Me,this.charset=this._charsets[Me]},Fe.prototype.setgCharset=function(Me,Ee){this._charsets[Me]=Ee,this.glevel===Me&&(this.charset=Ee)},Fe}();De.CharsetService=ye},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.updateWindowsModeWrappedState=void 0;var ye=Le(3);De.updateWindowsModeWrappedState=function(Fe){var Me=Fe.buffer.lines.get(Fe.buffer.ybase+Fe.buffer.y-1),Ee=Me==null?void 0:Me.get(Fe.cols-1),me=Fe.buffer.lines.get(Fe.buffer.ybase+Fe.buffer.y);me&&Ee&&(me.isWrapped=Ee[ye.CHAR_DATA_CODE_INDEX]!==ye.NULL_CELL_CODE&&Ee[ye.CHAR_DATA_CODE_INDEX]!==ye.WHITESPACE_CELL_CODE)}},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.WriteBuffer=void 0;var ye=function(){function Fe(Me){this._action=Me,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return Fe.prototype.writeSync=function(Me){if(this._writeBuffer.length){for(var Ee=this._bufferOffset;Ee<this._writeBuffer.length;++Ee){var me=this._writeBuffer[Ee],be=this._callbacks[Ee];this._action(me),be&&be()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(Me)},Fe.prototype.write=function(Me,Ee){var me=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 me._innerWrite()})),this._pendingData+=Me.length,this._writeBuffer.push(Me),this._callbacks.push(Ee)},Fe.prototype._innerWrite=function(){for(var Me=this,Ee=Date.now();this._writeBuffer.length>this._bufferOffset;){var me=this._writeBuffer[this._bufferOffset],be=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(me),this._pendingData-=me.length,be&&be(),Date.now()-Ee>=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)},Fe}();De.WriteBuffer=ye},function(hn,De,Le){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.AddonManager=void 0;var ye=function(){function Fe(){this._addons=[]}return Fe.prototype.dispose=function(){for(var Me=this._addons.length-1;Me>=0;Me--)this._addons[Me].instance.dispose()},Fe.prototype.loadAddon=function(Me,Ee){var me=this,be={instance:Ee,dispose:Ee.dispose,isDisposed:!1};this._addons.push(be),Ee.dispose=function(){return me._wrappedAddonDispose(be)},Ee.activate(Me)},Fe.prototype._wrappedAddonDispose=function(Me){if(!Me.isDisposed){for(var Ee=-1,me=0;me<this._addons.length;me++)if(this._addons[me]===Me){Ee=me;break}if(Ee===-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(Ee,1)}},Fe}();De.AddonManager=ye}])})},4977:function(_n){"use strict";_n.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(_n){"use strict";_n.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="},17423:function(_n,hn,De){"use strict";De.d(hn,{Z:function(){return ve}});const Le=we=>typeof we=="object"&&we!=null&&we.nodeType===1,ye=(we,ge)=>(!ge||we!=="hidden")&&we!=="visible"&&we!=="clip",Fe=(we,ge)=>{if(we.clientHeight<we.scrollHeight||we.clientWidth<we.scrollWidth){const he=getComputedStyle(we,null);return ye(he.overflowY,ge)||ye(he.overflowX,ge)||(xe=>{const fe=(ue=>{if(!ue.ownerDocument||!ue.ownerDocument.defaultView)return null;try{return ue.ownerDocument.defaultView.frameElement}catch(ee){return null}})(xe);return!!fe&&(fe.clientHeight<xe.scrollHeight||fe.clientWidth<xe.scrollWidth)})(we)}return!1},Me=(we,ge,he,xe,fe,ue,ee,z)=>ue<we&&ee>ge||ue>we&&ee<ge?0:ue<=we&&z<=he||ee>=ge&&z>=he?ue-we-xe:ee>ge&&z<he||ue<we&&z>he?ee-ge+fe:0,Ee=we=>{const ge=we.parentElement;return ge==null?we.getRootNode().host||null:ge},me=(we,ge)=>{var he,xe,fe,ue;if(typeof document=="undefined")return[];const{scrollMode:ee,block:z,inline:oe,boundary:ie,skipOverflowHiddenElements:se}=ge,le=typeof ie=="function"?ie:bt=>bt!==ie;if(!Le(we))throw new TypeError("Invalid target");const Se=document.scrollingElement||document.documentElement,pe=[];let Ce=we;for(;Le(Ce)&&le(Ce);){if(Ce=Ee(Ce),Ce===Se){pe.push(Ce);break}Ce!=null&&Ce===document.body&&Fe(Ce)&&!Fe(document.documentElement)||Ce!=null&&Fe(Ce,se)&&pe.push(Ce)}const Ae=(xe=(he=window.visualViewport)==null?void 0:he.width)!=null?xe:innerWidth,Oe=(ue=(fe=window.visualViewport)==null?void 0:fe.height)!=null?ue:innerHeight,{scrollX:Re,scrollY:We}=window,{height:$e,width:Je,top:pt,right:St,bottom:Mt,left:ct}=we.getBoundingClientRect(),{top:wt,right:ft,bottom:$t,left:st}=(bt=>{const yt=window.getComputedStyle(bt);return{top:parseFloat(yt.scrollMarginTop)||0,right:parseFloat(yt.scrollMarginRight)||0,bottom:parseFloat(yt.scrollMarginBottom)||0,left:parseFloat(yt.scrollMarginLeft)||0}})(we);let et=z==="start"||z==="nearest"?pt-wt:z==="end"?Mt+$t:pt+$e/2-wt+$t,lt=oe==="center"?ct+Je/2-st+ft:oe==="end"?St+ft:ct-st;const dt=[];for(let bt=0;bt<pe.length;bt++){const yt=pe[bt],{height:Vt,width:Kt,top:gn,right:Gt,bottom:Dt,left:on}=yt.getBoundingClientRect();if(ee==="if-needed"&&pt>=0&&ct>=0&&Mt<=Oe&&St<=Ae&&pt>=gn&&Mt<=Dt&&ct>=on&&St<=Gt)return dt;const Jt=getComputedStyle(yt),jt=parseInt(Jt.borderLeftWidth,10),ut=parseInt(Jt.borderTopWidth,10),ze=parseInt(Jt.borderRightWidth,10),je=parseInt(Jt.borderBottomWidth,10);let it=0,ht=0;const nt="offsetWidth"in yt?yt.offsetWidth-yt.clientWidth-jt-ze:0,Ke="offsetHeight"in yt?yt.offsetHeight-yt.clientHeight-ut-je:0,Be="offsetWidth"in yt?yt.offsetWidth===0?0:Kt/yt.offsetWidth:0,Ue="offsetHeight"in yt?yt.offsetHeight===0?0:Vt/yt.offsetHeight:0;if(Se===yt)it=z==="start"?et:z==="end"?et-Oe:z==="nearest"?Me(We,We+Oe,Oe,ut,je,We+et,We+et+$e,$e):et-Oe/2,ht=oe==="start"?lt:oe==="center"?lt-Ae/2:oe==="end"?lt-Ae:Me(Re,Re+Ae,Ae,jt,ze,Re+lt,Re+lt+Je,Je),it=Math.max(0,it+We),ht=Math.max(0,ht+Re);else{it=z==="start"?et-gn-ut:z==="end"?et-Dt+je+Ke:z==="nearest"?Me(gn,Dt,Vt,ut,je+Ke,et,et+$e,$e):et-(gn+Vt/2)+Ke/2,ht=oe==="start"?lt-on-jt:oe==="center"?lt-(on+Kt/2)+nt/2:oe==="end"?lt-Gt+ze+nt:Me(on,Gt,Kt,jt,ze+nt,lt,lt+Je,Je);const{scrollLeft:rt,scrollTop:Ze}=yt;it=Ue===0?0:Math.max(0,Math.min(Ze+it/Ue,yt.scrollHeight-Vt/Ue+Ke)),ht=Be===0?0:Math.max(0,Math.min(rt+ht/Be,yt.scrollWidth-Kt/Be+nt)),et+=Ze-it,lt+=rt-ht}dt.push({el:yt,top:it,left:ht})}return dt},be=we=>we===!1?{block:"end",inline:"nearest"}:(ge=>ge===Object(ge)&&Object.keys(ge).length!==0)(we)?we:{block:"start",inline:"nearest"};function ve(we,ge){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 he=(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")(ge))return ge.behavior(me(we,ge));const xe=typeof ge=="boolean"||ge==null?void 0:ge.behavior;for(const{el:fe,top:ue,left:ee}of me(we,be(ge))){const z=ue-he.top+he.bottom,oe=ee-he.left+he.right;fe.scroll({top:z,left:oe,behavior:xe})}}}}]);
|